@chenpx976/chrome-devtools-mcp 0.0.0-stage → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +223 -2
  3. package/out/Default/gen/src/ArcBrowser.js +128 -0
  4. package/out/Default/gen/src/BrowserManager.js +562 -0
  5. package/out/Default/gen/src/LogpointManager.js +287 -0
  6. package/out/Default/gen/src/McpContext.js +1031 -0
  7. package/out/Default/gen/src/McpPage.js +1427 -0
  8. package/out/Default/gen/src/McpResponse.js +1350 -0
  9. package/out/Default/gen/src/McpWorker.js +66 -0
  10. package/out/Default/gen/src/NetworkOverrideManager.js +447 -0
  11. package/out/Default/gen/src/SlimMcpResponse.js +23 -0
  12. package/out/Default/gen/src/TextSnapshot.js +336 -0
  13. package/out/Default/gen/src/ToolHandler.js +531 -0
  14. package/out/Default/gen/src/bin/check-latest-version.js +53 -0
  15. package/out/Default/gen/src/bin/chrome-devtools-mcp-main.js +80 -0
  16. package/out/Default/gen/src/bin/chrome-devtools-mcp.js +23 -0
  17. package/out/Default/gen/src/bin/chrome-devtools.js +213 -0
  18. package/out/Default/gen/src/collectors/PageCollector.js +325 -0
  19. package/out/Default/gen/src/collectors/ServiceWorkerCollector.js +198 -0
  20. package/out/Default/gen/src/collectors/constants.js +7 -0
  21. package/out/Default/gen/src/config/ConfigLocator.js +70 -0
  22. package/out/Default/gen/src/config/ConfigParser.js +163 -0
  23. package/out/Default/gen/src/config/ConfigWatcher.js +94 -0
  24. package/out/Default/gen/src/config/ServerConfig.js +284 -0
  25. package/out/Default/gen/src/config/browser-options.js +135 -0
  26. package/out/Default/gen/src/config/category-options.js +84 -0
  27. package/out/Default/gen/src/config/cli-commands.js +208 -0
  28. package/out/Default/gen/src/config/cli-options.js +2090 -0
  29. package/out/Default/gen/src/config/mcp-options.js +371 -0
  30. package/out/Default/gen/src/config/puppeteer-options.js +69 -0
  31. package/out/Default/gen/src/config/tool-options.js +60 -0
  32. package/out/Default/gen/src/daemon/client.js +281 -0
  33. package/out/Default/gen/src/daemon/daemon.js +280 -0
  34. package/out/Default/gen/src/daemon/types.js +7 -0
  35. package/out/Default/gen/src/daemon/utils.js +173 -0
  36. package/out/Default/gen/src/devtools/DevToolsCommentBridge.js +151 -0
  37. package/out/Default/gen/src/devtools/DevtoolsUtils.js +413 -0
  38. package/out/Default/gen/src/devtools/McpHostBindingAdapter.js +164 -0
  39. package/out/Default/gen/src/devtools/issueDescriptions.js +42 -0
  40. package/out/Default/gen/src/formatters/CommentFormatter.js +73 -0
  41. package/out/Default/gen/src/formatters/ConsoleFormatter.js +363 -0
  42. package/out/Default/gen/src/formatters/CssFormatter.js +883 -0
  43. package/out/Default/gen/src/formatters/HeapSnapshotFormatter.js +239 -0
  44. package/out/Default/gen/src/formatters/IssueFormatter.js +194 -0
  45. package/out/Default/gen/src/formatters/LogpointFormatter.js +62 -0
  46. package/out/Default/gen/src/formatters/NetworkFormatter.js +295 -0
  47. package/out/Default/gen/src/formatters/NetworkOverridesFormatter.js +57 -0
  48. package/out/Default/gen/src/formatters/RemoteObjectFormatter.js +231 -0
  49. package/out/Default/gen/src/formatters/SnapshotFormatter.js +172 -0
  50. package/out/Default/gen/src/formatters/WebAuthnFormatter.js +56 -0
  51. package/out/Default/gen/src/formatters/constants.js +8 -0
  52. package/out/Default/gen/src/index.js +434 -0
  53. package/out/Default/gen/src/processors/ChunkedTraceParser.js +361 -0
  54. package/out/Default/gen/src/processors/HeapSnapshotManager.js +595 -0
  55. package/out/Default/gen/src/processors/PerformanceTrace.js +132 -0
  56. package/out/Default/gen/src/telemetry/ClearcutLogger.js +271 -0
  57. package/out/Default/gen/src/telemetry/WatchdogClient.js +60 -0
  58. package/out/Default/gen/src/telemetry/errors.js +18 -0
  59. package/out/Default/gen/src/telemetry/flagUtils.js +89 -0
  60. package/out/Default/gen/src/telemetry/metricsRegistry.js +85 -0
  61. package/out/Default/gen/src/telemetry/persistence.js +82 -0
  62. package/out/Default/gen/src/telemetry/transformation.js +229 -0
  63. package/out/Default/gen/src/telemetry/types.js +36 -0
  64. package/out/Default/gen/src/telemetry/watchdog/ClearcutSender.js +213 -0
  65. package/out/Default/gen/src/telemetry/watchdog/main.js +142 -0
  66. package/out/Default/gen/src/third_party/THIRD_PARTY_NOTICES +3774 -0
  67. package/out/Default/gen/src/third_party/browser.js +808 -0
  68. package/out/Default/gen/src/third_party/bundled-packages.json +11 -0
  69. package/out/Default/gen/src/third_party/cli.js +139 -0
  70. package/out/Default/gen/src/third_party/devtools-formatter-worker.js +125 -0
  71. package/out/Default/gen/src/third_party/devtools-heap-snapshot-worker.js +111 -0
  72. package/out/Default/gen/src/third_party/index.js +128 -0
  73. package/out/Default/gen/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  74. package/out/Default/gen/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
  75. package/out/Default/gen/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  76. package/out/Default/gen/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
  77. package/out/Default/gen/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  78. package/out/Default/gen/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
  79. package/out/Default/gen/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  80. package/out/Default/gen/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
  81. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  82. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  83. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  84. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  85. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  86. package/out/Default/gen/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  87. package/out/Default/gen/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
  88. package/out/Default/gen/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  89. package/out/Default/gen/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  90. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  91. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  92. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  93. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
  94. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidHeader.md +12 -0
  95. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
  96. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistItemNotInnerList.md +12 -0
  97. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistMoreThanOneList.md +7 -0
  98. package/out/Default/gen/src/third_party/issue-descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
  99. package/out/Default/gen/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  100. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
  101. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
  102. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
  103. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  104. package/out/Default/gen/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  105. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
  106. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +3 -0
  107. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantReadOptOut.md +5 -0
  108. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +3 -0
  109. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnMetadataGrantSetOptOut.md +5 -0
  110. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  111. package/out/Default/gen/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  112. package/out/Default/gen/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
  113. package/out/Default/gen/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
  114. package/out/Default/gen/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
  115. package/out/Default/gen/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  116. package/out/Default/gen/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
  117. package/out/Default/gen/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  118. package/out/Default/gen/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  119. package/out/Default/gen/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  120. package/out/Default/gen/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
  121. package/out/Default/gen/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
  122. package/out/Default/gen/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
  123. package/out/Default/gen/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +9 -0
  124. package/out/Default/gen/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
  125. package/out/Default/gen/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
  126. package/out/Default/gen/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  127. package/out/Default/gen/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
  128. package/out/Default/gen/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
  129. package/out/Default/gen/src/third_party/issue-descriptions/deprecation.md +3 -0
  130. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsEmptyList.md +1 -0
  131. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsHttpNotFound.md +1 -0
  132. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidContentType.md +1 -0
  133. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsInvalidResponse.md +1 -0
  134. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestAccountsNoResponse.md +1 -0
  135. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
  136. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
  137. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownHttpNotFound.md +1 -0
  138. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidContentType.md +1 -0
  139. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownInvalidResponse.md +1 -0
  140. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestEmailVerificationWellKnownNoResponse.md +1 -0
  141. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestInvalidEmail.md +1 -0
  142. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestJwksHttpNotFound.md +1 -0
  143. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestJwksInvalidResponse.md +1 -0
  144. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
  145. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
  146. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
  147. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
  148. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
  149. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
  150. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
  151. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
  152. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidAudience.md +1 -0
  153. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidIssuedAt.md +1 -0
  154. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidNonce.md +1 -0
  155. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidSdHash.md +1 -0
  156. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbInvalidTyp.md +1 -0
  157. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingAud.md +1 -0
  158. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingCnf.md +1 -0
  159. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingIat.md +1 -0
  160. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingNonce.md +1 -0
  161. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbMissingSdHash.md +1 -0
  162. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationKbSignatureFailed.md +1 -0
  163. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmail.md +1 -0
  164. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidEmailVerified.md +1 -0
  165. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidHolderKey.md +1 -0
  166. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuedAt.md +1 -0
  167. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtInvalidIssuer.md +1 -0
  168. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtJwksMissingKeys.md +1 -0
  169. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingCnf.md +1 -0
  170. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingEmail.md +1 -0
  171. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIat.md +1 -0
  172. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtMissingIss.md +1 -0
  173. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtSignatureFailed.md +1 -0
  174. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestTokenVerificationSdJwtUnsupportedHeaderAlg.md +1 -0
  175. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
  176. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
  177. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
  178. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
  179. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
  180. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
  181. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
  182. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
  183. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
  184. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
  185. package/out/Default/gen/src/third_party/issue-descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
  186. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +1 -0
  187. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  188. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  189. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  190. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  191. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
  192. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +1 -0
  193. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  194. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  195. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +1 -0
  196. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  197. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  198. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  199. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  200. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  201. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  202. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  203. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  204. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  205. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +1 -0
  206. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  207. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  208. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  209. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  210. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  211. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  212. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  213. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  214. package/out/Default/gen/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  215. package/out/Default/gen/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
  216. package/out/Default/gen/src/third_party/issue-descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
  217. package/out/Default/gen/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  218. package/out/Default/gen/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  219. package/out/Default/gen/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
  220. package/out/Default/gen/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  221. package/out/Default/gen/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  222. package/out/Default/gen/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  223. package/out/Default/gen/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
  224. package/out/Default/gen/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  225. package/out/Default/gen/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
  226. package/out/Default/gen/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  227. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextMissingToolDescription.md +5 -0
  228. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextMissingToolName.md +5 -0
  229. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextParameterMissingName.md +5 -0
  230. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
  231. package/out/Default/gen/src/third_party/issue-descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
  232. package/out/Default/gen/src/third_party/issue-descriptions/genericGeolocationPromptWithoutUserGesture.md +5 -0
  233. package/out/Default/gen/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  234. package/out/Default/gen/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
  235. package/out/Default/gen/src/third_party/issue-descriptions/heavyAd.md +10 -0
  236. package/out/Default/gen/src/third_party/issue-descriptions/lazyLoadImageZeroSize.md +7 -0
  237. package/out/Default/gen/src/third_party/issue-descriptions/mixedContent.md +5 -0
  238. package/out/Default/gen/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
  239. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
  240. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  241. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  242. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  243. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  244. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
  245. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
  246. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
  247. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  248. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  249. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
  250. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
  251. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
  252. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
  253. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
  254. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  255. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  256. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  257. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
  258. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
  259. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
  260. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
  261. package/out/Default/gen/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
  262. package/out/Default/gen/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  263. package/out/Default/gen/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
  264. package/out/Default/gen/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
  265. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  266. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  267. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  268. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  269. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  270. package/out/Default/gen/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  271. package/out/Default/gen/src/third_party/issue-descriptions/selectivePermissionsIntervention.md +7 -0
  272. package/out/Default/gen/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
  273. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  274. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  275. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  276. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  277. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  278. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  279. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  280. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  281. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  282. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  283. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  284. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  285. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  286. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  287. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  288. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  289. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  290. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  291. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  292. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  293. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  294. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  295. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  296. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  297. package/out/Default/gen/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  298. package/out/Default/gen/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
  299. package/out/Default/gen/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
  300. package/out/Default/gen/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
  301. package/out/Default/gen/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
  302. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  303. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  304. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  305. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  306. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  307. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  308. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  309. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  310. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  311. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  312. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  313. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  314. package/out/Default/gen/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  315. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +12 -0
  316. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
  317. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
  318. package/out/Default/gen/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  319. package/out/Default/gen/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
  320. package/out/Default/gen/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
  321. package/out/Default/gen/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  322. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  323. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  324. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
  325. package/out/Default/gen/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  326. package/out/Default/gen/src/third_party/issue-descriptions/webInstallManifestMissingId.md +3 -0
  327. package/out/Default/gen/src/third_party/issue-descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
  328. package/out/Default/gen/src/third_party/issue-descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
  329. package/out/Default/gen/src/third_party/issue-descriptions/webInstallNoManifest.md +3 -0
  330. package/out/Default/gen/src/third_party/issue-descriptions/webInstallStartUrlInvalid.md +3 -0
  331. package/out/Default/gen/src/third_party/lighthouse-devtools-mcp-bundle.js +60395 -0
  332. package/out/Default/gen/src/tools/ToolDefinition.js +180 -0
  333. package/out/Default/gen/src/tools/categories.js +37 -0
  334. package/out/Default/gen/src/tools/comments.js +230 -0
  335. package/out/Default/gen/src/tools/console.js +122 -0
  336. package/out/Default/gen/src/tools/css.js +54 -0
  337. package/out/Default/gen/src/tools/emulation.js +98 -0
  338. package/out/Default/gen/src/tools/extensions.js +108 -0
  339. package/out/Default/gen/src/tools/input.js +658 -0
  340. package/out/Default/gen/src/tools/lighthouse.js +279 -0
  341. package/out/Default/gen/src/tools/logpoints.js +51 -0
  342. package/out/Default/gen/src/tools/memory.js +531 -0
  343. package/out/Default/gen/src/tools/network.js +325 -0
  344. package/out/Default/gen/src/tools/pages.js +420 -0
  345. package/out/Default/gen/src/tools/performance.js +258 -0
  346. package/out/Default/gen/src/tools/pwa.js +152 -0
  347. package/out/Default/gen/src/tools/screencast.js +160 -0
  348. package/out/Default/gen/src/tools/screenshot.js +315 -0
  349. package/out/Default/gen/src/tools/script.js +319 -0
  350. package/out/Default/gen/src/tools/slim/tools.js +110 -0
  351. package/out/Default/gen/src/tools/snapshot.js +88 -0
  352. package/out/Default/gen/src/tools/thirdPartyDeveloper.js +73 -0
  353. package/out/Default/gen/src/tools/toolNames.js +10 -0
  354. package/out/Default/gen/src/tools/tools.js +72 -0
  355. package/out/Default/gen/src/tools/webauthn.js +51 -0
  356. package/out/Default/gen/src/tools/webmcp.js +55 -0
  357. package/out/Default/gen/src/types.js +21 -0
  358. package/out/Default/gen/src/utils/TaskRunner.js +151 -0
  359. package/out/Default/gen/src/utils/WaitForHelper.js +343 -0
  360. package/out/Default/gen/src/utils/bytes.js +95 -0
  361. package/out/Default/gen/src/utils/check-for-updates.js +81 -0
  362. package/out/Default/gen/src/utils/disclaimers.js +27 -0
  363. package/out/Default/gen/src/utils/errorHandling.js +23 -0
  364. package/out/Default/gen/src/utils/files.js +81 -0
  365. package/out/Default/gen/src/utils/id.js +16 -0
  366. package/out/Default/gen/src/utils/keyboard.js +307 -0
  367. package/out/Default/gen/src/utils/logger.js +145 -0
  368. package/out/Default/gen/src/utils/logpoint.js +44 -0
  369. package/out/Default/gen/src/utils/network.js +81 -0
  370. package/out/Default/gen/src/utils/pagination.js +50 -0
  371. package/out/Default/gen/src/utils/polyfill.js +11 -0
  372. package/out/Default/gen/src/utils/raceWithSignal.js +26 -0
  373. package/out/Default/gen/src/utils/resourceType.js +27 -0
  374. package/out/Default/gen/src/utils/text.js +43 -0
  375. package/out/Default/gen/src/utils/timeout.js +14 -0
  376. package/out/Default/gen/src/utils/url.js +311 -0
  377. package/out/Default/gen/src/version.js +11 -0
  378. package/package.json +125 -4
  379. package/skills/a11y-debugging/SKILL.md +86 -0
  380. package/skills/a11y-debugging/references/a11y-snippets.md +92 -0
  381. package/skills/arc-compatibility/SKILL.md +168 -0
  382. package/skills/arc-compatibility/SOURCES.md +216 -0
  383. package/skills/arc-compatibility/references/compatibility.md +113 -0
  384. package/skills/arc-compatibility/references/output-contract.md +62 -0
  385. package/skills/arc-compatibility/references/workflows.md +105 -0
  386. package/skills/chrome-devtools/SKILL.md +80 -0
  387. package/skills/chrome-devtools-cli/SKILL.md +208 -0
  388. package/skills/chrome-devtools-cli/references/installation.md +24 -0
  389. package/skills/cookie-debugging/SKILL.md +152 -0
  390. package/skills/debug-optimize-lcp/SKILL.md +121 -0
  391. package/skills/debug-optimize-lcp/references/elements-and-size.md +27 -0
  392. package/skills/debug-optimize-lcp/references/lcp-breakdown.md +23 -0
  393. package/skills/debug-optimize-lcp/references/lcp-snippets.md +79 -0
  394. package/skills/debug-optimize-lcp/references/optimization-strategies.md +38 -0
  395. package/skills/inspect-in-devtools/SKILL.md +82 -0
  396. package/skills/memory-leak-debugging/SKILL.md +58 -0
  397. package/skills/memory-leak-debugging/references/common-leaks.md +33 -0
  398. package/skills/troubleshooting/SKILL.md +107 -0
@@ -0,0 +1,111 @@
1
+ var Pb=Object.defineProperty;var Fr=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(n){throw t=[n],n}};var pe=(r,e)=>{for(var t in e)Pb(r,t,{get:e[t],enumerable:!0})};var Oa={};pe(Oa,{HOST_RUNTIME:()=>Vb});function Iu(){Gi&&(URL.revokeObjectURL(Gi),Gi=null)}async function Bb(r){let e=new Image;await new Promise((o,a)=>{e.onload=()=>o(),e.onerror=()=>a(new Error("Failed to load image for screenshot")),e.src="data:image/png;base64,"+r.base64Png});let t;if(r.clip){let o=e.naturalWidth/r.clip.screenRectWidth,a=r.clip.screenRectWidth*o,l=r.clip.screenRectHeight*o,h=r.clip.visiblePageRectLeft*o,c=r.clip.visiblePageRectTop*o;t=new OffscreenCanvas(Math.round(a),Math.min(16384,Math.round(l)));let u=t.getContext("2d",{willReadFrequently:!0});if(!u)throw new Error("Could not get 2d context from canvas.");u.imageSmoothingEnabled=!1,u.drawImage(e,Math.round(h),Math.round(c))}else{t=new OffscreenCanvas(e.naturalWidth,Math.min(16384,Math.floor(e.naturalHeight)));let o=t.getContext("2d",{willReadFrequently:!0});if(!o)throw new Error("Could not get 2d context for base64 screenshot.");o.imageSmoothingEnabled=!1,o.drawImage(e,0,0)}Iu();let n=document.createElement("a");n.download=r.fileName+".png";let i=await t.convertToBlob({type:"image/png"}),s=URL.createObjectURL(i);Gi=s,n.href=s,n.click()}async function jb(r){let t=await(await fetch("data:image/png;base64,"+r.base64Png)).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":t})])}var ma,ga,Gi,qe,Vb,Nu=Fr(()=>{ma=class{postMessage(e,t){self.postMessage(e,t)}set onmessage(e){self.addEventListener("message",e)}},ga=class{#e;#t;#i;constructor(e){this.#e=new Promise((t,n)=>{this.#i=n;let i=new Worker(new URL(e),{type:"module"});i.onerror=s=>{console.error(`Failed to load worker for ${e}:`,s)},i.onmessage=s=>{console.assert(s.data==="workerReady"),i.onmessage=null,t(i)}})}postMessage(e,t){this.#e.then(n=>{this.#t||n.postMessage(e,t??[])})}dispose(){this.#t=!0,this.#e.then(e=>e.terminate())}terminate(e=!1){e&&this.#i?.(new Error("Worker terminated")),this.dispose()}set onmessage(e){this.#e.then(t=>{t.onmessage=e})}set onerror(e){this.#e.then(t=>{t.onerror=e})}},Gi=null;qe=null,Vb={createWorker(r){return new ga(r)},workerScope:new ma,getOnLine(){return navigator.onLine},getUserAgent(){return navigator.userAgent},getLocalStorage(){try{return"localStorage"in globalThis?globalThis.localStorage:void 0}catch{return}},getCacheStorage(){return"caches"in globalThis?globalThis.caches:void 0},getDevicePixelRatio(){return window.devicePixelRatio},saveScreenshot:Bb,copyScreenshot:jb,revokeLastScreenshotUrl:Iu,async loadTextFile(r){return await(await fetch(r)).text()},evaluateCSS(r,e){return(!qe||!qe.isConnected)&&(qe=document.getElementById("css-evaluation-element"),qe||(qe=document.createElement("div"),qe.id="css-evaluation-element",qe.setAttribute("style","hidden: true; --evaluation: attr(data-custom-expr type(*))"),document.body.appendChild(qe))),r!==null?qe.setAttribute("data-value",r):qe.removeAttribute("data-value"),qe.setAttribute("data-custom-expr",e),qe.computedStyleMap().get("--evaluation")?.toString()??null},removeCSSEvaluationElement(){let r=qe??document.getElementById("css-evaluation-element");r&&r.remove(),qe=null}}});var Lu={};pe(Lu,{HostRuntime:()=>Oa});var Mu=Fr(()=>{Nu()});var wa={};pe(wa,{HOST_RUNTIME:()=>Ub});import*as Du from"node:fs";import*as zu from"node:url";import*as Zr from"node:worker_threads";var ba,Sa,ya,xa,Hb,Ub,_u=Fr(()=>{ba=class{postMessage(e,t){Zr.parentPort?.postMessage(e,t)}set onmessage(e){Zr.parentPort?.addEventListener("message",t=>{e(t)})}},Sa=class{#e;#t;#i=!1;#n;constructor(e){let t=new Zr.Worker(new URL(e));this.#e=t,this.#t=new Promise((n,i)=>{this.#n=i,t.once("message",s=>{s==="workerReady"&&n(t)}),t.on("error",i)}),this.#t.catch(()=>{})}postMessage(e,t){this.#t.then(n=>{this.#i||n.postMessage(e,t)})}dispose(){this.#i=!0,this.#e.terminate()}terminate(e){e&&this.#n?.(new Error("Worker terminated")),this.dispose()}set onmessage(e){this.#t.then(t=>{t.on("message",n=>{this.#i||e({data:n,ports:[]})})})}set onerror(e){this.#t.then(t=>{t.on("error",n=>{this.#i||e({type:"error",...n,message:n.message,error:n})})},t=>{this.#i||e({type:"error",...t,message:t.message,error:t})})}},ya=class{#e=new Map;async put(e,t){this.#e.set(e,t.clone())}async match(e){return this.#e.get(e)?.clone()}},xa=class{#e=new Map;async open(e){let t=this.#e.get(e);return t||(t=new ya,this.#e.set(e,t)),t}async delete(e){return this.#e.delete(e)}},Hb=new xa,Ub={createWorker(r){return new Sa(r)},workerScope:new ba,getOnLine(){return!0},getUserAgent(){return"Node.js"},getLocalStorage(){},getCacheStorage(){return Hb},getDevicePixelRatio(){return 1},async saveScreenshot(r){},async copyScreenshot(r){},revokeLastScreenshotUrl(){},async loadTextFile(r){return await Du.promises.readFile(zu.fileURLToPath(r),"utf-8")},evaluateCSS(r,e){return null},removeCSSEvaluationElement(){}}});var Xu={};pe(Xu,{HostRuntime:()=>wa});var Fu=Fr(()=>{_u()});function Cm(r,e,t,n){switch(r){case-2:return t<e;case-1:return n>=e&&t<e;case 0:return t<e&&n>e;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function di(r,e,t,n){for(var i;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let o=!n&&r instanceof tt&&r.index<0?null:r.parent;if(!o)return r;r=o}let s=n?0:ue.IgnoreOverlays;if(n)for(let o=r,a=o.parent;a;o=a,a=o.parent)o instanceof tt&&o.index<0&&((i=a.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(r=a);for(;;){let o=r.enter(e,t,s);if(!o)return r;r=o}}function pp(r,e,t,n){let i=r.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(n!=null&&i.type.is(n))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return n==null?s:[]}}function th(r,e,t=e.length-1){for(let n=r;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}function Qm(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let o=r[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let n=t instanceof tt&&t.index<0?null:t.parent,i=r.slice();return n?i[e]=n:i.splice(e,1),new rh(i,t)}function zc(r){return r.children.some(e=>e instanceof Tn||!e.type.isAnonymous||zc(e))}function eo(r,e){if(!r.isAnonymous||e instanceof Tn||e.type!=r)return 1;let t=fp.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof ke)){t=1;break}t+=eo(r,n)}fp.set(e,t)}return t}function ih(r,e,t,n,i,s,o,a,l){let h=0;for(let p=n;p<i;p++)h+=eo(r,e[p]);let c=Math.ceil(1.5*h/8),u=[],d=[];return(function p(f,m,g,O,b){for(let S=g;S<O;){let x=S,y=m[S],v=eo(r,f[S]);for(S++;S<O;S++){let T=eo(r,f[S]);if(v+T>=c)break;v+=T}if(S==x+1){if(v>c){let T=f[x];p(T.children,T.positions,0,T.children.length,m[x]+b);continue}u.push(f[x])}else{let T=m[S-1]+f[S-1].length-y;u.push(ih(r,f,m,x,S,y,T,null,l))}d.push(y+b-s)}})(e,t,n,i,0),(a||l)(u,d,o)}function Wx(r){return(e,t,n,i)=>new lh(e,r,t,n,i)}function mp(r){if(!r.length||r.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(r))}function Gx(r,e,t){for(let n of r){if(n.from>=t)break;if(n.to>e)return n.from<=e&&n.to>=t?2:1}return 0}function gp(r,e,t,n,i,s){if(e<t){let o=r.buffer[e+1];n.push(r.slice(e,t,o)),i.push(o-s)}}function Yx(r){let{node:e}=r,t=[],n=e.context.buffer;do t.push(r.index),r.parent();while(!r.tree);let i=r.tree,s=i.children.indexOf(n),o=i.children[s],a=o.buffer,l=[s];i.children[s]=(function h(c,u,d,p,f,m){let g=t[m],O=[],b=[];gp(o,c,g,O,b,p);let S=a[g+1],x=a[g+2];l.push(O.length);let y=m?h(g+4,a[g+3],o.set.types[a[g]],S,x-S,m-1):e.toTree();return O.push(y),b.push(S-p),gp(o,a[g+3],u,O,b,p),new ke(d,O,b,f)})(0,a.length,Fe.none,0,o.length,t.length-1);for(let h of l){let c=r.tree.children[h],u=r.tree.positions[h];r.yield(new tt(c,u+r.from,h,r._tree))}}function Op(r,e){let t=null,n=e;for(let i=1,s=0;i<r.length;i++){let o=r[i-1].to,a=r[i].from;for(;s<n.length;s++){let l=n[s];if(l.from>=a)break;l.to<=o||(t||(n=t=e.slice()),l.from<o?(t[s]=new bt(l.from,o),l.to>a&&t.splice(s+1,0,new bt(a,l.to))):l.to>a?t[s--]=new bt(a,l.to):t.splice(s--,1))}}return n}function Kx(r,e,t,n){let i=0,s=0,o=!1,a=!1,l=-1e9,h=[];for(;;){let c=i==r.length?1e9:o?r[i].to:r[i].from,u=s==e.length?1e9:a?e[s].to:e[s].from;if(o!=a){let d=Math.max(l,t),p=Math.min(c,u,n);d<p&&h.push(new bt(d,p))}if(l=Math.min(c,u),l==1e9)break;c==l&&(o?(o=!1,i++):o=!0),u==l&&(a?(a=!1,s++):a=!0)}return h}function bp(r,e){let t=[];for(let{pos:n,mount:i,frag:s}of r){let o=n+(i.overlay?i.overlay[0].from:0),a=o+i.tree.length,l=Math.max(s.from,o),h=Math.min(s.to,a);if(i.overlay){let c=Kx(e,i.overlay.map(u=>new bt(u.from+n,u.to+n)),l,h);for(let u=0,d=l;;u++){let p=u==c.length,f=p?h:c[u].from;if(f>d&&t.push(new yn(d,f,i.tree,-o,s.from>=d||s.openStart,s.to<=f||s.openEnd)),p)break;d=c[u].to}}else t.push(new yn(l,h,i.tree,-o,s.from>=o||s.openStart,s.to<=a||s.openEnd))}return t}function Jx(r){if(r<768)return!1;for(let e=0,t=hh.length;;){let n=e+t>>1;if(r<hh[n])t=n;else{if(!(r>=Rm[n]))return!0;e=n+1}if(e==t)return!1}}function Sp(r){return r>=127462&&r<=127487}function e1(r,e,t=!0,n=!0){return(t?Am:t1)(r,e,n)}function Am(r,e,t){if(e==r.length)return e;e&&Em(r.charCodeAt(e))&&$m(r.charCodeAt(e-1))&&e--;let n=vl(r,e);for(e+=yp(n);e<r.length;){let i=vl(r,e);if(n==8205||i==8205||t&&Jx(i))e+=yp(i),n=i;else{if(!Sp(i))break;{let s=0,o=e-2;for(;o>=0&&Sp(vl(r,o));)s++,o-=2;if(s%2==0)break;e+=2}}}return e}function t1(r,e,t){for(;e>0;){let n=Am(r,e-2,t);if(n<e)return n;e--}return 0}function vl(r,e){let t=r.charCodeAt(e);if(!$m(t)||e+1==r.length)return t;let n=r.charCodeAt(e+1);return Em(n)?n-56320+(t-55296<<10)+65536:t}function Em(r){return r>=56320&&r<57344}function $m(r){return r>=55296&&r<56320}function yp(r){return r<65536?1:2}function to(r,e,t=0,n=1e9){for(let i=0,s=0,o=!0;s<r.length&&i<=n;s++){let a=r[s],l=i+a.length;l>=t&&(l>n&&(a=a.slice(0,n-i)),i<t&&(a=a.slice(t-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function xp(r,e,t){return to(r,[""],e,t)}function kr(r,e,t){return[e=Math.max(0,Math.min(r.length,e)),Math.max(e,Math.min(r.length,t))]}function et(r,e,t=!0,n=!0){return e1(r,e,t,n)}function Ct(r,e){let t=r.charCodeAt(e);if(n=t,!(n>=55296&&n<56320&&e+1!=r.length))return t;var n;let i=r.charCodeAt(e+1);return(function(s){return s>=56320&&s<57344})(i)?i-56320+(t-55296<<10)+65536:t}function _c(r){return r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r)))}function nn(r){return r<65536?1:2}function _e(r,e,t,n=!1){if(e==0&&t<=0)return;let i=r.length-2;i>=0&&t<=0&&t==r[i+1]?r[i]+=e:i>=0&&e==0&&r[i]==0?r[i+1]+=t:n?(r[i]+=e,r[i+1]+=t):r.push(e,t)}function Sn(r,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n<r.length)r[r.length-1]=r[r.length-1].append(t);else{for(;r.length<n;)r.push(ie.empty);r.push(t)}}function uh(r,e,t){let n=r.inserted;for(let i=0,s=0,o=0;o<r.sections.length;){let a=r.sections[o++],l=r.sections[o++];if(l<0)i+=a,s+=a;else{let h=i,c=s,u=ie.empty;for(;h+=a,c+=l,l&&n&&(u=u.append(n[o-2>>1])),!(t||o==r.sections.length||r.sections[o+1]<0);)a=r.sections[o++],l=r.sections[o++];e(i,h,s,c,u),i=h,s=c}}}function dh(r,e,t,n=!1){let i=[],s=n?[]:null,o=new Vn(r),a=new Vn(e);for(let l=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&a.ins==-1){let h=Math.min(o.len,a.len);_e(i,h,-1),o.forward(h),a.forward(h)}else if(a.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(a.len<o.len||a.len==o.len&&!t))){let h=a.len;for(_e(i,a.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&l<o.i&&o.len<=c&&(_e(i,0,o.ins),s&&Sn(s,i,o.text),l=o.i),o.forward(c),h-=c}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return s?nt.createSet(i,s):on.create(i);throw new Error("Mismatched change set lengths")}{let h=0,c=o.len;for(;c;)if(a.ins==-1){let u=Math.min(c,a.len);h+=u,c-=u,a.forward(u)}else{if(!(a.ins==0&&a.len<c))break;c-=a.len,a.next()}_e(i,h,l<o.i?o.ins:0),s&&l<o.i&&Sn(s,i,o.text),l=o.i,o.forward(o.len-c)}}}}function Im(r,e,t=!1){let n=[],i=t?[]:null,s=new Vn(r),o=new Vn(e);for(let a=!1;;){if(s.done&&o.done)return i?nt.createSet(n,i):on.create(n);if(s.ins==0)_e(n,s.len,0,a),s.next();else if(o.len!=0||o.done){if(s.done||o.done)throw new Error("Mismatched change set lengths");{let l=Math.min(s.len2,o.len),h=n.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;_e(n,l,c,a),i&&c&&Sn(i,n,o.text)}else o.ins==-1?(_e(n,s.off?0:s.len,l,a),i&&Sn(i,n,s.textBit(l))):(_e(n,s.off?0:s.len,o.off?0:o.ins,a),i&&!o.off&&Sn(i,n,o.text));a=(s.ins>l||o.ins>=0&&o.len>l)&&(a||n.length>h),s.forward2(l),o.forward(l)}}else _e(n,0,o.ins,a),i&&Sn(i,n,o.text),o.next()}}function Nm(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}function Fc(r,e){return r==e||r.length==e.length&&r.every((t,n)=>t===e[n])}function wp(r,e,t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!t(r[n],e[n]))return!1;return!0}function ph(r,e){let t=!1;for(let n of e)1&pi(r,n)&&(t=!0);return t}function n1(r,e,t){let n=t.map(l=>r[l.id]),i=t.map(l=>l.type),s=n.filter(l=>!(1&l)),o=r[e.id]>>1;function a(l){let h=[];for(let c=0;c<n.length;c++){let u=bo(l,n[c]);if(i[c]==2)for(let d of u)h.push(d);else h.push(u)}return e.combine(h)}return{create(l){for(let h of n)pi(l,h);return l.values[o]=a(l),1},update(l,h){if(!ph(l,s))return 0;let c=a(l);return e.compare(c,l.values[o])?0:(l.values[o]=c,1)},reconfigure(l,h){let c=ph(l,n),u=h.config.facets[e.id],d=h.facet(e);if(u&&!c&&Fc(t,u))return l.values[o]=d,0;let p=a(l);return e.compare(p,d)?(l.values[o]=d,0):(l.values[o]=p,1)}}}function qr(r){return e=>new go(e,r)}function pi(r,e){if(1&e)return 2;let t=e>>1,n=r.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;r.status[t]=4;let i=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|i}function bo(r,e){return 1&e?r.config.staticValues[e>>1]:r.values[e>>1]}function o1(r,e){let t=[];for(let n=0,i=0;;){let s,o;if(n<r.length&&(i==e.length||e[i]>=r[n]))s=r[n++],o=r[n++];else{if(!(i<e.length))return t;s=e[i++],o=e[i++]}!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function vp(r,e,t){var n;let i,s,o;return t?(i=e.changes,s=nt.empty(e.changes.length),o=r.changes.compose(e.changes)):(i=e.changes.map(r.changes),s=r.changes.mapDesc(e.changes,!0),o=r.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(n=r.selection)===null||n===void 0?void 0:n.map(i),effects:se.mapEffects(r.effects,i).concat(se.mapEffects(e.effects,s)),annotations:r.annotations.length?r.annotations.concat(e.annotations):e.annotations,scrollIntoView:r.scrollIntoView||e.scrollIntoView}}function Tl(r,e,t){let n=e.selection,i=wr(e.annotations);return e.userEvent&&(i=i.concat($e.userEvent.of(e.userEvent))),{changes:e.changes instanceof nt?e.changes:nt.of(e.changes||[],t,r.facet(Mm)),selection:n&&(n instanceof $?n:$.single(n.anchor,n.head)),effects:wr(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function Fm(r,e,t){let n=Tl(r,e.length?e[0]:{},r.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;n=vp(n,Tl(r,e[s],o?n.changes.newLength:r.doc.length),o)}let i=$e.create(r,n.changes,n.selection,n.effects,n.annotations,n.scrollIntoView);return(function(s){let o=s.startState,a=o.facet(_m),l=s;for(let h=a.length-1;h>=0;h--){let c=a[h](s);c&&Object.keys(c).length&&(l=vp(l,Tl(o,c,s.changes.newLength),!0))}return l==s?s:$e.create(o,s.changes,s.selection,l.effects,l.annotations,l.scrollIntoView)})(t?(function(s){let o=s.startState,a=!0;for(let h of o.facet(Dm)){let c=h(s);if(c===!1){a=!1;break}Array.isArray(c)&&(a=a===!0?c:o1(a,c))}if(a!==!0){let h,c;if(a===!1)c=s.changes.invertedDesc,h=nt.empty(o.doc.length);else{let u=s.changes.filter(a);h=u.changes,c=u.filtered.mapDesc(u.changes).invertedDesc}s=$e.create(o,h,s.selection&&s.selection.map(c),se.mapEffects(s.effects,c),s.annotations,s.scrollIntoView)}let l=o.facet(zm);for(let h=l.length-1;h>=0;h--){let c=l[h](s);s=c instanceof $e?c:Array.isArray(c)&&c.length==1&&c[0]instanceof $e?c[0]:Fm(o,wr(c),!1)}return s})(i):i)}function wr(r){return r==null?a1:Array.isArray(r)?r:[r]}function h1(r){return e=>{if(!/\S/.test(e))return Xe.Space;if((function(t){if(gh)return gh.test(t);for(let n=0;n<t.length;n++){let i=t[n];if(/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||l1.test(i)))return!0}return!1})(e))return Xe.Word;for(let t=0;t<r.length;t++)if(e.indexOf(r[t])>-1)return Xe.Word;return Xe.Other}}function dn(r,e,t={}){let n={};for(let i of r)for(let s of Object.keys(i)){let o=i[s],a=n[s];if(a===void 0)n[s]=o;else if(!(a===o||o===void 0)){if(!Object.hasOwnProperty.call(t,s))throw new Error("Config merge conflict for field "+s);n[s]=t[s](a,o)}}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}function Pl(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}function Tp(r,e,t){let n=new Map;for(let s of r)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&n.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let a=n.get(s.chunk[o]);a==null||(t?t.mapPos(a):a)!=s.chunkPos[o]||t?.touchesRange(a,a+s.chunk[o].length)||i.add(s.chunk[o])}return i}function kl(r,e){for(let t=r[e];;){let n=1+(e<<1);if(n>=r.length)break;let i=r[n];if(n+1<r.length&&i.compare(r[n+1])>=0&&(i=r[n+1],n++),t.compare(i)<0)break;r[n]=t,r[e]=i,e=n}}function Pp(r,e,t,n,i,s){r.goto(e),t.goto(n);let o=n+i,a=n,l=n-e;for(;;){let h=r.to+l-t.to,c=h||r.endSide-t.endSide,u=c<0?r.to+l:t.to,d=Math.min(u,o);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&bh(r.activeForPoint(r.to),t.activeForPoint(t.to))||s.comparePoint(a,d,r.point,t.point):d>a&&!bh(r.active,t.active)&&s.compareRange(a,d,r.active,t.active),u>o)break;(h||r.openEnd!=t.openEnd)&&s.boundChange&&s.boundChange(u),a=u,c<=0&&r.next(),c>=0&&t.next()}}function bh(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t]&&!r[t].eq(e[t]))return!1;return!0}function _s(r,e){for(let t=e,n=r.length-1;t<n;t++)r[t]=r[t+1];r.pop()}function Xs(r,e,t){for(let n=r.length-1;n>=e;n--)r[n+1]=r[n];r[e]=t}function kp(r,e){let t=-1,n=1e9;for(let i=0;i<e.length;i++)(e[i]-n||r[i].endSide-r[t].endSide)<0&&(t=i,n=e[i]);return t}function Zc(r,e,t=r.length){let n=0;for(let i=0;i<t&&i<r.length;)r.charCodeAt(i)==9?(n+=e-n%e,i++):(n++,i=et(r,i));return n}function wo(r){let e;return e=r.nodeType==11?r.getSelection?r:r.ownerDocument:r,e.getSelection()}function xh(r,e){return!!e&&(r==e||r.contains(e.nodeType!=1?e.parentNode:e))}function no(r,e){if(!e.anchorNode)return!1;try{return xh(r,e.anchorNode)}catch{return!1}}function Ci(r){return r.nodeType==3?Un(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}function fi(r,e,t,n){return!!t&&(Ap(r,e,t,n,-1)||Ap(r,e,t,n,1))}function Qi(r){for(var e=0;;e++)if(!(r=r.previousSibling))return e}function Ap(r,e,t,n,i){for(;;){if(r==t&&e==n)return!0;if(e==(i<0?0:hn(r))){if(r.nodeName=="DIV")return!1;let s=r.parentNode;if(!s||s.nodeType!=1)return!1;e=Qi(r)+(i<0?0:1),r=s}else{if(r.nodeType!=1||(r=r.childNodes[e+(i<0?-1:0)]).nodeType==1&&r.contentEditable=="false")return!1;e=i<0?hn(r):0}}}function hn(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Bc(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}function c1(r){return{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}function jm(r,e){let t=e.width/r.offsetWidth,n=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-r.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function Vm(r){if(r.setActive)return r.setActive();if(Or)return r.focus(Or);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(Or==null?{get preventScroll(){return Or={preventScroll:!0},!0}}:void 0),!Or){Or=!1;for(let t=0;t<e.length;){let n=e[t++],i=e[t++],s=e[t++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=s&&(n.scrollLeft=s)}}}function Un(r,e,t=e){let n=Ep||(Ep=document.createRange());return n.setEnd(r,t),n.setStart(r,e),n}function vr(r,e,t){let n={key:e,code:e,keyCode:t,which:t,cancelable:!0},i=new KeyboardEvent("keydown",n);i.synthetic=!0,r.dispatchEvent(i);let s=new KeyboardEvent("keyup",n);return s.synthetic=!0,r.dispatchEvent(s),i.defaultPrevented||s.defaultPrevented}function Hm(r){for(;r.attributes.length;)r.removeAttributeNode(r.attributes[0])}function Um(r){return r.scrollTop>Math.max(1,r.scrollHeight-r.clientHeight-4)}function $p(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}function Wm(r,e,t,n,i,s,o,a,l){let{children:h}=r,c=h.length?h[e]:null,u=s.length?s[s.length-1]:null,d=u?u.breakAfter:o;if(!(e==n&&c&&!o&&!d&&s.length<2&&c.merge(t,i,s.length?u:null,t==0,a,l))){if(n<h.length){let p=h[n];p&&(i<p.length||p.breakAfter&&u?.breakAfter)?(e==n&&(p=p.split(i),i=0),!d&&u&&p.merge(0,i,u,!0,0,l)?s[s.length-1]=p:((i||p.children.length&&!p.children[0].length)&&p.merge(0,i,null,!1,0,l),s.push(p))):p?.breakAfter&&(u?u.breakAfter=1:o=1),n++}for(c&&(c.breakAfter=o,t>0&&(!o&&s.length&&c.merge(t,c.length,s[0],!1,a,0)?c.breakAfter=s.shift().breakAfter:(t<c.length||c.children.length&&c.children[c.children.length-1].length==0)&&c.merge(t,c.length,null,!1,a,0),e++));e<n&&s.length;)if(h[n-1].become(s[s.length-1]))n--,s.pop(),l=s.length?0:a;else{if(!h[e].become(s[0]))break;e++,s.shift(),a=s.length?0:l}!s.length&&e&&n<h.length&&!h[e-1].breakAfter&&h[n].merge(0,0,h[e-1],!1,a,l)&&e--,(e<n||s.length)&&r.replaceChildren(e,n,s)}}function Gm(r,e,t,n,i,s){let o=r.childCursor(),{i:a,off:l}=o.findPos(t,1),{i:h,off:c}=o.findPos(e,-1),u=e-t;for(let d of n)u+=d.length;r.length+=u,Wm(r,h,c,a,l,n,0,i,s)}function Km(r,e){let t=r.dom,{children:n}=r,i=0;for(let s=0;i<n.length;i++){let o=n[i],a=s+o.length;if(!(a==s&&o.getSide()<=0)){if(e>s&&e<a&&o.dom.parentNode==t)return o.domAtPos(e-s);if(e<=s)break;s=a}}for(let s=i;s>0;s--){let o=n[s-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let s=i;s<n.length;s++){let o=n[s];if(o.dom.parentNode==t)return o.domAtPos(0)}return new Ue(t,0)}function Jm(r,e,t){let n,{children:i}=r;t>0&&e instanceof kn&&i.length&&(n=i[i.length-1])instanceof kn&&n.mark.eq(e.mark)?Jm(n,e.children[0],t-1):(i.push(e),e.setParent(r)),r.length+=e.length}function eg(r,e,t){let n=null,i=-1,s=null,o=-1;(function l(h,c){for(let u=0,d=0;u<h.children.length&&d<=c;u++){let p=h.children[u],f=d+p.length;f>=c&&(p.children.length?l(p,c-d):(!s||s.isHidden&&t>0)&&(f>c||d==f&&p.getSide()>0)?(s=p,o=c-d):(d<c||d==f&&p.getSide()<0&&!p.isHidden)&&(n=p,i=c-d)),d=f}})(r,e);let a=(t<0?n:s)||n||s;return a?a.coordsAt(Math.max(0,a==n?i:o),t):(function(l){let h=l.dom.lastChild;if(!h)return l.dom.getBoundingClientRect();let c=Ci(h);return c[c.length-1]||null})(r)}function kh(r,e){for(let t in r)t=="class"&&e.class?e.class+=" "+r.class:t=="style"&&e.style?e.style+=";"+r.style:e[t]=r[t];return e}function Vc(r,e,t){if(r==e)return!0;r||(r=Lp),e||(e=Lp);let n=Object.keys(r),i=Object.keys(e);if(n.length-(t&&n.indexOf(t)>-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let s of n)if(s!=t&&(i.indexOf(s)==-1||r[s]!==e[s]))return!1;return!0}function Ch(r,e,t){let n=!1;if(e)for(let i in e)t&&i in t||(n=!0,i=="style"?r.style.cssText="":r.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(n=!0,i=="style"?r.style.cssText=t[i]:r.setAttribute(i,t[i]));return n}function d1(r){let e=Object.create(null);for(let t=0;t<r.attributes.length;t++){let n=r.attributes[t];e[n.name]=n.value}return e}function tg(r,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=r;return t==null&&(t=r.inclusive),n==null&&(n=r.inclusive),{start:t??e,end:n??e}}function Qh(r,e,t,n=0){let i=t.length-1;i>=0&&t[i]+n>=r?t[i]=Math.max(t[i],e):t.push(r,e)}function Zs(r,e){for(let t of e)r=new kn(t,[r],r.length);return r}function ng(r){let e=[];for(let t=0;t<r.length;t++)e.push(1<<+r[t]);return e}function rg(r){return r<=247?p1[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?f1[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8204?256:64336<=r&&r<=65023?4:1}function ig(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],i=e[t];if(n.from!=i.from||n.to!=i.to||n.direction!=i.direction||!ig(n.inner,i.inner))return!1}return!0}function Ah(r,e,t,n,i,s,o){let a=n%2?2:1;if(n%2==i%2)for(let l=e,h=0;l<t;){let c=!0,u=!1;if(h==s.length||l<s[h].from){let m=le[l];m!=a&&(c=!1,u=m==16)}let d=c||a!=1?null:[],p=c?n:n+1,f=l;e:for(;;)if(h<s.length&&f==s[h].from){if(u)break e;let m=s[h];if(!c)for(let g=m.to,O=h+1;;){if(g==t)break e;if(!(O<s.length&&s[O].from==g)){if(le[g]==a)break e;break}g=s[O++].to}h++,d?d.push(m):(m.from>l&&o.push(new Ht(l,m.from,p)),Eh(r,m.direction==Wn!=!(p%2)?n+1:n,i,m.inner,m.from,m.to,o),l=m.to),f=m.to}else{if(f==t||(c?le[f]!=a:le[f]==a))break;f++}d?Ah(r,l,f,n+1,i,d,o):l<f&&o.push(new Ht(l,f,p)),l=f}else for(let l=t,h=s.length;l>e;){let c=!0,u=!1;if(!h||l>s[h-1].to){let m=le[l-1];m!=a&&(c=!1,u=m==16)}let d=c||a!=1?null:[],p=c?n:n+1,f=l;e:for(;;)if(h&&f==s[h-1].to){if(u)break e;let m=s[--h];if(!c)for(let g=m.from,O=h;;){if(g==e)break e;if(!O||s[O-1].to!=g){if(le[g-1]==a)break e;break}g=s[--O].from}d?d.push(m):(m.to<l&&o.push(new Ht(m.to,l,p)),Eh(r,m.direction==Wn!=!(p%2)?n+1:n,i,m.inner,m.from,m.to,o),l=m.from),f=m.from}else{if(f==e||(c?le[f-1]!=a:le[f-1]==a))break;f--}d?Ah(r,f,l,n+1,i,d,o):f<l&&o.push(new Ht(f,l,p)),l=f}}function Eh(r,e,t,n,i,s,o){let a=e%2?2:1;(function(l,h,c,u,d){for(let p=0;p<=u.length;p++){let f=p?u[p-1].to:h,m=p<u.length?u[p].from:c,g=p?256:d;for(let O=f,b=g,S=g;O<m;O++){let x=rg(l.charCodeAt(O));x==512?x=b:x==8&&S==4&&(x=16),le[O]=x==4?2:x,7&x&&(S=x),b=x}for(let O=f,b=g,S=g;O<m;O++){let x=le[O];if(x==128)O<m-1&&b==le[O+1]&&24&b?x=le[O]=b:le[O]=256;else if(x==64){let y=O+1;for(;y<m&&le[y]==64;)y++;let v=O&&b==8||y<c&&le[y]==8?S==1?1:8:256;for(let T=O;T<y;T++)le[T]=v;O=y-1}else x==8&&S==1&&(le[O]=1);b=x,7&x&&(S=x)}}})(r,i,s,n,a),(function(l,h,c,u,d){let p=d==1?2:1;for(let f=0,m=0,g=0;f<=u.length;f++){let O=f?u[f-1].to:h,b=f<u.length?u[f].from:c;for(let S,x,y,v=O;v<b;v++)if(x=Rh[S=l.charCodeAt(v)])if(x<0){for(let T=m-3;T>=0;T-=3)if(_t[T+1]==-x){let C=_t[T+2],k=2&C?d:4&C?1&C?p:d:0;k&&(le[v]=le[_t[T]]=k),m=T;break}}else{if(_t.length==189)break;_t[m++]=v,_t[m++]=S,_t[m++]=g}else if((y=le[v])==2||y==1){let T=y==d;g=T?0:1;for(let C=m-3;C>=0;C-=3){let k=_t[C+2];if(2&k)break;if(T)_t[C+2]|=2;else{if(4&k)break;_t[C+2]|=4}}}}})(r,i,s,n,a),(function(l,h,c,u){for(let d=0,p=u;d<=c.length;d++){let f=d?c[d-1].to:l,m=d<c.length?c[d].from:h;for(let g=f;g<m;){let O=le[g];if(O==256){let b=g+1;for(;;)if(b==m){if(d==c.length)break;b=c[d++].to,m=d<c.length?c[d].from:h}else{if(le[b]!=256)break;b++}let S=p==1,x=S==((b<h?le[b]:u)==1)?S?1:2:u;for(let y=b,v=d,T=v?c[v-1].to:l;y>g;)y==T&&(y=c[--v].from,T=v?c[v-1].to:l),le[--y]=x;g=b}else p=O,g++}}})(i,s,n,a),Ah(r,i,s,e,t,n,o)}function Mp(r){return[new Ht(0,r,0)]}function g1(r,e,t,n,i){var s;let o=n.head-r.from,a=Ht.find(e,o,(s=n.bidiLevel)!==null&&s!==void 0?s:-1,n.assoc),l=e[a],h=l.side(i,t);if(o==h){let d=a+=i?1:-1;if(d<0||d>=e.length)return null;l=e[a=d],o=l.side(!i,t),h=l.side(i,t)}let c=et(r.text,o,l.forward(i,t));(c<l.from||c>l.to)&&(c=h),sg=r.text.slice(Math.min(o,c),Math.max(o,c));let u=a==(i?e.length-1:0)?null:e[a+(i?1:-1)];return u&&c==h&&u.level+(i?0:1)<l.level?$.cursor(u.side(!i,t)+r.from,u.forward(i,t)?1:-1,u.level):$.cursor(c+r.from,l.forward(i,t)?-1:1,l.level)}function O1(r,e,t){for(let n=e;n<t;n++){let i=rg(r.charCodeAt(n));if(i==1)return Wn;if(i==2||i==4)return Hc}return Wn}function Et(r,e,t){let n=r.facet(hg);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}function Dp(r,e){let t=r.state.facet(mg);if(!t.length)return t;let n=t.map(s=>s instanceof Function?s(r):s),i=[];return Se.spans(n,e.from,e.to,{point(){},span(s,o,a,l){let h=s-e.from,c=o-e.from,u=i;for(let d=a.length-1;d>=0;d--,l--){let p,f=a[d].spec.bidiIsolate;if(f==null&&(f=O1(e.text,h,c)),l>0&&u.length&&(p=u[u.length-1]).to==h&&p.direction==f)p.to=c,u=p.inner;else{let m={from:h,to:c,direction:f,inner:[]};u.push(m),u=m.inner}}}}),i}function Og(r){let e=0,t=0,n=0,i=0;for(let s of r.state.facet(gg)){let o=s(r);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:n,bottom:i}}function bg(r,e){let t=r.observer.selectionRange,n=t.focusNode&&Sg(t.focusNode,t.focusOffset,0);if(!n)return null;let i=e-n.offset;return{from:i,to:i+n.node.nodeValue.length,node:n.node}}function Sg(r,e,t){if(t<=0)for(let n=r,i=e;;){if(n.nodeType==3)return{node:n,offset:i};if(!(n.nodeType==1&&i>0))break;n=n.childNodes[i-1],i=hn(n)}if(t>=0)for(let n=r,i=e;;){if(n.nodeType==3)return{node:n,offset:i};if(!(n.nodeType==1&&i<n.childNodes.length&&t>=0))break;n=n.childNodes[i],i=0}return null}function x1(r,e){return e.left>r?e.left-r:Math.max(0,r-e.right)}function w1(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}function Ql(r,e){return r.top<e.bottom-1&&r.bottom>e.top+1}function zp(r,e){return e<r.top?{top:e,left:r.left,right:r.right,bottom:r.bottom}:r}function _p(r,e){return e>r.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}function Ih(r,e,t){let n,i,s,o,a,l,h,c,u=!1;for(let p=r.firstChild;p;p=p.nextSibling){let f=Ci(p);for(let m=0;m<f.length;m++){let g=f[m];i&&Ql(i,g)&&(g=zp(_p(g,i.bottom),i.top));let O=x1(e,g),b=w1(t,g);if(O==0&&b==0)return p.nodeType==3?Xp(p,e,t):Ih(p,e,t);if(!n||o>b||o==b&&s>O){n=p,i=g,s=O,o=b;let S=b?t<g.top?-1:1:O?e<g.left?-1:1:0;u=!S||(S>0?m<f.length-1:m>0)}O==0?t>g.bottom&&(!h||h.bottom<g.bottom)?(a=p,h=g):t<g.top&&(!c||c.top>g.top)&&(l=p,c=g):h&&Ql(h,g)?h=_p(h,g.bottom):c&&Ql(c,g)&&(c=zp(c,g.top))}}if(h&&h.bottom>=t?(n=a,i=h):c&&c.top<=t&&(n=l,i=c),!n)return{node:r,offset:0};let d=Math.max(i.left,Math.min(i.right,e));return n.nodeType==3?Xp(n,d,t):u&&n.contentEditable!="false"?Ih(n,d,t):{node:r,offset:Array.prototype.indexOf.call(r.childNodes,n)+(e>=(i.left+i.right)/2?1:0)}}function Xp(r,e,t){let n=r.nodeValue.length,i=-1,s=1e9,o=0;for(let a=0;a<n;a++){let l=Un(r,a,a+1).getClientRects();for(let h=0;h<l.length;h++){let c=l[h];if(c.top==c.bottom)continue;o||(o=e-c.left);let u=(c.top>t?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&u<s){let d=e>=(c.left+c.right)/2,p=d;if((z.chrome||z.gecko)&&Un(r,a).getBoundingClientRect().left==c.right&&(p=!d),u<=0)return{node:r,offset:a+(p?1:0)};i=a+(p?1:0),s=u}}}return{node:r,offset:i>-1?i:o>0?r.nodeValue.length:0}}function Fp(r,e,t,n=-1){var i,s;let o,a=r.contentDOM.getBoundingClientRect(),l=a.top+r.viewState.paddingTop,{docHeight:h}=r.viewState,{x:c,y:u}=e,d=u-l;if(d<0)return 0;if(d>h)return r.state.doc.length;for(let x=r.viewState.heightOracle.textHeight/2,y=!1;o=r.elementAtHeight(d),o.type!=We.Text;)for(;d=n>0?o.bottom+x:o.top-x,!(d>=0&&d<=h);){if(y)return t?null:0;y=!0,n=-n}u=l+d;let p=o.from;if(p<r.viewport.from)return r.viewport.from==0?0:t?null:Zp(r,a,o,c,u);if(p>r.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:Zp(r,a,o,c,u);let f=r.dom.ownerDocument,m=r.root.elementFromPoint?r.root:f,g=m.elementFromPoint(c,u);g&&!r.contentDOM.contains(g)&&(g=null),g||(c=Math.max(a.left+1,Math.min(a.right-1,c)),g=m.elementFromPoint(c,u),g&&!r.contentDOM.contains(g)&&(g=null));let O,b=-1;if(g&&((i=r.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=0){if(f.caretPositionFromPoint){let x=f.caretPositionFromPoint(c,u);x&&({offsetNode:O,offset:b}=x)}else if(f.caretRangeFromPoint){let x=f.caretRangeFromPoint(c,u);x&&({startContainer:O,startOffset:b}=x,(!r.contentDOM.contains(O)||z.safari&&(function(y,v,T){let C;if(y.nodeType!=3||v!=(C=y.nodeValue.length))return!1;for(let k=y.nextSibling;k;k=k.nextSibling)if(k.nodeType!=1||k.nodeName!="BR")return!1;return Un(y,C-1,C).getBoundingClientRect().left>T})(O,b,c)||z.chrome&&(function(y,v,T){if(v!=0)return!1;for(let k=y;;){let Q=k.parentNode;if(!Q||Q.nodeType!=1||Q.firstChild!=k)return!1;if(Q.classList.contains("cm-line"))break;k=Q}let C=y.nodeType==1?y.getBoundingClientRect():Un(y,0,Math.max(y.nodeValue.length,1)).getBoundingClientRect();return T-C.left>5})(O,b,c))&&(O=void 0))}}if(!O||!r.docView.dom.contains(O)){let x=Ne.find(r.docView,p);if(!x)return d>o.top+o.height/2?o.to:o.from;({node:O,offset:b}=Ih(x.dom,c,u))}let S=r.docView.nearest(O);if(!S)return null;if(S.isWidget&&((s=S.dom)===null||s===void 0?void 0:s.nodeType)==1){let x=S.dom.getBoundingClientRect();return e.y<x.top||e.y<=x.bottom&&e.x<=(x.left+x.right)/2?S.posAtStart:S.posAtEnd}return S.localPosFromDOM(O,b)+S.posAtStart}function Zp(r,e,t,n,i){let s=Math.round((n-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>1.5*r.defaultLineHeight){let a=r.viewState.heightOracle.textHeight;s+=Math.floor((i-t.top-.5*(r.defaultLineHeight-a))/a)*r.viewState.heightOracle.lineLength}let o=r.state.sliceDoc(t.from,t.to);return t.from+(function(a,l,h){for(let c=0,u=0;;){if(u>=l)return c;if(c==a.length)break;u+=a.charCodeAt(c)==9?h-u%h:1,c=et(a,c)}return a.length})(o,s,r.state.tabSize)}function Nh(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==We.Text))return n}return t}function Bp(r,e,t,n){let i=r.state.doc.lineAt(e.head),s=r.bidiSpans(i),o=r.textDirectionAt(i.from);for(let a=e,l=null;;){let h=g1(i,s,o,a,t),c=sg;if(!h){if(i.number==(t?r.state.doc.lines:1))return a;c=`
2
+ `,i=r.state.doc.line(i.number+(t?1:-1)),s=r.bidiSpans(i),h=r.visualLineSide(i,!t)}if(l){if(!l(c))return a}else{if(!n)return h;l=n(c)}a=h}}function ro(r,e,t){for(;;){let n=0;for(let i of r)i.between(e-1,e+1,(s,o,a)=>{if(e>s&&e<o){let l=n||t||(e-s<o-e?-1:1);e=l<0?s:o,n=l}});if(!n)return e}}function Rl(r,e,t){let n=ro(r.state.facet(Wc).map(i=>i(r)),t.from,e.head>t.from?-1:1);return n==t.from?t:$.cursor(n,n<t.from?1:-1)}function jp(r,e){return(t,n)=>{try{return e.call(r,n,t)}catch(i){Et(t.state,i)}}}function v1(r){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of r){let i=n.spec;if(i&&i.domEventHandlers)for(let s in i.domEventHandlers){let o=i.domEventHandlers[s];o&&t(s).handlers.push(jp(n.value,o))}if(i&&i.domEventObservers)for(let s in i.domEventObservers){let o=i.domEventObservers[s];o&&t(s).observers.push(jp(n.value,o))}}for(let n in Rt)t(n).handlers.push(Rt[n]);for(let n in Qt)t(n).observers.push(Qt[n]);return e}function js(r){return .7*Math.max(0,r)+8}function Vp(r,e){let t,{state:n}=r,i=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(Dh!=null&&n.selection.ranges.every(a=>a.empty)&&Dh==s.toString()){let a=-1;t=n.changeByRange(l=>{let h=n.doc.lineAt(l.from);if(h.from==a)return{range:l};a=h.from;let c=n.toText((o?s.line(i++).text:e)+n.lineBreak);return{changes:{from:h.from,insert:c},range:$.cursor(l.from+c.length)}})}else t=o?n.changeByRange(a=>{let l=s.line(i++);return{changes:{from:a.from,to:a.to,insert:l.text},range:$.cursor(a.from+l.length)}}):n.replaceSelection(s);r.dispatch(t,{userEvent:"input.paste",scrollIntoView:!0})}function Hp(r,e,t,n){if(n==1)return $.cursor(e,t);if(n==2)return(function(i,s,o=1){let a=i.charCategorizer(s),l=i.doc.lineAt(s),h=s-l.from;if(l.length==0)return $.cursor(s);h==0?o=1:h==l.length&&(o=-1);let c=h,u=h;o<0?c=et(l.text,h,!1):u=et(l.text,h);let d=a(l.text.slice(c,u));for(;c>0;){let p=et(l.text,c,!1);if(a(l.text.slice(p,c))!=d)break;c=p}for(;u<l.length;){let p=et(l.text,u);if(a(l.text.slice(u,p))!=d)break;u=p}return $.range(c+l.from,u+l.from)})(r.state,e,t);{let i=Ne.find(r.docView,e),s=r.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,a=i?i.posAtEnd:s.to;return a<r.state.doc.length&&a==s.to&&a++,$.range(o,a)}}function P1(r,e,t,n){let i=Ne.find(r.docView,e);if(!i)return 1;let s=e-i.posAtStart;if(s==0)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&Up(t,n,o))return-1;let a=i.coordsAt(s,1);return a&&Up(t,n,a)?1:o&&vg(n,o)?-1:1}function Wp(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:P1(r,t,e.clientX,e.clientY)}}function Tg(r){if(!k1)return r.detail;let e=Gp,t=qp;return Gp=r,qp=Date.now(),Yp=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(Yp+1)%3:1}function Kp(r,e,t,n){if(!t)return;let i=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=r.inputState,o=n&&s&&(function(h,c){let u=h.state.facet(ag);return u.length?u[0](c):z.mac?!c.altKey:!c.ctrlKey})(r,e)?{from:s.from,to:s.to}:null,a={from:i,insert:t},l=r.state.changes(o?[o,a]:a);r.focus(),r.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),r.inputState.draggedContent=null}function kg(r,e){let t=[];for(let n of r.facet(ug)){let i=n(r,e);i&&t.push(i)}return t?r.update({effects:t,annotations:Pg.of(!0)}):null}function Jp(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=kg(r.state,e);t?r.dispatch(t):r.update([])}},10)}function nf(r,e){let t,n;r[e]==null&&(t=r[e-1])instanceof xn&&(n=r[e+1])instanceof xn&&r.splice(e-1,3,new xn(t.length+1+n.length))}function C1(r,e){let t=r.getBoundingClientRect(),n=r.ownerDocument,i=n.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),a=Math.max(0,t.top),l=Math.min(i.innerHeight,t.bottom);for(let h=r.parentNode;h&&h!=n.body;)if(h.nodeType==1){let c=h,u=window.getComputedStyle(c);if((c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth)&&u.overflow!="visible"){let d=c.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),a=Math.max(a,d.top),l=h==r.parentNode?d.bottom:Math.min(l,d.bottom)}h=u.position=="absolute"||u.position=="fixed"?c.offsetParent:c.parentNode}else{if(h.nodeType!=11)break;h=h.host}return{left:s-t.left,right:Math.max(s,o)-t.left,top:a-(t.top+e),bottom:Math.max(a,l)-(t.top+e)}}function Q1(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}function R1(r,e,t){let n=[],i=r,s=0;return Se.spans(t,r,e,{span(){},point(o,a){o>i&&(n.push({from:i,to:o}),s+=o-i),i=a}},20),i<e&&(n.push({from:i,to:e}),s+=e-i),{total:s,ranges:n}}function Vs({total:r,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let n=Math.floor(r*t);for(let i=0;;i++){let{from:s,to:o}=e[i],a=o-s;if(n<=a)return s+n;n-=a}}function Hs(r,e){let t=0;for(let{from:n,to:i}of r.ranges){if(e<=i){t+=e-n;break}t+=i-n}return t/r.total}function oi(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),n=e.toDOM(r.bottom);return new Vt(r.from,r.length,t,n-t,Array.isArray(r._content)?r._content.map(i=>oi(i,e)):r._content)}function Uh(r,e,t){return new ln(e,{finish:n=>/&/.test(n)?n.replace(/&\w*/,i=>{if(i=="&")return r;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):r+" "+n})}function E1(r,e,t){for(;;){if(!e||t<hn(e))return!1;if(e==r)return!0;t=Qi(e)+1,e=e.parentNode}}function sf(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}function Ag(r,e){let t,{newSel:n}=e,i=r.state.selection.main,s=r.inputState.lastKeyTime>Date.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:a}=e.bounds,l=i.from,h=null;(s===8||z.android&&e.text.length<a-o)&&(l=i.to,h="end");let c=(function(u,d,p,f){let m=Math.min(u.length,d.length),g=0;for(;g<m&&u.charCodeAt(g)==d.charCodeAt(g);)g++;if(g==m&&u.length==d.length)return null;let O=u.length,b=d.length;for(;O>0&&b>0&&u.charCodeAt(O-1)==d.charCodeAt(b-1);)O--,b--;return f=="end"&&(p-=O+Math.max(0,g-Math.min(O,b))-g),O<g&&u.length<d.length?(g-=p<=g&&p>=O?g-p:0,b=g+(b-O),O=g):b<g&&(g-=p<=g&&p>=b?g-p:0,O=g+(O-b),b=g),{from:g,toA:O,toB:b}})(r.state.doc.sliceString(o,a,ai),e.text,l-o,h);c&&(z.chrome&&s==13&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==ai+ai&&c.toB--,t={from:o+c.from,to:o+c.toA,insert:ie.of(e.text.slice(c.from,c.toB).split(ai))})}else n&&(!r.hasFocus&&r.state.facet(Uo)||n.main.eq(i))&&(n=null);if(!t&&!n)return!1;if(!t&&e.typeOver&&!i.empty&&n&&n.main.empty?t={from:i.from,to:i.to,insert:r.state.doc.slice(i.from,i.to)}:t&&t.from>=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:r.state.doc.slice(i.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,i.to))}:(z.mac||z.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=$.single(n.main.anchor-1,n.main.head-1)),t={from:i.from,to:i.to,insert:ie.of([" "])}):z.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==`
3
+ `&&r.lineWrapping&&(n&&(n=$.single(n.main.anchor-1,n.main.head-1)),t={from:i.from,to:i.to,insert:ie.of([" "])}),t){if(z.ios&&r.inputState.flushIOSKey()||z.android&&(t.from==i.from&&t.to==i.to&&t.insert.length==1&&t.insert.lines==2&&vr(r.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||s==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&vr(r.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&vr(r.contentDOM,"Delete",46)))return!0;let o,a=t.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let l=()=>o||(o=(function(h,c,u){let d,p=h.state,f=p.selection.main;if(c.from>=f.from&&c.to<=f.to&&c.to-c.from>=(f.to-f.from)/3&&(!u||u.main.empty&&u.main.from==c.from+c.insert.length)&&h.inputState.composing<0){let g=f.from<c.from?p.sliceDoc(f.from,c.from):"",O=f.to>c.to?p.sliceDoc(c.to,f.to):"";d=p.replaceSelection(h.state.toText(g+c.insert.sliceString(0,void 0,h.state.lineBreak)+O))}else{let g=p.changes(c),O=u&&u.main.to<=g.newLength?u.main:void 0;if(p.selection.ranges.length>1&&h.inputState.composing>=0&&c.to<=f.to&&c.to>=f.to-10){let b,S=h.state.sliceDoc(c.from,c.to),x=u&&bg(h,u.main.head);if(x){let T=c.insert.length-(c.to-c.from);b={from:x.from,to:x.to-T}}else b=h.state.doc.lineAt(f.head);let y=f.to-c.to,v=f.to-f.from;d=p.changeByRange(T=>{if(T.from==f.from&&T.to==f.to)return{changes:g,range:O||T.map(g)};let C=T.to-y,k=C-S.length;if(T.to-T.from!=v||h.state.sliceDoc(k,C)!=S||T.to>=b.from&&T.from<=b.to)return{range:T};let Q=p.changes({from:k,to:C,insert:c.insert}),R=T.to-f.to;return{changes:Q,range:O?$.range(Math.max(0,O.anchor+R),Math.max(0,O.head+R)):T.map(Q)}})}else d={changes:g,selection:O&&p.selection.replaceRange(O)}}let m="input.type";return(h.composing||h.inputState.compositionPendingChange&&h.inputState.compositionEndedAt>Date.now()-50)&&(h.inputState.compositionPendingChange=!1,m+=".compose",h.inputState.compositionFirstChange&&(m+=".start",h.inputState.compositionFirstChange=!1)),p.update(d,{userEvent:m,scrollIntoView:!0})})(r,t,n));return r.state.facet(cg).some(h=>h(r,t.from,t.to,a,l))||r.dispatch(l()),!0}if(n&&!n.main.eq(i)){let o=!1,a="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(o=!0),a=r.inputState.lastSelectionOrigin),r.dispatch({selection:n,scrollIntoView:o,userEvent:a}),!0}return!1}function of(r,e,t){for(;e;){let n=be.get(e);if(n&&n.parent==r)return n;let i=e.parentNode;e=i!=r.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function lf(r,e,t){for(let n=r.state.facet(e),i=n.length-1;i>=0;i--){let s=n[i],o=typeof s=="function"?s(r):s;o&&kh(o,t)}return t}function Ws(r,e,t){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t!==!1&&e.shiftKey&&(r="Shift-"+r),r}function cf(r){let e=r.scrollDOM.getBoundingClientRect();return{left:(r.textDirection==de.LTR?e.left:e.right-r.scrollDOM.clientWidth*r.scaleX)-r.scrollDOM.scrollLeft*r.scaleX,top:e.top-r.scrollDOM.scrollTop*r.scaleY}}function uf(r,e,t){let n=$.cursor(e);return{from:Math.max(t.from,r.moveToLineBoundary(n,!1,!0).from),to:Math.min(t.to,r.moveToLineBoundary(n,!0,!0).from),type:We.Text}}function Eg(r){return[Ge.define(e=>new qh(e,r)),so.of(r)]}function Ig(r){return r.startState.facet(Io)!=r.state.facet(Io)}function df(r,e){e.style.animationDuration=r.facet(Io).cursorBlinkRate+"ms"}function z1(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}function Lg(r,e){let t=r.plugin(Ng);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}function mf(r){let e=r.nextSibling;return r.remove(),e}function Of(r){return Array.isArray(r)?r:[r]}function nc(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}function Nl(r,e){return r.state.facet(li).formatNumber(e,r.state)}function bf(r){let e=9;for(;e<r;)e=10*e+9;return e}function Go(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let i of t.split(" "))if(i){let s=[],o=2,a=i;for(let u=0;;){if(a=="..."&&u>0&&u+3==i.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw new RangeError("Invalid path: "+i);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),u+=d[0].length,u==i.length)break;let p=i[u++];if(u==i.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+i);a=i.slice(u)}let l=s.length-1,h=s[l];if(!h)throw new RangeError("Invalid path: "+i);let c=new Rr(n,o,l>0?s.slice(0,l):null);e[h]=c.sort(e[h])}}return Dg.add(e)}function j1(r,e){let t=Object.create(null);for(let s of r)if(Array.isArray(s.tag))for(let o of s.tag)t[o.id]=s.class;else t[s.tag.id]=s.class;let{scope:n,all:i=null}=e||{};return{style:s=>{let o=i;for(let a of s)for(let l of a.set){let h=t[l.id];if(h){o=o?o+" "+h:h;break}}return o},scope:n}}function zg(r,e,t,n=0,i=r.length){let s=new ic(n,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),n,i,"",s.highlighters),s.flush(i)}function _g(r){return D.define({combine:r?e=>e.concat(r):void 0})}function xf(r,e,t){let n=r.facet(Er),i=Te(r).topNode;if(!n||n.allowsNesting)for(let s=i;s;s=s.enter(e,t,ue.ExcludeBuffers))s.type.isTop&&(i=s);return i}function Te(r){let e=r.field(ut.state,!1);return e?e.tree:ke.empty}function wf(r,e,t){return yn.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}function lc(r){let e=r.facet(Yo);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function vf(r,e){let t="",n=r.tabSize,i=r.facet(Yo)[0];if(i==" "){for(;e>=n;)t+=" ",e-=n;i=" "}for(let s=0;s<e;s++)t+=i;return t}function U1(r,e){r instanceof ve&&(r=new Li(r));for(let n of r.state.facet(H1)){let i=n(r,e);if(i!==void 0)return i}let t=Te(r.state);return t.length>=e?(function(n,i,s){let o=i.resolveStack(s),a=o.node.enterUnfinishedNodesBefore(s);if(a!=o.node){let l=[];for(let h=a;h!=o.node;h=h.parent)l.push(h);for(let h=l.length-1;h>=0;h--)o={node:l[h],next:o}}return Fg(o,n,s)})(r,t,e):null}function Fg(r,e,t){for(let n=r;n;n=n.next){let i=W1(n.node);if(i)return i(hc.create(e,t,n))}return 0}function W1(r){let e=r.type.prop(qo);if(e)return e;let t,n=r.firstChild;if(n&&(t=n.type.prop(Y.closedBy))){let i=r.lastChild,s=i&&t.indexOf(i.name)>-1;return o=>Zg(o,!0,1,void 0,s&&!(function(a){return a.pos==a.options.simulateBreak&&a.options.simulateDoubleBreak})(o)?i.from:void 0)}return r.parent==null?G1:null}function G1(){return 0}function Y1(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function q1({closing:r,align:e=!0,units:t=1}){return n=>Zg(n,e,t,r)}function Zg(r,e,t,n,i){let s=r.textAfter,o=s.match(/^\s*/)[0].length,a=n&&s.slice(o,o+n.length)==n||i==r.pos+o,l=e?(function(h){let c=h.node,u=c.childAfter(c.from),d=c.lastChild;if(!u)return null;let p=h.options.simulateBreak,f=h.state.doc.lineAt(u.from),m=p==null||p<=f.from?f.to:Math.min(f.to,p);for(let g=u.to;;){let O=c.childAfter(g);if(!O||O==d)return null;if(!O.type.isSkipped)return O.from<m?u:null;g=O.to}})(r):null;return l?a?r.column(l.from):r.column(l.to):r.baseIndent+(a?0:r.unit*t)}function ao({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}function Bg(r){let e=r.firstChild,t=r.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?r.to:t.from}:null}function jg(r,e){let t=e.mapPos(r.from,1),n=e.mapPos(r.to,-1);return t>=n?void 0:{from:t,to:n}}function tw(r,e,t){var n;let i=null;return(n=r.field(ew,!1))===null||n===void 0||n.between(e,t,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function nw(r,e,t){let n=!1;return r.between(e,e,(i,s)=>{i==e&&s==t&&(n=!0)}),n}function Ug(r,e){let{state:t}=r,n=t.facet(Hg),i=o=>{let a=r.lineBlockAt(r.posAtDOM(o.target)),l=tw(r.state,a.from,a.to);l&&r.dispatch({effects:Vg.of(l)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(r,i,e);let s=document.createElement("span");return s.textContent=n.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}function zl(r){let e=r.facet(iw);return e.length?e:r.facet(sw)}function hw(r){let e=[],t=r.matched?aw:lw;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}function dc(r,e,t){let n=r.prop(e<0?Y.openedBy:Y.closedBy);if(n)return n;if(r.name.length==1){let i=t.indexOf(r.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function pc(r){let e=r.type.prop(Gg);return e?e(r.node):r}function Ks(r,e,t,n={}){let i=n.maxScanDistance||1e4,s=n.brackets||Wg,o=Te(r),a=o.resolveInner(e,t);for(let l=a;l;l=l.parent){let h=dc(l.type,t,s);if(h&&l.from<l.to){let c=pc(l);if(c&&(t>0?e>=c.from&&e<c.to:e>c.from&&e<=c.to))return cw(r,e,t,l,c,h,s)}}return(function(l,h,c,u,d,p,f){let m=c<0?l.sliceDoc(h-1,h):l.sliceDoc(h,h+1),g=f.indexOf(m);if(g<0||g%2==0!=c>0)return null;let O={from:c<0?h-1:h,to:c>0?h+1:h},b=l.doc.iterRange(h,c>0?l.doc.length:0),S=0;for(let x=0;!b.next().done&&x<=p;){let y=b.value;c<0&&(x+=y.length);let v=h+x*c;for(let T=c>0?0:y.length-1,C=c>0?y.length:-1;T!=C;T+=c){let k=f.indexOf(y[T]);if(!(k<0||u.resolveInner(v+T,1).type!=d))if(k%2==0==c>0)S++;else{if(S==1)return{start:O,end:{from:v+T,to:v+T+1},matched:k>>1==g>>1};S--}}c>0&&(x+=y.length)}return b.done?{start:O,matched:!1}:null})(r,e,t,o,a.type,i,s)}function cw(r,e,t,n,i,s,o){let a=n.parent,l={from:i.from,to:i.to},h=0,c=a?.cursor();if(c&&(t<0?c.childBefore(n.from):c.childAfter(n.to)))do if(t<0?c.to<=n.from:c.from>=n.to){if(h==0&&s.indexOf(c.type.name)>-1&&c.from<c.to){let u=pc(c);return{start:l,end:u?{from:u.from,to:u.to}:void 0,matched:!0}}if(dc(c.type,t,o))h++;else if(dc(c.type,-t,o)){if(h==0){let u=pc(c);return{start:l,end:u&&u.from<u.to?{from:u.from,to:u.to}:void 0,matched:!1}}h--}}while(t<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}function _l(r,e){Pf.indexOf(r)>-1||(Pf.push(r),console.warn(e))}function Kg(r,e){let t=[];for(let a of e.split(" ")){let l=[];for(let h of a.split(".")){let c=r[h]||w[h];c?typeof c=="function"?l.length?l=l.map(c):_l(h,`Modifier ${h} used at start of tag`):l.length?_l(h,`Tag ${h} used as modifier`):l=Array.isArray(c)?c:[c]:_l(h,`Unknown highlighting tag ${h}`)}for(let h of l)t.push(h)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),i=n+" "+t.map(a=>a.id),s=kf[i];if(s)return s.id;let o=kf[i]=Fe.define({id:fc.length,name:n,props:[Go({[n]:t})]});return fc.push(o),o.id}function Jg(r){return r.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(r)}function Cf(r){for(let e=r.iter();!e.next().done;)if(Jg(e.value))return!0;return!1}function Rf(r,e,t){let n=new Hn,i=r.visibleRanges;t||(i=(function(s,o){let a=o.iter(),l=0,h=[],c=null;for(let{from:u,to:d}of s)if(!(c&&c.to>u&&(u=c.to,u>=d)))for(l+a.value.length<u&&(a.next(u-(l+a.value.length)),l=u);;){let p=l,f=l+a.value.length;if(!a.lineBreak&&Jg(a.value)&&(c&&c.to>p-10?c.to=Math.min(d,f):h.push(c={from:p,to:Math.min(d,f)})),f>=d)break;l=f,a.next()}return h})(i,r.state.doc));for(let{from:s,to:o}of i)e.iterate({enter:a=>{let l=a.type.prop(Y.isolate);l&&n.add(a.from,a.to,uw[l])},from:s,to:o});return n.finish()}function ci(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let n=0,i=0;n<r.length;){let s=0;for(;;){let o=r.charCodeAt(n++),a=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,a=!0),s+=l,a)break;s*=46}t?t[i++]=s:t=new e(s)}return t}function eO(r,e,t,n,i,s){let o=0,a=1<<n,{dialect:l}=t.p.parser;e:for(;(a&r[o])!=0;){let h=r[o+1];for(let p=o+3;p<h;p+=2)if((r[p+1]&a)>0){let f=r[p];if(l.allows(f)&&(e.token.value==-1||e.token.value==f||dw(f,e.token.value,i,s))){e.acceptToken(f);break}}let c=e.next,u=0,d=r[o+2];if(!(e.next<0&&d>u&&r[h+3*d-3]==65535)){for(;u<d;){let p=u+d>>1,f=h+p+(p<<1),m=r[f],g=r[f+1]||65536;if(c<m)d=p;else{if(!(c>=g)){o=r[f+2],e.advance();continue e}u=p+1}}break}o=r[h+3*d-1]}}function Ef(r,e,t){for(let n,i=e;(n=r[i])!=65535;i++)if(n==t)return i-e;return-1}function dw(r,e,t,n){let i=Ef(t,n,e);return i<0||Ef(t,n,r)<i}function $f(r,e,t){let n=r.cursor(ue.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(r.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:r.length}}function If(r,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==r.pos&&n.sameState(r))return void(e[t].score<r.score&&(e[t]=r))}e.push(r)}function en(r,e){return r[e]|r[e+1]<<16}function Nf(r){if(r.external){let e=r.extend?1:0;return(t,n)=>r.external(t,n)<<1|e}return r.get}function Mi(r){return r>=65&&r<=90||r>=97&&r<=122||r>=161}function Kc(r){return r>=48&&r<=57}function Lf(r){return Kc(r)||r>=97&&r<=102||r>=65&&r<=70}function Bl(){if(!Zl&&typeof document=="object"&&document.body){let{style:r}=document.body,e=[],t=new Set;for(let n in r)n!="cssText"&&n!="cssFloat"&&typeof r[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(n)||(e.push(n),t.add(n)));Zl=e.sort().map(n=>({type:"property",label:n}))}return Zl||[]}function Qw(r){for(let e=r;;){if(e.type.isTop)return e;if(!(e=e.parent))return r}}function rO(r,e,t){if(e.to-e.from>4096){let n=zf.get(e);if(n)return n;let i=[],s=new Set,o=e.cursor(ue.IncludeAnonymous);if(o.firstChild())do for(let a of rO(r,o.node,t))s.has(a.label)||(s.add(a.label),i.push(a));while(o.nextSibling());return zf.set(e,i),i}{let n=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(Cw)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let a=r.sliceString(s.from,s.to);i.has(a)||(i.add(a),n.push({label:a,type:"variable"}))}}),n}}function Ew(){return new $r(Lr,Lr.data.of({autocomplete:Aw}))}function _f(r){let e=Object.keys(r).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function iO(r){let e=r.map(i=>typeof i=="string"?{label:i}:i),[t,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:(function(i){let s=Object.create(null),o=Object.create(null);for(let{label:l}of i){s[l[0]]=!0;for(let h=1;h<l.length;h++)o[l[h]]=!0}let a=_f(s)+_f(o)+"*$";return[new RegExp("^"+a),new RegExp(a)]})(e);return i=>{let s=i.matchBefore(n);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function sO(r,e){return t=>{for(let n=Te(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(r.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}function vn(r){return r.selection.main.from}function oO(r,e){var t;let{source:n}=r,i=e&&n[0]!="^",s=n[n.length-1]!="$";return i||s?new RegExp(`${i?"^":""}(?:${n})${s?"$":""}`,(t=r.flags)!==null&&t!==void 0?t:r.ignoreCase?"i":""):r}function $w(r){if(!Array.isArray(r))return r;let e=Xf.get(r);return e||Xf.set(r,e=iO(r)),e}function Ff(r,e){return r?e?r+" "+e:r:e}function Iw(r,e,t,n,i,s){let o,a,l=r.textDirection==de.RTL,h=l,c=!1,u="top",d=e.left-i.left,p=i.right-e.right,f=n.right-n.left,m=n.bottom-n.top;if(h&&d<Math.min(f,p)?h=!1:!h&&p<Math.min(f,d)&&(h=!0),f<=(h?d:p))o=Math.max(i.top,Math.min(t.top,i.bottom-m))-e.top,a=Math.min(400,h?d:p);else{c=!0,a=Math.min(400,(l?e.right:i.right-e.left)-30);let g=i.bottom-e.bottom;g>=m||g>e.top?o=t.bottom-e.top:(u="bottom",o=e.bottom-t.top)}return{style:`${u}: ${o/((e.bottom-e.top)/s.offsetHeight)}px; max-width: ${a/((e.right-e.left)/s.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":h?"left":"right")}}function jl(r,e,t){if(r<=t)return{from:0,to:r};if(e<0&&(e=0),e<=r>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let n=Math.floor((r-e)/t);return{from:r-(n+1)*t,to:r-n*t}}function Nw(r,e){return t=>new kc(t,r,e)}function Zf(r){return 100*(r.boost||0)+(r.apply?10:0)+(r.info?5:0)+(r.type?1:0)}function Bf(r,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":r};return e>-1&&(t["aria-activedescendant"]=r+"-"+e),t}function aO(r,e){if(r.isUserEvent("input.complete")){let n=r.annotation(Jc);if(n&&e.activateOnCompletion(n))return 12}let t=r.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:r.isUserEvent("delete.backward")?2:r.selection?8:r.docChanged?16:0}function tu(r,e){let t=e.completion.apply||e.completion.label,n=r.state.field(lt).active.find(i=>i.source==e.source);return n instanceof Fo&&(typeof t=="string"?r.dispatch(Object.assign(Object.assign({},(function(i,s,o,a){let{main:l}=i.selection,h=o-l.from,c=a-l.from;return Object.assign(Object.assign({},i.changeByRange(u=>{if(u!=l&&o!=a&&i.sliceDoc(u.from+h,u.from+c)!=i.sliceDoc(o,a))return{range:u};let d=i.toText(s);return{changes:{from:u.from+h,to:a==l.from?u.to:u.from+c,insert:d},range:$.cursor(u.from+h+d.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})})(r.state,t,n.from,n.to)),{annotations:Jc.of(e.completion)})):t(r,e.completion,n.from,n.to),!0)}function ui(r,e="option"){return t=>{let n=t.state.field(lt,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(Me).interactionDelay)return!1;let i,s=1;e=="page"&&(i=Lg(t,n.open.tooltip))&&(s=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:o}=n.open.options,a=n.open.selected>-1?n.open.selected+s*(r?1:-1):r?0:o-1;return a<0?a=e=="page"?0:o-1:a>=o&&(a=e=="page"?o-1:0),t.dispatch({effects:lO.of(a)}),!0}}function nu(r,e){return $.create(r.filter(t=>t.field==e).map(t=>$.range(t.from,t.to)))}function jw(r){let e=Ic.parse(r);return(t,n,i,s)=>{let{text:o,ranges:a}=e.instantiate(t.state,i),l={changes:{from:i,to:s,insert:ie.of(o)},scrollIntoView:!0,annotations:n?[Jc.of(n),$e.userEvent.of("input.complete")]:void 0};if(a.length&&(l.selection=nu(a,0)),a.some(h=>h.field>0)){let h=new Mr(a,0),c=l.effects=[Xi.of(h)];t.state.field(_i,!1)===void 0&&c.push(se.appendConfig.of([_i,Hw,Uw,Xw]))}t.dispatch(t.state.update(l))}}function jf(r){return({state:e,dispatch:t})=>{let n=e.field(_i,!1);if(!n||r<0&&n.active==0)return!1;let i=n.active+r,s=r>0&&!n.ranges.some(o=>o.field==i+r);return t(e.update({selection:nu(n.ranges,i),effects:Xi.of(s?null:new Mr(n.ranges,i)),scrollIntoView:!0})),!0}}function Je(r,e){return Object.assign(Object.assign({},e),{apply:jw(r)})}function Gw(r){for(let e=0;e<8;e+=2)if(Hf.charCodeAt(e)==r)return Hf.charAt(e+1);return _c(r<128?r:r+1)}function Yw(r,e){return r.languageDataAt("closeBrackets",e)[0]||Zo}function uO(r,e){let t=!1;return r.field(Ww).between(0,r.doc.length,n=>{n==e&&(t=!0)}),t}function ru(r,e){let t=r.sliceString(e,e+2);return t.slice(0,nn(Ct(t,0)))}function Kw(r,e,t,n){let i=null,s=r.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:_n.of(o.to+e.length),range:$.range(o.anchor+e.length,o.head+e.length)};let a=ru(r.doc,o.head);return!a||/\s/.test(a)||n.indexOf(a)>-1?{changes:{insert:e+t,from:o.head},effects:_n.of(o.head+e.length),range:$.cursor(o.head+e.length)}:{range:i=o}});return i?null:r.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Jw(r,e,t){let n=null,i=r.changeByRange(s=>s.empty&&ru(r.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:$.cursor(s.head+t.length)}:n={range:s});return n?null:r.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function ev(r,e,t,n){let i=n.stringPrefixes||Zo.stringPrefixes,s=null,o=r.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:e,from:a.to}],effects:_n.of(a.to+e.length),range:$.range(a.anchor+e.length,a.head+e.length)};let l,h=a.head,c=ru(r.doc,h);if(c==e){if(Uf(r,h))return{changes:{insert:e+e,from:h},effects:_n.of(h+e.length),range:$.cursor(h+e.length)};if(uO(r,h)){let u=t&&r.sliceDoc(h,h+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:h,to:h+u.length,insert:u},range:$.cursor(h+u.length)}}}else{if(t&&r.sliceDoc(h-2*e.length,h)==e+e&&(l=Wf(r,h-2*e.length,i))>-1&&Uf(r,l))return{changes:{insert:e+e+e+e,from:h},effects:_n.of(h+e.length),range:$.cursor(h+e.length)};if(r.charCategorizer(h)(c)!=Xe.Word&&Wf(r,h,i)>-1&&!(function(u,d,p,f){let m=Te(u).resolveInner(d,-1),g=f.reduce((O,b)=>Math.max(O,b.length),0);for(let O=0;O<5;O++){let b=u.sliceDoc(m.from,Math.min(m.to,m.from+p.length+g)),S=b.indexOf(p);if(!S||S>-1&&f.indexOf(b.slice(0,S))>-1){let y=m.firstChild;for(;y&&y.from==m.from&&y.to-y.from>p.length+S;){if(u.sliceDoc(y.to-p.length,y.to)==p)return!1;y=y.firstChild}return!0}let x=m.to==d&&m.parent;if(!x)break;m=x}return!1})(r,h,e,i))return{changes:{insert:e+e,from:h},effects:_n.of(h+e.length),range:$.cursor(h+e.length)}}return{range:s=a}});return s?null:r.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Uf(r,e){let t=Te(r).resolveInner(e+1);return t.parent&&t.from==e}function Wf(r,e,t){let n=r.charCategorizer(e);if(n(r.sliceDoc(e-1,e))!=Xe.Word)return e;for(let i of t){let s=e-i.length;if(r.sliceDoc(s,e)==i&&n(r.sliceDoc(s-1,s))!=Xe.Word)return s}return-1}function dO(r,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=r(e,t);return!!i&&(n(t.update(i)),!0)}}function pO(r,e){let t=r.languageDataAt("commentTokens",e);return t.length?t[0]:{}}function nv(r,e,t=e.selection.ranges){let n=[],i=-1;for(let{from:s,to:o}of t){let a=n.length,l=1e9,h=pO(e,s).line;if(h){for(let c=s;c<=o;){let u=e.doc.lineAt(c);if(u.from>i&&(s==o||o>u.from)){i=u.from;let d=/^\s*/.exec(u.text)[0].length,p=d==u.length,f=u.text.slice(d,d+h.length)==h?d:-1;d<u.text.length&&d<l&&(l=d),n.push({line:u,comment:f,token:h,indent:d,empty:p,single:!1})}c=u.to+1}if(l<1e9)for(let c=a;c<n.length;c++)n[c].indent<n[c].line.text.length&&(n[c].indent=l);n.length==a+1&&(n[a].single=!0)}}if(r!=2&&n.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:a,token:l,indent:h,empty:c,single:u}of n)!u&&c||s.push({from:a.from+h,insert:l+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}if(r!=1&&n.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:a,token:l}of n)if(a>=0){let h=o.from+a,c=h+l.length;o.text[c-o.from]==" "&&c++,s.push({from:h,to:c})}return{changes:s}}return null}function Ko(r,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let i=t.field(ov,!1);if(!i)return!1;let s=i.pop(r,t,e);return!!s&&(n(s),!0)}}function Bo(r,e,t,n){let i=e+1>t+20?e-t-1:0,s=r.slice(i,e);return s.push(n),s}function fO(r,e){return r.length?e.length?r.concat(e):r:e}function mO(r,e){if(r.length){let t=r[r.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-uv));return n.length&&n[n.length-1].eq(e)?r:(n.push(e),Bo(r,r.length-1,1e9,t.setSelAfter(n)))}return[At.selection([e])]}function dv(r){let e=r[r.length-1],t=r.slice();return t[r.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Vl(r,e){if(!r.length)return r;let t=r.length,n=yt;for(;t;){let i=pv(r[t-1],e,n);if(i.changes&&!i.changes.empty||i.effects.length){let s=r.slice(0,t);return s[t-1]=i,s}e=i.mapped,t--,n=i.selectionsAfter}return n.length?[At.selection(n)]:yt}function pv(r,e,t){let n=fO(r.selectionsAfter.length?r.selectionsAfter.map(a=>a.map(e)):yt,t);if(!r.changes)return At.selection(n);let i=r.changes.map(e),s=e.mapDesc(r.changes,!0),o=r.mapped?r.mapped.composeDesc(s):s;return new At(i,se.mapEffects(r.effects,e),o,r.startSelection.map(s),n)}function iu(r,e){return $.create(r.ranges.map(e),r.mainIndex)}function Yn(r,e){return r.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function tn({state:r,dispatch:e},t){let n=iu(r.selection,t);return!n.eq(r.selection)&&(e(Yn(r,n)),!0)}function Jo(r,e){return $.cursor(e?r.to:r.from)}function gO(r,e){return tn(r,t=>t.empty?r.moveByChar(t,e):Jo(t,e))}function xt(r){return r.textDirectionAt(r.state.selection.main.head)==de.LTR}function OO(r,e){return tn(r,t=>t.empty?r.moveByGroup(t,e):Jo(t,e))}function yO(r,e){return tn(r,t=>{if(!t.empty)return Jo(t,e);let n=r.moveVertically(t,e);return n.head!=t.head?n:r.moveToLineBoundary(t,e)})}function xO(r){let e,t=r.scrollDOM.clientHeight<r.scrollDOM.scrollHeight-2,n=0,i=0;if(t){for(let s of r.state.facet(V.scrollMargins)){let o=s(r);o?.top&&(n=Math.max(o?.top,n)),o?.bottom&&(i=Math.max(o?.bottom,i))}e=r.scrollDOM.clientHeight-n-i}else e=(r.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:t,height:Math.max(r.defaultLineHeight,e-5)}}function wO(r,e){let t,n=xO(r),{state:i}=r,s=iu(i.selection,o=>o.empty?r.moveVertically(o,e,n.height):Jo(o,e));if(s.eq(i.selection))return!1;if(n.selfScroll){let o=r.coordsAtPos(i.selection.main.head),a=r.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,h=a.bottom-n.marginBottom;o&&o.top>l&&o.bottom<h&&(t=V.scrollIntoView(s.main.head,{y:"start",yMargin:o.top-l}))}return r.dispatch(Yn(i,s),{effects:t}),!0}function gn(r,e,t){let n=r.lineBlockAt(e.head),i=r.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?n.to:n.from)&&(i=r.moveToLineBoundary(e,t,!1)),!t&&i.head==n.from&&n.length){let s=/^\s*/.exec(r.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;s&&e.head!=n.from+s&&(i=$.cursor(n.from+s))}return i}function jt(r,e){let t=iu(r.state.selection,n=>{let i=e(n);return $.range(n.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return!t.eq(r.state.selection)&&(r.dispatch(Yn(r.state,t)),!0)}function vO(r,e){return jt(r,t=>r.moveByChar(t,e))}function TO(r,e){return jt(r,t=>r.moveByGroup(t,e))}function CO(r,e){return jt(r,t=>r.moveVertically(t,e))}function QO(r,e){return jt(r,t=>r.moveVertically(t,e,xO(r).height))}function yi(r,e){if(r.state.readOnly)return!1;let t="delete.selection",{state:n}=r,i=n.changeByRange(s=>{let{from:o,to:a}=s;if(o==a){let l=e(s);l<o?(t="delete.backward",l=Js(r,l,!1)):l>o&&(t="delete.forward",l=Js(r,l,!0)),o=Math.min(o,l),a=Math.max(a,l)}else o=Js(r,o,!1),a=Js(r,a,!0);return o==a?{range:s}:{changes:{from:o,to:a},range:$.cursor(o,o<s.head?-1:1)}});return!i.changes.empty&&(r.dispatch(n.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?V.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function Js(r,e,t){if(r instanceof V)for(let n of r.state.facet(V.atomicRanges).map(i=>i(r)))n.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}function mv(r){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{let{from:s,to:o}=i,a=e.doc.lineAt(s),l=!r&&s==o&&(function(d,p){if(/\(\)|\[\]|\{\}/.test(d.sliceDoc(p-1,p+1)))return{from:p,to:p};let f,m=Te(d).resolveInner(p),g=m.childBefore(p),O=m.childAfter(p);return g&&O&&g.to<=p&&O.from>=p&&(f=g.type.prop(Y.closedBy))&&f.indexOf(O.name)>-1&&d.doc.lineAt(g.to).from==d.doc.lineAt(O.from).from&&!/\S/.test(d.sliceDoc(g.to,O.from))?{from:g.to,to:O.from}:null})(e,s);r&&(s=o=(o<=a.to?a:e.doc.lineAt(o)).to);let h=new Li(e,{simulateBreak:s,simulateDoubleBreak:!!l}),c=U1(h,s);for(c==null&&(c=Zc(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<a.to&&/\s/.test(a.text[o-a.from]);)o++;l?{from:s,to:o}=l:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let u=["",vf(e,c)];return l&&u.push(vf(e,h.lineIndent(a.from,-1))),{changes:{from:s,to:o,insert:ie.of(u)},range:$.cursor(s+1+u[1].length)}});return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Sv(r){return r==45||r==46||r==58||r>=65&&r<=90||r==95||r>=97&&r<=122||r>=161}function $O(r){return r==9||r==10||r==13||r==32}function Mc(r,e){let t=r.pos+e;if(mm==t&&fm==r)return pm;let n=r.peek(e);for(;$O(n);)n=r.peek(++e);let i="";for(;Sv(n);)i+=String.fromCharCode(n),n=r.peek(++e);return fm=r,mm=t,pm=i?i.toLowerCase():n==yv||n==xv?void 0:null}function gm(r,e){this.name=r,this.parent=e}function su(r,e,t){let n=2+r.length;return new Ye(i=>{for(let s=0,o=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(s==0&&i.next==60||s==1&&i.next==47||s>=2&&s<n&&i.next==r.charCodeAt(s-2))s++,o++;else if(s!=2&&s!=n||!$O(i.next)){if(s==n&&i.next==62){a>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}if((i.next==10||i.next==13)&&a){i.acceptToken(e,1);break}s=o=0}else o++;i.advance()}})}function IO(r,e){let t=Object.create(null);for(let n of r.getChildren(23)){let i=n.getChild(24),s=n.getChild(26)||n.getChild(27);i&&(t[e.read(i.from,i.to)]=s?s.type.id==26?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function Om(r,e){let t=r.getChild(22);return t?e.read(t.from,t.to):" "}function Wl(r,e,t){let n;for(let i of t)if(!i.attrs||i.attrs(n||(n=IO(r.node.parent.firstChild,e))))return{parser:i.parser};return null}function NO(r=[],e=[]){let t=[],n=[],i=[],s=[];for(let a of r)(a.tag=="script"?t:a.tag=="style"?n:a.tag=="textarea"?i:s).push(a);let o=e.length?Object.create(null):null;for(let a of e)(o[a.name]||(o[a.name]=[])).push(a);return Wx((a,l)=>{let h=a.type.id;if(h==28)return Wl(a,l,t);if(h==31)return Wl(a,l,n);if(h==34)return Wl(a,l,i);if(h==20&&s.length){let c,u=a.node,d=u.firstChild,p=d&&Om(d,l);if(p){for(let f of s)if(f.tag==p&&(!f.attrs||f.attrs(c||(c=IO(d,l))))){let m=u.lastChild,g=m.type.id==37?m.from:u.to;if(g>d.to)return{parser:f.parser,overlay:[{from:d.to,to:g}]}}}}if(o&&h==23){let c,u=a.node;if(c=u.firstChild){let d=o[l.read(c.from,c.to)];if(d)for(let p of d){if(p.tagName&&p.tagName!=Om(u.parent,l))continue;let f=u.lastChild;if(f.type.id==26){let m=f.from+1,g=f.lastChild,O=f.to-(g&&g.isError?0:1);if(O>m)return{parser:p.parser,overlay:[{from:m,to:O}]}}else if(f.type.id==27)return{parser:p.parser,overlay:[{from:f.from,to:f.to}]}}}}return null})}function Gl(r,e){return r>=65&&r<=90||r>=97&&r<=122||r==95||r>=192||!e&&r>=48&&r<=57}function ni(r){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,r),!0}}function DO(r,e){let t=bm.get(e);if(t)return t;let n=[],i=!0;function s(o,a){let l=r.sliceString(o.from,o.to);n.push({label:l,type:a})}return e.cursor(ue.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let a=jv[o.name];if(a&&a(o,s)||MO.has(o.name))return!1}else if(o.to-o.from>8192){for(let a of DO(r,o.node))n.push(a);return!1}}),bm.set(e,n),n}function zO(r){let e=Te(r.state).resolveInner(r.pos,-1);if(au.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&jo.test(r.state.sliceDoc(e.from,e.to));if(!t&&!r.explicit)return null;let n=[];for(let i=e;i;i=i.parent)MO.has(i.name)&&(n=n.concat(DO(r.state.doc,i)));return{options:n,from:t?e.from:r.pos,validFor:jo}}function Yl(r,e,t){var n;let i=[];for(;;){let s,o=e.firstChild;if(o?.name=="VariableName")return i.push(r(o)),{path:i.reverse(),name:t};if(o?.name!="MemberExpression"||((n=s=o.lastChild)===null||n===void 0?void 0:n.name)!="PropertyName")return null;i.push(r(s)),e=o}}function Sm(r){let e=n=>r.state.doc.sliceString(n.from,n.to),t=Te(r.state).resolveInner(r.pos,-1);return t.name=="PropertyName"?Yl(e,t.parent,e(t)):t.name!="."&&t.name!="?."||t.parent.name!="MemberExpression"?au.indexOf(t.name)>-1?null:t.name=="VariableName"||t.to-t.from<20&&jo.test(e(t))?{path:[],name:e(t)}:t.name=="MemberExpression"?Yl(e,t,""):r.explicit?{path:[],name:""}:null:Yl(e,t.parent,"")}function ZO(r={}){let e=r.jsx?r.typescript?cu:hu:r.typescript?lu:wt,t=r.typescript?LO.concat(Vv):ou.concat(FO);return new $r(e,[wt.data.of({autocomplete:sO(au,iO(t))}),wt.data.of({autocomplete:zO}),r.jsx?BO:[]])}function ym(r,e,t=r.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return r.sliceString(n.from,Math.min(n.to,t));return""}function xm(r,e,t,n){return t.line(r+n.line).from+e+(r==1?n.col-1:-1)}function Uv(r,e,t){let n=xm(r.line,r.column,e,t),i={from:n,to:r.endLine!=null&&r.endColumn!=1?xm(r.endLine,r.endColumn,e,t):n,message:r.message,source:r.ruleId?"eslint:"+r.ruleId:"eslint",severity:r.severity==1?"warning":"error"};if(r.fix){let{range:s,text:o}=r.fix,a=s[0]+t.pos-n,l=s[1]+t.pos-n;i.actions=[{name:"fix",apply(h,c){h.dispatch({changes:{from:c+a,to:c+l,insert:o},scrollIntoView:!0})}}]}return i}function Dr(r,e,t=r.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?r.sliceString(i.from,Math.min(i.to,t)):""}function zr(r,e=!1){for(;r;r=r.parent)if(r.name=="Element"){if(!e)return r;e=!1}return null}function HO(r,e,t){let n=t.tags[Dr(r,zr(e))];return n?.children||t.allTags}function uu(r,e){let t=[];for(let n=zr(e);n&&!n.type.isTop;n=zr(n.parent)){let i=Dr(r,n);if(i&&n.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(i)}return t}function wm(r,e,t,n,i){let s=/\s*>/.test(r.sliceDoc(i,i+5))?"":">",o=zr(t,!0);return{from:n,to:i,options:HO(r.doc,o,e).map(a=>({label:a,type:"type"})).concat(uu(r.doc,t).map((a,l)=>({label:"/"+a,apply:"/"+a+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function vm(r,e,t,n){let i=/\s*>/.test(r.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:uu(r.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:UO}}function WO(r,e){let{state:t,pos:n}=e,i=Te(t).resolveInner(n,-1),s=i.resolve(n);for(let o,a=n;s==i&&(o=i.childBefore(a));){let l=o.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=o,a=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?vm(t,i,i.from,n):wm(t,r,i,i.from,n):i.name=="StartTag"?wm(t,r,i,n,n):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?vm(t,i,n,n):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?(function(o,a,l,h,c){let u=zr(l),d=u?a.tags[Dr(o.doc,u)]:null,p=d&&d.attrs?Object.keys(d.attrs):[];return{from:h,to:c,options:(d&&d.globalAttrs===!1?p:p.length?p.concat(a.globalAttrNames):a.globalAttrNames).map(f=>({label:f,type:"property"})),validFor:UO}})(t,r,i,i.name=="AttributeName"?i.from:n,n):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?(function(o,a,l,h,c){var u;let d,p=(u=l.parent)===null||u===void 0?void 0:u.getChild("AttributeName"),f=[];if(p){let m=o.sliceDoc(p.from,p.to),g=a.globalAttrs[m];if(!g){let O=zr(l),b=O?a.tags[Dr(o.doc,O)]:null;g=b?.attrs&&b.attrs[m]}if(g){let O=o.sliceDoc(h,c).toLowerCase(),b='"',S='"';/^['"]/.test(O)?(d=O[0]=='"'?/^[^"]*$/:/^[^']*$/,b="",S=o.sliceDoc(c,c+1)==O[0]?"":O[0],O=O.slice(1),h++):d=/^[^\s<>='"]*$/;for(let x of g)f.push({label:x,apply:b+x+S,type:"constant"})}}return{from:h,to:c,options:f,validFor:d}})(t,r,i,i.name=="Is"?n:i.from,n):!e.explicit||s.name!="Element"&&s.name!="Text"&&s.name!="Document"?null:(function(o,a,l,h){let c=[],u=0;for(let d of HO(o.doc,l,a))c.push({label:"<"+d,type:"type"});for(let d of uu(o.doc,l))c.push({label:"</"+d+">",type:"type",boost:99-u++});return{from:h,to:h,options:c,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}})(t,r,i,n)}function Yv(r){return WO(Gn.default,r)}function GO(r){let{extraTags:e,extraGlobalAttributes:t}=r,n=t||e?new Gn(e,t):Gn.default;return i=>WO(n,i)}function Kv(r={}){let e,t="";r.matchClosingTags===!1&&(t="noMatch"),r.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(r.nestedLanguages&&r.nestedLanguages.length||r.nestedAttributes&&r.nestedAttributes.length)&&(e=NO((r.nestedLanguages||[]).concat(YO),(r.nestedAttributes||[]).concat(qO)));let n=e?KO.configure({wrap:e,dialect:t}):t?xi.configure({dialect:t}):xi;return new $r(n,[xi.data.of({autocomplete:GO(r)}),r.autoCloseTags!==!1?JO:[],ZO().support,Ew().support])}function km(r,e,t,n){return!(t!=0&&r(e.sliceDoc(t-1,t))==Xe.Word||n!=e.doc.length&&r(e.sliceDoc(n,n+1))==Xe.Word)}var Hx,bt,Y,Zn,Ux,Fe,wi,Ds,dp,ue,ke,eh,Tn,lo,tt,nh,Bn,rh,jn,fp,ho,yn,vi,sh,co,oh,ah,lh,uo,qx,hh,Rm,ie,ct,yr,Xn,po,fo,mo,ch,Le,on,nt,Vn,zn,$,Xc,D,xr,zs,rt,r1,i1,fh,s1,un,go,Ti,Pi,Oo,Lm,mh,Mm,Dm,zm,_m,Xm,St,So,yo,se,$e,a1,Xe,l1,gh,ve,rn,Cr,Oh,Se,Hn,xo,ki,Dn,Cp,Sh,Qp,ln,Rp,yh,an,Qr,Zm,Bm,Ee,Fs,wh,Ep,Or,Ue,jc,be,vo,ht,vh,Th,Ym,Ph,Ho,Ip,Cl,u1,qm,Np,z,Pn,kn,To,Ri,Lp,Ne,Tr,cn,We,q,Ai,Ei,Cn,mi,Po,de,Wn,Hc,p1,f1,Rh,_t,m1,Ht,le,sg,og,ag,lg,hg,$h,cg,ug,dg,b1,gi,Bs,Uo,S1,ii,Ge,Oi,pg,Uc,$i,fg,Wc,mg,gg,si,Ut,Ii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rm,im,sm,om,am,lm,hm,RO,Ul,cm,AO,um,EO,gv,Ov,bv,dm,pm,fm,mm,yv,xv,wv,vv,Tv,Pv,kv,Cv,Qv,Rv,Av,Ev,Dc,$v,Iv,Nv,Lv,Mv,Dv,zv,_v,Xv,Fv,Zv,ou,LO,bm,MO,Bv,jv,jo,au,wt,_O,lu,hu,cu,XO,FO,Vv,Hv,BO,Wv,ri,ql,Kl,Jl,at,X,Gv,jO,VO,Gn,UO,qv,YO,qO,KO,xi,Tm,JO,Jv,Pm,Vo,eT,tT,nT,rT,Jk,eC,tC,nC,eb=Fr(()=>{Hx=0,bt=class{constructor(r,e){this.from=r,this.to=e}},Y=class{constructor(e={}){this.id=Hx++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Fe.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};Y.closedBy=new Y({deserialize:r=>r.split(" ")}),Y.openedBy=new Y({deserialize:r=>r.split(" ")}),Y.group=new Y({deserialize:r=>r.split(" ")}),Y.isolate=new Y({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}}),Y.contextHash=new Y({perNode:!0}),Y.lookAhead=new Y({perNode:!0}),Y.mounted=new Y({perNode:!0});Zn=class{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[Y.mounted.id]}},Ux=Object.create(null),Fe=class r{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Ux,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new r(e.name||"",t,e.id,n);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(Y.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return n=>{for(let i=n.prop(Y.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?n.name:i[s]];if(o)return o}}}};Fe.none=new Fe("",Object.create(null),0,8);wi=class r{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let i=null;for(let s of e){let o=s(n);o&&(i||(i=Object.assign({},n.props)),i[o[0].id]=o[1])}t.push(i?new Fe(n.name,i,n.id,n.flags):n)}return new r(t)}},Ds=new WeakMap,dp=new WeakMap;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(ue||(ue={}));ke=class r{constructor(e,t,n,i,s){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,a]of s)this.props[typeof o=="number"?o:o.id]=a}}toString(){let e=Zn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let i=n.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new jn(this.topNode,e)}cursorAt(e,t=0,n=0){let i=Ds.get(this)||this.topNode,s=new jn(i);return s.moveTo(e,t),Ds.set(this,s._tree),s}get topNode(){return new tt(this,0,0,null)}resolve(e,t=0){let n=di(Ds.get(this)||this.topNode,e,t,!1);return Ds.set(this,n),n}resolveInner(e,t=0){let n=di(dp.get(this)||this.topNode,e,t,!0);return dp.set(this,n),n}resolveStack(e,t=0){return(function(n,i,s){let o=n.resolveInner(i,s),a=null;for(let l=o instanceof tt?o:o.context.parent;l;l=l.parent)if(l.index<0){let h=l.parent;(a||(a=[o])).push(h.resolve(i,s)),l=h}else{let h=Zn.get(l.tree);if(h&&h.overlay&&h.overlay[0].from<=i&&h.overlay[h.overlay.length-1].to>=i){let c=new tt(h.tree,h.overlay[0].from+l.from,-1,l);(a||(a=[o])).push(di(c,i,s,!1))}}return a?Qm(a):o})(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:s=this.length}=e,o=e.mode||0,a=(o&ue.IncludeAnonymous)>0;for(let l=this.cursor(o|ue.IncludeAnonymous);;){let h=!1;if(l.from<=s&&l.to>=i&&(!a&&l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;h=!0}for(;h&&n&&(a||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:ih(Fe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,i)=>new r(this.type,t,n,i,this.propValues),e.makeTree||((t,n,i)=>new r(Fe.none,t,n,i)))}static build(e){return(function(t){var n;let{buffer:i,nodeSet:s,maxBufferLength:o=1024,reused:a=[],minRepeatType:l=s.types.length}=t,h=Array.isArray(i)?new eh(i,i.length):i,c=s.types,u=0,d=0;function p(T,C,k,Q,R,Z){let{id:M,start:A,end:F,size:H}=h,K=d,N=u;for(;H<0;){if(h.next(),H==-1){let he=a[M];return k.push(he),void Q.push(A-T)}if(H==-3)return void(u=M);if(H==-4)return void(d=M);throw new RangeError(`Unrecognized record size: ${H}`)}let I,W,Qe=c[M],ye=A-T;if(F-A<=o&&(W=b(h.pos-C,R))){let he=new Uint16Array(W.size-W.skip),oe=h.pos-W.size,Ie=he.length;for(;h.pos>oe;)Ie=S(W.start,he,Ie);I=new Tn(he,F-W.start,s),ye=W.start-T}else{let he=h.pos-H;h.next();let oe=[],Ie=[],Rn=M>=l?M:-1,er=0,Hi=F;for(;h.pos>he;)Rn>=0&&h.id==Rn&&h.size>=0?(h.end<=Hi-o&&(g(oe,Ie,A,er,h.end,Hi,Rn,K,N),er=oe.length,Hi=h.end),h.next()):Z>2500?f(A,he,oe,Ie):p(A,he,oe,Ie,Rn,Z+1);if(Rn>=0&&er>0&&er<oe.length&&g(oe,Ie,A,er,A,Hi,Rn,K,N),oe.reverse(),Ie.reverse(),Rn>-1&&er>0){let Ru=m(Qe,N);I=ih(Qe,oe,Ie,0,oe.length,0,F-A,Ru,Ru)}else I=O(Qe,oe,Ie,F-A,K-F,N)}k.push(I),Q.push(ye)}function f(T,C,k,Q){let R=[],Z=0,M=-1;for(;h.pos>C;){let{id:A,start:F,end:H,size:K}=h;if(K>4)h.next();else{if(M>-1&&F<M)break;M<0&&(M=H-o),R.push(A,F,H),Z++,h.next()}}if(Z){let A=new Uint16Array(4*Z),F=R[R.length-2];for(let H=R.length-3,K=0;H>=0;H-=3)A[K++]=R[H],A[K++]=R[H+1]-F,A[K++]=R[H+2]-F,A[K++]=K;k.push(new Tn(A,R[2]-F,s)),Q.push(F-T)}}function m(T,C){return(k,Q,R)=>{let Z,M,A=0,F=k.length-1;if(F>=0&&(Z=k[F])instanceof r){if(!F&&Z.type==T&&Z.length==R)return Z;(M=Z.prop(Y.lookAhead))&&(A=Q[F]+Z.length+M)}return O(T,k,Q,R,A,C)}}function g(T,C,k,Q,R,Z,M,A,F){let H=[],K=[];for(;T.length>Q;)H.push(T.pop()),K.push(C.pop()+k-R);T.push(O(s.types[M],H,K,Z-R,A-Z,F)),C.push(R-k)}function O(T,C,k,Q,R,Z,M){if(Z){let A=[Y.contextHash,Z];M=M?[A].concat(M):[A]}if(R>25){let A=[Y.lookAhead,R];M=M?[A].concat(M):[A]}return new r(T,C,k,Q,M)}function b(T,C){let k=h.fork(),Q=0,R=0,Z=0,M=k.end-o,A={size:0,start:0,skip:0};e:for(let F=k.pos-T;k.pos>F;){let H=k.size;if(k.id==C&&H>=0){A.size=Q,A.start=R,A.skip=Z,Z+=4,Q+=4,k.next();continue}let K=k.pos-H;if(H<0||K<F||k.start<M)break;let N=k.id>=l?4:0,I=k.start;for(k.next();k.pos>K;){if(k.size<0){if(k.size!=-3)break e;N+=4}else k.id>=l&&(N+=4);k.next()}R=I,Q+=H,Z+=N}return(C<0||Q==T)&&(A.size=Q,A.start=R,A.skip=Z),A.size>4?A:void 0}function S(T,C,k){let{id:Q,start:R,end:Z,size:M}=h;if(h.next(),M>=0&&Q<l){let A=k;if(M>4){let F=h.pos-(M-4);for(;h.pos>F;)k=S(T,C,k)}C[--k]=A,C[--k]=Z-T,C[--k]=R-T,C[--k]=Q}else M==-3?u=Q:M==-4&&(d=Q);return k}let x=[],y=[];for(;h.pos>0;)p(t.start||0,t.bufferStart||0,x,y,-1,0);let v=(n=t.length)!==null&&n!==void 0?n:x.length?y[0]+x[0].length:0;return new r(c[t.topID],x.reverse(),y.reverse(),v)})(e)}};ke.empty=new ke(Fe.none,[],[],0);eh=class r{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new r(this.buffer,this.index)}},Tn=class r{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Fe.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),n==(e+=4))return s;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,n,i,s){let{buffer:o}=this,a=-1;for(let l=e;l!=t&&!(Cm(s,i,o[l+1],o[l+2])&&(a=l,n>0));l=o[l+3]);return a}slice(e,t,n){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let a=e,l=0;a<t;){s[l++]=i[a++],s[l++]=i[a++]-n;let h=s[l++]=i[a++]-n;s[l++]=i[a++]-e,o=Math.max(o,h)}return new r(s,o,this.set)}};lo=class{cursor(e=0){return new jn(this,e)}getChild(e,t=null,n=null){let i=pp(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return pp(this,e,t,n)}resolve(e,t=0){return di(this,e,t,!1)}resolveInner(e,t=0){return di(this,e,t,!0)}matchContext(e){return th(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}get node(){return this}get next(){return this.parent}},tt=class r extends lo{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,s=0){for(let o=this;;){for(let{children:a,positions:l}=o._tree,h=t>0?a.length:-1;e!=h;e+=t){let c=a[e],u=l[e]+o.from;if(Cm(i,n,u,u+c.length)){if(c instanceof Tn){if(s&ue.ExcludeBuffers)continue;let d=c.findChild(0,c.buffer.length,t,n-u,i);if(d>-1)return new Bn(new nh(o,c,e,u),null,d)}else if(s&ue.IncludeAnonymous||!c.type.isAnonymous||zc(c)){let d;if(!(s&ue.IgnoreMounts)&&(d=Zn.get(c))&&!d.overlay)return new r(d.tree,u,e,o);let p=new r(c,u,e,o);return s&ue.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?c.children.length-1:0,t,n,i)}}}if(s&ue.IncludeAnonymous||!o.type.isAnonymous||(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&ue.IgnoreOverlays)&&(i=Zn.get(this._tree))&&i.overlay){let s=e-this.from;for(let{from:o,to:a}of i.overlay)if((t>0?o<=s:o<s)&&(t<0?a>=s:a>s))return new r(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};nh=class{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}},Bn=class r extends lo{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new r(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&ue.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new r(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new r(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new r(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,s=n.buffer[this.index+3];if(s>i){let o=n.buffer[this.index+1];e.push(n.slice(i,s,o)),t.push(0)}return new ke(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};rh=class{constructor(e,t){this.heads=e,this.node=t}get next(){return Qm(this.heads)}},jn=class{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof tt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return!!e&&(e instanceof tt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&ue.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ue.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ue.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,o=e<0?-1:n._tree.children.length;s!=o;s+=e){let a=n._tree.children[s];if(this.mode&ue.IncludeAnonymous||a instanceof Tn||!a.type.isAnonymous||zc(a))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,n=s+1;break e}i=this.stack[--s]}for(let i=n;i<this.stack.length;i++)t=new Bn(this.buffer,t,this.stack[i]);return this.bufferNode=new Bn(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return th(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return th(this._tree,e,i);let o=n[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}};fp=new WeakMap;ho=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof Bn?this.setBuffer(e.context.buffer,e.index,t):e instanceof tt&&this.map.set(e.tree,t)}get(e){return e instanceof Bn?this.getBuffer(e.context.buffer,e.index):e instanceof tt?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},yn=class r{constructor(e,t,n,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let i=[new r(0,e.length,e,0,!1,n)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let a=0,l=0,h=0;;a++){let c=a<t.length?t[a]:null,u=c?c.fromA:1e9;if(u-l>=n)for(;o&&o.from<u;){let d=o;if(l>=d.from||u<=d.to||h){let p=Math.max(d.from,l)-h,f=Math.min(d.to,u)-h;d=p>=f?null:new r(p,f,d.tree,d.offset+h,a>0,!!c)}if(d&&i.push(d),o.to>u)break;o=s<e.length?e[s++]:null}if(!c)break;l=c.toA,h=c.toA-c.toB}return i}},vi=class{startParse(e,t,n){return typeof e=="string"&&(e=new sh(e)),n=n?n.length?n.map(i=>new bt(i.from,i.to)):[new bt(0,0)]:[new bt(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let s=i.advance();if(s)return s}}},sh=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};co=class{constructor(e,t,n,i,s){this.parser=e,this.parse=t,this.overlay=n,this.target=i,this.from=s}};oh=class{constructor(e,t,n,i,s,o,a){this.parser=e,this.predicate=t,this.mounts=n,this.index=i,this.start=s,this.target=o,this.prev=a,this.depth=0,this.ranges=[]}},ah=new Y({perNode:!0}),lh=class{constructor(e,t,n,i,s){this.nest=t,this.input=n,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;return this.stoppedAt!=null&&(n=new ke(n.type,n.children,n.positions,n.length,n.propValues.concat([[ah,this.stoppedAt]]))),n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[Y.mounted.id]=new Zn(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new qx(this.fragments),t=null,n=null,i=new jn(new tt(this.baseTree,this.ranges[0].from,0,null),ue.IncludeAnonymous|ue.IgnoreMounts);e:for(let s,o;;){let a,l=!0;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)l=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(c=>c.frag.from<=i.from&&c.frag.to>=i.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let u=c.from+h.pos,d=c.to+h.pos;u>=i.from&&d<=i.to&&!t.ranges.some(p=>p.from<d&&p.to>u)&&t.ranges.push({from:u,to:d})}}l=!1}else if(n&&(o=Gx(n.ranges,i.from,i.to)))l=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||Yx(i);let h=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new oh(s.parser,s.overlay,h,this.inner.length,i.from,i.tree,t);else{let c=Op(this.ranges,s.overlay||(i.from<i.to?[new bt(i.from,i.to)]:[]));c.length&&mp(c),!c.length&&s.overlay||this.inner.push(new co(s.parser,c.length?s.parser.startParse(this.input,bp(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(u=>new bt(u.from-i.from,u.to-i.from)):null,i.tree,c.length?c[0].from:i.from)),s.overlay?c.length&&(n={ranges:c,depth:0,prev:n}):l=!1}}else if(t&&(a=t.predicate(i))&&(a===!0&&(a=new bt(i.from,i.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&i.firstChild())t&&t.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=Op(this.ranges,t.ranges);h.length&&(mp(h),this.inner.splice(t.index,0,new co(t.parser,t.parser.startParse(this.input,bp(t.mounts,h),h),t.ranges.map(c=>new bt(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}};uo=class{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(ue.IncludeAnonymous|ue.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,ue.IgnoreOverlays|ue.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&t.positions[0]==0&&t.children[0]instanceof ke))break;t=t.children[0]}return!1}},qx=class{constructor(r){var e;if(this.fragments=r,this.curTo=0,this.fragI=0,r.length){let t=this.curFrag=r[0];this.curTo=(e=t.tree.prop(ah))!==null&&e!==void 0?e:t.to,this.inner=new uo(t.tree,-t.offset)}else this.curFrag=this.inner=null}hasNode(r){for(;this.curFrag&&r.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=r.from&&this.curTo>=r.to&&this.inner.hasNode(r)}nextFrag(){var r;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=(r=e.tree.prop(ah))!==null&&r!==void 0?r:e.to,this.inner=new uo(e.tree,-e.offset)}}findMounts(r,e){var t;let n=[];if(this.inner){this.inner.cursor.moveTo(r,1);for(let i=this.inner.cursor.node;i;i=i.parent){let s=(t=i.tree)===null||t===void 0?void 0:t.prop(Y.mounted);if(s&&s.parser==e)for(let o=this.fragI;o<this.fragments.length;o++){let a=this.fragments[o];if(a.from>=i.to)break;a.tree==this.curFrag.tree&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6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<r.length;e++)(e%2?Rm:hh).push(t+=r[e])})();ie=class r{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=kr(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),yr.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=kr(this,e,t);let n=[];return this.decompose(e,t,n,0),yr.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new Xn(this),s=new Xn(e);for(let o=t,a=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(a+=i.value.length,i.done||a>=n)return!0}}iter(e=1){return new Xn(this,e)}iterRange(e,t=this.length){return new po(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new fo(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length!=1||e[0]?e.length<=32?new ct(e):yr.from(ct.split(e,[])):r.empty}},ct=class r extends ie{constructor(e,t=(function(n){let i=-1;for(let s of n)i+=s.length+1;return i})(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let s=0;;s++){let o=this.text[s],a=i+o.length;if((t?n:a)>=e)return new mo(i,a,n,o);i=a+1,n++}}decompose(e,t,n,i){let s=e<=0&&t>=this.length?this:new r(xp(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){let o=n.pop(),a=to(s.text,o.text.slice(),0,s.length);if(a.length<=32)n.push(new r(a,o.length+s.length));else{let l=a.length>>1;n.push(new r(a.slice(0,l)),new r(a.slice(l)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof r))return super.replace(e,t,n);[e,t]=kr(this,e,t);let i=to(this.text,to(n.text,xp(this.text,0,e)),t),s=this.length+n.length-(t-e);return i.length<=32?new r(i,s):yr.from(r.split(i,[]),s)}sliceString(e,t=this.length,n=`
4
+ `){[e,t]=kr(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let a=this.text[o],l=s+a.length;s>e&&o&&(i+=n),e<l&&t>s&&(i+=a.slice(Math.max(0,e-s),t-s)),s=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let s of e)n.push(s),i+=s.length+1,n.length==32&&(t.push(new r(n,i)),n=[],i=-1);return i>-1&&t.push(new r(n,i)),t}},yr=class r extends ie{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let s=0;;s++){let o=this.children[s],a=i+o.length,l=n+o.lines-1;if((t?l:a)>=e)return o.lineInner(e,t,n,i);i=a+1,n=l+1}}decompose(e,t,n,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let a=this.children[s],l=o+a.length;if(e<=l&&t>=o){let h=i&((o<=e?1:0)|(l>=t?2:0));o>=e&&l<=t&&!h?n.push(a):a.decompose(e-o,t-o,n,h)}o=l+1}}replace(e,t,n){if([e,t]=kr(this,e,t),n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(e>=s&&t<=a){let l=o.replace(e-s,t-s,n),h=this.lines-o.lines+l.lines;if(l.lines<h>>4&&l.lines>h>>6){let c=this.children.slice();return c[i]=l,new r(c,this.length-(t-e)+n.length)}return super.replace(s,a,l)}s=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
5
+ `){[e,t]=kr(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let a=this.children[s],l=o+a.length;o>e&&s&&(i+=n),e<l&&t>o&&(i+=a.sliceString(e-o,t-o,n)),o=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof r))return 0;let n=0,[i,s,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==a)return n;let l=this.children[i],h=e.children[s];if(l!=h)return n+l.scanIdentical(h,t);n+=l.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let p of e)n+=p.lines;if(n<32){let p=[];for(let f of e)f.flatten(p);return new ct(p,t)}let i=Math.max(32,n>>5),s=i<<1,o=i>>1,a=[],l=0,h=-1,c=[];function u(p){let f;if(p.lines>s&&p instanceof r)for(let m of p.children)u(m);else p.lines>o&&(l>o||!l)?(d(),a.push(p)):p instanceof ct&&l&&(f=c[c.length-1])instanceof ct&&p.lines+f.lines<=32?(l+=p.lines,h+=p.length+1,c[c.length-1]=new ct(f.text.concat(p.text),f.length+1+p.length)):(l+p.lines>i&&d(),l+=p.lines,h+=p.length+1,c.push(p))}function d(){l!=0&&(a.push(c.length==1?c[0]:r.from(c,h)),h=-1,l=c.length=0)}for(let p of e)u(p);return d(),a.length==1?a[0]:new r(a,t)}};ie.empty=new ct([""],0);Xn=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ct?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],s=this.offsets[n],o=s>>1,a=i instanceof ct?i.text.length:i.children.length;if(o==(t>0?a:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
6
+ `,this;e--}else if(i instanceof ct){let l=i.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof ct?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},po=class{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Xn(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}},fo=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<"u"&&(ie.prototype[Symbol.iterator]=function(){return this.iter()},Xn.prototype[Symbol.iterator]=po.prototype[Symbol.iterator]=fo.prototype[Symbol.iterator]=function(){return this});mo=class{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}};ch=/\r\n?|\n/,Le=(function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r})(Le||(Le={})),on=class r{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(n,i,s),i+=s):i+=o,n+=s}}iterChangedRanges(e,t=!1){uh(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new r(e)}composeDesc(e){return this.empty?e:e.empty?this:Im(this,e)}mapDesc(e,t=!1){return e.empty?this:dh(this,e,t)}mapPos(e,t=-1,n=Le.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],l=this.sections[o++],h=i+a;if(l<0){if(h>e)return s+(e-i);s+=a}else{if(n!=Le.Simple&&h>=e&&(n==Le.TrackDel&&i<e&&h>e||n==Le.TrackBefore&&i<e||n==Le.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!a)return e==i||t<0?s:s+l;s+=l}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let n=0,i=0;n<this.sections.length&&i<=t;){let s=i+this.sections[n++];if(this.sections[n++]>=0&&i<=t&&s>=e)return!(i<e&&s>t)||"cover";i=s}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new r(e)}static create(e){return new r(e)}},nt=class r extends on{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return uh(this,(t,n,i,s,o)=>e=e.replace(i,i+(n-t),o),!1),e}mapDesc(e,t=!1){return dh(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],a=t[i+1];if(a>=0){t[i]=a,t[i+1]=o;let l=i>>1;for(;n.length<l;)n.push(ie.empty);n.push(o?e.slice(s,s+o):ie.empty)}s+=o}return new r(t,n)}compose(e){return this.empty?e:e.empty?this:Im(this,e,!0)}map(e,t=!1){return e.empty?this:dh(this,e,t,!0)}iterChanges(e,t=!1){uh(this,e,t)}get desc(){return on.create(this.sections)}filter(e){let t=[],n=[],i=[],s=new Vn(this);e:for(let o=0,a=0;;){let l=o==e.length?1e9:e[o++];for(;a<l||a==l&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,l-a);_e(i,c,-1);let u=s.ins==-1?-1:s.off==0?s.ins:0;_e(t,c,u),u>0&&Sn(n,t,s.text),s.forward(c),a+=c}let h=e[o++];for(;a<h;){if(s.done)break e;let c=Math.min(s.len,h-a);_e(t,c,-1),_e(i,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),a+=c}}return{changes:new r(t,n),filtered:on.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):i==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],s=[],o=0,a=null;function l(h=!1){if(!h&&!i.length)return;o<t&&_e(i,t-o,-1);let c=new r(i,s);a=a?a.compose(c.map(a)):c,i=[],s=[],o=0}return(function h(c){if(Array.isArray(c))for(let u of c)h(u);else if(c instanceof r){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:u,to:d=u,insert:p}=c;if(u>d||u<0||d>t)throw new RangeError(`Invalid change range ${u} to ${d} (in doc of length ${t})`);let f=p?typeof p=="string"?ie.of(p.split(n||ch)):p:ie.empty,m=f.length;if(u==d&&m==0)return;u<o&&l(),u>o&&_e(i,u-o,-1),_e(i,d-u,m),Sn(s,i,f),o=d}})(e),l(!a),a}static empty(e){return new r(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,a)=>a&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;n.length<i;)n.push(ie.empty);n[i]=ie.of(s.slice(1)),t.push(s[0],n[i].length)}}}return new r(t,n)}static createSet(e,t){return new r(e,t)}};Vn=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?ie.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?ie.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},zn=class r{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new r(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return $.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return $.range(this.anchor,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return $.range(e.anchor,e.head)}static create(e,t,n){return new r(e,t,n)}},$=class r{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:r.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new r([this.main],0)}addRange(e,t=!0){return r.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,r.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new r(e.ranges.map(t=>zn.fromJSON(t)),e.main)}static single(e,t=e){return new r([r.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=n:s.from<n)return r.normalized(e.slice(),t);n=s.to}return new r(e,t)}static cursor(e,t=0,n,i){return zn.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(i??16777215)<<6)}static range(e,t,n,i){let s=(n??16777215)<<6|(i==null?7:Math.min(6,i));return t<e?zn.create(t,e,48|s):zn.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(n);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let a=o.from,l=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?r.range(l,a):r.range(a,l))}}return new r(e,t)}};Xc=0,D=class r{constructor(e,t,n,i,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=Xc++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new r(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:Fc),!!e.static,e.enables)}of(e){return new xr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new xr(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}};xr=class{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=Xc++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,a=this.type==2,l=!1,h=!1,c=[];for(let u of this.dependencies)u=="doc"?l=!0:u=="selection"?h=!0:1&((t=e[u.id])!==null&&t!==void 0?t:1)||c.push(e[u.id]);return{create:u=>(u.values[o]=n(u),1),update(u,d){if(l&&d.docChanged||h&&(d.docChanged||d.selection)||ph(u,c)){let p=n(u);if(a?!wp(p,u.values[o],i):!i(p,u.values[o]))return u.values[o]=p,1}return 0},reconfigure:(u,d)=>{let p,f=d.config.address[s];if(f!=null){let m=bo(d,f);if(this.dependencies.every(g=>g instanceof D?d.facet(g)===u.facet(g):!(g instanceof rt)||d.field(g,!1)==u.field(g,!1))||(a?wp(p=n(u),m,i):i(p=n(u),m)))return u.values[o]=m,0}else p=n(u);return u.values[o]=p,1}}}};zs=D.define({static:!0}),rt=class r{constructor(e,t,n,i,s){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new r(Xc++,e.create,e.update,e.compare||((n,i)=>n===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(zs).find(n=>n.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,i)=>{let s=n.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(n.values[t]=o,1)},reconfigure:(n,i)=>{let s,o=n.facet(zs),a=i.facet(zs);return(s=o.find(l=>l.field==this))&&s!=a.find(l=>l.field==this)?(n.values[t]=s.create(n),1):i.config.address[this.id]!=null?(n.values[t]=i.field(this),0):(n.values[t]=this.create(n),1)}}}init(e){return[this,zs.of({field:this,create:e})]}get extension(){return this}},r1=4,i1=3,fh=2,s1=1;un={highest:qr(0),high:qr(s1),default:qr(fh),low:qr(i1),lowest:qr(r1)},go=class{constructor(e,t){this.inner=e,this.prec=t}},Ti=class r{of(e){return new Pi(this,e)}reconfigure(e){return r.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}},Pi=class{constructor(e,t){this.compartment=e,this.inner=t}},Oo=class r{constructor(e,t,n,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let i=[],s=Object.create(null),o=new Map;for(let d of(function(p,f,m){let g=[[],[],[],[],[]],O=new Map;function b(S,x){let y=O.get(S);if(y!=null){if(y<=x)return;let v=g[y].indexOf(S);v>-1&&g[y].splice(v,1),S instanceof Pi&&m.delete(S.compartment)}if(O.set(S,x),Array.isArray(S))for(let v of S)b(v,x);else if(S instanceof Pi){if(m.has(S.compartment))throw new RangeError("Duplicate use of compartment in extensions");let v=f.get(S.compartment)||S.inner;m.set(S.compartment,v),b(v,x)}else if(S instanceof go)b(S.inner,S.prec);else if(S instanceof rt)g[x].push(S),S.provides&&b(S.provides,x);else if(S instanceof xr)g[x].push(S),S.facet.extensions&&b(S.facet.extensions,fh);else{let v=S.extension;if(!v)throw new Error(`Unrecognized extension value in extension set (${S}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);b(v,x)}}return b(p,fh),g.reduce((S,x)=>S.concat(x))})(e,t,o))d instanceof rt?i.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let a=Object.create(null),l=[],h=[];for(let d of i)a[d.id]=h.length<<1,h.push(p=>d.slot(p));let c=n?.config.facets;for(let d in s){let p=s[d],f=p[0].facet,m=c&&c[d]||[];if(p.every(g=>g.type==0))if(a[f.id]=l.length<<1|1,Fc(m,p))l.push(n.facet(f));else{let g=f.combine(p.map(O=>O.value));l.push(n&&f.compare(g,n.facet(f))?n.facet(f):g)}else{for(let g of p)g.type==0?(a[g.id]=l.length<<1|1,l.push(g.value)):(a[g.id]=h.length<<1,h.push(O=>g.dynamicSlot(O)));a[f.id]=h.length<<1,h.push(g=>n1(g,f,p))}}let u=h.map(d=>d(a));return new r(e,o,u,a,l,s)}};Lm=D.define(),mh=D.define({combine:r=>r.some(e=>e),static:!0}),Mm=D.define({combine:r=>r.length?r[0]:void 0,static:!0}),Dm=D.define(),zm=D.define(),_m=D.define(),Xm=D.define({combine:r=>!!r.length&&r[0]}),St=class{constructor(e,t){this.type=e,this.value=t}static define(){return new So}},So=class{of(e){return new St(this,e)}},yo=class{constructor(e){this.map=e}of(e){return new se(this,e)}},se=class r{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new r(this.type,t)}is(e){return this.type==e}static define(e={}){return new yo(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let s=i.map(t);s&&n.push(s)}return n}};se.reconfigure=se.define(),se.appendConfig=se.define();$e=class r{constructor(e,t,n,i,s,o){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,n&&Nm(n,t.newLength),s.some(a=>a.type==r.time)||(this.annotations=s.concat(r.time.of(Date.now())))}static create(e,t,n,i,s,o){return new r(e,t,n,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(r.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};$e.time=St.define(),$e.userEvent=St.define(),$e.addToHistory=St.define(),$e.remote=St.define();a1=[];Xe=(function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r})(Xe||(Xe={})),l1=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{gh=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}ve=class r{constructor(e,t,n,i,s,o){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let a=0;a<this.config.dynamicSlots.length;a++)pi(this,a<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n!=null)return pi(this,n),bo(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return Fm(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:i,compartments:s}=n;for(let a of e.effects)a.is(Ti.reconfigure)?(n&&(s=new Map,n.compartments.forEach((l,h)=>s.set(h,l)),n=null),s.set(a.value.compartment,a.value.extension)):a.is(se.reconfigure)?(n=null,i=a.value):a.is(se.appendConfig)&&(n=null,i=wr(i).concat(a.value));n?t=e.startState.values.slice():(n=Oo.resolve(i,s,this),t=new r(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(a,l)=>l.reconfigure(a,this),null).values);let o=e.startState.facet(mh)?e.newSelection:e.newSelection.asSingle();new r(n,e.newDoc,o,t,(a,l)=>l.update(a,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:$.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),s=[n.range],o=wr(n.effects);for(let a=1;a<t.ranges.length;a++){let l=e(t.ranges[a]),h=this.changes(l.changes),c=h.map(i);for(let d=0;d<a;d++)s[d]=s[d].map(c);let u=i.mapDesc(h,!0);s.push(l.range.map(u)),i=i.compose(c),o=se.mapEffects(o,c).concat(se.mapEffects(wr(l.effects),u))}return{changes:i,selection:$.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof nt?e:nt.of(e,this.doc.length,this.facet(r.lineSeparator))}toText(e){return ie.of(e.split(this.facet(r.lineSeparator)||ch))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(pi(this,t),bo(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof rt&&this.config.address[i.id]!=null&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let s in n)if(Object.prototype.hasOwnProperty.call(e,s)){let o=n[s],a=e[s];i.push(o.init(l=>o.spec.fromJSON(a,l)))}}return r.create({doc:e.doc,selection:$.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Oo.resolve(e.extensions||[],new Map),n=e.doc instanceof ie?e.doc:ie.of((e.doc||"").split(t.staticFacet(r.lineSeparator)||ch)),i=e.selection?e.selection instanceof $?e.selection:$.single(e.selection.anchor,e.selection.head):$.single(0);return Nm(i,n.length),t.staticFacet(mh)||(i=i.asSingle()),new r(t,n,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(r.tabSize)}get lineBreak(){return this.facet(r.lineSeparator)||`
7
+ `}get readOnly(){return this.facet(Xm)}phrase(e,...t){for(let n of this.facet(r.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?n:t[s-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let s of this.facet(Lm))for(let o of s(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return h1(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let l=et(t,o,!1);if(s(t.slice(l,o))!=Xe.Word)break;o=l}for(;a<i;){let l=et(t,a);if(s(t.slice(a,l))!=Xe.Word)break;a=l}return o==a?null:$.range(o+n,a+n)}};ve.allowMultipleSelections=mh,ve.tabSize=D.define({combine:r=>r.length?r[0]:4}),ve.lineSeparator=Mm,ve.readOnly=Xm,ve.phrases=D.define({compare(r,e){let t=Object.keys(r),n=Object.keys(e);return t.length==n.length&&t.every(i=>r[i]==e[i])}}),ve.languageData=Lm,ve.changeFilter=Dm,ve.transactionFilter=zm,ve.transactionExtender=_m,Ti.reconfigure=se.define();rn=class{eq(e){return this==e}range(e,t=e){return Cr.create(e,t,this)}};rn.prototype.startSide=rn.prototype.endSide=0,rn.prototype.point=!1,rn.prototype.mapMode=Le.TrackDel;Cr=class r{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new r(e,t,n)}};Oh=class r{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let s=n?this.to:this.from;for(let o=i,a=s.length;;){if(o==a)return o;let l=o+a>>1,h=s[l]-e||(n?this.value[l].endSide:this.value[l].startSide)-t;if(l==o)return h>=0?o:a;h>=0?a=l:o=l+1}}between(e,t,n,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let n=[],i=[],s=[],o=-1,a=-1;for(let l=0;l<this.value.length;l++){let h,c,u=this.value[l],d=this.from[l]+e,p=this.to[l]+e;if(d==p){let f=t.mapPos(d,u.startSide,u.mapMode);if(f==null||(h=c=f,u.startSide!=u.endSide&&(c=t.mapPos(d,u.endSide),c<h)))continue}else if(h=t.mapPos(d,u.startSide),c=t.mapPos(p,u.endSide),h>c||h==c&&u.startSide>0&&u.endSide<=0)continue;(c-h||u.endSide-u.startSide)<0||(o<0&&(o=h),u.point&&(a=Math.max(a,c-h)),n.push(u),i.push(h-o),s.push(c-o))}return{mapped:n.length?new r(i,s,n,a):null,pos:o}}},Se=class r{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new r(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(Pl)),this.isEmpty)return t.length?r.of(t):this;let a=new xo(this,null,-1).goto(0),l=0,h=[],c=new Hn;for(;a.value||l<t.length;)if(l<t.length&&(a.from-t[l].from||a.startSide-t[l].value.startSide)>=0){let u=t[l++];c.addInner(u.from,u.to,u.value)||h.push(u)}else a.rangeIndex==1&&a.chunkIndex<this.chunk.length&&(l==t.length||this.chunkEnd(a.chunkIndex)<t[l].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||s<this.chunkPos[a.chunkIndex])&&c.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||s<a.from||o(a.from,a.to,a.value))&&(c.addInner(a.from,a.to,a.value)||h.push(Cr.create(a.from,a.to,a.value))),a.next());return c.finishInner(this.nextLayer.isEmpty&&!h.length?r.empty:this.nextLayer.update({add:h,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let o=0;o<this.chunk.length;o++){let a=this.chunkPos[o],l=this.chunk[o],h=e.touchesRange(a,a+l.length);if(h===!1)i=Math.max(i,l.maxPoint),t.push(l),n.push(e.mapPos(a));else if(h===!0){let{mapped:c,pos:u}=l.map(a,e);c&&(i=Math.max(i,c.maxPoint),t.push(c),n.push(u))}}let s=this.nextLayer.map(e);return t.length==0?s:new r(n,t,s||r.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return ki.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return ki.from(e).goto(t)}static compare(e,t,n,i,s=-1){let o=e.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),a=t.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),l=Tp(o,a,n),h=new Dn(o,l,s),c=new Dn(a,l,s);n.iterGaps((u,d,p)=>Pp(h,u,c,d,p,i)),n.empty&&n.length==0&&Pp(h,0,c,0,0,i)}static eq(e,t,n=0,i){i==null&&(i=999999999);let s=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let a=Tp(s,o),l=new Dn(s,a,0).goto(n),h=new Dn(o,a,0).goto(n);for(;;){if(l.to!=h.to||!bh(l.active,h.active)||l.point&&(!h.point||!l.point.eq(h.point)))return!1;if(l.to>i)return!0;l.next(),h.next()}}static spans(e,t,n,i,s=-1){let o=new Dn(e,null,s).goto(t),a=t,l=o.openStart;for(;;){let h=Math.min(o.to,n);if(o.point){let c=o.activeForPoint(o.to),u=o.pointFrom<t?c.length+1:o.point.startSide<0?c.length:Math.min(c.length,l);i.point(a,h,o.point,c,u,o.pointRank),l=Math.min(o.openEnd(h),c.length)}else h>a&&(i.span(a,h,o.active,l),l=o.openEnd(h));if(o.to>n)return l+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new Hn;for(let i of e instanceof Cr?[e]:t?(function(s){if(s.length>1)for(let o=s[0],a=1;a<s.length;a++){let l=s[a];if(Pl(o,l)>0)return s.slice().sort(Pl);o=l}return s})(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return r.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=r.empty;i=i.nextLayer)t=new r(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}};Se.empty=new Se([],[],null,-1),Se.empty.nextLayer=Se.empty;Hn=class r{finishChunk(e){this.chunks.push(new Oh(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new r)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Se.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Se.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};xo=class{constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},ki=class r{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&i.push(new xo(o,t,n,s));return i.length==1?i[0]:new r(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)kl(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)kl(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),kl(this.heap,0)}}};Dn=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=ki.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){_s(this.active,e),_s(this.activeTo,e),_s(this.activeRank,e),this.minActive=kp(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;Xs(this.active,t,n),Xs(this.activeTo,t,i),Xs(this.activeRank,t,s),e&&Xs(e,t,this.cursor.from),this.minActive=kp(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&_s(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let s=this.cursor.value;if(s.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let i=n.length-1;i>=0&&n[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};Cp=typeof Symbol>"u"?"__\u037C":Symbol.for("\u037C"),Sh=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Qp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},ln=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,a,l,h){let c=[],u=/^@(\w+)\b/.exec(o[0]),d=u&&u[1]=="keyframes";if(u&&a==null)return l.push(o[0]+";");for(let p in a){let f=a[p];if(/&/.test(p))s(p.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),f,l);else if(f&&typeof f=="object"){if(!u)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(i(p),f,c,d)}else f!=null&&c.push(p.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+f+";")}(c.length||d)&&l.push((!n||u||h?o:o.map(n)).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
8
+ `)}static newName(){let e=Qp[Cp]||1;return Qp[Cp]=e+1,"\u037C"+e.toString(36)}static mount(e,t,n){let i=e[Sh],s=n&&n.nonce;i?s&&i.setNonce(s):i=new yh(e,s),i.mount(Array.isArray(t)?t:[t])}},Rp=new Map,yh=class{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=Rp.get(n);if(s)return e.adoptedStyleSheets=[s.sheet,...e.adoptedStyleSheets],e[Sh]=s;this.sheet=new i.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Rp.set(n,this)}else{this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let s=e.head||e;s.insertBefore(this.styleTag,s.firstChild)}this.modules=[],e[Sh]=this}mount(e){let t=this.sheet,n=0,i=0;for(let s=0;s<e.length;s++){let o=e[s],a=this.modules.indexOf(o);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),a==-1){if(this.modules.splice(i++,0,o),t)for(let l=0;l<o.rules.length;l++)t.insertRule(o.rules[l],n++)}else{for(;i<a;)n+=this.modules[i++].rules.length;n+=o.rules.length,i++}}if(!t){let s="";for(let o=0;o<this.modules.length;o++)s+=this.modules[o].getRules()+`
9
+ `;this.styleTag.textContent=s}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};for(an={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Qr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Zm=typeof navigator<"u"&&/Mac/.test(navigator.platform),Bm=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ee=0;Ee<10;Ee++)an[48+Ee]=an[96+Ee]=String(Ee);for(Ee=1;Ee<=24;Ee++)an[Ee+111]="F"+Ee;for(Ee=65;Ee<=90;Ee++)an[Ee]=String.fromCharCode(Ee+32),Qr[Ee]=String.fromCharCode(Ee);for(Fs in an)Qr.hasOwnProperty(Fs)||(Qr[Fs]=an[Fs]);wh=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?hn(t):0),n,Math.min(e.focusOffset,n?hn(n):0))}set(e,t,n,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=i}},Or=null;Ue=class r{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new r(e.parentNode,Qi(e),t)}static after(e,t){return new r(e.parentNode,Qi(e)+1,t)}},jc=[],be=class r{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,i=this.dom,s=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=s?s.nextSibling:i.firstChild)){let a=r.get(n);(!a||!a.parent&&a.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=s?s.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&n!=o.dom&&(t.written=!0),o.dom.parentNode==i)for(;n&&n!=o.dom;)n=$p(n);else i.insertBefore(o.dom,n);s=o.dom}for(n=s?s.nextSibling:i.firstChild,n&&t&&t.node==i&&(t.written=!0);n;)n=$p(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let i=hn(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;i==0&&s.firstChild!=s.lastChild&&(i=e==s.firstChild?-1:1),e=s}n=i<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!r.get(n);)n=n.nextSibling;if(!n)return this.length;for(let i=0,s=0;;i++){let o=this.children[i];if(o.dom==n)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,t,n=0){let i=-1,s=-1,o=-1,a=-1;for(let l=0,h=n,c=n;l<this.children.length;l++){let u=this.children[l],d=h+u.length;if(h<e&&d>t)return u.domBoundsAround(e,t,h);if(d>=e&&i==-1&&(i=l,s=h),h>t&&u.dom.parentNode==this.dom){o=l,a=c;break}c=d,h=d+u.breakAfter}return{from:s,to:a<0?n+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=jc){this.markDirty();for(let i=e;i<t;i++){let s=this.children[i];s.parent==this&&n.indexOf(s)<0&&s.destroy()}this.children.splice(e,t-e,...n);for(let i=0;i<n.length;i++)n[i].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new vo(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,i,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!(8&(this.flags|e.flags))}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}};be.prototype.breakAfter=0;vo=class{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}};ht=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},vh=typeof document<"u"?document:{documentElement:{style:{}}},Th=/Edge\/(\d+)/.exec(ht.userAgent),Ym=/MSIE \d/.test(ht.userAgent),Ph=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ht.userAgent),Ho=!!(Ym||Ph||Th),Ip=!Ho&&/gecko\/(\d+)/i.test(ht.userAgent),Cl=!Ho&&/Chrome\/(\d+)/.exec(ht.userAgent),u1="webkitFontSmoothing"in vh.documentElement.style,qm=!Ho&&/Apple Computer/.test(ht.vendor),Np=qm&&(/Mobile\/\w+/.test(ht.userAgent)||ht.maxTouchPoints>2),z={mac:Np||/Mac/.test(ht.platform),windows:/Win/.test(ht.platform),linux:/Linux|X11/.test(ht.platform),ie:Ho,ie_version:Ym?vh.documentMode||6:Ph?+Ph[1]:Th?+Th[1]:0,gecko:Ip,gecko_version:Ip?+(/Firefox\/(\d+)/.exec(ht.userAgent)||[0,0])[1]:0,chrome:!!Cl,chrome_version:Cl?+Cl[1]:0,ios:Np,android:/Android\b/.test(ht.userAgent),safari:qm,webkit_version:u1?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:vh.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},Pn=class r extends be{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof r)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new r(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Ue(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return(function(n,i,s){let o=n.nodeValue.length;i>o&&(i=o);let a=i,l=i,h=0;i==0&&s<0||i==o&&s>=0?z.chrome||z.gecko||(i?(a--,h=1):l<o&&(l++,h=-1)):s<0?a--:l<o&&l++;let c=Un(n,a,l).getClientRects();if(!c.length)return null;let u=c[(h?h<0:s>=0)?0:c.length-1];return z.safari&&!h&&u.width==0&&(u=Array.prototype.find.call(c,d=>d.width)||u),h?Bc(u,h<0):u||null})(this.dom,e,t)}},kn=class r extends be{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let i of t)i.setParent(this)}setAttrs(e){if(Hm(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,i,s,o){return(!n||!(!(n instanceof r&&n.mark.eq(this.mark))||e&&s<=0||t<this.length&&o<=0))&&(Gm(this,e,t,n?n.children.slice():[],s-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,i=-1,s=0;for(let a of this.children){let l=n+a.length;l>e&&t.push(n<e?a.split(e-n):a),i<0&&n>=e&&(i=s),n=l,s++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new r(this.mark,t,o)}domAtPos(e){return Km(this,e)}coordsAt(e,t){return eg(this,e,t)}},To=class r extends be{static create(e,t,n){return new r(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=r.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,i,s,o){return!(n&&(!(n instanceof r&&this.widget.compare(n.widget))||e>0&&s<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof r&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return ie.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):ie.empty}domAtPos(e){return(this.length?e==0:this.side>0)?Ue.before(this.dom):Ue.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let i=this.dom.getClientRects(),s=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let a=o?i.length-1:0;s=i[a],!(e>0?a==0:a==i.length-1||s.top<s.bottom);a+=o?-1:1);return Bc(s,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}},Ri=class r extends be{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof r&&e.side==this.side}split(){return new r(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?Ue.before(this.dom):Ue.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return ie.empty}get isHidden(){return!0}};Pn.prototype.children=To.prototype.children=Ri.prototype.children=jc;Lp=Object.create(null);Ne=class r extends be{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,i,s,o){if(n){if(!(n instanceof r))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),Gm(this,e,t,n?n.children.slice():[],s,o),!0}split(e){let t=new r;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:i}=this.childPos(e);i&&(t.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let s=n;s<this.children.length;s++)t.append(this.children[s],0);for(;n>0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Vc(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Jm(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=kh(t,this.attrs||{})),n&&(this.attrs=kh({class:n},this.attrs||{}))}domAtPos(e){return Km(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(Hm(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Ch(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&be.get(i)instanceof kn;)i=i.lastChild;if(!(i&&this.length&&(i.nodeName=="BR"||((n=be.get(i))===null||n===void 0?void 0:n.isEditable)!=0||z.ios&&this.children.some(s=>s instanceof Pn)))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof Pn)||/[^ -~]/.test(n.text))return null;let i=Ci(n.dom);if(i.length!=1)return null;t+=i[0].width,e=i[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=eg(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:i}=this.parent.view.viewState,s=n.bottom-n.top;if(Math.abs(s-i.lineHeight)<2&&i.textHeight<s){let o=(s-i.textHeight)/2;return{top:n.top+o,bottom:n.bottom-o,left:n.left,right:n.left}}}return n}become(e){return!1}covers(){return!0}static find(e,t){for(let n=0,i=0;n<e.children.length;n++){let s=e.children[n],o=i+s.length;if(o>=t){if(s instanceof r)return s;if(o>t)break}i=o+s.breakAfter}return null}},Tr=class r extends be{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,i,s,o){return!(n&&(!(n instanceof r&&this.widget.compare(n.widget))||e>0&&s<=0||t<this.length&&o<=0))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?Ue.before(this.dom):Ue.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new r(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return jc}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):ie.empty}domBoundsAround(){return null}become(e){return e instanceof r&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){return this.widget.coordsAt(this.dom,e,t)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}},cn=class{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},We=(function(r){return r[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r})(We||(We={})),q=class extends rn{constructor(e,t,n,i){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Ai(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Cn(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,i=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:s,end:o}=tg(e,i);t=(s?i?-3e8:-1:5e8)-1,n=1+(o?i?2e8:1:-6e8)}return new Cn(e,t,n,i,e.widget||null,!0)}static line(e){return new Ei(e)}static set(e,t=!1){return Se.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}};q.none=Se.empty;Ai=class r extends q{constructor(e){let{start:t,end:n}=tg(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof r&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&Vc(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}};Ai.prototype.point=!1;Ei=class r extends q{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof r&&this.spec.class==e.spec.class&&Vc(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}};Ei.prototype.mapMode=Le.TrackBefore,Ei.prototype.point=!0;Cn=class r extends q{constructor(e,t,n,i,s,o){super(t,n,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Le.TrackBefore:Le.TrackAfter:Le.TrackDel}get type(){return this.startSide!=this.endSide?We.WidgetRange:this.startSide<=0?We.WidgetBefore:We.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof r&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}};Cn.prototype.point=!0;mi=class r{constructor(e,t,n,i){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Tr&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ne),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Zs(new Ri(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Tr||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:a}=this.cursor.next(this.skip);if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=s,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Zs(new Pn(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,t,n,i){this.buildText(t-e,n,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,n,i,s,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Cn){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof Cn)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Tr(n.widget||new Po("div"),a,n));else{let l=To.create(n.widget||new Po("span"),a,a?0:n.startSide),h=this.atCursorPos&&!l.isEditable&&s<=i.length&&(e<t||n.startSide>0),c=!l.isEditable&&(e<t||s>i.length||n.startSide<=0),u=this.getLine();this.pendingBuffer!=2||h||l.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),h&&(u.append(Zs(new Ri(1),i),s),s=i.length+Math.max(0,s-i.length)),u.append(Zs(l,i),s),this.atCursorPos=c,this.pendingBuffer=c?e<t||s>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,n,i,s){let o=new r(e,t,n,s);return o.openEnd=Se.spans(i,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};Po=class extends cn{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}},de=(function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r})(de||(de={})),Wn=de.LTR,Hc=de.RTL;p1=ng("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),f1=ng("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Rh=Object.create(null),_t=[];for(let r of["()","[]","{}"]){let e=r.charCodeAt(0),t=r.charCodeAt(1);Rh[e]=t,Rh[t]=-e}m1=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Ht=class{get dir(){return this.level%2?Hc:Wn}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,i){let s=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(s<0||(i!=0?i<0?a.from<t:a.to>t:e[s].level>a.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}};le=[];sg="";og=D.define(),ag=D.define(),lg=D.define(),hg=D.define(),$h=D.define(),cg=D.define(),ug=D.define(),dg=D.define({combine:r=>r.some(e=>e)}),b1=D.define({combine:r=>r.some(e=>e)}),gi=class r{constructor(e,t="nearest",n="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new r(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new r($.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Bs=se.define({map:(r,e)=>r.map(e)});Uo=D.define({combine:r=>!r.length||r[0]}),S1=0,ii=D.define(),Ge=class r{constructor(e,t,n,i,s){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=i,this.extension=s(this)}static define(e,t){let{eventHandlers:n,eventObservers:i,provide:s,decorations:o}=t||{};return new r(S1++,e,n,i,a=>{let l=[ii.of(a)];return o&&l.push($i.of(h=>{let c=h.plugin(a);return c?o(c):q.none})),s&&l.push(s(a)),l})}static fromClass(e,t){return r.define(n=>new e(n),t)}},Oi=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Et(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Et(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){Et(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}},pg=D.define(),Uc=D.define(),$i=D.define(),fg=D.define(),Wc=D.define(),mg=D.define();gg=D.define();si=D.define(),Ut=class r{constructor(e,t,n,i){this.fromA=e,this.toA=t,this.fromB=n,this.toB=i}join(e){return new r(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>n.toA)){if(i.toA<n.fromA)break;n=n.join(i),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let i=0,s=0,o=0,a=0;;i++){let l=i==e.length?null:e[i],h=o-a,c=l?l.fromB:1e9;for(;s<t.length&&t[s]<c;){let u=t[s],d=t[s+1],p=Math.max(a,u),f=Math.min(c,d);if(p<=f&&new r(p+h,f+h,p,f).addToSet(n),d>c)break;s+=2}if(!l)return n;new r(l.fromA,l.toA,l.fromB,l.toB).addToSet(n),o=l.toA,a=l.toB}}},Ii=class r{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=nt.empty(this.startState.doc.length);for(let s of n)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,a,l)=>i.push(new Ut(s,o,a,l))),this.changedRanges=i}static create(e,t,n){return new r(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},ko=class extends be{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ne],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ut(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:a,toA:l})=>l<this.minWidthFrom||a>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let i=-1;this.view.inputState.composing>=0&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:(function(a,l){let h=!1;return l&&a.iterChangedRanges((c,u)=>{c<l.to&&u>l.from&&(h=!0)}),h})(e.changes,this.hasComposition)||e.selectionSet||(i=e.state.selection.main.head));let s=i>-1?(function(a,l,h){let c=bg(a,h);if(!c)return null;let{node:u,from:d,to:p}=c,f=u.nodeValue;if(/[\n\r]/.test(f)||a.state.doc.sliceString(c.from,c.to)!=f)return null;let m=l.invertedDesc,g=new Ut(m.mapPos(d),m.mapPos(p),d,p),O=[];for(let b=u.parentNode;;b=b.parentNode){let S=be.get(b);if(S instanceof kn)O.push({node:b,deco:S.mark});else{if(S instanceof Ne||b.nodeName=="DIV"&&b.parentNode==a.contentDOM)return{range:g,text:u,marks:O,line:b};if(b==a.contentDOM)return null;O.push({node:b,deco:new Ai({inclusive:!0,attributes:d1(b),tagName:b.tagName.toLowerCase()})})}}})(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:a,to:l}=this.hasComposition;n=new Ut(a,l,e.changes.mapPos(a,-1),e.changes.mapPos(l,1)).addToSet(n.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(z.ie||z.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=(function(a,l,h){let c=new y1;return Se.compare(a,l,h,c),c.changes})(this.decorations,this.updateDeco(),e.changes);return n=Ut.extendWithRanges(n,o),!!(7&this.flags||n.length!=0)&&(this.updateInner(n,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=z.chrome||z.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||i.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof Tr&&o.widget instanceof Co&&s.push(o.dom);i.updateGaps(s)}updateChildren(e,t,n){let i=n?n.range.addToSet(e.slice()):e,s=this.childCursor(t);for(let o=i.length-1;;o--){let a=o>=0?i[o]:null;if(!a)break;let l,h,c,u,{fromA:d,toA:p,fromB:f,toB:m}=a;if(n&&n.range.fromB<m&&n.range.toB>f){let x=mi.build(this.view.state.doc,f,n.range.fromB,this.decorations,this.dynamicDecorationMap),y=mi.build(this.view.state.doc,n.range.toB,m,this.decorations,this.dynamicDecorationMap);h=x.breakAtStart,c=x.openStart,u=y.openEnd;let v=this.compositionView(n);y.breakAtStart?v.breakAfter=1:y.content.length&&v.merge(v.length,v.length,y.content[0],!1,y.openStart,0)&&(v.breakAfter=y.content[0].breakAfter,y.content.shift()),x.content.length&&v.merge(0,0,x.content[x.content.length-1],!0,0,x.openEnd)&&x.content.pop(),l=x.content.concat(v).concat(y.content)}else({content:l,breakAtStart:h,openStart:c,openEnd:u}=mi.build(this.view.state.doc,f,m,this.decorations,this.dynamicDecorationMap));let{i:g,off:O}=s.findPos(p,1),{i:b,off:S}=s.findPos(d,-1);Wm(this,b,S,g,O,l,h,c,u)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new Pn(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new kn(i,[t],t.length);let n=new Ne;return n.append(t,0),n}fixCompositionDOM(e){let t=(s,o)=>{o.flags|=8|(o.children.some(l=>7&l.flags)?1:0),this.markedForComposition.add(o);let a=be.get(s);a&&a!=o&&(a.dom=null),o.setDOM(s)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];t(e.line,i);for(let s=e.marks.length-1;s>=-1;s--)n=i.childPos(n.off,1),i=i.children[n.i],t(s>=0?e.marks[s].node:e.text,i)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,s=!i&&no(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||t||s))return;let o=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?l:this.moveToLine(this.domAtPos(a.head));if(z.gecko&&a.empty&&!this.hasComposition&&(c=l).node.nodeType==1&&c.node.firstChild&&(c.offset==0||c.node.childNodes[c.offset-1].contentEditable=="false")&&(c.offset==c.node.childNodes.length||c.node.childNodes[c.offset].contentEditable=="false")){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=h=new Ue(d,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&(fi(l.node,l.offset,u.anchorNode,u.anchorOffset)&&fi(h.node,h.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,a))||(this.view.observer.ignore(()=>{z.android&&z.chrome&&this.dom.contains(u.focusNode)&&(function(m,g){for(let O=m;O&&O!=g;O=O.assignedSlot||O.parentNode)if(O.nodeType==1&&O.contentEditable=="false")return!0;return!1})(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=wo(this.view.root);if(d)if(a.empty){if(z.gecko){let m=(p=l.node,f=l.offset,p.nodeType!=1?0:(f&&p.childNodes[f-1].contentEditable=="false"?1:0)|(f<p.childNodes.length&&p.childNodes[f].contentEditable=="false"?2:0));if(m&&m!=3){let g=Sg(l.node,l.offset,m==1?1:-1);g&&(l=new Ue(g.node,g.offset))}}d.collapse(l.node,l.offset),a.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=a.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(h.node,h.offset)}catch{}}else{let m=document.createRange();a.anchor>a.head&&([l,h]=[h,l]),m.setEnd(h.node,h.offset),m.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(m)}var p,f;s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(l,h)),this.impreciseAnchor=l.precise?null:new Ue(u.anchorNode,u.anchorOffset),this.impreciseHead=h.precise?null:new Ue(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&fi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=wo(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=Ne.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let l=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!l||!h||l.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(i,s)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let i=e.offset;!t&&i<n.childNodes.length;i++){let s=be.get(n.childNodes[i]);s instanceof Ne&&(t=s.domAtPos(0))}for(let i=e.offset-1;!t&&i>=0;i--){let s=be.get(n.childNodes[i]);s instanceof Ne&&(t=s.domAtPos(s.length))}return t?new Ue(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let n=be.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let i=this.children[t];if(n<i.length||i instanceof Ne)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,i=0;for(let s=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],l=s-a.breakAfter,h=l-a.length;if(l<e)break;h<=e&&(h<e||a.covers(-1))&&(l>e||a.covers(1))&&(!n||a instanceof Ne&&!(n instanceof Ne&&t>=0))&&(n=a,i=h),s=h}return n?n.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),i=this.children[t];if(!(i instanceof Ne))return null;for(;i.children.length;){let{i:a,off:l}=i.childPos(n,1);for(;;a++){if(a==i.children.length)return null;if((i=i.children[a]).length)break}n=l}if(!(i instanceof Pn))return null;let s=et(i.text,n);if(s==n)return null;let o=Un(i.dom,n,s).getClientRects();for(let a=0;a<o.length;a++){let l=o[a];if(a==o.length-1||l.top<l.bottom&&l.left<l.right)return l}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,l=this.view.textDirection==de.LTR;for(let h=0,c=0;c<this.children.length;c++){let u=this.children[c],d=h+u.length;if(d>i)break;if(h>=n){let p=u.dom.getBoundingClientRect();if(t.push(p.height),o){let f=u.dom.lastChild,m=f?Ci(f):[];if(m.length){let g=m[m.length-1],O=l?g.right-p.left:p.right-g.left;O>a&&(a=O,this.minWidth=s,this.minWidthFrom=h,this.minWidthTo=d)}}}h=d+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?de.RTL:de.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ne){let o=s.measureTextSize();if(o)return o}let e,t,n,i=document.createElement("div");return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(i);let s=Ci(i.firstChild)[0];e=i.getBoundingClientRect().height,t=s?s.width/27:7,n=s?s.height:e,i.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new vo(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.length;if(o>n){let a=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(q.replace({widget:new Co(a),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!s)break;n=s.to+1}return q.set(e)}updateDeco(){let e=this.view.state.facet($i).map((i,s)=>(this.dynamicDecorationMap[s]=typeof i=="function")?i(this.view):i),t=!1,n=this.view.state.facet(fg).map((i,s)=>{let o=typeof i=="function";return o&&(t=!0),o?i(this.view):i});n.length&&(this.dynamicDecorationMap[e.length]=t,e.push(Se.join(n)));for(let i=e.length;i<e.length+3;i++)this.dynamicDecorationMap[i]=!1;return this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=h.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}let t,{range:n}=e,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!i)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,t.left),top:Math.min(i.top,t.top),right:Math.max(i.right,t.right),bottom:Math.max(i.bottom,t.bottom)});let s=Og(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:a,offsetHeight:l}=this.view.scrollDOM;(function(h,c,u,d,p,f,m,g){let O=h.ownerDocument,b=O.defaultView||window;for(let S=h,x=!1;S&&!x;)if(S.nodeType==1){let y,v=S==O.body,T=1,C=1;if(v)y=c1(b);else{if(/^(fixed|sticky)$/.test(getComputedStyle(S).position)&&(x=!0),S.scrollHeight<=S.clientHeight&&S.scrollWidth<=S.clientWidth){S=S.assignedSlot||S.parentNode;continue}let R=S.getBoundingClientRect();({scaleX:T,scaleY:C}=jm(S,R)),y={left:R.left,right:R.left+S.clientWidth*T,top:R.top,bottom:R.top+S.clientHeight*C}}let k=0,Q=0;if(p=="nearest")c.top<y.top?(Q=-(y.top-c.top+m),u>0&&c.bottom>y.bottom+Q&&(Q=c.bottom-y.bottom+Q+m)):c.bottom>y.bottom&&(Q=c.bottom-y.bottom+m,u<0&&c.top-Q<y.top&&(Q=-(y.top+Q-c.top+m)));else{let R=c.bottom-c.top,Z=y.bottom-y.top;Q=(p=="center"&&R<=Z?c.top+R/2-Z/2:p=="start"||p=="center"&&u<0?c.top-m:c.bottom-Z+m)-y.top}if(d=="nearest"?c.left<y.left?(k=-(y.left-c.left+f),u>0&&c.right>y.right+k&&(k=c.right-y.right+k+f)):c.right>y.right&&(k=c.right-y.right+f,u<0&&c.left<y.left+k&&(k=-(y.left+k-c.left+f))):k=(d=="center"?c.left+(c.right-c.left)/2-(y.right-y.left)/2:d=="start"==g?c.left-f:c.right-(y.right-y.left)+f)-y.left,k||Q)if(v)b.scrollBy(k,Q);else{let R=0,Z=0;if(Q){let M=S.scrollTop;S.scrollTop+=Q/C,Z=(S.scrollTop-M)*C}if(k){let M=S.scrollLeft;S.scrollLeft+=k/T,R=(S.scrollLeft-M)*T}c={left:c.left-R,top:c.top-Z,right:c.right-R,bottom:c.bottom-Z},R&&Math.abs(R-k)<1&&(d="nearest"),Z&&Math.abs(Z-Q)<1&&(p="nearest")}if(v)break;S=S.assignedSlot||S.parentNode}else{if(S.nodeType!=11)break;S=S.host}})(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,l),-l),this.view.textDirection==de.LTR)}},Co=class extends cn{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}};y1=class{constructor(){this.changes=[]}compareRange(r,e){Qh(r,e,this.changes)}comparePoint(r,e){Qh(r,e,this.changes)}};Lh=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,z.safari&&e.contentDOM.addEventListener("input",()=>null),z.gecko&&(function(t){ef.has(t)||(ef.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))})(e.contentDOM.ownerDocument)}handleEvent(e){(function(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(let i,s=n.target;s!=t.contentDOM;s=s.parentNode)if(!s||s.nodeType==11||(i=be.get(s))&&i.ignoreEvent(n))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let i of n.observers)i(this.view,t);for(let i of n.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=v1(e),n=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,a=n[s];a&&o!=!a.handlers.length&&(i.removeEventListener(s,this.handleEvent),a=null),a||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in n)s=="scroll"||t[s]||i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(e.keyCode!=27&&xg.indexOf(e.keyCode)<0&&(this.view.inputState.lastEscPress=0),z.android&&z.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!z.ios||e.synthetic||e.altKey||e.metaKey||!((t=yg.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||T1.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(e.keyCode!=229&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,vr(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(z.safari&&!z.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};yg=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],T1="dthko",xg=[16,17,18,20,91,92,224,225];Mh=class{constructor(e,t,n,i){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=(function(o){let a=o.ownerDocument;for(let l=o.parentNode;l&&l!=a.body;)if(l.nodeType==1){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(l.nodeType!=11)break;l=l.host}return null})(e.contentDOM),this.atoms=e.state.facet(Wc).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ve.allowMultipleSelections)&&(function(o,a){let l=o.state.facet(og);return l.length?l[0](a):z.mac?a.metaKey:a.ctrlKey})(e,t),this.dragging=!(!(function(o,a){let{main:l}=o.state.selection;if(l.empty)return!1;let h=wo(o.root);if(!h||h.rangeCount==0)return!0;let c=h.getRangeAt(0).getClientRects();for(let u=0;u<c.length;u++){let d=c[u];if(d.left<=a.clientX&&d.right>=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1})(e,t)||Tg(t)!=1)&&null}start(e){this.dragging===!1&&this.select(e)}move(e){var t,n,i;if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&(n=this.startEvent,i=e,Math.max(Math.abs(n.clientX-i.clientX),Math.abs(n.clientY-i.clientY))<10))return;this.select(this.lastEvent=e);let s=0,o=0,a=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},l=Og(this.view);e.clientX-l.left<=a.left+6?s=-js(a.left-e.clientX):e.clientX+l.right>=a.right-6&&(s=js(e.clientX-a.right)),e.clientY-l.top<=a.top+6?o=-js(a.top-e.clientY):e.clientY+l.bottom>=a.bottom-6&&(o=js(e.clientY-a.bottom)),this.setScrollSpeed(s,o)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let i=e.ranges[n],s=null;if(i.empty){let o=ro(this.atoms,i.from,0);o!=i.from&&(s=$.cursor(o,-1))}else{let o=ro(this.atoms,i.from,-1),a=ro(this.atoms,i.to,1);o==i.from&&a==i.to||(s=$.range(i.from==i.anchor?o:a,i.from==i.head?o:a))}s&&(t||(t=e.ranges.slice()),t[n]=s)}return t?$.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));!this.mustSelect&&n.eq(t.state.selection,this.dragging===!1)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}},Rt=Object.create(null),Qt=Object.create(null),wg=z.ie&&z.ie_version<15||z.ios&&z.webkit_version<604;Qt.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft},Rt.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&(r.inputState.lastEscPress=Date.now()),!1),Qt.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")},Qt.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")},Rt.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of r.state.facet(lg))if(t=n(r,e),t)break;if(t||e.button!=0||(t=(function(n,i){let s=Wp(n,i),o=Tg(i),a=n.state.selection;return{update(l){l.docChanged&&(s.pos=l.changes.mapPos(s.pos),a=a.map(l.changes))},get(l,h,c){let u,d=Wp(n,l),p=Hp(n,d.pos,d.bias,o);if(s.pos!=d.pos&&!h){let f=Hp(n,s.pos,s.bias,o),m=Math.min(f.from,p.from),g=Math.max(f.to,p.to);p=m<p.from?$.range(m,g):$.range(g,m)}return h?a.replaceRange(a.main.extend(p.from,p.to)):c&&o==1&&a.ranges.length>1&&(u=(function(f,m){for(let g=0;g<f.ranges.length;g++){let{from:O,to:b}=f.ranges[g];if(O<=m&&b>=m)return $.create(f.ranges.slice(0,g).concat(f.ranges.slice(g+1)),f.mainIndex==g?0:f.mainIndex-(f.mainIndex>g?1:0))}return null})(a,d.pos))?u:c?a.addRange(p):$.create([p])}}})(r,e)),t){let n=!r.hasFocus;r.inputState.startMouseSelection(new Mh(r,e,t,n)),n&&r.observer.ignore(()=>Vm(r.contentDOM));let i=r.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};vg=(r,e)=>r>=e.top&&r<=e.bottom,Up=(r,e,t)=>vg(e,t)&&r>=t.left&&r<=t.right;k1=z.ie&&z.ie_version<=11,Gp=null,Yp=0,qp=0;Rt.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let i=r.docView.nearest(e.target);if(i&&i.isWidget){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=$.range(s,o))}}let{inputState:n}=r;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",r.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove"),!1},Rt.dragend=r=>(r.inputState.draggedContent=null,!1),Rt.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),i=0,s=()=>{++i==t.length&&Kp(r,e,n.filter(o=>o!=null).join(r.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let a=new FileReader;a.onerror=s,a.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(a.result)||(n[o]=a.result),s()},a.readAsText(t[o])}return!0}{let n=e.dataTransfer.getData("Text");if(n)return Kp(r,e,n,!0),!0}return!1},Rt.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=wg?null:e.clipboardData;return t?(Vp(r,t.getData("text/plain")||t.getData("text/uri-text")),!0):((function(n){let i=n.dom.parentNode;if(!i)return;let s=i.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px",s.focus(),setTimeout(()=>{n.focus(),s.remove(),Vp(n,s.value)},50)})(r),!1)};Dh=null;Rt.copy=Rt.cut=(r,e)=>{let{text:t,ranges:n,linewise:i}=(function(o){let a=[],l=[],h=!1;for(let c of o.selection.ranges)c.empty||(a.push(o.sliceDoc(c.from,c.to)),l.push(c));if(!a.length){let c=-1;for(let{from:u}of o.selection.ranges){let d=o.doc.lineAt(u);d.number>c&&(a.push(d.text),l.push({from:d.from,to:Math.min(o.doc.length,d.to+1)})),c=d.number}h=!0}return{text:a.join(o.lineBreak),ranges:l,linewise:h}})(r.state);if(!t&&!i)return!1;Dh=i?t:null,e.type!="cut"||r.state.readOnly||r.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let s=wg?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):((function(o,a){let l=o.dom.parentNode;if(!l)return;let h=l.appendChild(document.createElement("textarea"));h.style.cssText="position: fixed; left: -10000px; top: 10px",h.value=a,h.focus(),h.selectionEnd=a.length,h.selectionStart=0,setTimeout(()=>{h.remove(),o.focus()},50)})(r,t),!1)};Pg=St.define();Qt.focus=r=>{r.inputState.lastFocusTime=Date.now(),r.scrollDOM.scrollTop||!r.inputState.lastScrollTop&&!r.inputState.lastScrollLeft||(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),Jp(r)},Qt.blur=r=>{r.observer.clearSelectionRange(),Jp(r)},Qt.compositionstart=Qt.compositionupdate=r=>{r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0)},Qt.compositionend=r=>{r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,z.chrome&&z.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50)},Qt.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()},Rt.beforeinput=(r,e)=>{var t;let n;if(z.chrome&&z.android&&(n=yg.find(i=>i.inputType==e.inputType))&&(r.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let i=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>i+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return!1};ef=new Set,tf=["pre-wrap","normal","pre-line","break-spaces"],zh=class{constructor(e){this.lineWrapping=e,this.doc=ie.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return tf.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];i<0?n++:this.heightSamples[Math.floor(10*i)]||(t=!0,this.heightSamples[Math.floor(10*i)]=!0)}return t}refresh(e,t,n,i,s,o){let a=tf.indexOf(e)>-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=i,this.lineLength=s,l){this.heightSamples={};for(let h=0;h<o.length;h++){let c=o[h];c<0?h++:this.heightSamples[Math.floor(10*c)]=!0}}return l}},_h=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Vt=class r{constructor(e,t,n,i,s){this.from=e,this.length=t,this.top=n,this.height=i,this._content=s}get type(){return typeof this._content=="number"?We.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Cn?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new r(this.from,this.length+e.length,this.top,this.height+e.height,t)}},me=(function(r){return r[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight",r})(me||(me={})),io=.001,dt=class r{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>io&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return r.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,i){let s=this,o=n.doc;for(let a=i.length-1;a>=0;a--){let{fromA:l,toA:h,fromB:c,toB:u}=i[a],d=s.lineAt(l,me.ByPosNoHeight,n.setDoc(t),0,0),p=d.to>=h?d:s.lineAt(h,me.ByPosNoHeight,n,0,0);for(u+=p.to-h,h=p.to;a>0&&d.from<=i[a-1].toA;)l=i[a-1].fromA,c=i[a-1].fromB,a--,l<d.from&&(d=s.lineAt(l,me.ByPosNoHeight,n,0,0));c+=d.from-l,l=d.from;let f=Fh.build(n.setDoc(o),e,c,u);s=s.replace(l,h,f)}return s.updateHeight(n,0)}static empty(){return new gt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,i=0,s=0;for(;;)if(t==n)if(i>2*s){let a=e[t-1];a.break?e.splice(--t,1,a.left,null,a.right):e.splice(--t,1,a.left,a.right),n+=1+a.break,i-=a.size}else{if(!(s>2*i))break;{let a=e[n];a.break?e.splice(n,1,a.left,null,a.right):e.splice(n,1,a.left,a.right),n+=2+a.break,s-=a.size}}else if(i<s){let a=e[t++];a&&(i+=a.size)}else{let a=e[--n];a&&(s+=a.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,n++),new Xh(r.of(e.slice(0,t)),o,r.of(e.slice(n)))}};dt.prototype.size=1;Qo=class extends dt{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,i){return new Vt(i,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,i,s){return this.blockAt(0,n,i,s)}forEachLine(e,t,n,i,s,o){e<=s+this.length&&t>=s&&o(this.blockAt(0,n,i,s))}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(e,i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},gt=class r extends Qo{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,i){return new Vt(i,this.length,n,this.height,this.breaks)}replace(e,t,n){let i=n[0];return n.length==1&&(i instanceof r||i instanceof xn&&4&i.flags)&&Math.abs(this.length-i.length)<10?(i instanceof xn?i=new r(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):dt.of(n)}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more?this.setHeight(e,i.heights[i.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},xn=class r extends dt{constructor(e){super(e,0)}heightMetrics(e,t){let n,i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,o=s-i+1,a=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);n=l/o,this.length>o+1&&(a=(this.height-l)/(this.length-o-1))}else n=this.height/o;return{firstLine:i,lastLine:s,perLine:n,perChar:a}}blockAt(e,t,n,i){let{firstLine:s,lastLine:o,perLine:a,perChar:l}=this.heightMetrics(t,i);if(t.lineWrapping){let h=i+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),c=t.doc.lineAt(h),u=a+c.length*l,d=Math.max(n,e-u/2);return new Vt(c.from,c.length,d,u,0)}{let h=Math.max(0,Math.min(o-s,Math.floor((e-n)/a))),{from:c,length:u}=t.doc.line(s+h);return new Vt(c,u,n+a*h,a,0)}}lineAt(e,t,n,i,s){if(t==me.ByHeight)return this.blockAt(e,n,i,s);if(t==me.ByPosNoHeight){let{from:p,to:f}=n.doc.lineAt(e);return new Vt(p,f-p,0,0,0)}let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(n,s),h=n.doc.lineAt(e),c=a+h.length*l,u=h.number-o,d=i+a*u+l*(h.from-s-u);return new Vt(h.from,h.length,Math.max(i,Math.min(d,i+this.height-c)),c,0)}forEachLine(e,t,n,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:a,perLine:l,perChar:h}=this.heightMetrics(n,s);for(let c=e,u=i;c<=t;){let d=n.doc.lineAt(c);if(c==e){let f=d.number-a;u+=l*f+h*(e-s-f)}let p=l+h*d.length;o(new Vt(d.from,d.length,u,p,0)),u+=p,c=d.to+1}}replace(e,t,n){let i=this.length-t;if(i>0){let s=n[n.length-1];s instanceof r?n[n.length-1]=new r(s.length+i):n.push(null,new r(i-1))}if(e>0){let s=n[0];s instanceof r?n[0]=new r(e+s.length):n.unshift(new r(e-1),null)}return dt.of(n)}decomposeLeft(e,t){t.push(new r(e-1),null)}decomposeRight(e,t){t.push(null,new r(this.length-e-1))}updateHeight(e,t=0,n=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],a=Math.max(t,i.from),l=-1;for(i.from>t&&o.push(new r(i.from-t-1).updateHeight(e,t));a<=s&&i.more;){let c=e.doc.lineAt(a).length;o.length&&o.push(null);let u=i.heights[i.index++];l==-1?l=u:Math.abs(u-l)>=io&&(l=-2);let d=new gt(c,u);d.outdated=!1,o.push(d),a+=c+1}a<=s&&o.push(null,new r(s-a).updateHeight(e,a));let h=dt.of(o);return(l<0||Math.abs(h.height-this.height)>=io||Math.abs(l-this.heightMetrics(e,t).perLine)>=io)&&(e.heightChanged=!0),h}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},Xh=class extends dt{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,i){let s=n+this.left.height;return e<s?this.left.blockAt(e,t,n,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,n,i,s){let o=i+this.left.height,a=s+this.left.length+this.break,l=t==me.ByHeight?e<o:e<a,h=l?this.left.lineAt(e,t,n,i,s):this.right.lineAt(e,t,n,o,a);if(this.break||(l?h.to<a:h.from>a))return h;let c=t==me.ByPosNoHeight?me.ByPosNoHeight:me.ByPos;return l?h.join(this.right.lineAt(a,c,n,o,a)):this.left.lineAt(a,c,n,i,s).join(h)}forEachLine(e,t,n,i,s,o){let a=i+this.left.height,l=s+this.left.length+this.break;if(this.break)e<l&&this.left.forEachLine(e,t,n,i,s,o),t>=l&&this.right.forEachLine(e,t,n,a,l,o);else{let h=this.lineAt(l,me.ByPos,n,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,n,i,s,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,n,a,l,o)}}replace(e,t,n){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,n));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let a of n)s.push(a);if(e>0&&nf(s,o-1),t<this.length){let a=s.length;this.decomposeRight(t,s),nf(s,a)}return dt.of(s)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?dt.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,i){let{left:s,right:o}=this,a=t+s.length+this.break,l=null;return i&&i.from<=t+s.length&&i.more?l=s=s.updateHeight(e,t,n,i):s.updateHeight(e,t,n),i&&i.from<=a+o.length&&i.more?l=o=o.updateHeight(e,a,n,i):o.updateHeight(e,a,n),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};Fh=class r{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof gt?i.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new gt(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,s=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new Qo(o,i,n)):(o||s||i>=5)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new gt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new xn(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof gt)return e;let t=new gt(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof gt||this.isCovered?(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new gt(0,-1));let n=e;for(let i of this.nodes)i instanceof gt&&i.updateHeight(this.oracle,n),n+=i?i.length:1;return this.nodes}static build(e,t,n,i){let s=new r(n,e);return Se.spans(t,n,i,s,0),s.finish(n)}},Zh=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,i){(e<t||n&&n.heightRelevant||i&&i.heightRelevant)&&Qh(e,t,this.changes,5)}};bi=class{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],s=t[n];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return q.replace({widget:new Bh(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},Bh=class extends cn{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}},Ro=class{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!0,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=rf,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=de.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Uc).some(n=>typeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new zh(t),this.stateDeco=e.facet($i).filter(n=>typeof n!="function"),this.heightMap=dt.empty().applyChanges(this.stateDeco,ie.empty,this.heightOracle.setDoc(e.doc),[new Ut(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=q.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let i=n?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new br(s,o))}}this.viewports=e.sort((n,i)=>n.from-i.from),this.scaler=this.heightMap.height<=7e6?rf:new jh(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:oi(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet($i).filter(c=>typeof c!="function");let i=e.changedRanges,s=Ut.extendWithRanges(i,(function(c,u,d){let p=new Zh;return Se.compare(c,u,d,p,0),p.changes})(n,this.stateDeco,e?e.changes:nt.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=o&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let h=!e.changes.empty||2&e.flags||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),h&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(b1)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),i=this.heightOracle,s=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?de.RTL:de.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=t.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let h=0,c=0;if(a.width&&a.height){let{scaleX:x,scaleY:y}=jm(t,a);this.scaleX==x&&this.scaleY==y||(this.scaleX=x,this.scaleY=y,h|=8,o=l=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,h|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=Um(e.scrollDOM);let f=(this.printing?Q1:C1)(t,this.paddingTop),m=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView&&(this.inView=O,O&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let b=a.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,h|=8),l){let x=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(x)&&(o=!0),o||i.lineWrapping&&Math.abs(b-this.contentDOMWidth)>i.charWidth){let{lineHeight:y,charWidth:v,textHeight:T}=e.docView.measureTextSize();o=y>0&&i.refresh(s,y,v,T,b/v,x),o&&(e.docView.minWidth=0,h|=8)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),i.heightChanged=!1;for(let y of this.viewports){let v=y.from==this.viewport.from?x:e.docView.measureVisibleLineHeights(y);this.heightMap=(o?dt.empty().applyChanges(this.stateDeco,ie.empty,this.heightOracle,[new Ut(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new _h(y.from,v))}i.heightChanged&&(h|=2)}let S=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return S&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&h||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,l=new br(i.lineAt(o-1e3*n,me.ByHeight,s,0,0).from,i.lineAt(a+1e3*(1-n),me.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(h<l.from||h>l.to){let c,u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(h,me.ByPos,s,0,0);c=t.y=="center"?(d.top+d.bottom)/2-u/2:t.y=="start"||t.y=="nearest"&&h<l.from?d.top:d.bottom-u,l=new br(i.lineAt(c-500,me.ByHeight,s,0,0).from,i.lineAt(c+u+500,me.ByHeight,s,0,0).to)}}return l}mapViewport(e,t){let n=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new br(this.heightMap.lineAt(n,me.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,me.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,me.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,me.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(e==0||i<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||s>=a+Math.max(10,Math.min(n,250)))&&i>o-2e3&&s<a+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let i of e)t.touchesRange(i.from,i.to)||n.push(new bi(t.mapPos(i.from),t.mapPos(i.to),i.size));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=de.LTR&&!n)return[];let a=[],l=(h,c,u,d)=>{if(c-h<s)return;let p=this.state.selection.main,f=[p.from];p.empty||f.push(p.to);for(let g of f)if(g>h&&g<c)return l(h,g-10,u,d),void l(g+10,c,u,d);let m=(function(g,O){for(let b of g)if(O(b))return b})(e,g=>g.from>=u.from&&g.to<=u.to&&Math.abs(g.from-h)<s&&Math.abs(g.to-c)<s&&!f.some(O=>g.from<O&&g.to>O));if(!m){if(c<u.to&&t&&n&&t.visibleRanges.some(g=>g.from<=c&&g.to>=c)){let g=t.moveToLineBoundary($.cursor(c),!1,!0).head;g>h&&(c=g)}m=new bi(h,c,this.gapSize(u,h,c,d))}a.push(m)};for(let h of this.viewportLines){if(h.length<o)continue;let c=R1(h.from,h.to,this.stateDeco);if(c.total<o)continue;let u,d,p=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let f,m,g=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(p!=null){let O=Hs(c,p),b=((this.visibleBottom-this.visibleTop)/2+g)/h.height;f=O-b,m=O+b}else f=(this.visibleTop-h.top-g)/h.height,m=(this.visibleBottom-h.top+g)/h.height;u=Vs(c,f),d=Vs(c,m)}else{let f,m,g=c.total*this.heightOracle.charWidth,O=i*this.heightOracle.charWidth;if(p!=null){let b=Hs(c,p),S=((this.pixelViewport.right-this.pixelViewport.left)/2+O)/g;f=b-S,m=b+S}else f=(this.pixelViewport.left-O)/g,m=(this.pixelViewport.right+O)/g;u=Vs(c,f),d=Vs(c,m)}u>h.from&&l(h.from,u,h,c),d<h.to&&l(d,h.to,h,c)}return a}gapSize(e,t,n,i){let s=Hs(i,n)-Hs(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){bi.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=q.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Se.spans(e,this.viewport.from,this.viewport.to,{span(i,s){t.push({from:i,to:s})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,s)=>i.from!=t[s].from||i.to!=t[s].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||oi(this.heightMap.lineAt(e,me.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return oi(this.heightMap.lineAt(this.scaler.fromDOM(e),me.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return oi(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},br=class{constructor(e,t){this.from=e,this.to=t}};rf={toDOM:r=>r,fromDOM:r=>r,scale:1},jh=class{constructor(e,t,n){let i=0,s=0,o=0;this.viewports=n.map(({from:a,to:l})=>{let h=t.lineAt(a,me.ByPos,e,0,0).top,c=t.lineAt(l,me.ByPos,e,0,0).bottom;return i+=c-h,{from:a,to:l,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let a of this.viewports)a.domTop=o+(a.top-s)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),s=a.bottom}toDOM(e){for(let t=0,n=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-n)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);n=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,n=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return n+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);n=s.bottom,i=s.domBottom}}};Us=D.define({combine:r=>r.join(" ")}),Vh=D.define({combine:r=>r.indexOf(!0)>-1}),Hh=ln.newName(),Cg=ln.newName(),Qg=ln.newName(),Rg={"&light":"."+Cg,"&dark":"."+Qg};A1=Uh("."+Hh,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Rg),ai="\uFFFF",Wh=class{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ve.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=ai}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let i=e;;){this.findPointBefore(n,i);let s=this.text.length;this.readNode(i);let o=i.nextSibling;if(o==t)break;let a=be.get(i),l=be.get(o);(a&&l?a.breakAfter:(a?a.breakAfter:sf(i))||sf(o)&&(i.nodeName!="BR"||i.cmIgnore)&&this.text.length>s)&&this.lineBreak(),i=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s,o=-1,a=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(s=i.exec(t))&&(o=s.index,a=s[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);n=o+a}}readNode(e){if(e.cmIgnore)return;let t=be.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let i=n.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(E1(e,n.node,n.offset)?t:0))}};Ao=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},Gh=class{constructor(e,t,n,i){this.typeOver=i,this.bounds=null,this.text="";let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let a=s||o?[]:(function(h){let c=[];if(h.root.activeElement!=h.contentDOM)return c;let{anchorNode:u,anchorOffset:d,focusNode:p,focusOffset:f}=h.observer.selectionRange;return u&&(c.push(new Ao(u,d)),p==u&&f==d||c.push(new Ao(p,f))),c})(e),l=new Wh(a,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=(function(h,c){if(h.length==0)return null;let u=h[0].pos,d=h.length==2?h[1].pos:u;return u>-1&&d>-1?$.single(u+c,d+c):null})(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=s&&s.node==a.focusNode&&s.offset==a.focusOffset||!xh(e.contentDOM,a.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),h=o&&o.node==a.anchorNode&&o.offset==a.anchorOffset||!xh(e.contentDOM,a.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),c=e.viewport;if(z.ios&&e.state.selection.main.empty&&l!=h&&(c.from>0||c.to<e.state.doc.length)){let u=c.from-Math.min(l,h),d=c.to-Math.max(l,h);u!=0&&u!=1||d!=0&&d!=-1||(l=0,h=e.state.doc.length)}this.newSel=$.single(h,l)}}};$1={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Al=z.ie&&z.ie_version<=11,Yh=class{constructor(e){this.view=e,this.active=!1,this.selectionRange=new wh,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(z.ie&&z.ie_version<=11||z.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),Al&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(Uo)?n.root.activeElement!=this.dom:!no(n.dom,i))return;let s=i.anchorNode&&n.docView.nearest(i.anchorNode);s&&s.ignoreEvent(e)?t||(this.selectionChanged=!1):(z.ie&&z.ie_version<=11||z.android&&z.chrome)&&!n.state.selection.main.empty&&i.focusNode&&fi(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=z.safari&&e.root.nodeType==11&&(function(i){let s=i.activeElement;for(;s&&s.shadowRoot;)s=s.shadowRoot.activeElement;return s})(this.dom.ownerDocument)==this.dom&&(function(i){let s=null;function o(d){d.preventDefault(),d.stopImmediatePropagation(),s=d.getTargetRanges()[0]}if(i.contentDOM.addEventListener("beforeinput",o,!0),i.dom.ownerDocument.execCommand("indent"),i.contentDOM.removeEventListener("beforeinput",o,!0),!s)return null;let a=s.startContainer,l=s.startOffset,h=s.endContainer,c=s.endOffset,u=i.docView.domAtPos(i.state.selection.main.anchor);return fi(u.node,u.offset,h,c)&&([a,l,h,c]=[h,c,a,l]),{anchorNode:a,anchorOffset:l,focusNode:h,focusOffset:c}})(this.view)||wo(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=no(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&(function(i,s){let o=s.focusNode,a=s.focusOffset;if(!o||s.anchorNode!=o||s.anchorOffset!=a)return!1;for(a=Math.min(a,hn(o));;)if(a){if(o.nodeType!=1)return!1;let l=o.childNodes[a-1];l.contentEditable=="false"?a--:(o=l,a=hn(o))}else{if(o==i)return!0;a=Qi(o),o=o.parentNode}})(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(n.nodeType!=11)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,$1),Al&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Al&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&vr(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}this.delayedAndroidKey&&e!="Enter"||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((n=this.delayedAndroidKey)===null||n===void 0)&&n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:i}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),i=this.selectionChanged&&no(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Gh(this.view,e,t,n);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,i=Ag(this.view,t);return this.view.state==n&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=of(t,e.previousSibling||e.target.previousSibling,-1),i=of(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}};V=class r{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(n=>n.forEach(i=>t(i,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||(function(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null})(e.parent)||document,this.viewState=new Ro(e.state||ve.create(e)),e.scrollTo&&e.scrollTo.is(Bs)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ii).map(n=>new Oi(n));for(let n of this.plugins)n.update(this);this.observer=new Yh(this),this.inputState=new Lh(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ko(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...e){let t=e.length==1&&e[0]instanceof $e?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,i=!1,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed)return void(this.viewState.state=s);let o=this.hasFocus,a=0,l=null;e.some(d=>d.annotation(Pg))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=kg(s,o),l||(a=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(c=null)):this.observer.clear(),s.facet(ve.phrases)!=this.state.facet(ve.phrases))return this.setState(s);t=Ii.create(this,s,e),t.flags|=a;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(u&&(u=u.map(d.changes)),d.scrollIntoView){let{main:p}=d.state.selection;u=new gi(p.empty?p:$.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of d.effects)p.is(Bs)&&(u=p.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=Eo.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(si)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(Us)!=t.state.facet(Us)&&(this.viewState.mustMeasureContent=!0),(n||i||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let d of this.state.facet($h))try{d(t)}catch(p){Et(this.state,p,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!Ag(this,c)&&h.force&&vr(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new Ro(e),this.plugins=e.facet(ii).map(n=>new Oi(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new ko(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(ii),n=e.state.facet(ii);if(t!=n){let i=[];for(let s of n){let o=t.indexOf(s);if(o<0)i.push(new Oi(s));else{let a=this.plugins[o];a.mustUpdate=e,i.push(a)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(o<0)if(Um(n))s=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(i);s=p.from,o=p.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];4&l||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(p=>{try{return p.read(this)}catch(f){return Et(this.state,f),af}}),u=Ii.create(this,this.state,[]),d=!1;u.flags|=l,t?t.flags|=l:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u));for(let p=0;p<h.length;p++)if(c[p]!=af)try{let f=h[p];f.write&&f.write(c[p],this)}catch(f){Et(this.state,f)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let p=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(p>1||p<-1){i+=p,n.scrollTop=i/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet($h))a(t)}get themeClasses(){return Hh+" "+(this.state.facet(Vh)?Qg:Cg)+" "+this.state.facet(Us)}updateAttrs(){let e=lf(this,pg,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Uo)?"true":"false",class:"cm-content",style:`${z.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),lf(this,Uc,t);let n=this.observer.ignore(()=>{let i=Ch(this.contentDOM,this.contentAttrs,t),s=Ch(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let i of n.effects)i.is(r.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=i.value)}mountStyles(){this.styleModules=this.state.facet(si);let e=this.state.facet(r.cspNonce);ln.mount(this.root,this.styleModules.concat(A1).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e)}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(n=>n.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Rl(this,e,Bp(this,e,t,n))}moveByGroup(e,t){return Rl(this,e,Bp(this,e,t,n=>(function(i,s,o){let a=i.state.charCategorizer(s),l=a(o);return h=>{let c=a(h);return l==Xe.Space&&(l=c),l==c}})(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=n[t?n.length-1:0];return $.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,n=!0){return(function(i,s,o,a){let l=Nh(i,s.head),h=a&&l.type==We.Text&&(i.lineWrapping||l.widgetLineBreaks)?i.coordsAtPos(s.assoc<0&&s.head>l.from?s.head-1:s.head):null;if(h){let c=i.dom.getBoundingClientRect(),u=i.textDirectionAt(l.from),d=i.posAtCoords({x:o==(u==de.LTR)?c.right-1:c.left+1,y:(h.top+h.bottom)/2});if(d!=null)return $.cursor(d,o?-1:1)}return $.cursor(o?l.to:l.from,o?-1:1)})(this,e,t,n)}moveVertically(e,t,n){return Rl(this,e,(function(i,s,o,a){let l=s.head,h=o?1:-1;if(l==(o?i.state.doc.length:0))return $.cursor(l,s.assoc);let c,u=s.goalColumn,d=i.contentDOM.getBoundingClientRect(),p=i.coordsAtPos(l,s.assoc||-1),f=i.documentTop;if(p)u==null&&(u=p.left-d.left),c=h<0?p.top:p.bottom;else{let O=i.viewState.lineBlockAt(l);u==null&&(u=Math.min(d.right-d.left,i.defaultCharacterWidth*(l-O.from))),c=(h<0?O.top:O.bottom)+f}let m=d.left+u,g=a??i.viewState.heightOracle.textHeight>>1;for(let O=0;;O+=10){let b=c+(g+O)*h,S=Fp(i,{x:m,y:b},!1,h);if(b<d.top||b>d.bottom||(h<0?S<l:S>l)){let x=i.docView.coordsForChar(S),y=!x||b<x.top?-1:1;return $.cursor(S,y,void 0,u)}}})(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Fp(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i);return Bc(n,s[Ht.find(s,e-i.from,-1,t)].dir==de.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(dg)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>I1)return Mp(e.length);let t,n=this.textDirectionAt(e.from);for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||ig(s.isolates,t=Dp(this,e))))return s.order;t||(t=Dp(this,e));let i=(function(s,o,a){if(!s)return[new Ht(0,0,o==Hc?1:0)];if(o==Wn&&!a.length&&!m1.test(s))return Mp(s.length);if(a.length)for(;s.length>le.length;)le[le.length]=256;let l=[],h=o==Wn?0:1;return Eh(s,h,h,a,0,s.length,l),l})(e.text,n,t);return this.bidiCache.push(new Eo(e.from,e.to,n,t,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||z.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Vm(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Bs.of(new gi(typeof e=="number"?$.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Bs.of(new gi($.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return Ge.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ge.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=ln.newName(),i=[Us.of(n),si.of(Uh(`.${n}`,e))];return t&&t.dark&&i.push(Vh.of(!0)),i}static baseTheme(e){return un.lowest(si.of(Uh("."+Hh,e,Rg)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),i=n&&be.get(n)||be.get(e);return((t=i?.rootView)===null||t===void 0?void 0:t.view)||null}};V.styleModule=si,V.inputHandler=cg,V.focusChangeEffect=ug,V.perLineTextDirection=dg,V.exceptionSink=hg,V.updateListener=$h,V.editable=Uo,V.mouseSelectionStyle=lg,V.dragMovesSelection=ag,V.clickAddsSelectionRange=og,V.decorations=$i,V.outerDecorations=fg,V.atomicRanges=Wc,V.bidiIsolatedRanges=mg,V.scrollMargins=gg,V.darkTheme=Vh,V.cspNonce=D.define({combine:r=>r.length?r[0]:""}),V.contentAttributes=Uc,V.editorAttributes=pg,V.lineWrapping=V.contentAttributes.of({class:"cm-lineWrapping"}),V.announce=se.define();I1=4096,af={},Eo=class r{constructor(e,t,n,i,s,o){this.from=e,this.to=t,this.dir=n,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let n=[],i=e.length?e[e.length-1].dir:de.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir!=i||t.touchesRange(o.from,o.to)||n.push(new r(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}};N1=z.mac?"mac":z.windows?"win":z.linux?"linux":"key";L1=un.default(V.domEventHandlers({keydown:(r,e)=>(function(t,n,i,s){let o=(function(b){var S=!(Zm&&b.metaKey&&b.shiftKey&&!b.ctrlKey&&!b.altKey||Bm&&b.shiftKey&&b.key&&b.key.length==1||b.key=="Unidentified")&&b.key||(b.shiftKey?Qr:an)[b.keyCode]||b.key||"Unidentified";return S=="Esc"&&(S="Escape"),S=="Del"&&(S="Delete"),S=="Left"&&(S="ArrowLeft"),S=="Up"&&(S="ArrowUp"),S=="Right"&&(S="ArrowRight"),S=="Down"&&(S="ArrowDown"),S})(n),a=Ct(o,0),l=nn(a)==o.length&&o!=" ",h="",c=!1,u=!1,d=!1;mn&&mn.view==i&&mn.scope==s&&(h=mn.prefix+" ",xg.indexOf(n.keyCode)<0&&(u=!0,mn=null));let p,f,m=new Set,g=b=>{if(b){for(let S of b.run)if(!m.has(S)&&(m.add(S),S(i,n)))return b.stopPropagation&&(d=!0),!0;b.preventDefault&&(b.stopPropagation&&(d=!0),u=!0)}return!1},O=t[s];return O&&(g(O[h+Ws(o,n,!l)])?c=!0:l&&(n.altKey||n.metaKey||n.ctrlKey)&&!(z.windows&&n.ctrlKey&&n.altKey)&&(p=an[n.keyCode])&&p!=o?(g(O[h+Ws(p,n,!0)])||n.shiftKey&&(f=Qr[n.keyCode])!=o&&f!=p&&g(O[h+Ws(f,n,!1)]))&&(c=!0):l&&n.shiftKey&&g(O[h+Ws(o,n,!0)])&&(c=!0),!c&&g(O._any)&&(c=!0)),u&&(c=!0),c&&d&&n.stopPropagation(),c})((function(t){let n=t.facet(Wo),i=hf.get(n);return i||hf.set(n,i=(function(s,o=N1){let a=Object.create(null),l=Object.create(null),h=(u,d)=>{let p=l[u];if(p==null)l[u]=d;else if(p!=d)throw new Error("Key binding "+u+" is used both as a regular binding and as a multi-stroke prefix")},c=(u,d,p,f,m)=>{var g,O;let b=a[u]||(a[u]=Object.create(null)),S=d.split(/ (?!$)/).map(v=>(function(T,C){let k=T.split(/-(?!$)/),Q,R,Z,M,A=k[k.length-1];A=="Space"&&(A=" ");for(let F=0;F<k.length-1;++F){let H=k[F];if(/^(cmd|meta|m)$/i.test(H))M=!0;else if(/^a(lt)?$/i.test(H))Q=!0;else if(/^(c|ctrl|control)$/i.test(H))R=!0;else if(/^s(hift)?$/i.test(H))Z=!0;else{if(!/^mod$/i.test(H))throw new Error("Unrecognized modifier name: "+H);C=="mac"?M=!0:R=!0}}return Q&&(A="Alt-"+A),R&&(A="Ctrl-"+A),M&&(A="Meta-"+A),Z&&(A="Shift-"+A),A})(v,o));for(let v=1;v<S.length;v++){let T=S.slice(0,v).join(" ");h(T,!0),b[T]||(b[T]={preventDefault:!0,stopPropagation:!1,run:[C=>{let k=mn={view:C,prefix:T,scope:u};return setTimeout(()=>{mn==k&&(mn=null)},M1),!0}]})}let x=S.join(" ");h(x,!1);let y=b[x]||(b[x]={preventDefault:!1,stopPropagation:!1,run:((O=(g=b._any)===null||g===void 0?void 0:g.run)===null||O===void 0?void 0:O.slice())||[]});p&&y.run.push(p),f&&(y.preventDefault=!0),m&&(y.stopPropagation=!0)};for(let u of s){let d=u.scope?u.scope.split(" "):["editor"];if(u.any)for(let f of d){let m=a[f]||(a[f]=Object.create(null));m._any||(m._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let g in m)m[g].run.push(u.any)}let p=u[o]||u.key;if(p)for(let f of d)c(f,p,u.run,u.preventDefault,u.stopPropagation),u.shift&&c(f,"Shift-"+p,u.shift,u.preventDefault,u.stopPropagation)}return a})(n.reduce((s,o)=>s.concat(o),[]))),i})(e.state),r,e,"editor")})),Wo=D.define({enables:L1}),hf=new WeakMap,mn=null,M1=4e3,$o=class r{constructor(e,t,n,i,s){this.className=e,this.left=t,this.top=n,this.width=i,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let i=e.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let s=cf(e);return[new r(t,i.left-s.left,i.top-s.top,null,i.bottom-i.top)]}return(function(i,s,o){if(o.to<=i.viewport.from||o.from>=i.viewport.to)return[];let a=Math.max(o.from,i.viewport.from),l=Math.min(o.to,i.viewport.to),h=i.textDirection==de.LTR,c=i.contentDOM,u=c.getBoundingClientRect(),d=cf(i),p=c.querySelector(".cm-line"),f=p&&window.getComputedStyle(p),m=u.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),g=u.right-(f?parseInt(f.paddingRight):0),O=Nh(i,a),b=Nh(i,l),S=O.type==We.Text?O:null,x=b.type==We.Text?b:null;if(S&&(i.lineWrapping||O.widgetLineBreaks)&&(S=uf(i,a,S)),x&&(i.lineWrapping||b.widgetLineBreaks)&&(x=uf(i,l,x)),S&&x&&S.from==x.from)return v(T(o.from,o.to,S));{let k=S?T(o.from,null,S):C(O,!1),Q=x?T(null,o.to,x):C(b,!0),R=[];return(S||O).to<(x||b).from-(S&&x?1:0)||O.widgetLineBreaks>1&&k.bottom+i.defaultLineHeight/2<Q.top?R.push(y(m,k.bottom,g,Q.top)):k.bottom<Q.top&&i.elementAtHeight((k.bottom+Q.top)/2).type==We.Text&&(k.bottom=Q.top=(k.bottom+Q.top)/2),v(k).concat(R).concat(v(Q))}function y(k,Q,R,Z){return new r(s,k-d.left,Q-d.top-.01,R-k,Z-Q+.01)}function v({top:k,bottom:Q,horizontal:R}){let Z=[];for(let M=0;M<R.length;M+=2)Z.push(y(R[M],k,R[M+1],Q));return Z}function T(k,Q,R){let Z=1e9,M=-1e9,A=[];function F(N,I,W,Qe,ye){let he=i.coordsAtPos(N,N==R.to?-2:2),oe=i.coordsAtPos(W,W==R.from?2:-2);he&&oe&&(Z=Math.min(he.top,oe.top,Z),M=Math.max(he.bottom,oe.bottom,M),ye==de.LTR?A.push(h&&I?m:he.left,h&&Qe?g:oe.right):A.push(!h&&Qe?m:oe.left,!h&&I?g:he.right))}let H=k??R.from,K=Q??R.to;for(let N of i.visibleRanges)if(N.to>H&&N.from<K)for(let I=Math.max(N.from,H),W=Math.min(N.to,K);;){let Qe=i.state.doc.lineAt(I);for(let ye of i.bidiSpans(Qe)){let he=ye.from+Qe.from,oe=ye.to+Qe.from;if(he>=W)break;oe>I&&F(Math.max(he,I),k==null&&he<=H,Math.min(oe,W),Q==null&&oe>=K,ye.dir)}if(I=Qe.to+1,I>=W)break}return A.length==0&&F(H,k==null,K,Q==null,i.textDirection),{top:Z,bottom:M,horizontal:A}}function C(k,Q){let R=u.top+(Q?k.top:k.bottom);return{top:R,bottom:R,horizontal:[]}}})(e,t,n)}};qh=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(so)!=e.state.facet(so)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}setOrder(e){let t=0,n=e.facet(so);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;e==this.scaleX&&t==this.scaleY||(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((t,n)=>{return i=t,s=this.drawn[n],!(i.constructor==s.constructor&&i.eq(s));var i,s})){let t=this.dom.firstChild,n=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[n].constructor&&i.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},so=D.define();$g=!z.ios,Io=D.define({combine:r=>dn(r,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});$k=Eg({above:!0,markers(r){let{state:e}=r,t=e.facet(Io),n=[];for(let i of e.selection.ranges){let s=i==e.selection.main;if(i.empty?!s||$g:t.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",a=i.empty?i:$.cursor(i.head,i.head>i.anchor?-1:1);for(let l of $o.forRange(r,o,a))n.push(l)}}return n},update(r,e){r.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Ig(r);return t&&df(r.state,e),r.docChanged||r.selectionSet||t},mount(r,e){df(e.state,r)},class:"cm-cursorLayer"});Ik=Eg({above:!1,markers:r=>r.state.selection.ranges.map(e=>e.empty?[]:$o.forRange(r,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t)),update:(r,e)=>r.docChanged||r.selectionSet||r.viewportChanged||Ig(r),class:"cm-selectionLayer"}),Kh={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};$g&&(Kh[".cm-line"].caretColor="transparent !important",Kh[".cm-content"]={caretColor:"transparent !important"});Nk=un.highest(V.theme(Kh)),Jh=/x/.unicode!=null?"gu":"g",D1=new RegExp(`[\0-\b
10
+ -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,Jh),El=null,Lk=D.define({combine(r){let e=dn(r,{render:null,specialChars:D1,addSpecialChars:null});return(e.replaceTabs=!(function(){var t;if(El==null&&typeof document<"u"&&document.body){let n=document.body.style;El=((t=n.tabSize)!==null&&t!==void 0?t:n.MozTabSize)!=null}return El||!1})())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Jh)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Jh)),e}}),Mk=Ge.fromClass(class{constructor(){this.height=1e3,this.attrs={style:"padding-bottom: 1000px"}}update(r){let{view:e}=r,t=e.viewState.editorHeight*e.scaleY-e.defaultLineHeight-e.documentPadding.top-.5;t>=0&&t!=this.height&&(this.height=t,this.attrs={style:`padding-bottom: ${t}px`})}}),Kr="-10000px",ec=class{constructor(e,t,n){this.facet=t,this.createTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(i=>i),this.tooltipViews=this.tooltips.map(n)}update(e,t){var n;let i=e.state.facet(this.facet),s=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],a=t?[]:null;for(let l=0;l<s.length;l++){let h=s[l],c=-1;if(h){for(let u=0;u<this.tooltips.length;u++){let d=this.tooltips[u];d&&d.create==h.create&&(c=u)}if(c<0)o[l]=this.createTooltipView(h),a&&(a[l]=!!h.above);else{let u=o[l]=this.tooltipViews[c];a&&(a[l]=t[c]),u.update&&u.update(e)}}}for(let l of this.tooltipViews)o.indexOf(l)<0&&(l.dom.remove(),(n=l.destroy)===null||n===void 0||n.call(l));return t&&(a.forEach((l,h)=>t[h]=l),t.length=a.length),this.input=i,this.tooltips=s,this.tooltipViews=o,!0}};$l=D.define({combine:r=>{var e,t,n;return{position:z.ios?"absolute":((e=r.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(i=>i.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||z1}}}),pf=new WeakMap,Ng=Ge.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet($l);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new ec(r,Gc,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet($l);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r){let e=r.create(this.view);if(e.dom.classList.add("cm-tooltip"),r.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Kr,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var r,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(r=t.destroy)===null||r===void 0||r.call(t);this.parent&&this.container.remove(),(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(z.gecko)n=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Kr&&i.style.left=="0px"){let s=i.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(n||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((i,s)=>{let o=this.manager.tooltipViews[s];return o.getCoords?o.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet($l).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{editor:t,space:n,scaleX:i,scaleY:s}=r,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:c}=h,u=r.pos[a],d=r.size[a];if(!u||u.bottom<=Math.max(t.top,n.top)||u.top>=Math.min(t.bottom,n.bottom)||u.right<Math.max(t.left,n.left)-.1||u.left>Math.min(t.right,n.right)+.1){c.style.top=Kr;continue}let p=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,f=p?7:0,m=d.right-d.left,g=(e=pf.get(h))!==null&&e!==void 0?e:d.bottom-d.top,O=h.offset||X1,b=this.view.textDirection==de.LTR,S=d.width>n.right-n.left?b?n.left:n.right-d.width:b?Math.min(u.left-(p?14:0)+O.x,n.right-m):Math.max(n.left,u.left-m+(p?14:0)-O.x),x=this.above[a];!l.strictSide&&(x?u.top-(d.bottom-d.top)-O.y<n.top:u.bottom+(d.bottom-d.top)+O.y>n.bottom)&&x==n.bottom-u.bottom>u.top-n.top&&(x=this.above[a]=!x);let y=(x?u.top-n.top:n.bottom-u.bottom)-f;if(y<g&&h.resize!==!1){if(y<this.view.defaultLineHeight){c.style.top=Kr;continue}pf.set(h,g),c.style.height=(g=y)/s+"px"}else c.style.height&&(c.style.height="");let v=x?u.top-g-f-O.y:u.bottom+f+O.y,T=S+m;if(h.overlap!==!0)for(let C of o)C.left<T&&C.right>S&&C.top<v+g&&C.bottom>v&&(v=x?C.top-g-2-f:C.bottom+f+2);if(this.position=="absolute"?(c.style.top=(v-r.parent.top)/s+"px",c.style.left=(S-r.parent.left)/i+"px"):(c.style.top=v/s+"px",c.style.left=S/i+"px"),p){let C=u.left+(b?O.x:-O.x)-(S+14-7);p.style.left=C/i+"px"}h.overlap!==!0&&o.push({left:S,top:v,right:T,bottom:v+g}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),h.positioned&&h.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Kr}},{eventObservers:{scroll(){this.maybeMeasure()}}}),_1=V.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),X1={x:0,y:0},Gc=D.define({enables:[Ng,_1]});ff=D.define({combine(r){let e,t;for(let n of r)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}}),F1=Ge.fromClass(class{constructor(r){this.input=r.state.facet(tc),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(r));let e=r.state.facet(ff);this.top=new Sr(r,!0,e.topContainer),this.bottom=new Sr(r,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(r){let e=r.state.facet(ff);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Sr(r.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Sr(r.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=r.state.facet(tc);if(t!=this.input){let n=t.filter(l=>l),i=[],s=[],o=[],a=[];for(let l of n){let h,c=this.specs.indexOf(l);c<0?(h=l(r.view),a.push(h)):(h=this.panels[c],h.update&&h.update(r)),i.push(h),(h.top?s:o).push(h)}this.specs=n,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let l of a)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let n of this.panels)n.update&&n.update(r)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:r=>V.scrollMargins.of(e=>{let t=e.plugin(r);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})}),Sr=class{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=mf(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=mf(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}};tc=D.define({enables:F1}),Bt=class extends rn{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Bt.prototype.elementClass="",Bt.prototype.toDOM=void 0,Bt.prototype.mapMode=Le.TrackBefore,Bt.prototype.startSide=Bt.prototype.endSide=-1,Bt.prototype.point=!0;Il=D.define(),oo=D.define(),gf=D.define({combine:r=>r.some(e=>e)}),Dk=Ge.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(oo).map(e=>new No(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(gf),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,n=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(n<.8*(t.to-t.from))}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(gf)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=Se.iter(this.view.state.facet(Il),this.view.viewport.from),n=[],i=this.gutters.map(s=>new rc(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(n.length&&(n=[]),Array.isArray(s.type)){let o=!0;for(let a of s.type)if(a.type==We.Text&&o){nc(t,n,a.from);for(let l of i)l.line(this.view,a,n);o=!1}else if(a.widget)for(let l of i)l.widget(this.view,a)}else if(s.type==We.Text){nc(t,n,s.from);for(let o of i)o.line(this.view,s,n)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(oo),t=r.state.facet(oo),n=r.docChanged||r.heightChanged||r.viewportChanged||!Se.eq(r.startState.facet(Il),r.state.facet(Il),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(r)&&(n=!0);else{n=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new No(this.view,s)):(this.gutters[o].update(r),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)this.dom.appendChild(s.dom);this.gutters=i}return n}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:r=>V.scrollMargins.of(e=>{let t=e.plugin(r);return t&&t.gutters.length!=0&&t.fixed?e.textDirection==de.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}:null})});rc=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Se.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let a=new Lo(e,o,s,n);i.elements.push(a),i.dom.appendChild(a.dom)}else i.elements[this.i].update(e,o,s,n);this.height=t.bottom,this.i++}line(e,t,n){let i=[];nc(this.cursor,i,t.from),n.length&&(i=i.concat(n));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;(i.length!=0||o.config.renderEmptyElements)&&this.addElement(e,t,i)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},No=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,i=>{let s,o=i.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();s=(l.top+l.bottom)/2}else s=i.clientY;let a=e.lineBlockAtHeight(s-e.documentTop);t.domEventHandlers[n](e,a,i)&&i.preventDefault()});this.markers=Of(t.markers(e)),t.initialSpacer&&(this.spacer=new Lo(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Of(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let n=e.view.viewport;return!Se.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}},Lo=class{constructor(e,t,n,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,i)}update(e,t,n,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),(function(s,o){if(s.length!=o.length)return!1;for(let a=0;a<s.length;a++)if(!s[a].compare(o[a]))return!1;return!0})(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let n="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let a=o,l=s<t.length?t[s++]:null,h=!1;if(l){let c=l.elementClass;c&&(n+=" "+c);for(let u=o;u<this.markers.length;u++)if(this.markers[u].compare(l)){a=u,h=!0;break}}else a=this.markers.length;for(;o<a;){let c=this.markers[o++];if(c.toDOM){c.destroy(i);let u=i.nextSibling;i.remove(),i=u}}if(!l)break;l.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(l.toDOM(e),i)),h&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}},Mg=D.define(),li=D.define({combine:r=>dn(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let i in t){let s=n[i],o=t[i];n[i]=s?(a,l,h)=>s(a,l,h)||o(a,l,h):o}return n}})}),Si=class extends Bt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};zk=oo.compute([li],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(Mg),lineMarker:(e,t,n)=>n.some(i=>i.toDOM)?null:new Si(Nl(e,e.state.doc.lineAt(t.from).number)),widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(li)!=e.state.facet(li),initialSpacer:e=>new Si(Nl(e,bf(e.state.doc.lines))),updateSpacer(e,t){let n=Nl(t.view,bf(t.view.state.doc.lines));return n==e.number?e:new Si(n)},domEventHandlers:r.facet(li).domEventHandlers}));Z1=0,Ot=class r{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=Z1++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof r&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let i=new r(n,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new Mo(e);return n=>n.modified.indexOf(t)>-1?n:Mo.get(n.base||n,n.modified.concat(t).sort((i,s)=>i.id-s.id))}},B1=0,Mo=class r{constructor(e){this.name=e,this.instances=[],this.id=B1++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(a=>{return a.base==e&&(l=t,h=a.modified,l.length==h.length&&l.every((c,u)=>c==h[u]));var l,h});if(n)return n;let i=[],s=new Ot(e.name,i,e,t);for(let a of t)a.instances.push(s);let o=(function(a){let l=[[]];for(let h=0;h<a.length;h++)for(let c=0,u=l.length;c<u;c++)l.push(l[c].concat(a[h]));return l.sort((h,c)=>c.length-h.length)})(t);for(let a of e.set)if(!a.modified.length)for(let l of o)i.push(r.get(a,l));return s}};Dg=new Y,Rr=class{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};Rr.empty=new Rr([],2,null);ic=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,s){let{type:o,from:a,to:l}=e;if(a>=n||l<=t)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let h=i,c=(function(p){let f=p.type.prop(Dg);for(;f&&f.context&&!p.matchContext(f.context);)f=f.next;return f||null})(e)||Rr.empty,u=(function(p,f){let m=null;for(let g of p){let O=g.style(f);O&&(m=m?m+" "+O:O)}return m})(s,c.tags);if(u&&(h&&(h+=" "),h+=u,c.mode==1&&(i+=(i?" ":"")+u)),this.startSpan(Math.max(t,a),h),c.opaque)return;let d=e.tree&&e.tree.prop(Y.mounted);if(d&&d.overlay){let p=e.node.enter(d.overlay[0].from+a,1),f=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),m=e.firstChild();for(let g=0,O=a;;g++){let b=g<d.overlay.length?d.overlay[g]:null,S=b?b.from+a:l,x=Math.max(t,O),y=Math.min(n,S);if(x<y&&m)for(;e.from<y&&(this.highlightRange(e,x,y,i,s),this.startSpan(Math.min(y,e.to),h),!(e.to>=S)&&e.nextSibling()););if(!b||S>n)break;O=b.to+a,O>t&&(this.highlightRange(p.cursor(),Math.max(t,b.from+a),Math.min(n,O),"",f),this.startSpan(Math.min(n,O),h))}m&&e.parent()}else if(e.firstChild()){d&&(i="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,s),this.startSpan(Math.min(n,e.to),h)}while(e.nextSibling());e.parent()}}},E=Ot.define,Gs=E(),On=E(),Sf=E(On),yf=E(On),bn=E(),Ys=E(bn),Ll=E(bn),Zt=E(),Mn=E(Zt),Xt=E(),Ft=E(),sc=E(),Jr=E(sc),qs=E(),w={comment:Gs,lineComment:E(Gs),blockComment:E(Gs),docComment:E(Gs),name:On,variableName:E(On),typeName:Sf,tagName:E(Sf),propertyName:yf,attributeName:E(yf),className:E(On),labelName:E(On),namespace:E(On),macroName:E(On),literal:bn,string:Ys,docString:E(Ys),character:E(Ys),attributeValue:E(Ys),number:Ll,integer:E(Ll),float:E(Ll),bool:E(bn),regexp:E(bn),escape:E(bn),color:E(bn),url:E(bn),keyword:Xt,self:E(Xt),null:E(Xt),atom:E(Xt),unit:E(Xt),modifier:E(Xt),operatorKeyword:E(Xt),controlKeyword:E(Xt),definitionKeyword:E(Xt),moduleKeyword:E(Xt),operator:Ft,derefOperator:E(Ft),arithmeticOperator:E(Ft),logicOperator:E(Ft),bitwiseOperator:E(Ft),compareOperator:E(Ft),updateOperator:E(Ft),definitionOperator:E(Ft),typeOperator:E(Ft),controlOperator:E(Ft),punctuation:sc,separator:E(sc),bracket:Jr,angleBracket:E(Jr),squareBracket:E(Jr),paren:E(Jr),brace:E(Jr),content:Zt,heading:Mn,heading1:E(Mn),heading2:E(Mn),heading3:E(Mn),heading4:E(Mn),heading5:E(Mn),heading6:E(Mn),contentSeparator:E(Zt),list:E(Zt),quote:E(Zt),emphasis:E(Zt),strong:E(Zt),link:E(Zt),monospace:E(Zt),strikethrough:E(Zt),inserted:E(),deleted:E(),changed:E(),invalid:E(),meta:qs,documentMeta:E(qs),annotation:E(qs),processingInstruction:E(qs),definition:Ot.defineModifier("definition"),constant:Ot.defineModifier("constant"),function:Ot.defineModifier("function"),standard:Ot.defineModifier("standard"),local:Ot.defineModifier("local"),special:Ot.defineModifier("special")};for(let r in w){let e=w[r];e instanceof Ot&&(e.name=r)}j1([{tag:w.link,class:"tok-link"},{tag:w.heading,class:"tok-heading"},{tag:w.emphasis,class:"tok-emphasis"},{tag:w.strong,class:"tok-strong"},{tag:w.keyword,class:"tok-keyword"},{tag:w.atom,class:"tok-atom"},{tag:w.bool,class:"tok-bool"},{tag:w.url,class:"tok-url"},{tag:w.labelName,class:"tok-labelName"},{tag:w.inserted,class:"tok-inserted"},{tag:w.deleted,class:"tok-deleted"},{tag:w.literal,class:"tok-literal"},{tag:w.string,class:"tok-string"},{tag:w.number,class:"tok-number"},{tag:[w.regexp,w.escape,w.special(w.string)],class:"tok-string2"},{tag:w.variableName,class:"tok-variableName"},{tag:w.local(w.variableName),class:"tok-variableName tok-local"},{tag:w.definition(w.variableName),class:"tok-variableName tok-definition"},{tag:w.special(w.variableName),class:"tok-variableName2"},{tag:w.definition(w.propertyName),class:"tok-propertyName tok-definition"},{tag:w.typeName,class:"tok-typeName"},{tag:w.namespace,class:"tok-namespace"},{tag:w.className,class:"tok-className"},{tag:w.macroName,class:"tok-macroName"},{tag:w.propertyName,class:"tok-propertyName"},{tag:w.operator,class:"tok-operator"},{tag:w.comment,class:"tok-comment"},{tag:w.meta,class:"tok-meta"},{tag:w.invalid,class:"tok-invalid"},{tag:w.punctuation,class:"tok-punctuation"}]);hi=new Y;Yc=new Y,ut=class{constructor(e,t,n=[],i=""){this.data=e,this.name=i,ve.prototype.hasOwnProperty("tree")||Object.defineProperty(ve.prototype,"tree",{get(){return Te(this)}}),this.parser=t,this.extension=[Er.of(this),ve.languageData.of((s,o,a)=>{let l=xf(s,o,a),h=l.type.prop(hi);if(!h)return[];let c=s.facet(h),u=l.type.prop(Yc);if(u){let d=l.resolve(o-l.from,a);for(let p of u)if(p.test(d,s)){let f=s.facet(p.facet);return p.type=="replace"?f:f.concat(c)}}return c})].concat(n)}isActiveAt(e,t,n=-1){return xf(e,t,n).type.prop(hi)==this.data}findRegions(e){let t=e.facet(Er);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(s,o)=>{if(s.prop(hi)==this.data)return void n.push({from:o,to:o+s.length});let a=s.prop(Y.mounted);if(a){if(a.tree.prop(hi)==this.data){if(a.overlay)for(let l of a.overlay)n.push({from:l.from+o,to:l.to+o});else n.push({from:o,to:o+s.length});return}if(a.overlay){let l=n.length;if(i(a.tree,a.overlay[0].from+o),n.length>l)return}}for(let l=0;l<s.children.length;l++){let h=s.children[l];h instanceof ke&&i(h,s.positions[l]+o)}};return i(Te(e),0),n}get allowsNesting(){return!0}};ut.setState=se.define();Ar=class r extends ut{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=_g(e.languageData);return new r(t,e.parser.configure({props:[hi.add(n=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new r(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};oc=class{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},ei=null,ac=class r{constructor(e,t,n=[],i,s,o,a,l){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new r(e,t,[],ke.empty,0,n,[],null)}startParse(){return this.parser.startParse(new oc(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=ke.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(yn.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(t??this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(yn.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ei;ei=this;try{return e()}finally{ei=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=wf(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((h,c,u,d)=>l.push({fromA:h,toA:c,fromB:u,toB:d})),n=yn.applyChanges(n,l),i=ke.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){a=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),u=e.mapPos(h.to,-1);c<u&&a.push({from:c,to:u})}}}return new r(this.parser,t,n,i,s,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:i,to:s}=this.skipped[n];i<e.to&&s>e.from&&(this.fragments=wf(this.fragments,i,s),this.skipped.splice(n--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends vi{createParse(t,n,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let a=ei;if(a){for(let l of i)a.tempSkipped.push(l);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new ke(Fe.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ei}};Ni=class r{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new r(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=ac.create(e.facet(Er).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new r(n)}};ut.state=rt.define({create:Ni.init,update(r,e){for(let t of e.effects)if(t.is(ut.setState))return t.value;return e.startState.facet(Er)!=e.state.facet(Er)?Ni.init(e.state):r.apply(e)}});Xg=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Xg=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});Dl=typeof navigator<"u"&&(!((Ml=navigator.scheduling)===null||Ml===void 0)&&Ml.isInputPending)?()=>navigator.scheduling.isInputPending():null,V1=Ge.fromClass(class{constructor(r){this.view=r,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(r){let e=this.view.state.field(ut.state).context;(e.updateViewport(r.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(r.docChanged||r.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:r}=this.view,e=r.field(ut.state);e.tree==e.context.tree&&e.context.isDone(r.doc.length)||(this.working=Xg(this.work))}work(r){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:t,viewport:{to:n}}=this.view,i=t.field(ut.state);if(i.tree==i.context.tree&&i.context.isDone(n+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,r&&!Dl?Math.max(25,r.timeRemaining()-5):1e9),o=i.context.treeLen<n&&t.doc.length>n+1e3,a=i.context.work(()=>Dl&&Dl()||Date.now()>s,n+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:ut.setState.of(new Ni(i.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(r){r.scheduleOn&&(this.workScheduled++,r.scheduleOn.then(()=>this.scheduleWork()).catch(e=>Et(this.view.state,e)).then(()=>this.workScheduled--),r.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Er=D.define({combine:r=>r.length?r[0]:null,enables:r=>[ut.state,V1,V.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]}),$r=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},H1=D.define(),Yo=D.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});Li=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=lc(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=n.from&&i<=n.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(e,t);return n.slice(e-i,Math.min(n.length,e+100-i))}column(e,t=1){let{text:n,from:i}=this.lineAt(e,t),s=this.countColumn(n,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return Zc(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},qo=new Y;hc=class r extends Li{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new r(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Y1(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Fg(this.context.next,this.base,this.pos)}};K1=r=>r.baseIndent;_k=D.define(),qc=new Y;J1=se.define({map:jg}),Vg=se.define({map:jg}),ew=rt.define({create:()=>q.none,update(r,e){r=r.map(e.changes);for(let t of e.effects)if(t.is(J1)&&!nw(r,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(Hg),i=n?q.replace({widget:new cc(n(e.state,t.value))}):Tf;r=r.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(Vg)&&(r=r.update({filter:(n,i)=>t.value.from!=n||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;r.between(n,n,(i,s)=>{i<n&&s>n&&(t=!0)}),t&&(r=r.update({filterFrom:n,filterTo:n,filter:(i,s)=>s<=n||i>=n}))}return r},provide:r=>V.decorations.from(r),toJSON(r,e){let t=[];return r.between(0,e.doc.length,(n,i)=>{t.push(n,i)}),t},fromJSON(r){if(!Array.isArray(r)||r.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<r.length;){let n=r[t++],i=r[t++];if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(Tf.range(n,i))}return q.set(e,!0)}});rw={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},Hg=D.define({combine:r=>dn(r,rw)});Tf=q.replace({widget:new class extends cn{toDOM(r){return Ug(r,null)}}}),cc=class extends cn{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Ug(e,this.value)}},Xk=V.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),iw=D.define(),sw=D.define({combine:r=>r.length?[r[0]]:null});uc=class{constructor(e){this.markCache=Object.create(null),this.tree=Te(e.state),this.decorations=this.buildDeco(e,zl(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Te(e.state),n=zl(e.state),i=n!=zl(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return q.none;let n=new Hn;for(let{from:i,to:s}of e.visibleRanges)zg(this.tree,t,(o,a,l)=>{n.add(o,a,this.markCache[l]||(this.markCache[l]=q.mark({class:l})))},i,s);return n.finish()}},Fk=un.high(Ge.fromClass(uc,{decorations:r=>r.decorations}));w.meta,w.link,w.heading,w.emphasis,w.strong,w.strikethrough,w.keyword,w.atom,w.bool,w.url,w.contentSeparator,w.labelName,w.literal,w.inserted,w.string,w.deleted,w.regexp,w.escape,w.string,w.variableName,w.variableName,w.typeName,w.namespace,w.className,w.variableName,w.macroName,w.propertyName,w.comment,w.invalid;Zk=V.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Wg="()[]{}",ow=D.define({combine:r=>dn(r,{afterCursor:!0,brackets:Wg,maxScanDistance:1e4,renderMatch:hw})}),aw=q.mark({class:"cm-matchingBracket"}),lw=q.mark({class:"cm-nonmatchingBracket"});Bk=rt.define({create:()=>q.none,update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(ow);for(let i of e.state.selection.ranges){if(!i.empty)continue;let s=Ks(e.state,i.head,-1,n)||i.head>0&&Ks(e.state,i.head-1,1,n)||n.afterCursor&&(Ks(e.state,i.head,1,n)||i.head<e.state.doc.length&&Ks(e.state,i.head+1,-1,n));s&&(t=t.concat(n.renderMatch(s,e.state)))}return q.set(t,!0)},provide:r=>V.decorations.from(r)}),Gg=new Y;Yg=Object.create(null),fc=[Fe.none],jk=new wi(fc),Pf=[],kf=Object.create(null),qg=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])qg[r]=Kg(Yg,e);mc=class{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),qg)}resolve(e){return e?this.table[e]||(this.table[e]=Kg(this.extra,e)):0}},Vk=new mc(Yg);Qf=D.define({combine:r=>r.some(e=>e)}),Hk=Ge.fromClass(class{constructor(r){this.always=r.state.facet(Qf)||r.textDirection!=de.LTR||r.state.facet(V.perLineTextDirection),this.hasRTL=!this.always&&Cf(r.state.doc),this.tree=Te(r.state),this.decorations=this.always||this.hasRTL?Rf(r,this.tree,this.always):q.none}update(r){let e=r.state.facet(Qf)||r.view.textDirection!=de.LTR||r.state.facet(V.perLineTextDirection);if(e||this.hasRTL||!(function(n){let i=!1;return n.iterChanges((s,o,a,l,h)=>{!i&&Cf(h)&&(i=!0)}),i})(r.changes)||(this.hasRTL=!0),!e&&!this.hasRTL)return;let t=Te(r.state);(e!=this.always||t!=this.tree||r.docChanged||r.viewportChanged)&&(this.tree=t,this.always=e,this.decorations=Rf(r.view,t,e))}},{provide:r=>{function e(t){var n,i;return(i=(n=t.plugin(r))===null||n===void 0?void 0:n.decorations)!==null&&i!==void 0?i:q.none}return[V.outerDecorations.of(e),un.lowest(V.bidiIsolatedRanges.of(e))]}});uw={rtl:q.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:de.RTL}),ltr:q.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:de.LTR}),auto:q.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})},gc=class r{constructor(e,t,n,i,s,o,a,l,h,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=s,this.score=o,this.buffer=a,this.bufferBase=l,this.curContext=h,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new r(e,[],t,n,n,0,[],0,i?new Do(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=65535&e,{parser:s}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=s.dynamicPrecedence(i);if(a&&(this.score+=a),n==0)return this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),void this.reduceContext(i,this.reducePos);let l=this.stack.length-3*(n-1)-(262144&e?6:0),h=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-h;c>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=c));let u=l?this.stack[l-1]:0,d=this.bufferBase+this.buffer.length-u;if(i<s.minRepeatTerm||131072&e){let p=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,p,d+4,!0)}if(262144&e)this.state=this.stack[l];else{let p=this.stack[l-3];this.state=s.getGoto(p,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,t,n,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,a=this.buffer.length;if(a==0&&o.parent&&(a=o.bufferBase-o.parent.bufferBase,o=o.parent),a>0&&o.buffer[a-4]==0&&o.buffer[a-1]>-1){if(t==n)return;if(o.buffer[a-2]>=t)return void(o.buffer[a-2]=n)}}if(s&&this.pos!=n){let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let a=!1;for(let l=o;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=i}else this.buffer.push(e,t,n,i)}shift(e,t,n,i){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4);else{let s=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}}apply(e,t,n,i){65536&e?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Oc(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s,o=0;o<t.length;o+=2)(s=t[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(t[o],s);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((a,l)=>1&l&&a==o)||i.push(t[s],o)}t=i}let n=[];for(let i=0;i<t.length&&n.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,n.push(o)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(65536&t))return!1;if(!e.validAction(this.state,t)){let n=t>>19,i=65535&t,s=this.stack.length-3*n;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(393216&o))if(65536&o){let a=(o>>19)-s;if(a>1){let l=65535&o,h=this.stack.length-3*a;if(h>=0&&e.getGoto(this.stack[h],l,!1)>=0)return a<<19|65536|l}}else{let a=n(o,s+1);if(a!=null)return a}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Do(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},Do=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},Oc=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}},bc=class r{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new r(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r(this.stack,this.pos,this.index)}};Pr=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},Af=new Pr,Sc=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Af,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<n.from;){if(!i)return null;let o=this.ranges[--i];s-=n.from-o.to,n=o}for(;t<0?s>n.to:s>=n.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-n.to,n=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,n,i=this.chunkOff+e;if(i>=0&&i<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(i);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(t=s,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let o=this.rangeIndex,a=this.range;for(;a.to<=t;)a=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Af,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}},wn=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;eO(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};wn.prototype.contextual=wn.prototype.fallback=wn.prototype.extend=!1;Ir=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?ci(e):e}token(e,t){let n=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(eO(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}};Ir.prototype.contextual=wn.prototype.fallback=wn.prototype.extend=!1;Ye=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};ot=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),Xl=null;yc=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?$f(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?$f(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],i=this.index[t];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=n.children[i],o=this.start[t]+n.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof ke){if(o==e){if(o<this.safeFrom)return null;let a=o+s.length;if(a<=this.safeTo){let l=s.prop(Y.lookAhead);if(!l||a+l<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}},xc=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Pr)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let h=0;h<s.length;h++){if(!(1<<h&o))continue;let c=s[h],u=this.tokens[h];if((!n||c.fallback)&&((c.contextual||u.start!=e.pos||u.mask!=o||u.context!=a)&&(this.updateCachedToken(u,c,e),u.mask=o,u.context=a),u.lookAhead>u.end+25&&(l=Math.max(u.lookAhead,l)),u.value!=0)){let d=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!c.extend&&(n=u,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),n||e.pos!=this.stream.end||(n=new Pr,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Pr,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:s}=n.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let a=s.specializers[o](this.stream.read(e.start,e.end),n);if(a>=0&&n.p.parser.dialect.allows(a>>1)){1&a?e.extended=a>>1:e.value=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=n,i}addActions(e,t,n,i){let{state:s}=e,{parser:o}=e.p,{data:a}=o;for(let l=0;l<2;l++)for(let h=o.stateSlot(s,l?2:1);;h+=3){if(a[h]==65535){if(a[h+1]!=1){i==0&&a[h+1]==2&&(i=this.putAction(en(a,h+2),t,n,i));break}h=en(a,h+2)}a[h]==t&&(i=this.putAction(en(a,h+1),t,n,i))}return i}},wc=class{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Sc(t,i),this.tokens=new xc(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[gc.start(this,e.top[0],s)],this.fragments=n.length&&this.stream.end-s>4*e.bufferLength?new yc(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,i=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&n.length==1){let[o]=n;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let a=n[o];for(;;){if(this.tokens.mainToken=null,a.pos>i)s.push(a);else{if(this.advanceStack(a,s,n))continue;{e||(e=[],t=[]),e.push(a);let l=this.tokens.getMainToken(a);t.push(l.value,l.end)}}break}}if(!s.length){let o=e&&(function(a){let l=null;for(let h of a){let c=h.p.stoppedAt;(h.pos==h.p.stream.end||c!=null&&h.pos>c)&&h.p.parser.stateFlag(h.state,2)&&(!l||l.score<h.score)&&(l=h)}return l})(e);if(o)return ot&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw ot&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&e){let o=this.stoppedAt!=null&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,s);if(o)return ot&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:3*this.recovering;if(s.length>o)for(s.sort((a,l)=>l.score-a.score);s.length>o;)s.pop();s.some(a=>a.reducePos>i)&&this.recovering--}else if(s.length>1){e:for(let o=0;o<s.length-1;o++){let a=s[o];for(let l=o+1;l<s.length;l++){let h=s[l];if(a.sameState(h)||a.buffer.length>500&&h.buffer.length>500){if(!((a.score-h.score||a.buffer.length-h.buffer.length)>0)){s.splice(o--,1);continue e}s.splice(l--,1)}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let o=1;o<s.length;o++)s[o].pos<this.minStackPos&&(this.minStackPos=s[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let i=e.pos,{parser:s}=this,o=ot?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let u=this.fragments.nodeAt(i);u;){let d=this.parser.nodeSet.types[u.type.id]==u.type?s.getGoto(e.state,u.type.id):-1;if(d>-1&&u.length&&(!h||(u.prop(Y.contextHash)||0)==c))return e.useNode(u,d),ot&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(u.type.id)})`),!0;if(!(u instanceof ke)||u.children.length==0||u.positions[0]>0)break;let p=u.children[0];if(!(p instanceof ke&&u.positions[0]==0))break;u=p}}let a=s.stateSlot(e.state,4);if(a>0)return e.reduce(a),ot&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let h=0;h<l.length;){let c=l[h++],u=l[h++],d=l[h++],p=h==l.length||!n,f=p?e:e.split(),m=this.tokens.mainToken;if(f.apply(c,u,m?m.start:f.pos,d),ot&&console.log(o+this.stackID(f)+` (via ${65536&c?`reduce of ${s.getName(65535&c)}`:"shift"} for ${s.getName(u)} @ ${i}${f==e?"":", split"})`),p)return!0;f.pos>i?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return If(e,t),!0}}runRecovery(e,t,n){let i=null,s=!1;for(let o=0;o<e.length;o++){let a=e[o],l=t[o<<1],h=t[1+(o<<1)],c=ot?this.stackID(a)+" -> ":"";if(a.deadEnd&&(s||(s=!0,a.restart(),ot&&console.log(c+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let u=a.split(),d=c;for(let p=0;u.forceReduce()&&p<10&&(ot&&console.log(d+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,n));p++)ot&&(d=this.stackID(u)+" -> ");for(let p of a.recoverByInsert(l))ot&&console.log(c+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,n);this.stream.end>a.pos?(h==a.pos&&(h++,l=0),a.recoverByDelete(l,h),ot&&console.log(c+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),If(a,n)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),ke.build({buffer:bc.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Xl||(Xl=new WeakMap)).get(e);return t||Xl.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};vc=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},Fl=r=>r,zo=class{constructor(e){this.start=e.start,this.shift=e.shift||Fl,this.reduce=e.reduce||Fl,this.reuse=e.reuse||Fl,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Nr=class r extends vi{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let a=0;a<e.repeatNodeCount;a++)t.push("");let n=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<t.length;a++)i.push([]);function s(a,l,h){i[a].push([l,l.deserialize(String(h))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Y[l]);for(let h=1;h<a.length;){let c=a[h++];if(c>=0)s(c,l,a[h++]);else{let u=a[h+-c];for(let d=-c;d>0;d--)s(a[h++],l,u);h++}}}this.nodeSet=new wi(t.map((a,l)=>Fe.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=ci(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(Nf),this.states=ci(e.states,Uint32Array),this.data=ci(e.stateData),this.goto=ci(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new wn(o,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new wc(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],a=1&o,l=i[s++];if(a&&n)return l;for(let h=s+(o>>1);s<h;s++)if(i[s]==e)return l;if(a)return-1}}hasAction(e,t){let n=this.data;for(let i=0;i<2;i++)for(let s,o=this.stateSlot(e,i?2:1);;o+=3){if((s=n[o])==65535){if(n[o+1]!=1){if(n[o+1]==2)return en(n,o+2);break}s=n[o=en(n,o+2)]}if(s==t||s==0)return en(n,o+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,n=>n==t||null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535){if(this.data[s+1]!=1)break;s=en(this.data,s+2)}i=t(en(this.data,s+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]!=1)break;n=en(this.data,n+2)}if(!(1&this.data[n+2])){let i=this.data[n+1];t.some((s,o)=>1&o&&s==i)||t.push(this.data[n],i)}}return t}configure(e){let t=Object.assign(Object.create(r.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(s=>s.from==n);return i?i.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let s=e.specializers.find(a=>a.from==n.external);if(!s)return n;let o=Object.assign(Object.assign({},n),{external:s.to});return t.specializers[i]=Nf(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(n[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!n[s])for(let o,a=this.dialects[t[s]];(o=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[o]=1;return new vc(e,n,i)}static deserialize(e){return new r(e)}};tO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];nO=(r,e,t)=>(n,i)=>{for(let s=!1,o=0,a=0;;a++){let{next:l}=n;if(Mi(l)||l==45||l==95||s&&Kc(l))!s&&(l!=45||a>0)&&(s=!0),o===a&&l==45&&o++,n.advance();else{if(l!=92||n.peek(1)==10){s&&n.acceptToken(o>=2&&i.canShift(2)?e:l==40?t:r);break}if(n.advance(),Lf(n.next)){do n.advance();while(Lf(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();s=!0}}},pw=new Ye(nO(149,2,150),{contextual:!0}),fw=new Ye(nO(151,3,4),{contextual:!0}),mw=new Ye(r=>{if(tO.includes(r.peek(-1))){let{next:e}=r;(Mi(e)||e==95||e==35||e==46||e==42||e==91||e==58&&Mi(r.peek(1))||e==45||e==38)&&r.acceptToken(148)}}),gw=new Ye(r=>{if(!tO.includes(r.peek(-1))){let{next:e}=r;if(e==37&&(r.advance(),r.acceptToken(1)),Mi(e)){do r.advance();while(Mi(r.next)||Kc(r.next));r.acceptToken(1)}}}),Ow=Go({"AtKeyword import charset namespace keyframes media supports font-feature-values":w.definitionKeyword,"from to selector scope MatchFlag":w.keyword,NamespaceName:w.namespace,KeyframeName:w.labelName,KeyframeRangeName:w.operatorKeyword,TagName:w.tagName,ClassName:w.className,PseudoClassName:w.constant(w.className),IdName:w.labelName,"FeatureName PropertyName":w.propertyName,AttributeName:w.attributeName,NumberLiteral:w.number,KeywordQuery:w.keyword,UnaryQueryOp:w.operatorKeyword,"CallTag ValueName FontName":w.atom,VariableName:w.variableName,Callee:w.operatorKeyword,Unit:w.unit,"UniversalSelector NestingSelector":w.definitionOperator,"MatchOp CompareOp":w.compareOperator,"ChildOp SiblingOp, LogicOp":w.logicOperator,BinOp:w.arithmeticOperator,Important:w.modifier,Comment:w.blockComment,ColorLiteral:w.color,"ParenthesizedContent StringLiteral":w.string,":":w.punctuation,"PseudoOp #":w.derefOperator,"; , |":w.separator,"( )":w.paren,"[ ]":w.squareBracket,"{ }":w.brace}),bw={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:158,"url-prefix":158,domain:158,regexp:158},Sw={__proto__:null,or:104,and:104,not:112,only:112,layer:212},yw={__proto__:null,selector:118,style:124,layer:208},xw={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},ww={__proto__:null,to:249},vw=Nr.deserialize({version:14,states:"MrQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FqO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#ERO'dQdO'#ETO'oQdO'#E[O'oQdO'#E_OOQP'#Fq'#FqO)RQhO'#FQOOQS'#Fp'#FpOOQS'#FT'#FTQYQdOOO)YQdO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Q&e${R'd&dR$g!rQ'R%{R(['yR#OgR#QhR$s#QS&[$r&]R(Q'[V&Y$r&]'[R#YkQ#`qR%S#`QcOSoP!RU!lco%PR%P#[Q%]#q[&l%]&r'i'r'x(bQ&r%aQ'i&mQ'r&wQ'x'OR(b(VQ$[!nQ$^!oQ$`!pV%v$[$^$`Q&Q$iR'X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!QXR#m!QQ&d${R'c&dQ#]nS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XkR$y#XQ$P!dR%f$P_bOPco!R#[%P^XOPco!R#[%PQ!`]Q!a^Q#i|Q#j}Q#k!OQ#l!PQ$u#SQ%Y#pR'g&iR%^#qQ!rdQ!{f[$X!n!o!p$[$^$`Q${#Zh%[#q%]%a&m&r&w'O'i'r'x(V(bQ%`#vQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!n!o!p$[$^$`Q!d`U!ye!r$gQ#RiQ#y!cS#|!d$PQ$R!eQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!cW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#pQpPR#o!RQ!zeQ$f!rR%}$g",nodeNames:"\u26A0 Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:174,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[Ow],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$_~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I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S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#SQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[mw,gw,pw,fw,1,2,3,4,new Ir("m~RRYZ[z{a~~g~aO$b~~dP!P!Qg~lO$c~~",28,155)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:150,get:r=>bw[r]||-1},{term:151,get:r=>Sw[r]||-1},{term:4,get:r=>yw[r]||-1},{term:28,get:r=>xw[r]||-1},{term:149,get:r=>ww[r]||-1}],tokenPrec:2444}),Zl=null;Mf=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(r=>({type:"class",label:r})),Df=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(r=>({type:"keyword",label:r})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(r=>({type:"constant",label:r}))),Tw=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(r=>({type:"type",label:r})),Pw=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(r=>({type:"keyword",label:r})),Jt=/^(\w[\w-]*|-\w[\w-]*|)$/,kw=/^-(-[\w-]*)?$/,zf=new ho,Cw=["Declaration"];Rw=r=>e=>{let{state:t,pos:n}=e,i=Te(t).resolveInner(n,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Bl(),validFor:Jt};if(i.name=="ValueName")return{from:i.from,options:Df,validFor:Jt};if(i.name=="PseudoClassName")return{from:i.from,options:Mf,validFor:Jt};if(r(i)||(e.explicit||s)&&(function(l,h){var c;if((l.name=="("||l.type.isError)&&(l=l.parent||l),l.name!="ArgList")return!1;let u=(c=l.parent)===null||c===void 0?void 0:c.firstChild;return u?.name=="Callee"&&h.sliceString(u.from,u.to)=="var"})(i,t.doc))return{from:r(i)||s?i.from:n,options:rO(t.doc,Qw(i),r),validFor:kw};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Bl(),validFor:Jt};return{from:i.from,options:Tw,validFor:Jt}}if(i.name=="AtKeyword")return{from:i.from,options:Pw,validFor:Jt};if(!e.explicit)return null;let o=i.resolve(n),a=o.childBefore(n);return a&&a.name==":"&&o.name=="PseudoClassSelector"?{from:n,options:Mf,validFor:Jt}:a&&a.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:n,options:Df,validFor:Jt}:o.name=="Block"||o.name=="Styles"?{from:n,options:Bl(),validFor:Jt}:null},Aw=Rw(r=>r.name=="VariableName"),Lr=Ar.define({name:"css",parser:vw.configure({props:[qo.add({Declaration:ao()}),qc.add({"Block KeyframeList":Bg})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});Di=class{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Te(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),s=i.search(oO(e,!1));return s<0?null:{from:n+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};_o=class{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}};Jc=St.define(),Xf=new WeakMap;Xo=se.define(),zi=se.define(),Tc=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Ct(e,t),i=nn(n);this.chars.push(n);let s=e.slice(t,t+i),o=s.toUpperCase();this.folded.push(Ct(o==s?s.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:s,byWord:o}=this;if(t.length==1){let b=Ct(e,0),S=nn(b),x=S==e.length?0:-100;if(b!=t[0]){if(b!=n[0])return null;x+=-200}return this.ret(x,[0,S])}let a=e.indexOf(this.pattern);if(a==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=t.length,h=0;if(a<0){for(let b=0,S=Math.min(e.length,200);b<S&&h<l;){let x=Ct(e,b);x!=t[h]&&x!=n[h]||(i[h++]=b),b+=nn(x)}if(h<l)return null}let c=0,u=0,d=!1,p=0,f=-1,m=-1,g=/[a-z]/.test(e),O=!0;for(let b=0,S=Math.min(e.length,200),x=0;b<S&&u<l;){let y=Ct(e,b);a<0&&(c<l&&y==t[c]&&(s[c++]=b),p<l&&(y==t[p]||y==n[p]?(p==0&&(f=b),m=b+1,p++):p=0));let v,T=y<255?y>=48&&y<=57||y>=97&&y<=122?2:y>=65&&y<=90?1:0:(v=_c(y))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!b||T==1&&g||x==0&&T!=0)&&(t[u]==y||n[u]==y&&(d=!0)?o[u++]=b:o.length&&(O=!1)),x=T,b+=nn(y)}return u==l&&o[0]==0&&O?this.result((d?-200:0)-100,o,e):p==l&&f==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):p==l?this.ret(-900-e.length,[f,m]):u==l?this.result((d?-200:0)-100-700+(O?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)-200-1100,i,e)}result(e,t,n){let i=[],s=0;for(let o of t){let a=o+(this.astral?nn(Ct(n,o)):1);s&&i[s-1]==o?i[s-1]=a:(i[s++]=o,i[s++]=a)}return this.ret(e-n.length,i)}},Pc=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},Me=D.define({combine:r=>dn(r,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Iw,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Ff(e(n),t(n)),optionClass:(e,t)=>n=>Ff(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});kc=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:o}=i.open,a=e.state.facet(Me);this.optionContent=(function(l){let h=l.addToOptions.slice();return l.icons&&h.push({render(c){let u=document.createElement("div");return u.classList.add("cm-completionIcon"),c.type&&u.classList.add(...c.type.split(/\s+/g).map(d=>"cm-completionIcon-"+d)),u.setAttribute("aria-hidden","true"),u},position:20}),h.push({render(c,u,d,p){let f=document.createElement("span");f.className="cm-completionLabel";let m=c.displayLabel||c.label,g=0;for(let O=0;O<p.length;){let b=p[O++],S=p[O++];b>g&&f.appendChild(document.createTextNode(m.slice(g,b)));let x=f.appendChild(document.createElement("span"));x.appendChild(document.createTextNode(m.slice(b,S))),x.className="cm-completionMatchedText",g=S}return g<m.length&&f.appendChild(document.createTextNode(m.slice(g))),f},position:50},{render(c){if(!c.detail)return null;let u=document.createElement("span");return u.className="cm-completionDetail",u.textContent=c.detail,u},position:80}),h.sort((c,u)=>c.position-u.position).map(c=>c.render)})(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=jl(s.length,o,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:h}=e.state.field(t).open;for(let c,u=l.target;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(c=/-(\d+)$/.exec(u.id))&&+c[1]<h.length)return this.applyCompletion(e,h[+c[1]]),void l.preventDefault()}),this.dom.addEventListener("focusout",l=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(Me).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:zi.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:s,selected:o,disabled:a}=n.open;i.open&&i.open.options==s||(this.range=jl(s.length,o,e.state.facet(Me).maxRenderedOptions),this.showOptions(s,n.id)),this.updateSel(),a!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=jl(t.options.length,t.selected,this.view.state.facet(Me).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:i}=n;if(!i)return;let s=typeof i=="string"?document.createTextNode(i):i(n);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>Et(this.view.state,o,"completion info")):this.addInfoPane(s,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;n.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName=="LI"&&n.id?i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):i--;return t&&(function(n,i){let s=n.getBoundingClientRect(),o=i.getBoundingClientRect(),a=s.height/n.offsetHeight;o.top<s.top?n.scrollTop-=(s.top-o.top)/a:o.bottom>s.bottom&&(n.scrollTop+=(o.bottom-s.bottom)/a)})(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(Me).positionInfo(this.view,t,i,n,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let s=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:l}=e[o],{section:h}=a;if(h){let d=typeof h=="string"?h:h.name;d!=s&&(o>n.from||n.from==0)&&(s=d,typeof h!="string"&&h.header?i.appendChild(h.header(h)):i.appendChild(document.createElement("completion-section")).textContent=d)}let c=i.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let u=this.optionClass(a);u&&(c.className=u);for(let d of this.optionContent){let p=d(a,this.view.state,this.view,l);p&&c.appendChild(p)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}};Cc=class r{constructor(e,t,n,i,s,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=s,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new r(this.options,Bf(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,s,o){if(i&&!o&&e.some(h=>h.state==1))return i.setDisabled();let a=(function(h,c){let u=[],d=null,p=b=>{u.push(b);let{section:S}=b.completion;if(S){d||(d=[]);let x=typeof S=="string"?S:S.name;d.some(y=>y.name==x)||d.push(typeof S=="string"?{name:x}:S)}},f=c.facet(Me);for(let b of h)if(b.hasResult()){let S=b.result.getMatch;if(b.result.filter===!1)for(let x of b.result.options)p(new _o(x,b.source,S?S(x):[],1e9-u.length));else{let x,y=c.sliceDoc(b.from,b.to),v=f.filterStrict?new Pc(y):new Tc(y);for(let T of b.result.options)if(x=v.match(T.label)){let C=T.displayLabel?S?S(T,x.matched):[]:x.matched;p(new _o(T,b.source,C,x.score+(T.boost||0)))}}}if(d){let b=Object.create(null),S=0,x=(y,v)=>{var T,C;return((T=y.rank)!==null&&T!==void 0?T:1e9)-((C=v.rank)!==null&&C!==void 0?C:1e9)||(y.name<v.name?-1:1)};for(let y of d.sort(x))S-=1e5,b[y.name]=S;for(let y of u){let{section:v}=y.completion;v&&(y.score+=b[typeof v=="string"?v:v.name])}}let m=[],g=null,O=f.compareCompletions;for(let b of u.sort((S,x)=>x.score-S.score||O(S.completion,x.completion))){let S=b.completion;!g||g.label!=S.label||g.detail!=S.detail||g.type!=null&&S.type!=null&&g.type!=S.type||g.apply!=S.apply||g.boost!=S.boost?m.push(b):Zf(b.completion)>Zf(g)&&(m[m.length-1]=b),g=b.completion}return m})(e,t);if(!a.length)return i&&e.some(h=>h.state==1)?i.setDisabled():null;let l=t.facet(Me).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let h=i.options[i.selected].completion;for(let c=0;c<a.length;c++)if(a[c].completion==h){l=c;break}}return new r(a,Bf(n,l),{pos:e.reduce((h,c)=>c.hasResult()?Math.min(h,c.from):h,1e8),create:zw,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new r(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new r(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Qc=class r{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new r(Dw,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Me),i=(n.override||t.languageDataAt("autocomplete",vn(t)).map($w)).map(a=>(this.active.find(l=>l.source==a)||new sn(a,this.active.some(l=>l.state!=0)?1:0)).update(e,n));i.length==this.active.length&&i.every((a,l)=>a==this.active[l])&&(i=this.active);let s=this.open,o=e.effects.some(a=>a.is(eu));s&&e.docChanged&&(s=s.map(e.changes)),e.selection||i.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!(function(a,l){if(a==l)return!0;for(let h=0,c=0;;){for(;h<a.length&&!a[h].hasResult;)h++;for(;c<l.length&&!l[c].hasResult;)c++;let u=h==a.length,d=c==l.length;if(u||d)return u==d;if(a[h++].result!=l[c++].result)return!1}})(i,this.active)||o?s=Cc.build(i,t,this.id,s,n,o):s&&s.disabled&&!i.some(a=>a.state==1)&&(s=null),!s&&i.every(a=>a.state!=1)&&i.some(a=>a.hasResult())&&(i=i.map(a=>a.hasResult()?new sn(a.source,0):a));for(let a of e.effects)a.is(lO)&&(s=s&&s.setSelected(a.value,this.id));return i==this.active&&s==this.open?this:new r(i,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Lw:Mw}},Lw={"aria-autocomplete":"list"},Mw={};Dw=[];sn=class r{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=aO(e,t),i=this;(8&n||16&n&&this.touches(e))&&(i=new r(i.source,0)),4&n&&i.state==0&&(i=new r(this.source,1)),i=i.updateFor(e,n);for(let s of e.effects)if(s.is(Xo))i=new r(i.source,1,s.value?vn(e.state):-1);else if(s.is(zi))i=new r(i.source,0);else if(s.is(eu))for(let o of s.value)o.source==i.source&&(i=o);return i}updateFor(e,t){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new r(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(vn(e.state))}},Fo=class r extends sn{constructor(e,t,n,i,s){super(e,2,t),this.result=n,this.from=i,this.to=s}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=vn(e.state);if((this.explicitPos<0?a<=s:a<this.from)||a>o||!i||2&t&&vn(e.startState)==this.from)return new sn(this.source,4&t?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return(function(h,c,u,d){if(!h)return!1;let p=c.sliceDoc(u,d);return typeof h=="function"?h(p,u,d,c):oO(h,!0).test(p)})(i.validFor,e.state,s,o)?new r(this.source,l,i,s,o):i.update&&(i=i.update(i,s,o,new Di(e.state,a,l>=0)))?new r(this.source,l,i,i.from,(n=i.to)!==null&&n!==void 0?n:vn(e.state)):new sn(this.source,1,l)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new r(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new sn(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}},eu=se.define({map:(r,e)=>r.map(t=>t.map(e))}),lO=se.define(),lt=rt.define({create:()=>Qc.start(),update:(r,e)=>r.update(e),provide:r=>[Gc.from(r,e=>e.tooltip),V.contentAttributes.from(r,e=>e.attrs)]});zw=Nw(lt,tu);hO=r=>{let e=r.state.field(lt,!1);return!(r.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<r.state.facet(Me).interactionDelay)&&tu(r,e.open.options[e.open.selected])},Rc=r=>!!r.state.field(lt,!1)&&(r.dispatch({effects:Xo.of(!0)}),!0),cO=r=>{let e=r.state.field(lt,!1);return!(!e||!e.active.some(t=>t.state!=0))&&(r.dispatch({effects:zi.of(null)}),!0)},Ac=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Uk=Ge.fromClass(class{constructor(r){this.view=r,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of r.state.field(lt).active)e.state==1&&this.startQuery(e)}update(r){let e=r.state.field(lt),t=r.state.facet(Me);if(!r.selectionSet&&!r.docChanged&&r.startState.field(lt)==e)return;let n=r.transactions.some(s=>{let o=aO(s,t);return 8&o||(s.selection||s.docChanged)&&!(3&o)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(n||o.context.abortOnDocChange&&r.docChanged||o.updates.length+r.transactions.length>50&&Date.now()-o.time>1e3){for(let a of o.context.abortListeners)try{a()}catch(l){Et(this.view.state,l)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...r.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),r.transactions.some(s=>s.effects.some(o=>o.is(Xo)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.state==1&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of r.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:r}=this.view,e=r.field(lt);for(let t of e.active)t.state!=1||this.running.some(n=>n.active.source==t.source)||this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Me).updateSyncTime))}startQuery(r){let{state:e}=this.view,t=vn(e),n=new Di(e,t,r.explicitPos==t,this.view),i=new Ac(r,n);this.running.push(i),Promise.resolve(r.source(n)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:zi.of(null)}),Et(this.view.state,s)})}scheduleAccept(){this.running.every(r=>r.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Me).updateSyncTime))}accept(){var r;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Me),n=this.view.state.field(lt);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let a=new Fo(s.active.source,s.active.explicitPos,s.done,s.done.from,(r=s.done.to)!==null&&r!==void 0?r:vn(s.updates.length?s.updates[0].startState:this.view.state));for(let l of s.updates)a=a.update(l,t);if(a.hasResult()){e.push(a);continue}}let o=n.active.find(a=>a.source==s.active.source);if(o&&o.state==1)if(s.done==null){let a=new sn(s.active.source,0);for(let l of s.updates)a=a.update(l,t);a.state!=1&&e.push(a)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:eu.of(e)})}},{eventHandlers:{blur(r){let e=this.view.state.field(lt,!1);if(e&&e.tooltip&&this.view.state.facet(Me).closeOnBlur){let t=e.open&&Lg(this.view,e.open.tooltip);t&&t.dom.contains(r.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:zi.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Xo.of(!1)}),20),this.composing=0}}}),_w=typeof navigator=="object"&&/Win/.test(navigator.platform),Wk=un.highest(V.domEventHandlers({keydown(r,e){let t=e.state.field(lt,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||r.key.length>1||r.ctrlKey&&(!_w||!r.altKey)||r.metaKey)return!1;let n=t.open.options[t.open.selected],i=t.active.find(o=>o.source==n.source),s=n.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(r.key)>-1&&tu(e,n),!1}})),Xw=V.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Ec=class{constructor(e,t,n,i){this.field=e,this.line=t,this.from=n,this.to=i}},$c=class r{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,Le.TrackDel),n=e.mapPos(this.to,1,Le.TrackDel);return t==null||n==null?null:new r(this.field,t,n)}},Ic=class r{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(n.length){let h=o,c=/^\t*/.exec(l)[0].length;for(let u=0;u<c;u++)h+=e.facet(Yo);i.push(t+h.length-c),l=h+l.slice(c)}n.push(l),t+=l.length+1}let a=this.fieldPositions.map(l=>new $c(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:n,ranges:a}}static parse(e){let t,n=[],i=[],s=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let a=t[1]?+t[1]:null,l=t[2]||t[3]||"",h=-1,c=l.replace(/\\[{}]/g,u=>u[1]);for(let u=0;u<n.length;u++)(a!=null?n[u].seq==a:c&&n[u].name==c)&&(h=u);if(h<0){let u=0;for(;u<n.length&&(a==null||n[u].seq!=null&&n[u].seq<a);)u++;n.splice(u,0,{seq:a,name:c}),h=u;for(let d of s)d.field>=h&&d.field++}s.push(new Ec(h,i.length,t.index,t.index+c.length)),o=o.slice(0,t.index)+l+o.slice(t.index+t[0].length)}o=o.replace(/\\([{}])/g,(a,l,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return l}),i.push(o)}return new r(i,s)}},Fw=q.widget({widget:new class extends cn{toDOM(){let r=document.createElement("span");return r.className="cm-snippetFieldPosition",r}ignoreEvent(){return!1}}}),Zw=q.mark({class:"cm-snippetField"}),Mr=class r{constructor(e,t){this.ranges=e,this.active=t,this.deco=q.set(e.map(n=>(n.from==n.to?Fw:Zw).range(n.from,n.to)))}map(e){let t=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;t.push(i)}return new r(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}},Xi=se.define({map:(r,e)=>r&&r.map(e)}),Bw=se.define(),_i=rt.define({create:()=>null,update(r,e){for(let t of e.effects){if(t.is(Xi))return t.value;if(t.is(Bw)&&r)return new Mr(r.ranges,t.value)}return r&&e.docChanged&&(r=r.map(e.changes)),r&&e.selection&&!r.selectionInsideField(e.selection)&&(r=null),r},provide:r=>V.decorations.from(r,e=>e?e.deco:q.none)});Vw=[{key:"Tab",run:jf(1),shift:jf(-1)},{key:"Escape",run:({state:r,dispatch:e})=>!!r.field(_i,!1)&&(e(r.update({effects:Xi.of(null)})),!0)}],Vf=D.define({combine:r=>r.length?r[0]:Vw}),Hw=un.highest(Wo.compute([Vf],r=>r.facet(Vf)));Uw=V.domEventHandlers({mousedown(r,e){let t,n=e.state.field(_i,!1);if(!n||(t=e.posAtCoords({x:r.clientX,y:r.clientY}))==null)return!1;let i=n.ranges.find(s=>s.from<=t&&s.to>=t);return!(!i||i.field==n.active)&&(e.dispatch({selection:nu(n.ranges,i.field),effects:Xi.of(n.ranges.some(s=>s.field>i.field)?new Mr(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Zo={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},_n=se.define({map(r,e){let t=e.mapPos(r,-1,Le.TrackAfter);return t??void 0}}),Nc=new class extends rn{};Nc.startSide=1,Nc.endSide=-1;Ww=rt.define({create:()=>Se.empty,update(r,e){if(r=r.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);r=r.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(_n)&&(r=r.update({add:[Nc.range(t.value,t.value+1)]}));return r}}),Hf="()[]{}<>";qw=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Gk=V.inputHandler.of((r,e,t,n)=>{if((qw?r.composing:r.compositionStarted)||r.state.readOnly)return!1;let i=r.state.selection.main;if(n.length>2||n.length==2&&nn(Ct(n,0))==1||e!=i.from||t!=i.to)return!1;let s=(function(o,a){let l=Yw(o,o.selection.main.head),h=l.brackets||Zo.brackets;for(let c of h){let u=Gw(Ct(c,0));if(a==c)return u==c?ev(o,c,h.indexOf(c+c+c)>-1,l):Kw(o,c,u,l.before||Zo.before);if(a==u&&uO(o,o.selection.main.from))return Jw(o,c,u)}return null})(r.state,n);return!!s&&(r.dispatch(s),!0)});tv=[{key:"Ctrl-Space",run:Rc},{mac:"Alt-`",run:Rc},{key:"Escape",run:cO},{key:"ArrowDown",run:ui(!0)},{key:"ArrowUp",run:ui(!1)},{key:"PageDown",run:ui(!0,"page")},{key:"PageUp",run:ui(!1,"page")},{key:"Enter",run:hO}],Yk=un.highest(Wo.computeN([Me],r=>r.facet(Me).defaultKeymap?[tv]:[]));qk=dO(nv,0),Kk=dO((r,e)=>(function(t,n,i=n.selection.ranges){let s=i.map(a=>pO(n,a.from).block);if(!s.every(a=>a))return null;let o=i.map((a,l)=>(function(h,{open:c,close:u},d,p){let f,m,g=h.sliceDoc(d-ti,d),O=h.sliceDoc(p,p+ti),b=/\s*$/.exec(g)[0].length,S=/^\s*/.exec(O)[0].length,x=g.length-b;if(g.slice(x-c.length,x)==c&&O.slice(S,S+u.length)==u)return{open:{pos:d-b,margin:b&&1},close:{pos:p+S,margin:S&&1}};p-d<=2*ti?f=m=h.sliceDoc(d,p):(f=h.sliceDoc(d,d+ti),m=h.sliceDoc(p-ti,p));let y=/^\s*/.exec(f)[0].length,v=/\s*$/.exec(m)[0].length,T=m.length-v-u.length;return f.slice(y,y+c.length)==c&&m.slice(T,T+u.length)==u?{open:{pos:d+y+c.length,margin:/\s/.test(f.charAt(y+c.length))?1:0},close:{pos:p-v-u.length,margin:/\s/.test(m.charAt(T-1))?1:0}}:null})(n,s[l],a.from,a.to));if(t!=2&&!o.every(a=>a))return{changes:n.changes(i.map((a,l)=>o[l]?[]:[{from:a.from,insert:s[l].open+" "},{from:a.to,insert:" "+s[l].close}]))};if(t!=1&&o.some(a=>a)){let a=[];for(let l,h=0;h<o.length;h++)if(l=o[h]){let c=s[h],{open:u,close:d}=l;a.push({from:u.pos-c.open.length,to:u.pos+u.margin},{from:d.pos-d.margin,to:d.pos+c.close.length})}return{changes:a}}return null})(r,e,(function(t){let n=[];for(let i of t.selection.ranges){let s=t.doc.lineAt(i.from),o=i.to<=s.to?s:t.doc.lineAt(i.to),a=n.length-1;a>=0&&n[a].to>s.from?n[a].to=o.to:n.push({from:s.from+/^\s*/.exec(s.text)[0].length,to:o.to})}return n})(e)),0);ti=50;Lc=St.define(),rv=St.define(),iv=D.define(),sv=D.define({combine:r=>dn(r,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,i)=>e(n,i)||t(n,i)})}),ov=rt.define({create:()=>Fn.empty,update(r,e){let t=e.state.facet(sv),n=e.annotation(Lc);if(n){let l=e.docChanged?$.single((function(d){let p=0;return d.iterChangedRanges((f,m)=>p=m),p})(e.changes)):void 0,h=At.fromTransaction(e,l),c=n.side,u=c==0?r.undone:r.done;return u=h?Bo(u,u.length,t.minDepth,h):mO(u,e.startState.selection),new Fn(c==0?n.rest:u,c==0?u:n.rest)}let i=e.annotation(rv);if(i!="full"&&i!="before"||(r=r.isolate()),e.annotation($e.addToHistory)===!1)return e.changes.empty?r:r.addMapping(e.changes.desc);let s=At.fromTransaction(e),o=e.annotation($e.time),a=e.annotation($e.userEvent);return s?r=r.addChanges(s,o,a,t,e):e.selection&&(r=r.addSelection(e.startState.selection,o,a,t.newGroupDelay)),i!="full"&&i!="after"||(r=r.isolate()),r},toJSON:r=>({done:r.done.map(e=>e.toJSON()),undone:r.undone.map(e=>e.toJSON())}),fromJSON:r=>new Fn(r.done.map(At.fromJSON),r.undone.map(At.fromJSON))});av=Ko(0,!1),lv=Ko(1,!1),hv=Ko(0,!0),cv=Ko(1,!0),At=class r{constructor(e,t,n,i,s){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new r(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new r(e.changes&&nt.fromJSON(e.changes),[],e.mapped&&on.fromJSON(e.mapped),e.startSelection&&$.fromJSON(e.startSelection),e.selectionsAfter.map($.fromJSON))}static fromTransaction(e,t){let n=yt;for(let i of e.startState.facet(iv)){let s=i(e);s.length&&(n=n.concat(s))}return!n.length&&e.changes.empty?null:new r(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,yt)}static selection(e){return new r(void 0,yt,void 0,void 0,e)}};yt=[],uv=200;fv=/^(input\.type|delete)($|\.)/,Fn=class r{constructor(e,t,n=0,i=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new r(this.done,this.undone):this}addChanges(e,t,n,i,s){let o=this.done,a=o[o.length-1];return o=a&&a.changes&&!a.changes.empty&&e.changes&&(!n||fv.test(n))&&(!a.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,(function(l,h){let c=[],u=!1;return l.iterChangedRanges((d,p)=>c.push(d,p)),h.iterChangedRanges((d,p,f,m)=>{for(let g=0;g<c.length;){let O=c[g++],b=c[g++];m>=O&&f<=b&&(u=!0)}}),u})(a.changes,e.changes))||n=="input.type.compose")?Bo(o,o.length-1,i.minDepth,new At(e.changes.compose(a.changes),fO(e.effects,a.effects),a.mapped,a.startSelection,yt)):Bo(o,o.length,i.minDepth,e),new r(o,yt,t,n)}addSelection(e,t,n,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:yt;return s.length>0&&t-this.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(o=s[s.length-1],a=e,o.ranges.length==a.ranges.length&&o.ranges.filter((l,h)=>l.empty!=a.ranges[h].empty).length===0)?this:new r(mO(this.done,e),this.undone,t,n);var o,a}addMapping(e){return new r(Vl(this.done,e),Vl(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1];if(n&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Lc.of({side:e,rest:dv(i)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let o=i.length==1?yt:i.slice(0,i.length-1);return s.mapped&&(o=Vl(o,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Lc.of({side:e,rest:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}return null}};Fn.empty=new Fn(yt,yt);Gf=r=>gO(r,!xt(r)),Yf=r=>gO(r,xt(r));bO=r=>OO(r,!xt(r)),SO=r=>OO(r,xt(r));qf=r=>yO(r,!1),Kf=r=>yO(r,!0);Jf=r=>wO(r,!1),Hl=r=>wO(r,!0);em=r=>vO(r,!xt(r)),tm=r=>vO(r,xt(r));PO=r=>TO(r,!xt(r)),kO=r=>TO(r,xt(r));nm=r=>CO(r,!1),rm=r=>CO(r,!0);im=r=>QO(r,!1),sm=r=>QO(r,!0),om=({state:r,dispatch:e})=>(e(Yn(r,{anchor:0})),!0),am=({state:r,dispatch:e})=>(e(Yn(r,{anchor:r.doc.length})),!0),lm=({state:r,dispatch:e})=>(e(Yn(r,{anchor:r.selection.main.anchor,head:0})),!0),hm=({state:r,dispatch:e})=>(e(Yn(r,{anchor:r.selection.main.anchor,head:r.doc.length})),!0);RO=(r,e)=>yi(r,t=>{let n,i,s=t.from,{state:o}=r,a=o.doc.lineAt(s);if(!e&&s>a.from&&s<a.from+200&&!/[^ \t]/.test(n=a.text.slice(0,s-a.from))){if(n[n.length-1]==" ")return s-1;let l=Zc(n,o.tabSize)%lc(o)||lc(o);for(let h=0;h<l&&n[n.length-1-h]==" ";h++)s--;i=s}else i=et(a.text,s-a.from,e,e)+a.from,i==s&&a.number!=(e?o.doc.lines:1)&&(i+=e?1:-1);return i}),Ul=r=>RO(r,!1),cm=r=>RO(r,!0),AO=(r,e)=>yi(r,t=>{let n=t.head,{state:i}=r,s=i.doc.lineAt(n),o=i.charCategorizer(n);for(let a=null;;){if(n==(e?s.to:s.from)){n==t.head&&s.number!=(e?i.doc.lines:1)&&(n+=e?1:-1);break}let l=et(s.text,n-s.from,e)+s.from,h=s.text.slice(Math.min(n,l)-s.from,Math.max(n,l)-s.from),c=o(h);if(a!=null&&c!=a)break;h==" "&&n==t.head||(a=c),n=l}return n}),um=r=>AO(r,!1),EO=mv(!1);gv=[{key:"ArrowLeft",run:Gf,shift:em,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:bO,shift:PO,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:r=>tn(r,e=>gn(r,e,!xt(r))),shift:r=>jt(r,e=>gn(r,e,!xt(r))),preventDefault:!0},{key:"ArrowRight",run:Yf,shift:tm,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:SO,shift:kO,preventDefault:!0},{mac:"Cmd-ArrowRight",run:r=>tn(r,e=>gn(r,e,xt(r))),shift:r=>jt(r,e=>gn(r,e,xt(r))),preventDefault:!0},{key:"ArrowUp",run:qf,shift:nm,preventDefault:!0},{mac:"Cmd-ArrowUp",run:om,shift:lm},{mac:"Ctrl-ArrowUp",run:Jf,shift:im},{key:"ArrowDown",run:Kf,shift:rm,preventDefault:!0},{mac:"Cmd-ArrowDown",run:am,shift:hm},{mac:"Ctrl-ArrowDown",run:Hl,shift:sm},{key:"PageUp",run:Jf,shift:im},{key:"PageDown",run:Hl,shift:sm},{key:"Home",run:r=>tn(r,e=>gn(r,e,!1)),shift:r=>jt(r,e=>gn(r,e,!1)),preventDefault:!0},{key:"Mod-Home",run:om,shift:lm},{key:"End",run:r=>tn(r,e=>gn(r,e,!0)),shift:r=>jt(r,e=>gn(r,e,!0)),preventDefault:!0},{key:"Mod-End",run:am,shift:hm},{key:"Enter",run:EO},{key:"Mod-a",run:({state:r,dispatch:e})=>(e(r.update({selection:{anchor:0,head:r.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Ul,shift:Ul},{key:"Delete",run:cm},{key:"Mod-Backspace",mac:"Alt-Backspace",run:um},{key:"Mod-Delete",mac:"Alt-Delete",run:r=>AO(r,!0)},{mac:"Mod-Backspace",run:r=>yi(r,e=>{let t=r.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)})},{mac:"Mod-Delete",run:r=>yi(r,e=>{let t=r.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(r.state.doc.length,e.head+1)})}].concat([{key:"Ctrl-b",run:Gf,shift:em,preventDefault:!0},{key:"Ctrl-f",run:Yf,shift:tm},{key:"Ctrl-p",run:qf,shift:nm},{key:"Ctrl-n",run:Kf,shift:rm},{key:"Ctrl-a",run:r=>tn(r,e=>$.cursor(r.lineBlockAt(e.head).from,1)),shift:r=>jt(r,e=>$.cursor(r.lineBlockAt(e.head).from))},{key:"Ctrl-e",run:r=>tn(r,e=>$.cursor(r.lineBlockAt(e.head).to,-1)),shift:r=>jt(r,e=>$.cursor(r.lineBlockAt(e.head).to))},{key:"Ctrl-d",run:cm},{key:"Ctrl-h",run:Ul},{key:"Ctrl-k",run:r=>yi(r,e=>{let t=r.lineBlockAt(e.head).to;return e.head<t?t:Math.min(r.state.doc.length,e.head+1)})},{key:"Ctrl-Alt-h",run:um},{key:"Ctrl-o",run:({state:r,dispatch:e})=>{if(r.readOnly)return!1;let t=r.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:ie.of(["",""])},range:$.cursor(n.from)}));return e(r.update(t,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:r,dispatch:e})=>{if(r.readOnly)return!1;let t=r.changeByRange(n=>{if(!n.empty||n.from==0||n.from==r.doc.length)return{range:n};let i=n.from,s=r.doc.lineAt(i),o=i==s.from?i-1:et(s.text,i-s.from,!1)+s.from,a=i==s.to?i+1:et(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:a,insert:r.doc.slice(i,a).append(r.doc.slice(o,i))},range:$.cursor(a)}});return!t.changes.empty&&(e(r.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Hl}].map(r=>({mac:r.key,run:r.run,shift:r.shift}))),Ov={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},bv={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},dm={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};pm=null,fm=null,mm=0;yv=63,xv=33;wv=[6,10,7,8,9],vv=new zo({start:null,shift:(r,e,t,n)=>wv.indexOf(e)>-1?new gm(Mc(n,1)||"",r):r,reduce:(r,e)=>e==20&&r?r.parent:r,reuse(r,e,t,n){let i=e.type.id;return i==6||i==36?new gm(Mc(n,1)||"",r):r},strict:!1}),Tv=new Ye((r,e)=>{if(r.next!=60)return void(r.next<0&&e.context&&r.acceptToken(57));r.advance();let t=r.next==47;t&&r.advance();let n=Mc(r,0);if(n===void 0)return;if(!n)return r.acceptToken(t?14:6);let i=e.context?e.context.name:null;if(t){if(n==i)return r.acceptToken(11);if(i&&bv[i])return r.acceptToken(57,-2);if(e.dialectEnabled(0))return r.acceptToken(12);for(let s=e.context;s;s=s.parent)if(s.name==n)return;r.acceptToken(13)}else{if(n=="script")return r.acceptToken(7);if(n=="style")return r.acceptToken(8);if(n=="textarea")return r.acceptToken(9);if(Ov.hasOwnProperty(n))return r.acceptToken(10);i&&dm[i]&&dm[i][n]?r.acceptToken(57,-1):r.acceptToken(6)}},{contextual:!0}),Pv=new Ye(r=>{for(let e=0,t=0;;t++){if(r.next<0){t&&r.acceptToken(58);break}if(r.next==45)e++;else{if(r.next==62&&e>=2){t>=3&&r.acceptToken(58,-2);break}e=0}r.advance()}}),kv=new Ye((r,e)=>{if(r.next==47&&r.peek(1)==62){let t=e.dialectEnabled(1)||(function(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1})(e.context);r.acceptToken(t?5:4,2)}else r.next==62&&r.acceptToken(4,1)});Cv=su("script",54,1),Qv=su("style",55,2),Rv=su("textarea",56,3),Av=Go({"Text RawText":w.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":w.angleBracket,TagName:w.tagName,"MismatchedCloseTag/TagName":[w.tagName,w.invalid],AttributeName:w.attributeName,"AttributeValue UnquotedAttributeValue":w.attributeValue,Is:w.definitionOperator,"EntityReference CharacterReference":w.character,Comment:w.blockComment,ProcessingInst:w.processingInstruction,DoctypeDecl:w.documentMeta}),Ev=Nr.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#D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USOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OT}OhyO~OS!POT}OhyO~OS!ROT}OhyO~OS!TOT}OhyO~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:vv,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[Av],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;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!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Cv,Qv,Rv,kv,Tv,Pv,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});Dc=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],$v=new zo({start:!1,shift:(r,e)=>e==5||e==6||e==320?r:e==321,strict:!1}),Iv=new Ye((r,e)=>{let{next:t}=r;(t==125||t==-1||e.context)&&r.acceptToken(318)},{contextual:!0,fallback:!0}),Nv=new Ye((r,e)=>{let t,{next:n}=r;Dc.indexOf(n)>-1||(n!=47||(t=r.peek(1))!=47&&t!=42)&&(n==125||n==59||n==-1||e.context||r.acceptToken(316))},{contextual:!0}),Lv=new Ye((r,e)=>{r.next!=91||e.context||r.acceptToken(317)},{contextual:!0}),Mv=new Ye((r,e)=>{let{next:t}=r;if(t==43||t==45){if(r.advance(),t==r.next){r.advance();let n=!e.context&&e.canShift(1);r.acceptToken(n?1:2)}}else t==63&&r.peek(1)==46&&(r.advance(),r.advance(),(r.next<48||r.next>57)&&r.acceptToken(3))},{contextual:!0});Dv=new Ye((r,e)=>{if(r.next!=60||!e.dialectEnabled(0)||(r.advance(),r.next==47))return;let t=0;for(;Dc.indexOf(r.next)>-1;)r.advance(),t++;if(Gl(r.next,!0)){for(r.advance(),t++;Gl(r.next,!1);)r.advance(),t++;for(;Dc.indexOf(r.next)>-1;)r.advance(),t++;if(r.next==44)return;for(let n=0;;n++){if(n==7){if(!Gl(r.next,!0))return;break}if(r.next!="extends".charCodeAt(n))break;r.advance(),t++}}r.acceptToken(4,-t)}),zv=Go({"get set async static":w.modifier,"for while do if else switch try catch finally return throw break continue default case defer":w.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":w.operatorKeyword,"let var const using function class extends":w.definitionKeyword,"import export from":w.moduleKeyword,"with debugger new":w.keyword,TemplateString:w.special(w.string),super:w.atom,BooleanLiteral:w.bool,this:w.self,null:w.null,Star:w.modifier,VariableName:w.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":w.function(w.variableName),VariableDefinition:w.definition(w.variableName),Label:w.labelName,PropertyName:w.propertyName,PrivatePropertyName:w.special(w.propertyName),"CallExpression/MemberExpression/PropertyName":w.function(w.propertyName),"FunctionDeclaration/VariableDefinition":w.function(w.definition(w.variableName)),"ClassDeclaration/VariableDefinition":w.definition(w.className),"NewExpression/VariableName":w.className,PropertyDefinition:w.definition(w.propertyName),PrivatePropertyDefinition:w.definition(w.special(w.propertyName)),UpdateOp:w.updateOperator,"LineComment Hashbang":w.lineComment,BlockComment:w.blockComment,Number:w.number,String:w.string,Escape:w.escape,ArithOp:w.arithmeticOperator,LogicOp:w.logicOperator,BitOp:w.bitwiseOperator,CompareOp:w.compareOperator,RegExp:w.regexp,Equals:w.definitionOperator,Arrow:w.function(w.punctuation),": Spread":w.punctuation,"( )":w.paren,"[ ]":w.squareBracket,"{ }":w.brace,"InterpolationStart InterpolationEnd":w.special(w.brace),".":w.derefOperator,", ;":w.separator,"@":w.meta,TypeName:w.typeName,TypeDefinition:w.definition(w.typeName),"type enum interface implements namespace module declare":w.definitionKeyword,"abstract global Privacy readonly override":w.modifier,"is keyof unique infer asserts":w.operatorKeyword,JSXAttributeValue:w.attributeValue,JSXText:w.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":w.angleBracket,"JSXIdentifier JSXNameSpacedName":w.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":w.attributeName,"JSXBuiltin/JSXIdentifier":w.standard(w.tagName)}),_v={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Xv={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},Fv={__proto__:null,"<":193},Zv=Nr.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#Gs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P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"\u26A0 ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:$v,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[zv],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]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>Fv[r]||-1}],tokenPrec:15201}),ou=[Je("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Je("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Je("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Je("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Je("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Je(`try {
11
+ \${}
12
+ } catch (\${error}) {
13
+ \${}
14
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Je("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Je(`if (\${}) {
15
+ \${}
16
+ } else {
17
+ \${}
18
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Je(`class \${name} {
19
+ constructor(\${params}) {
20
+ \${}
21
+ }
22
+ }`,{label:"class",detail:"definition",type:"keyword"}),Je('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Je('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LO=ou.concat([Je("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Je("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Je("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),bm=new ho,MO=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);Bv=["FunctionDeclaration"],jv={FunctionDeclaration:ni("function"),ClassDeclaration:ni("class"),ClassExpression:()=>!0,EnumDeclaration:ni("constant"),TypeAliasDeclaration:ni("type"),NamespaceDeclaration:ni("namespace"),VariableDefinition(r,e){r.matchContext(Bv)||e(r,"variable")},TypeDefinition(r,e){e(r,"type")},__proto__:null};jo=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,au=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];wt=Ar.define({name:"javascript",parser:Zv.configure({props:[qo.add({IfStatement:ao({except:/^\s*({|else\b)/}),TryStatement:ao({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:K1,SwitchBody:r=>{let e=r.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return r.baseIndent+(t?0:n?1:2)*r.unit},Block:q1({closing:"}"}),ArrowFunction:r=>r.baseIndent+r.unit,"TemplateString BlockComment":()=>null,"Statement Property":ao({except:/^{/}),JSXElement(r){let e=/^\s*<\//.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},JSXEscape(r){let e=/\s*\}/.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},"JSXOpenTag JSXSelfClosingTag":r=>r.column(r.node.from)+r.unit}),qc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Bg,BlockComment:r=>({from:r.from+2,to:r.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),_O={test:r=>/^JSX/.test(r.name),facet:_g({commentTokens:{block:{open:"{/*",close:"*/}"}}})},lu=wt.configure({dialect:"ts"},"typescript"),hu=wt.configure({dialect:"jsx",props:[Yc.add(r=>r.isTop?[_O]:void 0)]}),cu=wt.configure({dialect:"jsx ts",props:[Yc.add(r=>r.isTop?[_O]:void 0)]},"typescript"),XO=r=>({label:r,type:"keyword"}),FO="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(XO),Vv=FO.concat(["declare","implements","private","protected","public"].map(XO));Hv=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),BO=V.inputHandler.of((r,e,t,n,i)=>{if((Hv?r.composing:r.compositionStarted)||r.state.readOnly||e!=t||n!=">"&&n!="/"||!wt.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var h;let c,{head:u}=l,d=Te(o).resolveInner(u-1,-1);if(d.name=="JSXStartTag"&&(d=d.parent),!(o.doc.sliceString(u-1,u)!=n||d.name=="JSXAttributeValue"&&d.to>u)){if(n==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(n=="/"&&d.name=="JSXStartCloseTag"){let p=d.parent,f=p.parent;if(f&&p.from==u-2&&((c=ym(o.doc,f.firstChild,u))||((h=f.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let m=`${c}>`;return{range:$.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(n==">"){let p=(function(f){for(;;){if(f.name=="JSXOpenTag"||f.name=="JSXSelfClosingTag"||f.name=="JSXFragmentTag")return f;if(f.name=="JSXEscape"||!f.parent)return null;f=f.parent}})(d);if(p&&!/^\/?>|^<\//.test(o.doc.sliceString(u,u+2))&&(c=ym(o.doc,p,u)))return{range:l,changes:{from:u,insert:`</${c}>`}}}}return{range:l}});return!a.changes.empty&&(r.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});Wv=Object.freeze({__proto__:null,autoCloseTags:BO,completionPath:Sm,esLint:function(r,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},r.getRules().forEach((t,n)=>{t.meta.docs.recommended&&(e.rules[n]=2)})),t=>{let{state:n}=t,i=[];for(let{from:s,to:o}of wt.findRegions(n)){let a=n.doc.lineAt(s),l={line:a.number-1,col:s-a.from,pos:s};for(let h of r.verify(n.sliceDoc(s,o),e))i.push(Uv(h,n.doc,l))}return i}},javascript:ZO,javascriptLanguage:wt,jsxLanguage:hu,localCompletionSource:zO,scopeCompletionSource:function(r){let e=new Map;return t=>{let n=Sm(t);if(!n)return null;let i=r;for(let o of n.path)if(i=i[o],!i)return null;let s=e.get(i);return s||e.set(i,s=(function(o,a){let l=[],h=new Set;for(let c=0;;c++){for(let d of(Object.getOwnPropertyNames||Object.keys)(o)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(d)||h.has(d))continue;let p;h.add(d);try{p=o[d]}catch{continue}l.push({label:d,type:typeof p=="function"?/^[A-Z]/.test(d)?"class":a?"function":"method":a?"variable":"property",boost:-c})}let u=Object.getPrototypeOf(o);if(!u)return l;o=u}})(i,!n.path.length)),{from:t.pos-n.name.length,options:s,validFor:jo}}},snippets:ou,tsxLanguage:cu,typescriptLanguage:lu,typescriptSnippets:LO}),ri=["_blank","_self","_top","_parent"],ql=["ascii","utf-8","utf-16","latin1","latin1"],Kl=["get","post","put","delete"],Jl=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],at=["true","false"],X={},Gv={a:{attrs:{href:null,ping:null,type:null,media:null,target:ri,hreflang:null}},abbr:X,address:X,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:X,aside:X,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:X,base:{attrs:{href:null,target:ri}},bdi:X,bdo:X,blockquote:{attrs:{cite:null}},body:X,br:X,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Jl,formmethod:Kl,formnovalidate:["novalidate"],formtarget:ri,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:X,center:X,cite:X,code:X,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:X,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:X,div:X,dl:X,dt:X,em:X,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:X,figure:X,footer:X,form:{attrs:{action:null,name:null,"accept-charset":ql,autocomplete:["on","off"],enctype:Jl,method:Kl,novalidate:["novalidate"],target:ri}},h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:X,hgroup:X,hr:X,html:{attrs:{manifest:null}},i:X,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Jl,formmethod:Kl,formnovalidate:["novalidate"],formtarget:ri,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:X,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:X,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:X,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:ql,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:X,noscript:X,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:X,param:{attrs:{name:null,value:null}},pre:X,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:X,rt:X,ruby:X,samp:X,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:ql}},section:X,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:X,source:{attrs:{src:null,type:null,media:null}},span:X,strong:X,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:X,summary:X,sup:X,table:X,tbody:X,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:X,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:X,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:X,time:{attrs:{datetime:null}},title:X,tr:X,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:X,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:X},jO={accesskey:null,class:null,contenteditable:at,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:at,autocorrect:at,autocapitalize:at,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":at,"aria-autocomplete":["inline","list","both","none"],"aria-busy":at,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":at,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":at,"aria-hidden":at,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":at,"aria-multiselectable":at,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":at,"aria-relevant":null,"aria-required":at,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},VO="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(r=>"on"+r);for(let r of VO)jO[r]=null;Gn=class{constructor(e,t){this.tags={...Gv,...e},this.globalAttrs={...jO,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};Gn.default=new Gn;UO=/^[:\-\.\w\u00b7-\uffff]*$/;qv=wt.parser.configure({top:"SingleExpression"}),YO=[{tag:"script",attrs:r=>r.type=="text/typescript"||r.lang=="ts",parser:lu.parser},{tag:"script",attrs:r=>r.type=="text/babel"||r.type=="text/jsx",parser:hu.parser},{tag:"script",attrs:r=>r.type=="text/typescript-jsx",parser:cu.parser},{tag:"script",attrs:r=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(r.type),parser:qv},{tag:"script",attrs:r=>!r.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(r.type),parser:wt.parser},{tag:"style",attrs:r=>(!r.lang||r.lang=="css")&&(!r.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(r.type)),parser:Lr.parser}],qO=[{name:"style",parser:Lr.parser.configure({top:"Styles"})}].concat(VO.map(r=>({name:r,parser:wt.parser}))),KO=Ar.define({name:"html",parser:Ev.configure({props:[qo.add({Element(r){let e=/^(\s*)(<\/)?/.exec(r.textAfter);return r.node.to<=r.pos+e[0].length?r.continue():r.lineIndent(r.node.from)+(e[2]?0:r.unit)},"OpenTag CloseTag SelfClosingTag":r=>r.column(r.node.from)+r.unit,Document(r){if(r.pos+/\s*/.exec(r.textAfter)[0].length<r.node.to)return r.continue();let e,t=null;for(let n=r.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;t=n=i}return t&&(!(e=t.lastChild)||e.name!="CloseTag"&&e.name!="SelfClosingTag")?r.lineIndent(t.from)+r.unit:null}}),qc.add({Element(r){let e=r.firstChild,t=r.lastChild;return e&&e.name=="OpenTag"?{from:e.to,to:t.name=="CloseTag"?t.from:r.to}:null}}),Gg.add({"OpenTag CloseTag":r=>r.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),xi=KO.configure({wrap:NO(YO,qO)});Tm=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),JO=V.inputHandler.of((r,e,t,n,i)=>{if(r.composing||r.state.readOnly||e!=t||n!=">"&&n!="/"||!xi.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:o}=s,a=o.changeByRange(l=>{var h,c,u;let d,p=o.doc.sliceString(l.from-1,l.to)==n,{head:f}=l,m=Te(o).resolveInner(f,-1);if(p&&n==">"&&m.name=="EndTag"){let g=m.parent;if(((c=(h=g.parent)===null||h===void 0?void 0:h.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(d=Dr(o.doc,g.parent,f))&&!Tm.has(d))return{range:l,changes:{from:f,to:f+(o.doc.sliceString(f,f+1)===">"?1:0),insert:`</${d}>`}}}else if(p&&n=="/"&&m.name=="IncompleteCloseTag"){let g=m.parent;if(m.from==f-2&&((u=g.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(d=Dr(o.doc,g,f))&&!Tm.has(d)){let O=f+(o.doc.sliceString(f,f+1)===">"?1:0),b=`${d}>`;return{range:$.cursor(f+b.length,-1),changes:{from:f,to:O,insert:b}}}}return{range:l}});return!a.changes.empty&&(r.dispatch([s,o.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Jv=Object.freeze({__proto__:null,autoCloseTags:JO,html:Kv,htmlCompletionSource:Yv,htmlCompletionSourceWith:GO,htmlLanguage:xi}),Pm=typeof String.prototype.normalize=="function"?r=>r.normalize("NFKD"):r=>r,Vo=class{constructor(e,t,n=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=s?a=>s(Pm(a)):Pm,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ct(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=_c(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=nn(e);let i=this.normalize(t);for(let s=0,o=n;;s++){let a=i.charCodeAt(s),l=this.match(a,o);if(s==i.length-1){if(l)return this.value=l,this;break}o==n&&s<t.length&&t.charCodeAt(s)==a&&o++}}}match(e,t){let n=null;for(let i=0;i<this.matches.length;i+=2){let s=this.matches[i],o=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?n={from:this.matches[i+1],to:t+1}:(this.matches[i]++,o=!0)),o||(this.matches.splice(i,2),i-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?n={from:t,to:t+1}:this.matches.push(1,t)),n&&this.test&&!this.test(n.from,n.to,this.buffer,this.bufferStart)&&(n=null),n}};typeof Symbol<"u"&&(Vo.prototype[Symbol.iterator]=function(){return this});eT={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},tT=D.define({combine:r=>dn(r,eT,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),nT=q.mark({class:"cm-selectionMatch"}),rT=q.mark({class:"cm-selectionMatch cm-selectionMatch-main"});Jk=Ge.fromClass(class{constructor(r){this.decorations=this.getDeco(r)}update(r){(r.selectionSet||r.docChanged||r.viewportChanged)&&(this.decorations=this.getDeco(r.view))}getDeco(r){let e=r.state.facet(tT),{state:t}=r,n=t.selection;if(n.ranges.length>1)return q.none;let i,s=n.main,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return q.none;let l=t.wordAt(s.head);if(!l)return q.none;o=t.charCategorizer(s.head),i=t.sliceDoc(l.from,l.to)}else{let l=s.to-s.from;if(l<e.minSelectionLength||l>200)return q.none;if(e.wholeWords){if(i=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!km(o,t,s.from,s.to)||!(function(h,c,u,d){return h(c.sliceDoc(u,u+1))==Xe.Word&&h(c.sliceDoc(d-1,d))==Xe.Word})(o,t,s.from,s.to))return q.none}else if(i=t.sliceDoc(s.from,s.to).trim(),!i)return q.none}let a=[];for(let l of r.visibleRanges){let h=new Vo(t.doc,i,l.from,l.to);for(;!h.next().done;){let{from:c,to:u}=h.value;if((!o||km(o,t,c,u))&&(s.empty&&c<=s.from&&u>=s.to?a.push(rT.range(c,u)):(c>=s.to||u<=s.from)&&a.push(nT.range(c,u)),a.length>e.maxMatches))return q.none}}return q.set(a)}},{decorations:r=>r.decorations}),eC=V.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),tC=D.define({combine:r=>dn(r,{highlightActiveBlock:!0,hideFirstIndent:!1,markerType:"fullScope",thickness:1})}),nC=Ar.define({name:Lr.name,parser:Lr.parser,languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:""}})});var Pe={};pe(Pe,{DEFAULT_COMPARATOR:()=>Eu,arrayDoesNotContainNullOrUndefined:()=>Mb,assertArrayIsSorted:()=>Db,binaryIndexOf:()=>Rb,insertWithComparator:()=>$b,intersectOrdered:()=>Ab,lowerBound:()=>fa,mergeOrdered:()=>Eb,nearestIndexFromBeginning:()=>Nb,nearestIndexFromEnd:()=>Lb,removeElement:()=>kb,sortRange:()=>Qb,swap:()=>Ui,upperBound:()=>Ib});var kb=(r,e,t)=>{let n=r.indexOf(e);if(n===-1)return!1;if(t)return r.splice(n,1),!0;for(let i=n+1,s=r.length;i<s;++i)r[i]!==e&&(r[n++]=r[i]);return r.length=n,!0};function Ui(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}function Cb(r,e,t,n,i){let s=r[i];Ui(r,n,i);let o=t;for(let a=t;a<n;++a)e(r[a],s)<0&&(Ui(r,o,a),++o);return Ui(r,n,o),o}function pa(r,e,t,n,i,s){if(n<=t)return;let o=Math.floor(Math.random()*(n-t))+t,a=Cb(r,e,t,n,o);i<a&&pa(r,e,t,a-1,i,s),a<s&&pa(r,e,a+1,n,i,s)}function Qb(r,e,t,n,i,s){return t===0&&n===r.length-1&&i===0&&s>=n?r.sort(e):pa(r,e,t,n,i,s),r}var Rb=(r,e,t)=>{let n=fa(r,e,t);return n<r.length&&t(e,r[n])===0?n:-1};function Au(r,e,t,n){let i=[],s=0,o=0;for(;s<r.length&&o<e.length;){let a=t(r[s],e[o]);(n||!a)&&i.push(a<=0?r[s]:e[o]),a<=0&&s++,a>=0&&o++}if(n){for(;s<r.length;)i.push(r[s++]);for(;o<e.length;)i.push(e[o++])}return i}var Ab=(r,e,t)=>Au(r,e,t,!1),Eb=(r,e,t)=>Au(r,e,t,!0),Eu=(r,e)=>r<e?-1:r>e?1:0;function fa(r,e,t,n,i){let s=n||0,o=i!==void 0?i:r.length;for(;s<o;){let a=s+o>>1;t(e,r[a])>0?s=a+1:o=a}return o}function $b(r,e,t){let n=fa(r,e,t);return r.splice(n,0,e),n}function Ib(r,e,t,n,i){let s=n||0,o=i!==void 0?i:r.length;for(;s<o;){let a=s+o>>1;t(e,r[a])>=0?s=a+1:o=a}return o}function $u(r,e,t){let n=t==="END";if(r.length===0)return null;let i=0,s=r.length-1,o=0,a=!1,l=!1,h=0;do h=i+(s-i)/2,o=n?Math.ceil(h):Math.floor(h),a=e(r[o]),l=a===n,l?i=Math.min(s,o+(i===o?1:0)):s=Math.max(i,o+(s===o?-1:0));while(s!==i);return e(r[i])?i:null}function Nb(r,e){return $u(r,e,"BEGINNING")}function Lb(r,e){return $u(r,e,"END")}function Mb(r){return!r.includes(null)&&!r.includes(void 0)}function Db(r,e){let t=e||Eu;for(let n=0;n<r.length-1;n++){let i=r[n],s=r[n+1];if(t(i,s)>0)throw new Error(`Array is not sorted at index ${n}: ${JSON.stringify(i)} > ${JSON.stringify(s)}`)}}var Wi={};pe(Wi,{EmptyEncodedPathString:()=>Zb,EmptyRawPathString:()=>Fb,EmptyUrlString:()=>_b,urlString:()=>Xb});var _b="",Xb=(r,...e)=>String.raw({raw:r},...e),Fb="",Zb="";var pt={};pe(pt,{HOST_RUNTIME:()=>Wb,IS_BROWSER:()=>Bu,IS_NODE:()=>Zu});var Zu=typeof process<"u"&&process.versions?.node!==null,Bu=typeof window<"u"||typeof self<"u"&&typeof self.postMessage=="function",Wb=await(async()=>{if(Bu)return(await Promise.resolve().then(()=>(Mu(),Lu))).HostRuntime.HOST_RUNTIME;if(Zu)return(await Promise.resolve().then(()=>(Fu(),Xu))).HostRuntime.HOST_RUNTIME;throw new Error("Unknown runtime!")})();var qi={};pe(qi,{Multimap:()=>Yi,getWithDefault:()=>qb,inverse:()=>Yb});var Yb=function(r){let e=new Yi;for(let[t,n]of r.entries())e.set(n,t);return e},Yi=class{map=new Map;set(e,t){let n=this.map.get(e);n||(n=new Set,this.map.set(e,n)),n.add(t)}get(e){return this.map.get(e)||new Set}has(e){return this.map.has(e)}hasValue(e,t){let n=this.map.get(e);return n?n.has(t):!1}get size(){return this.map.size}delete(e,t){let n=this.get(e);if(!n)return!1;let i=n.delete(t);return n.size||this.map.delete(e),i}deleteAll(e){this.map.delete(e)}keysArray(){return[...this.map.keys()]}keys(){return this.map.keys()}valuesArray(){let e=[];for(let t of this.map.values())e.push(...t.values());return e}clear(){this.map.clear()}};function qb(r,e,t){let n=r.get(e);return n==null&&(n=t(e),r.set(e,n)),n}var tr={};pe(tr,{MimeType:()=>Hu,isTextType:()=>Jb,parseContentType:()=>e0});var Hu=(c=>(c.HTML="text/html",c.XML="text/xml",c.PLAIN="text/plain",c.XHTML="application/xhtml+xml",c.SVG="image/svg+xml",c.CSS="text/css",c.XSL="text/xsl",c.VTT="text/vtt",c.PDF="application/pdf",c.EVENTSTREAM="text/event-stream",c))(Hu||{}),Kb=new Set(["application/ecmascript","application/javascript","application/json","application/json+protobuf","application/mpegurl","application/vnd.apple.mpegurl","application/vnd.dart","application/xml","application/x-aspx","application/x-javascript","application/x-jsp","application/x-httpd-php","application/x-mpegurl","audio/mpegurl","audio/x-mpegurl"]);function Jb(r){return r.startsWith("text/")||r.startsWith("multipart/")||r.includes("json")||r.endsWith("+xml")||Kb.has(r)}function e0(r){if(r==="*/*")return{mimeType:null,charset:null};let{mimeType:e,params:t}=t0(r),n=t.get("charset")?.toLowerCase().trim()??null;return{mimeType:e,charset:n}}function t0(r){r=r.trim();let e=ju(r," ;(");e<0&&(e=r.length);let t=r.indexOf("/");if(t<0||t>e)return{mimeType:null,params:new Map};let n=r.substring(0,e).toLowerCase(),i=new Map,s=r.indexOf(";",e);for(;s>=0&&s<r.length;){if(++s,s=Vu(r," ",s),s<0)continue;let o=s;if(s=ju(r,";=",s),s<0||r[s]===";")continue;let a=r.substring(o,s).toLowerCase();++s,s=Vu(r," ",s);let l="";if(!(s<0||r[s]===";")){if(r[s]!=='"'){let h=s;s=r.indexOf(";",s);let c=s>=0?s:r.length;l=r.substring(h,c).trimEnd()}else{for(++s;s<r.length&&r[s]!=='"';)r[s]==="\\"&&s+1<r.length&&++s,l+=r[s],++s;s=r.indexOf(";",s)}i.has(a)||i.set(a,l)}}return{mimeType:n,params:i}}function ju(r,e,t=0){for(let n=t;n<r.length;n++)if(e.includes(r[n]))return n;return-1}function Vu(r,e,t=0){for(let n=t;n<r.length;n++)if(!e.includes(r[n]))return n;return-1}var B={};pe(B,{DOUBLE_QUOTE:()=>Ju,SINGLE_QUOTE:()=>Ku,base64ToSize:()=>D0,caseInsensetiveComparator:()=>Q0,collapseWhitespace:()=>m0,compare:()=>A0,concatBase64:()=>U0,countUnmatchedLeftParentheses:()=>X0,countWtf8Bytes:()=>b0,createPlainTextSearchRegex:()=>ed,createSearchRegex:()=>C0,escapeCharacters:()=>ka,escapeCsvCell:()=>Y0,escapeForRegExp:()=>N0,escapeForURLPattern:()=>L0,escapeUnicodeAsText:()=>a0,filterRegex:()=>k0,findIndexesOfSubString:()=>Yu,findLineEndingIndexes:()=>d0,findUnclosedCssQuote:()=>_0,formatAsJSLiteral:()=>h0,hashCode:()=>R0,isExtendedKebabCase:()=>x0,isWhitespace:()=>p0,naturalOrderComparator:()=>M0,regexSpecialCharacters:()=>qu,removeURLFragment:()=>T0,replaceControlCharacters:()=>O0,replaceLast:()=>V0,reverse:()=>g0,safeEscapeUnicode:()=>l0,sanitizeIdentifier:()=>w0,sprintf:()=>c0,stringifyWithPrecision:()=>H0,stripLineBreaks:()=>S0,toBase64:()=>u0,toKebabCase:()=>td,toKebabCaseKeys:()=>B0,toLowerCaseString:()=>F0,toSnakeCase:()=>j0,toTitleCase:()=>v0,trimEndWithMaxLength:()=>$0,trimMiddle:()=>E0,trimURL:()=>f0,truncateToCodeUnitLength:()=>I0});var va=null,Ki=/^[\x20-\x7e]*$/;function Pa(){return va||(va=new Intl.Segmenter(void 0,{granularity:"grapheme"})),va}var ka=(r,e)=>{let t=!1;for(let i=0;i<e.length;++i)if(r.indexOf(e.charAt(i))!==-1){t=!0;break}if(!t)return String(r);let n="";for(let i=0;i<r.length;++i)e.indexOf(r.charAt(i))!==-1&&(n+="\\"),n+=r.charAt(i);return n},Br=(r,e)=>r.toString(16).toUpperCase().padStart(e,"0"),Ta=new Map([["\b","\\b"],["\f","\\f"],[`
23
+ `,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["'","\\'"],["\\","\\\\"],["<!--","\\x3C!--"],["<script","\\x3Cscript"],["</script","\\x3C/script"]]),Wu="[\\p{Format}\\p{Surrogate}]",r0=new RegExp(Wu,"u"),i0=new RegExp(Wu,"gu"),Gu="(?![\\u200B\\u200C\\u200D])[\\p{Format}]|\\p{Surrogate}",s0=new RegExp(Gu,"u"),o0=new RegExp(Gu,"gu"),a0=r=>r0.test(r)?r.replaceAll(i0,e=>e.split("").map(t=>"\\u"+Br(t.charCodeAt(0),4)).join("")):r,l0=r=>s0.test(r)?r.replaceAll(o0,e=>e.split("").map(t=>"\\u"+Br(t.charCodeAt(0),4)).join("")):r,h0=r=>{let e=/(\\|<(?:!--|\/?script))|(\p{Control}|\p{Format})|(\p{Surrogate})/giu,t=/(\\|'|<(?:!--|\/?script))|(\p{Control}|\p{Format})|(\p{Surrogate})/giu,n=(o,a,l,h)=>l?Ta.has(l)?Ta.get(l):l.split("").map(c=>{let u=c.charCodeAt(0);return l.length===1&&u<=255?"\\x"+Br(u,2):"\\u"+Br(u,4)}).join(""):h?"\\u"+Br(h.charCodeAt(0),4):a?a.startsWith("<")?"\\x3C"+a.slice(1):Ta.get(a)||"":o,i="",s="";return r.includes("'")?r.includes('"')?!r.includes("`")&&!r.includes("${")?(s="`",i=r.replaceAll(e,n)):(s="'",i=r.replaceAll(t,n)):(s='"',i=r.replaceAll(e,n)):(s="'",i=r.replaceAll(e,n)),`${s}${i}${s}`},c0=(r,...e)=>{let t=0,n=/%(?:(\d+)\$)?(?:\.(\d*))?([%dfs])/g;return r.replaceAll(n,(i,s,o,a)=>{if(a==="%")return"%";if(s!==void 0&&(t=parseInt(s,10)-1,t<0))throw new RangeError(`Invalid parameter index ${t+1}`);if(t>=e.length)throw new RangeError(`Expected at least ${t+1} format parameters, but only ${e.length} where given.`);if(a==="s"){let h=String(e[t++]);return o!==void 0?h.substring(0,Number(o)):h}let l=Number(e[t++]);return isNaN(l)&&(l=0),a==="d"?String(Math.floor(l)).padStart(Number(o),"0"):o!==void 0?l.toFixed(Number(o)):String(l)})},u0=r=>{function e(l){return l<26?l+65:l<52?l+71:l<62?l-4:l===62?43:l===63?47:65}let n=new TextEncoder().encode(r.toString()),i=n.length,s="";if(i===0)return s;let o,a=0;for(let l=0;l<i;l++)o=l%3,a|=n[l]<<(16>>>o&24),o===2&&(s+=String.fromCharCode(e(a>>>18&63),e(a>>>12&63),e(a>>>6&63),e(a&63)),a=0);return o===0?s+=String.fromCharCode(e(a>>>18&63),e(a>>>12&63),61,61):o===1&&(s+=String.fromCharCode(e(a>>>18&63),e(a>>>12&63),e(a>>>6&63),61)),s},Yu=(r,e)=>{let t=[],n=r.indexOf(e);for(;n!==-1;)t.push(n),n=r.indexOf(e,n+e.length);return t},d0=r=>{let e=Yu(r,`
24
+ `);return e.push(r.length),e},p0=r=>/^\s*$/.test(r),f0=(r,e)=>{let t=r.replace(/^(https|http|file):\/\//i,"");return e&&t.toLowerCase().startsWith(e.toLowerCase())&&(t=t.substr(e.length)),t},m0=r=>r.replace(/[\s\xA0]+/g," "),g0=r=>r.split("").reverse().join(""),O0=r=>r.replace(/[\0-\x08\x0B\f\x0E-\x1F\x80-\x9F]/g,"\uFFFD"),b0=r=>{let e=0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if(n<=127)e++;else if(n<=2047)e+=2;else if(n<55296||57343<n)e+=3;else{if(n<=56319&&t+1<r.length){let i=r.charCodeAt(t+1);if(56320<=i&&i<=57343){e+=4,t++;continue}}e+=3}}return e},S0=r=>r.replace(/(\r)?\n/g,""),y0=/^([a-z0-9]+(?:-[a-z0-9]+)*\.)*[a-z0-9]+(?:-[a-z0-9]+)*$/,x0=r=>y0.test(r),w0=r=>r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),v0=r=>r.substring(0,1).toUpperCase()+r.substring(1),T0=r=>{let e=new URL(r);return e.hash="",e.toString()},Ca="^[]{}()\\.^$*+?|-,",P0="?+*(){}\\:",qu=function(){return Ca},k0=function(r){let e="^(?:.*\\0)?";for(let t=0;t<r.length;++t){let n=r.charAt(t);Ca.indexOf(n)!==-1&&(n="\\"+n),e+="[^\\0"+n+"]*"+n}return new RegExp(e,"i")},C0=function(r,e,t,n=!1){let i=e?"g":"gi",s;if(t)try{s=new RegExp(r,i)}catch{}return s||(s=ed(r,i)),n&&s&&(s=new RegExp(`\\b${s.source}\\b`,i)),s},Q0=function(r,e){return r=r.toUpperCase(),e=e.toUpperCase(),r===e?0:r>e?1:-1},R0=function(r){if(!r)return 0;let e=(1<<30)*4-5,t=1345575271,n=1506996573,i=0,s=1;for(let o=0;o<r.length;o++){let a=r.charCodeAt(o)*n;i=(i+s*a)%e,s=s*t%e}return i=(i+s*(e-1))%e,Math.abs(i|0)},A0=(r,e)=>r>e?1:r<e?-1:0,E0=(r,e)=>{if(r.length<=e)return r;let t="\u2026",n=1;if(e<=n)return t;let i=e-n,s=Math.ceil(i/2),o=Math.floor(i/2);if(Ki.test(r.slice(0,s+1))&&Ki.test(r.slice(r.length-o-1)))return r.slice(0,s)+t+r.slice(r.length-o);let a=Pa(),l=0,h=0,c=[];for(let{segment:d,index:p}of a.segment(r))l++,l===s&&(h=p+d.length),o>0&&(c.push(p),c.length>o&&c.shift());if(l<=e)return r;let u=o>0?c[0]:r.length;return r.slice(0,h)+t+r.slice(u)},$0=(r,e)=>{if(r.length<=e)return r;let t="\u2026",n=1;if(e<=n)return t;if(Ki.test(r.slice(0,e+1)))return r.slice(0,e-n)+t;let s=Pa().segment(r)[Symbol.iterator](),o=0;for(let a=0;a<=e-n;a++){let l=s.next();if(l.done)return r;o=l.value.index}for(let a=0;a<n;a++)if(s.next().done)return r;return r.slice(0,o)+t},I0=(r,e)=>{if(isNaN(e)||e<=0)return"";if(r.length<=e)return r;if(Ki.test(r.slice(0,e+1)))return r.slice(0,e);let t=0;for(let{index:n,segment:i}of Pa().segment(r)){if(n+i.length>e)break;t=n+i.length}return r.slice(0,t)},N0=r=>ka(r,Ca),L0=r=>ka(r,P0),M0=(r,e)=>{let t=/^\d+|^\D+/,n,i,s,o;for(;;){if(r){if(!e)return 1}else return e?-1:0;if(n=r.match(t)[0],i=e.match(t)[0],s=!Number.isNaN(Number(n)),o=!Number.isNaN(Number(i)),s&&!o)return-1;if(o&&!s)return 1;if(s&&o){let a=Number(n)-Number(i);if(a)return a;if(n.length!==i.length)return!Number(n)&&!Number(i)?n.length-i.length:i.length-n.length}else if(n!==i)return n<i?-1:1;r=r.substring(n.length),e=e.substring(i.length)}},D0=function(r){if(!r)return 0;let e=r.length*3/4;return r[r.length-1]==="="&&e--,r.length>1&&r[r.length-2]==="="&&e--,e},Ku="'",Ju='"',z0="\\",_0=function(r){let e="";for(let t=0;t<r.length;++t){let n=r[t];if(n===z0){t++;continue}(n===Ku||n===Ju)&&(e===n?e="":e===""&&(e=n))}return e},X0=r=>{let e=/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/g,t=r.replace(e,""),n=0;for(let i of t)i==="("?n++:i===")"&&n>0&&n--;return n},ed=function(r,e){let t="";for(let n=0;n<r.length;++n){let i=r.charAt(n);qu().indexOf(i)!==-1&&(t+="\\"),t+=i}return new RegExp(t,e||"")},F0=function(r){return r.toLowerCase()},Z0=/[A-Z]{2,}(?=[A-Z0-9][a-z0-9]+|\b|_)|[A-Za-z][0-9]+[a-z]?|[A-Z]?[a-z]+|[0-9][A-Za-z]+|[A-Z]|[0-9]+|[.]/g,td=function(r){return r.match?.(Z0)?.map(e=>e.toLowerCase()).join("-").replaceAll("-.-",".")||r};function B0(r){return Object.fromEntries(Object.entries(r).map(([e,t])=>[td(e),t]))}function j0(r){return r?r.replace(/(\p{L})(\p{N})/gu,"$1_$2").replace(/(\p{Lu}+)(\p{Lu}\p{Ll})/gu,"$1_$2").replace(/(\p{Ll}|\p{N})(\p{Lu})/gu,"$1_$2").toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"_").replace(/^_|_$/g,""):""}var V0=function(r,e,t){let n=r.lastIndexOf(e);return n===-1?r:r.slice(0,n)+r.slice(n).replace(e,t)},H0=function(e,t=2){if(t===0)return e.toFixed(0);let n=e.toFixed(t).replace(/\.?0*$/,"");return n==="-0"?"0":n},U0=function(r,e){if(r.length===0||!r.endsWith("="))return r+e;let t=r.substring(0,r.length-4),n=r.substring(r.length-4);return t+globalThis.btoa(globalThis.atob(n)+globalThis.atob(e))},Uu=new Set(["=","+","-","@"," ","\r"]),W0=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;function G0(r){let e=r.trimStart();return!Uu.has(r[0])&&!Uu.has(e[0])?!1:!W0.test(e.trimEnd())}var Y0=function(r){let e=G0(r)?`'${r}`:r;return e.includes('"')?(e=e.replace(/"/g,'""'),`"${e}"`):/[,;\t\r\n]/.test(e)?`"${e}"`:e};var ft={};pe(ft,{createBitVector:()=>J0,createExpandableBigUint32Array:()=>q0,createFixedBigUint32Array:()=>K0});function q0(){return new Aa}function K0(r,e){try{if(e!==void 0&&r>e)throw new RangeError;return new Qa(r)}catch{return new Ra(r,e)}}var Qa=class extends Uint32Array{getValue(e){return this[e]}setValue(e,t){this[e]=t}asUint32ArrayOrFail(){return this}asArrayOrFail(){throw new Error("Not an array")}},Ra=class{#e;#t;length;constructor(e,t){this.#e=[],this.length=e;let n=1;for(;;){n*=2,this.#t=Math.ceil(e/n);try{if(t!==void 0&&this.#t>t)throw new RangeError;for(let i=0;i<n;++i)this.#e[i]=new Uint32Array(this.#t);return}catch(i){if(this.#t<1e6)throw i}}}getValue(e){if(e>=0&&e<this.length){let t=this.#t;return this.#e[Math.floor(e/t)][e%t]}return this.#e[0][-1]}setValue(e,t){if(e>=0&&e<this.length){let n=this.#t;this.#e[Math.floor(e/n)][e%n]=t}}asUint32ArrayOrFail(){throw new Error("Not a Uint32Array")}asArrayOrFail(){throw new Error("Not an array")}},Aa=class extends Array{getValue(e){return this[e]}setValue(e,t){this[e]=t}asUint32ArrayOrFail(){throw new Error("Not a Uint32Array")}asArrayOrFail(){return this}};function J0(r){return new Ea(r)}var Ea=class extends Uint8Array{constructor(e){typeof e=="number"?super(Math.ceil(e/8)):super(e)}getBit(e){return(this[e>>3]&1<<(e&7))!==0}setBit(e){this[e>>3]|=1<<(e&7)}clearBit(e){this[e>>3]&=~(1<<(e&7))}previous(e){for(;e!==e>>3<<3;)if(--e,this.getBit(e))return e;let t=(e>>3)-1;for(;t>=0&&this[t]===0;)--t;if(t<0)return-1;for(e=(t<<3)+7;e>=t<<3;--e)if(this.getBit(e))return e;throw new Error("Unreachable")}};var vs={};pe(vs,{AllocationProfile:()=>Ur,BottomUpAllocationNode:()=>xs,FunctionAllocationInfo:()=>ws,TopDownAllocationNode:()=>ys});var Hr={};pe(Hr,{ChildrenProvider:()=>id,HeapSnapshotModel:()=>ee,HeapSnapshotProxy:()=>bl});var id={};var ee={};pe(ee,{AggregateForDiff:()=>Da,AllocationNodeCallers:()=>$a,AllocationStackFrame:()=>Na,ComparatorConfig:()=>_a,DOMLinkState:()=>od,Diff:()=>za,Edge:()=>Ma,HeapSnapshotProgressEvent:()=>nS,ItemsRange:()=>Xa,Location:()=>Va,Node:()=>La,NodeFilter:()=>Za,Samples:()=>ja,SearchConfig:()=>Ba,SerializedAllocationNode:()=>Ia,StaticData:()=>Fa,baseSystemDistance:()=>sd,baseUnreachableDistance:()=>rS});var nS={Update:"ProgressUpdate",BrokenSnapshot:"BrokenSnapshot"},sd=1e8,rS=sd*2,$a=class{nodesWithSingleCaller;branchingCallers;constructor(e,t){this.nodesWithSingleCaller=e,this.branchingCallers=t}},Ia=class{id;name;scriptName;scriptId;line;column;count;size;liveCount;liveSize;hasChildren;constructor(e,t,n,i,s,o,a,l,h,c,u){this.id=e,this.name=t,this.scriptName=n,this.scriptId=i,this.line=s,this.column=o,this.count=a,this.size=l,this.liveCount=h,this.liveSize=c,this.hasChildren=u}},Na=class{functionName;scriptName;scriptId;line;column;constructor(e,t,n,i,s){this.functionName=e,this.scriptName=t,this.scriptId=n,this.line=i,this.column=s}},La=class{id;name;distance;nodeIndex;retainedSize;selfSize;type;canBeQueried=!1;detachedDOMTreeNode=!1;isAddedNotRemoved=null;ignored=!1;constructor(e,t,n,i,s,o,a){this.id=e,this.name=t,this.distance=n,this.nodeIndex=i,this.retainedSize=s,this.selfSize=o,this.type=a}},Ma=class{name;node;type;edgeIndex;isAddedNotRemoved=null;constructor(e,t,n,i){this.name=e,this.node=t,this.type=n,this.edgeIndex=i}},Da=class{name;indexes;ids;selfSizes;constructor(){this.name="",this.indexes=[],this.ids=[],this.selfSizes=[]}},za=class{name;addedCount=0;removedCount=0;addedSize=0;removedSize=0;countDelta;sizeDelta;addedIndexes=[];addedIds=[];addedSelfSizes=[];deletedIndexes=[];deletedIds=[];deletedSelfSizes=[];constructor(e){this.name=e}},_a=class{fieldName1;ascending1;fieldName2;ascending2;constructor(e,t,n,i){this.fieldName1=e,this.ascending1=t,this.fieldName2=n,this.ascending2=i}},Xa=class{startPosition;endPosition;totalLength;items;constructor(e,t,n,i){this.startPosition=e,this.endPosition=t,this.totalLength=n,this.items=i}},Fa=class{nodeCount;rootNodeIndex;totalSize;maxJSObjectId;constructor(e,t,n,i){this.nodeCount=e,this.rootNodeIndex=t,this.totalSize=n,this.maxJSObjectId=i}},Za=class{minNodeId;maxNodeId;allocationNodeId;filterName;constructor(e,t){this.minNodeId=e,this.maxNodeId=t}equals(e){return this.minNodeId===e.minNodeId&&this.maxNodeId===e.maxNodeId&&this.allocationNodeId===e.allocationNodeId&&this.filterName===e.filterName}},Ba=class{query;caseSensitive;wholeWord;isRegex;shouldJump;jumpBackward;constructor(e,t,n,i,s,o){this.query=e,this.caseSensitive=t,this.wholeWord=n,this.isRegex=i,this.shouldJump=s,this.jumpBackward=o}toSearchRegex(e){throw new Error("Unsupported operation on search config")}},ja=class{timestamps;lastAssignedIds;sizes;constructor(e,t,n){this.timestamps=e,this.lastAssignedIds=t,this.sizes=n}},Va=class{scriptId;lineNumber;columnNumber;constructor(e,t,n){this.scriptId=e,this.lineNumber=t,this.columnNumber=n}},od=(n=>(n[n.UNKNOWN=0]="UNKNOWN",n[n.ATTACHED=1]="ATTACHED",n[n.DETACHED=2]="DETACHED",n))(od||{});var bl={};pe(bl,{HeapSnapshotLoaderProxy:()=>bs,HeapSnapshotProviderProxy:()=>zt,HeapSnapshotProxy:()=>Ss,HeapSnapshotProxyObject:()=>ur,HeapSnapshotWorkerProxy:()=>cr});var An={};pe(An,{BASE64_CHARS:()=>Ha,BASE64_CODES:()=>nr,decode:()=>iS,encode:()=>sS});var Ha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nr=new Uint8Array(123);for(let r=0;r<Ha.length;++r)nr[Ha.charCodeAt(r)]=r;function iS(r){let e=r.length*3/4>>>0;r.charCodeAt(r.length-2)===61?e-=2:r.charCodeAt(r.length-1)===61&&(e-=1);let t=new Uint8Array(e);for(let n=0,i=0;n<r.length;n+=4){let s=nr[r.charCodeAt(n+0)],o=nr[r.charCodeAt(n+1)],a=nr[r.charCodeAt(n+2)],l=nr[r.charCodeAt(n+3)];t[i++]=s<<2|o>>4,t[i++]=(o&15)<<4|a>>2,t[i++]=(a&3)<<6|l&63}return t}async function sS(r){let e=globalThis.FileReader;if(!e){let n=await new Blob([r]).arrayBuffer();return globalThis.Buffer.from(n).toString("base64")}return await new Promise((t,n)=>{let i=new e;i.onerror=()=>n(new Error("failed to convert to base64: internal error")),i.onload=()=>{if(i.result===""){n(new Error("failed to convert to base64: input too large to encode as base64 string"));return}let s=i.result,o=s.indexOf(","),a=s.slice(o+1);t(a)},i.readAsDataURL(new Blob([r]))})}var we=class{values=[0,0,0];constructor(e){e&&(this.values=e)}},Ce=class{values=[[0,0,0],[0,0,0],[0,0,0]];constructor(e){e&&(this.values=e)}multiply(e){let t=new we;for(let n=0;n<3;++n)t.values[n]=this.values[n][0]*e.values[0]+this.values[n][1]*e.values[1]+this.values[n][2]*e.values[2];return t}},Mt=class{g;a;b;c;d;e;f;constructor(e,t,n=0,i=0,s=0,o=0,a=0){this.g=e,this.a=t,this.b=n,this.c=i,this.d=s,this.e=o,this.f=a}eval(e){let t=e<0?-1:1,n=e*t;return n<this.d?t*(this.c*n+this.f):t*(Math.pow(this.a*n+this.b,this.g)+this.e)}},Nt={sRGB:new Mt(2.4,1/1.055,.055/1.055,1/12.92,.04045,0,0),sRGB_INVERSE:new Mt(.416667,1.13728,-0,12.92,.0031308,-.0549698,-0),proPhotoRGB:new Mt(1.8,1),proPhotoRGB_INVERSE:new Mt(.555556,1,-0,0,0,0,0),k2Dot2:new Mt(2.2,1),k2Dot2_INVERSE:new Mt(.454545,1),rec2020:new Mt(2.22222,.909672,.0903276,.222222,.0812429,0,0),rec2020_INVERSE:new Mt(.45,1.23439,-0,4.5,.018054,-.0993195,-0)},mt={sRGB:new Ce([[.436065674,.385147095,.143066406],[.222488403,.716873169,.06060791],[.013916016,.097076416,.714096069]]),sRGB_INVERSE:new Ce([[3.134112151374599,-1.6173924597114966,-.4906334036481285],[-.9787872938826594,1.9162795854799963,.0334547139520088],[.07198304248352326,-.2289858493321844,1.4053851325241447]]),displayP3:new Ce([[.515102,.291965,.157153],[.241182,.692236,.0665819],[-.00104941,.0418818,.784378]]),displayP3_INVERSE:new Ce([[2.404045155982687,-.9898986932663839,-.3976317191366333],[-.8422283799266768,1.7988505115115485,.016048170293157416],[.04818705979712955,-.09737385156228891,1.2735066448052303]]),adobeRGB:new Ce([[.60974,.20528,.14919],[.31111,.62567,.06322],[.01947,.06087,.74457]]),adobeRGB_INVERSE:new Ce([[1.9625385510109137,-.6106892546501431,-.3413827467482388],[-.9787580455521,1.9161624707082339,.03341676594241408],[.028696263137883395,-.1406807819331586,1.349252109991369]]),rec2020:new Ce([[.673459,.165661,.1251],[.279033,.675338,.0456288],[-.00193139,.0299794,.797162]]),rec2020_INVERSE:new Ce([[1.647275201661012,-.3936024771460771,-.23598028884792507],[-.6826176165196962,1.647617775014935,.01281626807852422],[.029662725298529837,-.06291668721366285,1.2533964313435522]]),xyz:new Ce([[1,0,0],[0,1,0],[0,0,1]])};function ad(r){return r*(Math.PI/180)}function aS(r){return r*(180/Math.PI)}function Lt(r,e,t,n){return[r.eval(e),r.eval(t),r.eval(n)]}var lS=new Ce([[.9999999984505198,.39633779217376786,.2158037580607588],[1.0000000088817609,-.10556134232365635,-.06385417477170591],[1.0000000546724108,-.08948418209496575,-1.2914855378640917]]),hS=new Ce([[.2104542553,.7936177849999999,-.0040720468],[1.9779984951000003,-2.4285922049999997,.4505937099000001],[.025904037099999982,.7827717662,-.8086757660000001]]),cS=new Ce([[.8190224432164319,.3619062562801221,-.12887378261216414],[.0329836671980271,.9292868468965546,.03614466816999844],[.048177199566046255,.26423952494422764,.6335478258136937]]),uS=new Ce([[1.226879873374156,-.5578149965554814,.2813910501772159],[-.040575762624313734,1.1122868293970596,-.07171106666151703],[-.07637294974672144,-.4214933239627915,1.586924024427242]]),dS=new Ce([[.7976700747153241,.13519395152800417,.03135596341127167],[.28803902352472205,.7118744007923554,8661179538844252e-20],[2739876695467402e-22,-14405226518969991e-22,.825211112593861]]),pS=new Ce([[1.3459533710138858,-.25561367037652133,-.051116041522131374],[-.544600415668951,1.5081687311475767,.020535163968720935],[-13975622054109725e-22,2717590904589903e-21,1.2118111696814942]]),fS=new Ce([[1.0478573189120088,.022907374491829943,-.050162247377152525],[.029570500050499514,.9904755577034089,-.017061518194840468],[-.00924047197558879,.015052921526981566,.7519708530777581]]),mS=new Ce([[.9555366447632887,-.02306009252137888,.06321844147263304],[-.028315378228764922,1.009951351591575,.021026001591792402],[.012308773293784308,-.02050053471777469,1.3301947294775631]]),P=class r{static labToXyzd50(e,t,n){let i=(e+16)/116,s=i+t/500,o=i-n/200;function a(l){return l<=.20689655172413793?108/841*(l-16/116):l*l*l}return s=a(s)*.9642,i=a(i)*1,o=a(o)*.8251,[s,i,o]}static xyzd50ToLab(e,t,n){function i(l){return l<=.008856451679035631?841/108*l+16/116:Math.pow(l,1/3)}e=i(e/.9642),t=i(t/1),n=i(n/.8251);let s=116*t-16,o=500*(e-t),a=200*(t-n);return[s,o,a]}static oklabToXyzd65(e,t,n){let i=new we([e,t,n]),s=lS.multiply(i);return s.values[0]=s.values[0]*s.values[0]*s.values[0],s.values[1]=s.values[1]*s.values[1]*s.values[1],s.values[2]=s.values[2]*s.values[2]*s.values[2],uS.multiply(s).values}static xyzd65ToOklab(e,t,n){let i=new we([e,t,n]),s=cS.multiply(i);s.values[0]=Math.cbrt(s.values[0]),s.values[1]=Math.cbrt(s.values[1]),s.values[2]=Math.cbrt(s.values[2]);let o=hS.multiply(s);return[o.values[0],o.values[1],o.values[2]]}static lchToLab(e,t,n){return n===void 0?[e,0,0]:[e,t*Math.cos(ad(n)),t*Math.sin(ad(n))]}static labToLch(e,t,n){return[e,Math.sqrt(t*t+n*n),aS(Math.atan2(n,t))]}static displayP3ToXyzd50(e,t,n){let[i,s,o]=Lt(Nt.sRGB,e,t,n),a=new we([i,s,o]);return mt.displayP3.multiply(a).values}static xyzd50ToDisplayP3(e,t,n){let i=new we([e,t,n]),s=mt.displayP3_INVERSE.multiply(i);return Lt(Nt.sRGB_INVERSE,s.values[0],s.values[1],s.values[2])}static displayP3LinearToXyzd50(e,t,n){let i=new we([e,t,n]);return mt.displayP3.multiply(i).values}static xyzd50ToDisplayP3Linear(e,t,n){let i=new we([e,t,n]);return mt.displayP3_INVERSE.multiply(i).values}static proPhotoToXyzd50(e,t,n){let[i,s,o]=Lt(Nt.proPhotoRGB,e,t,n),a=new we([i,s,o]);return dS.multiply(a).values}static xyzd50ToProPhoto(e,t,n){let i=new we([e,t,n]),s=pS.multiply(i);return Lt(Nt.proPhotoRGB_INVERSE,s.values[0],s.values[1],s.values[2])}static adobeRGBToXyzd50(e,t,n){let[i,s,o]=Lt(Nt.k2Dot2,e,t,n),a=new we([i,s,o]);return mt.adobeRGB.multiply(a).values}static xyzd50ToAdobeRGB(e,t,n){let i=new we([e,t,n]),s=mt.adobeRGB_INVERSE.multiply(i);return Lt(Nt.k2Dot2_INVERSE,s.values[0],s.values[1],s.values[2])}static rec2020ToXyzd50(e,t,n){let[i,s,o]=Lt(Nt.rec2020,e,t,n),a=new we([i,s,o]);return mt.rec2020.multiply(a).values}static xyzd50ToRec2020(e,t,n){let i=new we([e,t,n]),s=mt.rec2020_INVERSE.multiply(i);return Lt(Nt.rec2020_INVERSE,s.values[0],s.values[1],s.values[2])}static xyzd50ToD65(e,t,n){let i=new we([e,t,n]);return mS.multiply(i).values}static xyzd65ToD50(e,t,n){let i=new we([e,t,n]);return fS.multiply(i).values}static xyzd50TosRGBLinear(e,t,n){let i=new we([e,t,n]);return mt.sRGB_INVERSE.multiply(i).values}static srgbLinearToXyzd50(e,t,n){let i=new we([e,t,n]);return mt.sRGB.multiply(i).values}static srgbToXyzd50(e,t,n){let[i,s,o]=Lt(Nt.sRGB,e,t,n),a=new we([i,s,o]);return mt.sRGB.multiply(a).values}static xyzd50ToSrgb(e,t,n){let i=new we([e,t,n]),s=mt.sRGB_INVERSE.multiply(i);return Lt(Nt.sRGB_INVERSE,s.values[0],s.values[1],s.values[2])}static oklchToXyzd50(e,t,n){let[i,s,o]=r.lchToLab(e,t,n),[a,l,h]=r.oklabToXyzd65(i,s,o);return r.xyzd65ToD50(a,l,h)}static xyzd50ToOklch(e,t,n){let[i,s,o]=r.xyzd50ToD65(e,t,n),[a,l,h]=r.xyzd65ToOklab(i,s,o);return r.labToLch(a,l,h)}};function ld(r,e){let t=r[3];return[(1-t)*e[0]+t*r[0],(1-t)*e[1]+t*r[1],(1-t)*e[2]+t*r[2],t+e[3]*(1-t)]}function hd([r,e,t]){let n=Math.max(r,e,t),i=Math.min(r,e,t),s=n-i,o;return i===n?o=0:r===n?o=(1/6*(e-t)/s+1)%1:e===n?o=1/6*(t-r)/s+1/3:o=1/6*(r-e)/s+2/3,o}function Be(r){let[e,t,n]=OS([...r,void 0]);return[e,t,n]}function OS([r,e,t,n]){let i=Math.max(r,e,t),s=Math.min(r,e,t),o=i-s,a=i+s,l=hd([r,e,t]),h=.5*a,c;return h===0||h===1?c=0:h<=.5?c=o/a:c=o/(2-a),[l,c,h,n]}function je(r){let[e,t,n]=bS([...r,void 0]);return[e,t,n]}function bS([r,e,t,n]){let i=hd([r,e,t]),s=Math.max(r,e,t),o=Math.min(r,e,t);return[i,o,1-s,n]}var SS=[[12,-1,-1,-1,-1,100,90,80,-1,-1],[14,-1,-1,-1,100,90,80,60,60,-1],[16,-1,-1,100,90,80,60,55,50,50],[18,-1,-1,90,80,60,55,50,40,40],[24,-1,100,80,60,55,50,40,38,35],[30,-1,90,70,55,50,40,38,35,40],[36,-1,80,60,50,40,38,35,30,25],[48,100,70,55,40,38,35,30,25,20],[60,90,60,50,38,35,30,25,20,20],[72,80,55,40,35,30,25,20,20,20],[96,70,50,35,30,25,20,20,20,20],[120,60,40,30,25,20,20,20,20,20]];SS.reverse();function is(r){return(r%360+360)%360}function cd(r){let e=r.replace(/(deg|g?rad|turn)$/,"");if(isNaN(e)||r.match(/\s+(deg|g?rad|turn)/))return null;let t=parseFloat(e);return r.includes("turn")?t*360:r.includes("grad")?t*9/10:r.includes("rad")?t*180/Math.PI:t}function xS(r){switch(r){case"srgb":return"srgb";case"srgb-linear":return"srgb-linear";case"display-p3":return"display-p3";case"display-p3-linear":return"display-p3-linear";case"a98-rgb":return"a98-rgb";case"prophoto-rgb":return"prophoto-rgb";case"rec2020":return"rec2020";case"xyz":return"xyz";case"xyz-d50":return"xyz-d50";case"xyz-d65":return"xyz-d65"}return null}function ud(r,e){let t=Math.sign(r),n=Math.abs(r),[i,s]=e;return t*(n*(s-i)/100+i)}function fe(r,{min:e,max:t}){return r===null||(e!==void 0&&(r=Math.max(r,e)),t!==void 0&&(r=Math.min(r,t))),r}function Tt(r,e){if(!r.endsWith("%"))return null;let t=parseFloat(r.substr(0,r.length-1));return isNaN(t)?null:ud(t,e)}function Pt(r){let e=parseFloat(r);return isNaN(e)?null:e}function rr(r){return r===void 0?null:fe(Tt(r,[0,1])??Pt(r),{min:0,max:1})}function es(r,e=[0,1]){if(isNaN(r.replace("%","")))return null;let t=parseFloat(r);return r.indexOf("%")!==-1?r.indexOf("%")!==r.length-1?null:ud(t,e):t}function Ua(r){let e=es(r);return e===null?null:r.indexOf("%")!==-1?e:e/255}function dd(r){let e=r.replace(/(deg|g?rad|turn)$/,"");if(isNaN(e)||r.match(/\s+(deg|g?rad|turn)/))return null;let t=parseFloat(e);return r.indexOf("turn")!==-1?t%1:r.indexOf("grad")!==-1?t/400%1:r.indexOf("rad")!==-1?t/(2*Math.PI)%1:t/360%1}function ts(r){return r.indexOf("%")!==r.length-1||isNaN(r.replace("%",""))?null:parseFloat(r)/100}function wS(r){return es(r)}function vS(r){let e=r[0],t=r[1],n=r[2],i=(2-t)*n;return n===0||t===0?t=0:t*=n/(i<1?i:2-i),[e,t,i/2,r[3]]}function Ga(r){let e=r[0],t=r[1],n=r[2];function i(c,u,d){return d<0?d+=1:d>1&&(d-=1),d*6<1?c+(u-c)*d*6:d*2<1?u:d*3<2?c+(u-c)*(2/3-d)*6:c}t<0&&(t=0);let s;n<=.5?s=n*(1+t):s=n+t-n*t;let o=2*n-s,a=e+1/3,l=e,h=e-1/3;return[i(o,s,a),i(o,s,l),i(o,s,h),r[3]]}function TS(r){let e=r[0],t=r[1],n=r[2],i=t/(t+n),s=[i,i,i,r[3]];if(t+n<1){s=Ga([e,1,.5,r[3]]);for(let o=0;o<3;++o)s[o]+=t-(t+n)*s[o]}return s}function PS(r){return Ga(vS(r))}var pd=.01,Dt=1,fd=1e-4;function j(r,e,t=pd){if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return!1;for(let n in r)if(!j(r[n],e[n]))return!1;return!0}return Array.isArray(r)||Array.isArray(e)?!1:r===null||e===null?r===e:Math.abs(r-e)<t}function fn(r,e,t=pd){return r-e<=t}var Gt=class r{l;a;b;alpha;#e;#t;channels=["l","a","b","alpha"];static#i={hex:e=>new _(e.#r(!1),"hex"),hexa:e=>new _(e.#r(!0),"hexa"),rgb:e=>new _(e.#r(!1),"rgb"),rgba:e=>new _(e.#r(!0),"rgba"),hsl:e=>new De(...Be(e.#r(!1)),e.alpha),hsla:e=>new De(...Be(e.#r(!1)),e.alpha),hwb:e=>new ze(...je(e.#r(!1)),e.alpha),hwba:e=>new ze(...je(e.#r(!1)),e.alpha),lch:e=>new Yt(...P.labToLch(e.l,e.a,e.b),e.alpha),oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#n()),e.alpha),lab:e=>e,oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#n())),e.alpha),srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#n()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#n()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#n()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#n()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#n()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#n()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#n()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#n()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#n(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#n()),e.alpha)};#n(){return P.labToXyzd50(this.l,this.a,this.b)}#r(e=!0){let t=P.xyzd50ToSrgb(...this.#n());return e?[...t,this.alpha??void 0]:t}constructor(e,t,n,i,s){this.#t=[e,t,n],this.l=fe(e,{min:0,max:100}),(j(this.l,0,Dt)||j(this.l,100,Dt))&&(t=n=0),this.a=t,this.b=n,this.alpha=fe(i,{min:0,max:1}),this.#e=s}is(e){return e===this.format()}as(e){return r.#i[e](this)}asLegacyColor(){return this.as("rgba")}equal(e){let t=e.as("lab");return j(t.l,this.l,Dt)&&j(t.a,this.a)&&j(t.b,this.b)&&j(t.alpha,this.alpha)}format(){return"lab"}setAlpha(e){return new r(this.l,this.a,this.b,e,void 0)}asString(e){return e?this.as(e).asString():this.#s(this.l,this.a,this.b)}#s(e,t,n){let i=this.alpha===null||j(this.alpha,1)?"":` / ${B.stringifyWithPrecision(this.alpha)}`;return`lab(${B.stringifyWithPrecision(e,0)} ${B.stringifyWithPrecision(t)} ${B.stringifyWithPrecision(n)}${i})`}getAuthoredText(){return this.#e??null}getRawParameters(){return[...this.#t]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#t)}isGamutClipped(){return!1}static fromSpec(e,t){let n=Tt(e[0],[0,100])??Pt(e[0]);if(n===null)return null;let i=Tt(e[1],[0,125])??Pt(e[1]);if(i===null)return null;let s=Tt(e[2],[0,125])??Pt(e[2]);if(s===null)return null;let o=rr(e[3]);return new r(n,i,s,o,t)}},Yt=class r{#e;l;c;h;alpha;#t;channels=["l","c","h","alpha"];static#i={hex:e=>new _(e.#r(!1),"hex"),hexa:e=>new _(e.#r(!0),"hexa"),rgb:e=>new _(e.#r(!1),"rgb"),rgba:e=>new _(e.#r(!0),"rgba"),hsl:e=>new De(...Be(e.#r(!1)),e.alpha),hsla:e=>new De(...Be(e.#r(!1)),e.alpha),hwb:e=>new ze(...je(e.#r(!1)),e.alpha),hwba:e=>new ze(...je(e.#r(!1)),e.alpha),lch:e=>e,oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#n()),e.alpha),lab:e=>new Gt(...P.lchToLab(e.l,e.c,e.h),e.alpha),oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#n())),e.alpha),srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#n()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#n()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#n()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#n()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#n()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#n()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#n()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#n()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#n(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#n()),e.alpha)};#n(){return P.labToXyzd50(...P.lchToLab(this.l,this.c,this.h))}#r(e=!0){let t=P.xyzd50ToSrgb(...this.#n());return e?[...t,this.alpha??void 0]:t}constructor(e,t,n,i,s){this.#e=[e,t,n],this.l=fe(e,{min:0,max:100}),t=j(this.l,0,Dt)||j(this.l,100,Dt)?0:t,this.c=fe(t,{min:0}),n=j(t,0)?0:n,this.h=is(n),this.alpha=fe(i,{min:0,max:1}),this.#t=s}asLegacyColor(){return this.as("rgba")}is(e){return e===this.format()}as(e){return r.#i[e](this)}equal(e){let t=e.as("lch");return j(t.l,this.l,Dt)&&j(t.c,this.c)&&j(t.h,this.h)&&j(t.alpha,this.alpha)}format(){return"lch"}setAlpha(e){return new r(this.l,this.c,this.h,e)}asString(e){return e?this.as(e).asString():this.#s(this.l,this.c,this.h)}#s(e,t,n){let i=this.alpha===null||j(this.alpha,1)?"":` / ${B.stringifyWithPrecision(this.alpha)}`;return`lch(${B.stringifyWithPrecision(e,0)} ${B.stringifyWithPrecision(t)} ${B.stringifyWithPrecision(n)}${i})`}getAuthoredText(){return this.#t??null}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#e)}isGamutClipped(){return!1}isHuePowerless(){return j(this.c,0,fd)}static fromSpec(e,t){let n=Tt(e[0],[0,100])??Pt(e[0]);if(n===null)return null;let i=Tt(e[1],[0,150])??Pt(e[1]);if(i===null)return null;let s=cd(e[2]);if(s===null)return null;let o=rr(e[3]);return new r(n,i,s,o,t)}},qt=class r{#e;l;a;b;alpha;#t;channels=["l","a","b","alpha"];static#i={hex:e=>new _(e.#r(!1),"hex"),hexa:e=>new _(e.#r(!0),"hexa"),rgb:e=>new _(e.#r(!1),"rgb"),rgba:e=>new _(e.#r(!0),"rgba"),hsl:e=>new De(...Be(e.#r(!1)),e.alpha),hsla:e=>new De(...Be(e.#r(!1)),e.alpha),hwb:e=>new ze(...je(e.#r(!1)),e.alpha),hwba:e=>new ze(...je(e.#r(!1)),e.alpha),lch:e=>new Yt(...P.labToLch(...P.xyzd50ToLab(...e.#n())),e.alpha),oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#n()),e.alpha),lab:e=>new Gt(...P.xyzd50ToLab(...e.#n()),e.alpha),oklab:e=>e,srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#n()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#n()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#n()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#n()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#n()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#n()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#n()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#n()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#n(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#n()),e.alpha)};#n(){return P.xyzd65ToD50(...P.oklabToXyzd65(this.l,this.a,this.b))}#r(e=!0){let t=P.xyzd50ToSrgb(...this.#n());return e?[...t,this.alpha??void 0]:t}constructor(e,t,n,i,s){this.#e=[e,t,n],this.l=fe(e,{min:0,max:1}),(j(this.l,0)||j(this.l,1))&&(t=n=0),this.a=t,this.b=n,this.alpha=fe(i,{min:0,max:1}),this.#t=s}asLegacyColor(){return this.as("rgba")}is(e){return e===this.format()}as(e){return r.#i[e](this)}equal(e){let t=e.as("oklab");return j(t.l,this.l)&&j(t.a,this.a)&&j(t.b,this.b)&&j(t.alpha,this.alpha)}format(){return"oklab"}setAlpha(e){return new r(this.l,this.a,this.b,e)}asString(e){return e?this.as(e).asString():this.#s(this.l,this.a,this.b)}#s(e,t,n){let i=this.alpha===null||j(this.alpha,1)?"":` / ${B.stringifyWithPrecision(this.alpha)}`;return`oklab(${B.stringifyWithPrecision(e)} ${B.stringifyWithPrecision(t)} ${B.stringifyWithPrecision(n)}${i})`}getAuthoredText(){return this.#t??null}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#e)}isGamutClipped(){return!1}static fromSpec(e,t){let n=Tt(e[0],[0,1])??Pt(e[0]);if(n===null)return null;let i=Tt(e[1],[0,.4])??Pt(e[1]);if(i===null)return null;let s=Tt(e[2],[0,.4])??Pt(e[2]);if(s===null)return null;let o=rr(e[3]);return new r(n,i,s,o,t)}},Kt=class r{#e;l;c;h;alpha;#t;channels=["l","c","h","alpha"];static#i={hex:e=>new _(e.#r(!1),"hex"),hexa:e=>new _(e.#r(!0),"hexa"),rgb:e=>new _(e.#r(!1),"rgb"),rgba:e=>new _(e.#r(!0),"rgba"),hsl:e=>new De(...Be(e.#r(!1)),e.alpha),hsla:e=>new De(...Be(e.#r(!1)),e.alpha),hwb:e=>new ze(...je(e.#r(!1)),e.alpha),hwba:e=>new ze(...je(e.#r(!1)),e.alpha),lch:e=>new Yt(...P.labToLch(...P.xyzd50ToLab(...e.#n())),e.alpha),oklch:e=>e,lab:e=>new Gt(...P.xyzd50ToLab(...e.#n()),e.alpha),oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#n())),e.alpha),srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#n()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#n()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#n()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#n()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#n()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#n()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#n()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#n()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#n(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#n()),e.alpha)};#n(){return P.oklchToXyzd50(this.l,this.c,this.h)}#r(e=!0){let t=P.xyzd50ToSrgb(...this.#n());return e?[...t,this.alpha??void 0]:t}constructor(e,t,n,i,s){this.#e=[e,t,n],this.l=fe(e,{min:0,max:1}),t=j(this.l,0)||j(this.l,1)?0:t,this.c=fe(t,{min:0}),n=j(t,0)?0:n,this.h=is(n),this.alpha=fe(i,{min:0,max:1}),this.#t=s}asLegacyColor(){return this.as("rgba")}is(e){return e===this.format()}as(e){return r.#i[e](this)}equal(e){let t=e.as("oklch");return j(t.l,this.l)&&j(t.c,this.c)&&j(t.h,this.h)&&j(t.alpha,this.alpha)}format(){return"oklch"}setAlpha(e){return new r(this.l,this.c,this.h,e)}asString(e){return e?this.as(e).asString():this.#s(this.l,this.c,this.h)}#s(e,t,n){let i=this.alpha===null||j(this.alpha,1)?"":` / ${B.stringifyWithPrecision(this.alpha)}`;return`oklch(${B.stringifyWithPrecision(e)} ${B.stringifyWithPrecision(t)} ${B.stringifyWithPrecision(n)}${i})`}getAuthoredText(){return this.#t??null}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#e)}isGamutClipped(){return!1}static fromSpec(e,t){let n=Tt(e[0],[0,1])??Pt(e[0]);if(n===null)return null;let i=Tt(e[1],[0,.4])??Pt(e[1]);if(i===null)return null;let s=cd(e[2]);if(s===null)return null;let o=rr(e[3]);return new r(n,i,s,o,t)}},L=class r{#e;p0;p1;p2;alpha;colorSpace;#t;get channels(){return this.isXYZ()?["x","y","z","alpha"]:["r","g","b","alpha"]}static#i={hex:e=>new _(e.#r(!1),"hex"),hexa:e=>new _(e.#r(!0),"hexa"),rgb:e=>new _(e.#r(!1),"rgb"),rgba:e=>new _(e.#r(!0),"rgba"),hsl:e=>new De(...Be(e.#r(!1)),e.alpha),hsla:e=>new De(...Be(e.#r(!1)),e.alpha),hwb:e=>new ze(...je(e.#r(!1)),e.alpha),hwba:e=>new ze(...je(e.#r(!1)),e.alpha),lch:e=>new Yt(...P.labToLch(...P.xyzd50ToLab(...e.#n())),e.alpha),oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#n()),e.alpha),lab:e=>new Gt(...P.xyzd50ToLab(...e.#n()),e.alpha),oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#n())),e.alpha),srgb:e=>new r("srgb",...P.xyzd50ToSrgb(...e.#n()),e.alpha),"srgb-linear":e=>new r("srgb-linear",...P.xyzd50TosRGBLinear(...e.#n()),e.alpha),"display-p3":e=>new r("display-p3",...P.xyzd50ToDisplayP3(...e.#n()),e.alpha),"display-p3-linear":e=>new r("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#n()),e.alpha),"a98-rgb":e=>new r("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#n()),e.alpha),"prophoto-rgb":e=>new r("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#n()),e.alpha),rec2020:e=>new r("rec2020",...P.xyzd50ToRec2020(...e.#n()),e.alpha),xyz:e=>new r("xyz",...P.xyzd50ToD65(...e.#n()),e.alpha),"xyz-d50":e=>new r("xyz-d50",...e.#n(),e.alpha),"xyz-d65":e=>new r("xyz-d65",...P.xyzd50ToD65(...e.#n()),e.alpha)};#n(){let[e,t,n]=this.#e;switch(this.colorSpace){case"srgb":return P.srgbToXyzd50(e,t,n);case"srgb-linear":return P.srgbLinearToXyzd50(e,t,n);case"display-p3":return P.displayP3ToXyzd50(e,t,n);case"display-p3-linear":return P.displayP3LinearToXyzd50(e,t,n);case"a98-rgb":return P.adobeRGBToXyzd50(e,t,n);case"prophoto-rgb":return P.proPhotoToXyzd50(e,t,n);case"rec2020":return P.rec2020ToXyzd50(e,t,n);case"xyz-d50":return[e,t,n];case"xyz":case"xyz-d65":return P.xyzd65ToD50(e,t,n)}throw new Error("Invalid color space")}#r(e=!0){let[t,n,i]=this.#e,s=this.colorSpace==="srgb"?[t,n,i]:[...P.xyzd50ToSrgb(...this.#n())];return e?[...s,this.alpha??void 0]:s}constructor(e,t,n,i,s,o){this.#e=[t,n,i],this.colorSpace=e,this.#t=o,this.colorSpace!=="xyz-d50"&&this.colorSpace!=="xyz-d65"&&this.colorSpace!=="xyz"&&(t=fe(t,{min:0,max:1}),n=fe(n,{min:0,max:1}),i=fe(i,{min:0,max:1})),this.p0=t,this.p1=n,this.p2=i,this.alpha=fe(s,{min:0,max:1})}asLegacyColor(){return this.as("rgba")}is(e){return e===this.format()}as(e){return this.colorSpace===e?this:r.#i[e](this)}equal(e){let t=e.as(this.colorSpace);return j(this.p0,t.p0)&&j(this.p1,t.p1)&&j(this.p2,t.p2)&&j(this.alpha,t.alpha)}format(){return this.colorSpace}setAlpha(e){return new r(this.colorSpace,this.p0,this.p1,this.p2,e)}asString(e){return e?this.as(e).asString():this.#s(this.p0,this.p1,this.p2)}#s(e,t,n){let i=this.alpha===null||j(this.alpha,1)?"":` / ${B.stringifyWithPrecision(this.alpha)}`;return`color(${this.colorSpace} ${B.stringifyWithPrecision(e)} ${B.stringifyWithPrecision(t)} ${B.stringifyWithPrecision(n)}${i})`}getAuthoredText(){return this.#t??null}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#e)}isGamutClipped(){return this.colorSpace!=="xyz-d50"&&this.colorSpace!=="xyz-d65"&&this.colorSpace!=="xyz"?!j(this.#e,[this.p0,this.p1,this.p2]):!1}isXYZ(){switch(this.colorSpace){case"xyz":case"xyz-d50":case"xyz-d65":return!0}return!1}static fromSpec(e,t){let[n,i]=t.split("/",2),s=n.trim().split(/\s+/),[o,...a]=s,l=xS(o);if(!l)return null;if(a.length===0&&i===void 0)return new r(l,0,0,0,null,e);if(a.length===0&&i!==void 0&&i.trim().split(/\s+/).length>1||a.length>3)return null;let c=a.map(f=>f==="none"?"0":f).map(f=>es(f,[0,1]));if(c.includes(null))return null;let d=i?es(i,[0,1])??1:1,p=[c[0]??0,c[1]??0,c[2]??0,d];return new r(l,...p,e)}},De=class r{h;s;l;alpha;#e;#t;channels=["h","s","l","alpha"];static#i={hex:e=>new _(e.#n(!1),"hex"),hexa:e=>new _(e.#n(!0),"hexa"),rgb:e=>new _(e.#n(!1),"rgb"),rgba:e=>new _(e.#n(!0),"rgba"),hsl:e=>e,hsla:e=>e,hwb:e=>new ze(...je(e.#n(!1)),e.alpha),hwba:e=>new ze(...je(e.#n(!1)),e.alpha),lch:e=>new Yt(...P.labToLch(...P.xyzd50ToLab(...e.#r())),e.alpha),oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#r()),e.alpha),lab:e=>new Gt(...P.xyzd50ToLab(...e.#r()),e.alpha),oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#r())),e.alpha),srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#r()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#r()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#r()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#r()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#r()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#r()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#r()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#r()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#r(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#r()),e.alpha)};#n(e=!0){let t=Ga([this.h,this.s,this.l,0]);return e?[t[0],t[1],t[2],this.alpha??void 0]:[t[0],t[1],t[2]]}#r(){let e=this.#n(!1);return P.srgbToXyzd50(e[0],e[1],e[2])}constructor(e,t,n,i,s){this.#e=[e,t,n],this.l=fe(n,{min:0,max:1}),t=j(this.l,0)||j(this.l,1)?0:t,this.s=fe(t,{min:0,max:1}),e=j(this.s,0,fd)?0:e,this.h=is(e*360)/360,this.alpha=fe(i??null,{min:0,max:1}),this.#t=s}equal(e){let t=e.as("hsl");return j(this.h,t.h)&&j(this.s,t.s)&&j(this.l,t.l)&&j(this.alpha,t.alpha)}asString(e){return e?this.as(e).asString():this.#s(this.h,this.s,this.l)}#s(e,t,n){let i=B.sprintf("hsl(%sdeg %s% %s%",B.stringifyWithPrecision(e*360),B.stringifyWithPrecision(t*100),B.stringifyWithPrecision(n*100));return this.alpha!==null&&this.alpha!==1?i+B.sprintf(" / %s%)",B.stringifyWithPrecision(this.alpha*100)):i+")"}setAlpha(e){return new r(this.h,this.s,this.l,e)}format(){return this.alpha===null||this.alpha===1?"hsl":"hsla"}is(e){return e===this.format()}as(e){return e===this.format()?this:r.#i[e](this)}asLegacyColor(){return this.as("rgba")}getAuthoredText(){return this.#t??null}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#e)}isGamutClipped(){return!fn(this.#e[1],1)||!fn(0,this.#e[1])}static fromSpec(e,t){let n=dd(e[0]);if(n===null)return null;let i=ts(e[1]);if(i===null)return null;let s=ts(e[2]);if(s===null)return null;let o=rr(e[3]);return new r(n,i,s,o,t)}hsva(){let e=this.s*(this.l<.5?this.l:1-this.l);return[this.h,e!==0?2*e/(this.l+e):0,this.l+e,this.alpha??1]}canonicalHSLA(){return[Math.round(this.h*360),Math.round(this.s*100),Math.round(this.l*100),this.alpha??1]}},ze=class r{h;w;b;alpha;#e;#t;channels=["h","w","b","alpha"];static#i={hex:e=>new _(e.#n(!1),"hex"),hexa:e=>new _(e.#n(!0),"hexa"),rgb:e=>new _(e.#n(!1),"rgb"),rgba:e=>new _(e.#n(!0),"rgba"),hsl:e=>new De(...Be(e.#n(!1)),e.alpha),hsla:e=>new De(...Be(e.#n(!1)),e.alpha),hwb:e=>e,hwba:e=>e,lch:e=>new Yt(...P.labToLch(...P.xyzd50ToLab(...e.#r())),e.alpha),oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#r()),e.alpha),lab:e=>new Gt(...P.xyzd50ToLab(...e.#r()),e.alpha),oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#r())),e.alpha),srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#r()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#r()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#r()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#r()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#r()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#r()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#r()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#r()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#r(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#r()),e.alpha)};#n(e=!0){let t=TS([this.h,this.w,this.b,0]);return e?[t[0],t[1],t[2],this.alpha??void 0]:[t[0],t[1],t[2]]}#r(){let e=this.#n(!1);return P.srgbToXyzd50(e[0],e[1],e[2])}constructor(e,t,n,i,s){if(this.#e=[e,t,n],this.w=fe(t,{min:0,max:1}),this.b=fe(n,{min:0,max:1}),e=fn(1,this.w+this.b)?0:e,this.h=is(e*360)/360,this.alpha=fe(i,{min:0,max:1}),fn(1,this.w+this.b)){let o=this.w/this.b;this.b=1/(1+o),this.w=1-this.b}this.#t=s}equal(e){let t=e.as("hwb");return j(this.h,t.h)&&j(this.w,t.w)&&j(this.b,t.b)&&j(this.alpha,t.alpha)}asString(e){return e?this.as(e).asString():this.#s(this.h,this.w,this.b)}#s(e,t,n){let i=B.sprintf("hwb(%sdeg %s% %s%",B.stringifyWithPrecision(e*360),B.stringifyWithPrecision(t*100),B.stringifyWithPrecision(n*100));return this.alpha!==null&&this.alpha!==1?i+B.sprintf(" / %s%)",B.stringifyWithPrecision(this.alpha*100)):i+")"}setAlpha(e){return new r(this.h,this.w,this.b,e,this.#t)}format(){return this.alpha!==null&&!j(this.alpha,1)?"hwba":"hwb"}is(e){return e===this.format()}as(e){return e===this.format()?this:r.#i[e](this)}asLegacyColor(){return this.as("rgba")}getAuthoredText(){return this.#t??null}canonicalHWBA(){return[Math.round(this.h*360),Math.round(this.w*100),Math.round(this.b*100),this.alpha??1]}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#s(...this.#e)}isGamutClipped(){return!fn(this.#e[1],1)||!fn(0,this.#e[1])||!fn(this.#e[2],1)||!fn(0,this.#e[2])}static fromSpec(e,t){let n=dd(e[0]);if(n===null)return null;let i=ts(e[1]);if(i===null)return null;let s=ts(e[2]);if(s===null)return null;let o=rr(e[3]);return new r(n,i,s,o,t)}};function vt(r){return Math.round(r*255)}var ns=class{color;channels=["r","g","b","alpha"];constructor(e){this.color=e}get alpha(){return this.color.alpha}rgba(){return this.color.rgba()}equal(e){return this.color.equal(e)}setAlpha(e){return this.color.setAlpha(e)}format(){return(this.alpha??1)!==1?"hexa":"hex"}as(e){return this.color.as(e)}is(e){return this.color.is(e)}asLegacyColor(){return this.color.asLegacyColor()}getAuthoredText(){return this.color.getAuthoredText()}getRawParameters(){return this.color.getRawParameters()}isGamutClipped(){return this.color.isGamutClipped()}asString(e){if(e)return this.as(e).asString();let[t,n,i]=this.color.rgba();return this.stringify(t,n,i)}getAsRawString(e){if(e)return this.as(e).getAsRawString();let[t,n,i]=this.getRawParameters();return this.stringify(t,n,i)}},rs=class r extends ns{setAlpha(e){return new r(this.color.setAlpha(e))}asString(e){return e&&e!==this.format()?super.as(e).asString():super.asString()}stringify(e,t,n){function i(s){return(Math.round(s*255)/17).toString(16)}return this.color.hasAlpha()?B.sprintf("#%s%s%s%s",i(e),i(t),i(n),i(this.alpha??1)).toLowerCase():B.sprintf("#%s%s%s",i(e),i(t),i(n)).toLowerCase()}},Wa=class r extends ns{nickname;constructor(e,t){super(t),this.nickname=e}static fromName(e,t){let n=e.toLowerCase(),i=kS.get(n);return i!==void 0?new r(n,_.fromRGBA(i,t)):null}stringify(){return this.nickname}getAsRawString(e){return this.color.getAsRawString(e)}},_=class r{#e;#t;#i;#n;channels=["r","g","b","alpha"];static#r={hex:e=>new r(e.#t,"hex"),hexa:e=>new r(e.#t,"hexa"),rgb:e=>new r(e.#t,"rgb"),rgba:e=>new r(e.#t,"rgba"),hsl:e=>new De(...Be([e.#t[0],e.#t[1],e.#t[2]]),e.alpha),hsla:e=>new De(...Be([e.#t[0],e.#t[1],e.#t[2]]),e.alpha),hwb:e=>new ze(...je([e.#t[0],e.#t[1],e.#t[2]]),e.alpha),hwba:e=>new ze(...je([e.#t[0],e.#t[1],e.#t[2]]),e.alpha),lch:e=>new Yt(...P.labToLch(...P.xyzd50ToLab(...e.#s())),e.alpha),oklch:e=>new Kt(...P.xyzd50ToOklch(...e.#s()),e.alpha),lab:e=>new Gt(...P.xyzd50ToLab(...e.#s()),e.alpha),oklab:e=>new qt(...P.xyzd65ToOklab(...P.xyzd50ToD65(...e.#s())),e.alpha),srgb:e=>new L("srgb",...P.xyzd50ToSrgb(...e.#s()),e.alpha),"srgb-linear":e=>new L("srgb-linear",...P.xyzd50TosRGBLinear(...e.#s()),e.alpha),"display-p3":e=>new L("display-p3",...P.xyzd50ToDisplayP3(...e.#s()),e.alpha),"display-p3-linear":e=>new L("display-p3-linear",...P.xyzd50ToDisplayP3Linear(...e.#s()),e.alpha),"a98-rgb":e=>new L("a98-rgb",...P.xyzd50ToAdobeRGB(...e.#s()),e.alpha),"prophoto-rgb":e=>new L("prophoto-rgb",...P.xyzd50ToProPhoto(...e.#s()),e.alpha),rec2020:e=>new L("rec2020",...P.xyzd50ToRec2020(...e.#s()),e.alpha),xyz:e=>new L("xyz",...P.xyzd50ToD65(...e.#s()),e.alpha),"xyz-d50":e=>new L("xyz-d50",...e.#s(),e.alpha),"xyz-d65":e=>new L("xyz-d65",...P.xyzd50ToD65(...e.#s()),e.alpha)};#s(){let[e,t,n]=this.#t;return P.srgbToXyzd50(e,t,n)}get alpha(){switch(this.format()){case"hexa":case"rgba":return this.#t[3];default:return null}}asLegacyColor(){return this}nickname(){let e=CS.get(String(this.canonicalRGBA()));return e?new Wa(e,this):null}shortHex(){for(let e=0;e<4;++e)if(Math.round(this.#t[e]*255)%17)return null;return new rs(this)}constructor(e,t,n){this.#i=n||null,this.#n=t,this.#e=[e[0],e[1],e[2]],this.#t=[fe(e[0],{min:0,max:1}),fe(e[1],{min:0,max:1}),fe(e[2],{min:0,max:1}),fe(e[3]??1,{min:0,max:1})]}static fromHex(e,t){e=e.toLowerCase();let i=e.length===4||e.length===8?"hexa":"hex",s=e.length<=4;s&&(e=e.charAt(0)+e.charAt(0)+e.charAt(1)+e.charAt(1)+e.charAt(2)+e.charAt(2)+e.charAt(3)+e.charAt(3));let o=parseInt(e.substring(0,2),16),a=parseInt(e.substring(2,4),16),l=parseInt(e.substring(4,6),16),h=1;e.length===8&&(h=parseInt(e.substring(6,8),16)/255);let c=new r([o/255,a/255,l/255,h],i,t);return s?new rs(c):c}static fromRGBAFunction(e,t,n,i,s){let o=[Ua(e),Ua(t),Ua(n),i?wS(i):1];return Pe.arrayDoesNotContainNullOrUndefined(o)?new r(o,i?"rgba":"rgb",s):null}static fromRGBA(e,t){return new r([e[0]/255,e[1]/255,e[2]/255,e[3]],"rgba",t)}static fromHSVA(e){let t=PS(e);return new r(t,"rgba")}is(e){return e===this.format()}as(e){return e===this.format()?this:r.#r[e](this)}format(){return this.#n}hasAlpha(){return this.#t[3]!==1}detectHEXFormat(){return this.hasAlpha()?"hexa":"hex"}asString(e){return e?this.as(e).asString():this.#a(e,this.#t[0],this.#t[1],this.#t[2])}#a(e,t,n,i){e||(e=this.#n);function s(o){let a=Math.round(o*255).toString(16);return a.length===1?"0"+a:a}switch(e){case"rgb":case"rgba":{let o=B.sprintf("rgb(%d %d %d",vt(t),vt(n),vt(i));return this.hasAlpha()?o+B.sprintf(" / %d%)",Math.round(this.#t[3]*100)):o+")"}case"hex":case"hexa":return this.hasAlpha()?B.sprintf("#%s%s%s%s",s(t),s(n),s(i),s(this.#t[3])).toLowerCase():B.sprintf("#%s%s%s",s(t),s(n),s(i)).toLowerCase()}}getAuthoredText(){return this.#i??null}getRawParameters(){return[...this.#e]}getAsRawString(e){return e?this.as(e).getAsRawString():this.#a(e,...this.#e)}isGamutClipped(){return!j(this.#e.map(vt),[this.#t[0],this.#t[1],this.#t[2]].map(vt),Dt)}rgba(){return[...this.#t]}canonicalRGBA(){let e=new Array(4);for(let t=0;t<3;++t)e[t]=Math.round(this.#t[t]*255);return e[3]=this.#t[3],e}toProtocolRGBA(){let e=this.canonicalRGBA(),t={r:e[0],g:e[1],b:e[2]};return e[3]!==1&&(t.a=e[3]),t}invert(){let e=[0,0,0,0];return e[0]=1-this.#t[0],e[1]=1-this.#t[1],e[2]=1-this.#t[2],e[3]=this.#t[3],new r(e,"rgba")}grayscale(){let[e,t,n]=this.#t,i=e*.299+t*.587+n*.114;return new r([i,i,i,.5],"rgba")}setAlpha(e){let t=[...this.#t];return t[3]=e,new r(t,"rgba")}blendWith(e){let t=ld(e.#t,this.#t);return new r(t,"rgba")}blendWithAlpha(e){let t=[...this.#t];return t[3]*=e,new r(t,"rgba")}setFormat(e){this.#n=e}equal(e){let t=e.as(this.#n);return j(vt(this.#t[0]),vt(t.#t[0]),Dt)&&j(vt(this.#t[1]),vt(t.#t[1]),Dt)&&j(vt(this.#t[2]),vt(t.#t[2]),Dt)&&j(this.#t[3],t.#t[3])}},Ya=[["aliceblue",[240,248,255]],["antiquewhite",[250,235,215]],["aqua",[0,255,255]],["aquamarine",[127,255,212]],["azure",[240,255,255]],["beige",[245,245,220]],["bisque",[255,228,196]],["black",[0,0,0]],["blanchedalmond",[255,235,205]],["blue",[0,0,255]],["blueviolet",[138,43,226]],["brown",[165,42,42]],["burlywood",[222,184,135]],["cadetblue",[95,158,160]],["chartreuse",[127,255,0]],["chocolate",[210,105,30]],["coral",[255,127,80]],["cornflowerblue",[100,149,237]],["cornsilk",[255,248,220]],["crimson",[237,20,61]],["cyan",[0,255,255]],["darkblue",[0,0,139]],["darkcyan",[0,139,139]],["darkgoldenrod",[184,134,11]],["darkgray",[169,169,169]],["darkgrey",[169,169,169]],["darkgreen",[0,100,0]],["darkkhaki",[189,183,107]],["darkmagenta",[139,0,139]],["darkolivegreen",[85,107,47]],["darkorange",[255,140,0]],["darkorchid",[153,50,204]],["darkred",[139,0,0]],["darksalmon",[233,150,122]],["darkseagreen",[143,188,143]],["darkslateblue",[72,61,139]],["darkslategray",[47,79,79]],["darkslategrey",[47,79,79]],["darkturquoise",[0,206,209]],["darkviolet",[148,0,211]],["deeppink",[255,20,147]],["deepskyblue",[0,191,255]],["dimgray",[105,105,105]],["dimgrey",[105,105,105]],["dodgerblue",[30,144,255]],["firebrick",[178,34,34]],["floralwhite",[255,250,240]],["forestgreen",[34,139,34]],["fuchsia",[255,0,255]],["gainsboro",[220,220,220]],["ghostwhite",[248,248,255]],["gold",[255,215,0]],["goldenrod",[218,165,32]],["gray",[128,128,128]],["grey",[128,128,128]],["green",[0,128,0]],["greenyellow",[173,255,47]],["honeydew",[240,255,240]],["hotpink",[255,105,180]],["indianred",[205,92,92]],["indigo",[75,0,130]],["ivory",[255,255,240]],["khaki",[240,230,140]],["lavender",[230,230,250]],["lavenderblush",[255,240,245]],["lawngreen",[124,252,0]],["lemonchiffon",[255,250,205]],["lightblue",[173,216,230]],["lightcoral",[240,128,128]],["lightcyan",[224,255,255]],["lightgoldenrodyellow",[250,250,210]],["lightgreen",[144,238,144]],["lightgray",[211,211,211]],["lightgrey",[211,211,211]],["lightpink",[255,182,193]],["lightsalmon",[255,160,122]],["lightseagreen",[32,178,170]],["lightskyblue",[135,206,250]],["lightslategray",[119,136,153]],["lightslategrey",[119,136,153]],["lightsteelblue",[176,196,222]],["lightyellow",[255,255,224]],["lime",[0,255,0]],["limegreen",[50,205,50]],["linen",[250,240,230]],["magenta",[255,0,255]],["maroon",[128,0,0]],["mediumaquamarine",[102,205,170]],["mediumblue",[0,0,205]],["mediumorchid",[186,85,211]],["mediumpurple",[147,112,219]],["mediumseagreen",[60,179,113]],["mediumslateblue",[123,104,238]],["mediumspringgreen",[0,250,154]],["mediumturquoise",[72,209,204]],["mediumvioletred",[199,21,133]],["midnightblue",[25,25,112]],["mintcream",[245,255,250]],["mistyrose",[255,228,225]],["moccasin",[255,228,181]],["navajowhite",[255,222,173]],["navy",[0,0,128]],["oldlace",[253,245,230]],["olive",[128,128,0]],["olivedrab",[107,142,35]],["orange",[255,165,0]],["orangered",[255,69,0]],["orchid",[218,112,214]],["palegoldenrod",[238,232,170]],["palegreen",[152,251,152]],["paleturquoise",[175,238,238]],["palevioletred",[219,112,147]],["papayawhip",[255,239,213]],["peachpuff",[255,218,185]],["peru",[205,133,63]],["pink",[255,192,203]],["plum",[221,160,221]],["powderblue",[176,224,230]],["purple",[128,0,128]],["rebeccapurple",[102,51,153]],["red",[255,0,0]],["rosybrown",[188,143,143]],["royalblue",[65,105,225]],["saddlebrown",[139,69,19]],["salmon",[250,128,114]],["sandybrown",[244,164,96]],["seagreen",[46,139,87]],["seashell",[255,245,238]],["sienna",[160,82,45]],["silver",[192,192,192]],["skyblue",[135,206,235]],["slateblue",[106,90,205]],["slategray",[112,128,144]],["slategrey",[112,128,144]],["snow",[255,250,250]],["springgreen",[0,255,127]],["steelblue",[70,130,180]],["tan",[210,180,140]],["teal",[0,128,128]],["thistle",[216,191,216]],["tomato",[255,99,71]],["turquoise",[64,224,208]],["violet",[238,130,238]],["wheat",[245,222,179]],["white",[255,255,255]],["whitesmoke",[245,245,245]],["yellow",[255,255,0]],["yellowgreen",[154,205,50]],["transparent",[0,0,0,0]]];console.assert(Ya.every(([r])=>r.toLowerCase()===r),"All color nicknames must be lowercase.");var kS=new Map(Ya),CS=new Map(Ya.map(([r,[e,t,n,i=1]])=>[String([e,t,n,i]),r])),Ji=[127,32,210],EP={Content:_.fromRGBA([111,168,220,.66]),ContentLight:_.fromRGBA([111,168,220,.5]),ContentOutline:_.fromRGBA([9,83,148]),Padding:_.fromRGBA([147,196,125,.55]),PaddingLight:_.fromRGBA([147,196,125,.4]),Border:_.fromRGBA([255,229,153,.66]),BorderLight:_.fromRGBA([255,229,153,.5]),Margin:_.fromRGBA([246,178,107,.66]),MarginLight:_.fromRGBA([246,178,107,.5]),EventTarget:_.fromRGBA([255,196,196,.66]),Shape:_.fromRGBA([96,82,177,.8]),ShapeMargin:_.fromRGBA([96,82,127,.6]),CssGrid:_.fromRGBA([75,0,130,1]),LayoutLine:_.fromRGBA([...Ji,1]),GridBorder:_.fromRGBA([...Ji,1]),GapBackground:_.fromRGBA([...Ji,.3]),GapHatch:_.fromRGBA([...Ji,.8]),GridAreaBorder:_.fromRGBA([26,115,232,1]),AnchorIMCB:_.fromRGBA([127,32,210,1]),AnchorIMCBBackground:_.fromRGBA([127,32,210,.15]),AnchorInsetsBackground:_.fromRGBA([246,178,107,.25]),AnchorInsetsHatch:_.fromRGBA([246,178,107,.8]),AnchorTarget:_.fromRGBA([26,115,232,1]),AnchorTargetBackground:_.fromRGBA([26,115,232,.15])},$P={ParentOutline:_.fromRGBA([224,90,183,1]),ChildOutline:_.fromRGBA([0,120,212,1])},IP={Resizer:_.fromRGBA([222,225,230,1]),ResizerHandle:_.fromRGBA([166,166,166,1]),Mask:_.fromRGBA([248,249,249,1])};var jr={};pe(jr,{Experiment:()=>hs,ExperimentsSupport:()=>ls,GdpProfilesEnterprisePolicyValue:()=>Sd,GenAiEnterprisePolicyValue:()=>Od,HostConfigFreestylerExecutionMode:()=>bd,Runtime:()=>as,conditions:()=>$S,experiments:()=>tl,getChromeVersion:()=>ES,getPathName:()=>el,getRemoteBase:()=>AS,hostConfig:()=>yd,isNodeEntry:()=>gd});var md="",ss,Ka,Ja,os=globalThis;function AS(r=os.self?.location?.toString()??""){let t=new URL(r).searchParams.get("remoteBase");if(!t)return null;let n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools-remote/remote/serve_file/${n[1]}/`,version:n[1]}:null}function el(){return os.location?.pathname??""}function gd(r){return["node_app","js_app"].some(t=>r.includes(t))}var ES=()=>{let r=/(?:^|\W)(?:Chrome|HeadlessChrome)\/(\S+)/,t=pt.HOST_RUNTIME.getUserAgent().match(r);return t&&t.length>1?t[1]:""},as=class r{constructor(){}static instance(e={forceNew:null}){let{forceNew:t}=e;return(!ss||t)&&(ss=new r),ss}static removeInstance(){ss=void 0}static#e;static#t(){return!r.#e&&os.location&&(r.#e=new URLSearchParams(os.location.search)),r.#e}static queryParam(e){return r.#t()?.get(e)??null}static setQueryParamForTesting(e,t){r.#t()?.set(e,t)}static isNode(){return Ka===void 0&&(Ka=gd(el())),Ka}static isTraceApp(){return Ja===void 0&&(Ja=el().includes("trace_app")),Ja}static setPlatform(e){md=e}static platform(){return md}static isDescriptorEnabled(e){let{experiment:t}=e;if(t==="*")return!0;if(t?.startsWith("!")){let i=t.substring(1);if(tl.isEnabled(i))return!1}if(t&&!t.startsWith("!")){let i=t;if(!tl.isEnabled(i))return!1}let{condition:n}=e;return n?n(yd):!0}loadLegacyModule(e){return console.log("Loading legacy module: "+e),import(`../../${e}`).then(n=>(console.log("Loaded legacy module: "+e),n))}},ls=class{#e=new Map;#t=new Set;allConfigurableExperiments(){return[...this.#e.values()]}register(e){if(this.#i(e.name))throw new Error(`Duplicate registration of experiment '${e.name}'`);let t=new hs({...e,experiments:this});return this.#e.set(e.name,t),t}isEnabled(e){if(this.#i(e))return this.#t.has(e)||(this.#e.get(e)?.isEnabled()??!1);throw new Error(`Unknown experiment '${e}'`)}setEnabled(e,t){if(this.#i(e)){this.#e.get(e)?.setEnabled(t);return}throw new Error(`Unknown experiment '${e}'`)}enableForTest(e){if(!this.#i(e))throw new Error(`Unknown experiment '${e}'`);this.#t.add(e)}disableForTest(e){if(!this.#i(e))throw new Error(`Unknown experiment '${e}'`);this.#t.delete(e)}isEnabledForTest(e){return this.#t.has(e)}clearForTest(){this.#e.clear(),this.#t.clear()}#i(e){return this.#e.has(e)}},hs=class{name;title;#e;aboutFlag;#t;requiresChromeRestart;docLink;feedbackLink;constructor(e){this.name=e.name,this.title=e.title,this.#e=e.experiments,this.aboutFlag=e.aboutFlag,this.#t=e.isEnabled,this.requiresChromeRestart=e.requiresChromeRestart,this.docLink=e.docLink,this.feedbackLink=e.feedbackLink}isEnabled(){return this.#e.isEnabledForTest(this.name)||this.#t}setEnabled(e){this.#t=e}},tl=new ls,Od=(n=>(n[n.ALLOW=0]="ALLOW",n[n.ALLOW_WITHOUT_LOGGING=1]="ALLOW_WITHOUT_LOGGING",n[n.DISABLE=2]="DISABLE",n))(Od||{}),bd=(n=>(n.ALL_SCRIPTS="ALL_SCRIPTS",n.SIDE_EFFECT_FREE_SCRIPTS_ONLY="SIDE_EFFECT_FREE_SCRIPTS_ONLY",n.NO_SCRIPTS="NO_SCRIPTS",n))(bd||{}),Sd=(n=>(n[n.ENABLED=0]="ENABLED",n[n.ENABLED_WITHOUT_BADGES=1]="ENABLED_WITHOUT_BADGES",n[n.DISABLED=2]="DISABLED",n))(Sd||{}),yd=Object.create(null),$S={canDock:()=>!!as.queryParam("can_dock")};var sr={};pe(sr,{ObjectWrapper:()=>ir,eventMixin:()=>IS});var ir=class{listeners;addEventListener(e,t,n){this.listeners||(this.listeners=new Map);let i=this.listeners.get(e);return i||(i=new Set,this.listeners.set(e,i)),i.add({thisObject:n,listener:t}),{eventTarget:this,eventType:e,thisObject:n,listener:t}}once(e){return new Promise(t=>{let n=this.addEventListener(e,i=>{this.removeEventListener(e,n.listener),t(i.data)})})}removeEventListener(e,t,n){let i=this.listeners?.get(e);if(i){for(let s of i)s.listener===t&&s.thisObject===n&&(s.disposed=!0,i.delete(s));i.size||this.listeners?.delete(e)}}hasEventListeners(e){return!!this.listeners?.has(e)}dispatchEventToListeners(e,...[t]){let n=this.listeners?.get(e);if(!n)return;let i={data:t,source:this};for(let s of[...n])if(!s.disposed)try{s.listener.call(s.thisObject,i)}catch(o){console.error(`Event listener for ${String(e)} throw an error:`,o)}}};function IS(r){return class extends r{__events=new ir;addEventListener(t,n,i){return this.__events.addEventListener(t,n,i)}once(t){return this.__events.once(t)}removeEventListener(t,n,i){this.__events.removeEventListener(t,n,i)}hasEventListeners(t){return this.__events.hasEventListeners(t)}dispatchEventToListeners(t,...n){this.__events.dispatchEventToListeners(t,...n),typeof this.dispatchDOMEvent=="function"&&this.dispatchDOMEvent(new CustomEvent(t,{detail:n[0]}))}}}var cs=null,En=class r{locale;lookupClosestDevToolsLocale;constructor(e){this.lookupClosestDevToolsLocale=e.lookupClosestDevToolsLocale,e.settingLanguage==="browserLanguage"?this.locale=e.navigatorLanguage||"en-US":this.locale=e.settingLanguage,this.locale=this.lookupClosestDevToolsLocale(this.locale)}static instance(e={create:!1}){if(!cs&&!e.create)throw new Error("No LanguageSelector instance exists yet.");return e.create&&(cs=new r(e.data)),cs}static removeInstance(){cs=null}forceFallbackLocale(){this.locale="en-US"}languageIsSupportedByDevTools(e){return NS(e,this.lookupClosestDevToolsLocale(e))}};function NS(r,e){let t=new Intl.Locale(r),n=new Intl.Locale(e);return t.language===n.language}function Ve(r){let e;return{format(t,n){return e||(e=new Intl.NumberFormat(En.instance().locale,r)),MS(e,t,n)},formatToParts(t){return e||(e=new Intl.NumberFormat(En.instance().locale,r)),e.formatToParts(t)}}}function MS(r,e,t="\xA0"){let n=r.formatToParts(e),i=!1;for(let o of n)o.type==="literal"&&(o.value===" "?(i=!0,o.value=t):o.value===t&&(i=!0));if(i)return n.map(o=>o.value).join("");let s=n.findIndex(o=>o.type==="unit");return s===-1?n.map(o=>o.value).join(""):s===0?n[0].value+t+n.slice(1).map(o=>o.value).join(""):n.slice(0,s).map(o=>o.value).join("")+t+n.slice(s).map(o=>o.value).join("")}var DP=Ve({style:"unit",unit:"byte",unitDisplay:"narrow",minimumFractionDigits:0,maximumFractionDigits:0}),zP=Ve({style:"unit",unit:"kilobyte",unitDisplay:"narrow",minimumFractionDigits:1,maximumFractionDigits:1}),_P=Ve({style:"unit",unit:"kilobyte",unitDisplay:"narrow",minimumFractionDigits:0,maximumFractionDigits:0}),XP=Ve({style:"unit",unit:"megabyte",unitDisplay:"narrow",minimumFractionDigits:1,maximumFractionDigits:1}),FP=Ve({style:"unit",unit:"megabyte",unitDisplay:"narrow",minimumFractionDigits:0,maximumFractionDigits:0});var Ae={};pe(Ae,{deserializeUIString:()=>_y,fetchAndRegisterLocaleData:()=>$y,getAllSupportedDevToolsLocales:()=>Ay,getLazilyComputedLocalizedString:()=>My,getLocalizedLanguageRegion:()=>Zy,getLocalizedString:()=>qd,hasLocaleDataForTest:()=>Iy,lockedLazyString:()=>Fy,lockedString:()=>Xy,lookupClosestSupportedDevToolsLocale:()=>Ry,registerLocaleDataForTest:()=>Ly,registerUIStrings:()=>Dy,resetLocaleDataForTest:()=>Ny,serializeUIString:()=>zy});var ms={};pe(ms,{I18n:()=>gl});var xe=function(){return xe=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},xe.apply(this,arguments)},te;(function(r){r[r.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",r[r.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",r[r.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",r[r.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",r[r.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",r[r.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",r[r.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",r[r.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",r[r.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",r[r.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",r[r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",r[r.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",r[r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",r[r.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",r[r.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",r[r.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",r[r.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",r[r.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",r[r.INVALID_TAG=23]="INVALID_TAG",r[r.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",r[r.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",r[r.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(te||(te={}));var ge;(function(r){r[r.literal=0]="literal",r[r.argument=1]="argument",r[r.number=2]="number",r[r.date=3]="date",r[r.time=4]="time",r[r.select=5]="select",r[r.plural=6]="plural",r[r.pound=7]="pound",r[r.tag=8]="tag"})(ge||(ge={}));var or;(function(r){r[r.number=0]="number",r[r.dateTime=1]="dateTime"})(or||(or={}));function xd(r){return r.type===ge.literal}function _S(r){return r.type===ge.argument}function Rd(r){return r.type===ge.number}function Ad(r){return r.type===ge.date}function Ed(r){return r.type===ge.time}function $d(r){return r.type===ge.select}function Id(r){return r.type===ge.plural}function XS(r){return r.type===ge.pound}function Nd(r){return r.type===ge.tag}function Ld(r){return!!(r&&typeof r=="object"&&r.type===or.number)}function ll(r){return!!(r&&typeof r=="object"&&r.type===or.dateTime)}var Md=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,FS=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ZS(r){var e={};return r.replace(FS,function(t){var n=t.length;switch(t[0]){case"G":e.era=n===4?"long":n===5?"narrow":"short";break;case"y":e.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var BS=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function jS(r){if(r.length===0)throw new Error("Number skeleton cannot be empty");for(var e=r.split(BS).filter(function(d){return d.length>0}),t=[],n=0,i=e;n<i.length;n++){var s=i[n],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],l=o.slice(1),h=0,c=l;h<c.length;h++){var u=c[h];if(u.length===0)throw new Error("Invalid number skeleton")}t.push({stem:a,options:l})}return t}function VS(r){return r.replace(/^(.*?)-/,"")}var wd=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Dd=/^(@+)?(\+|#+)?$/g,HS=/(\*)(0+)|(#+)(0+)|(0+)/g,zd=/^(0+)$/;function vd(r){var e={};return r.replace(Dd,function(t,n,i){return typeof i!="string"?(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length):i==="+"?e.minimumSignificantDigits=n.length:n[0]==="#"?e.maximumSignificantDigits=n.length:(e.minimumSignificantDigits=n.length,e.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),e}function _d(r){switch(r){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function US(r){var e;if(r[0]==="E"&&r[1]==="E"?(e={notation:"engineering"},r=r.slice(2)):r[0]==="E"&&(e={notation:"scientific"},r=r.slice(1)),e){var t=r.slice(0,2);if(t==="+!"?(e.signDisplay="always",r=r.slice(2)):t==="+?"&&(e.signDisplay="exceptZero",r=r.slice(2)),!zd.test(r))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=r.length}return e}function Td(r){var e={},t=_d(r);return t||e}function WS(r){for(var e={},t=0,n=r;t<n.length;t++){var i=n[t];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=VS(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=xe(xe(xe({},e),{notation:"scientific"}),i.options.reduce(function(a,l){return xe(xe({},a),Td(l))},{}));continue;case"engineering":e=xe(xe(xe({},e),{notation:"engineering"}),i.options.reduce(function(a,l){return xe(xe({},a),Td(l))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(HS,function(a,l,h,c,u,d){if(l)e.minimumIntegerDigits=h.length;else{if(c&&u)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(zd.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(wd.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(wd,function(a,l,h,c,u,d){return h==="*"?e.minimumFractionDigits=l.length:c&&c[0]==="#"?e.maximumFractionDigits=c.length:u&&d?(e.minimumFractionDigits=u.length,e.maximumFractionDigits=u.length+d.length):(e.minimumFractionDigits=l.length,e.maximumFractionDigits=l.length),""}),i.options.length&&(e=xe(xe({},e),vd(i.options[0])));continue}if(Dd.test(i.stem)){e=xe(xe({},e),vd(i.stem));continue}var s=_d(i.stem);s&&(e=xe(xe({},e),s));var o=US(i.stem);o&&(e=xe(xe({},e),o))}return e}var rl,GS=new RegExp("^"+Md.source+"*"),YS=new RegExp(Md.source+"*$");function ne(r,e){return{start:r,end:e}}var qS=!!String.prototype.startsWith,KS=!!String.fromCodePoint,JS=!!Object.fromEntries,ey=!!String.prototype.codePointAt,ty=!!String.prototype.trimStart,ny=!!String.prototype.trimEnd,ry=!!Number.isSafeInteger,iy=ry?Number.isSafeInteger:function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r&&Math.abs(r)<=9007199254740991},hl=!0;try{Pd=Fd("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),hl=((rl=Pd.exec("a"))===null||rl===void 0?void 0:rl[0])==="a"}catch{hl=!1}var Pd,kd=qS?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},cl=KS?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i=e.length,s=0,o;i>s;){if(o=e[s++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},Cd=JS?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var s=i[n],o=s[0],a=s[1];t[o]=a}return t},Xd=ey?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i=e.charCodeAt(t),s;return i<55296||i>56319||t+1===n||(s=e.charCodeAt(t+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},sy=ty?function(e){return e.trimStart()}:function(e){return e.replace(GS,"")},oy=ny?function(e){return e.trimEnd()}:function(e){return e.replace(YS,"")};function Fd(r,e){return new RegExp(r,e)}var ul;hl?(il=Fd("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),ul=function(e,t){var n;il.lastIndex=t;var i=il.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}):ul=function(e,t){for(var n=[];;){var i=Xd(e,t);if(i===void 0||Zd(i)||cy(i))break;n.push(i),t+=i>=65536?2:1}return cl.apply(void 0,n)};var il,ay=(function(){function r(e,t){t===void 0&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return r.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},r.prototype.parseMessage=function(e,t,n){for(var i=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(e,n);if(o.err)return o;i.push(o.val)}else{if(s===125&&e>0)break;if(s===35&&(t==="plural"||t==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:ge.pound,location:ne(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(te.UNMATCHED_CLOSING_TAG,ne(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&dl(this.peek()||0)){var o=this.parseTag(e,t);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(e,t);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},r.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ge.literal,value:"<"+i+"/>",location:ne(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(e+1,t,!0);if(s.err)return s;var o=s.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!dl(this.char()))return this.error(te.INVALID_TAG,ne(a,this.clonePosition()));var l=this.clonePosition(),h=this.parseTagName();return i!==h?this.error(te.UNMATCHED_CLOSING_TAG,ne(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ge.tag,value:i,children:o,location:ne(n,this.clonePosition())},err:null}:this.error(te.INVALID_TAG,ne(a,this.clonePosition())))}else return this.error(te.UNCLOSED_TAG,ne(n,this.clonePosition()))}else return this.error(te.INVALID_TAG,ne(n,this.clonePosition()))},r.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&hy(this.char());)this.bump();return this.message.slice(e,this.offset())},r.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),i="";;){var s=this.tryParseQuote(t);if(s){i+=s;continue}var o=this.tryParseUnquoted(e,t);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var l=ne(n,this.clonePosition());return{val:{type:ge.literal,value:i,location:l},err:null}},r.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ly(this.peek()||0))?(this.bump(),"<"):null},r.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(n);this.bump()}return cl.apply(void 0,t)},r.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(t==="plural"||t==="selectordinal")||n===125&&e>0?null:(this.bump(),cl(n))},r.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,ne(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(te.EMPTY_ARGUMENT,ne(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(te.MALFORMED_ARGUMENT,ne(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,ne(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ge.argument,value:i,location:ne(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,ne(n,this.clonePosition())):this.parseArgumentOptions(e,t,i,n);default:return this.error(te.MALFORMED_ARGUMENT,ne(n,this.clonePosition()))}},r.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=ul(this.message,t),i=t+n.length;this.bumpTo(i);var s=this.clonePosition(),o=ne(e,s);return{value:n,location:o}},r.prototype.parseArgumentOptions=function(e,t,n,i){var s,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(te.EXPECT_ARGUMENT_TYPE,ne(o,l));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),u=this.parseSimpleArgStyleIfPossible();if(u.err)return u;var d=oy(u.val);if(d.length===0)return this.error(te.EXPECT_ARGUMENT_STYLE,ne(this.clonePosition(),this.clonePosition()));var p=ne(c,this.clonePosition());h={style:d,styleLocation:p}}var f=this.tryParseArgumentClose(i);if(f.err)return f;var m=ne(i,this.clonePosition());if(h&&kd(h?.style,"::",0)){var g=sy(h.style.slice(2));if(a==="number"){var u=this.parseNumberSkeletonFromString(g,h.styleLocation);return u.err?u:{val:{type:ge.number,value:n,location:m,style:u.val},err:null}}else{if(g.length===0)return this.error(te.EXPECT_DATE_TIME_SKELETON,m);var d={type:or.dateTime,pattern:g,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?ZS(g):{}},O=a==="date"?ge.date:ge.time;return{val:{type:O,value:n,location:m,style:d},err:null}}}return{val:{type:a==="number"?ge.number:a==="date"?ge.date:ge.time,value:n,location:m,style:(s=h?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var b=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(te.EXPECT_SELECT_ARGUMENT_OPTIONS,ne(b,xe({},b)));this.bumpSpace();var S=this.parseIdentifierIfPossible(),x=0;if(a!=="select"&&S.value==="offset"){if(!this.bumpIf(":"))return this.error(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ne(this.clonePosition(),this.clonePosition()));this.bumpSpace();var u=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,te.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(u.err)return u;this.bumpSpace(),S=this.parseIdentifierIfPossible(),x=u.val}var y=this.tryParsePluralOrSelectOptions(e,a,t,S);if(y.err)return y;var f=this.tryParseArgumentClose(i);if(f.err)return f;var v=ne(i,this.clonePosition());return a==="select"?{val:{type:ge.select,value:n,options:Cd(y.val),location:v},err:null}:{val:{type:ge.plural,value:n,options:Cd(y.val),offset:x,pluralType:a==="plural"?"cardinal":"ordinal",location:v},err:null}}default:return this.error(te.INVALID_ARGUMENT_TYPE,ne(o,l))}},r.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(te.EXPECT_ARGUMENT_CLOSING_BRACE,ne(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},r.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(te.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ne(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(t.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(t.offset,this.offset()),err:null}},r.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=jS(e)}catch{return this.error(te.INVALID_NUMBER_SKELETON,t)}return{val:{type:or.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?WS(n):{}},err:null}},r.prototype.tryParsePluralOrSelectOptions=function(e,t,n,i){for(var s,o=!1,a=[],l=new Set,h=i.value,c=i.location;;){if(h.length===0){var u=this.clonePosition();if(t!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(te.EXPECT_PLURAL_ARGUMENT_SELECTOR,te.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=ne(u,this.clonePosition()),h=this.message.slice(u.offset,this.offset())}else break}if(l.has(h))return this.error(t==="select"?te.DUPLICATE_SELECT_ARGUMENT_SELECTOR:te.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);h==="other"&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(t==="select"?te.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:te.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,ne(this.clonePosition(),this.clonePosition()));var f=this.parseMessage(e+1,t,n);if(f.err)return f;var m=this.tryParseArgumentClose(p);if(m.err)return m;a.push([h,{value:f.val,location:ne(p,this.clonePosition())}]),l.add(h),this.bumpSpace(),s=this.parseIdentifierIfPossible(),h=s.value,c=s.location}return a.length===0?this.error(t==="select"?te.EXPECT_SELECT_ARGUMENT_SELECTOR:te.EXPECT_PLURAL_ARGUMENT_SELECTOR,ne(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(te.MISSING_OTHER_CLAUSE,ne(this.clonePosition(),this.clonePosition())):{val:a,err:null}},r.prototype.tryParseDecimalInteger=function(e,t){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)s=!0,o=o*10+(a-48),this.bump();else break}var l=ne(i,this.clonePosition());return s?(o*=n,iy(o)?{val:o,err:null}:this.error(t,l)):this.error(e,l)},r.prototype.offset=function(){return this.position.offset},r.prototype.isEOF=function(){return this.offset()===this.message.length},r.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},r.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Xd(this.message,e);if(t===void 0)throw Error("Offset "+e+" is at invalid UTF-16 code unit boundary");return t},r.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},r.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},r.prototype.bumpIf=function(e){if(kd(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},r.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},r.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset "+e+" must be greater than or equal to the current offset "+this.offset());for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset "+e+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},r.prototype.bumpSpace=function(){for(;!this.isEOF()&&Zd(this.char());)this.bump()},r.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return n??null},r})();function dl(r){return r>=97&&r<=122||r>=65&&r<=90}function ly(r){return dl(r)||r===47}function hy(r){return r===45||r===46||r>=48&&r<=57||r===95||r>=97&&r<=122||r>=65&&r<=90||r==183||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8255&&r<=8256||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||r>=65536&&r<=983039}function Zd(r){return r>=9&&r<=13||r===32||r===133||r>=8206&&r<=8207||r===8232||r===8233}function cy(r){return r>=33&&r<=35||r===36||r>=37&&r<=39||r===40||r===41||r===42||r===43||r===44||r===45||r>=46&&r<=47||r>=58&&r<=59||r>=60&&r<=62||r>=63&&r<=64||r===91||r===92||r===93||r===94||r===96||r===123||r===124||r===125||r===126||r===161||r>=162&&r<=165||r===166||r===167||r===169||r===171||r===172||r===174||r===176||r===177||r===182||r===187||r===191||r===215||r===247||r>=8208&&r<=8213||r>=8214&&r<=8215||r===8216||r===8217||r===8218||r>=8219&&r<=8220||r===8221||r===8222||r===8223||r>=8224&&r<=8231||r>=8240&&r<=8248||r===8249||r===8250||r>=8251&&r<=8254||r>=8257&&r<=8259||r===8260||r===8261||r===8262||r>=8263&&r<=8273||r===8274||r===8275||r>=8277&&r<=8286||r>=8592&&r<=8596||r>=8597&&r<=8601||r>=8602&&r<=8603||r>=8604&&r<=8607||r===8608||r>=8609&&r<=8610||r===8611||r>=8612&&r<=8613||r===8614||r>=8615&&r<=8621||r===8622||r>=8623&&r<=8653||r>=8654&&r<=8655||r>=8656&&r<=8657||r===8658||r===8659||r===8660||r>=8661&&r<=8691||r>=8692&&r<=8959||r>=8960&&r<=8967||r===8968||r===8969||r===8970||r===8971||r>=8972&&r<=8991||r>=8992&&r<=8993||r>=8994&&r<=9e3||r===9001||r===9002||r>=9003&&r<=9083||r===9084||r>=9085&&r<=9114||r>=9115&&r<=9139||r>=9140&&r<=9179||r>=9180&&r<=9185||r>=9186&&r<=9254||r>=9255&&r<=9279||r>=9280&&r<=9290||r>=9291&&r<=9311||r>=9472&&r<=9654||r===9655||r>=9656&&r<=9664||r===9665||r>=9666&&r<=9719||r>=9720&&r<=9727||r>=9728&&r<=9838||r===9839||r>=9840&&r<=10087||r===10088||r===10089||r===10090||r===10091||r===10092||r===10093||r===10094||r===10095||r===10096||r===10097||r===10098||r===10099||r===10100||r===10101||r>=10132&&r<=10175||r>=10176&&r<=10180||r===10181||r===10182||r>=10183&&r<=10213||r===10214||r===10215||r===10216||r===10217||r===10218||r===10219||r===10220||r===10221||r===10222||r===10223||r>=10224&&r<=10239||r>=10240&&r<=10495||r>=10496&&r<=10626||r===10627||r===10628||r===10629||r===10630||r===10631||r===10632||r===10633||r===10634||r===10635||r===10636||r===10637||r===10638||r===10639||r===10640||r===10641||r===10642||r===10643||r===10644||r===10645||r===10646||r===10647||r===10648||r>=10649&&r<=10711||r===10712||r===10713||r===10714||r===10715||r>=10716&&r<=10747||r===10748||r===10749||r>=10750&&r<=11007||r>=11008&&r<=11055||r>=11056&&r<=11076||r>=11077&&r<=11078||r>=11079&&r<=11084||r>=11085&&r<=11123||r>=11124&&r<=11125||r>=11126&&r<=11157||r===11158||r>=11159&&r<=11263||r>=11776&&r<=11777||r===11778||r===11779||r===11780||r===11781||r>=11782&&r<=11784||r===11785||r===11786||r===11787||r===11788||r===11789||r>=11790&&r<=11798||r===11799||r>=11800&&r<=11801||r===11802||r===11803||r===11804||r===11805||r>=11806&&r<=11807||r===11808||r===11809||r===11810||r===11811||r===11812||r===11813||r===11814||r===11815||r===11816||r===11817||r>=11818&&r<=11822||r===11823||r>=11824&&r<=11833||r>=11834&&r<=11835||r>=11836&&r<=11839||r===11840||r===11841||r===11842||r>=11843&&r<=11855||r>=11856&&r<=11857||r===11858||r>=11859&&r<=11903||r>=12289&&r<=12291||r===12296||r===12297||r===12298||r===12299||r===12300||r===12301||r===12302||r===12303||r===12304||r===12305||r>=12306&&r<=12307||r===12308||r===12309||r===12310||r===12311||r===12312||r===12313||r===12314||r===12315||r===12316||r===12317||r>=12318&&r<=12319||r===12320||r===12336||r===64830||r===64831||r>=65093&&r<=65094}function pl(r){r.forEach(function(e){if(delete e.location,$d(e)||Id(e))for(var t in e.options)delete e.options[t].location,pl(e.options[t].value);else Rd(e)&&Ld(e.style)||(Ad(e)||Ed(e))&&ll(e.style)?delete e.style.location:Nd(e)&&pl(e.children)})}function uy(r,e){e===void 0&&(e={}),e=xe({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var t=new ay(r,e).parse();if(t.err){var n=SyntaxError(te[t.err.kind]);throw n.location=t.err.location,n.originalMessage=t.err.message,n}return e?.captureLocation||pl(t.val),t.val}function sl(r,e){var t=e&&e.cache?e.cache:Oy,n=e&&e.serializer?e.serializer:gy,i=e&&e.strategy?e.strategy:py;return i(r,{cache:t,serializer:n})}function dy(r){return r==null||typeof r=="number"||typeof r=="boolean"}function Bd(r,e,t,n){var i=dy(n)?n:t(n),s=e.get(i);return typeof s>"u"&&(s=r.call(this,n),e.set(i,s)),s}function jd(r,e,t){var n=Array.prototype.slice.call(arguments,3),i=t(n),s=e.get(i);return typeof s>"u"&&(s=r.apply(this,n),e.set(i,s)),s}function fl(r,e,t,n,i){return t.bind(e,r,n,i)}function py(r,e){var t=r.length===1?Bd:jd;return fl(r,this,t,e.cache.create(),e.serializer)}function fy(r,e){return fl(r,this,jd,e.cache.create(),e.serializer)}function my(r,e){return fl(r,this,Bd,e.cache.create(),e.serializer)}var gy=function(){return JSON.stringify(arguments)};function ds(){this.cache=Object.create(null)}ds.prototype.has=function(r){return r in this.cache};ds.prototype.get=function(r){return this.cache[r]};ds.prototype.set=function(r,e){this.cache[r]=e};var Oy={create:function(){return new ds}},ol={variadic:fy,monadic:my},ar;(function(r){r.MISSING_VALUE="MISSING_VALUE",r.INVALID_VALUE="INVALID_VALUE",r.MISSING_INTL_API="MISSING_INTL_API"})(ar||(ar={}));var ps=class extends Error{constructor(r,e,t){super(r),this.code=e,this.originalMessage=t}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Qd=class extends ps{constructor(r,e,t,n){super(`Invalid values for "${r}": "${e}". Options are "${Object.keys(t).join('", "')}"`,ar.INVALID_VALUE,n)}},by=class extends ps{constructor(r,e,t){super(`Value for "${r}" must be of type ${e}`,ar.INVALID_VALUE,t)}},Sy=class extends ps{constructor(r,e){super(`The intl string context variable "${r}" was not provided to the string "${e}"`,ar.MISSING_VALUE,e)}},He;(function(r){r[r.literal=0]="literal",r[r.object=1]="object"})(He||(He={}));function yy(r){return r.length<2?r:r.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==He.literal||t.type!==He.literal?e.push(t):n.value+=t.value,e},[])}function xy(r){return typeof r=="function"}function us(r,e,t,n,i,s,o){if(r.length===1&&xd(r[0]))return[{type:He.literal,value:r[0].value}];let a=[];for(let l of r){if(xd(l)){a.push({type:He.literal,value:l.value});continue}if(XS(l)){typeof s=="number"&&a.push({type:He.literal,value:t.getNumberFormat(e).format(s)});continue}let{value:h}=l;if(!(i&&h in i))throw new Sy(h,o);let c=i[h];if(_S(l)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),a.push({type:typeof c=="string"?He.literal:He.object,value:c});continue}if(Ad(l)){let u=typeof l.style=="string"?n.date[l.style]:ll(l.style)?l.style.parsedOptions:void 0;a.push({type:He.literal,value:t.getDateTimeFormat(e,u).format(c)});continue}if(Ed(l)){let u=typeof l.style=="string"?n.time[l.style]:ll(l.style)?l.style.parsedOptions:void 0;a.push({type:He.literal,value:t.getDateTimeFormat(e,u).format(c)});continue}if(Rd(l)){let u=typeof l.style=="string"?n.number[l.style]:Ld(l.style)?l.style.parsedOptions:void 0;u&&u.scale&&(c=c*(u.scale||1)),a.push({type:He.literal,value:t.getNumberFormat(e,u).format(c)});continue}if(Nd(l)){let{children:u,value:d}=l,p=i[d];if(!xy(p))throw new by(d,"function",o);let f=us(u,e,t,n,i,s),m=p(f.map(g=>g.value));Array.isArray(m)||(m=[m]),a.push(...m.map(g=>({type:typeof g=="string"?He.literal:He.object,value:g})))}if($d(l)){let u=l.options[c]||l.options.other;if(!u)throw new Qd(l.value,c,Object.keys(l.options),o);a.push(...us(u.value,e,t,n,i));continue}if(Id(l)){let u=l.options[`=${c}`];if(!u){if(!Intl.PluralRules)throw new ps(`Intl.PluralRules is not available in this environment.
25
+ Try polyfilling it using "@formatjs/intl-pluralrules"
26
+ `,ar.MISSING_INTL_API,o);let d=t.getPluralRules(e,{type:l.pluralType}).select(c-(l.offset||0));u=l.options[d]||l.options.other}if(!u)throw new Qd(l.value,c,Object.keys(l.options),o);a.push(...us(u.value,e,t,n,i,c-(l.offset||0)));continue}}return yy(a)}function wy(r,e){return e?{...r||{},...e||{},...Object.keys(r).reduce((t,n)=>(t[n]={...r[n],...e[n]||{}},t),{})}:r}function vy(r,e){return e?Object.keys(r).reduce((t,n)=>(t[n]=wy(r[n],e[n]),t),{...r}):r}function al(r){return{create(){return{has(e){return e in r},get(e){return r[e]},set(e,t){r[e]=t}}}}}function Ty(r={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:sl((...e)=>new Intl.NumberFormat(...e),{cache:al(r.number),strategy:ol.variadic}),getDateTimeFormat:sl((...e)=>new Intl.DateTimeFormat(...e),{cache:al(r.dateTime),strategy:ol.variadic}),getPluralRules:sl((...e)=>new Intl.PluralRules(...e),{cache:al(r.pluralRules),strategy:ol.variadic})}}var kt=class{constructor(r,e=kt.defaultLocale,t,n){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=i=>{let s=this.formatToParts(i);if(s.length===1)return s[0].value;let o=s.reduce((a,l)=>(!a.length||l.type!==He.literal||typeof a[a.length-1]!="string"?a.push(l.value):a[a.length-1]+=l.value,a),[]);return o.length<=1?o[0]||"":o},this.formatToParts=i=>us(this.ast,this.locales,this.formatters,this.formats,i,void 0,this.message),this.resolvedOptions=()=>({locale:Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,typeof r=="string"){if(this.message=r,!kt.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=kt.__parse(r,{ignoreTag:n?.ignoreTag})}else this.ast=r;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=vy(kt.formats,t),this.locales=e,this.formatters=n&&n.formatters||Ty(this.formatterCache)}static get defaultLocale(){return kt.memoizedDefaultLocale||(kt.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),kt.memoizedDefaultLocale}};kt.memoizedDefaultLocale=null;kt.__parse=uy;kt.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};var Vr=kt;var Vd={},fs=class{constructor(e,t,n){this.filename=e;this.stringStructure=t;this.localizedMessages=n}filename;stringStructure;localizedMessages;localizedStringSet;getLocalizedStringSetFor(e){if(this.localizedStringSet)return this.localizedStringSet;let t=this.localizedMessages.get(e);if(!t)throw new Error(`No locale data registered for '${e}'`);return this.localizedStringSet=new ml(this.filename,this.stringStructure,e,t),this.localizedStringSet}},ml=class{constructor(e,t,n,i){this.filename=e;this.stringStructure=t;this.localizedMessages=i;this.localeForFormatter=n==="en-XA"||n==="en-XL"?"de-DE":n}filename;stringStructure;localizedMessages;cachedSimpleStrings=new Map;cachedMessageFormatters=new Map;localeForFormatter;getLocalizedString(e,t=Vd){return t===Vd||Object.keys(t).length===0?this.getSimpleLocalizedString(e):this.getFormattedLocalizedString(e,t)}getMessageFormatterFor(e){let t=Object.keys(this.stringStructure).find(o=>this.stringStructure[o]===e);if(!t)throw new Error(`Unable to locate '${e}' in UIStrings object`);let n=`${this.filename} | ${t}`,i=this.localizedMessages[n],s=i?i.message:e;return new Vr(s,this.localeForFormatter,void 0,{ignoreTag:!0})}getSimpleLocalizedString(e){let t=this.cachedSimpleStrings.get(e);if(t)return t;let n=this.getMessageFormatterFor(e);try{let i=n.format();return this.cachedSimpleStrings.set(e,i),i}catch{let s=new Vr(e,this.localeForFormatter,void 0,{ignoreTag:!0}).format();return this.cachedSimpleStrings.set(e,s),s}}getFormattedLocalizedString(e,t){let n=this.cachedMessageFormatters.get(e);n||(n=this.getMessageFormatterFor(e),this.cachedMessageFormatters.set(e,n));try{return n.format(t)}catch{return new Vr(e,this.localeForFormatter,void 0,{ignoreTag:!0}).format(t)}}};var gl=class{supportedLocales;localeData=new Map;defaultLocale;constructor(e,t){this.defaultLocale=t,this.supportedLocales=new Set(e)}registerLocaleData(e,t){this.localeData.set(e,t)}hasLocaleDataForTest(e){return this.localeData.has(e)}resetLocaleDataForTest(){this.localeData.clear()}registerFileStrings(e,t){return new fs(e,t,this.localeData)}lookupClosestSupportedLocale(e){let n=Intl.getCanonicalLocales(e)[0].split("-");for(;n.length;){let i=n.join("-");if(this.supportedLocales.has(i))return i;n.pop()}return this.defaultLocale}};var Hd=["af","am","ar","as","az","be","bg","bn","bs","ca","cs","cy","da","de","el","en-GB","es-419","es","et","eu","fa","fi","fil","fr-CA","fr","gl","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km","kn","ko","ky","lo","lt","lv","mk","ml","mn","mr","ms","my","ne","nl","no","or","pa","pl","pt-PT","pt","ro","ru","si","sk","sl","sq","sr-Latn","sr","sv","sw","ta","te","th","tr","uk","ur","uz","vi","zh-HK","zh-TW","zu","en-US","zh","en-XL"],Ud=["en-US","zh","en-XL"],Wd="en-US",Gd="@HOST@/remote/serve_file/@VERSION@/core/i18n/locales/@LOCALE@.json",Yd="./locales/@LOCALE@.json";var $n=new ms.I18n(Hd,Wd),Qy=new Set([...Ud]);function Ry(r){return $n.lookupClosestSupportedLocale(r)}function Ay(){return[...$n.supportedLocales]}function Ey(r,e){let t=jr.getRemoteBase(e);if(t?.version&&!Qy.has(r))return Gd.replace("@HOST@","devtools://devtools-remote").replace("@VERSION@",t.version).replace("@LOCALE@",r);let n=Yd.replace("@LOCALE@",r);return new URL(n,import.meta.url).toString()}async function $y(r,e=globalThis.location?.toString()??""){let t=fetch(Ey(r,e)).then(s=>s.json()),n=new Promise((s,o)=>globalThis.setTimeout(()=>o(new Error("timed out fetching locale")),5e3)),i=await Promise.race([n,t]);$n.registerLocaleData(r,i)}function Iy(r){return $n.hasLocaleDataForTest(r)}function Ny(){$n.resetLocaleDataForTest()}function Ly(r,e){$n.registerLocaleData(r,e)}function My(r,e,t={}){return()=>qd(r,e,t)}function qd(r,e,t={}){return r.getLocalizedStringSetFor(En.instance().locale).getLocalizedString(e,t)}function Dy(r,e){return $n.registerFileStrings(r,e)}function zy(r,e={}){return JSON.stringify({string:r,values:e})}function _y(r){return r?JSON.parse(r):{string:"",values:{}}}function Xy(r){return r}function Fy(r){return()=>r}function Zy(r,e){let t=new Intl.Locale(r),{language:n,baseName:i}=t,s=new Intl.Locale(e.locale),o=n===s.language?"en":i,a=new Intl.DisplayNames([e.locale],{type:"language"}).of(n),l=new Intl.DisplayNames([o],{type:"language"}).of(n),h="",c="";if(t.region){let u=new Intl.DisplayNames([e.locale],{type:"region",style:"short"}).of(t.region),d=new Intl.DisplayNames([o],{type:"region",style:"short"}).of(t.region);h=` (${u})`,c=` (${d})`}return`${a}${h} - ${l}${c}`}var ek=Ve({style:"unit",unit:"millisecond",unitDisplay:"narrow",minimumFractionDigits:0,maximumFractionDigits:0}),tk=Ve({style:"unit",unit:"millisecond",unitDisplay:"long",minimumFractionDigits:0,maximumFractionDigits:0}),nk=Ve({style:"unit",unit:"microsecond",unitDisplay:"narrow",minimumFractionDigits:0,maximumFractionDigits:0}),rk=Ve({style:"unit",unit:"millisecond",unitDisplay:"narrow",minimumFractionDigits:2,maximumFractionDigits:2}),ik=Ve({style:"unit",unit:"second",unitDisplay:"narrow",minimumFractionDigits:2,maximumFractionDigits:2}),sk=Ve({style:"unit",unit:"minute",unitDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:1}),ok=Ve({style:"unit",unit:"hour",unitDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:1}),ak=Ve({style:"unit",unit:"day",unitDisplay:"long",minimumFractionDigits:0,maximumFractionDigits:1});var Ke={elementsPanel:"Elements panel",stylesSidebar:"Styles sidebar",changesDrawer:"Changes drawer",issuesView:"Issues view",networkPanel:"Network panel",requestConditionsDrawer:"Request conditions drawer",applicationPanel:"Application panel",sourcesPanel:"Sources panel",timelinePanel:"Performance panel",memoryInspectorPanel:"Memory inspector panel",developerResourcesPanel:"Developer resources panel",animationsPanel:"Animations panel",lighthousePanel:"Lighthouse panel"},jy=Ae.registerUIStrings("core/common/Revealer.ts",Ke),it=Ae.getLazilyComputedLocalizedString.bind(void 0,jy);var lk={DEVELOPER_RESOURCES_PANEL:it(Ke.developerResourcesPanel),ELEMENTS_PANEL:it(Ke.elementsPanel),STYLES_SIDEBAR:it(Ke.stylesSidebar),CHANGES_DRAWER:it(Ke.changesDrawer),ISSUES_VIEW:it(Ke.issuesView),NETWORK_PANEL:it(Ke.networkPanel),REQUEST_CONDITIONS_DRAWER:it(Ke.requestConditionsDrawer),TIMELINE_PANEL:it(Ke.timelinePanel),APPLICATION_PANEL:it(Ke.applicationPanel),SOURCES_PANEL:it(Ke.sourcesPanel),MEMORY_INSPECTOR_PANEL:it(Ke.memoryInspectorPanel),ANIMATIONS_PANEL:it(Ke.animationsPanel),LIGHTHOUSE_PANEL:it(Ke.lighthousePanel)};var lr={};pe(lr,{arrayBufferToString:()=>Gy,compress:()=>Ky,compressStream:()=>Jy,createMonitoredStream:()=>ex,decompress:()=>Jd,decompressDeflate:()=>qy,decompressDeflateToBuffer:()=>tp,decompressStream:()=>np,decompressToBuffer:()=>ep,fileToString:()=>Yy,isGzip:()=>Kd});function Kd(r){let e=new Uint8Array(r);return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}async function Gy(r){return Kd(r)?await Jd(r):new TextDecoder("utf-8").decode(new Uint8Array(r))}async function Yy(r){let e=r.stream();r.type.endsWith("gzip")&&(e=np(e));let t=await new Response(e).arrayBuffer();return new TextDecoder("utf-8").decode(t)}async function Jd(r,e="utf-8"){let t=await ep(r);return new TextDecoder(e).decode(t)}async function ep(r){return await Os(r,new DecompressionStream("gzip"))}async function qy(r,e="utf-8"){let t=await tp(r);return new TextDecoder(e).decode(t)}async function tp(r){try{return await Os(r,new DecompressionStream("deflate"))}catch{return await Os(r,new DecompressionStream("deflate-raw"))}}async function Ky(r){let e=new TextEncoder().encode(r);return await Os(e,new CompressionStream("gzip"))}async function Os(r,e){let n=new ReadableStream({start(i){i.enqueue(r instanceof ArrayBuffer?new Uint8Array(r):r),i.close()}}).pipeThrough(e);return await new Response(n).arrayBuffer()}function np(r){let e=new DecompressionStream("gzip");return r.pipeThrough(e)}function Jy(r){let e=new CompressionStream("gzip");return r.pipeThrough(e)}function ex(r,e){let t=0,n=new TransformStream({transform(i,s){t+=i.byteLength,e(t),s.enqueue(i)}});return r.pipeThrough(n)}function rp(r){if(r.indexOf("..")===-1&&r.indexOf(".")===-1)return r;let e=(r[0]==="/"?r.substring(1):r).split("/"),t=[];for(let i of e)i!=="."&&(i===".."?t.pop():t.push(i));let n=t.join("/");return r[0]==="/"&&n&&(n="/"+n),n[n.length-1]!=="/"&&(r[r.length-1]==="/"||e[e.length-1]==="."||e[e.length-1]==="..")&&(n=n+"/"),n}var hr=class r{isValid=!1;url;scheme="";user="";host="";port="";path="";queryParams="";fragment="";folderPathComponents="";lastPathComponent="";blobInnerScheme;#e;#t;constructor(e){this.url=e;let t=this.url.startsWith("blob:"),i=(t?e.substring(5):e).match(r.urlRegex());if(i)this.isValid=!0,t?(this.blobInnerScheme=i[2].toLowerCase(),this.scheme="blob"):this.scheme=i[2].toLowerCase(),this.user=i[3]??"",this.host=i[4]??"",this.port=i[5]??"",this.path=i[6]??"/",this.queryParams=i[7]??"",this.fragment=i[8]??"";else{if(this.url.startsWith("data:")){this.scheme="data";return}if(this.url.startsWith("blob:")){this.scheme="blob";return}if(this.url==="about:blank"){this.scheme="about";return}this.path=this.url}let s=this.path.lastIndexOf("/",this.path.length-2);s!==-1?this.lastPathComponent=this.path.substring(s+1):this.lastPathComponent=this.path;let o=this.path.lastIndexOf("/");o!==-1&&(this.folderPathComponents=this.path.substring(0,o))}static fromString(e){let t=new r(e.toString());return t.isValid?t:null}static preEncodeSpecialCharactersInPath(e){for(let t of["%",";","#","?"," "])e=e.replaceAll(t,encodeURIComponent(t));return e}static rawPathToEncodedPathString(e){let t=r.preEncodeSpecialCharactersInPath(e);return e.startsWith("/")?new URL(t,"file:///").pathname:new URL("/"+t,"file:///").pathname.substr(1)}static encodedFromParentPathAndName(e,t){return r.concatenate(e,"/",r.preEncodeSpecialCharactersInPath(t))}static urlFromParentUrlAndName(e,t){return r.concatenate(e,"/",r.preEncodeSpecialCharactersInPath(t))}static encodedPathToRawPathString(e){return decodeURIComponent(e)}static rawPathToUrlString(e){let t=r.preEncodeSpecialCharactersInPath(e.replace(/\\/g,"/"));t=t.replace(/\\/g,"/"),t.startsWith("file://")||(t.startsWith("/")?t="file://"+t:t="file:///"+t);let n=new URL(t).toString();for(;n.endsWith("/")&&n.length>8;)n=n.substring(0,n.length-1);return n}static relativePathToUrlString(e,t){let n=r.preEncodeSpecialCharactersInPath(e.replace(/\\/g,"/"));return new URL(n,t).toString()}static urlToRawPathString(e,t){console.assert(e.startsWith("file://"),"This must be a file URL.");let n=decodeURIComponent(e);return t?n.substr(8).replace(/\//g,"\\"):n.substr(7)}static sliceUrlToEncodedPathString(e,t){return e.substring(t)}static substr(e,t,n){return e.substr(t,n)}static substring(e,t,n){return e.substring(t,n)}static prepend(e,t){return e+t}static concatenate(e,...t){return e.concat(...t)}static trim(e){return e.trim()}static slice(e,t,n){return e.slice(t,n)}static join(e,t){return e.join(t)}static split(e,t,n){return e.split(t,n)}static toLowerCase(e){return e.toLowerCase()}static isValidUrlString(e){return new r(e).isValid}static urlWithoutHash(e){let t=e.indexOf("#");return t!==-1?e.substr(0,t):e}static urlRegex(){if(r.urlRegexInstance)return r.urlRegexInstance;let e=/([A-Za-z][A-Za-z0-9+.-]*):\/\//,t=/(?:([A-Za-z0-9\-._~%!$&'()*+,;=:]*)@)?/,n=/((?:\[[0-9a-fA-F:.]*:[0-9a-fA-F:.]*\])|(?:[^\s\/:]*))/,i=/(?::([\d]+))?/,s=/(\/[^#?]*)?/,o=/(?:\?([^#]*))?/,a=/(?:#(.*))?/;return r.urlRegexInstance=new RegExp("^("+e.source+t.source+n.source+i.source+")"+s.source+o.source+a.source+"$"),r.urlRegexInstance}static extractPath(e){let t=this.fromString(e);return t?t.path:""}static extractOrigin(e){let t=this.fromString(e);return t?t.securityOrigin():Wi.EmptyUrlString}static extractExtension(e){e=r.urlWithoutHash(e);let t=e.indexOf("?");t!==-1&&(e=e.substr(0,t));let n=e.lastIndexOf("/");n!==-1&&(e=e.substr(n+1));let i=e.lastIndexOf(".");if(i!==-1){e=e.substr(i+1);let s=e.indexOf("%");return s!==-1?e.substr(0,s):e}return""}static extractName(e){e.endsWith("/")&&(e=e.slice(0,-1));let t=e.lastIndexOf("/"),n=t!==-1?e.substr(t+1):e;return t=n.indexOf("?"),t<0?n:n.substr(0,t)}static completeURL(e,t){if(t.startsWith("data:")||t.startsWith("blob:")||t.startsWith("javascript:")||t.startsWith("mailto:"))return t;let n=t.trim(),i=this.fromString(n);if(i?.scheme){let d=i.securityOrigin(),p=rp(i.path),f=i.queryParams&&`?${i.queryParams}`,m=i.fragment&&`#${i.fragment}`;return d+p+f+m}let s=this.fromString(e);if(!s)return null;if(s.isDataURL())return t;if(t.length>1&&t.charAt(0)==="/"&&t.charAt(1)==="/")return s.scheme+":"+t;let o=s.securityOrigin(),a=s.path,l=s.queryParams?"?"+s.queryParams:"";if(!t.length)return o+a+l;if(t.charAt(0)==="#")return o+a+l+t;if(t.charAt(0)==="?")return o+a+t;let h=t.match(/^[^#?]*/);if(!h||!t.length)throw new Error("Invalid href");let c=h[0],u=t.substring(c.length);return c.charAt(0)!=="/"&&(c=s.folderPathComponents+"/"+c),o+rp(c)+u}static splitLineAndColumn(e){let t=e.match(r.urlRegex()),n="",i=e;t&&(n=t[1],i=e.substring(t[1].length));let o=/(?::(\d+))?(?::(\d+))?$/.exec(i),a,l;if(console.assert(!!o),!o)return{url:e,lineNumber:0,columnNumber:0};typeof o[1]=="string"&&(a=parseInt(o[1],10),a=isNaN(a)?void 0:a-1),typeof o[2]=="string"&&(l=parseInt(o[2],10),l=isNaN(l)?void 0:l-1);let h=n+i.substring(0,i.length-o[0].length);if(o[1]===void 0&&o[2]===void 0){let u=/wasm-function\[\d+\]:0x([a-z0-9]+)$/g.exec(i);u&&typeof u[1]=="string"&&(h=r.removeWasmFunctionInfoFromURL(h),l=parseInt(u[1],16),l=isNaN(l)?void 0:l)}return{url:h,lineNumber:a,columnNumber:l}}static removeWasmFunctionInfoFromURL(e){let t=/:wasm-function\[\d+\]/,n=e.search(t);return n===-1?e:r.substring(e,0,n)}static#i(e){return/^[A-Za-z]:/.test(e)}static#n(e){return/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e)}static isRelativeURL(e){return!this.#n(e)||this.#i(e)}get displayName(){return this.#e?this.#e:this.isDataURL()?this.dataURLDisplayName():this.isBlobURL()?this.url:this.isAboutBlank()?this.url:(this.#e=this.lastPathComponent,this.#e||(this.#e=(this.host||"")+"/"),this.#e==="/"&&(this.#e=this.url),this.#e)}dataURLDisplayName(){return this.#t?this.#t:this.isDataURL()?(this.#t=B.trimEndWithMaxLength(this.url,20),this.#t):""}isAboutBlank(){return this.url==="about:blank"}isDataURL(){return this.scheme==="data"}extractDataUrlMimeType(){let e=/^data:((?<type>\w+)\/(?<subtype>\w+))?(;base64)?,/,t=this.url.match(e);return{type:t?.groups?.type,subtype:t?.groups?.subtype}}isBlobURL(){return this.url.startsWith("blob:")}lastPathComponentWithFragment(){return this.lastPathComponent+(this.fragment?"#"+this.fragment:"")}domain(){return this.isDataURL()?"data:":this.host+(this.port?":"+this.port:"")}securityOrigin(){if(this.isDataURL())return"data:";let e=this.isBlobURL()?this.blobInnerScheme:this.scheme,t=this.domain();return!e&&!t?"":e+"://"+t}urlWithoutScheme(){return this.scheme&&this.url.startsWith(this.scheme+"://")?this.url.substring(this.scheme.length+3):this.url}static urlRegexInstance=null};var U={fetchAndXHR:"`Fetch` and `XHR`",javascript:"JavaScript",js:"JS",css:"CSS",img:"Img",media:"Media",font:"Font",doc:"Doc",socketShort:"Socket",webassembly:"WebAssembly",wasm:"Wasm",manifest:"Manifest",other:"Other",document:"Document",stylesheet:"Stylesheet",image:"Image",script:"Script",texttrack:"TextTrack",fetch:"Fetch",eventsource:"EventSource",websocket:"WebSocket",webtransport:"WebTransport",directsocket:"DirectSocket",signedexchange:"SignedExchange",ping:"Ping",cspviolationreport:"CSPViolationReport",preflight:"Preflight",fedcm:"FedCM"},ax=Ae.registerUIStrings("core/common/ResourceType.ts",U),G=Ae.getLazilyComputedLocalizedString.bind(void 0,ax),ce=class{#e;#t;#i;#n;constructor(e,t,n,i){this.#e=e,this.#t=t,this.#i=n,this.#n=i}static fromMimeType(e){return e?e.startsWith("text/html")?J.Document:e.startsWith("text/css")?J.Stylesheet:e.startsWith("image/")?J.Image:e.startsWith("text/")?J.Script:e.includes("font")?J.Font:e.includes("script")?J.Script:e.includes("octet")?J.Other:e.includes("application")?J.Script:J.Other:J.Other}static fromMimeTypeOverride(e){return e==="application/manifest+json"?J.Manifest:e==="application/wasm"?J.Wasm:null}static fromURL(e){return lx.get(hr.extractExtension(e))||null}static fromName(e){for(let t of Object.values(J))if(t.name()===e)return t;return null}static mimeFromURL(e){if(e.startsWith("snippet://")||e.startsWith("debugger://"))return"text/javascript";let t=hr.extractName(e);if(ip.has(t))return ip.get(t);let n=hr.extractExtension(e).toLowerCase();return n==="html"&&t.endsWith(".component.html")&&(n="component.html"),sp.get(n)}static mimeFromExtension(e){return sp.get(e)}static simplifyContentType(e){return new RegExp("^application(.*json$|/json+.*)").test(e)?"application/json":e}static isJavaScriptMimeType(e){return e==="application/javascript"||e==="text/javascript"}static mediaTypeForMetrics(e,t,n,i,s){return e!=="text/javascript"?e:t?"text/javascript+sourcemapped":n?"text/javascript+minified":i?"text/javascript+snippet":s?"text/javascript+eval":"text/javascript+plain"}name(){return this.#e}title(){return this.#t()}category(){return this.#i}isTextType(){return this.#n}isScript(){return this.#e==="script"||this.#e==="sm-script"}hasScripts(){return this.isScript()||this.isDocument()}isStyleSheet(){return this.#e==="stylesheet"||this.#e==="sm-stylesheet"}hasStyleSheets(){return this.isStyleSheet()||this.isDocument()}isDocument(){return this.#e==="document"}isDocumentOrScriptOrStyleSheet(){return this.isDocument()||this.isScript()||this.isStyleSheet()}isFont(){return this.#e==="font"}isImage(){return this.#e==="image"}isFromSourceMap(){return this.#e.startsWith("sm-")}toString(){return this.#e}canonicalMimeType(){return this.isDocument()?"text/html":this.isScript()?"text/javascript":this.isStyleSheet()?"text/css":""}},st=class{name;title;shortTitle;constructor(e,t,n){this.name=e,this.title=t,this.shortTitle=n}},Oe={XHR:new st("Fetch and XHR",G(U.fetchAndXHR),Ae.lockedLazyString("Fetch/XHR")),Document:new st(U.document,G(U.document),G(U.doc)),Stylesheet:new st(U.css,G(U.css),G(U.css)),Script:new st(U.javascript,G(U.javascript),G(U.js)),Font:new st(U.font,G(U.font),G(U.font)),Image:new st(U.image,G(U.image),G(U.img)),Media:new st(U.media,G(U.media),G(U.media)),Manifest:new st(U.manifest,G(U.manifest),G(U.manifest)),Socket:new st("Socket",Ae.lockedLazyString("WebSocket | WebTransport | DirectSocket"),G(U.socketShort)),Wasm:new st(U.webassembly,G(U.webassembly),G(U.wasm)),Other:new st(U.other,G(U.other),G(U.other))},J={Document:new ce("document",G(U.document),Oe.Document,!0),Stylesheet:new ce("stylesheet",G(U.stylesheet),Oe.Stylesheet,!0),Image:new ce("image",G(U.image),Oe.Image,!1),Media:new ce("media",G(U.media),Oe.Media,!1),Font:new ce("font",G(U.font),Oe.Font,!1),Script:new ce("script",G(U.script),Oe.Script,!0),TextTrack:new ce("texttrack",G(U.texttrack),Oe.Other,!0),XHR:new ce("xhr",Ae.lockedLazyString("XHR"),Oe.XHR,!0),Fetch:new ce("fetch",G(U.fetch),Oe.XHR,!0),Prefetch:new ce("prefetch",Ae.lockedLazyString("Prefetch"),Oe.Document,!0),EventSource:new ce("eventsource",G(U.eventsource),Oe.XHR,!0),WebSocket:new ce("websocket",G(U.websocket),Oe.Socket,!1),WebTransport:new ce("webtransport",G(U.webtransport),Oe.Socket,!1),DirectSocket:new ce("directsocket",G(U.directsocket),Oe.Socket,!1),Wasm:new ce("wasm",G(U.wasm),Oe.Wasm,!1),Manifest:new ce("manifest",G(U.manifest),Oe.Manifest,!0),SignedExchange:new ce("signed-exchange",G(U.signedexchange),Oe.Other,!1),Ping:new ce("ping",G(U.ping),Oe.Other,!1),CSPViolationReport:new ce("csp-violation-report",G(U.cspviolationreport),Oe.Other,!1),Other:new ce("other",G(U.other),Oe.Other,!1),Preflight:new ce("preflight",G(U.preflight),Oe.Other,!0),SourceMapScript:new ce("sm-script",G(U.script),Oe.Script,!0),SourceMapStyleSheet:new ce("sm-stylesheet",G(U.stylesheet),Oe.Stylesheet,!0),FedCM:new ce("fedcm",G(U.fedcm),Oe.Other,!1)},ip=new Map([["Cakefile","text/x-coffeescript"]]),lx=new Map([["js",J.Script],["mjs",J.Script],["css",J.Stylesheet],["xsl",J.Stylesheet],["avif",J.Image],["bmp",J.Image],["gif",J.Image],["ico",J.Image],["jpeg",J.Image],["jpg",J.Image],["jxl",J.Image],["png",J.Image],["svg",J.Image],["tif",J.Image],["tiff",J.Image],["vue",J.Document],["webmanifest",J.Manifest],["webp",J.Media],["otf",J.Font],["ttc",J.Font],["ttf",J.Font],["woff",J.Font],["woff2",J.Font],["wasm",J.Wasm]]),sp=new Map([["js","text/javascript"],["mjs","text/javascript"],["css","text/css"],["html","text/html"],["htm","text/html"],["xml","application/xml"],["xsl","application/xml"],["wasm","application/wasm"],["webmanifest","application/manifest+json"],["asp","application/x-aspx"],["aspx","application/x-aspx"],["jsp","application/x-jsp"],["c","text/x-c++src"],["cc","text/x-c++src"],["cpp","text/x-c++src"],["h","text/x-c++src"],["m","text/x-c++src"],["mm","text/x-c++src"],["coffee","text/x-coffeescript"],["dart","application/vnd.dart"],["ts","text/typescript"],["tsx","text/typescript-jsx"],["json","application/json"],["gyp","application/json"],["gypi","application/json"],["map","application/json"],["cs","text/x-csharp"],["go","text/x-go"],["java","text/x-java"],["kt","text/x-kotlin"],["scala","text/x-scala"],["less","text/x-less"],["php","application/x-httpd-php"],["phtml","application/x-httpd-php"],["py","text/x-python"],["sh","text/x-sh"],["gss","text/x-gss"],["sass","text/x-sass"],["scss","text/x-scss"],["vtt","text/vtt"],["ls","text/x-livescript"],["md","text/markdown"],["cljs","text/x-clojure"],["cljc","text/x-clojure"],["cljx","text/x-clojure"],["styl","text/x-styl"],["jsx","text/jsx"],["avif","image/avif"],["bmp","image/bmp"],["gif","image/gif"],["ico","image/ico"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["jxl","image/jxl"],["png","image/png"],["svg","image/svg+xml"],["tif","image/tif"],["tiff","image/tiff"],["webp","image/webp"],["otf","font/otf"],["ttc","font/collection"],["ttf","font/ttf"],["woff","font/woff"],["woff2","font/woff2"],["component.html","text/x.angular"],["svelte","text/x.svelte"],["vue","text/x.vue"]]);var px={elements:"Elements",ai:"AI",appearance:"Appearance",sources:"Sources",network:"Network",performance:"Performance",console:"Console",persistence:"Persistence",debugger:"Debugger",global:"Global",rendering:"Rendering",grid:"Grid",mobile:"Mobile",memory:"Memory",extension:"Extension",adorner:"Adorner",account:"Account"},fx=Ae.registerUIStrings("core/common/SettingRegistration.ts",px),pk=Ae.getLocalizedString.bind(void 0,fx);var cr=class r extends sr.ObjectWrapper{eventHandler;#e;nextObjectId=1;nextCallId=1;callbacks=new Map;previousCallbacks=new Set;worker;interval;workerUrl;constructor(e,t,n){super(),this.eventHandler=e,this.#e=t,this.workerUrl=n,this.worker=pt.HOST_RUNTIME.createWorker(n??import.meta.resolve("../../entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js")),this.worker.onmessage=this.messageReceived.bind(this)}get console(){return this.#e}createLoader(e,t){let n=this.nextObjectId++,i=new bs(this,n,e,t);return this.postMessage({callId:this.nextCallId++,disposition:"createLoader",objectId:n}),i}dispose(){this.worker.terminate(),clearInterval(this.interval)}disposeObject(e){this.postMessage({callId:this.nextCallId++,disposition:"dispose",objectId:e})}evaluateForTest(e,t){let n=this.nextCallId++;this.callbacks.set(n,(i,s)=>{t(i,s)}),this.postMessage({callId:n,disposition:"evaluateForTest",source:e})}callFactoryMethod(e,t,n,i,s,...o){let a=this.nextCallId++,l=this.nextObjectId++;return e?(this.callbacks.set(a,(h,c)=>{if(h){e(h);return}e(void 0,c?new i(this,l):void 0)}),this.postMessage({callId:a,disposition:"factory",objectId:t,methodName:n,methodArguments:o,newObjectId:l},s),null):(this.postMessage({callId:a,disposition:"factory",objectId:t,methodName:n,methodArguments:o,newObjectId:l},s),new i(this,l))}callMethod(e,t,n,...i){let s=this.nextCallId++;e&&this.callbacks.set(s,(o,a)=>{e(o,a)}),this.postMessage({callId:s,disposition:"method",objectId:t,methodName:n,methodArguments:i})}startCheckingForLongRunningCalls(){this.interval||(this.checkLongRunningCalls(),this.interval=globalThis.setInterval(this.checkLongRunningCalls.bind(this),300))}checkLongRunningCalls(){for(let t of this.previousCallbacks)this.callbacks.has(t)||this.previousCallbacks.delete(t);let e=!!this.previousCallbacks.size;this.dispatchEventToListeners(r.Events.WAIT,e);for(let t of this.callbacks.keys())this.previousCallbacks.add(t)}setupForSecondaryInit(e){let t=this.nextCallId++,n=new Promise((i,s)=>{this.callbacks.set(t,o=>{o?s(new Error(o)):i()})});return this.postMessage({callId:t,disposition:"setupForSecondaryInit",objectId:this.nextObjectId++},[e]),n}messageReceived(e){let t=e.data;if(t.eventName){this.eventHandler&&this.eventHandler(t.eventName,t.data);return}t.error&&(this.#e.error(`An error occurred when a call to method '${t.errorMethodName}' was requested`),this.#e.error(t.errorCallStack));let n=this.callbacks.get(t.callId);if(n){if(this.callbacks.delete(t.callId),t.error){n(t.error);return}n(void 0,t.result)}}postMessage(e,t){this.worker.postMessage(e,t)}};(e=>{let r;(n=>n.WAIT="Wait")(r=e.Events||={})})(cr||={});var ur=class{worker;objectId;constructor(e,t){this.worker=e,this.objectId=t}dispose(){this.worker.disposeObject(this.objectId)}callFactoryMethod(e,t,...n){return this.worker.callFactoryMethod(null,String(this.objectId),e,t,[],...n)}callFactoryMethodPromise(e,t,n,...i){return new Promise((s,o)=>this.worker.callFactoryMethod((a,l)=>{a?o(new Error(a)):l?s(l):o(new Error(`Failed to create ${t.name}`))},String(this.objectId),e,t,n,...i))}callMethodPromise(e,...t){return new Promise((n,i)=>this.worker.callMethod((s,o)=>{s?i(new Error(s)):n(o)},String(this.objectId),e,...t))}},bs=class extends ur{profileUid;snapshotReceivedCallback;constructor(e,t,n,i){super(e,t),this.profileUid=n,this.snapshotReceivedCallback=i}async write(e){await this.callMethodPromise("write",e)}async close(){await this.callMethodPromise("close");let e=new cr(()=>{},this.worker.console,this.worker.workerUrl),t=new MessageChannel;await e.setupForSecondaryInit(t.port2);try{let n=await this.callFactoryMethodPromise("buildSnapshot",Ss,[t.port1]);n.setProfileUid(this.profileUid),await n.updateStaticData(),this.snapshotReceivedCallback(n)}finally{e.dispose(),this.dispose()}}},Ss=class extends ur{staticData;profileUid;constructor(e,t){super(e,t),this.staticData=null}search(e,t){return this.callMethodPromise("search",e,t)}interfaceDefinitions(){return this.callMethodPromise("interfaceDefinitions")}getNativeContextSizes(){return this.callMethodPromise("getNativeContextSizes")}getRetainedByContextSummary(){return this.callMethodPromise("getRetainedByContextSummary")}aggregatesWithFilter(e){return this.callMethodPromise("aggregatesWithFilter",e)}getDuplicateStrings(){return this.callMethodPromise("getDuplicateStrings")}aggregatesForDiff(e){return this.callMethodPromise("aggregatesForDiff",e)}calculateSnapshotDiff(e,t){return this.callMethodPromise("calculateSnapshotDiff",e,t)}nodeClassKey(e){return this.callMethodPromise("nodeClassKey",e)}nodeIndexForId(e){return this.callMethodPromise("nodeIndexForId",e)}getObjectInfo(e){return this.callMethodPromise("getObjectInfo",e)}analyzeContexts(){return this.callMethodPromise("analyzeContexts")}createEdgesProvider(e,t){return this.callFactoryMethod("createEdgesProvider",zt,e,t)}createRetainingEdgesProvider(e){return this.callFactoryMethod("createRetainingEdgesProvider",zt,e)}createAddedNodesProvider(e,t){return this.callFactoryMethod("createAddedNodesProvider",zt,e,t)}createDeletedNodesProvider(e){return this.callFactoryMethod("createDeletedNodesProvider",zt,e)}createNodesProvider(e){return this.callFactoryMethod("createNodesProvider",zt,e)}createNodesProviderForClass(e,t){return this.callFactoryMethod("createNodesProviderForClass",zt,e,t)}queryObjects(e){return this.callFactoryMethod("queryObjects",zt,e)}allocationTracesTops(){return this.callMethodPromise("allocationTracesTops")}allocationNodeCallers(e){return this.callMethodPromise("allocationNodeCallers",e)}allocationStack(e){return this.callMethodPromise("allocationStack",e)}dispose(){throw new Error("Should never be called")}get nodeCount(){return this.staticData?this.staticData.nodeCount:0}get rootNodeIndex(){return this.staticData?this.staticData.rootNodeIndex:0}async updateStaticData(){this.staticData=await this.callMethodPromise("updateStaticData")}getStatistics(){return this.callMethodPromise("getStatistics")}getLocation(e){return this.callMethodPromise("getLocation",e)}getSamples(){return this.callMethodPromise("getSamples")}ignoreNodeInRetainersView(e){return this.callMethodPromise("ignoreNodeInRetainersView",e)}getRetainingPaths(e,t,n,i){return this.callMethodPromise("getRetainingPaths",e,t,n,i)}getDominatorsOf(e){return this.callMethodPromise("getDominatorsOf",e)}unignoreNodeInRetainersView(e){return this.callMethodPromise("unignoreNodeInRetainersView",e)}unignoreAllNodesInRetainersView(){return this.callMethodPromise("unignoreAllNodesInRetainersView")}areNodesIgnoredInRetainersView(){return this.callMethodPromise("areNodesIgnoredInRetainersView")}get totalSize(){return this.staticData?this.staticData.totalSize:0}get uid(){return this.profileUid}setProfileUid(e){this.profileUid=e}maxJSObjectId(){return this.staticData?this.staticData.maxJSObjectId:0}},zt=class extends ur{nodePosition(e){return this.callMethodPromise("nodePosition",e)}isEmpty(){return this.callMethodPromise("isEmpty")}serializeItemsRange(e,t){return this.callMethodPromise("serializeItemsRange",e,t)}async sortAndRewind(e){await this.callMethodPromise("sortAndRewind",e)}};var Ur=class{#e;#t=1;#i=[];#n={};#r={};#s={};#a=null;constructor(e,t){this.#e=e.strings,this.#o(e),this.#h(e,t)}#o(e){let t=this.#e,n=e.snapshot.meta.trace_function_info_fields,i=n.indexOf("name"),s=n.indexOf("script_name"),o=n.indexOf("script_id"),a=n.indexOf("line"),l=n.indexOf("column"),h=n.length,c=e.trace_function_infos,u=c.length,d=this.#i=new Array(u/h),p=0;for(let f=0;f<u;f+=h)d[p++]=new ws(t[c[f+i]],t[c[f+s]],c[f+o],c[f+a],c[f+l])}#h(e,t){let n=e.trace_tree,i=this.#i,s=this.#r,o=e.snapshot.meta.trace_node_fields,a=o.indexOf("id"),l=o.indexOf("function_info_index"),h=o.indexOf("count"),c=o.indexOf("size"),u=o.indexOf("children"),d=o.length;function p(f,m,g){let O=i[f[m+l]],b=f[m+a],S=t[b],x=S?S.count:0,y=S?S.size:0,v=new ys(b,O,f[m+h],f[m+c],x,y,g);s[b]=v,O.addTraceTopNode(v);let T=f[m+u];for(let C=0;C<T.length;C+=d)v.children.push(p(T,C,v));return v}return p(n,0,null)}serializeTraceTops(){if(this.#a)return this.#a;let e=this.#a=[],t=this.#i;for(let n=0;n<t.length;n++){let i=t[n];if(i.totalCount===0)continue;let s=this.#t++,o=n===0;e.push(this.#c(s,i,i.totalCount,i.totalSize,i.totalLiveCount,i.totalLiveSize,!o)),this.#s[s]=i}return e.sort(function(n,i){return i.size-n.size}),e}serializeCallers(e){let t=this.#d(e),n=[];for(;t.callers().length===1;)t=t.callers()[0],n.push(this.#f(t));let i=[],s=t.callers();for(let o=0;o<s.length;o++)i.push(this.#f(s[o]));return new ee.AllocationNodeCallers(n,i)}serializeAllocationStack(e){let t=this.#r[e],n=[];for(;t;){let i=t.functionInfo;n.push(new ee.AllocationStackFrame(i.functionName,i.scriptName,i.scriptId,i.line,i.column)),t=t.parent}return n}traceIds(e){return this.#d(e).traceTopIds}#d(e){let t=this.#n[e];return t||(t=this.#s[e].bottomUpRoot(),delete this.#s[e],this.#n[e]=t),t}#f(e){let t=this.#t++;return this.#n[t]=e,this.#c(t,e.functionInfo,e.allocationCount,e.allocationSize,e.liveCount,e.liveSize,e.hasCallers())}#c(e,t,n,i,s,o,a){return new ee.SerializedAllocationNode(e,t.functionName,t.scriptName,t.scriptId,t.line,t.column,n,i,s,o,a)}},ys=class{id;functionInfo;allocationCount;allocationSize;liveCount;liveSize;parent;children=[];constructor(e,t,n,i,s,o,a){this.id=e,this.functionInfo=t,this.allocationCount=n,this.allocationSize=i,this.liveCount=s,this.liveSize=o,this.parent=a}},xs=class r{functionInfo;allocationCount=0;allocationSize=0;liveCount=0;liveSize=0;traceTopIds=[];#e=[];constructor(e){this.functionInfo=e}addCaller(e){let t=e.functionInfo,n;for(let i=0;i<this.#e.length;i++){let s=this.#e[i];if(s.functionInfo===t){n=s;break}}return n||(n=new r(t),this.#e.push(n)),n}callers(){return this.#e}hasCallers(){return this.#e.length>0}},ws=class{functionName;scriptName;scriptId;line;column;totalCount=0;totalSize=0;totalLiveCount=0;totalLiveSize=0;#e=[];#t;constructor(e,t,n,i,s){this.functionName=e,this.scriptName=t,this.scriptId=n,this.line=i,this.column=s}addTraceTopNode(e){e.allocationCount!==0&&(this.#e.push(e),this.totalCount+=e.allocationCount,this.totalSize+=e.allocationSize,this.totalLiveCount+=e.liveCount,this.totalLiveSize+=e.liveSize)}bottomUpRoot(){return this.#e.length?(this.#t||this.#i(),this.#t??null):null}#i(){this.#t=new xs(this);for(let e=0;e<this.#e.length;e++){let t=this.#e[e],n=this.#t,i=t.allocationCount,s=t.allocationSize,o=t.liveCount,a=t.liveSize,l=t.id;for(;n.allocationCount+=i,n.allocationSize+=s,n.liveCount+=o,n.liveSize+=a,n.traceTopIds.push(l),t=t.parent,t!==null;)n=n.addCaller(t)}}};function op(r){let e=Tx(r),t=Px(r),n=Nx(r,t.liveClosures,t.finishedModuleFunctionNodeIndexes),{scopes:i,scriptsWithoutScopes:s}=Lx(r,t,e),o=Dx(r,i,n);return _x(o,s)}function Tx(r){let e=new Map,t=r.profile,n=t.scopes??[],i=t.scope_context_vars??[],s=t.scope_uses??[],o=t.snapshot.meta,a=o.scope_fields??[],l=o.scope_context_var_fields??[],h=o.scope_use_fields??[],c=a.length,u=l.length,d=h.length;if(c===0)return e;let p=a.indexOf("script_node_index"),f=a.indexOf("scope_id"),m=a.indexOf("depth"),g=a.indexOf("scope_context_vars_count"),O=a.indexOf("scope_uses_count"),b=l.indexOf("name"),S=h.indexOf("declaring_scope_id"),x=h.indexOf("slot_index"),y=r.strings,v=0,T,C=[];for(let Q=0;Q<n.length;Q+=c){let R=n[Q+p],Z=n[Q+f],M=n[Q+m],A=n[Q+g],F=[];for(let N=0;N<A;++N){let I=i[v+N*u+b];F.push({name:y[I],slotIndex:N,uses:[]})}v+=A*u;let H={scriptNodeIndex:R,scopeId:Z,children:[],variables:F};if(T!==R&&(T=R,C.length=0),M>0){let N=C[M-1];H.parent=N,N.children.push(H)}C[M]=H,C.length=M+1;let K=e.get(R);K||(K=new Map,e.set(R,K)),K.set(Z,H)}let k=0;for(let Q=0;Q<n.length;Q+=c){let R=n[Q+p],Z=n[Q+f],M=n[Q+O],A=e.get(R)?.get(Z);if(A)for(let F=0;F<M;++F){let H=s[k+F*d+S],K=s[k+F*d+x],I=e.get(R)?.get(H)?.variables[K];I&&!I.uses.includes(A)&&I.uses.push(A)}k+=M*d}return e}function Px(r){let e=new Map,t=[],n=[],i=new Set,s=new Map,o=new Map,a=r.createNode(),l=r.nodes,h=r.nodeFieldCount,c=r.nodeClosureType;for(let u=0;u<l.length;u+=h)a.nodeIndex=u,a.rawName().startsWith("system / Script")?(kx(e,a),Cx(o,a)):r.isContextObject(a)?Qx(t,a):a.rawType()===c?Rx(n,a):Ix(s,a)&&Ex(n,i,a);return{scripts:e,contextNodes:t,liveClosures:n,finishedModuleFunctionNodeIndexes:i,scopeInfoScriptNodeIndexes:o}}function kx(r,e){let t=e.rawName(),n=e.nodeIndex,i="system / Script / ",s=t.startsWith(i)?t.substring(i.length):"";s||(s=e.findInternalEdgeTarget("source_url")?.name()??""),r.set(n,{name:s,nodeId:e.id()})}function Cx(r,e){let t=e.findInternalEdgeTarget("infos");if(!t)return;let n=e.nodeIndex,i=e.snapshot.createNode(),s=e.findInternalEdgeTarget("eval_from_scope_info"),o=s?.rawName()==="system / ScopeInfo"?s.nodeIndex:void 0;for(let a=t.edges();a.hasNext();a.next()){let l=a.edge.node(),h=l.rawName();if(h==="system / ScopeInfo"){Sl(r,l.nodeIndex,o,n,i);continue}if(!h.startsWith("system / SharedFunctionInfo"))continue;let c=l,u=c.findInternalEdgeTarget("name_or_scope_info");if(u?.rawName()==="system / ScopeInfo"){Sl(r,u.nodeIndex,o,n,i);continue}let d=c.findInternalEdgeTarget("scope_id")?.nodeValueAsInt();if(d===void 0||yl(d))continue;let p=c.findInternalEdgeTarget("raw_outer_scope_info_or_feedback_metadata");p?.rawName()==="system / ScopeInfo"&&Sl(r,p.nodeIndex,o,n,i)}}function Sl(r,e,t,n,i){let s=e;for(;;){if(s===t||r.has(s)||(r.set(s,n),i.nodeIndex=s,ap(i)))return;let o=i.findInternalEdgeTarget("outer_scope_info");if(!o)return;s=o.nodeIndex}}function ap(r){let e=r.findInternalEdgeTarget("scope_id")?.nodeValueAsInt();return e!==void 0&&yl(e)}function yl(r){return r===-2}function Qx(r,e){let t=e.findInternalEdgeTarget("scope_info")?.nodeIndex;t!==void 0&&r.push({contextNodeIndex:e.nodeIndex,contextNodeId:e.id(),scopeInfoNodeIndex:t})}function Rx(r,e){let t=e.findInternalEdgeTarget("shared"),n=e.findInternalEdgeTarget("context");!t||!n||lp(r,e,t,n)}function lp(r,e,t,n){let i=t.findInternalEdgeTarget("script");if(!i)return;let s=t.findInternalEdgeTarget("scope_id")?.nodeValueAsInt();s!==void 0&&r.push({ownerNodeIndex:e.nodeIndex,contextNodeIndex:n.nodeIndex,scriptNodeIndex:i.nodeIndex,scopeId:s})}var Ax=-1;function Ex(r,e,t){let n=t.findInternalEdgeTarget("continuation")?.nodeValueAsInt(),i=t.findInternalEdgeTarget("function");if(n===void 0||i?.rawType()!==t.snapshot.nodeClosureType)return;let s=i.findInternalEdgeTarget("shared");if(!s)return;if(n===Ax){let a=s.findInternalEdgeTarget("scope_id")?.nodeValueAsInt();a!==void 0&&yl(a)&&e.add(i.nodeIndex);return}let o=t.findInternalEdgeTarget("context");o&&lp(r,t,s,o)}var $x=new Set(["JS_GENERATOR_OBJECT_TYPE","JS_ASYNC_FUNCTION_OBJECT_TYPE","JS_ASYNC_GENERATOR_OBJECT_TYPE"]);function Ix(r,e){if(e.rawType()!==e.snapshot.nodeObjectType)return!1;let t=e.findInternalEdgeTarget("map");if(!t)return!1;let n=t.nodeIndex,i=r.get(n);if(i===void 0){let s=t.findInternalEdgeTarget("instance_type_name")?.rawName();i=s!==void 0&&$x.has(s),r.set(n,i)}return i}function Nx(r,e,t){let n=new Map,i=r.createNode();for(let s of e){if(t.has(s.ownerNodeIndex))continue;let o=n.get(s.scriptNodeIndex);o||(o=new Map,n.set(s.scriptNodeIndex,o));let a=o.get(s.scopeId);a||(a={contextNodeIndexes:new Set},o.set(s.scopeId,a));let l=s.contextNodeIndex;for(;l!==void 0&&!a.contextNodeIndexes.has(l)&&(i.nodeIndex=l,!!r.isContextObject(i));)a.contextNodeIndexes.add(l),l=i.findInternalEdgeTarget("previous")?.nodeIndex}return n}function Lx(r,e,t){let n=new Map,i=new Map,s=r.createNode();for(let o of e.contextNodes){let a=o.scopeInfoNodeIndex,l=i.get(a);if(l){let y=[];s.nodeIndex=o.contextNodeIndex;for(let v=s.edges();v.hasNext();v.next()){let T=v.item();T.type()==="context"&&y.push(T.nodeIndex())}l.contexts.push({contextNodeIndex:o.contextNodeIndex,contextNodeId:o.contextNodeId,fieldValueNodeIndexes:y});continue}s.nodeIndex=a;let h=s.findInternalEdgeTarget("scope_id")?.nodeValueAsInt();if(h===void 0)continue;let c=s.id(),u=s.findInternalEdgeTarget("start_position")?.nodeValueAsInt()??0,d=s.findInternalEdgeTarget("end_position")?.nodeValueAsInt()??0,p=s.findInternalEdgeTarget("function_name")?.name(),f=Mx(r,e.scopeInfoScriptNodeIndexes,a),m=f!==void 0?e.scripts.get(f):void 0;if(f===void 0||!m)continue;let g=n.get(f);if(g){g.contextCount++;continue}let O=t.get(f);if(!O){n.set(f,{scriptNodeIndex:f,scriptNodeId:m.nodeId,scriptName:m.name,contextCount:1});continue}let b=O.get(h);if(!b)continue;let S=[],x=[];s.nodeIndex=o.contextNodeIndex;for(let y=s.edges();y.hasNext();y.next()){let v=y.item();v.type()==="context"&&(S.push(v.name()),x.push(v.nodeIndex()))}i.set(a,{scopeInfoNodeIndex:a,scopeInfoNodeId:c,scriptNodeIndex:f,scriptNodeId:m.nodeId,scriptName:m.name,scopeName:p,scopeStart:u,scopeEnd:d,scope:b,fieldNames:S,contexts:[{contextNodeIndex:o.contextNodeIndex,contextNodeId:o.contextNodeId,fieldValueNodeIndexes:x}]})}return{scopes:i,scriptsWithoutScopes:[...n.values()]}}function Mx(r,e,t){if(e.has(t))return e.get(t);let n=[],i=new Set,s=r.createNode(),o=t,a;for(;!i.has(o);){if(e.has(o)){a=e.get(o);break}if(i.add(o),n.push(o),s.nodeIndex=o,ap(s))break;let l=s.findInternalEdgeTarget("outer_scope_info");if(!l)break;o=l.nodeIndex}for(let l of n)e.set(l,a);return a}function Dx(r,e,t){let n=[],i=r.createNode();for(let s of e.values()){let o=[];for(let a of s.contexts){let l=0,h=[];for(let c=0;c<a.fieldValueNodeIndexes.length;++c){let u=s.fieldNames[c],d=s.scope.variables.find(m=>m.name===u);if(!d||zx(t,s.scriptNodeIndex,a.contextNodeIndex,d))continue;let p=a.fieldValueNodeIndexes[c];i.nodeIndex=p;let f=i.retainedSize();h.push({name:u,valueNodeIndex:p,valueNodeId:i.id(),valueName:i.name(),valueType:i.type(),selfSize:i.selfSize(),retainedSize:f}),l+=f}h.length!==0&&(i.nodeIndex=a.contextNodeIndex,o.push({contextNodeIndex:a.contextNodeIndex,contextNodeId:i.id(),retainedSize:i.retainedSize(),deadFieldsRetainedSizeSum:l,deadFields:h}))}o.length!==0&&n.push({scopeInfoNodeIndex:s.scopeInfoNodeIndex,scopeInfoNodeId:s.scopeInfoNodeId,scriptNodeIndex:s.scriptNodeIndex,scriptNodeId:s.scriptNodeId,scriptName:s.scriptName,scopeName:s.scopeName,scopeStart:s.scopeStart,scopeEnd:s.scopeEnd,contextFieldCount:s.fieldNames.length,contexts:o})}return n}function zx(r,e,t,n){let i=r.get(e);if(!i)return!1;for(let s of n.uses)for(let o=s;o;o=o.parent)if(i.get(o.scopeId)?.contextNodeIndexes.has(t))return!0;return!1}function _x(r,e){let t=(n,i)=>i.deadFieldsRetainedSizeSum-n.deadFieldsRetainedSizeSum||i.retainedSize-n.retainedSize||n.contextNodeIndex-i.contextNodeIndex;for(let n of r){for(let i of n.contexts)i.deadFields.sort((s,o)=>o.retainedSize-s.retainedSize);n.contexts.sort(t)}return r.sort((n,i)=>t(n.contexts[0],i.contexts[0])),e.sort((n,i)=>n.scriptNodeIndex-i.scriptNodeIndex),{scopes:r,scriptsWithoutScopes:e}}var Ms={};pe(Ms,{HeapSnapshot:()=>Ln,HeapSnapshotEdge:()=>Ts,HeapSnapshotEdgeIndexProvider:()=>Wr,HeapSnapshotEdgeIterator:()=>Cs,HeapSnapshotEdgesProvider:()=>pr,HeapSnapshotFilteredIterator:()=>Is,HeapSnapshotIndexRangeIterator:()=>$s,HeapSnapshotItemProvider:()=>Gr,HeapSnapshotNode:()=>As,HeapSnapshotNodeIndexProvider:()=>Ps,HeapSnapshotNodeIterator:()=>Es,HeapSnapshotNodesProvider:()=>Nn,HeapSnapshotProgress:()=>fr,HeapSnapshotRetainerEdge:()=>Qs,HeapSnapshotRetainerEdgeIndexProvider:()=>ks,HeapSnapshotRetainerEdgeIterator:()=>Rs,JSHeapSnapshot:()=>gr,JSHeapSnapshotEdge:()=>Ns,JSHeapSnapshotNode:()=>Yr,JSHeapSnapshotRetainerEdge:()=>Ls,SecondaryInitManager:()=>mr,createJSHeapSnapshotForTesting:()=>Vx});var Ts=class r{snapshot;edges;edgeIndex;constructor(e,t){this.snapshot=e,this.edges=e.containmentEdges,this.edgeIndex=t||0}clone(){return new r(this.snapshot,this.edgeIndex)}hasStringName(){throw new Error("Not implemented")}name(){throw new Error("Not implemented")}node(){return this.snapshot.createNode(this.nodeIndex())}nodeIndex(){if(typeof this.snapshot.edgeToNodeOffset>"u")throw new Error("edgeToNodeOffset is undefined");return this.edges.getValue(this.edgeIndex+this.snapshot.edgeToNodeOffset)}toString(){return"HeapSnapshotEdge: "+this.name()}type(){return this.snapshot.edgeTypes[this.rawType()]}itemIndex(){return this.edgeIndex}serialize(){return new ee.Edge(this.name(),this.node().serialize(),this.type(),this.edgeIndex)}rawType(){if(typeof this.snapshot.edgeTypeOffset>"u")throw new Error("edgeTypeOffset is undefined");return this.edges.getValue(this.edgeIndex+this.snapshot.edgeTypeOffset)}isInternal(){throw new Error("Not implemented")}isInvisible(){throw new Error("Not implemented")}isWeak(){throw new Error("Not implemented")}getValueForSorting(e){throw new Error("Not implemented")}nameIndex(){throw new Error("Not implemented")}},Ps=class{#e;constructor(e){this.#e=e.createNode()}itemForIndex(e){return this.#e.nodeIndex=e,this.#e}},Wr=class{#e;constructor(e){this.#e=e.createEdge(0)}itemForIndex(e){return this.#e.edgeIndex=e,this.#e}},ks=class{#e;constructor(e){this.#e=e.createRetainingEdge(0)}itemForIndex(e){return this.#e.setRetainerIndex(e),this.#e}},Cs=class{#e;edge;constructor(e){this.#e=e,this.edge=e.snapshot.createEdge(e.edgeIndexesStart())}hasNext(){return this.edge.edgeIndex<this.#e.edgeIndexesEnd()}item(){return this.edge}next(){if(typeof this.edge.snapshot.edgeFieldsCount>"u")throw new Error("edgeFieldsCount is undefined");this.edge.edgeIndex+=this.edge.snapshot.edgeFieldsCount}},Qs=class r{snapshot;#e;#t;#i;#n;#r;constructor(e,t){this.snapshot=e,this.setRetainerIndex(t)}clone(){return new r(this.snapshot,this.retainerIndex())}hasStringName(){return this.edge().hasStringName()}name(){return this.edge().name()}nameIndex(){return this.edge().nameIndex()}node(){return this.#s()}nodeIndex(){if(typeof this.#i>"u")throw new Error("retainingNodeIndex is undefined");return this.#i}retainerIndex(){return this.#e}setRetainerIndex(e){if(e!==this.#e){if(!this.snapshot.retainingEdges||!this.snapshot.retainingNodes)throw new Error("Snapshot does not contain retaining edges or retaining nodes");this.#e=e,this.#t=this.snapshot.retainingEdges[e],this.#i=this.snapshot.retainingNodes[e],this.#n=null,this.#r=null}}set edgeIndex(e){this.setRetainerIndex(e)}#s(){return this.#r||(this.#r=this.snapshot.createNode(this.#i)),this.#r}edge(){return this.#n||(this.#n=this.snapshot.createEdge(this.#t)),this.#n}toString(){return this.edge().toString()}itemIndex(){return this.#e}serialize(){let e=this.node(),t=e.serialize();return t.distance=this.#a(),t.ignored=this.snapshot.isNodeIgnoredInRetainersView(e.nodeIndex),new ee.Edge(this.name(),t,this.type(),this.#t)}type(){return this.edge().type()}isInternal(){return this.edge().isInternal()}getValueForSorting(e){if(e==="!edgeDistance")return this.#a();throw new Error("Invalid field name")}#a(){return this.snapshot.isEdgeIgnoredInRetainersView(this.#t)?ee.baseUnreachableDistance:this.node().distanceForRetainersView()}},Rs=class{#e;retainer;constructor(e){let t=e.snapshot,n=e.ordinal();if(!t.firstRetainerIndex)throw new Error("Snapshot does not contain firstRetainerIndex");let i=t.firstRetainerIndex[n];this.#e=t.firstRetainerIndex[n+1],this.retainer=t.createRetainingEdge(i)}hasNext(){return this.retainer.retainerIndex()<this.#e}item(){return this.retainer}next(){this.retainer.setRetainerIndex(this.retainer.retainerIndex()+1)}},As=class{snapshot;nodeIndex;constructor(e,t){this.snapshot=e,this.nodeIndex=t||0}distance(){return this.snapshot.nodeDistances[this.nodeIndex/this.snapshot.nodeFieldCount]}distanceForRetainersView(){return this.snapshot.getDistanceForRetainersView(this.nodeIndex)}className(){return this.snapshot.strings[this.classIndex()]}classIndex(){return this.#e()>>>up}classKeyInternal(){if(this.rawType()!==this.snapshot.nodeObjectType)return this.classIndex();let e=this.snapshot.getLocation(this.nodeIndex);return e?`${e.scriptId},${e.lineNumber},${e.columnNumber},${this.className()}`:this.classIndex()}setClassIndex(e){let t=this.#e();if(t&=wl,t|=e<<up,this.#t(t),this.classIndex()!==e)throw new Error("String index overflow")}dominatorIndex(){let e=this.snapshot.nodeFieldCount;return this.snapshot.dominatorsTree[this.nodeIndex/this.snapshot.nodeFieldCount]*e}edges(){return new Cs(this)}edgesCount(){return(this.edgeIndexesEnd()-this.edgeIndexesStart())/this.snapshot.edgeFieldsCount}id(){throw new Error("Not implemented")}rawName(){return this.snapshot.strings[this.rawNameIndex()]}isRoot(){return this.nodeIndex===this.snapshot.rootNodeIndex}isUserRoot(){throw new Error("Not implemented")}isHidden(){throw new Error("Not implemented")}isArray(){throw new Error("Not implemented")}isSynthetic(){throw new Error("Not implemented")}isDocumentDOMTreesRoot(){throw new Error("Not implemented")}name(){return this.rawName()}retainedSize(){return this.snapshot.retainedSizes[this.ordinal()]}retainers(){return new Rs(this)}retainersCount(){let e=this.snapshot,t=this.ordinal();return e.firstRetainerIndex[t+1]-e.firstRetainerIndex[t]}selfSize(){let e=this.snapshot;return e.nodes.getValue(this.nodeIndex+e.nodeSelfSizeOffset)}type(){return this.snapshot.nodeTypes[this.rawType()]}traceNodeId(){let e=this.snapshot;return e.nodes.getValue(this.nodeIndex+e.nodeTraceNodeIdOffset)}itemIndex(){return this.nodeIndex}serialize(){return new ee.Node(this.id(),this.name(),this.distance(),this.nodeIndex,this.retainedSize(),this.selfSize(),this.type())}rawNameIndex(){let e=this.snapshot;return e.nodes.getValue(this.nodeIndex+e.nodeNameOffset)}edgeIndexesStart(){return this.snapshot.firstEdgeIndexes[this.ordinal()]}edgeIndexesEnd(){return this.snapshot.firstEdgeIndexes[this.ordinal()+1]}ordinal(){return this.nodeIndex/this.snapshot.nodeFieldCount}nextNodeIndex(){return this.nodeIndex+this.snapshot.nodeFieldCount}rawType(){let e=this.snapshot;return e.nodes.getValue(this.nodeIndex+e.nodeTypeOffset)}isFlatConsString(){if(this.rawType()!==this.snapshot.nodeConsStringType)return!1;for(let e=this.edges();e.hasNext();e.next()){let t=e.edge;if(!t.isInternal())continue;let n=t.name();if((n==="first"||n==="second")&&t.node().name()==="")return!0}return!1}#e(){return this.snapshot.detachednessAndClassIndexArray[this.nodeIndex/this.snapshot.nodeFieldCount]}#t(e){this.snapshot.detachednessAndClassIndexArray[this.nodeIndex/this.snapshot.nodeFieldCount]=e}detachedness(){return this.#e()&wl}setDetachedness(e){let t=this.#e();t&=~wl,t|=e,this.#t(t)}findInternalEdgeTarget(e){for(let t=this.edges();t.hasNext();t.next()){let n=t.edge;if(n.isInternal()&&n.name()===e)return n.node()}}nodeValueAsBool(){if(this.rawType()!==this.snapshot.nodeNumberType||this.rawName()!=="bool")return;let e=this.findInternalEdgeTarget("value");if(!e)return;let t=e.rawName();if(t==="true")return!0;if(t==="false")return!1}nodeValueAsInt(){if(this.rawType()!==this.snapshot.nodeNumberType||this.rawName()!=="int")return;let e=this.findInternalEdgeTarget("value");if(!e)return;let t=parseInt(e.rawName(),10);return isNaN(t)?void 0:t}nodeStringLength(){let e=this.findInternalEdgeTarget("length");return e?e.nodeValueAsInt():void 0}nodeStringHash(){let e=this.findInternalEdgeTarget("hash");return e?e.nodeValueAsInt():void 0}nodeIsTruncatedString(){let e=this.findInternalEdgeTarget("truncated");return e?e.nodeValueAsBool()===!0:!1}},Es=class{node;#e;constructor(e){this.node=e,this.#e=e.snapshot.nodes.length}hasNext(){return this.node.nodeIndex<this.#e}item(){return this.node}next(){this.node.nodeIndex=this.node.nextNodeIndex()}},$s=class{#e;#t;#i;constructor(e,t){this.#e=e,this.#t=t,this.#i=0}hasNext(){return this.#i<this.#t.length}item(){let e=this.#t[this.#i];return this.#e.itemForIndex(e)}next(){++this.#i}},Is=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t,this.skipFilteredItems()}hasNext(){return this.#e.hasNext()}item(){return this.#e.item()}next(){this.#e.next(),this.skipFilteredItems()}skipFilteredItems(){for(;this.#e.hasNext()&&this.#t&&!this.#t(this.#e.item());)this.#e.next()}},fr=class{#e;constructor(e){this.#e=e}updateStatus(e){this.sendUpdateEvent(Ae.serializeUIString(e))}updateProgress(e,t,n){let i=((n?t/n:0)*100).toFixed(0);this.sendUpdateEvent(Ae.serializeUIString(e,{PH1:i}))}reportProblem(e){this.#e&&this.#e.sendEvent(ee.HeapSnapshotProgressEvent.BrokenSnapshot,e)}sendUpdateEvent(e){this.#e&&this.#e.sendEvent(ee.HeapSnapshotProgressEvent.Update,e)}};function xl(r,e){r.length>100||r.push(e)}function Xx(r,e){let t=r.rootNode();return e.map(n=>typeof n=="string"?n:(t.nodeIndex=n,`${t.name()} @${t.id()}`)).join(`
27
+ `)}function cp(r,e){e.postMessage({problemReport:r})}var mr=class{argsStep1;argsStep2;argsStep3;constructor(e){let{promise:t,resolve:n}=Promise.withResolvers();this.argsStep1=t;let{promise:i,resolve:s}=Promise.withResolvers();this.argsStep2=i;let{promise:o,resolve:a}=Promise.withResolvers();this.argsStep3=o;let l=h=>{let c=h.data;switch(c.step){case 1:n(c.args);break;case 2:s(c.args);break;case 3:a(c.args),e.removeEventListener("message",l);break}};e.addEventListener("message",l),e.start(),this.initialize(e)}async getNodeSelfSizes(){return(await this.argsStep3).nodeSelfSizes}async initialize(e){try{let t=await this.argsStep1,n=Ln.buildRetainers(t),i=await this.argsStep2,s={...i,...t,...n,essentialEdges:ft.createBitVector(i.essentialEdgesBuffer),port:e,nodeSelfSizesPromise:this.getNodeSelfSizes()},o=await Ln.calculateDominatorsAndRetainedSizes(s),a=Ln.buildDominatedNodes({...s,...o}),l={...n,...o,...a};e.postMessage({resultsFromSecondWorker:l},[l.dominatorsTree.buffer,l.retainedSizes.buffer,l.firstRetainerIndex.buffer,l.retainingNodes.buffer,l.retainingEdges.buffer,l.firstDominatedNodeIndex.buffer,l.dominatedNodes.buffer])}catch(t){e.postMessage({error:t+`
28
+ `+t?.stack})}}},wl=3,up=2,Fx=1,Zx=120,Bx=2,jx=1e3,In=-1,dr=-2,Ln=class r{nodes;containmentEdges;#e;#t;#i=null;strings;#n;#r;#s=-5;rootNodeIndexInternal=0;#a={};#o;#h={};#d={};profile;nodeTypeOffset;nodeNameOffset;nodeIdOffset;nodeSelfSizeOffset;#f;nodeTraceNodeIdOffset;nodeFieldCount;nodeTypes;nodeArrayType;nodeHiddenType;nodeObjectType;nodeNativeType;nodeStringType;nodeConsStringType;nodeSlicedStringType;nodeCodeType;nodeSyntheticType;nodeClosureType;nodeRegExpType;nodeNumberType;edgeFieldsCount;edgeTypeOffset;edgeNameOffset;edgeToNodeOffset;edgeTypes;edgeElementType;edgeHiddenType;edgeInternalType;edgeShortcutType;edgeWeakType;edgeInvisibleType;edgePropertyType;#c;#u;#l;#O;#T;nodeCount;#b;retainedSizes;firstEdgeIndexes;retainingNodes;retainingEdges;firstRetainerIndex;nodeDistances;firstDominatedNodeIndex;dominatedNodes;dominatorsTree;#g;nodeDetachednessAndClassIndexOffset;#P;#m=new Set;#S=new Set;#p;#y;detachednessAndClassIndexArray;nodeNativeContextAttribution;#k;#x;#C=new Map;#w;constructor(e,t){this.nodes=e.nodes,this.containmentEdges=e.edges,this.#e=e.snapshot.meta,this.#t=e.samples,this.strings=e.strings,this.#n=e.locations,this.#r=t,e.snapshot.root_index&&(this.rootNodeIndexInternal=e.snapshot.root_index),this.profile=e,this.#y=ft.createBitVector(this.strings.length)}async initialize(e){let t=this.#e;this.nodeTypeOffset=t.node_fields.indexOf("type"),this.nodeNameOffset=t.node_fields.indexOf("name"),this.nodeIdOffset=t.node_fields.indexOf("id"),this.nodeSelfSizeOffset=t.node_fields.indexOf("self_size"),this.#f=t.node_fields.indexOf("edge_count"),this.nodeTraceNodeIdOffset=t.node_fields.indexOf("trace_node_id"),this.nodeDetachednessAndClassIndexOffset=t.node_fields.indexOf("detachedness"),this.nodeFieldCount=t.node_fields.length,this.nodeTypes=t.node_types[this.nodeTypeOffset],this.nodeArrayType=this.nodeTypes.indexOf("array"),this.nodeHiddenType=this.nodeTypes.indexOf("hidden"),this.nodeObjectType=this.nodeTypes.indexOf("object"),this.nodeNativeType=this.nodeTypes.indexOf("native"),this.nodeStringType=this.nodeTypes.indexOf("string"),this.nodeConsStringType=this.nodeTypes.indexOf("concatenated string"),this.nodeSlicedStringType=this.nodeTypes.indexOf("sliced string"),this.nodeCodeType=this.nodeTypes.indexOf("code"),this.nodeSyntheticType=this.nodeTypes.indexOf("synthetic"),this.nodeClosureType=this.nodeTypes.indexOf("closure"),this.nodeRegExpType=this.nodeTypes.indexOf("regexp"),this.nodeNumberType=this.nodeTypes.indexOf("number"),this.edgeFieldsCount=t.edge_fields.length,this.edgeTypeOffset=t.edge_fields.indexOf("type"),this.edgeNameOffset=t.edge_fields.indexOf("name_or_index"),this.edgeToNodeOffset=t.edge_fields.indexOf("to_node"),this.edgeTypes=t.edge_types[this.edgeTypeOffset],this.edgeTypes.push("invisible"),this.edgeElementType=this.edgeTypes.indexOf("element"),this.edgeHiddenType=this.edgeTypes.indexOf("hidden"),this.edgeInternalType=this.edgeTypes.indexOf("internal"),this.edgeShortcutType=this.edgeTypes.indexOf("shortcut"),this.edgeWeakType=this.edgeTypes.indexOf("weak"),this.edgeInvisibleType=this.edgeTypes.indexOf("invisible"),this.edgePropertyType=this.edgeTypes.indexOf("property");let n=t.location_fields||[];this.#c=n.indexOf("object_index"),this.#u=n.indexOf("script_id"),this.#l=n.indexOf("line"),this.#O=n.indexOf("column"),this.#T=n.length,this.nodeCount=this.nodes.length/this.nodeFieldCount,this.#b=this.containmentEdges.length/this.edgeFieldsCount,this.#r.updateStatus("Building edge indexes\u2026"),this.firstEdgeIndexes=new Uint32Array(this.nodeCount+1),this.buildEdgeIndexes(),this.#r.updateStatus("Building retainers\u2026");let i=this.startInitStep1InSecondThread(e);if(this.#r.updateStatus("Propagating DOM state\u2026"),this.initDetachednessAndClassIndex(),this.propagateDOMState(),this.#r.updateStatus("Calculating node flags\u2026"),this.calculateFlags(),this.#r.updateStatus("Building dominated nodes\u2026"),this.startInitStep2InSecondThread(e),this.#r.updateStatus("Calculating shallow sizes\u2026"),this.calculateShallowSizes(),this.#r.updateStatus("Calculating retained sizes\u2026"),this.startInitStep3InSecondThread(e),this.#r.updateStatus("Calculating distances\u2026"),this.nodeDistances=new Int32Array(this.nodeCount),this.calculateDistances(!1),this.#r.updateStatus("Calculating object names\u2026"),this.calculateObjectNames(),this.applyInterfaceDefinitions(this.inferInterfaceDefinitions()),this.#r.updateStatus("Calculating samples\u2026"),this.buildSamples(),this.#r.updateStatus("Building locations\u2026"),this.buildLocationMap(),this.#r.updateStatus("Calculating native context attribution\u2026"),this.calculateNativeContextAttribution(),this.#r.updateStatus("Calculating retained sizes\u2026"),await this.installResultsFromSecondThread(i),this.calculateNativeContextSizes(),this.#r.updateStatus("Calculating statistics\u2026"),this.calculateStatistics(),this.profile.snapshot.trace_function_count){this.#r.updateStatus("Building allocation statistics\u2026");let o=this.nodes.length,a=this.nodeFieldCount,l=this.rootNode(),h={};for(let c=0;c<o;c+=a){l.nodeIndex=c;let u=l.traceNodeId(),d=h[u];d||(h[u]=d={count:0,size:0,ids:[]}),d.count++,d.size+=l.selfSize(),d.ids.push(l.id())}this.#g=new Ur(this.profile,h)}this.#r.updateStatus("Finished processing")}nodeIndexForId(e){let t=this.nodes.length,{nodes:n,nodeFieldCount:i,nodeIdOffset:s}=this;for(let o=0;o<t;o+=i)if(n.getValue(o+s)===e)return o}getObjectInfo(e){let t=this.nodes.length,n=this.nodeFieldCount;if(!Number.isInteger(e)||e<0||e>=t||e%n!==0)throw new Error("Invalid nodeIndex "+e);let i=this.createNode(e);return{id:i.id(),name:i.name(),type:i.type(),nodeIndex:e,detachedness:i.detachedness(),selfSize:i.selfSize(),retainedSize:i.retainedSize(),distance:i.distance(),edgeCount:i.edgesCount(),retainerCount:i.retainersCount()}}analyzeContexts(){return op(this)}startInitStep1InSecondThread(e){let t=new Promise((c,u)=>{let d=p=>{let f=p.data;if(f?.problemReport){let m=f.problemReport;console.warn(Xx(this,m))}else f?.resultsFromSecondWorker?(e.removeEventListener("message",d),c(f.resultsFromSecondWorker)):f?.error&&(e.removeEventListener("message",d),u(f.error))};e.addEventListener("message",d),e.start()}),n=this.#b,{containmentEdges:i,edgeToNodeOffset:s,edgeFieldsCount:o,nodeFieldCount:a}=this,l=new Uint32Array(n);for(let c=0;c<n;++c){let u=i.getValue(c*o+s);if(u%a)throw new Error("Invalid toNodeIndex "+u);l[c]=u/a}let h={edgeToNodeOrdinals:l,firstEdgeIndexes:this.firstEdgeIndexes,nodeCount:this.nodeCount,edgeFieldsCount:this.edgeFieldsCount,nodeFieldCount:this.nodeFieldCount};return e.postMessage({step:1,args:h},[l.buffer]),t}startInitStep2InSecondThread(e){let t=this.rootNodeIndexInternal/this.nodeFieldCount,n=this.initEssentialEdges(),i={rootNodeOrdinal:t,essentialEdgesBuffer:n.buffer};e.postMessage({step:2,args:i},[n.buffer])}startInitStep3InSecondThread(e){let{nodes:t,nodeFieldCount:n,nodeSelfSizeOffset:i,nodeCount:s}=this,o=new Uint32Array(s);for(let l=0;l<s;++l)o[l]=t.getValue(l*n+i);let a={nodeSelfSizes:o};e.postMessage({step:3,args:a},[o.buffer])}async installResultsFromSecondThread(e){let t=await e;this.dominatedNodes=t.dominatedNodes,this.dominatorsTree=t.dominatorsTree,this.firstDominatedNodeIndex=t.firstDominatedNodeIndex,this.firstRetainerIndex=t.firstRetainerIndex,this.retainedSizes=t.retainedSizes,this.retainingEdges=t.retainingEdges,this.retainingNodes=t.retainingNodes}buildEdgeIndexes(){let e=this.nodes,t=this.nodeCount,n=this.firstEdgeIndexes,i=this.nodeFieldCount,s=this.edgeFieldsCount,o=this.#f;n[t]=this.containmentEdges.length;for(let a=0,l=0;a<t;++a)n[a]=l,l+=e.getValue(a*i+o)*s}static buildRetainers(e){let{edgeToNodeOrdinals:t,firstEdgeIndexes:n,nodeCount:i,edgeFieldsCount:s,nodeFieldCount:o}=e,a=t.length,l=new Uint32Array(a),h=new Uint32Array(a),c=new Uint32Array(i+1);for(let d=0;d<a;++d){let p=t[d];++c[p]}for(let d=0,p=0;d<i;d++){let f=c[d];c[d]=p,l[p]=f,p+=f}c[i]=l.length;let u=n[0];for(let d=0;d<i;++d){let p=u;u=n[d+1];let f=d*o;for(let m=p;m<u;m+=s){let g=t[m/s],O=c[g],b=O+--l[O];l[b]=f,h[b]=m}}return{retainingNodes:l,retainingEdges:h,firstRetainerIndex:c}}allNodes(){return new Es(this.rootNode())}rootNode(){return this.createNode(this.rootNodeIndexInternal)}get rootNodeIndex(){return this.rootNodeIndexInternal}get totalSize(){return this.rootNode().retainedSize()+(this.profile.snapshot.extra_native_bytes??0)}createFilter(e){let{minNodeId:t,maxNodeId:n,allocationNodeId:i,filterName:s}=e,o;if(typeof i=="number"){if(o=this.createAllocationStackFilter(i),!o)throw new Error("Unable to create filter");o.key="AllocationNodeId: "+i}else typeof t=="number"&&typeof n=="number"?(o=this.createNodeIdFilter(t,n),o.key="NodeIdRange: "+t+".."+n):s!==void 0&&(o=this.createNamedFilter(s),o.key="NamedFilter: "+s);return o}search(e,t){let n=e.query;function i(b,S,x){return S.indexOf(n)!==-1&&b.add(x),b}let s=e.isRegex?new RegExp(n):B.createPlainTextSearchRegex(n,"i");function o(b,S,x){return s.test(S)&&b.add(x),b}let a=e.isRegex||!e.caseSensitive,l=a?o:i,h=this.strings.reduce(l,new Set),c=this.createFilter(t),u=[],d=this.nodes.length,p=this.nodes,f=this.nodeNameOffset,m=this.nodeIdOffset,g=this.nodeFieldCount,O=this.rootNode();for(let b=0;b<d;b+=g){if(O.nodeIndex=b,c&&!c(O)||O.selfSize()===0)continue;let S=O.name();S===O.rawName()?h.has(p.getValue(b+f))&&u.push(p.getValue(b+m)):(a?s.test(S):S.indexOf(n)!==-1)&&u.push(p.getValue(b+m))}return u}aggregatesWithFilter(e){let t=this.createFilter(e),n=t?t.key:"allObjects";return this.getAggregatesByClassKey(!1,n,t)}getDuplicateStrings(){let e=this.createNamedFilter("duplicatedStrings"),t=new Map,n=new Map,i=this.createNode(0);for(let o=0;o<this.nodeCount;++o)if(i.nodeIndex=o*this.nodeFieldCount,e(i)){let a=i.name();if(i.nodeIsTruncatedString()){let h=i.nodeStringLength(),c=i.nodeStringHash(),u=n.get(a);u||(u=[],n.set(a,u));let d=u.find(p=>p.length===h&&p.hash===c);d||(d={value:a,count:0,totalSelfSize:0,totalRetainedSize:0,nodes:[],truncated:!0,length:h,hash:c},u.push(d)),d.count++,d.totalSelfSize+=i.selfSize(),d.totalRetainedSize+=i.retainedSize(),d.nodes.push({id:i.id(),selfSize:i.selfSize(),retainedSize:i.retainedSize(),distance:i.distance()})}else{let h=t.get(a);h||(h={value:a,count:0,totalSelfSize:0,totalRetainedSize:0,nodes:[],truncated:!1},t.set(a,h)),h.count++,h.totalSelfSize+=i.selfSize(),h.totalRetainedSize+=i.retainedSize(),h.nodes.push({id:i.id(),selfSize:i.selfSize(),retainedSize:i.retainedSize(),distance:i.distance()})}}return[...t.values(),...Array.from(n.values()).flat()].sort((o,a)=>a.totalRetainedSize-o.totalRetainedSize)}createNodeIdFilter(e,t){function n(i){let s=i.id();return s>e&&s<=t}return n}createAllocationStackFilter(e){if(!this.#g)throw new Error("No Allocation Profile provided");let t=this.#g.traceIds(e);if(!t.length)return;let n={};for(let s=0;s<t.length;s++)n[t[s]]=!0;function i(s){return!!n[s.traceNodeId()]}return i}createNamedFilter(e){let t=ft.createBitVector(this.nodeCount),n=o=>{let a=o.nodeIndex/this.nodeFieldCount;return t.getBit(a)},i=o=>{let a=new Int32Array(this.nodeCount);for(let c=0;c<this.nodeCount;++c)a[c]=this.#s;let l=new Uint32Array(this.nodeCount);a[this.rootNode().ordinal()]=0,l[0]=this.rootNode().nodeIndex,this.bfs(l,1,a,o);for(let c=0;c<this.nodeCount;++c)a[c]!==this.#s&&t.setBit(c)},s=()=>{for(let o=0;o<this.nodeCount;++o)this.nodeDistances[o]===this.#s&&t.setBit(o)};switch(e){case"objectsRetainedByContexts":return i((o,a)=>!this.isContextObject(a.node())),s(),o=>!n(o);case"objectsRetainedByDetachedDomNodes":return i((o,a)=>a.node().detachedness()!==ee.DOMLinkState.DETACHED),s(),o=>!n(o);case"objectsRetainedByConsole":return i((o,a)=>!(o.isSynthetic()&&a.hasStringName()&&a.name().endsWith(" / DevTools console"))),s(),o=>!n(o);case"duplicatedStrings":return this.createDuplicatedStringsFilter(t);case"objectsRetainedByEventHandlers":{let o=this.createNode(0),a=this.nodeFieldCount,l=ft.createBitVector(this.nodeCount);for(let h=0;h<this.nodeCount;++h)if(o.nodeIndex=h*a,o.rawName()==="V8EventListener"){let c=this.getEdgeTarget(o,"1");if(!c)continue;let u=c.nodeIndex/a;if(this.getEdgeTarget(c,"code")){l.setBit(u);continue}let d=!1;for(let p=c.edges();p.hasNext();p.next()){let f=p.item().node();if(this.getEdgeTarget(f,"code")){l.setBit(f.nodeIndex/a),d=!0;break}}d||l.setBit(u)}return i((h,c)=>{let d=c.node().nodeIndex/a;return!l.getBit(d)}),s(),h=>!n(h)}case"sharedNativeContext":return o=>{let a=o.nodeIndex/this.nodeFieldCount;return this.nodeNativeContextAttribution[a]===dr};case"noNativeContext":return o=>{let a=o.nodeIndex/this.nodeFieldCount;return this.nodeNativeContextAttribution[a]===In};default:if(e.startsWith("nativeContext_")){let a=Number(e.substring(14))/this.nodeFieldCount;return l=>{let h=l.nodeIndex/this.nodeFieldCount;return this.nodeNativeContextAttribution[h]===a}}}throw new Error("Invalid filter name")}createDuplicatedStringsFilter(e){let t=new Map,n=new Map,i=this.createNode(0);for(let s=0;s<this.nodeCount;++s){i.nodeIndex=s*this.nodeFieldCount;let o=i.rawType();if(o!==this.nodeStringType&&o!==this.nodeConsStringType||i.isFlatConsString()||i.selfSize()===0)continue;let a=i.name();if(i.nodeIsTruncatedString()){let h=i.nodeStringLength(),c=i.nodeStringHash(),u=n.get(a);u||(u=[],n.set(a,u));let d=u.find(p=>p.length===h&&p.hash===c);d?(e.setBit(d.nodeIndex/this.nodeFieldCount),e.setBit(i.nodeIndex/this.nodeFieldCount)):u.push({nodeIndex:i.nodeIndex,length:h,hash:c})}else{let h=t.get(a);h===void 0?t.set(a,i.nodeIndex):(e.setBit(h/this.nodeFieldCount),e.setBit(i.nodeIndex/this.nodeFieldCount))}}return s=>{let o=s.nodeIndex/this.nodeFieldCount;return e.getBit(o)}}getAggregatesByClassKey(e,t,n){let i;if(t&&this.#h[t])i=this.#h[t];else{let s=this.buildAggregates(n);this.calculateClassesRetainedSize(s,n),i=Object.create(null);for(let[o,a]of s.entries()){let l=this.#Q(o);i[l]=a}t&&(this.#h[t]=i)}return e&&(!t||!this.#d[t])&&(this.sortAggregateIndexes(i),t&&(this.#d[t]=e)),i}allocationTracesTops(){return this.#g.serializeTraceTops()}allocationNodeCallers(e){return this.#g.serializeCallers(e)}allocationStack(e){let n=this.createNode(e).traceNodeId();return n?this.#g.serializeAllocationStack(n):null}aggregatesForDiff(e){if(this.#o?.interfaceDefinitions===e)return this.#o.aggregates;let t=this.#w;this.applyInterfaceDefinitions(JSON.parse(e));let n=this.getAggregatesByClassKey(!0,"allObjects");this.applyInterfaceDefinitions(t??[]);let i={},s=this.createNode();for(let o in n){let l=n[o].idxs,h=new Array(l.length),c=new Array(l.length);for(let u=0;u<l.length;u++)s.nodeIndex=l[u],h[u]=s.id(),c[u]=s.selfSize();i[o]={name:s.className(),indexes:l,ids:h,selfSizes:c}}return this.#o={interfaceDefinitions:e,aggregates:i},i}isUserRoot(e){return!0}isContextObject(e){return!1}calculateShallowSizes(){}calculateDistances(e,t){let n=this.nodeCount;if(e){let l=t;t=(h,c)=>!this.#m.has(c.nodeIndex())&&(!l||l(h,c)),this.#p===void 0&&(this.#p=new Int32Array(n))}let i=e?this.#p:this.nodeDistances,s=this.#s;for(let l=0;l<n;++l)i[l]=s;let o=new Uint32Array(this.nodeCount),a=0;for(let l=this.rootNode().edges();l.hasNext();l.next()){let h=l.edge.node();this.isUserRoot(h)&&(i[h.ordinal()]=1,o[a++]=h.nodeIndex)}this.bfs(o,a,i,t),i[this.rootNode().ordinal()]=a>0?ee.baseSystemDistance:0,o[0]=this.rootNode().nodeIndex,a=1,this.bfs(o,a,i,t)}bfs(e,t,n,i){let s=this.edgeFieldsCount,o=this.nodeFieldCount,a=this.containmentEdges,l=this.firstEdgeIndexes,h=this.edgeToNodeOffset,c=this.edgeTypeOffset,u=this.nodeCount,d=this.edgeWeakType,p=this.#s,f=0,m=this.createEdge(0),g=this.createNode(0);for(;f<t;){let O=e[f++],b=O/o,S=n[b]+1,x=l[b],y=l[b+1];g.nodeIndex=O;for(let v=x;v<y;v+=s){if(a.getValue(v+c)===d)continue;let C=a.getValue(v+h),k=C/o;n[k]===p&&(m.edgeIndex=v,!(i&&!i(g,m))&&(n[k]=S,e[t++]=C))}}if(t>u)throw new Error("BFS failed. Nodes to visit ("+t+") is more than nodes count ("+u+")")}buildAggregates(e){let t=new Map,n=this.nodes,i=n.length,s=this.nodeFieldCount,o=this.nodeSelfSizeOffset,a=this.rootNode(),l=this.nodeDistances;for(let h=0;h<i;h+=s){if(a.nodeIndex=h,e&&!e(a))continue;let c=n.getValue(h+o);if(!c)continue;let u=a.classKeyInternal(),d=h/s,p=l[d],f=t.get(u);f?(f.distance=Math.min(f.distance,p),++f.count,f.self+=c,f.idxs.push(h)):(f={count:1,distance:p,self:c,maxRet:0,name:a.className(),idxs:[h]},t.set(u,f))}for(let h of t.values())h.idxs=h.idxs.slice();return t}calculateClassesRetainedSize(e,t){let n=this.rootNodeIndexInternal,i=this.createNode(n),s=[n],o=[-1],a=[],l=new Map,h=this.nodeFieldCount,c=this.dominatedNodes,u=this.firstDominatedNodeIndex;for(;s.length;){let d=s.pop();i.nodeIndex=d;let p=i.classKeyInternal(),f=!!l.get(p),m=d/h,g=u[m],O=u[m+1];!f&&(!t||t(i))&&i.selfSize()&&(e.get(p).maxRet+=i.retainedSize(),g!==O&&(l.set(p,!0),o.push(s.length),a.push(p)));for(let S=g;S<O;S++)s.push(c[S]);let b=s.length;for(;o[o.length-1]===b;)o.pop(),p=a.pop(),l.set(p,!1)}}sortAggregateIndexes(e){let t=this.createNode(),n=this.createNode();for(let i in e)e[i].idxs.sort((s,o)=>(t.nodeIndex=s,n.nodeIndex=o,t.id()<n.id()?-1:1))}tryParseWeakMapEdgeName(e){if(this.#y.getBit(e))return;let n=this.strings[e],i=/^\d+(?<duplicatedPart> \/ part of key \(.*? @\d+\) -> value \(.*? @\d+\) pair in WeakMap \(table @(?<tableId>\d+)\))$/,s=n.match(i);if(!s){this.#y.setBit(e);return}return s.groups}computeIsEssentialEdge(e,t,n){let i=this.containmentEdges.getValue(t+this.edgeTypeOffset);if(i===this.edgeInternalType){let o=this.containmentEdges.getValue(t+this.edgeNameOffset),a=this.tryParseWeakMapEdgeName(o);if(a&&this.nodes.getValue(e+this.nodeIdOffset)===parseInt(a.tableId,10))return!1}if(i===this.edgeWeakType)return!1;let s=this.containmentEdges.getValue(t+this.edgeToNodeOffset);if(e===s)return!1;if(e!==this.rootNodeIndex){if(i===this.edgeShortcutType)return!1;let o=n?n.map:null,a=n?n.flag:0,l=e/this.nodeFieldCount,h=s/this.nodeFieldCount,c=!o||o[l]&a;if((!o||o[h]&a)&&!c)return!1}return!0}initEssentialEdges(){let e=ft.createBitVector(this.#b),{nodes:t,nodeFieldCount:n,edgeFieldsCount:i}=this,s=this.userObjectsMapAndFlag(),o=t.length,a=this.createNode(0);for(let l=0;l<o;l+=n){a.nodeIndex=l;let h=a.edgeIndexesEnd();for(let c=a.edgeIndexesStart();c<h;c+=i)this.computeIsEssentialEdge(l,c,s)&&e.setBit(c/i)}return e}static hasOnlyWeakRetainers(e,t){let{retainingEdges:n,edgeFieldsCount:i,firstRetainerIndex:s,essentialEdges:o}=e,a=s[t],l=s[t+1];for(let h=a;h<l;++h){let c=n[h];if(o.getBit(c/i))return!1}return!0}static async calculateDominatorsAndRetainedSizes(e){let{nodeCount:t,firstEdgeIndexes:n,edgeFieldsCount:i,nodeFieldCount:s,firstRetainerIndex:o,retainingEdges:a,retainingNodes:l,edgeToNodeOrdinals:h,rootNodeOrdinal:c,essentialEdges:u,nodeSelfSizesPromise:d,port:p}=e;function f(N){return u.getBit(N/i)}let m=t+1,g=new Uint32Array(m),O=new Uint32Array(m),b=new Uint32Array(m),S=new Uint32Array(m),x=new Uint32Array(m),y=new Array(m),v=0,T=new Uint32Array(m),C=N=>{let I=N-1;T[I]=n[I];let W=N;for(;W!==0;){x[W]===0&&(x[W]=++v,b[v]=S[W]=W);let Qe=g[W],ye=W-1;for(;T[ye]<n[ye+1];T[ye]+=i){let he=T[ye];if(!f(he))continue;let oe=h[he/i],Ie=oe+1;if(x[Ie]===0){g[Ie]=W,T[oe]=n[oe],Qe=Ie;break}}W=Qe}},k=new Uint32Array(m),Q=N=>{let I=0;for(;O[O[N]]!==0;)k[++I]=N,N=O[N];for(;I>0;){let W=k[I--];x[S[O[W]]]<x[S[W]]&&(S[W]=S[O[W]]),O[W]=O[O[W]]}},R=N=>O[N]===0?N:(Q(N),S[N]),Z=(N,I)=>{O[I]=N},M=c+1;v=0;let A=new Uint32Array(m);if(C(M),v<t){let N=[`Heap snapshot: ${t-v} nodes are unreachable from the root.`];xl(N,"The following nodes have only weak retainers:");for(let I=1;I<=t;I++){let W=I-1;x[I]===0&&r.hasOnlyWeakRetainers(e,W)&&(xl(N,W*s),g[I]=M,C(I))}cp(N,p)}if(v<t){let N=[`Heap snapshot: Still found ${t-v} unreachable nodes:`];for(let I=1;I<=t;I++)if(x[I]===0){let W=I-1;xl(N,W*s),g[I]=M,x[I]=++v,b[v]=S[I]=I}cp(N,p)}for(let N=v;N>=2;--N){let I=b[N],W=I-1,Qe=!0;for(let ye=o[W];ye<o[W+1];ye++){if(!f(a[ye]))continue;Qe=!1;let oe=l[ye]/s+1,Ie=R(oe);x[Ie]<x[I]&&(x[I]=x[Ie])}if(Qe&&(x[I]=x[M]),y[b[x[I]]]===void 0&&(y[b[x[I]]]=new Set),y[b[x[I]]].add(I),Z(g[I],I),y[g[I]]!==void 0){for(let ye of y[g[I]]){let he=R(ye);A[ye]=x[he]<x[ye]?he:g[I]}y[g[I]].clear()}}A[0]=A[M]=M;for(let N=2;N<=v;N++){let I=b[N];A[I]!==b[x[I]]&&(A[I]=A[A[I]])}let F=new Uint32Array(t),H=new Float64Array(t),K=await d;for(let N=0;N<t;N++)F[N]=A[N+1]-1,H[N]=K[N];for(let N=v;N>1;N--){let I=b[N]-1,W=F[I];H[W]+=H[I]}return{dominatorsTree:F,retainedSizes:H}}static buildDominatedNodes(e){let{nodeCount:t,dominatorsTree:n,rootNodeOrdinal:i,nodeFieldCount:s}=e,o=new Uint32Array(t+1),a=new Uint32Array(t-1),l=0,h=t;if(i===l)l=1;else if(i===h-1)h=h-1;else throw new Error("Root node is expected to be either first or last");for(let u=l;u<h;++u)++o[n[u]];let c=0;for(let u=0,d=t;u<d;++u){let p=a[c]=o[u];o[u]=c,c+=p}o[t]=a.length;for(let u=l;u<h;++u){let d=n[u],p=o[d];p+=--a[p],a[p]=u*s}return{firstDominatedNodeIndex:o,dominatedNodes:a}}calculateObjectNames(){let{nodes:e,nodeCount:t,nodeNameOffset:n,nodeNativeType:i,nodeHiddenType:s,nodeObjectType:o,nodeCodeType:a,nodeClosureType:l,nodeRegExpType:h}=this,c=new Map,u=b=>{let S=c.get(b);return S===void 0&&(S=this.addString(b),c.set(b,S)),S},d=u("(system)"),p=u("(compiled code)"),f=u("Function"),m=u("RegExp");function g(b){switch(b.rawType()){case s:return d;case o:case i:{let S=b.rawName();if(S.startsWith("<")){let x=S.indexOf(" ");return x!==-1&&(S=S.substring(0,x)+">"),u(S)}if(S.startsWith("Detached <")){let x=S.indexOf(" ",10);return x!==-1&&(S=S.substring(0,x)+">"),u(S)}return e.getValue(b.nodeIndex+n)}case a:return p;case l:return f;case h:return m;default:return u("("+b.type()+")")}}let O=this.createNode(0);for(let b=0;b<t;++b)O.setClassIndex(g(O)),O.nodeIndex=O.nextNodeIndex()}calculateNativeContextAttribution(){let e=new Int32Array(this.nodeCount).fill(In),t=ft.createBitVector(this.nodeCount),n=this.buildInitEdgeTargets();this.#x=[];for(let i=0;i<this.nodeCount;i++)if(this.isNativeContext(i))this.#x.push(i),e[i]=i,t.setBit(i);else{let s=this.inferFixedNativeContextForOrdinal(i,n);s>=0&&(e[i]=s,t.setBit(i))}this.propagateNativeContextAttribution(e,t),this.nodeNativeContextAttribution=e}calculateNativeContextSizes(){let e=this.nodeFieldCount,t=this.createNode(0),n=[],i=new Map;for(let h of this.#x){t.nodeIndex=h*e;let c={nodeId:t.id(),nodeIndex:t.nodeIndex,nodeName:t.name(),attributedSize:0,retainedSize:t.retainedSize(),selfSize:t.selfSize()};n.push(c),i.set(h,c)}let s=0,o=0,a=this.nodeSelfSizeOffset,l=this.nodes;for(let h=0;h<this.nodeCount;++h){let c=this.nodeNativeContextAttribution[h],u=l.getValue(h*e+a);if(c===dr)s+=u;else if(c===In)o+=u;else{console.assert(c>=0,"ownerOrdinal should be >= 0");let d=i.get(c);console.assert(d!==void 0,"info should exist"),d&&(d.attributedSize+=u)}}this.#k={nativeContexts:n,sharedSize:s,noAttributionSize:o}}buildInitEdgeTargets(){let{nodeCount:e,nodeFieldCount:t,containmentEdges:n,edgeFieldsCount:i,edgeTypeOffset:s,edgeNameOffset:o,edgeToNodeOffset:a,edgeInternalType:l,firstEdgeIndexes:h,strings:c}=this,u=new Int32Array(e).fill(-1),d=new Int32Array(e).fill(-1),p=c.indexOf("native_context"),f=c.indexOf("map");for(let m=0;m<e;m++){let g=h[m],O=h[m+1];for(let b=g;b<O;b+=i){if(n.getValue(b+s)!==l)continue;let x=n.getValue(b+o),v=n.getValue(b+a)/t;x===p&&u[m]===-1&&this.isNativeContext(v)?u[m]=v:x===f&&d[m]===-1&&(d[m]=v)}}return{nativeContext:u,map:d}}inferFixedNativeContextForOrdinal(e,t){let n=t.map[e];if(n>=0){let i=t.map[n];if(i>=0){let s=t.nativeContext[i];if(s>=0)return s}}return In}mergeNativeContextOwner(e,t){return console.assert(t!==In,"Incoming owner should not be NO_NATIVE_CONTEXT"),e===dr||t===dr?dr:e===In?t:e===t?e:dr}propagateNativeContextAttribution(e,t){let{nodeCount:n,containmentEdges:i,edgeFieldsCount:s,edgeTypeOffset:o,edgeToNodeOffset:a,edgeShortcutType:l,edgeWeakType:h,nodeFieldCount:c,firstEdgeIndexes:u}=this,d=[];for(let f=0;f<n;f++)t.getBit(f)&&d.push(f);let p=0;for(;p<d.length;){let f=d[p];p++;let m=e[f];console.assert(m!==In,"Queue should not contain unattributed nodes");let g=u[f],O=u[f+1];for(let b=g;b<O;b+=s){let S=i.getValue(b+o);if(S===l||S===h)continue;let y=i.getValue(b+a)/c;if(y===f||t.getBit(y))continue;let v=this.mergeNativeContextOwner(e[y],m);v!==e[y]&&(e[y]=v,d.push(y))}}}getNativeContextSizes(){return this.#k}getRetainedByContextSummary(){let e=this.createNamedFilter("objectsRetainedByContexts"),t=0,n=0,i=0,s=0,o=0,a=this.rootNode(),{nodes:l,nodeFieldCount:h,nodeSelfSizeOffset:c}=this,u=l.length;for(let d=0;d<u;d+=h){let p=l.getValue(d+c);p&&(a.nodeIndex=d,e(a)?(i++,n+=p):(o++,s+=p),this.isContextObject(a)&&t++)}return{contextCount:t,retainedByContextSize:n,retainedByContextCount:i,notRetainedByContextSize:s,notRetainedByContextCount:o,totalSize:n+s}}nodeNativeContext(e){let t=e/this.nodeFieldCount,n=this.nodeNativeContextAttribution[t];return n<0?n:n*this.nodeFieldCount}isNativeContext(e){let t=this.nodes.getValue(e*this.nodeFieldCount+this.nodeNameOffset),n=this.strings[t];return n==="system / NativeContext"||n.startsWith("system / NativeContext / ")||n==="Detached system / NativeContext"||n.startsWith("Detached system / NativeContext / ")}interfaceDefinitions(){return JSON.stringify(this.#w??[])}isPlainJSObject(e){return e.rawType()===this.nodeObjectType&&e.rawName()==="Object"}inferInterfaceDefinitions(){let{edgePropertyType:e}=this,t=new Map,n=0;for(let a=this.allNodes();a.hasNext();a.next()){let l=a.item();if(!this.isPlainJSObject(l))continue;++n;let h="{",c=[];for(let d=l.edges();d.hasNext();d.next()){let p=d.item(),f=p.name();if(p.rawType()!==e||f==="__proto__")continue;let m=Yr.formatPropertyName(f);if(h.length>Fx&&h.length+m.length>Zx)break;h.length!==1&&(h+=", "),h+=m,c.push(f)}if(c.length===0)continue;h+="}";let u=t.get(h);u?++u.count:t.set(h,{name:h,properties:c,count:1})}let i=Array.from(t.values());i.sort((a,l)=>l.count-a.count);let s=[],o=Math.max(Bx,n/jx);for(let a=0;a<i.length;++a){let l=i[a];if(l.count<o)break;s.push(l)}return s}applyInterfaceDefinitions(e){let{edgePropertyType:t}=this;this.#w=e,this.#h={},this.#d={};function n(o,a){return!a||o.propertyCount>a.propertyCount?o:a.propertyCount>o.propertyCount?a:o.index<=a.index?o:a}let i={next:new Map,matchInfo:null,greatestNext:null};for(let o=0;o<e.length;++o){let a=e[o],l=a.properties.toSorted(),h=i;for(let c of l){let u=h.next,d=u.get(c);d||(d={next:new Map,matchInfo:null,greatestNext:null},u.set(c,d),(h.greatestNext===null||h.greatestNext<c)&&(h.greatestNext=c)),h=d}h.matchInfo||(h.matchInfo={name:a.name,propertyCount:l.length,index:o})}let s={name:"Object",propertyCount:0,index:1/0};for(let o=this.allNodes();o.hasNext();o.next()){let a=o.item();if(!this.isPlainJSObject(a))continue;let l=[];for(let d=a.edges();d.hasNext();d.next()){let p=d.item();p.rawType()===t&&l.push(p.name())}l.sort();let h=new Set;h.add(i);let c=n(s,i.matchInfo);for(let d of l)for(let p of Array.from(h.keys())){(p.greatestNext===null||d>=p.greatestNext)&&h.delete(p);let f=p.next.get(d);f&&(h.add(f),c=n(c,f.matchInfo))}let u=c===s?a.rawNameIndex():this.#C.get(c.name);u===void 0&&(u=this.addString(c.name),this.#C.set(c.name,u)),a.setClassIndex(u)}}iterateFilteredChildren(e,t,n){let i=this.firstEdgeIndexes[e],s=this.firstEdgeIndexes[e+1];for(let o=i;o<s;o+=this.edgeFieldsCount){let l=this.containmentEdges.getValue(o+this.edgeToNodeOffset)/this.nodeFieldCount,h=this.containmentEdges.getValue(o+this.edgeTypeOffset);t(h)&&n(l)}}addString(e){return this.strings.push(e),this.strings.length-1}getEdgeTarget(e,t){for(let n=e.edges();n.hasNext();n.next()){let i=n.item();if(i.name()===t)return i.node()}return null}initDetachednessAndClassIndex(){if(this.detachednessAndClassIndexArray=new Uint32Array(this.nodeCount),this.nodeDetachednessAndClassIndexOffset!==-1){let{nodeFieldCount:e,nodeDetachednessAndClassIndexOffset:t}=this;for(let n=0;n<this.nodeCount;++n)this.detachednessAndClassIndexArray[n]=Number(this.nodes.getValue(n*e+t))}else{let e=this.rootNode(),t=this.nodes.length,{nodeFieldCount:n,nodeNativeType:i,nodeTypeOffset:s}=this;for(let o=0;o<t;o+=n)this.nodes.getValue(o+s)===i&&(e.nodeIndex=o,e.name().startsWith("Detached ")&&e.setDetachedness(ee.DOMLinkState.DETACHED))}}propagateDOMState(){if(this.nodeDetachednessAndClassIndexOffset===-1)return;let e=new Uint8Array(this.nodeCount),t=[],n=[],i=new Map,s=this.createNode(0),o=function(h,c){let u=h.nodes.getValue(c+h.nodeNameOffset),d=i.get(u);d===void 0&&(d=h.addString("Detached "+h.strings[u]),i.set(u,d)),h.nodes.setValue(c+h.nodeNameOffset,d)},a=function(h,c,u){if(e[c])return;let d=c*h.nodeFieldCount;if(h.nodes.getValue(d+h.nodeTypeOffset)!==h.nodeNativeType){e[c]=1;return}s.nodeIndex=d,s.setDetachedness(u),u===ee.DOMLinkState.ATTACHED?t.push(c):u===ee.DOMLinkState.DETACHED&&(o(h,d),n.push(c)),e[c]=1},l=function(h,c,u){h.iterateFilteredChildren(c,d=>![h.edgeHiddenType,h.edgeInvisibleType,h.edgeWeakType].includes(d),d=>a(h,d,u))};for(let h=0;h<this.nodeCount;++h){s.nodeIndex=h*this.nodeFieldCount;let c=s.detachedness();c!==ee.DOMLinkState.UNKNOWN&&a(this,h,c)}for(;t.length!==0;){let h=t.pop();l(this,h,ee.DOMLinkState.ATTACHED)}for(;n.length!==0;){let h=n.pop();s.nodeIndex=h*this.nodeFieldCount,s.detachedness()!==ee.DOMLinkState.ATTACHED&&l(this,h,ee.DOMLinkState.DETACHED)}}buildSamples(){let e=this.#t;if(!e?.length)return;let t=e.length/2,n=new Array(t),i=new Array(t),s=new Array(t),o=this.#e.sample_fields.indexOf("timestamp_us"),a=this.#e.sample_fields.indexOf("last_assigned_id");for(let d=0;d<t;d++)n[d]=0,i[d]=e[2*d+o]/1e3,s[d]=e[2*d+a];let h=this.nodes.length,c=this.nodeFieldCount,u=this.rootNode();for(let d=0;d<h;d+=c){u.nodeIndex=d;let p=u.id();if(p%2===0)continue;let f=Pe.lowerBound(s,p,Pe.DEFAULT_COMPARATOR);f!==t&&(n[f]+=u.selfSize())}this.#i=new ee.Samples(i,s,n)}buildLocationMap(){let e=new Map,t=this.#n;for(let n=0;n<t.length;n+=this.#T){let i=t[n+this.#c],s=t[n+this.#u],o=t[n+this.#l],a=t[n+this.#O];e.set(i,new ee.Location(s,o,a))}this.#P=e}getLocation(e){return this.#P.get(e)||null}getSamples(){return this.#i}calculateFlags(){throw new Error("Not implemented")}calculateStatistics(){throw new Error("Not implemented")}userObjectsMapAndFlag(){throw new Error("Not implemented")}calculateSnapshotDiff(e,t){let n=this.#a[e];if(n)return n;n={};let i=this.getAggregatesByClassKey(!0,"allObjects");for(let o in t){let a=t[o],l=this.calculateDiffForClass(a,i[o]);l&&(n[o]=l)}let s=new ee.AggregateForDiff;for(let o in i){if(o in t)continue;let a=this.calculateDiffForClass(s,i[o]);a&&(n[o]=a)}return this.#a[e]=n,n}calculateDiffForClass(e,t){let n=e.ids,i=e.indexes,s=e.selfSizes,o=t?t.idxs:[],a=0,l=0,h=n.length,c=o.length,u=new ee.Diff(t?t.name:e.name),d=this.createNode(o[l]);for(;a<h&&l<c;){let p=n[a];p<d.id()?(u.deletedIndexes.push(i[a]),u.deletedIds.push(p),u.deletedSelfSizes.push(s[a]),u.removedCount++,u.removedSize+=s[a],++a):p>d.id()?(u.addedIndexes.push(o[l]),u.addedIds.push(d.id()),u.addedSelfSizes.push(d.selfSize()),u.addedCount++,u.addedSize+=d.selfSize(),d.nodeIndex=o[++l]):(++a,d.nodeIndex=o[++l])}for(;a<h;)u.deletedIndexes.push(i[a]),u.deletedIds.push(n[a]),u.deletedSelfSizes.push(s[a]),u.removedCount++,u.removedSize+=s[a],++a;for(;l<c;)u.addedIndexes.push(o[l]),u.addedIds.push(d.id()),u.addedSelfSizes.push(d.selfSize()),u.addedCount++,u.addedSize+=d.selfSize(),d.nodeIndex=o[++l];return u.countDelta=u.addedCount-u.removedCount,u.sizeDelta=u.addedSize-u.removedSize,!u.addedCount&&!u.removedCount?null:u}nodeForSnapshotObjectId(e){for(let t=this.allNodes();t.hasNext();t.next())if(t.node.id()===e)return t.node;return null}#Q(e){return typeof e=="number"?","+this.strings[e]:e}nodeClassKey(e){let t=this.nodeForSnapshotObjectId(e);return t?this.#Q(t.classKeyInternal()):null}createEdgesProvider(e,t){let n=this.createNode(e),i=this.containmentEdgesFilter(),s=t?.minRetainedSize,o=t?.excludePrimitives??!1,a=i;(s!==void 0||o)&&(a=c=>{if(i&&!i(c))return!1;let u=c.node();if(s!==void 0&&u.retainedSize()<s)return!1;if(o){let d=u.rawType();if(d===this.nodeNumberType)return!1;if(d===this.nodeNativeType){let p=u.rawName();if(p==="undefined"||p==="null"||p==="true"||p==="false")return!1}}return!0});let l=new Wr(this),h=new pr(this,a,n.edges(),l);if(t?.sortBy){let c=t.sortBy,u;c==="selfSize"?u=new ee.ComparatorConfig("selfSize",!1,"!edgeName",!0):c==="name"?u=new ee.ComparatorConfig("!edgeName",!0,"retainedSize",!1):u=new ee.ComparatorConfig("retainedSize",!1,"!edgeName",!0),h.sortAndRewind(u)}return h}createEdgesProviderForTest(e,t){let n=this.createNode(e),i=new Wr(this);return new pr(this,t,n.edges(),i)}retainingEdgesFilter(){return null}containmentEdgesFilter(){return null}createRetainingEdgesProvider(e){let t=this.createNode(e),n=this.retainingEdgesFilter(),i=new ks(this);return new pr(this,n,t.retainers(),i)}getRetainingPaths(e,t=30,n=5e3,i=100){let{nodeFieldCount:s,firstRetainerIndex:o,retainingNodes:a,retainingEdges:l,edgeTypeOffset:h,edgeWeakType:c,containmentEdges:u}=this,d=this.#p??this.nodeDistances,p=0,f=new Set,m=new Map,g=2,O={},b=(x,y)=>{if(p++,p>n)return O.nodes=!0,[];if(y>=t)return O.depth=!0,[];let v=x/s;if(d[v]<=g)return[];if(f.has(x))return[];let C=m.get(x);if(C!==void 0&&y>=C)return[];f.add(x);let k=o[v],Q=o[v+1],R=[];for(let A=k;A<Q;++A){let F=a[A],H=F/s,K=d[H],N=l[A];if(!(this.isEdgeIgnoredInRetainersView(N)||u.getValue(N+h)===c)&&K>=0){let W=t-y;K-g<W?R.push({retainerIndex:A,dist:K,nodeIndex:F}):O.depth=!0}}R.sort((A,F)=>A.dist-F.dist);let Z=Math.min(R.length,i);R.length>i&&(O.siblings=!0);let M=[];for(let A=0;A<Z;A++){let F=R[A],H=this.createRetainingEdge(F.retainerIndex),K=l[F.retainerIndex],N=F.dist===g,I=[];if(N){if(p++,p>n){O.nodes=!0;break}}else if(I=b(F.nodeIndex,y+1),I.length===0)continue;let W=this.createNode(F.nodeIndex);M.push({edgeIndex:K,edgeName:H.name(),edgeType:H.type(),nodeId:W.id(),nodeIndex:F.nodeIndex,nodeName:W.name(),distance:F.dist,children:I})}return f.delete(x),m.set(x,y),M};return{paths:b(e,0),limitsReached:O}}getDominatorsOf(e){let t=[],n=e,i=this.rootNodeIndex;for(;n!==void 0;){let s=this.createNode(n);if(t.push({nodeId:s.id(),nodeIndex:n,nodeName:s.name(),retainedSize:s.retainedSize(),selfSize:s.selfSize()}),n===i)break;let o=s.dominatorIndex();if(o===n)break;n=o}return t}createAddedNodesProvider(e,t){let i=this.#a[e][t];return new Nn(this,i.addedIndexes)}createDeletedNodesProvider(e){return new Nn(this,e)}createNodesProviderForClass(e,t){return new Nn(this,this.aggregatesWithFilter(t)[e].idxs)}queryObjects(e){let{nodes:t,nodeFieldCount:n,retainedSizes:i}=this,s=t.length,o=[];function a(p){return typeof p=="string"?p?new RegExp(p,"i"):void 0:p&&(p.global||p.sticky)?new RegExp(p.source,p.flags.replace(/[gy]/g,"")):p}let l=a(e.className),h=a(e.propertyName),c=e.nodeType?e.nodeType.toLowerCase():null,u=this.rootNode();for(let p=0,f=0;p<s;p+=n,f++){if(u.nodeIndex=p,e.minSelfSize!==void 0&&u.selfSize()<e.minSelfSize||e.maxSelfSize!==void 0&&u.selfSize()>e.maxSelfSize)continue;let m=i[f];if(!(e.minRetainedSize!==void 0&&m<e.minRetainedSize)&&!(e.maxRetainedSize!==void 0&&m>e.maxRetainedSize)&&!(e.isDetached!==void 0&&u.detachedness()===ee.DOMLinkState.DETACHED!==e.isDetached)){if(l){let g=u.name();if(!l.test(g))continue}if(!(c&&u.type().toLowerCase()!==c)){if(h){let g=!1;for(let O=u.edges();O.hasNext();O.next())if(h.test(O.edge.name())){g=!0;break}if(!g)continue}o.push(p)}}}let d=e.sortBy??"retainedSize";return d==="retainedSize"?o.sort((p,f)=>i[f/n]-i[p/n]):d==="selfSize"?o.sort((p,f)=>{u.nodeIndex=f;let m=u.selfSize();u.nodeIndex=p;let g=u.selfSize();return m-g}):d==="id"&&o.sort((p,f)=>{u.nodeIndex=f;let m=u.id();return u.nodeIndex=p,u.id()-m}),new Nn(this,o)}maxJsNodeId(){let e=this.nodeFieldCount,t=this.nodes,n=t.length,i=0;for(let s=this.nodeIdOffset;s<n;s+=e){let o=t.getValue(s);o%2!==0&&i<o&&(i=o)}return i}updateStaticData(){return new ee.StaticData(this.nodeCount,this.rootNodeIndexInternal,this.totalSize,this.maxJsNodeId())}ignoreNodeInRetainersView(e){this.#m.add(e),this.calculateDistances(!0),this.#v()}unignoreNodeInRetainersView(e){this.#m.delete(e),this.#m.size===0?this.#p=void 0:this.calculateDistances(!0),this.#v()}unignoreAllNodesInRetainersView(){this.#m.clear(),this.#p=void 0,this.#v()}#v(){let e=this.#p;if(this.#S.clear(),e===void 0)return;let t=new qi.Multimap,n=this.#s,{nodeCount:i,nodeFieldCount:s}=this,o=this.createNode(0);for(let a=0;a<i;++a)if(e[a]===n){o.nodeIndex=a*s;for(let l=o.edges();l.hasNext();l.next()){let h=l.edge;if(!h.isInternal())continue;let c=this.tryParseWeakMapEdgeName(h.nameIndex());c&&t.set(h.nodeIndex(),c.duplicatedPart)}}for(let a of t.keys()){o.nodeIndex=a;for(let l=o.retainers();l.hasNext();l.next()){let h=l.item();if(!h.isInternal())continue;let c=this.tryParseWeakMapEdgeName(h.nameIndex());if(c&&t.hasValue(a,c.duplicatedPart)){let u=this.retainingEdges[h.itemIndex()];this.#S.add(u)}}}}areNodesIgnoredInRetainersView(){return this.#m.size>0}getDistanceForRetainersView(e){let t=e/this.nodeFieldCount,i=(this.#p??this.nodeDistances)[t];return i===this.#s?Math.max(0,this.nodeDistances[t])+ee.baseUnreachableDistance:i}isNodeIgnoredInRetainersView(e){return this.#m.has(e)}isEdgeIgnoredInRetainersView(e){return this.#S.has(e)}},Gr=class{iterator;#e;#t;iterationOrder;currentComparator;#i;#n;constructor(e,t){this.iterator=e,this.#e=t,this.#t=!e.hasNext(),this.iterationOrder=null,this.currentComparator=null,this.#i=0,this.#n=0}createIterationOrder(){if(!this.iterationOrder){this.iterationOrder=[];for(let e=this.iterator;e.hasNext();e.next())this.iterationOrder.push(e.item().itemIndex())}}isEmpty(){return this.#t}serializeItemsRange(e,t){if(this.createIterationOrder(),e>t)throw new Error("Start position > end position: "+e+" > "+t);if(!this.iterationOrder)throw new Error("Iteration order undefined");if(t>this.iterationOrder.length&&(t=this.iterationOrder.length),this.#i<t&&e<this.iterationOrder.length-this.#n&&this.currentComparator){let o=this.currentComparator;this.sort(o,this.#i,this.iterationOrder.length-1-this.#n,e,t-1),e<=this.#i&&(this.#i=t),t>=this.iterationOrder.length-this.#n&&(this.#n=this.iterationOrder.length-e)}let n=e,i=t-e,s=new Array(i);for(let o=0;o<i;++o){let a=this.iterationOrder[n++],l=this.#e.itemForIndex(a);s[o]=l.serialize()}return new ee.ItemsRange(e,t,this.iterationOrder.length,s)}sortAndRewind(e){this.currentComparator=e,this.#i=0,this.#n=0}},pr=class extends Gr{snapshot;constructor(e,t,n,i){let s=t?new Is(n,t):n;super(s,i),this.snapshot=e}sort(e,t,n,i,s){let o=e.fieldName1,a=e.fieldName2,l=e.ascending1,h=e.ascending2,c=this.iterator.item().clone(),u=c.clone(),d=this.snapshot.createNode(),p=this.snapshot.createNode();function f(y,v,T,C){c.edgeIndex=T,u.edgeIndex=C;let k=0;if(y==="!edgeName"){if(u.name()==="__proto__")return-1;if(c.name()==="__proto__")return 1;k=c.hasStringName()===u.hasStringName()?c.name()<u.name()?-1:c.name()>u.name()?1:0:c.hasStringName()?-1:1}else k=c.getValueForSorting(y)-u.getValueForSorting(y);return v?k:-k}function m(y,v,T,C){c.edgeIndex=T,d.nodeIndex=c.nodeIndex();let k=d[y]();u.edgeIndex=C,p.nodeIndex=u.nodeIndex();let Q=p[y](),R=k<Q?-1:k>Q?1:0;return v?R:-R}function g(y,v){let T=f(o,l,y,v);return T===0&&(T=f(a,h,y,v)),T===0?y-v:T}function O(y,v){let T=f(o,l,y,v);return T===0&&(T=m(a,h,y,v)),T===0?y-v:T}function b(y,v){let T=m(o,l,y,v);return T===0&&(T=f(a,h,y,v)),T===0?y-v:T}function S(y,v){let T=m(o,l,y,v);return T===0&&(T=m(a,h,y,v)),T===0?y-v:T}if(!this.iterationOrder)throw new Error("Iteration order not defined");function x(y){return y.startsWith("!edge")}x(o)?x(a)?Pe.sortRange(this.iterationOrder,g,t,n,i,s):Pe.sortRange(this.iterationOrder,O,t,n,i,s):x(a)?Pe.sortRange(this.iterationOrder,b,t,n,i,s):Pe.sortRange(this.iterationOrder,S,t,n,i,s)}},Nn=class extends Gr{snapshot;constructor(e,t){let n=new Ps(e),i=new $s(n,t);super(i,n),this.snapshot=e}nodePosition(e){this.createIterationOrder();let t=this.snapshot.createNode(),n=0;if(!this.iterationOrder)throw new Error("Iteration order not defined");for(;n<this.iterationOrder.length&&(t.nodeIndex=this.iterationOrder[n],t.id()!==e);n++);if(n===this.iterationOrder.length)return-1;let i=this.iterationOrder[n],s=0,o=this.currentComparator,a=this.buildCompareFunction(o);for(let l=0;l<this.iterationOrder.length;l++)a(this.iterationOrder[l],i)<0&&++s;return s}buildCompareFunction(e){let t=this.snapshot.createNode(),n=this.snapshot.createNode(),i=t[e.fieldName1],s=t[e.fieldName2],o=e.ascending1?1:-1,a=e.ascending2?1:-1;function l(c,u){let d=c.call(t),p=c.call(n);return d<p?-u:d>p?u:0}function h(c,u){t.nodeIndex=c,n.nodeIndex=u;let d=l(i,o);return d===0&&(d=l(s,a)),d||c-u}return h}sort(e,t,n,i,s){if(!this.iterationOrder)throw new Error("Iteration order not defined");Pe.sortRange(this.iterationOrder,this.buildCompareFunction(e),t,n,i,s)}},gr=class extends Ln{nodeFlags;flags;#e;constructor(e,t){super(e,t),this.nodeFlags={canBeQueried:1,detachedDOMTreeNode:2,pageObject:4}}createNode(e){return new Yr(this,e===void 0?-1:e)}createEdge(e){return new Ns(this,e)}createRetainingEdge(e){return new Ls(this,e)}containmentEdgesFilter(){return e=>!e.isInvisible()}retainingEdgesFilter(){let e=this.containmentEdgesFilter();function t(n){return e(n)&&!n.node().isRoot()&&!n.isWeak()}return t}calculateFlags(){this.flags=new Uint8Array(this.nodeCount),this.markDetachedDOMTreeNodes(),this.markQueriableHeapObjects(),this.markPageOwnedNodes()}#t(){for(let e=this.rootNode().edges();e.hasNext();e.next())if(this.isUserRoot(e.edge.node()))return!0;return!1}calculateShallowSizes(){if(!this.#t())return;let{nodeCount:e,nodes:t,nodeFieldCount:n,nodeSelfSizeOffset:i}=this,s=4294967295,o=4294967294;if(e>=o)throw new Error("Too many nodes for calculateShallowSizes");let a=new Uint32Array(e),l=[],h=this.createNode(0);for(let c=0;c<e;++c)h.isHidden()||h.isArray()||h.isNative()&&h.rawName()==="system / ExternalStringData"?a[c]=s:(a[c]=c,l.push(c)),h.nodeIndex=h.nextNodeIndex();for(;l.length!==0;){let c=l.pop(),u=a[c];h.nodeIndex=c*n;for(let d=h.edges();d.hasNext();d.next()){let p=d.edge;if(p.isWeak())continue;let f=p.nodeIndex()/n;switch(a[f]){case s:a[f]=u,l.push(f);break;case f:case u:case o:break;default:a[f]=o,l.push(f);break}}}for(let c=0;c<e;++c){let u=a[c];switch(u){case s:case o:case c:break;default:{let d=c*n,p=u*n;if(h.nodeIndex=p,h.isSynthetic()||h.isRoot())break;let f=t.getValue(d+i);t.setValue(d+i,0),t.setValue(p+i,t.getValue(p+i)+f);break}}}}calculateDistances(e){let t=new Set,n=this;function i(s,o){if(s.isHidden()&&o.name()==="sloppy_function_map"&&s.rawName()==="system / NativeContext")return!1;if(s.isArray()&&s.rawName()==="(map descriptors)"){let a=parseInt(o.name(),10);return a<2||a%3!==1}if(o.isInternal()){let a=n.tryParseWeakMapEdgeName(o.nameIndex());if(a&&!t.delete(a.duplicatedPart))return t.add(a.duplicatedPart),!1}return!0}super.calculateDistances(e,i)}isUserRoot(e){return e.isUserRoot()||e.isDocumentDOMTreesRoot()}isContextObject(e){let t=e.rawName();return t==="system / Context"||t.startsWith("system / Context / ")}userObjectsMapAndFlag(){return{map:this.flags,flag:this.nodeFlags.pageObject}}flagsOfNode(e){return this.flags[e.nodeIndex/this.nodeFieldCount]}markDetachedDOMTreeNodes(){let e=this.nodes,t=e.length,n=this.nodeFieldCount,i=this.nodeNativeType,s=this.nodeTypeOffset,o=this.nodeFlags.detachedDOMTreeNode,a=this.rootNode();for(let l=0,h=0;l<t;l+=n,h++)e.getValue(l+s)===i&&(a.nodeIndex=l,a.detachedness()===ee.DOMLinkState.DETACHED&&(this.flags[h]|=o))}markQueriableHeapObjects(){let e=this.nodeFlags.canBeQueried,t=this.edgeHiddenType,n=this.edgeInternalType,i=this.edgeInvisibleType,s=this.edgeWeakType,o=this.edgeToNodeOffset,a=this.edgeTypeOffset,l=this.edgeFieldsCount,h=this.containmentEdges,c=this.nodeFieldCount,u=this.firstEdgeIndexes,d=this.flags,p=[];for(let f=this.rootNode().edges();f.hasNext();f.next())f.edge.node().isUserRoot()&&p.push(f.edge.node().nodeIndex/c);for(;p.length;){let f=p.pop();if(d[f]&e)continue;d[f]|=e;let m=u[f],g=u[f+1];for(let O=m;O<g;O+=l){let S=h.getValue(O+o)/c;if(d[S]&e)continue;let x=h.getValue(O+a);x===t||x===i||x===n||x===s||p.push(S)}}}markPageOwnedNodes(){let e=this.edgeShortcutType,t=this.edgeElementType,n=this.edgeToNodeOffset,i=this.edgeTypeOffset,s=this.edgeFieldsCount,o=this.edgeWeakType,a=this.firstEdgeIndexes,l=this.containmentEdges,h=this.nodeFieldCount,c=this.nodeCount,u=this.flags,d=this.nodeFlags.pageObject,p=new Uint32Array(c),f=0,m=this.rootNodeIndexInternal/h,g=this.rootNode();for(let O=a[m],b=a[m+1];O<b;O+=s){let S=l.getValue(O+i),x=l.getValue(O+n);if(S===t){if(g.nodeIndex=x,!g.isDocumentDOMTreesRoot())continue}else if(S!==e)continue;let y=x/h;p[f++]=y,u[y]|=d}for(;f;){let O=p[--f],b=a[O],S=a[O+1];for(let x=b;x<S;x+=s){let v=l.getValue(x+n)/h;u[v]&d||l.getValue(x+i)===o||(p[f++]=v,u[v]|=d)}}}calculateStatistics(){let e=this.nodeFieldCount,t=this.nodes,n=t.length,i=this.nodeTypeOffset,s=this.nodeSelfSizeOffset,o=this.nodeNativeType,a=this.nodeCodeType,l=this.nodeConsStringType,h=this.nodeSlicedStringType,c=this.nodeHiddenType,u=this.nodeStringType,d=this.profile.snapshot.extra_native_bytes??0,p=0,f=0,m=0,g=0,O=0,b=this.rootNode();for(let S=0;S<n;S+=e){let x=t.getValue(S+s),y=t.getValue(S+i);if(y===c){O+=x;continue}b.nodeIndex=S,y===o?(d+=x,b.rawName()==="system / JSArrayBufferData"&&(p+=x)):y===a?f+=x:y===l||y===h||y===u?m+=x:b.rawName()==="Array"&&(g+=this.calculateArraySize(b))}this.#e={total:this.totalSize,native:{total:d,typedArrays:p},v8heap:{total:this.totalSize-d,code:f,jsArrays:g,strings:m,system:O}}}calculateArraySize(e){let t=e.selfSize(),n=e.edgeIndexesStart(),i=e.edgeIndexesEnd(),s=this.containmentEdges,o=this.strings,a=this.edgeToNodeOffset,l=this.edgeTypeOffset,h=this.edgeNameOffset,c=this.edgeFieldsCount,u=this.edgeInternalType;for(let d=n;d<i;d+=c){if(s.getValue(d+l)!==u||o[s.getValue(d+h)]!=="elements")continue;let m=s.getValue(d+a);e.nodeIndex=m,e.retainersCount()===1&&(t+=e.selfSize());break}return t}getStatistics(){return this.#e}};async function Vx(r){let e=new gr(r,new fr),t=new MessageChannel;return new mr(t.port2),await e.initialize(t.port1),e}var Yr=class r extends As{canBeQueried(){let e=this.snapshot;return!!(e.flagsOfNode(this)&e.nodeFlags.canBeQueried)}name(){let e=this.snapshot;return this.rawType()===e.nodeConsStringType?this.consStringName():this.rawType()===e.nodeObjectType&&this.rawName()==="Object"?this.#e():this.rawName()}consStringName(){let e=this.snapshot,t=e.nodeConsStringType,n=e.edgeInternalType,i=e.edgeFieldsCount,s=e.edgeToNodeOffset,o=e.edgeTypeOffset,a=e.edgeNameOffset,l=e.strings,h=e.containmentEdges,c=e.firstEdgeIndexes,u=e.nodeFieldCount,d=e.nodeTypeOffset,p=e.nodeNameOffset,f=e.nodes,m=[];m.push(this.nodeIndex);let g="";for(;m.length&&g.length<1024;){let O=m.pop();if(f.getValue(O+d)!==t){g+=l[f.getValue(O+p)];continue}let b=O/u,S=c[b],x=c[b+1],y=0,v=0;for(let T=S;T<x&&(!y||!v);T+=i)if(h.getValue(T+o)===n){let k=l[h.getValue(T+a)];k==="first"?y=h.getValue(T+s):k==="second"&&(v=h.getValue(T+s))}m.push(v),m.push(y)}return g}#e(){let e=this.snapshot,{edgeFieldsCount:t,edgePropertyType:n}=e,i=e.createEdge(0),s="{",o="}",a=this.edgeIndexesStart(),l=this.edgeIndexesEnd()-t,h=!1;for(;a<=l;){if(i.edgeIndex=h?l:a,i.rawType()!==n||i.name()==="__proto__"){h?l-=t:a+=t;continue}let c=r.formatPropertyName(i.name());if(s.length>1&&s.length+o.length+c.length>100)break;h?(l-=t,o.length>1&&(o=", "+o),o=c+o):(a+=t,s.length>1&&(s+=", "),s+=c),h=!h}return a<=l&&(s+=", \u2026"),o.length>1&&(s+=", "),s+o}static formatPropertyName(e){return/[,'"{}]/.test(e)&&(e=JSON.stringify({[e]:0}),e=e.substring(1,e.length-3)),e}id(){let e=this.snapshot;return e.nodes.getValue(this.nodeIndex+e.nodeIdOffset)}isHidden(){return this.rawType()===this.snapshot.nodeHiddenType}isArray(){return this.rawType()===this.snapshot.nodeArrayType}isSynthetic(){return this.rawType()===this.snapshot.nodeSyntheticType}isNative(){return this.rawType()===this.snapshot.nodeNativeType}isUserRoot(){return!this.isSynthetic()}isDocumentDOMTreesRoot(){return this.isSynthetic()&&this.rawName()==="(Document DOM trees)"}serialize(){let e=super.serialize(),t=this.snapshot,n=t.flagsOfNode(this);return n&t.nodeFlags.canBeQueried&&(e.canBeQueried=!0),n&t.nodeFlags.detachedDOMTreeNode&&(e.detachedDOMTreeNode=!0),e}},Ns=class r extends Ts{clone(){let e=this.snapshot;return new r(e,this.edgeIndex)}hasStringName(){return this.isShortcut()?isNaN(parseInt(this.#t(),10)):this.#e()}isElement(){return this.rawType()===this.snapshot.edgeElementType}isHidden(){return this.rawType()===this.snapshot.edgeHiddenType}isWeak(){return this.rawType()===this.snapshot.edgeWeakType}isInternal(){return this.rawType()===this.snapshot.edgeInternalType}isInvisible(){return this.rawType()===this.snapshot.edgeInvisibleType}isShortcut(){return this.rawType()===this.snapshot.edgeShortcutType}name(){let e=this.#t();if(!this.isShortcut())return String(e);let t=parseInt(e,10);return String(isNaN(t)?e:t)}toString(){let e=this.name();switch(this.type()){case"context":return"->"+e;case"element":return"["+e+"]";case"weak":return"[["+e+"]]";case"property":return e.indexOf(" ")===-1?"."+e:'["'+e+'"]';case"shortcut":return typeof e=="string"?e.indexOf(" ")===-1?"."+e:'["'+e+'"]':"["+e+"]";case"internal":case"hidden":case"invisible":return"{"+e+"}"}return"?"+e+"?"}#e(){let e=this.rawType(),t=this.snapshot;return e!==t.edgeElementType&&e!==t.edgeHiddenType}#t(){return this.#e()?this.snapshot.strings[this.nameOrIndex()]:this.nameOrIndex()}nameOrIndex(){return this.edges.getValue(this.edgeIndex+this.snapshot.edgeNameOffset)}rawType(){return this.edges.getValue(this.edgeIndex+this.snapshot.edgeTypeOffset)}nameIndex(){if(!this.#e())throw new Error("Edge does not have string name");return this.nameOrIndex()}},Ls=class r extends Qs{clone(){let e=this.snapshot;return new r(e,this.retainerIndex())}isHidden(){return this.edge().isHidden()}isInvisible(){return this.edge().isInvisible()}isShortcut(){return this.edge().isShortcut()}isWeak(){return this.edge().isWeak()}};var ua={};pe(ua,{HeapSnapshotLoader:()=>Vi});eb();var Fi=class{constructor(e,t,n,i){this.lineNumber=e;this.lineContent=t;this.columnNumber=n;this.matchLength=i}lineNumber;lineContent;columnNumber;matchLength;static comparator(e,t){return e.lineNumber-t.lineNumber||e.columnNumber-t.columnNumber}},du=function(r,e,t,n,i=!0){return r==null||i&&r.length>1048576?null:(r=t?r:encodeURIComponent(r),"data:"+e+(n?";charset="+n:"")+(t?";base64":"")+","+r)};var ea=class{#e;#t=0;#i=0;#n=0;constructor(e){this.#e=e}advance(e){for(this.#t=e;this.#i<this.#e.length&&this.#e[this.#i]<this.#t;)++this.#i;this.#n=this.#i?this.#t-this.#e[this.#i-1]-1:this.#t}offset(){return this.#t}resetTo(e){this.#t=e,this.#i=Pe.lowerBound(this.#e,e,Pe.DEFAULT_COMPARATOR),this.#n=this.#i?this.#t-this.#e[this.#i-1]-1:this.#t}lineNumber(){return this.#i}columnNumber(){return this.#n}};var tb=2**31-1,ta=class r{constructor(e,t,n,i){this.startLine=e;this.startColumn=t;this.endLine=n;this.endColumn=i}startLine;startColumn;endLine;endColumn;static createFromLocation(e,t){return new r(e,t,e,t)}static createUnboundedFromLocation(e,t){return new r(e,t,tb,tb)}static fromObject(e){return new r(e.startLine,e.startColumn,e.endLine,e.endColumn)}static comparator(e,t){return e.compareTo(t)}static fromEdit(e,t){let n=e.startLine,i=e.startColumn+t.length,s=B.findLineEndingIndexes(t);if(s.length>1){n=e.startLine+s.length-1;let o=s.length;i=s[o-1]-s[o-2]-1}return new r(e.startLine,e.startColumn,n,i)}isEmpty(){return this.startLine===this.endLine&&this.startColumn===this.endColumn}immediatelyPrecedes(e){return e?this.endLine===e.startLine&&this.endColumn===e.startColumn:!1}immediatelyFollows(e){return e?e.immediatelyPrecedes(this):!1}follows(e){return e.endLine===this.startLine&&e.endColumn<=this.startColumn||e.endLine<this.startLine}get linesCount(){return this.endLine-this.startLine}collapseToEnd(){return new r(this.endLine,this.endColumn,this.endLine,this.endColumn)}collapseToStart(){return new r(this.startLine,this.startColumn,this.startLine,this.startColumn)}normalize(){return this.startLine>this.endLine||this.startLine===this.endLine&&this.startColumn>this.endColumn?new r(this.endLine,this.endColumn,this.startLine,this.startColumn):this.clone()}clone(){return new r(this.startLine,this.startColumn,this.endLine,this.endColumn)}serializeToObject(){return{startLine:this.startLine,startColumn:this.startColumn,endLine:this.endLine,endColumn:this.endColumn}}compareTo(e){return this.startLine>e.startLine?1:this.startLine<e.startLine?-1:this.startColumn>e.startColumn?1:this.startColumn<e.startColumn?-1:0}compareToPosition(e,t){return e<this.startLine||e===this.startLine&&t<this.startColumn?-1:e>this.endLine||e===this.endLine&&t>this.endColumn?1:0}equal(e){return this.startLine===e.startLine&&this.endLine===e.endLine&&this.startColumn===e.startColumn&&this.endColumn===e.endColumn}relativeTo(e,t){let n=this.clone();return this.startLine===e&&(n.startColumn-=t),this.endLine===e&&(n.endColumn-=t),n.startLine-=e,n.endLine-=e,n}relativeFrom(e,t){let n=this.clone();return this.startLine===0&&(n.startColumn+=t),this.endLine===0&&(n.endColumn+=t),n.startLine+=e,n.endLine+=e,n}rebaseAfterTextEdit(e,t){console.assert(e.startLine===t.startLine),console.assert(e.startColumn===t.startColumn);let n=this.clone();if(!this.follows(e))return n;let i=t.endLine-e.endLine,s=t.endColumn-e.endColumn;return n.startLine+=i,n.endLine+=i,n.startLine===t.endLine&&(n.startColumn+=s),n.endLine===t.endLine&&(n.endColumn+=s),n}toString(){return JSON.stringify(this)}containsLocation(e,t){return this.startLine===this.endLine?this.startLine===e&&this.startColumn<=t&&t<this.endColumn:this.startLine===e?this.startColumn<=t:this.endLine===e?t<this.endColumn:this.startLine<e&&e<this.endLine}get start(){return{lineNumber:this.startLine,columnNumber:this.startColumn}}get end(){return{lineNumber:this.endLine,columnNumber:this.endColumn}}intersection(e){let{startLine:t,startColumn:n}=this;t<e.startLine?(t=e.startLine,n=e.startColumn):t===e.startLine&&(n=Math.max(n,e.startColumn));let{endLine:i,endColumn:s}=this;return i>e.endLine?(i=e.endLine,s=e.endColumn):i===e.endLine&&(s=Math.min(s,e.endColumn)),t>i||t===i&&n>=s?new r(0,0,0,0):new r(t,n,i,s)}},na=class{constructor(e,t){this.offset=e;this.length=t}offset;length;cssValue(){return`${this.offset},${this.length}`}};var ra=class{#e;#t;constructor(e){this.#e=e}lineEndings(){return this.#t||(this.#t=B.findLineEndingIndexes(this.#e)),this.#t}value(){return this.#e}lineCount(){return this.lineEndings().length}offsetFromPosition(e,t){return(e?this.lineEndings()[e-1]+1:0)+t}positionFromOffset(e){let t=this.lineEndings(),n=Pe.lowerBound(t,e,Pe.DEFAULT_COMPARATOR);return{lineNumber:n,columnNumber:e-(n&&t[n-1]+1)}}lineAt(e){let t=this.lineEndings(),n=e>0?t[e-1]+1:0,i=t[e],s=this.#e.substring(n,i);return s.length>0&&s.charAt(s.length-1)==="\r"&&(s=s.substring(0,s.length-1)),s}toSourceRange(e){let t=this.offsetFromPosition(e.startLine,e.startColumn),n=this.offsetFromPosition(e.endLine,e.endColumn);return new na(t,n-t)}toTextRange(e){let t=new ea(this.lineEndings()),n=ta.createFromLocation(0,0);return t.resetTo(e.offset),n.startLine=t.lineNumber(),n.startColumn=t.columnNumber(),t.advance(e.offset+e.length),n.endLine=t.lineNumber(),n.endColumn=t.columnNumber(),n}replaceRange(e,t){let n=this.toSourceRange(e);return this.#e.substring(0,n.offset)+t+this.#e.substring(n.offset+n.length)}extract(e){let t=this.toSourceRange(e);return this.#e.substr(t.offset,t.length)}};var dT=new FinalizationRegistry(r=>{URL.revokeObjectURL(r)}),nb=10*1024*1024;function pT(r){if(!r)return"utf-8";try{return new TextDecoder(r),r}catch{return"utf-8"}}var pn=class r{mimeType;charset;#e;#t;#i;#n;constructor(e,t,n,i){this.charset=pT(i),t?this.#e=e:this.#t=e,this.mimeType=n,this.mimeType||(this.mimeType=t?"application/octet-stream":"text/plain")}static async fromCompressedBase64(e,t,n,i){let s=i?.toLowerCase();if(!s)return new r(e,!0,t,n);let o=e;try{let a=An.decode(e),l=null;s.includes("gzip")&&lr.isGzip(a.buffer)?l=await lr.decompressToBuffer(a.buffer):s.includes("deflate")&&(l=await lr.decompressDeflateToBuffer(a.buffer)),l&&(o=await An.encode(l))}catch(a){console.warn("Failed to decompress base64 content data:",a)}return new r(o,!0,t,n)}get base64(){if(this.#e===void 0)throw new Error("Encoding text content as base64 is not supported");return this.#e}get text(){if(this.#t!==void 0)return this.#t;if(!this.isTextContent)throw new Error("Cannot interpret binary data as text");let e=An.decode(this.#e);return this.#t=new TextDecoder(this.charset).decode(e),this.#t}get isTextContent(){return this.#r||tr.isTextType(this.mimeType)}get isEmpty(){return!this.#e&&!this.#t}get createdFromBase64(){return this.#e!==void 0}get#r(){return this.#e===void 0}get textObj(){return this.#i===void 0&&(this.#i=new ra(this.text)),this.#i}contentEqualTo(e){return this.#e!==void 0&&e.#e!==void 0?this.#e===e.#e:this.#t!==void 0&&e.#t!==void 0?this.#t===e.#t:this.isTextContent&&e.isTextContent?this.text===e.text:!1}asDataUrl(){if(this.#e!==void 0){let e=this.isTextContent?this.charset:null;return du(this.#e,this.mimeType??"",!0,e)}return du(this.text,this.mimeType??"",!1,"utf-8")}asBlob(){if(this.#e!==void 0){if(this.#e.length*.75>nb)return null;let t=An.decode(this.#e);return new Blob([t],{type:this.mimeType})}let e=this.#t??"";return e.length>nb?null:new Blob([e],{type:this.mimeType})}asImagePreviewUrl(){if(this.#n)return this.#n;let e=this.asDataUrl();if(e!==null)return this.#n=e,this.#n;let t=this.asBlob();return t===null?null:(this.#n=URL.createObjectURL(t),dT.register(this,this.#n),this.#n)}asDeferedContent(){if(this.isTextContent)return{content:this.text,isEncoded:!1};if(this.#t!==void 0)return{content:this.#t,isEncoded:!1};if(this.#e!==void 0)return{content:this.#e,isEncoded:!0};throw new Error("Unreachable")}static isError(e){return"error"in e}static textOr(e,t){return r.isError(e)?t:e.text}static contentDataOrEmpty(e){return r.isError(e)?fT:e}static asDeferredContent(e){return r.isError(e)?{error:e.error,content:null,isEncoded:!1}:e.asDeferedContent()}},fT=new pn("",!1,"text/plain");function gu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jn=gu();function cb(r){Jn=r}var qn={exec:()=>null};function _r(r){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),i=e[n];return i||(i=r(n),e[n]=i),i}}function re(r,e=""){let t=typeof r=="string"?r:r.source,n={replace:(i,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(Ze.caret,"$1"),t=t.replace(i,o),n},getRegex:()=>new RegExp(t,e)};return n}var gT=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),Ze={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_r(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_r(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:_r(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:_r(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:_r(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:_r(r=>new RegExp(`^ {0,${r}}>`))},OT=/^(?:[ \t]*(?:\n|$))+/,bT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ST=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ji=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ou=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ub=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,db=re(ub).replace(/bull/g,Ou).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),xT=re(ub).replace(/bull/g,Ou).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),bu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,wT=/^[^\n]+/,Su=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vT=re(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Su).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),TT=re(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ou).getRegex(),la="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,PT=re("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yu).replace("tag",la).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pb=re(bu).replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",la).getRegex(),kT=re(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pb).getRegex(),xu={blockquote:kT,code:bT,def:vT,fences:ST,heading:yT,hr:ji,html:PT,lheading:db,list:TT,newline:OT,paragraph:pb,table:qn,text:wT},rb=re("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",la).getRegex(),CT={...xu,lheading:xT,table:rb,paragraph:re(bu).replace("hr",ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",rb).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",la).getRegex()},QT={...xu,html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:re(bu).replace("hr",ji).replace("heading",` *#{1,6} *[^
29
+ ]`).replace("lheading",db).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},RT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,AT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fb=/^( {2,}|\\)\n(?!\s*$)/,ET=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xr=/[\p{P}\p{S}]/u,ha=/[\s\p{P}\p{S}]/u,wu=/[^\s\p{P}\p{S}]/u,$T=re(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ha).getRegex(),mb=/(?!~)[\p{P}\p{S}]/u,IT=/(?!~)[\s\p{P}\p{S}]/u,NT=/(?:[^\s\p{P}\p{S}]|~)/u,LT=re(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),gb=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,MT=re(gb,"u").replace(/punct/g,Xr).getRegex(),DT=re(gb,"u").replace(/punct/g,mb).getRegex(),Ob="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zT=re(Ob,"gu").replace(/notPunctSpace/g,wu).replace(/punctSpace/g,ha).replace(/punct/g,Xr).getRegex(),_T=re(Ob,"gu").replace(/notPunctSpace/g,NT).replace(/punctSpace/g,IT).replace(/punct/g,mb).getRegex(),XT=re("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,wu).replace(/punctSpace/g,ha).replace(/punct/g,Xr).getRegex(),FT=re(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Xr).getRegex(),ZT="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",BT=re(ZT,"gu").replace(/notPunctSpace/g,wu).replace(/punctSpace/g,ha).replace(/punct/g,Xr).getRegex(),jT=re(/\\(punct)/,"gu").replace(/punct/g,Xr).getRegex(),VT=re(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),HT=re(yu).replace("(?:-->|$)","-->").getRegex(),UT=re("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",HT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sa=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,WT=re(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",sa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bb=re(/^!?\[(label)\]\[(ref)\]/).replace("label",sa).replace("ref",Su).getRegex(),Sb=re(/^!?\[(ref)\](?:\[\])?/).replace("ref",Su).getRegex(),GT=re("reflink|nolink(?!\\()","g").replace("reflink",bb).replace("nolink",Sb).getRegex(),ib=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vu={_backpedal:qn,anyPunctuation:jT,autolink:VT,blockSkip:LT,br:fb,code:AT,del:qn,delLDelim:qn,delRDelim:qn,emStrongLDelim:MT,emStrongRDelimAst:zT,emStrongRDelimUnd:XT,escape:RT,link:WT,nolink:Sb,punctuation:$T,reflink:bb,reflinkSearch:GT,tag:UT,text:ET,url:qn},YT={...vu,link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",sa).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sa).getRegex()},pu={...vu,emStrongRDelimAst:_T,emStrongLDelim:DT,delLDelim:FT,delRDelim:BT,url:re(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ib).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:re(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ib).getRegex()},qT={...pu,br:re(fb).replace("{2,}","*").getRegex(),text:re(pu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ia={normal:xu,gfm:CT,pedantic:QT},Zi={normal:vu,gfm:pu,breaks:qT,pedantic:YT},KT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},sb=r=>KT[r];function Wt(r,e){if(e){if(Ze.escapeTest.test(r))return r.replace(Ze.escapeReplace,sb)}else if(Ze.escapeTestNoEncode.test(r))return r.replace(Ze.escapeReplaceNoEncode,sb);return r}function ob(r){try{r=encodeURI(r).replace(Ze.percentDecode,"%")}catch{return null}return r}function ab(r,e){let t=r.replace(Ze.findPipe,(s,o,a)=>{let l=!1,h=o;for(;--h>=0&&a[h]==="\\";)l=!l;return l?"|":" |"}),n=t.split(Ze.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Ze.slashPipe,"|");return n}function Qn(r,e,t){let n=r.length;if(n===0)return"";let i=0;for(;i<n;){let s=r.charAt(n-i-1);if(s===e&&!t)i++;else if(s!==e&&t)i++;else break}return r.slice(0,n-i)}function lb(r){let e=r.split(`
30
+ `),t=e.length-1;for(;t>=0&&Ze.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
31
+ `)}function JT(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])t++;else if(r[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function eP(r,e=0){let t=e,n="";for(let i of r)if(i===" "){let s=4-t%4;n+=" ".repeat(s),t+=s}else n+=i,t++;return n}function hb(r,e,t,n,i){let s=e.href,o=e.title||null,a=r[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,l}function tP(r,e,t){let n=r.match(t.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
32
+ `).map(s=>{let o=s.match(t.other.beginningSpace);if(o===null)return s;let[a]=o;return a.length>=i.length?s.slice(i.length):s}).join(`
33
+ `)}var oa=class{options;rules;lexer;constructor(r){this.options=r||Jn}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:lb(e[0]),n=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:n}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],n=tP(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=Qn(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:Qn(e[0],`
34
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:Qn(e[0],`
35
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=Qn(e[0],`
36
+ `).split(`
37
+ `),n="",i="",s=[];for(;t.length>0;){let o=!1,a=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))a.push(t[l]),o=!0;else if(!o)a.push(t[l]);else break;t=t.slice(l);let h=a.join(`
38
+ `),c=h.replace(this.rules.other.blockquoteSetextReplace,`
39
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
40
+ ${h}`:h,i=i?`${i}
41
+ ${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=u,t.length===0)break;let d=s.at(-1);if(d?.type==="code")break;if(d?.type==="blockquote"){let p=d,f=p.raw+`
42
+ `+t.join(`
43
+ `),m=this.blockquote(f);s[s.length-1]=m,n=n.substring(0,n.length-p.raw.length)+m.raw,i=i.substring(0,i.length-p.text.length)+m.text;break}else if(d?.type==="list"){let p=d,f=p.raw+`
44
+ `+t.join(`
45
+ `),m=this.list(f);s[s.length-1]=m,n=n.substring(0,n.length-d.raw.length)+m.raw,i=i.substring(0,i.length-p.raw.length)+m.raw,t=f.substring(s.at(-1).raw.length).split(`
46
+ `);continue}}return{type:"blockquote",raw:n,tokens:s,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),n=t.length>1,i={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");let s=this.rules.other.listItemRegex(t),o=!1;for(;r;){let l=!1,h="",c="";if(!(e=s.exec(r))||this.rules.block.hr.test(r))break;h=e[0],r=r.substring(h.length);let u=eP(e[2].split(`
47
+ `,1)[0],e[1].length),d=r.split(`
48
+ `,1)[0],p=!u.trim(),f=0;if(this.options.pedantic?(f=2,c=u.trimStart()):p?f=e[1].length+1:(f=u.search(this.rules.other.nonSpaceChar),f=f>4?1:f,c=u.slice(f),f+=e[1].length),p&&this.rules.other.blankLine.test(d)&&(h+=d+`
49
+ `,r=r.substring(d.length+1),l=!0),!l){let m=this.rules.other.nextBulletRegex(f),g=this.rules.other.hrRegex(f),O=this.rules.other.fencesBeginRegex(f),b=this.rules.other.headingBeginRegex(f),S=this.rules.other.htmlBeginRegex(f),x=this.rules.other.blockquoteBeginRegex(f);for(;r;){let y=r.split(`
50
+ `,1)[0],v;if(d=y,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),v=d):v=d.replace(this.rules.other.tabCharGlobal," "),O.test(d)||b.test(d)||S.test(d)||x.test(d)||m.test(d)||g.test(d))break;if(v.search(this.rules.other.nonSpaceChar)>=f||!d.trim())c+=`
51
+ `+v.slice(f);else{if(p||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||O.test(u)||b.test(u)||g.test(u))break;c+=`
52
+ `+d}p=!d.trim(),h+=y+`
53
+ `,r=r.substring(y.length+1),u=v.slice(f)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0)),i.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),i.raw+=h}let a=i.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items){this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]);let h=l.tokens[0];if(l.task&&(h?.type==="text"||h?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let u={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=u.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=u.raw+l.tokens[0].raw,l.tokens[0].text=u.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(u)):l.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):l.tokens.unshift(u)}}else l.task&&(l.task=!1);if(!i.loose){let c=l.tokens.filter(d=>d.type==="space"),u=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=u}}if(i.loose)for(let l of i.items){l.loose=!0;for(let h of l.tokens)h.type==="text"&&(h.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=lb(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:Qn(e[0],`
54
+ `),href:n,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=ab(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
55
+ `):[],s={type:"table",raw:Qn(e[0],`
56
+ `),header:[],align:[],rows:[]};if(t.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<t.length;o++)s.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:s.align[o]});for(let o of i)s.rows.push(ab(o,s.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[l]})));return s}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:Qn(e[0],`
57
+ `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
58
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let s=Qn(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{let s=JT(e[2],"()");if(s===-2)return;if(s>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],i=s[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),hb(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return hb(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...n[0]].length-1,s,o,a=i,l=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+i);(n=h.exec(e))!==null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){a+=o;continue}else if((n[5]||n[6])&&i%3&&!((i+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let c=[...n[0]][0].length,u=r.slice(0,i+n.index+c+o);if(Math.min(i,o)%2){let p=u.slice(1,-1);return{type:"em",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}let d=u.slice(2,-2);return{type:"strong",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let n=this.rules.inline.delLDelim.exec(r);if(n&&(!n[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...n[0]].length-1,s,o,a=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(n=l.exec(e))!==null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(o=[...s].length,o!==i))continue;if(n[3]||n[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let h=[...n[0]][0].length,c=r.slice(0,i+n.index+h+o),u=c.slice(i,-i);return{type:"del",raw:c,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,n;if(e[2]==="@")t=e[0],n="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$t=class fu{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Jn,this.options.tokenizer=this.options.tokenizer||new oa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Ze,block:ia.normal,inline:Zi.normal};this.options.pedantic?(t.block=ia.pedantic,t.inline=Zi.pedantic):this.options.gfm&&(t.block=ia.gfm,this.options.breaks?t.inline=Zi.breaks:t.inline=Zi.gfm),this.tokenizer.rules=t}static get rules(){return{block:ia,inline:Zi}}static lex(e,t){return new fu(t).lex(e)}static lexInline(e,t){return new fu(t).inlineTokens(e)}lex(e){e=e.replace(Ze.carriageReturn,`
59
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Ze.tabCharGlobal," ").replace(Ze.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let a=t.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
60
+ `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
61
+ `)?"":`
62
+ `)+s.raw,a.text+=`
63
+ `+s.text,this.inlineQueue.at(-1).src=a.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
64
+ `)?"":`
65
+ `)+s.raw,a.text+=`
66
+ `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let o=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),h;this.options.extensions.startBlock.forEach(c=>{h=c.call({lexer:this},l),typeof h=="number"&&h>=0&&(a=Math.min(a,h))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=t.at(-1);n&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
67
+ `)?"":`
68
+ `)+s.raw,a.text+=`
69
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(s),n=o.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
70
+ `)?"":`
71
+ `)+s.raw,a.text+=`
72
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,i=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)h.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)s=i[2]?i[2].length:0,n=n.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let o=!1,a="",l=1/0;for(;e;){if(e.length<l)l=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}o||(a=""),o=!1;let h;if(this.options.extensions?.inline?.some(u=>(h=u.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let u=t.at(-1);h.type==="text"&&u?.type==="text"?(u.raw+=h.raw,u.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,n,a)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e,n,a)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let c=e;if(this.options.extensions?.startInline){let u=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},d),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(c=e.substring(0,u+1))}if(h=this.tokenizer.inlineText(c)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),o=!0;let u=t.at(-1);u?.type==="text"?(u.raw+=h.raw,u.text+=h.text):t.push(h);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},aa=class{options;parser;constructor(r){this.options=r||Jn}space(r){return""}code({text:r,lang:e,escaped:t}){let n=(e||"").match(Ze.notSpaceStart)?.[0],i=r.replace(Ze.endingNewline,"")+`
73
+ `;return n?'<pre><code class="language-'+Wt(n)+'">'+(t?i:Wt(i,!0))+`</code></pre>
74
+ `:"<pre><code>"+(t?i:Wt(i,!0))+`</code></pre>
75
+ `}blockquote({tokens:r}){return`<blockquote>
76
+ ${this.parser.parse(r)}</blockquote>
77
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
78
+ `}hr(r){return`<hr>
79
+ `}list(r){let e=r.ordered,t=r.start,n="";for(let o=0;o<r.items.length;o++){let a=r.items[o];n+=this.listitem(a)}let i=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+i+s+`>
80
+ `+n+"</"+i+`>
81
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
82
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
83
+ `}table(r){let e="",t="";for(let i=0;i<r.header.length;i++)t+=this.tablecell(r.header[i]);e+=this.tablerow({text:t});let n="";for(let i=0;i<r.rows.length;i++){let s=r.rows[i];t="";for(let o=0;o<s.length;o++)t+=this.tablecell(s[o]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
84
+ <thead>
85
+ `+e+`</thead>
86
+ `+n+`</table>
87
+ `}tablerow({text:r}){return`<tr>
88
+ ${r}</tr>
89
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
90
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Wt(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let n=this.parser.parseInline(t),i=ob(r);if(i===null)return n;r=i;let s='<a href="'+r+'"';return e&&(s+=' title="'+Wt(e)+'"'),s+=">"+n+"</a>",s}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let i=ob(r);if(i===null)return Wt(t);r=i;let s=`<img src="${r}" alt="${Wt(t)}"`;return e&&(s+=` title="${Wt(e)}"`),s+=">",s}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:Wt(r.text)}},Tu=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},It=class mu{options;renderer;textRenderer;constructor(e){this.options=e||Jn,this.options.renderer=this.options.renderer||new aa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Tu}static parse(e,t){return new mu(t).parse(e)}static parseInline(e,t){return new mu(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let o=i,a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){t+=a||"";continue}}let s=i;switch(s.type){case"space":{t+=this.renderer.space(s);break}case"hr":{t+=this.renderer.hr(s);break}case"heading":{t+=this.renderer.heading(s);break}case"code":{t+=this.renderer.code(s);break}case"table":{t+=this.renderer.table(s);break}case"blockquote":{t+=this.renderer.blockquote(s);break}case"list":{t+=this.renderer.list(s);break}case"checkbox":{t+=this.renderer.checkbox(s);break}case"html":{t+=this.renderer.html(s);break}case"def":{t+=this.renderer.def(s);break}case"paragraph":{t+=this.renderer.paragraph(s);break}case"text":{t+=this.renderer.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=a||"";continue}}let o=s;switch(o.type){case"escape":{n+=t.text(o);break}case"html":{n+=t.html(o);break}case"link":{n+=t.link(o);break}case"image":{n+=t.image(o);break}case"checkbox":{n+=t.checkbox(o);break}case"strong":{n+=t.strong(o);break}case"em":{n+=t.em(o);break}case"codespan":{n+=t.codespan(o);break}case"br":{n+=t.br(o);break}case"del":{n+=t.del(o);break}case"text":{n+=t.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},Bi=class{options;block;constructor(r){this.options=r||Jn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?$t.lex:$t.lexInline}provideParser(r=this.block){return r?It.parse:It.parseInline}},nP=class{defaults=gu();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=It;Renderer=aa;TextRenderer=Tu;Lexer=$t;Tokenizer=oa;Hooks=Bi;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let n of r)switch(t=t.concat(e.call(this,n)),n.type){case"table":{let i=n;for(let s of i.header)t=t.concat(this.walkTokens(s.tokens,e));for(let s of i.rows)for(let o of s)t=t.concat(this.walkTokens(o.tokens,e));break}case"list":{let i=n;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let o=i[s].flat(1/0);t=t.concat(this.walkTokens(o,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){let i=this.defaults.renderer||new aa(this.defaults);for(let s in t.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,a=t.renderer[o],l=i[o];i[o]=(...h)=>{let c=a.apply(i,h);return c===!1&&(c=l.apply(i,h)),c||""}}n.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new oa(this.defaults);for(let s in t.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,a=t.tokenizer[o],l=i[o];i[o]=(...h)=>{let c=a.apply(i,h);return c===!1&&(c=l.apply(i,h)),c}}n.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new Bi;for(let s in t.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,a=t.hooks[o],l=i[o];Bi.passThroughHooks.has(s)?i[o]=h=>{if(this.defaults.async&&Bi.passThroughHooksRespectAsync.has(s))return(async()=>{let u=await a.call(i,h);return l.call(i,u)})();let c=a.call(i,h);return l.call(i,c)}:i[o]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await a.apply(i,h);return u===!1&&(u=await l.apply(i,h)),u})();let c=a.apply(i,h);return c===!1&&(c=l.apply(i,h)),c}}n.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(o){let a=[];return a.push(s.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return $t.lex(r,e??this.defaults)}parser(r,e){return It.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let n={...t},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(e):e,a=await(i.hooks?await i.hooks.provideLexer(r):r?$t.lex:$t.lexInline)(o,i),l=i.hooks?await i.hooks.processAllTokens(a):a;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let h=await(i.hooks?await i.hooks.provideParser(r):r?It.parse:It.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(h):h})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let o=(i.hooks?i.hooks.provideLexer(r):r?$t.lex:$t.lexInline)(e,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let a=(i.hooks?i.hooks.provideParser(r):r?It.parse:It.parseInline)(o,i);return i.hooks&&(a=i.hooks.postprocess(a)),a}catch(o){return s(o)}}}onError(r,e){return t=>{if(t.message+=`
91
+ Please report this to https://github.com/markedjs/marked.`,r){let n="<p>An error occurred:</p><pre>"+Wt(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},Kn=new nP;function ae(r,e){return Kn.parse(r,e)}ae.options=ae.setOptions=function(r){return Kn.setOptions(r),ae.defaults=Kn.defaults,cb(ae.defaults),ae};ae.getDefaults=gu;ae.defaults=Jn;ae.use=function(...r){return Kn.use(...r),ae.defaults=Kn.defaults,cb(ae.defaults),ae};ae.walkTokens=function(r,e){return Kn.walkTokens(r,e)};ae.parseInline=Kn.parseInline;ae.Parser=It;ae.parser=It.parse;ae.Renderer=aa;ae.TextRenderer=Tu;ae.Lexer=$t;ae.lexer=$t.lex;ae.Tokenizer=oa;ae.Hooks=Bi;ae.parse=ae;var LQ=ae.options,MQ=ae.setOptions,DQ=ae.use,zQ=ae.walkTokens,_Q=ae.parseInline;var XQ=It.parse,FQ=$t.lex;var ca={};pe(ca,{BalancedJSONTokenizer:()=>ku,FilterParser:()=>Pu,Utils:()=>Cu,detectIndentation:()=>hP,getOverlap:()=>dP,isMinified:()=>cP,performSearchInContent:()=>wb,performSearchInContentData:()=>xb,performSearchInSearchMatches:()=>uP});var sP=/(?:^|\s)(\-)?([\w\-]+):([^\s]+)/,oP=/(?:^|\s)(\-)?\/((?:[^\/\\]|\\.)+)\//,aP=/(?:^|\s)(\-)?([^\s]+)/,lP=/\s/,Cu={isSpaceChar:function(r){return lP.test(r)},lineIndent:function(r){let e=0;for(;e<r.length&&Cu.isSpaceChar(r.charAt(e));)++e;return r.substr(0,e)},splitStringByRegexes(r,e){let t=[],n=[];for(let s=0;s<e.length;s++){let o=e[s];o.global?n.push(o):n.push(new RegExp(o.source,o.flags?o.flags+"g":"g"))}return i(r,0,0),t;function i(s,o,a){if(o>=n.length){t.push({value:s,position:a,regexIndex:-1,captureGroups:[]});return}let l=n[o],h=0,c;for(l.lastIndex=0;(c=l.exec(s))!==null;){let d=s.substring(h,c.index);d&&i(d,o+1,a+h);let p=c[0];t.push({value:p,position:a+c.index,regexIndex:o,captureGroups:c.slice(1)}),h=c.index+p.length}let u=s.substring(h);u&&i(u,o+1,a+h)}}},Pu=class{keys;constructor(e){this.keys=e}static cloneFilter(e){return{key:e.key,text:e.text,regex:e.regex,negative:e.negative}}parse(e){let t=Cu.splitStringByRegexes(e,[sP,oP,aP]),n=[];for(let{regexIndex:i,captureGroups:s}of t)if(i!==-1){if(i===0){let o=s[0],a=s[1],l=s[2];this.keys.indexOf(a)!==-1?n.push({key:a,text:l,negative:!!o}):n.push({text:`${a}:${l}`,negative:!!o})}else if(i===1){let o=s[0],a=s[1];try{n.push({regex:new RegExp(a,"im"),negative:!!o})}catch{n.push({text:`/${a}/`,negative:!!o})}}else if(i===2){let o=s[0],a=s[1];n.push({text:a,negative:!!o})}}return n}},ku=class{callback;index;balance;buffer;findMultiple;closingDoubleQuoteRegex;lastBalancedIndex;constructor(e,t){this.callback=e,this.index=0,this.balance=0,this.buffer="",this.findMultiple=t||!1,this.closingDoubleQuoteRegex=/[^\\](?:\\\\)*"/g}write(e){this.buffer+=e;let t=this.buffer.length,n=this.buffer,i;for(i=this.index;i<t;++i){let s=n[i];if(s==='"'){if(this.closingDoubleQuoteRegex.lastIndex=i,!this.closingDoubleQuoteRegex.test(n))break;i=this.closingDoubleQuoteRegex.lastIndex-1}else if(s==="{")++this.balance;else if(s==="}"){if(--this.balance,this.balance<0)return this.reportBalanced(),!1;if(!this.balance&&(this.lastBalancedIndex=i+1,!this.findMultiple))break}else if(s==="]"&&!this.balance)return this.reportBalanced(),!1}return this.index=i,this.reportBalanced(),!0}reportBalanced(){this.lastBalancedIndex&&(this.callback(this.buffer.slice(0,this.lastBalancedIndex)),this.buffer=this.buffer.slice(this.lastBalancedIndex),this.index-=this.lastBalancedIndex,this.lastBalancedIndex=0)}remainder(){return this.buffer}},hP=function(r){let e=[0,0,0,0,0,0,0,0,0],t=0,n=0;for(let o of r){let a=0;if(o.length!==0){let h=o.charAt(0);if(h===" "){t++;continue}for(;h===" ";)h=o.charAt(++a)}if(a===o.length){n=0;continue}let l=Math.abs(a-n);l<e.length&&(e[l]=e[l]+1),n=a}let i=0,s=0;for(let o=1;o<e.length;++o){let a=e[o];a>s&&(s=a,i=o)}return t>i?" ":i?" ".repeat(i):null},cP=function(r){let e=0;for(let t=0;t<r.length;++e){let n=r.indexOf(`
92
+ `,t);n<0&&(n=r.length),t=n+1}return(r.length-e)/e>=80},xb=function(r,e,t,n){return pn.isError(r)||!r.isTextContent?[]:wb(r.textObj,e,t,n)},wb=function(r,e,t,n){let i=B.createSearchRegex(e,t,n),s=[];for(let o=0;o<r.lineCount();++o){let a=r.lineAt(o),l=a.matchAll(i);for(let h of l)s.push(new Fi(o,a,h.index,h[0].length))}return s},uP=function(r,e,t,n){let i=B.createSearchRegex(e,t,n),s=[];for(let{lineNumber:o,lineContent:a}of r){let l=a.matchAll(i);for(let h of l)s.push(new Fi(o,a,h.index,h[0].length))}return s},dP=function(r,e){let t=Math.min(r.length,e.length);for(let n=t;n>0;n--){let i=r.slice(-n),s=e.substring(0,n);if(i===s)return i}return null};var vb=class r extends sr.ObjectWrapper{mimeType;#e;#t;#i=[];#n;constructor(e,t,n){super(),this.mimeType=e,this.#e=t,this.#t=!!(n&&!n.createdFromBase64),this.#n=n}static create(e,t){return new r(e,t)}static from(e){return new r(e.mimeType,e.charset,e)}get isTextContent(){return this.#n?this.#n.isTextContent:tr.isTextType(this.mimeType)}addChunk(e){if(this.#t)throw new Error("Cannot add base64 data to a text-only ContentData.");this.#i.push(e),this.dispatchEventToListeners("ChunkAdded",{content:this,chunk:e})}content(){if(this.#n&&this.#i.length===0)return this.#n;let e=this.#n?.base64??"",t=this.#i.reduce((n,i)=>B.concatBase64(n,i),e);return this.#n=new pn(t,!0,this.mimeType,this.#e),this.#i=[],this.#n}};var Vi=class{#e;#t;#i;#n;#r;#s;#a;#o="";parsingComplete;constructor(e){this.#h(),this.#e=new fr(e),this.#t=[],this.#i=null,this.#n=!1,this.parsingComplete=this.#O(),this.parsingComplete.catch(()=>{})}dispose(){this.#h()}#h(){this.#o="",this.#r=void 0}close(){this.#n=!0,this.#i&&(this.#i(""),this.#i=null)}async buildSnapshot(e){await this.parsingComplete,this.#r=this.#r||{},this.#e.updateStatus("Processing snapshot\u2026");let t=new gr(this.#r,this.#e);return await t.initialize(e),this.#h(),t}#d(){let e=0,t=48,n=57,i=45,s=93,o=this.#o.length;for(;;){for(;e<o;){let c=this.#o.charCodeAt(e);if(t<=c&&c<=n||c===i)break;if(c===s)return this.#o=this.#o.slice(e+1),!1;++e}if(e===o)return this.#o="",!0;let a=e,l=!1;this.#o.charCodeAt(e)===i&&(l=!0,++e);let h=0;for(;e<o;){let c=this.#o.charCodeAt(e);if(t>c||c>n)break;h*=10,h+=c-t,++e}if(e===o)return this.#o=this.#o.slice(a),!0;if(!this.#s)throw new Error("Array not instantiated");this.#s.setValue(this.#a++,l?-h:h)}}#f(){this.#e.updateStatus("Parsing strings\u2026");let e=this.#o.lastIndexOf("]");if(e===-1)throw new Error("Incomplete JSON");if(this.#o=this.#o.slice(0,e+1),!this.#r)throw new Error("No snapshot in parseStringsArray");this.#r.strings=JSON.parse(this.#o)}write(e){e&&(this.#t.push(e),this.#i&&(this.#i(this.#t.shift()),this.#i=null))}#c(){if(this.#t.length>0)return Promise.resolve(this.#t.shift());if(this.#n)return Promise.resolve("");let{promise:e,resolve:t}=Promise.withResolvers();return this.#i=t,e}async#u(e,t){for(;;){let n=this.#o.indexOf(e,t||0);if(n!==-1)return n;t=this.#o.length-e.length+1;let i=await this.#c();if(!i)throw new Error(`Token ${e} not found (unexpected end of input)`);this.#o+=i}}async#l(e,t,n){let i=await this.#u(e),s=await this.#u("[",i);for(this.#o=this.#o.slice(s+1),this.#s=n===void 0?ft.createExpandableBigUint32Array():ft.createFixedBigUint32Array(n),this.#a=0;this.#d();){n?this.#e.updateProgress(t,this.#a,this.#s.length):this.#e.updateStatus(t);let a=await this.#c();if(!a)throw new Error(`Unexpected end of input while ${t}`);this.#o+=a}let o=this.#s;return this.#s=null,o}async#O(){let e='"snapshot"',t=await this.#u(e);if(t===-1)throw new Error("Snapshot token not found");this.#e.updateStatus("Loading snapshot info\u2026");let n=this.#o.slice(t+e.length+1),i=!1,s=new ca.BalancedJSONTokenizer(c=>{this.#o=s.remainder(),i=!0,this.#r=this.#r||{},this.#r.snapshot=JSON.parse(c)});for(s.write(n);!i;){let c=await this.#c();if(!c)throw new Error("Unexpected end of input while loading snapshot info");s.write(c)}this.#r=this.#r||{};let o=await this.#l('"nodes"',"Loading nodes\u2026 {PH1}%",this.#r.snapshot.meta.node_fields.length*this.#r.snapshot.node_count);this.#r.nodes=o;let a=await this.#l('"edges"',"Loading edges\u2026 {PH1}%",this.#r.snapshot.meta.edge_fields.length*this.#r.snapshot.edge_count);if(this.#r.edges=a,this.#r.snapshot.trace_function_count){let c=await this.#l('"trace_function_infos"',"Loading allocation traces\u2026 {PH1}%",this.#r.snapshot.meta.trace_function_info_fields.length*this.#r.snapshot.trace_function_count);this.#r.trace_function_infos=c.asUint32ArrayOrFail();let u=await this.#u(":"),d=await this.#u('"',u),p=this.#o.indexOf("["),f=this.#o.lastIndexOf("]",d);this.#r.trace_tree=JSON.parse(this.#o.substring(p,f+1)),this.#o=this.#o.slice(f+1)}if(this.#r.snapshot.meta.sample_fields){let c=await this.#l('"samples"',"Loading samples\u2026");this.#r.samples=c.asArrayOrFail()}if(this.#r.snapshot.meta.location_fields){let c=await this.#l('"locations"',"Loading locations\u2026");this.#r.locations=c.asArrayOrFail()}else this.#r.locations=[];if(this.#r.snapshot.meta.scope_fields){let c=await this.#l('"scopes"',"Loading scopes\u2026");this.#r.scopes=c.asArrayOrFail()}if(this.#r.snapshot.meta.scope_context_var_fields){let c=await this.#l('"scope_context_vars"',"Loading scope context vars\u2026");this.#r.scope_context_vars=c.asArrayOrFail()}if(this.#r.snapshot.meta.scope_use_fields){let c=await this.#l('"scope_uses"',"Loading scope uses\u2026");this.#r.scope_uses=c.asArrayOrFail()}this.#e.updateStatus("Loading strings\u2026");let l=await this.#u('"strings"'),h=await this.#u("[",l);for(this.#o=this.#o.slice(h);this.#t.length>0||!this.#n;)this.#o+=await this.#c();this.#f()}};var da={};pe(da,{HeapSnapshotWorkerDispatcher:()=>Qu});var Qu=class{#e=[];#t;constructor(e){this.#t=e}sendEvent(e,t){this.#t({eventName:e,data:t})}async dispatchMessage({data:e,ports:t}){let n={callId:e.callId,result:null};try{switch(e.disposition){case"createLoader":this.#e[e.objectId]=new Vi(this);break;case"dispose":{delete this.#e[e.objectId];break}case"getter":{let s=this.#e[e.objectId][e.methodName];n.result=s;break}case"factory":{let i=this.#e[e.objectId],s=e.methodArguments.slice();s.push(...t);let o=await i[e.methodName].apply(i,s);o&&(this.#e[e.newObjectId]=o),n.result=!!o;break}case"method":{let i=this.#e[e.objectId];n.result=i[e.methodName].apply(i,e.methodArguments);break}case"evaluateForTest":{try{globalThis.HeapSnapshotWorker={AllocationProfile:vs,HeapSnapshot:Ms,HeapSnapshotLoader:ua},globalThis.HeapSnapshotModel=Hr,n.result=await self.eval(e.source)}catch(i){n.result=i.toString()}break}case"setupForSecondaryInit":this.#e[e.objectId]=new mr(t[0])}}catch(i){n.error=i.toString(),n.errorCallStack=i.stack,e.methodName&&(n.errorMethodName=e.methodName)}this.#t(n)}};var Tb=new da.HeapSnapshotWorkerDispatcher(pt.HOST_RUNTIME.workerScope.postMessage.bind(pt.HOST_RUNTIME.workerScope));pt.HOST_RUNTIME.workerScope.onmessage=Tb.dispatchMessage.bind(Tb);pt.HOST_RUNTIME.workerScope.postMessage("workerReady");
93
+ /*! *****************************************************************************
94
+ Copyright (c) Microsoft Corporation.
95
+
96
+ Permission to use, copy, modify, and/or distribute this software for any
97
+ purpose with or without fee is hereby granted.
98
+
99
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
100
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
101
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
102
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
103
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
104
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
105
+ PERFORMANCE OF THIS SOFTWARE.
106
+ ***************************************************************************** */
107
+ /**
108
+ * @license
109
+ * Copyright 2026 Google LLC
110
+ * SPDX-License-Identifier: Apache-2.0
111
+ */