@psnext/slingcli 2.5.20260705-1 → 2.5.20260710-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +55 -141
  2. package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/index.js +3 -3
  3. package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/configuration.js +1 -1
  4. package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.js +48 -19
  5. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.browser.js +1 -1
  6. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/defaultUserAgent.js +0 -5
  7. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +3 -3
  8. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +2 -2
  9. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +3 -3
  10. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +19 -20
  11. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/index.d.ts +5 -3
  12. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +5 -5
  13. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +5 -5
  14. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +5 -5
  15. package/node_modules/@aws-sdk/core/dist-types/submodules/client/middleware-recursion-detection/configuration.d.ts +1 -0
  16. package/node_modules/@aws-sdk/core/dist-types/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +5 -1
  17. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +1 -1
  18. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
  19. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
  20. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
  21. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/types/shared.d.ts +1 -1
  22. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +2 -1
  23. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +5 -3
  24. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.d.ts +3 -2
  25. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/index.d.ts +3 -3
  26. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +22 -20
  27. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +2 -1
  28. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +16 -3
  29. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +7 -1
  30. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +23 -3
  31. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +24 -2
  32. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +3 -3
  33. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +31 -20
  34. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +2 -1
  35. package/node_modules/@aws-sdk/core/package.json +7 -7
  36. package/node_modules/@aws-sdk/credential-provider-env/dist-es/index.js +1 -1
  37. package/node_modules/@aws-sdk/credential-provider-env/dist-types/index.d.ts +2 -4
  38. package/node_modules/@aws-sdk/credential-provider-env/dist-types/ts3.4/index.d.ts +10 -1
  39. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  40. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +16 -10
  41. package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +16 -10
  42. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +1 -1
  43. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +4 -4
  44. package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
  45. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +1 -1
  46. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js +1 -1
  47. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js +1 -1
  48. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/index.d.ts +2 -4
  49. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/index.d.ts +2 -1
  50. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  51. package/node_modules/@aws-sdk/credential-provider-login/dist-es/index.js +1 -2
  52. package/node_modules/@aws-sdk/credential-provider-login/dist-types/index.d.ts +2 -8
  53. package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/index.d.ts +7 -2
  54. package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
  55. package/node_modules/@aws-sdk/credential-provider-node/dist-es/index.js +1 -1
  56. package/node_modules/@aws-sdk/credential-provider-node/dist-types/index.d.ts +2 -1
  57. package/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/index.d.ts +6 -1
  58. package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
  59. package/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js +1 -1
  60. package/node_modules/@aws-sdk/credential-provider-process/dist-types/index.d.ts +2 -4
  61. package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/index.d.ts +2 -1
  62. package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
  63. package/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js +3 -4
  64. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/fromSSO.d.ts +4 -4
  65. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/index.d.ts +5 -16
  66. package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/index.d.ts +5 -4
  67. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -4
  68. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +7 -4
  69. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +7 -4
  70. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +6 -6
  71. package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
  72. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js +2 -2
  73. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/index.d.ts +4 -8
  74. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/index.d.ts +7 -2
  75. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
  76. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
  77. package/node_modules/@aws-sdk/middleware-eventstream/dist-es/index.js +4 -4
  78. package/node_modules/@aws-sdk/middleware-eventstream/dist-types/index.d.ts +5 -4
  79. package/node_modules/@aws-sdk/middleware-eventstream/dist-types/ts3.4/index.d.ts +14 -4
  80. package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
  81. package/node_modules/@aws-sdk/middleware-websocket/dist-es/index.js +4 -4
  82. package/node_modules/@aws-sdk/middleware-websocket/dist-types/index.d.ts +6 -4
  83. package/node_modules/@aws-sdk/middleware-websocket/dist-types/ts3.4/index.d.ts +9 -4
  84. package/node_modules/@aws-sdk/middleware-websocket/package.json +7 -7
  85. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  86. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  87. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  88. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  89. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  90. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +1 -1
  91. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +4 -4
  92. package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
  93. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
  94. package/node_modules/@aws-sdk/types/dist-es/endpoint.js +1 -1
  95. package/node_modules/@aws-sdk/types/dist-es/identity/index.js +1 -5
  96. package/node_modules/@aws-sdk/types/dist-es/index.js +4 -34
  97. package/node_modules/@aws-sdk/types/dist-es/transfer.js +1 -1
  98. package/node_modules/@aws-sdk/types/dist-types/abort.d.ts +1 -1
  99. package/node_modules/@aws-sdk/types/dist-types/auth.d.ts +2 -1
  100. package/node_modules/@aws-sdk/types/dist-types/blob/blob-types.d.ts +2 -2
  101. package/node_modules/@aws-sdk/types/dist-types/checksum.d.ts +1 -1
  102. package/node_modules/@aws-sdk/types/dist-types/client.d.ts +1 -1
  103. package/node_modules/@aws-sdk/types/dist-types/command.d.ts +1 -1
  104. package/node_modules/@aws-sdk/types/dist-types/connection.d.ts +1 -1
  105. package/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +1 -1
  106. package/node_modules/@aws-sdk/types/dist-types/encode.d.ts +1 -1
  107. package/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts +2 -1
  108. package/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts +1 -1
  109. package/node_modules/@aws-sdk/types/dist-types/http.d.ts +1 -1
  110. package/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +7 -7
  111. package/node_modules/@aws-sdk/types/dist-types/identity/Identity.d.ts +1 -1
  112. package/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts +1 -1
  113. package/node_modules/@aws-sdk/types/dist-types/identity/index.d.ts +5 -5
  114. package/node_modules/@aws-sdk/types/dist-types/index.d.ts +42 -34
  115. package/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +1 -1
  116. package/node_modules/@aws-sdk/types/dist-types/pagination.d.ts +1 -1
  117. package/node_modules/@aws-sdk/types/dist-types/profile.d.ts +1 -1
  118. package/node_modules/@aws-sdk/types/dist-types/response.d.ts +1 -1
  119. package/node_modules/@aws-sdk/types/dist-types/retry.d.ts +1 -1
  120. package/node_modules/@aws-sdk/types/dist-types/serde.d.ts +1 -1
  121. package/node_modules/@aws-sdk/types/dist-types/shapes.d.ts +1 -1
  122. package/node_modules/@aws-sdk/types/dist-types/signature.d.ts +1 -1
  123. package/node_modules/@aws-sdk/types/dist-types/stream.d.ts +1 -1
  124. package/node_modules/@aws-sdk/types/dist-types/transfer.d.ts +2 -1
  125. package/node_modules/@aws-sdk/types/dist-types/ts3.4/auth.d.ts +2 -5
  126. package/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts +1 -1
  127. package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +1 -1
  128. package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/index.d.ts +17 -5
  129. package/node_modules/@aws-sdk/types/dist-types/ts3.4/index.d.ts +225 -34
  130. package/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts +1 -1
  131. package/node_modules/@aws-sdk/types/dist-types/uri.d.ts +1 -1
  132. package/node_modules/@aws-sdk/types/dist-types/util.d.ts +1 -1
  133. package/node_modules/@aws-sdk/types/dist-types/waiter.d.ts +1 -1
  134. package/node_modules/@aws-sdk/types/package.json +2 -2
  135. package/node_modules/@aws-sdk/xml-builder/dist-es/index.js +2 -2
  136. package/node_modules/@aws-sdk/xml-builder/dist-types/index.d.ts +2 -11
  137. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/index.d.ts +2 -2
  138. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  139. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +17 -0
  140. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +3 -173
  141. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +72 -0
  142. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +1 -1
  143. package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +18 -0
  144. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +72 -0
  145. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +36 -0
  146. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +295 -79
  147. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +86 -1
  148. package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +18 -0
  149. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +271 -602
  150. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +271 -602
  151. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
  152. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +26 -0
  153. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +26 -0
  154. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js.map +1 -1
  155. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +176 -111
  156. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +176 -111
  157. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
  158. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +511 -6
  159. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +511 -6
  160. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
  161. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
  162. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
  163. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
  164. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +271 -602
  165. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +271 -602
  166. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
  167. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +26 -0
  168. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +26 -0
  169. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js.map +1 -1
  170. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +176 -111
  171. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +176 -111
  172. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
  173. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +511 -6
  174. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +511 -6
  175. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
  176. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
  177. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
  178. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
  179. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +271 -602
  180. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +307 -655
  181. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
  182. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +26 -0
  183. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +27 -1
  184. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js.map +1 -1
  185. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +176 -111
  186. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +183 -118
  187. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
  188. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +511 -6
  189. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +533 -9
  190. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
  191. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
  192. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
  193. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
  194. package/node_modules/@opentelemetry/semantic-conventions/package.json +4 -4
  195. package/node_modules/@protobufjs/utf8/CHANGELOG.md +8 -0
  196. package/node_modules/@protobufjs/utf8/index.js +29 -18
  197. package/node_modules/@protobufjs/utf8/package.json +2 -2
  198. package/node_modules/@protobufjs/utf8/tests/index.js +5 -0
  199. package/node_modules/@smithy/core/dist-es/index.js +5 -5
  200. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/index.js +3 -3
  201. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/index.js +2 -2
  202. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.js +3 -3
  203. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/index.js +3 -3
  204. package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +3 -3
  205. package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +1 -1
  206. package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +1 -1
  207. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/service-customizations/index.js +1 -1
  208. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/debug/index.js +2 -2
  209. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js +11 -11
  210. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/types/index.js +1 -7
  211. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/utils/index.js +2 -2
  212. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +13 -13
  213. package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +14 -14
  214. package/node_modules/@smithy/core/dist-types/index.d.ts +7 -5
  215. package/node_modules/@smithy/core/dist-types/legacy-root-exports/middleware-http-auth-scheme/index.d.ts +4 -3
  216. package/node_modules/@smithy/core/dist-types/legacy-root-exports/middleware-http-signing/index.d.ts +2 -2
  217. package/node_modules/@smithy/core/dist-types/legacy-root-exports/util-identity-and-auth/httpAuthSchemes/index.d.ts +3 -3
  218. package/node_modules/@smithy/core/dist-types/legacy-root-exports/util-identity-and-auth/index.d.ts +4 -3
  219. package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +3 -3
  220. package/node_modules/@smithy/core/dist-types/submodules/client/util-waiter/waiter.d.ts +1 -1
  221. package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.browser.d.ts +2 -1
  222. package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +2 -1
  223. package/node_modules/@smithy/core/dist-types/submodules/endpoints/middleware-endpoint/service-customizations/index.d.ts +1 -1
  224. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/debug/index.d.ts +2 -2
  225. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/lib/index.d.ts +12 -11
  226. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/types/index.d.ts +7 -7
  227. package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/index.d.ts +2 -2
  228. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +13 -13
  229. package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +14 -14
  230. package/node_modules/@smithy/core/dist-types/submodules/transport/httpRequest.d.ts +2 -2
  231. package/node_modules/@smithy/core/dist-types/submodules/transport/index.d.ts +2 -1
  232. package/node_modules/@smithy/core/package.json +2 -2
  233. package/node_modules/@smithy/credential-provider-imds/dist-es/index.js +3 -4
  234. package/node_modules/@smithy/credential-provider-imds/dist-types/index.d.ts +5 -4
  235. package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
  236. package/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts +1 -1
  237. package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
  238. package/node_modules/@smithy/signature-v4/dist-es/index.js +4 -4
  239. package/node_modules/@smithy/signature-v4/dist-types/index.d.ts +5 -4
  240. package/node_modules/@smithy/signature-v4/package.json +3 -3
  241. package/node_modules/@smithy/types/dist-es/auth/index.js +2 -6
  242. package/node_modules/@smithy/types/dist-es/connection/index.js +1 -3
  243. package/node_modules/@smithy/types/dist-es/endpoints/index.js +1 -5
  244. package/node_modules/@smithy/types/dist-es/extensions/index.js +1 -2
  245. package/node_modules/@smithy/types/dist-es/identity/index.js +1 -4
  246. package/node_modules/@smithy/types/dist-es/index.js +7 -43
  247. package/node_modules/@smithy/types/dist-es/metrics.js +1 -0
  248. package/node_modules/@smithy/types/dist-types/abort.d.ts +1 -1
  249. package/node_modules/@smithy/types/dist-types/auth/index.d.ts +7 -6
  250. package/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -3
  251. package/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -5
  252. package/node_modules/@smithy/types/dist-types/extensions/index.d.ts +6 -4
  253. package/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -4
  254. package/node_modules/@smithy/types/dist-types/index.d.ts +51 -43
  255. package/node_modules/@smithy/types/dist-types/metrics.d.ts +93 -0
  256. package/node_modules/@smithy/types/package.json +1 -1
  257. package/node_modules/@types/node/README.md +1 -1
  258. package/node_modules/@types/node/fs/promises.d.ts +16 -6
  259. package/node_modules/@types/node/package.json +2 -2
  260. package/node_modules/gaxios/build/cjs/src/gaxios.js +1 -1
  261. package/node_modules/gaxios/build/cjs/src/gaxios.js.map +1 -1
  262. package/node_modules/gaxios/build/cjs/test/test.getch.js +66 -0
  263. package/node_modules/gaxios/build/cjs/test/test.getch.js.map +1 -1
  264. package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  265. package/node_modules/gaxios/build/esm/src/gaxios.js +1 -1
  266. package/node_modules/gaxios/build/esm/src/gaxios.js.map +1 -1
  267. package/node_modules/gaxios/build/esm/test/test.getch.js +66 -0
  268. package/node_modules/gaxios/build/esm/test/test.getch.js.map +1 -1
  269. package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
  270. package/node_modules/gaxios/package.json +4 -4
  271. package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -1
  272. package/node_modules/lru-cache/dist/commonjs/browser/index.js +11 -4
  273. package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -1
  274. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +1 -1
  275. package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +3 -3
  276. package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  277. package/node_modules/lru-cache/dist/commonjs/index.js +11 -4
  278. package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  279. package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  280. package/node_modules/lru-cache/dist/commonjs/index.min.js.map +3 -3
  281. package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -1
  282. package/node_modules/lru-cache/dist/commonjs/node/index.js +11 -4
  283. package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -1
  284. package/node_modules/lru-cache/dist/commonjs/node/index.min.js +1 -1
  285. package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +3 -3
  286. package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  287. package/node_modules/lru-cache/dist/esm/browser/index.js +11 -4
  288. package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  289. package/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  290. package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +3 -3
  291. package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  292. package/node_modules/lru-cache/dist/esm/index.js +11 -4
  293. package/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  294. package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  295. package/node_modules/lru-cache/dist/esm/index.min.js.map +3 -3
  296. package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  297. package/node_modules/lru-cache/dist/esm/node/index.js +11 -4
  298. package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  299. package/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  300. package/node_modules/lru-cache/dist/esm/node/index.min.js.map +3 -3
  301. package/node_modules/lru-cache/package.json +1 -1
  302. package/package.json +2 -2
  303. package/sling-default-packages.json +2 -1
  304. package/slingshot/index.js +126 -126
  305. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js +0 -15
  306. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.js +0 -14
  307. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.js +0 -9
  308. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.js +0 -75
  309. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/getNodeModulesParentDirs.d.ts +0 -10
  310. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.d.ts +0 -8
  311. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.d.ts +0 -8
  312. package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.d.ts +0 -6
  313. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getNodeModulesParentDirs.d.ts +0 -1
  314. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getSanitizedDevTypeScriptVersion.d.ts +0 -3
  315. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getSanitizedTypeScriptVersion.d.ts +0 -3
  316. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getTypeScriptUserAgentPair.d.ts +0 -4
@@ -1,2 +1,2 @@
1
- var L={hasSubscribers:!1},S=L,W=L;var M=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date;var D=()=>S.hasSubscribers||W.hasSubscribers,j=new Set,I=typeof process=="object"&&process?process:{},P=(u,e,t,i)=>{typeof I.emitWarning=="function"?I.emitWarning(u,e,t,i):console.error(`[${t}] ${e}: ${u}`)},k=u=>!j.has(u);var T=u=>!!u&&u===Math.floor(u)&&u>0&&isFinite(u),G=u=>T(u)?u<=Math.pow(2,8)?Uint8Array:u<=Math.pow(2,16)?Uint16Array:u<=Math.pow(2,32)?Uint32Array:u<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(e){super(e),this.fill(0)}},R=class u{heap;length;static#o=!1;static create(e){let t=G(e);if(!t)return[];u.#o=!0;let i=new u(e,t);return u.#o=!1,i}constructor(e,t){if(!u.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},U=class u{#o;#c;#S;#O;#w;#M;#I;#m;get perf(){return this.#m}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#n;#b;#s;#i;#t;#l;#u;#a;#h;#y;#r;#_;#F;#d;#g;#T;#U;#f;#x;static unsafeExposeInternals(e){return{starts:e.#F,ttls:e.#d,autopurgeTimers:e.#g,sizes:e.#_,keyMap:e.#s,keyList:e.#i,valList:e.#t,next:e.#l,prev:e.#u,get head(){return e.#a},get tail(){return e.#h},free:e.#y,isBackgroundFetch:t=>e.#e(t),backgroundFetch:(t,i,s,n)=>e.#P(t,i,s,n),moveToTail:t=>e.#L(t),indexes:t=>e.#A(t),rindexes:t=>e.#z(t),isStale:t=>e.#p(t)}}get max(){return this.#o}get maxSize(){return this.#c}get calculatedSize(){return this.#b}get size(){return this.#n}get fetchMethod(){return this.#M}get memoMethod(){return this.#I}get dispose(){return this.#S}get onInsert(){return this.#O}get disposeAfter(){return this.#w}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:r,updateAgeOnHas:h,allowStale:a,dispose:o,onInsert:d,disposeAfter:y,noDisposeOnSet:_,noUpdateTTL:c,maxSize:g=0,maxEntrySize:f=0,sizeCalculation:b,fetchMethod:l,memoMethod:w,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:A,ignoreFetchAbort:z,backgroundFetchSize:C=1,perf:E}=e;if(this.backgroundFetchSize=C,E!==void 0&&typeof E?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#m=E??M,t!==0&&!T(t))throw new TypeError("max option must be a nonnegative integer");let v=t?G(t):Array;if(!v)throw new Error("invalid max value: "+t);if(this.#o=t,this.#c=g,this.maxEntrySize=f||this.#c,this.sizeCalculation=b,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=w,l!==void 0&&typeof l!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=l,this.#U=!!l,this.#s=new Map,this.#i=Array.from({length:t}).fill(void 0),this.#t=Array.from({length:t}).fill(void 0),this.#l=new v(t),this.#u=new v(t),this.#a=0,this.#h=0,this.#y=R.create(t),this.#n=0,this.#b=0,typeof o=="function"&&(this.#S=o),typeof d=="function"&&(this.#O=d),typeof y=="function"?(this.#w=y,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#T=!!this.#S,this.#x=!!this.#O,this.#f=!!this.#w,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#c!==0&&!T(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!T(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#X()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!m,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!h,this.ttlResolution=T(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!T(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#o===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#c){let x="LRU_CACHE_UNBOUNDED";k(x)&&(j.add(x),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,u))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#k(){let e=new O(this.#o),t=new O(this.#o);this.#d=e,this.#F=t;let i=this.ttlAutopurge?Array.from({length:this.#o}):void 0;this.#g=i,this.#H=(h,a,o=this.#m.now())=>{t[h]=a!==0?o:0,e[h]=a,s(h,a)},this.#D=h=>{t[h]=e[h]!==0?this.#m.now():0,s(h,e[h])};let s=this.ttlAutopurge?(h,a)=>{if(i?.[h]&&(clearTimeout(i[h]),i[h]=void 0),a&&a!==0&&i){let o=setTimeout(()=>{this.#p(h)&&this.#E(this.#i[h],"expire")},a+1);o.unref&&o.unref(),i[h]=o}}:()=>{};this.#v=(h,a)=>{if(e[a]){let o=e[a],d=t[a];if(!o||!d)return;h.ttl=o,h.start=d,h.now=n||r();let y=h.now-d;h.remainingTTL=o-y}};let n=0,r=()=>{let h=this.#m.now();if(this.ttlResolution>0){n=h;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return h};this.getRemainingTTL=h=>{let a=this.#s.get(h);if(a===void 0)return 0;let o=e[a],d=t[a];if(!o||!d)return 1/0;let y=(n||r())-d;return o-y},this.#p=h=>{let a=t[h],o=e[h];return!!o&&!!a&&(n||r())-a>o}}#D=()=>{};#v=()=>{};#H=()=>{};#p=()=>!1;#X(){let e=new O(this.#o);this.#b=0,this.#_=e,this.#R=t=>{this.#b-=e[t],e[t]=0},this.#N=(t,i,s,n)=>{if(!T(s)){if(this.#e(i))return this.backgroundFetchSize;if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!T(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#j=(t,i,s)=>{if(e[t]=i,this.#c){let n=this.#c-e[t];for(;this.#b>n;)this.#G(!0)}this.#b+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#b)}}#R=e=>{};#j=(e,t,i)=>{};#N=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#h;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#a);)t=this.#u[t]}*#z({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#a;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#h);)t=this.#l[t]}#V(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*rentries(){for(let e of this.#z())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*keys(){for(let e of this.#A()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*rkeys(){for(let e of this.#z()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*values(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#z())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#i[i],this))return this.#C(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}rforEach(e,t=this){for(let i of this.#z()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}purgeStale(){let e=!1;for(let t of this.#z({allowStale:!0}))this.#p(t)&&(this.#E(this.#i[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#t[t],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#F){let r=this.#d[t],h=this.#F[t];if(r&&h){let a=r-(this.#m.now()-h);n.ttl=a,n.start=Date.now()}}return this.#_&&(n.size=this.#_[t]),n}dump(){let e=[];for(let t of this.#A({allowStale:!0})){let i=this.#i[t],s=this.#t[t],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let r={value:n};if(this.#d&&this.#F){r.ttl=this.#d[t];let h=this.#m.now()-this.#F[t];r.start=Math.floor(Date.now()-h)}this.#_&&(r.size=this.#_[t]),e.unshift([i,r])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#m.now()-s}this.#W(t,i.value,i)}}set(e,t,i={}){let{status:s=S.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let n=this.#W(e,t,i);return s&&S.hasSubscribers&&S.publish(s),n}#W(e,t,i,s){let{ttl:n=this.ttl,start:r,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=i,d=this.#e(t);if(t===void 0)return o&&(o.set="deleted"),this.delete(e),this;let{noUpdateTTL:y=this.noUpdateTTL}=i;o&&!d&&(o.value=t);let _=this.#N(e,t,i.size||0,a,o);if(this.maxEntrySize&&_>this.maxEntrySize)return this.#E(e,"set"),o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this;let c=this.#n===0?void 0:this.#s.get(e);if(c===void 0)c=this.#n===0?this.#h:this.#y.length!==0?this.#y.pop():this.#n===this.#o?this.#G(!1):this.#n,this.#i[c]=e,this.#t[c]=t,this.#s.set(e,c),this.#l[this.#h]=c,this.#u[c]=this.#h,this.#h=c,this.#n++,this.#j(c,_,o),o&&(o.set="add"),y=!1,this.#x&&!d&&this.#O?.(t,e,"add");else{this.#L(c);let g=this.#t[c];if(t!==g){if(!h)if(this.#e(g)){g!==s&&g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=g;f!==void 0&&f!==t&&(this.#T&&this.#S?.(f,e,"set"),this.#f&&this.#r?.push([f,e,"set"]))}else this.#T&&this.#S?.(g,e,"set"),this.#f&&this.#r?.push([g,e,"set"]);if(this.#R(c),this.#j(c,_,o),this.#t[c]=t,!d){let f=g&&this.#e(g)?g.__staleWhileFetching:g,b=f===void 0?"add":t!==f?"replace":"update";o&&(o.set=b,f!==void 0&&(o.oldValue=f)),this.#x&&this.onInsert?.(t,e,b)}}else d||(o&&(o.set="update"),this.#x&&this.onInsert?.(t,e,"update"))}if(n!==0&&!this.#d&&this.#k(),this.#d&&(y||this.#H(c,n,r),o&&this.#v(o,c)),!h&&this.#f&&this.#r){let g=this.#r,f;for(;f=g?.shift();)this.#w?.(...f)}return this}pop(){try{for(;this.#n;){let e=this.#t[this.#a];if(this.#G(!0),this.#e(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#r){let e=this.#r,t;for(;t=e?.shift();)this.#w?.(...t)}}}#G(e){let t=this.#a,i=this.#i[t],s=this.#t[t],n=this.#e(s);n&&s.__abortController.abort(new Error("evicted"));let r=n?s.__staleWhileFetching:s;return(this.#T||this.#f)&&r!==void 0&&(this.#T&&this.#S?.(r,i,"evict"),this.#f&&this.#r?.push([r,i,"evict"])),this.#R(t),this.#g?.[t]&&(clearTimeout(this.#g[t]),this.#g[t]=void 0),e&&(this.#i[t]=void 0,this.#t[t]=void 0,this.#y.push(t)),this.#n===1?(this.#a=this.#h=0,this.#y.length=0):this.#a=this.#l[t],this.#s.delete(i),this.#n--,t}has(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#Y(e,t);return S.hasSubscribers&&S.publish(i),s}#Y(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let r=this.#t[n];if(this.#e(r)&&r.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#v(s,n));else return i&&this.#D(n),s&&(s.has="hit",this.#v(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=D()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#J(e,t);return S.hasSubscribers&&S.publish(i),s}#J(e,t){let{status:i,allowStale:s=this.allowStale}=t,n=this.#s.get(e);if(n===void 0||!s&&this.#p(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let r=this.#t[n],h=this.#e(r)?r.__staleWhileFetching:r;return i&&(h!==void 0?(i.peek="hit",i.value=h):i.peek="miss"),h}#P(e,t,i,s){let n=t===void 0?void 0:this.#t[t];if(this.#e(n))return n;let r=new AbortController,{signal:h}=i;h?.addEventListener("abort",()=>r.abort(h.reason),{signal:r.signal});let a={signal:r.signal,options:i,context:s},o=(f,b=!1)=>{let{aborted:l}=r.signal,w=i.ignoreFetchAbort&&f!==void 0,F=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&f!==void 0);if(i.status&&(l&&!b?(i.status.fetchAborted=!0,i.status.fetchError=r.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!w&&!b)return y(r.signal.reason,F);let m=c,p=this.#t[t];return(p===c||p===void 0&&w&&b)&&(f===void 0?m.__staleWhileFetching!==void 0?this.#t[t]=m.__staleWhileFetching:this.#E(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#W(e,f,a.options,m))),f},d=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),y(f,!1)),y=(f,b)=>{let{aborted:l}=r.signal,w=l&&i.allowStaleOnFetchAbort,F=w||i.allowStaleOnFetchRejection,m=F||i.noDeleteOnFetchRejection,p=c;if(this.#t[t]===c&&(!m||!b&&p.__staleWhileFetching===void 0?this.#E(e,"fetch"):w||(this.#t[t]=p.__staleWhileFetching)),F)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw f},_=(f,b)=>{let l=this.#M?.(e,n,a);r.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=w=>o(w,!0)))}),l&&l instanceof Promise?l.then(w=>f(w===void 0?void 0:w),b):l!==void 0&&f(l)};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(_).then(o,d),g=Object.assign(c,{__abortController:r,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#W(e,g,{...a.options,status:void 0}),t=this.#s.get(e)):this.#t[t]=g,g}#e(e){if(!this.#U)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=W.hasSubscribers,{status:s=D()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#B(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#B(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:f,forceRefresh:b=!1,status:l,signal:w}=t;if(l&&(l.op="fetch",l.key=e,b&&(l.forceRefresh=!0),l.cache=this),!this.#U)return l&&(l.fetch="get"),this.#C(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let F={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:r,noDisposeOnSet:h,size:a,sizeCalculation:o,noUpdateTTL:d,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:c,status:l,signal:w},m=this.#s.get(e);if(m===void 0){l&&(l.fetch="miss");let p=this.#P(e,m,F,f);return p.__returned=p}else{let p=this.#t[m];if(this.#e(p)){let v=i&&p.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",v&&(l.returnedStale=!0)),v?p.__staleWhileFetching:p.__returned=p}let A=this.#p(m);if(!b&&!A)return l&&(l.fetch="hit"),this.#L(m),s&&this.#D(m),l&&this.#v(l,m),p;let z=this.#P(e,m,F,f),E=z.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=A?"stale":"refresh",E&&A&&(l.returnedStale=!0)),E?z.__staleWhileFetching:z.__returned=z}}forceFetch(e,t={}){let i=W.hasSubscribers,{status:s=D()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#K(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#K(e,t={}){let i=await this.#B(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Q(e,t);return i&&(i.value=s),S.hasSubscribers&&S.publish(i),s}#Q(e,t={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:r,...h}=t;n&&r&&(n.forceRefresh=!0);let a=this.#C(e,h),o=r||a===void 0;if(n&&(n.memo=o?"miss":"hit",o||(n.value=a)),!o)return a;let d=i(e,a,{options:h,context:s});return n&&(n.value=d),this.#W(e,d,h),d}get(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#C(e,t);return i&&(s!==void 0&&(i.value=s),S.hasSubscribers&&S.publish(i)),s}#C(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:r}=t,h=this.#s.get(e);if(h===void 0){r&&(r.get="miss");return}let a=this.#t[h],o=this.#e(a);return r&&this.#v(r,h),this.#p(h)?o?(r&&(r.get="stale-fetching"),i&&a.__staleWhileFetching!==void 0?(r&&(r.returnedStale=!0),a.__staleWhileFetching):void 0):(n||this.#E(e,"expire"),r&&(r.get="stale"),i?(r&&(r.returnedStale=!0),a):void 0):(r&&(r.get=o?"fetching":"hit"),this.#L(h),s&&this.#D(h),o?a.__staleWhileFetching:a)}#$(e,t){this.#u[t]=e,this.#l[e]=t}#L(e){e!==this.#h&&(e===this.#a?this.#a=this.#l[e]:this.#$(this.#u[e],this.#l[e]),this.#$(this.#h,e),this.#h=e)}delete(e){return this.#E(e,"delete")}#E(e,t){S.hasSubscribers&&S.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#n!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g?.[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#q(t);else{this.#R(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#S?.(n,e,t),this.#f&&this.#r?.push([n,e,t])),this.#s.delete(e),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{let r=this.#u[s];this.#l[r]=this.#l[s];let h=this.#l[s];this.#u[h]=this.#u[s]}this.#n--,this.#y.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#z({allowStale:!0})){let i=this.#t[t];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[t];this.#T&&this.#S?.(i,s,e),this.#f&&this.#r?.push([i,s,e])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#F){this.#d.fill(0),this.#F.fill(0);for(let t of this.#g??[])t!==void 0&&clearTimeout(t);this.#g?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#a=0,this.#h=0,this.#y.length=0,this.#b=0,this.#n=0,this.#f&&this.#r){let t=this.#r,i;for(;i=t?.shift();)this.#w?.(...i)}}};export{U as LRUCache};
1
+ var L={hasSubscribers:!1},S=L,W=L;var M=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date;var R=()=>S.hasSubscribers||W.hasSubscribers,j=new Set,I=typeof process=="object"&&process?process:{},P=(d,e,t,i)=>{typeof I.emitWarning=="function"?I.emitWarning(d,e,t,i):console.error(`[${t}] ${e}: ${d}`)},k=d=>!j.has(d);var T=d=>!!d&&d===Math.floor(d)&&d>0&&isFinite(d),G=d=>T(d)?d<=Math.pow(2,8)?Uint8Array:d<=Math.pow(2,16)?Uint16Array:d<=Math.pow(2,32)?Uint32Array:d<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(e){super(e),this.fill(0)}},x=class d{heap;length;static#o=!1;static create(e){let t=G(e);if(!t)return[];d.#o=!0;let i=new d(e,t);return d.#o=!1,i}constructor(e,t){if(!d.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},U=class d{#o;#c;#S;#O;#w;#M;#I;#m;get perf(){return this.#m}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#n;#b;#s;#i;#t;#l;#u;#a;#h;#y;#r;#_;#F;#d;#g;#T;#U;#f;#D;static unsafeExposeInternals(e){return{starts:e.#F,ttls:e.#d,autopurgeTimers:e.#g,sizes:e.#_,keyMap:e.#s,keyList:e.#i,valList:e.#t,next:e.#l,prev:e.#u,get head(){return e.#a},get tail(){return e.#h},free:e.#y,isBackgroundFetch:t=>e.#e(t),backgroundFetch:(t,i,s,n)=>e.#P(t,i,s,n),moveToTail:t=>e.#L(t),indexes:t=>e.#A(t),rindexes:t=>e.#z(t),isStale:t=>e.#p(t)}}get max(){return this.#o}get maxSize(){return this.#c}get calculatedSize(){return this.#b}get size(){return this.#n}get fetchMethod(){return this.#M}get memoMethod(){return this.#I}get dispose(){return this.#S}get onInsert(){return this.#O}get disposeAfter(){return this.#w}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:h,dispose:r,onInsert:c,disposeAfter:m,noDisposeOnSet:_,noUpdateTTL:u,maxSize:g=0,maxEntrySize:f=0,sizeCalculation:y,fetchMethod:a,memoMethod:w,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:A,ignoreFetchAbort:z,backgroundFetchSize:C=1,perf:E}=e;if(this.backgroundFetchSize=C,E!==void 0&&typeof E?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#m=E??M,t!==0&&!T(t))throw new TypeError("max option must be a nonnegative integer");let v=t?G(t):Array;if(!v)throw new Error("invalid max value: "+t);if(this.#o=t,this.#c=g,this.maxEntrySize=f||this.#c,this.sizeCalculation=y,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=w,a!==void 0&&typeof a!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=a,this.#U=!!a,this.#s=new Map,this.#i=Array.from({length:t}).fill(void 0),this.#t=Array.from({length:t}).fill(void 0),this.#l=new v(t),this.#u=new v(t),this.#a=0,this.#h=0,this.#y=x.create(t),this.#n=0,this.#b=0,typeof r=="function"&&(this.#S=r),typeof c=="function"&&(this.#O=c),typeof m=="function"?(this.#w=m,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#T=!!this.#S,this.#D=!!this.#O,this.#f=!!this.#w,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#c!==0&&!T(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!T(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#X()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=T(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!T(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#o===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#c){let D="LRU_CACHE_UNBOUNDED";k(D)&&(j.add(D),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",D,d))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#k(){let e=new O(this.#o),t=new O(this.#o);this.#d=e,this.#F=t;let i=this.ttlAutopurge?Array.from({length:this.#o}):void 0;this.#g=i,this.#H=(h,r,c=this.#m.now())=>{t[h]=r!==0?c:0,e[h]=r,s(h,r)},this.#R=h=>{t[h]=e[h]!==0?this.#m.now():0,s(h,e[h])};let s=this.ttlAutopurge?(h,r)=>{if(i?.[h]&&(clearTimeout(i[h]),i[h]=void 0),r&&r!==0&&i){let c=setTimeout(()=>{this.#p(h)?(this.#E(this.#i[h],"expire"),i[h]=void 0):s(h,l(h))},r+1);c.unref&&c.unref(),i[h]=c}}:()=>{};this.#v=(h,r)=>{if(e[r]){let c=e[r],m=t[r];if(!c||!m)return;h.ttl=c,h.start=m,h.now=n||o();let _=h.now-m;h.remainingTTL=c-_}};let n=0,o=()=>{let h=this.#m.now();if(this.ttlResolution>0){n=h;let r=setTimeout(()=>n=0,this.ttlResolution);r.unref&&r.unref()}return h};this.getRemainingTTL=h=>{let r=this.#s.get(h);return r===void 0?0:l(r)};let l=h=>{let r=e[h],c=t[h];if(!r||!c)return 1/0;let m=(n||o())-c;return r-m};this.#p=h=>{let r=t[h],c=e[h];return!!c&&!!r&&(n||o())-r>c}}#R=()=>{};#v=()=>{};#H=()=>{};#p=()=>!1;#X(){let e=new O(this.#o);this.#b=0,this.#_=e,this.#x=t=>{this.#b-=e[t],e[t]=0},this.#N=(t,i,s,n)=>{if(!T(s)){if(this.#e(i))return this.backgroundFetchSize;if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!T(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#j=(t,i,s)=>{if(e[t]=i,this.#c){let n=this.#c-e[t];for(;this.#b>n;)this.#G(!0)}this.#b+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#b)}}#x=e=>{};#j=(e,t,i)=>{};#N=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#h;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#a);)t=this.#u[t]}*#z({allowStale:e=this.allowStale}={}){if(this.#n)for(let t=this.#a;this.#V(t)&&((e||!this.#p(t))&&(yield t),t!==this.#h);)t=this.#l[t]}#V(e){return e!==void 0&&this.#s.get(this.#i[e])===e}*entries(){for(let e of this.#A())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*rentries(){for(let e of this.#z())this.#t[e]!==void 0&&this.#i[e]!==void 0&&!this.#e(this.#t[e])&&(yield[this.#i[e],this.#t[e]])}*keys(){for(let e of this.#A()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*rkeys(){for(let e of this.#z()){let t=this.#i[e];t!==void 0&&!this.#e(this.#t[e])&&(yield t)}}*values(){for(let e of this.#A())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#z())this.#t[e]!==void 0&&!this.#e(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#i[i],this))return this.#C(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}rforEach(e,t=this){for(let i of this.#z()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#i[i],this)}}purgeStale(){let e=!1;for(let t of this.#z({allowStale:!0}))this.#p(t)&&(this.#E(this.#i[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#t[t],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#F){let o=this.#d[t],l=this.#F[t];if(o&&l){let h=o-(this.#m.now()-l);n.ttl=h,n.start=Date.now()}}return this.#_&&(n.size=this.#_[t]),n}dump(){let e=[];for(let t of this.#A({allowStale:!0})){let i=this.#i[t],s=this.#t[t],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#d&&this.#F){o.ttl=this.#d[t];let l=this.#m.now()-this.#F[t];o.start=Math.floor(Date.now()-l)}this.#_&&(o.size=this.#_[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#m.now()-s}this.#W(t,i.value,i)}}set(e,t,i={}){let{status:s=S.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let n=this.#W(e,t,i);return s&&S.hasSubscribers&&S.publish(s),n}#W(e,t,i,s){let{ttl:n=this.ttl,start:o,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:r}=i,c=this.#e(t);if(t===void 0)return r&&(r.set="deleted"),this.delete(e),this;let{noUpdateTTL:m=this.noUpdateTTL}=i;r&&!c&&(r.value=t);let _=this.#N(e,t,i.size||0,h,r);if(this.maxEntrySize&&_>this.maxEntrySize)return this.#E(e,"set"),r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this;let u=this.#n===0?void 0:this.#s.get(e);if(u===void 0)u=this.#n===0?this.#h:this.#y.length!==0?this.#y.pop():this.#n===this.#o?this.#G(!1):this.#n,this.#i[u]=e,this.#t[u]=t,this.#s.set(e,u),this.#l[this.#h]=u,this.#u[u]=this.#h,this.#h=u,this.#n++,this.#j(u,_,r),r&&(r.set="add"),m=!1,this.#D&&!c&&this.#O?.(t,e,"add");else{this.#L(u);let g=this.#t[u];if(t!==g){if(!l)if(this.#e(g)){g!==s&&g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=g;f!==void 0&&f!==t&&(this.#T&&this.#S?.(f,e,"set"),this.#f&&this.#r?.push([f,e,"set"]))}else this.#T&&this.#S?.(g,e,"set"),this.#f&&this.#r?.push([g,e,"set"]);if(this.#x(u),this.#j(u,_,r),this.#t[u]=t,!c){let f=g&&this.#e(g)?g.__staleWhileFetching:g,y=f===void 0?"add":t!==f?"replace":"update";r&&(r.set=y,f!==void 0&&(r.oldValue=f)),this.#D&&this.onInsert?.(t,e,y)}}else c||(r&&(r.set="update"),this.#D&&this.onInsert?.(t,e,"update"))}if(n!==0&&!this.#d&&this.#k(),this.#d&&(m||this.#H(u,n,o),r&&this.#v(r,u)),!l&&this.#f&&this.#r){let g=this.#r,f;for(;f=g?.shift();)this.#w?.(...f)}return this}pop(){try{for(;this.#n;){let e=this.#t[this.#a];if(this.#G(!0),this.#e(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#r){let e=this.#r,t;for(;t=e?.shift();)this.#w?.(...t)}}}#G(e){let t=this.#a,i=this.#i[t],s=this.#t[t],n=this.#e(s);n&&s.__abortController.abort(new Error("evicted"));let o=n?s.__staleWhileFetching:s;return(this.#T||this.#f)&&o!==void 0&&(this.#T&&this.#S?.(o,i,"evict"),this.#f&&this.#r?.push([o,i,"evict"])),this.#x(t),this.#g?.[t]&&(clearTimeout(this.#g[t]),this.#g[t]=void 0),e&&(this.#i[t]=void 0,this.#t[t]=void 0,this.#y.push(t)),this.#n===1?(this.#a=this.#h=0,this.#y.length=0):this.#a=this.#l[t],this.#s.delete(i),this.#n--,t}has(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#Y(e,t);return S.hasSubscribers&&S.publish(i),s}#Y(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let o=this.#t[n];if(this.#e(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#p(n))s&&(s.has="stale",this.#v(s,n));else return i&&this.#R(n),s&&(s.has="hit",this.#v(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=R()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#J(e,t);return S.hasSubscribers&&S.publish(i),s}#J(e,t){let{status:i,allowStale:s=this.allowStale}=t,n=this.#s.get(e);if(n===void 0||!s&&this.#p(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let o=this.#t[n],l=this.#e(o)?o.__staleWhileFetching:o;return i&&(l!==void 0?(i.peek="hit",i.value=l):i.peek="miss"),l}#P(e,t,i,s){let n=t===void 0?void 0:this.#t[t];if(this.#e(n))return n;let o=new AbortController,{signal:l}=i;l?.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let h={signal:o.signal,options:i,context:s},r=(f,y=!1)=>{let{aborted:a}=o.signal,w=i.ignoreFetchAbort&&f!==void 0,F=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&f!==void 0);if(i.status&&(a&&!y?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!w&&!y)return m(o.signal.reason,F);let b=u,p=this.#t[t];return(p===u||p===void 0&&w&&y)&&(f===void 0?b.__staleWhileFetching!==void 0?this.#t[t]=b.__staleWhileFetching:this.#E(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#W(e,f,h.options,b))),f},c=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),m(f,!1)),m=(f,y)=>{let{aborted:a}=o.signal,w=a&&i.allowStaleOnFetchAbort,F=w||i.allowStaleOnFetchRejection,b=F||i.noDeleteOnFetchRejection,p=u;if(this.#t[t]===u&&(!b||!y&&p.__staleWhileFetching===void 0?this.#E(e,"fetch"):w||(this.#t[t]=p.__staleWhileFetching)),F)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw f},_=(f,y)=>{let a=this.#M?.(e,n,h);o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=w=>r(w,!0)))}),a&&a instanceof Promise?a.then(w=>f(w===void 0?void 0:w),y):a!==void 0&&f(a)};i.status&&(i.status.fetchDispatched=!0);let u=new Promise(_).then(r,c),g=Object.assign(u,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#W(e,g,{...h.options,status:void 0}),t=this.#s.get(e)):this.#t[t]=g,g}#e(e){if(!this.#U)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=W.hasSubscribers,{status:s=R()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#B(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#B(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:h=0,sizeCalculation:r=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:u=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:a,signal:w}=t;if(a&&(a.op="fetch",a.key=e,y&&(a.forceRefresh=!0),a.cache=this),!this.#U)return a&&(a.fetch="get"),this.#C(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let F={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:l,size:h,sizeCalculation:r,noUpdateTTL:c,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:u,status:a,signal:w},b=this.#s.get(e);if(b===void 0){a&&(a.fetch="miss");let p=this.#P(e,b,F,f);return p.__returned=p}else{let p=this.#t[b];if(this.#e(p)){let v=i&&p.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",v&&(a.returnedStale=!0)),v?p.__staleWhileFetching:p.__returned=p}let A=this.#p(b);if(!y&&!A)return a&&(a.fetch="hit"),this.#L(b),s&&this.#R(b),a&&this.#v(a,b),p;let z=this.#P(e,b,F,f),E=z.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=A?"stale":"refresh",E&&A&&(a.returnedStale=!0)),E?z.__staleWhileFetching:z.__returned=z}}forceFetch(e,t={}){let i=W.hasSubscribers,{status:s=R()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#K(e,t);return s&&i&&(s.trace=!0,W.tracePromise(()=>n,s).catch(()=>{})),n}async#K(e,t={}){let i=await this.#B(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Q(e,t);return i&&(i.value=s),S.hasSubscribers&&S.publish(i),s}#Q(e,t={}){let i=this.#I;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:o,...l}=t;n&&o&&(n.forceRefresh=!0);let h=this.#C(e,l),r=o||h===void 0;if(n&&(n.memo=r?"miss":"hit",r||(n.value=h)),!r)return h;let c=i(e,h,{options:l,context:s});return n&&(n.value=c),this.#W(e,c,l),c}get(e,t={}){let{status:i=S.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#C(e,t);return i&&(s!==void 0&&(i.value=s),S.hasSubscribers&&S.publish(i)),s}#C(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,l=this.#s.get(e);if(l===void 0){o&&(o.get="miss");return}let h=this.#t[l],r=this.#e(h);return o&&this.#v(o,l),this.#p(l)?r?(o&&(o.get="stale-fetching"),i&&h.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),h.__staleWhileFetching):void 0):(n||this.#E(e,"expire"),o&&(o.get="stale"),i?(o&&(o.returnedStale=!0),h):void 0):(o&&(o.get=r?"fetching":"hit"),this.#L(l),s&&this.#R(l),r?h.__staleWhileFetching:h)}#$(e,t){this.#u[t]=e,this.#l[e]=t}#L(e){e!==this.#h&&(e===this.#a?this.#a=this.#l[e]:this.#$(this.#u[e],this.#l[e]),this.#$(this.#h,e),this.#h=e)}delete(e){return this.#E(e,"delete")}#E(e,t){S.hasSubscribers&&S.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#n!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#g?.[s]&&(clearTimeout(this.#g[s]),this.#g[s]=void 0),i=!0,this.#n===1)this.#q(t);else{this.#x(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#T||this.#f)&&(this.#T&&this.#S?.(n,e,t),this.#f&&this.#r?.push([n,e,t])),this.#s.delete(e),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#u[s];else if(s===this.#a)this.#a=this.#l[s];else{let o=this.#u[s];this.#l[o]=this.#l[s];let l=this.#l[s];this.#u[l]=this.#u[s]}this.#n--,this.#y.push(s)}}if(this.#f&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#z({allowStale:!0})){let i=this.#t[t];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[t];this.#T&&this.#S?.(i,s,e),this.#f&&this.#r?.push([i,s,e])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#d&&this.#F){this.#d.fill(0),this.#F.fill(0);for(let t of this.#g??[])t!==void 0&&clearTimeout(t);this.#g?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#a=0,this.#h=0,this.#y.length=0,this.#b=0,this.#n=0,this.#f&&this.#r){let t=this.#r,i;for(;i=t?.shift();)this.#w?.(...i)}}};export{U as LRUCache};
2
2
  //# sourceMappingURL=index.min.js.map