bantou 0.1.0 → 0.2.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 (515) hide show
  1. package/.output/nitro.json +13 -0
  2. package/.output/public/_nuxt/BmGsA4i2.js +1 -0
  3. package/.output/public/_nuxt/D_G6gzEa.js +1 -0
  4. package/.output/public/_nuxt/builds/latest.json +1 -0
  5. package/.output/public/_nuxt/builds/meta/1a8fc623-6671-445b-bdd3-c3d073520a3a.json +1 -0
  6. package/.output/public/_nuxt/entry.CZSvzYhH.css +1 -0
  7. package/.output/public/_nuxt/error-404.C3wqHTJz.css +1 -0
  8. package/.output/public/_nuxt/error-500.D6rBzoDj.css +1 -0
  9. package/.output/public/_nuxt/pdFQkwM_.js +4 -0
  10. package/.output/server/chunks/_/error-500.mjs +20 -0
  11. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  12. package/.output/server/chunks/nitro/nitro.mjs +5870 -0
  13. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  14. package/.output/server/chunks/routes/mcp.mjs +22 -0
  15. package/.output/server/chunks/routes/mcp.mjs.map +1 -0
  16. package/.output/server/chunks/routes/renderer.mjs +462 -0
  17. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  18. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  19. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  20. package/.output/server/chunks/virtual/precomputed.mjs +4 -0
  21. package/.output/server/chunks/virtual/precomputed.mjs.map +1 -0
  22. package/.output/server/index.mjs +18 -0
  23. package/.output/server/index.mjs.map +1 -0
  24. package/.output/server/node_modules/@babel/parser/lib/index.js +14657 -0
  25. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  26. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +64 -0
  27. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +16 -0
  28. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +32 -0
  29. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +246 -0
  30. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/package.json +1 -0
  31. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +41 -0
  32. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +429 -0
  33. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +971 -0
  34. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/requestBody.js +58 -0
  35. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js +13 -0
  36. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js +961 -0
  37. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +228 -0
  38. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +51 -0
  39. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js +57 -0
  40. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +1137 -0
  41. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +92 -0
  42. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js +239 -0
  43. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +2065 -0
  44. package/.output/server/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +87 -0
  45. package/.output/server/node_modules/@modelcontextprotocol/sdk/package.json +165 -0
  46. package/.output/server/node_modules/@parcel/watcher-wasm/index.mjs +349 -0
  47. package/.output/server/node_modules/@parcel/watcher-wasm/package.json +44 -0
  48. package/.output/server/node_modules/@parcel/watcher-wasm/watcher.wasm +0 -0
  49. package/.output/server/node_modules/@parcel/watcher-wasm/wrapper.js +88 -0
  50. package/.output/server/node_modules/@unagents/messenger-broker/dist/index.mjs +12 -0
  51. package/.output/server/node_modules/@unagents/messenger-broker/dist/shared/messenger-broker.B8W77sqB.mjs +1177 -0
  52. package/.output/server/node_modules/@unagents/messenger-broker/package.json +37 -0
  53. package/.output/server/node_modules/@unagents/messenger-client/dist/index.mjs +9 -0
  54. package/.output/server/node_modules/@unagents/messenger-client/dist/shared/messenger-client.CfQVmH_Z.mjs +975 -0
  55. package/.output/server/node_modules/@unagents/messenger-client/dist/shared/messenger-client.CoDKzubj.mjs +1000 -0
  56. package/.output/server/node_modules/@unagents/messenger-client/package.json +37 -0
  57. package/.output/server/node_modules/@unagents/messenger-protocol/dist/index.mjs +103 -0
  58. package/.output/server/node_modules/@unagents/messenger-protocol/package.json +29 -0
  59. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6802 -0
  60. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  61. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +729 -0
  62. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  63. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1420 -0
  64. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  65. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1933 -0
  66. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  67. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +7085 -0
  68. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  69. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1917 -0
  70. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  71. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +951 -0
  72. package/.output/server/node_modules/@vue/server-renderer/package.json +53 -0
  73. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +655 -0
  74. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  75. package/.output/server/node_modules/ajv/dist/ajv.js +50 -0
  76. package/.output/server/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  77. package/.output/server/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  78. package/.output/server/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  79. package/.output/server/node_modules/ajv/dist/compile/errors.js +123 -0
  80. package/.output/server/node_modules/ajv/dist/compile/index.js +242 -0
  81. package/.output/server/node_modules/ajv/dist/compile/names.js +28 -0
  82. package/.output/server/node_modules/ajv/dist/compile/ref_error.js +12 -0
  83. package/.output/server/node_modules/ajv/dist/compile/resolve.js +155 -0
  84. package/.output/server/node_modules/ajv/dist/compile/rules.js +26 -0
  85. package/.output/server/node_modules/ajv/dist/compile/util.js +178 -0
  86. package/.output/server/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  87. package/.output/server/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  88. package/.output/server/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  89. package/.output/server/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  90. package/.output/server/node_modules/ajv/dist/compile/validate/index.js +520 -0
  91. package/.output/server/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  92. package/.output/server/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  93. package/.output/server/node_modules/ajv/dist/core.js +618 -0
  94. package/.output/server/node_modules/ajv/dist/refs/data.json +13 -0
  95. package/.output/server/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  96. package/.output/server/node_modules/ajv/dist/runtime/equal.js +7 -0
  97. package/.output/server/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  98. package/.output/server/node_modules/ajv/dist/runtime/uri.js +6 -0
  99. package/.output/server/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  100. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  101. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  102. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  103. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  104. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  105. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  106. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  107. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  108. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  109. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  110. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  111. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  112. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  113. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  114. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  115. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  116. package/.output/server/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  117. package/.output/server/node_modules/ajv/dist/vocabularies/code.js +131 -0
  118. package/.output/server/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  119. package/.output/server/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  120. package/.output/server/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  121. package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  122. package/.output/server/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  123. package/.output/server/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  124. package/.output/server/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  125. package/.output/server/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  126. package/.output/server/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  127. package/.output/server/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  128. package/.output/server/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  129. package/.output/server/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  130. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  131. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  132. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  133. package/.output/server/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  134. package/.output/server/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  135. package/.output/server/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
  136. package/.output/server/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  137. package/.output/server/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  138. package/.output/server/node_modules/ajv/package.json +126 -0
  139. package/.output/server/node_modules/ajv-formats/dist/formats.js +208 -0
  140. package/.output/server/node_modules/ajv-formats/dist/index.js +37 -0
  141. package/.output/server/node_modules/ajv-formats/dist/limit.js +69 -0
  142. package/.output/server/node_modules/ajv-formats/package.json +74 -0
  143. package/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  144. package/.output/server/node_modules/consola/dist/core.mjs +512 -0
  145. package/.output/server/node_modules/consola/dist/index.mjs +651 -0
  146. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  147. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  148. package/.output/server/node_modules/consola/dist/utils.mjs +54 -0
  149. package/.output/server/node_modules/consola/package.json +136 -0
  150. package/.output/server/node_modules/content-type/index.js +225 -0
  151. package/.output/server/node_modules/content-type/package.json +42 -0
  152. package/.output/server/node_modules/cookie-es/dist/index.mjs +268 -0
  153. package/.output/server/node_modules/cookie-es/package.json +46 -0
  154. package/.output/server/node_modules/crossws/dist/_chunks/_request.mjs +83 -0
  155. package/.output/server/node_modules/crossws/dist/_chunks/adapter.mjs +234 -0
  156. package/.output/server/node_modules/crossws/dist/_chunks/error.mjs +7 -0
  157. package/.output/server/node_modules/crossws/dist/_chunks/libs/ws.mjs +6 -0
  158. package/.output/server/node_modules/crossws/dist/_chunks/node.mjs +220 -0
  159. package/.output/server/node_modules/crossws/dist/_chunks/peer.mjs +208 -0
  160. package/.output/server/node_modules/crossws/dist/adapters/node.mjs +1 -0
  161. package/.output/server/node_modules/crossws/package.json +115 -0
  162. package/.output/server/node_modules/defu/dist/defu.mjs +69 -0
  163. package/.output/server/node_modules/defu/package.json +48 -0
  164. package/.output/server/node_modules/destr/dist/index.mjs +72 -0
  165. package/.output/server/node_modules/destr/package.json +47 -0
  166. package/.output/server/node_modules/devalue/index.js +17 -0
  167. package/.output/server/node_modules/devalue/package.json +39 -0
  168. package/.output/server/node_modules/devalue/src/base64.js +60 -0
  169. package/.output/server/node_modules/devalue/src/constants.js +12 -0
  170. package/.output/server/node_modules/devalue/src/operations.js +221 -0
  171. package/.output/server/node_modules/devalue/src/parse.js +279 -0
  172. package/.output/server/node_modules/devalue/src/stringify.js +433 -0
  173. package/.output/server/node_modules/devalue/src/uneval.js +698 -0
  174. package/.output/server/node_modules/devalue/src/utils.js +190 -0
  175. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  176. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  177. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  178. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  179. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  180. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  181. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  182. package/.output/server/node_modules/entities/package.json +120 -0
  183. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  184. package/.output/server/node_modules/estree-walker/package.json +37 -0
  185. package/.output/server/node_modules/fast-deep-equal/index.js +46 -0
  186. package/.output/server/node_modules/fast-deep-equal/package.json +61 -0
  187. package/.output/server/node_modules/fast-uri/index.js +711 -0
  188. package/.output/server/node_modules/fast-uri/lib/schemes.js +272 -0
  189. package/.output/server/node_modules/fast-uri/lib/utils.js +799 -0
  190. package/.output/server/node_modules/fast-uri/package.json +68 -0
  191. package/.output/server/node_modules/get-port-please/dist/index.mjs +430 -0
  192. package/.output/server/node_modules/get-port-please/package.json +39 -0
  193. package/.output/server/node_modules/h3/dist/index.mjs +2498 -0
  194. package/.output/server/node_modules/h3/package.json +75 -0
  195. package/.output/server/node_modules/hookable/dist/index.mjs +257 -0
  196. package/.output/server/node_modules/hookable/package.json +54 -0
  197. package/.output/server/node_modules/http-shutdown/index.js +85 -0
  198. package/.output/server/node_modules/http-shutdown/package.json +32 -0
  199. package/.output/server/node_modules/iron-webcrypto/dist/index.js +298 -0
  200. package/.output/server/node_modules/iron-webcrypto/package.json +72 -0
  201. package/.output/server/node_modules/is-extglob/index.js +20 -0
  202. package/.output/server/node_modules/is-extglob/package.json +69 -0
  203. package/.output/server/node_modules/is-glob/index.js +150 -0
  204. package/.output/server/node_modules/is-glob/package.json +81 -0
  205. package/.output/server/node_modules/jiti/dist/jiti.cjs +1 -0
  206. package/.output/server/node_modules/jiti/lib/jiti.mjs +29 -0
  207. package/.output/server/node_modules/jiti/package.json +146 -0
  208. package/.output/server/node_modules/json-schema-traverse/index.js +93 -0
  209. package/.output/server/node_modules/json-schema-traverse/package.json +43 -0
  210. package/.output/server/node_modules/listhen/dist/chunks/xdg-open.mjs +1069 -0
  211. package/.output/server/node_modules/listhen/dist/index.mjs +19 -0
  212. package/.output/server/node_modules/listhen/dist/shared/listhen.tqe5I1Rl.mjs +1040 -0
  213. package/.output/server/node_modules/listhen/package.json +84 -0
  214. package/.output/server/node_modules/napi-wasm/index.mjs +1371 -0
  215. package/.output/server/node_modules/napi-wasm/package.json +33 -0
  216. package/.output/server/node_modules/node-forge/lib/aes.js +1091 -0
  217. package/.output/server/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
  218. package/.output/server/node_modules/node-forge/lib/asn1-validator.js +91 -0
  219. package/.output/server/node_modules/node-forge/lib/asn1.js +1522 -0
  220. package/.output/server/node_modules/node-forge/lib/baseN.js +186 -0
  221. package/.output/server/node_modules/node-forge/lib/cipher.js +230 -0
  222. package/.output/server/node_modules/node-forge/lib/cipherModes.js +1027 -0
  223. package/.output/server/node_modules/node-forge/lib/des.js +496 -0
  224. package/.output/server/node_modules/node-forge/lib/ed25519.js +1091 -0
  225. package/.output/server/node_modules/node-forge/lib/forge.js +13 -0
  226. package/.output/server/node_modules/node-forge/lib/hmac.js +146 -0
  227. package/.output/server/node_modules/node-forge/lib/index.js +33 -0
  228. package/.output/server/node_modules/node-forge/lib/jsbn.js +1294 -0
  229. package/.output/server/node_modules/node-forge/lib/kem.js +168 -0
  230. package/.output/server/node_modules/node-forge/lib/log.js +319 -0
  231. package/.output/server/node_modules/node-forge/lib/md.all.js +13 -0
  232. package/.output/server/node_modules/node-forge/lib/md.js +11 -0
  233. package/.output/server/node_modules/node-forge/lib/md5.js +289 -0
  234. package/.output/server/node_modules/node-forge/lib/mgf.js +12 -0
  235. package/.output/server/node_modules/node-forge/lib/mgf1.js +57 -0
  236. package/.output/server/node_modules/node-forge/lib/oids.js +180 -0
  237. package/.output/server/node_modules/node-forge/lib/pbe.js +1029 -0
  238. package/.output/server/node_modules/node-forge/lib/pbkdf2.js +211 -0
  239. package/.output/server/node_modules/node-forge/lib/pem.js +413 -0
  240. package/.output/server/node_modules/node-forge/lib/pkcs1.js +276 -0
  241. package/.output/server/node_modules/node-forge/lib/pkcs12.js +1081 -0
  242. package/.output/server/node_modules/node-forge/lib/pkcs7.js +1260 -0
  243. package/.output/server/node_modules/node-forge/lib/pkcs7asn1.js +410 -0
  244. package/.output/server/node_modules/node-forge/lib/pki.js +102 -0
  245. package/.output/server/node_modules/node-forge/lib/prime.js +297 -0
  246. package/.output/server/node_modules/node-forge/lib/prng.js +419 -0
  247. package/.output/server/node_modules/node-forge/lib/pss.js +241 -0
  248. package/.output/server/node_modules/node-forge/lib/random.js +191 -0
  249. package/.output/server/node_modules/node-forge/lib/rc2.js +410 -0
  250. package/.output/server/node_modules/node-forge/lib/rsa.js +2014 -0
  251. package/.output/server/node_modules/node-forge/lib/sha1.js +319 -0
  252. package/.output/server/node_modules/node-forge/lib/sha256.js +327 -0
  253. package/.output/server/node_modules/node-forge/lib/sha512.js +561 -0
  254. package/.output/server/node_modules/node-forge/lib/ssh.js +236 -0
  255. package/.output/server/node_modules/node-forge/lib/tls.js +4334 -0
  256. package/.output/server/node_modules/node-forge/lib/util.js +2652 -0
  257. package/.output/server/node_modules/node-forge/lib/x509.js +3257 -0
  258. package/.output/server/node_modules/node-forge/package.json +123 -0
  259. package/.output/server/node_modules/node-mock-http/dist/_polyfill/buffer/node.mjs +1 -0
  260. package/.output/server/node_modules/node-mock-http/dist/_polyfill/events/node.mjs +1 -0
  261. package/.output/server/node_modules/node-mock-http/dist/index.mjs +1 -0
  262. package/.output/server/node_modules/node-mock-http/package.json +63 -0
  263. package/.output/server/node_modules/nostics/dist/formatters/ansi.mjs +19 -0
  264. package/.output/server/node_modules/nostics/dist/index.mjs +194 -0
  265. package/.output/server/node_modules/nostics/package.json +126 -0
  266. package/.output/server/node_modules/pathe/dist/index.mjs +19 -0
  267. package/.output/server/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +249 -0
  268. package/.output/server/node_modules/pathe/package.json +61 -0
  269. package/.output/server/node_modules/picomatch/index.js +17 -0
  270. package/.output/server/node_modules/picomatch/lib/constants.js +184 -0
  271. package/.output/server/node_modules/picomatch/lib/parse.js +1425 -0
  272. package/.output/server/node_modules/picomatch/lib/picomatch.js +361 -0
  273. package/.output/server/node_modules/picomatch/lib/scan.js +403 -0
  274. package/.output/server/node_modules/picomatch/lib/utils.js +72 -0
  275. package/.output/server/node_modules/picomatch/package.json +83 -0
  276. package/.output/server/node_modules/radix3/dist/index.mjs +262 -0
  277. package/.output/server/node_modules/radix3/package.json +52 -0
  278. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  279. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  280. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  281. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  282. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  283. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +141 -0
  284. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
  285. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +446 -0
  286. package/.output/server/node_modules/source-map-js/lib/source-node.js +420 -0
  287. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  288. package/.output/server/node_modules/source-map-js/package.json +71 -0
  289. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  290. package/.output/server/node_modules/std-env/dist/index.mjs +1 -0
  291. package/.output/server/node_modules/std-env/package.json +43 -0
  292. package/.output/server/node_modules/tinyclip/dist/index.js +143 -0
  293. package/.output/server/node_modules/tinyclip/package.json +48 -0
  294. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  295. package/.output/server/node_modules/ufo/package.json +48 -0
  296. package/.output/server/node_modules/uncrypto/dist/crypto.node.mjs +16 -0
  297. package/.output/server/node_modules/uncrypto/package.json +60 -0
  298. package/.output/server/node_modules/unhead/dist/client.mjs +22 -0
  299. package/.output/server/node_modules/unhead/dist/legacy.mjs +33 -0
  300. package/.output/server/node_modules/unhead/dist/minify.mjs +183 -0
  301. package/.output/server/node_modules/unhead/dist/parser.mjs +518 -0
  302. package/.output/server/node_modules/unhead/dist/plugins.mjs +782 -0
  303. package/.output/server/node_modules/unhead/dist/server.mjs +99 -0
  304. package/.output/server/node_modules/unhead/dist/shared/unhead.BEmVMkeA.mjs +673 -0
  305. package/.output/server/node_modules/unhead/dist/shared/unhead.Bf_fPVYA.mjs +6 -0
  306. package/.output/server/node_modules/unhead/dist/shared/unhead.Bm4Y6XQI.mjs +17 -0
  307. package/.output/server/node_modules/unhead/dist/shared/unhead.C5Bksi2B.mjs +49 -0
  308. package/.output/server/node_modules/unhead/dist/shared/unhead.CGPOfp5O.mjs +32 -0
  309. package/.output/server/node_modules/unhead/dist/shared/unhead.CHEy9ana.mjs +7 -0
  310. package/.output/server/node_modules/unhead/dist/shared/unhead.C_7zwq8E.mjs +11 -0
  311. package/.output/server/node_modules/unhead/dist/shared/unhead.CaeaMM5q.mjs +19 -0
  312. package/.output/server/node_modules/unhead/dist/shared/unhead.D7HkBzZn.mjs +59 -0
  313. package/.output/server/node_modules/unhead/dist/shared/unhead.D9VfQWNo.mjs +240 -0
  314. package/.output/server/node_modules/unhead/dist/shared/unhead.DD4N5B4k.mjs +224 -0
  315. package/.output/server/node_modules/unhead/dist/shared/unhead.DGl9jcjg.mjs +196 -0
  316. package/.output/server/node_modules/unhead/dist/shared/unhead.DJuZwX9c.mjs +400 -0
  317. package/.output/server/node_modules/unhead/dist/shared/unhead.DkxnqlHC.mjs +264 -0
  318. package/.output/server/node_modules/unhead/dist/shared/unhead.DspMpm6y.mjs +48 -0
  319. package/.output/server/node_modules/unhead/dist/shared/unhead.o8j9utSy.mjs +208 -0
  320. package/.output/server/node_modules/unhead/dist/stream/client.mjs +33 -0
  321. package/.output/server/node_modules/unhead/dist/stream/iife.mjs +2 -0
  322. package/.output/server/node_modules/unhead/dist/stream/server.mjs +446 -0
  323. package/.output/server/node_modules/unhead/dist/utils.mjs +7 -0
  324. package/.output/server/node_modules/unhead/package.json +179 -0
  325. package/.output/server/node_modules/untun/dist/_chunks/cloudflared.mjs +179 -0
  326. package/.output/server/node_modules/untun/dist/_chunks/log.mjs +27 -0
  327. package/.output/server/node_modules/untun/dist/index.mjs +47 -0
  328. package/.output/server/node_modules/untun/package.json +44 -0
  329. package/.output/server/node_modules/uqr/dist/index.mjs +739 -0
  330. package/.output/server/node_modules/uqr/package.json +69 -0
  331. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  332. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  333. package/.output/server/node_modules/vue/index.js +7 -0
  334. package/.output/server/node_modules/vue/index.mjs +1 -0
  335. package/.output/server/node_modules/vue/package.json +112 -0
  336. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  337. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +687 -0
  338. package/.output/server/node_modules/vue-bundle-renderer/package.json +66 -0
  339. package/.output/server/node_modules/zod/index.js +7 -0
  340. package/.output/server/node_modules/zod/package.json +147 -0
  341. package/.output/server/node_modules/zod/v3/ZodError.js +143 -0
  342. package/.output/server/node_modules/zod/v3/errors.js +9 -0
  343. package/.output/server/node_modules/zod/v3/external.js +6 -0
  344. package/.output/server/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  345. package/.output/server/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  346. package/.output/server/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  347. package/.output/server/node_modules/zod/v3/helpers/util.js +133 -0
  348. package/.output/server/node_modules/zod/v3/index.js +4 -0
  349. package/.output/server/node_modules/zod/v3/locales/en.js +109 -0
  350. package/.output/server/node_modules/zod/v3/package.json +7 -0
  351. package/.output/server/node_modules/zod/v3/types.js +3697 -0
  352. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
  353. package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
  354. package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
  355. package/.output/server/node_modules/zod/v4/classic/deep-partial.js +13 -0
  356. package/.output/server/node_modules/zod/v4/classic/errors.js +57 -0
  357. package/.output/server/node_modules/zod/v4/classic/external.js +17 -0
  358. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +881 -0
  359. package/.output/server/node_modules/zod/v4/classic/in-out.js +36 -0
  360. package/.output/server/node_modules/zod/v4/classic/index.js +4 -0
  361. package/.output/server/node_modules/zod/v4/classic/iso.js +15 -0
  362. package/.output/server/node_modules/zod/v4/classic/package.json +7 -0
  363. package/.output/server/node_modules/zod/v4/classic/parse.js +16 -0
  364. package/.output/server/node_modules/zod/v4/classic/schemas.js +1535 -0
  365. package/.output/server/node_modules/zod/v4/core/api.js +1107 -0
  366. package/.output/server/node_modules/zod/v4/core/checks.js +516 -0
  367. package/.output/server/node_modules/zod/v4/core/compile.js +1866 -0
  368. package/.output/server/node_modules/zod/v4/core/core.js +141 -0
  369. package/.output/server/node_modules/zod/v4/core/doc.js +38 -0
  370. package/.output/server/node_modules/zod/v4/core/errors.js +267 -0
  371. package/.output/server/node_modules/zod/v4/core/index.js +19 -0
  372. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +99 -0
  373. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +843 -0
  374. package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
  375. package/.output/server/node_modules/zod/v4/core/memoizer.js +311 -0
  376. package/.output/server/node_modules/zod/v4/core/package.json +7 -0
  377. package/.output/server/node_modules/zod/v4/core/parse.js +175 -0
  378. package/.output/server/node_modules/zod/v4/core/regexes.js +156 -0
  379. package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
  380. package/.output/server/node_modules/zod/v4/core/schemas.js +2636 -0
  381. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +651 -0
  382. package/.output/server/node_modules/zod/v4/core/util.js +873 -0
  383. package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
  384. package/.output/server/node_modules/zod/v4/core/visit.js +169 -0
  385. package/.output/server/node_modules/zod/v4/index.js +4 -0
  386. package/.output/server/node_modules/zod/v4/locales/ar.js +111 -0
  387. package/.output/server/node_modules/zod/v4/locales/az.js +110 -0
  388. package/.output/server/node_modules/zod/v4/locales/be.js +168 -0
  389. package/.output/server/node_modules/zod/v4/locales/bg.js +125 -0
  390. package/.output/server/node_modules/zod/v4/locales/bn.js +113 -0
  391. package/.output/server/node_modules/zod/v4/locales/ca.js +112 -0
  392. package/.output/server/node_modules/zod/v4/locales/ckb.js +133 -0
  393. package/.output/server/node_modules/zod/v4/locales/cs.js +116 -0
  394. package/.output/server/node_modules/zod/v4/locales/da.js +120 -0
  395. package/.output/server/node_modules/zod/v4/locales/de.js +113 -0
  396. package/.output/server/node_modules/zod/v4/locales/el.js +112 -0
  397. package/.output/server/node_modules/zod/v4/locales/en.js +125 -0
  398. package/.output/server/node_modules/zod/v4/locales/eo.js +114 -0
  399. package/.output/server/node_modules/zod/v4/locales/es.js +136 -0
  400. package/.output/server/node_modules/zod/v4/locales/fa.js +119 -0
  401. package/.output/server/node_modules/zod/v4/locales/fi.js +117 -0
  402. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +112 -0
  403. package/.output/server/node_modules/zod/v4/locales/fr.js +129 -0
  404. package/.output/server/node_modules/zod/v4/locales/gu.js +113 -0
  405. package/.output/server/node_modules/zod/v4/locales/he.js +221 -0
  406. package/.output/server/node_modules/zod/v4/locales/hi.js +111 -0
  407. package/.output/server/node_modules/zod/v4/locales/hr.js +126 -0
  408. package/.output/server/node_modules/zod/v4/locales/hu.js +113 -0
  409. package/.output/server/node_modules/zod/v4/locales/hy.js +158 -0
  410. package/.output/server/node_modules/zod/v4/locales/id.js +111 -0
  411. package/.output/server/node_modules/zod/v4/locales/index.js +63 -0
  412. package/.output/server/node_modules/zod/v4/locales/is.js +114 -0
  413. package/.output/server/node_modules/zod/v4/locales/it.js +113 -0
  414. package/.output/server/node_modules/zod/v4/locales/ja.js +112 -0
  415. package/.output/server/node_modules/zod/v4/locales/ka.js +117 -0
  416. package/.output/server/node_modules/zod/v4/locales/kh.js +5 -0
  417. package/.output/server/node_modules/zod/v4/locales/km.js +115 -0
  418. package/.output/server/node_modules/zod/v4/locales/kn.js +116 -0
  419. package/.output/server/node_modules/zod/v4/locales/ko.js +116 -0
  420. package/.output/server/node_modules/zod/v4/locales/lt.js +207 -0
  421. package/.output/server/node_modules/zod/v4/locales/mk.js +114 -0
  422. package/.output/server/node_modules/zod/v4/locales/ms.js +112 -0
  423. package/.output/server/node_modules/zod/v4/locales/ne.js +111 -0
  424. package/.output/server/node_modules/zod/v4/locales/nl.js +115 -0
  425. package/.output/server/node_modules/zod/v4/locales/nn.js +113 -0
  426. package/.output/server/node_modules/zod/v4/locales/no.js +113 -0
  427. package/.output/server/node_modules/zod/v4/locales/ota.js +114 -0
  428. package/.output/server/node_modules/zod/v4/locales/package.json +7 -0
  429. package/.output/server/node_modules/zod/v4/locales/pl.js +114 -0
  430. package/.output/server/node_modules/zod/v4/locales/ps.js +119 -0
  431. package/.output/server/node_modules/zod/v4/locales/pt-BR.js +143 -0
  432. package/.output/server/node_modules/zod/v4/locales/pt.js +142 -0
  433. package/.output/server/node_modules/zod/v4/locales/ro.js +122 -0
  434. package/.output/server/node_modules/zod/v4/locales/ru.js +168 -0
  435. package/.output/server/node_modules/zod/v4/locales/sk.js +116 -0
  436. package/.output/server/node_modules/zod/v4/locales/sl.js +114 -0
  437. package/.output/server/node_modules/zod/v4/locales/sv.js +115 -0
  438. package/.output/server/node_modules/zod/v4/locales/ta.js +115 -0
  439. package/.output/server/node_modules/zod/v4/locales/tg.js +117 -0
  440. package/.output/server/node_modules/zod/v4/locales/th.js +115 -0
  441. package/.output/server/node_modules/zod/v4/locales/tk.js +107 -0
  442. package/.output/server/node_modules/zod/v4/locales/tr.js +110 -0
  443. package/.output/server/node_modules/zod/v4/locales/ua.js +5 -0
  444. package/.output/server/node_modules/zod/v4/locales/uk.js +113 -0
  445. package/.output/server/node_modules/zod/v4/locales/ur.js +115 -0
  446. package/.output/server/node_modules/zod/v4/locales/uz.js +113 -0
  447. package/.output/server/node_modules/zod/v4/locales/vi.js +113 -0
  448. package/.output/server/node_modules/zod/v4/locales/yo.js +112 -0
  449. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +114 -0
  450. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +112 -0
  451. package/.output/server/node_modules/zod/v4/mini/checks.js +1 -0
  452. package/.output/server/node_modules/zod/v4/mini/coerce.js +22 -0
  453. package/.output/server/node_modules/zod/v4/mini/deep-partial.js +13 -0
  454. package/.output/server/node_modules/zod/v4/mini/external.js +16 -0
  455. package/.output/server/node_modules/zod/v4/mini/in-out.js +36 -0
  456. package/.output/server/node_modules/zod/v4/mini/iso.js +34 -0
  457. package/.output/server/node_modules/zod/v4/mini/package.json +7 -0
  458. package/.output/server/node_modules/zod/v4/mini/parse.js +1 -0
  459. package/.output/server/node_modules/zod/v4/mini/schemas.js +1002 -0
  460. package/.output/server/node_modules/zod/v4/package.json +7 -0
  461. package/.output/server/node_modules/zod/v4-mini/index.js +3 -0
  462. package/.output/server/node_modules/zod/v4-mini/package.json +7 -0
  463. package/.output/server/node_modules/zod-to-json-schema/dist/esm/Options.js +46 -0
  464. package/.output/server/node_modules/zod-to-json-schema/dist/esm/Refs.js +22 -0
  465. package/.output/server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
  466. package/.output/server/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +8 -0
  467. package/.output/server/node_modules/zod-to-json-schema/dist/esm/index.js +40 -0
  468. package/.output/server/node_modules/zod-to-json-schema/dist/esm/package.json +1 -0
  469. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parseDef.js +62 -0
  470. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +1 -0
  471. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +17 -0
  472. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +26 -0
  473. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
  474. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +5 -0
  475. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +4 -0
  476. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +4 -0
  477. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +46 -0
  478. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +7 -0
  479. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +7 -0
  480. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +6 -0
  481. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +52 -0
  482. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +21 -0
  483. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +26 -0
  484. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  485. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +11 -0
  486. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +10 -0
  487. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +33 -0
  488. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
  489. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +72 -0
  490. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +21 -0
  491. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +20 -0
  492. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +4 -0
  493. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +4 -0
  494. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +61 -0
  495. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +20 -0
  496. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +352 -0
  497. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +32 -0
  498. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +6 -0
  499. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +80 -0
  500. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +4 -0
  501. package/.output/server/node_modules/zod-to-json-schema/dist/esm/selectParser.js +105 -0
  502. package/.output/server/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +87 -0
  503. package/.output/server/node_modules/zod-to-json-schema/package.json +85 -0
  504. package/.output/server/package.json +64 -0
  505. package/README.md +227 -24
  506. package/bin/bantou.mjs +33 -0
  507. package/package.json +18 -8
  508. package/protocol/PROTOCOL.md +26 -0
  509. package/protocol/protocol.json +92 -0
  510. package/dist/cap.js +0 -7
  511. package/dist/cli.js +0 -27
  512. package/dist/config.js +0 -23
  513. package/dist/daemon.js +0 -23
  514. package/dist/session.js +0 -7
  515. package/dist/workspace.js +0 -8
@@ -0,0 +1,264 @@
1
+ import { u as unpackMeta } from './unhead.o8j9utSy.mjs';
2
+ import { d as defineHeadPlugin } from './unhead.CHEy9ana.mjs';
3
+ import { h as hasContent, i as isUnsafeKey } from './unhead.CGPOfp5O.mjs';
4
+
5
+ const FlatMetaPlugin = /* @__PURE__ */ defineHeadPlugin({
6
+ key: "flatMeta",
7
+ hooks: {
8
+ "entries:normalize": (ctx) => {
9
+ let hasFlatMeta = false;
10
+ const tags = [];
11
+ const tagsToAdd = [];
12
+ for (const t of ctx.tags) {
13
+ if (t.tag !== "_flatMeta") {
14
+ tags.push(t);
15
+ continue;
16
+ }
17
+ hasFlatMeta = true;
18
+ for (const props of unpackMeta(t.props))
19
+ tagsToAdd.push({ ...t, tag: "meta", props });
20
+ }
21
+ if (!hasFlatMeta)
22
+ return;
23
+ for (const tag of tagsToAdd) tags.push(tag);
24
+ ctx.tags = tags;
25
+ }
26
+ }
27
+ });
28
+
29
+ const WhitelistAttributes = {
30
+ htmlAttrs: /* @__PURE__ */ new Set(["class", "style", "lang", "dir"]),
31
+ bodyAttrs: /* @__PURE__ */ new Set(["class", "style"]),
32
+ meta: /* @__PURE__ */ new Set(["name", "property", "charset", "content", "media"]),
33
+ noscript: /* @__PURE__ */ new Set([]),
34
+ style: /* @__PURE__ */ new Set(["media", "nonce", "title", "blocking"]),
35
+ script: /* @__PURE__ */ new Set(["type", "textContent", "nonce", "blocking"]),
36
+ link: /* @__PURE__ */ new Set(["color", "crossorigin", "fetchpriority", "href", "hreflang", "imagesrcset", "imagesizes", "integrity", "media", "referrerpolicy", "rel", "sizes", "type"])
37
+ };
38
+ const BlockedLinkRels = /* @__PURE__ */ new Set(["canonical", "modulepreload", "prerender", "preload", "prefetch", "dns-prefetch", "preconnect", "manifest", "pingback"]);
39
+ const SafeDataAttrName = /^[a-z][a-z0-9-]*[a-z0-9]$/i;
40
+ const AsciiWhitespace = /[\t\n\f\r ]+/;
41
+ const HtmlEntityHex = /&#x([0-9a-f]+);?/gi;
42
+ const HtmlEntityDec = /&#(\d+);?/g;
43
+ const HtmlEntityNamed = /&(tab|newline|colon|semi|lpar|rpar|sol|bsol|comma|period|excl|num|dollar|percnt|amp|apos|ast|plus|lt|gt|equals|quest|at|lsqb|rsqb|lcub|rcub|vert|hat|grave|tilde|nbsp);?/gi;
44
+ const ControlChars = /[\x00-\x20]+/g;
45
+ const NamedEntityMap = {
46
+ tab: " ",
47
+ newline: "\n",
48
+ colon: ":",
49
+ semi: ";",
50
+ lpar: "(",
51
+ rpar: ")",
52
+ sol: "/",
53
+ bsol: "\\",
54
+ comma: ",",
55
+ period: ".",
56
+ excl: "!",
57
+ num: "#",
58
+ dollar: "$",
59
+ percnt: "%",
60
+ amp: "&",
61
+ apos: "'",
62
+ ast: "*",
63
+ plus: "+",
64
+ lt: "<",
65
+ gt: ">",
66
+ equals: "=",
67
+ quest: "?",
68
+ at: "@",
69
+ lsqb: "[",
70
+ rsqb: "]",
71
+ lcub: "{",
72
+ rcub: "}",
73
+ vert: "|",
74
+ hat: "^",
75
+ grave: "`",
76
+ tilde: "~",
77
+ nbsp: "\xA0"
78
+ };
79
+ function safeFromCodePoint(codePoint) {
80
+ if (codePoint > 1114111 || codePoint < 0 || Number.isNaN(codePoint))
81
+ return "";
82
+ return String.fromCodePoint(codePoint);
83
+ }
84
+ function decodeHtmlEntities(str) {
85
+ return str.replace(HtmlEntityHex, (_, hex) => safeFromCodePoint(Number.parseInt(hex, 16))).replace(HtmlEntityDec, (_, dec) => safeFromCodePoint(Number(dec))).replace(HtmlEntityNamed, (_, name) => NamedEntityMap[name.toLowerCase()] || "");
86
+ }
87
+ function hasDangerousProtocol(url) {
88
+ const entityDecoded = decodeHtmlEntities(url);
89
+ const cleaned = entityDecoded.replace(ControlChars, "");
90
+ let decoded;
91
+ try {
92
+ decoded = decodeURIComponent(cleaned);
93
+ } catch {
94
+ decoded = cleaned;
95
+ }
96
+ const sanitized = decoded.replace(ControlChars, "");
97
+ const lower = sanitized.toLowerCase();
98
+ return lower.startsWith("javascript:") || lower.startsWith("data:") || lower.startsWith("vbscript:");
99
+ }
100
+ function stripProtoKeys(obj) {
101
+ if (Array.isArray(obj))
102
+ return obj.map(stripProtoKeys);
103
+ if (obj && typeof obj === "object") {
104
+ const clean = {};
105
+ for (const key of Object.keys(obj)) {
106
+ if (isUnsafeKey(key))
107
+ continue;
108
+ clean[key] = stripProtoKeys(obj[key]);
109
+ }
110
+ return clean;
111
+ }
112
+ return obj;
113
+ }
114
+ function acceptDataAttrs(value, allowId = true) {
115
+ const next = {};
116
+ if (!value)
117
+ return next;
118
+ const keys = Object.keys(value);
119
+ for (let i = 0; i < keys.length; i++) {
120
+ const key = keys[i];
121
+ const isData = key.startsWith("data-");
122
+ if ((isData || allowId && key === "id") && SafeDataAttrName.test(key))
123
+ next[key] = value[key];
124
+ }
125
+ return next;
126
+ }
127
+ function hasBlockedRel(rel) {
128
+ const tokens = rel.split(AsciiWhitespace);
129
+ return !tokens.some(Boolean) || tokens.some((token) => BlockedLinkRels.has(token.toLowerCase()));
130
+ }
131
+ function makeTagSafe(tag) {
132
+ let next = {};
133
+ const { tag: type, props: prev } = tag;
134
+ switch (type) {
135
+ // title: textContent is escaped in rendering (tagToString), no props needed
136
+ case "title":
137
+ break;
138
+ // virtual tags, not rendered to HTML — but sanitize to prevent injection if rendered
139
+ case "titleTemplate":
140
+ case "templateParams":
141
+ next = prev;
142
+ break;
143
+ case "htmlAttrs":
144
+ case "bodyAttrs":
145
+ WhitelistAttributes[type].forEach((attr) => {
146
+ if (prev[attr]) {
147
+ next[attr] = prev[attr];
148
+ }
149
+ });
150
+ delete tag.innerHTML;
151
+ delete tag.textContent;
152
+ tag.props = { ...acceptDataAttrs(prev, false), ...next };
153
+ return !Object.keys(tag.props).length ? false : tag;
154
+ case "style":
155
+ next = acceptDataAttrs(prev);
156
+ WhitelistAttributes.style.forEach((key) => {
157
+ if (prev[key]) {
158
+ next[key] = prev[key];
159
+ }
160
+ });
161
+ break;
162
+ // meta is safe, except for http-equiv
163
+ case "meta":
164
+ WhitelistAttributes.meta.forEach((key) => {
165
+ if (hasContent(prev[key])) {
166
+ next[key] = prev[key];
167
+ }
168
+ });
169
+ break;
170
+ // link tags we block preloading, prerendering, prefetching, dns-prefetch, preconnect, manifest, etc
171
+ case "link":
172
+ WhitelistAttributes.link.forEach((key) => {
173
+ const val = prev[key];
174
+ if (!val) {
175
+ return;
176
+ }
177
+ if (key === "rel" && (typeof val !== "string" || hasBlockedRel(val))) {
178
+ return;
179
+ }
180
+ if (key === "href" || key === "imagesrcset") {
181
+ if (typeof val !== "string") {
182
+ return;
183
+ }
184
+ const urls = key === "imagesrcset" ? val.split(",").map((s) => s.trim()) : [val];
185
+ if (urls.some((u) => hasDangerousProtocol(u))) {
186
+ return;
187
+ }
188
+ next[key] = val;
189
+ } else if (val) {
190
+ next[key] = val;
191
+ }
192
+ });
193
+ if (!next.href && !next.imagesrcset || !next.rel) {
194
+ return false;
195
+ }
196
+ break;
197
+ case "noscript":
198
+ WhitelistAttributes.noscript.forEach((key) => {
199
+ if (prev[key]) {
200
+ next[key] = prev[key];
201
+ }
202
+ });
203
+ break;
204
+ // we only allow JSON in scripts
205
+ case "script":
206
+ if (!tag.textContent || typeof prev.type !== "string" || !prev.type.endsWith("json")) {
207
+ return false;
208
+ }
209
+ try {
210
+ const jsonVal = typeof tag.textContent === "string" ? JSON.parse(tag.textContent) : tag.textContent;
211
+ tag.textContent = JSON.stringify(stripProtoKeys(jsonVal), null, 0);
212
+ } catch {
213
+ return false;
214
+ }
215
+ WhitelistAttributes.script.forEach((s) => {
216
+ if (s !== "textContent" && prev[s]) {
217
+ next[s] = prev[s];
218
+ }
219
+ });
220
+ break;
221
+ }
222
+ delete tag.innerHTML;
223
+ if (type !== "title" && type !== "script") {
224
+ delete tag.textContent;
225
+ }
226
+ tag.props = { ...acceptDataAttrs(prev), ...next };
227
+ if (!Object.keys(tag.props).length && !tag.tag.endsWith("Attrs") && !tag.textContent) {
228
+ return false;
229
+ }
230
+ return tag;
231
+ }
232
+ const SafeInputPlugin = /* @__PURE__ */ defineHeadPlugin({
233
+ key: "safe",
234
+ hooks: {
235
+ "entries:normalize": (ctx) => {
236
+ if (ctx.entry.options?._safe) {
237
+ ctx.tags = ctx.tags.reduce((acc, tag) => {
238
+ const safeTag = makeTagSafe(tag);
239
+ if (safeTag)
240
+ acc.push(safeTag);
241
+ return acc;
242
+ }, []);
243
+ }
244
+ },
245
+ "tags:afterResolve": (ctx) => {
246
+ ctx.tags = ctx.tags.reduce((acc, tag) => {
247
+ if (!tag._safe) {
248
+ acc.push(tag);
249
+ return acc;
250
+ }
251
+ if (tag.tag === "htmlAttrs" || tag.tag === "bodyAttrs") {
252
+ acc.push(tag);
253
+ return acc;
254
+ }
255
+ const safeTag = makeTagSafe(tag);
256
+ if (safeTag)
257
+ acc.push(safeTag);
258
+ return acc;
259
+ }, []);
260
+ }
261
+ }
262
+ });
263
+
264
+ export { FlatMetaPlugin as F, SafeInputPlugin as S };
@@ -0,0 +1,48 @@
1
+ const BACKSLASH_RE = /\\/g;
2
+ const LT_RE = /</g;
3
+ const DOUBLE_QUOTE_RE = /"/g;
4
+ const TOKEN_RE = /%\w+(?:\.\w+)?/g;
5
+ const SepSub = "%separator";
6
+ function sub(p, token, isJson = false) {
7
+ let val;
8
+ if (token === "s" || token === "pageTitle") {
9
+ val = p.pageTitle;
10
+ } else if (token.includes(".")) {
11
+ const dotIndex = token.indexOf(".");
12
+ val = p[token.substring(0, dotIndex)]?.[token.substring(dotIndex + 1)];
13
+ } else {
14
+ val = p[token];
15
+ }
16
+ if (val !== void 0) {
17
+ const str = typeof val === "number" ? String(val) : String(val || "");
18
+ return isJson ? str.replace(BACKSLASH_RE, "\\\\").replace(LT_RE, "\\u003C").replace(DOUBLE_QUOTE_RE, '\\"') : str;
19
+ }
20
+ return void 0;
21
+ }
22
+ function processTemplateParams(s, p, sep, isJson = false) {
23
+ if (typeof s !== "string" || !s.includes("%"))
24
+ return s;
25
+ let decoded = s;
26
+ try {
27
+ decoded = decodeURI(s);
28
+ } catch {
29
+ }
30
+ const tokens = decoded.match(TOKEN_RE);
31
+ if (!tokens) {
32
+ return s;
33
+ }
34
+ const hasSepSub = s.includes(SepSub);
35
+ s = s.replace(TOKEN_RE, (token) => {
36
+ if (token === SepSub || !tokens.includes(token)) {
37
+ return token;
38
+ }
39
+ const re = sub(p, token.slice(1), isJson);
40
+ return re !== void 0 ? re : token;
41
+ }).trim();
42
+ if (hasSepSub) {
43
+ s = s.split(SepSub).map((part) => part.trim()).filter((part) => part !== "").join(sep ? ` ${sep} ` : " ");
44
+ }
45
+ return s;
46
+ }
47
+
48
+ export { processTemplateParams as p };
@@ -0,0 +1,208 @@
1
+ import { M as MetaTagsArrayable } from './unhead.CGPOfp5O.mjs';
2
+
3
+ const META_NAMESPACES = ["twitter", "fediverse"];
4
+ const PROPERTY_NAMESPACES = ["og", "book", "article", "profile", "fb", "payment"];
5
+ const MEDIA_KEYS = ["ogImage", "ogVideo", "ogAudio", "twitterImage"];
6
+ const HTTP_EQUIV_KEYS = ["contentType", "defaultStyle", "xUaCompatible"];
7
+ const META_ALIASES = {
8
+ articleExpirationTime: "article:expiration_time",
9
+ articleModifiedTime: "article:modified_time",
10
+ articlePublishedTime: "article:published_time",
11
+ bookReleaseDate: "book:release_date",
12
+ fbAppId: "fb:app_id",
13
+ ogAudioSecureUrl: "og:audio:secure_url",
14
+ ogAudioUrl: "og:audio",
15
+ ogImageSecureUrl: "og:image:secure_url",
16
+ ogImageUrl: "og:image",
17
+ ogSiteName: "og:site_name",
18
+ ogVideoSecureUrl: "og:video:secure_url",
19
+ ogVideoUrl: "og:video",
20
+ paymentExpiresAt: "payment:expires_at",
21
+ paymentSuccessUrl: "payment:success_url",
22
+ profileFirstName: "profile:first_name",
23
+ profileLastName: "profile:last_name",
24
+ profileUsername: "profile:username",
25
+ msapplicationConfig: "msapplication-Config",
26
+ msapplicationTileColor: "msapplication-TileColor",
27
+ msapplicationTileImage: "msapplication-TileImage"
28
+ };
29
+ const CAPS_RE = /([A-Z])/g;
30
+ const OG_TWITTER_RE = /^(?:og|twitter)/;
31
+ const MetaPackingSchema = {
32
+ appleItunesApp: {
33
+ unpack: {
34
+ entrySeparator: ", ",
35
+ resolve: ({ key, value }) => `${fixKeyCase(key)}=${value}`
36
+ }
37
+ },
38
+ refresh: {
39
+ metaKey: "http-equiv",
40
+ unpack: {
41
+ entrySeparator: ";",
42
+ resolve: ({ key, value }) => key === "seconds" ? `${value}` : void 0
43
+ }
44
+ },
45
+ robots: {
46
+ unpack: {
47
+ entrySeparator: ", ",
48
+ resolve: ({ key, value }) => typeof value === "boolean" ? fixKeyCase(key) : `${fixKeyCase(key)}:${value}`
49
+ }
50
+ },
51
+ contentSecurityPolicy: {
52
+ metaKey: "http-equiv",
53
+ unpack: {
54
+ entrySeparator: "; ",
55
+ resolve: ({ key, value }) => `${fixKeyCase(key)} ${value}`
56
+ }
57
+ },
58
+ charset: {}
59
+ };
60
+ function fixKeyCase(key) {
61
+ const updated = key.replace(CAPS_RE, "-$1").toLowerCase();
62
+ const prefixIndex = updated.indexOf("-");
63
+ return prefixIndex === -1 ? updated : META_NAMESPACES.includes(updated.slice(0, prefixIndex)) || PROPERTY_NAMESPACES.includes(updated.slice(0, prefixIndex)) ? key.replace(CAPS_RE, ":$1").toLowerCase() : updated;
64
+ }
65
+ function sanitizeObject(input) {
66
+ return Object.fromEntries(Object.entries(input).filter(([k, v]) => String(v) !== "false" && k));
67
+ }
68
+ function normalizeRobotsDirectives(input) {
69
+ if (input.index !== false && input.follow !== false)
70
+ return input;
71
+ const value = { ...input };
72
+ if (value.index === false) {
73
+ delete value.index;
74
+ if (value.noindex === void 0)
75
+ value.noindex = true;
76
+ }
77
+ if (value.follow === false) {
78
+ delete value.follow;
79
+ if (value.nofollow === void 0)
80
+ value.nofollow = true;
81
+ }
82
+ return value;
83
+ }
84
+ function transformObject(obj) {
85
+ return Array.isArray(obj) ? obj.map(transformObject) : !obj || typeof obj !== "object" ? obj : Object.fromEntries(Object.entries(obj).map(([k, v]) => [fixKeyCase(k), transformObject(v)]));
86
+ }
87
+ function unpackToString(value, options = {}) {
88
+ const { entrySeparator = "", keyValueSeparator = "", wrapValue, resolve } = options;
89
+ return Object.entries(value).map(([key, val]) => {
90
+ if (resolve) {
91
+ const resolved = resolve({ key, value: val });
92
+ if (resolved !== void 0)
93
+ return resolved;
94
+ }
95
+ const processedVal = typeof val === "object" ? unpackToString(val, options) : typeof val === "number" ? val.toString() : typeof val === "string" && wrapValue ? `${wrapValue}${val.replace(new RegExp(wrapValue, "g"), `\\${wrapValue}`)}${wrapValue}` : val;
96
+ return `${key}${keyValueSeparator}${processedVal}`;
97
+ }).join(entrySeparator);
98
+ }
99
+ function handleObjectEntry(key, value) {
100
+ const sanitizedValue = sanitizeObject(value);
101
+ const fixedKey = fixKeyCase(key);
102
+ const attr = resolveMetaKeyType(fixedKey);
103
+ if (!MetaTagsArrayable.has(fixedKey)) {
104
+ return [{ [attr]: fixedKey, ...sanitizedValue }];
105
+ }
106
+ const input = Object.fromEntries(
107
+ Object.entries(sanitizedValue).map(([k, v]) => [`${key}${k === "url" ? "" : `${k[0].toUpperCase()}${k.slice(1)}`}`, v])
108
+ );
109
+ return unpackMeta(input || {}).sort((a, b) => (a[attr]?.length || 0) - (b[attr]?.length || 0));
110
+ }
111
+ function resolveMetaKeyType(key) {
112
+ if (MetaPackingSchema[key]?.metaKey === "http-equiv" || HTTP_EQUIV_KEYS.includes(key)) {
113
+ return "http-equiv";
114
+ }
115
+ const fixed = fixKeyCase(key);
116
+ const colonIndex = fixed.indexOf(":");
117
+ return colonIndex === -1 ? "name" : PROPERTY_NAMESPACES.includes(fixed.slice(0, colonIndex)) ? "property" : "name";
118
+ }
119
+ function resolveMetaKeyValue(key) {
120
+ return META_ALIASES[key] || fixKeyCase(key);
121
+ }
122
+ function resolvePackedMetaObjectValue(value, key) {
123
+ if (key === "refresh")
124
+ return `${value.seconds};url=${value.url}`;
125
+ return unpackToString(transformObject(value), {
126
+ keyValueSeparator: "=",
127
+ entrySeparator: ", ",
128
+ resolve: ({ value: value2, key: key2 }) => value2 === null ? "" : typeof value2 === "boolean" ? key2 : void 0,
129
+ ...MetaPackingSchema[key]?.unpack
130
+ });
131
+ }
132
+ function unpackMeta(input) {
133
+ const extras = [];
134
+ const primitives = {};
135
+ for (const [key, value] of Object.entries(input)) {
136
+ if (Array.isArray(value)) {
137
+ if (key === "themeColor") {
138
+ value.forEach((v) => {
139
+ if (typeof v === "object" && v !== null) {
140
+ extras.push({ name: "theme-color", ...v });
141
+ }
142
+ });
143
+ continue;
144
+ }
145
+ for (const v of value) {
146
+ if (typeof v === "object" && v !== null) {
147
+ const urlProps = [];
148
+ const otherProps = [];
149
+ for (const [propKey, propValue] of Object.entries(v)) {
150
+ const metaKey = `${key}${propKey === "url" ? "" : `:${propKey}`}`;
151
+ const meta2 = unpackMeta({ [metaKey]: propValue });
152
+ (propKey === "url" ? urlProps : otherProps).push(...meta2);
153
+ }
154
+ extras.push(...urlProps, ...otherProps);
155
+ } else {
156
+ extras.push(...typeof v === "string" ? unpackMeta({ [key]: v }) : handleObjectEntry(key, v));
157
+ }
158
+ }
159
+ continue;
160
+ }
161
+ if (typeof value === "object" && value) {
162
+ if (MEDIA_KEYS.includes(key)) {
163
+ const prefix = key.startsWith("twitter") ? "twitter" : "og";
164
+ const type = key.replace(OG_TWITTER_RE, "").toLowerCase();
165
+ const metaKey = prefix === "twitter" ? "name" : "property";
166
+ if (value.url) {
167
+ extras.push({
168
+ [metaKey]: `${prefix}:${type}`,
169
+ content: value.url
170
+ });
171
+ }
172
+ if (value.secureUrl) {
173
+ extras.push({
174
+ [metaKey]: `${prefix}:${type}:secure_url`,
175
+ content: value.secureUrl
176
+ });
177
+ }
178
+ for (const [propKey, propValue] of Object.entries(value)) {
179
+ if (propKey !== "url" && propKey !== "secureUrl") {
180
+ extras.push({
181
+ [metaKey]: `${prefix}:${type}:${propKey}`,
182
+ content: propValue
183
+ });
184
+ }
185
+ }
186
+ } else if (MetaTagsArrayable.has(fixKeyCase(key))) {
187
+ extras.push(...handleObjectEntry(key, value));
188
+ } else {
189
+ primitives[key] = sanitizeObject(key === "robots" ? normalizeRobotsDirectives(value) : value);
190
+ }
191
+ } else {
192
+ primitives[key] = value;
193
+ }
194
+ }
195
+ const meta = Object.entries(primitives).map(([key, value]) => {
196
+ if (key === "charset")
197
+ return { charset: value === null ? "_null" : value };
198
+ const metaKey = resolveMetaKeyType(key);
199
+ const keyValue = resolveMetaKeyValue(key);
200
+ const processedValue = value === null ? "_null" : typeof value === "object" ? resolvePackedMetaObjectValue(value, key) : typeof value === "number" ? value.toString() : value;
201
+ return metaKey === "http-equiv" ? { "http-equiv": keyValue, "content": processedValue } : { [metaKey]: keyValue, content: processedValue };
202
+ });
203
+ return [...extras, ...meta].map(
204
+ (m) => !("content" in m) ? m : m.content === "_null" ? { ...m, content: null } : m
205
+ );
206
+ }
207
+
208
+ export { resolveMetaKeyValue as a, resolvePackedMetaObjectValue as b, resolveMetaKeyType as r, unpackMeta as u };
@@ -0,0 +1,33 @@
1
+ import { c as createClientHeadAdapter } from '../shared/unhead.C5Bksi2B.mjs';
2
+ import { c as createHooks } from '../shared/unhead.Bm4Y6XQI.mjs';
3
+ import '../shared/unhead.D7HkBzZn.mjs';
4
+ import 'hookable';
5
+
6
+ const DEFAULT_STREAM_KEY = "__unhead__";
7
+ function createStreamableHead(options = {}) {
8
+ const { streamKey = DEFAULT_STREAM_KEY, ...rest } = options;
9
+ const win = typeof window !== "undefined" ? window : void 0;
10
+ const streamQueue = win?.[streamKey];
11
+ const core = streamQueue?._head;
12
+ if (!core)
13
+ return void 0;
14
+ if (core._wrapped) {
15
+ const wrapped = core;
16
+ for (const name in rest.hooks || {})
17
+ wrapped.hooks?.hook(name, rest.hooks[name]);
18
+ (rest.plugins || []).forEach((p) => wrapped.use(p));
19
+ rest.init?.forEach((e) => e && wrapped.push(e));
20
+ return wrapped;
21
+ }
22
+ const coreRender = core.render;
23
+ const hooks = createHooks(rest.hooks);
24
+ const head = createClientHeadAdapter(core, hooks, () => coreRender());
25
+ head._wrapped = true;
26
+ (rest.plugins || []).forEach((p) => head.use(p));
27
+ rest.init?.forEach((e) => e && head.push(e));
28
+ if (streamQueue)
29
+ streamQueue._head = head;
30
+ return head;
31
+ }
32
+
33
+ export { DEFAULT_STREAM_KEY, createStreamableHead };
@@ -0,0 +1,2 @@
1
+ export const streamingIifeCode = "var __unhead_iife__ = (function (exports) { 'use strict'; const DupeableTags = new Set([\"link\", \"style\", \"script\", \"noscript\"]); const TagsWithInnerContent = new Set([\"title\", \"titleTemplate\", \"script\", \"style\", \"noscript\"]); const HasElementTags = new Set([\"base\", \"meta\", \"link\", \"style\", \"script\", \"noscript\"]); const ValidHeadTags = new Set([\"title\", \"base\", \"htmlAttrs\", \"bodyAttrs\", \"meta\", \"link\", \"style\", \"script\", \"noscript\"]); const UniqueTags = new Set([\"base\", \"title\", \"titleTemplate\", \"bodyAttrs\", \"htmlAttrs\", \"templateParams\"]); const TagConfigKeys = new Set([\"key\", \"tagPosition\", \"tagPriority\", \"tagDuplicateStrategy\", \"innerHTML\", \"textContent\", \"\u0070rocessTemplateParams\"]); const UsesMergeStrategy = new Set([\"templateParams\", \"htmlAttrs\", \"bodyAttrs\"]); const MetaTagsArrayable = new Set([ \"theme-color\", \"google-site-verification\", \"author\", \"og:locale:alternate\", \"og:image\", \"og:video\", \"og:audio\", \"article:author\", \"article:tag\", \"book:author\", \"book:tag\", \"twitter:image\" ]); const hasContent = (value) => typeof value === \"number\" ? Number.isFinite(value) : value; function isUnsafeKey(key) { return key === \"__proto__\" || key === \"constructor\" || key === \"prototype\"; } function callHook(head, hook, ctx) { const hooks = head.hooks?._hooks?.[hook]; if (!hooks?.length) return; return head.hooks?.callHook(hook, ctx); } const META_NOREWRITE_RE = /^(?:viewport|description|keywords|robots)$/; const META_KEY_ATTRS = [\"name\", \"property\", \"http-equiv\"]; function isMetaArrayDupeKey(v) { const i = v.indexOf(\":\"); if (i === -1) return false; const key = v.slice(i + 1); return MetaTagsArrayable.has(key) || key.startsWith(\"og:image:\") || key.startsWith(\"og:video:\") || key.startsWith(\"og:audio:\") || key.startsWith(\"twitter:image:\"); } function dedupeKey(tag) { const { props, tag: t, key } = tag; if (UniqueTags.has(t)) return t; if (t === \"link\") { if (props.rel === \"canonical\") return \"canonical\"; if (props.rel === \"alternate\" && props.hreflang) return `alternate:${props.hreflang}`; } if (props.charset) return \"charset\"; if (t === \"meta\") { for (const n of META_KEY_ATTRS) { const v = props[n]; if (v !== void 0) return `meta:${v}${(typeof v !== \"string\" || !v.includes(\":\")) && !META_NOREWRITE_RE.test(v) && key ? `:key:${key}` : \"\"}`; } } if (key) return `${t}:key:${key}`; if (props.id) return `${t}:id:${props.id}`; if (t === \"link\" && props.rel && props.href) return `link:${props.rel}:${props.href}`; return TagsWithInnerContent.has(t) && (tag.textContent || tag.innerHTML) ? `${t}:content:${tag.textContent || tag.innerHTML}` : void 0; } function hashTag(tag) { const identity = tag._h || tag._d || tag.textContent || tag.innerHTML; if (identity) return String(identity); const keys = Object.keys(tag.props).sort(); let hash = `${tag.tag}:`; let separator = \"\"; for (const key of keys) { hash += `${separator}${key}:${String(tag.props[key])}`; separator = \",\"; } return hash; } function walkResolver(val, resolve, key) { if (key === \"_resolver\") return val; if (typeof val === \"function\" && (!key || key !== \"titleTemplate\" && !key.startsWith(\"on\"))) val = val(); const v = resolve ? resolve(key, val) : val; if (Array.isArray(v)) { let out; for (let i = 0; i < v.length; i++) { const r = walkResolver(v[i], resolve); if (out) { out[i] = r; } else if (r !== v[i]) { out = v.slice(0, i); out[i] = r; } } return out || v; } if (v?.constructor === Object) { let next; for (const k in v) { const unsafe = isUnsafeKey(k); const r = unsafe ? void 0 : walkResolver(v[k], resolve, k); if (!next && (unsafe || r !== v[k])) { next = {}; for (const pk in v) { if (pk === k) break; next[pk] = v[pk]; } } if (next && !unsafe) next[k] = r; } return next || v; } return v; } const INVALID_ATTR_NAME_RE = /[\\s\"'<>/=\\x00-\\x1F\\x7F]/; function normalizeStyleClassProps(key, value) { const isStyle = key === \"style\"; const store = isStyle ? new Map() : new Set(); const add = (v) => { if (!v) return; if (isStyle) { const i = v.indexOf(\":\"); i > 0 && store.set(v.slice(0, i).trim(), v.slice(i + 1).trim()); } else { v.split(\" \").forEach((c) => c && store.add(c)); } }; if (typeof value === \"string\") { (isStyle ? value.split(\";\") : [value]).forEach(add); } else if (Array.isArray(value)) { value.forEach(add); } else if (value && typeof value === \"object\") { for (const k in value) { const v = value[k]; v && v !== \"false\" && (isStyle ? store.set(k.trim(), String(v)) : add(k)); } } return store; } function normalizeProps(tag, input) { tag.props = tag.props || {}; if (!input) return tag; if (tag.tag === \"templateParams\") { tag.props = input; return tag; } const isHtmlTag = HasElementTags.has(tag.tag) || tag.tag === \"htmlAttrs\" || tag.tag === \"bodyAttrs\"; for (const prop in input) { if (isUnsafeKey(prop)) continue; const isData = prop.startsWith(\"data-\"); const isHtmlAttr = isHtmlTag && !TagConfigKeys.has(prop); const key = isHtmlAttr && !isData ? prop.toLowerCase() : prop; if (isHtmlAttr && (!key || INVALID_ATTR_NAME_RE.test(key))) continue; const value = input[prop]; if (value === null) { tag.props[key] = null; } else if (prop === \"class\" || prop === \"style\") { tag.props[prop] = normalizeStyleClassProps(prop, value); } else if (TagConfigKeys.has(prop)) { if ((prop === \"textContent\" || prop === \"innerHTML\") && typeof value === \"object\") { const type = input.type || \"application/json\"; if (type.endsWith(\"json\") || type === \"speculationrules\" || type === \"importmap\") { tag.props.type = type; tag[prop] = JSON.stringify(value); } } else { tag[prop] = value; } } else if (value !== void 0) { const str = String(value); const isMeta = tag.tag === \"meta\" && key === \"content\"; tag.props[key] = str === \"true\" || str === \"\" ? isData || isMeta ? str : true : !value && isData && str === \"false\" ? \"false\" : value; } } return tag; } function resolveHeadInput(input, propResolvers) { let resolve; if (propResolvers.length) { resolve = (key, val) => { for (let i = 0; i < propResolvers.length; i++) val = propResolvers[i](key, val); return val; }; input = resolve(void 0, input); } return walkResolver(input, resolve); } function normalizeTag(tagName, _input) { const input = typeof _input === \"object\" && typeof _input !== \"function\" ? _input : { [tagName === \"script\" || tagName === \"noscript\" || tagName === \"style\" ? \"innerHTML\" : \"textContent\"]: _input }; const tag = normalizeProps({ tag: tagName, props: {} }, input); if (tag.key && DupeableTags.has(tag.tag)) tag.props[\"data-hid\"] = tag._h = tag.key; if (tag.tag === \"script\" && typeof tag.innerHTML === \"object\") { tag.innerHTML = JSON.stringify(tag.innerHTML); tag.props.type = tag.props.type || \"application/json\"; } if (Array.isArray(tag.props.content)) { const tags = []; for (const content of tag.props.content) { tags.push({ ...tag, props: { ...tag.props, content } }); } return tags; } return tag; } function pushNormalizedTag(tags, tag) { if (Array.isArray(tag)) { for (const t of tag) tags.push(t); } else { tags.push(tag); } } function normalizeEntryToTags(input, propResolvers) { if (!input) return []; if (typeof input === \"function\") input = input(); input = resolveHeadInput(input, propResolvers); const tags = []; for (const key in input) { const value = input[key]; if (value !== void 0) { if (Array.isArray(value)) { for (const v of value) pushNormalizedTag(tags, normalizeTag(key, v)); } else { pushNormalizedTag(tags, normalizeTag(key, value)); } } } return tags; } const LT_RE = /</g; const SCRIPT_END_RE = /<\\/script/g; const sortTags = (a, b) => a._w === b._w ? a._p - b._p : a._w - b._w; const DEFAULT_TAG_WEIGHT = () => 100; function isEmptyProps(props) { for (const _ in props) return false; return true; } const TAG_MUTATING_HOOK_RE = /^tags:|:render/; function syncEntryHookCache(head, hooks) { const count = (hooks[\"entries:resolve\"]?.length || 0) + (hooks[\"entries:normalize\"]?.length || 0); if (head._h !== count) { head._h = count; for (const entry of head.entries.values()) delete entry._tags; } } function cloneTagsInPlace(tags) { for (let i = 0; i < tags.length; i++) { const t = tags[i]; const props = { ...t.props }; if (props.class instanceof Set) props.class = new Set(props.class); if (props.style instanceof Map) props.style = new Map(props.style); tags[i] = { ...t, props }; } } function valuesToTags(ctx, sortFlatMeta) { const tags = ctx.tags; let w = 0; for (const value of ctx.tagMap.values()) { if (Array.isArray(value)) { for (const tag of value) tags[w++] = tag; } else { tags[w++] = value; } } tags.length = w; if (sortFlatMeta) tags.sort(sortTags); } function dedupeTags(ctx) { let hasFlatMeta = false; for (const next of ctx.tags.sort(sortTags)) { const k = next._d || hashTag(next); if (!k) continue; const prev = ctx.tagMap.get(k); if (!prev) { ctx.tagMap.set(k, next); continue; } const strategy = next.tagDuplicateStrategy || (UsesMergeStrategy.has(next.tag) ? \"merge\" : null) || (next.key && next.key === prev.key ? \"merge\" : null); if (strategy === \"merge\") { const props = { ...prev.props }; for (const p in next.props) { props[p] = p === \"style\" ? new Map([...prev.props.style || new Map(), ...next.props[p]]) : p === \"class\" ? new Set([...prev.props.class || [], ...next.props[p]]) : next.props[p]; } ctx.tagMap.set(k, { ...next, props }); } else if (next._p >> 10 === prev._p >> 10 && next.tag === \"meta\" && isMetaArrayDupeKey(k)) { ctx.tagMap.set(k, Object.assign([...Array.isArray(prev) ? prev : [prev], next], next)); hasFlatMeta = true; } else if (next._w === prev._w ? next._p > prev._p : next._w < prev._w) { ctx.tagMap.set(k, next); } } return hasFlatMeta; } function resolveTitleTemplate(ctx, head) { const title = ctx.tagMap.get(\"title\"); const tpl = ctx.tagMap.get(\"titleTemplate\"); head._title = title?.textContent; if (!tpl) return; const fn = tpl.textContent; head._titleTemplate = fn; if (!fn) return; let v = typeof fn === \"function\" ? fn(title?.textContent) : fn; if (typeof v === \"string\" && !head.plugins.has(\"template-params\")) v = v.replace(\"%s\", title?.textContent || \"\"); if (title) { v === null ? ctx.tagMap.delete(\"title\") : ctx.tagMap.set(\"title\", { ...title, textContent: v }); } else { ctx.tagMap.set(\"titleTemplate\", { ...tpl, tag: \"title\", textContent: v }); } } function sanitizeTagsInPlace(tags) { let w = 0; for (let t of tags) { const { innerHTML, tag, props } = t; if (!ValidHeadTags.has(tag) || isEmptyProps(props) && !hasContent(innerHTML) && !hasContent(t.textContent)) continue; if (tag === \"meta\") { if (!hasContent(props.content) && !props[\"http-equiv\"] && !props.charset) continue; } if (tag === \"script\" && (innerHTML || t.textContent)) { const type = String(props.type); const isJsonLike = type.endsWith(\"json\") || type === \"importmap\" || type === \"speculationrules\"; const escape = (content) => isJsonLike ? (typeof content === \"string\" ? content : JSON.stringify(content)).replace(LT_RE, \"\\\\u003C\") : typeof content === \"string\" ? content.replace(SCRIPT_END_RE, \"<\\\\/script\") : content; t = { ...t }; if (innerHTML) t.innerHTML = escape(innerHTML); if (t.textContent) t.textContent = escape(t.textContent); t._d = dedupeKey(t); } tags[w++] = t; } tags.length = w; return tags; } function resolveTags(head, options) { const weightFn = options?.tagWeight ?? head.resolvedOptions._tagWeight ?? DEFAULT_TAG_WEIGHT; const ctx = { tagMap: new Map(), tags: [] }; const hooks = head.hooks?._hooks || {}; syncEntryHookCache(head, hooks); for (const e of head.entries.values()) { if (e._pending !== void 0) { e.input = e._pending; delete e._pending; delete e._tags; delete e._precomputedTags; } } let entries; if (hooks[\"entries:resolve\"]?.length || hooks[\"entries:normalize\"]?.length) { entries = [...head.entries.values()]; if (hooks[\"entries:resolve\"]?.length) callHook(head, \"entries:resolve\", { entries, ...ctx }); } syncEntryHookCache(head, hooks); for (const e of entries || head.entries.values()) { let tags = e._tags; if (!tags) { if (e._precomputedTags && weightFn === head.resolvedOptions._tagWeight && !hooks[\"entries:normalize\"]?.length && !hooks[\"entries:resolve\"]?.length && (!e.options || isEmptyProps(e.options))) { tags = e._precomputedTags; } else { tags = normalizeEntryToTags(e.input, head.resolvedOptions.propResolvers || []); if (e.options && !isEmptyProps(e.options)) { for (const t of tags) Object.assign(t, e.options); } if (hooks[\"entries:normalize\"]?.length) { const normalizeCtx = { tags, entry: e }; callHook(head, \"entries:normalize\", normalizeCtx); tags = normalizeCtx.tags; } for (let i = 0; i < tags.length; i++) { const t = tags[i]; t._w = weightFn(t); t._p = (e._i << 10) + i; t._d = dedupeKey(t); if (!t._d) t._h = hashTag(t); } e._tags = tags; } } ctx.tags.push(...tags); } for (const name in hooks) { if (hooks[name]?.length && TAG_MUTATING_HOOK_RE.test(name)) { cloneTagsInPlace(ctx.tags); break; } } const hasFlatMeta = dedupeTags(ctx); resolveTitleTemplate(ctx, head); valuesToTags(ctx, hasFlatMeta); callHook(head, \"tags:beforeResolve\", ctx); callHook(head, \"tags:resolve\", ctx); callHook(head, \"tags:afterResolve\", ctx); return sanitizeTagsInPlace(ctx.tags); } const WHITESPACE_RE = /\\s+/; function createDomRenderer(options = {}) { return (head) => _renderDOMHead(head, options); } function hasPendingEntries(head) { for (const entry of head.entries.values()) { if (entry._pending !== void 0) return true; } return false; } function createDomState(head, dom) { const state = { _d: dom, _t: dom.title, _e: new Map([[\"htmlAttrs\", dom.documentElement], [\"bodyAttrs\", dom.body]]), _p: {}, _s: {}, _l: new Map() }; for (const entry of head.entries.values()) { if (entry._o !== void 0) { const orig = entry._o; for (const t of [\"bodyAttrs\", \"htmlAttrs\"]) { const cls = orig[t]?.class; if (typeof cls === \"string\") { const $el = state._e.get(t); for (const c of cls.split(WHITESPACE_RE)) { if (c) state._p[`${t}:attr:class:${c}`] = () => $el.classList.remove(c); } } } } } return state; } function _renderDOMHead(head, options = {}) { const dom = options.document || head.resolvedOptions.document; const activeState = head._dom; if (!dom || head._du || activeState && activeState._d === dom && !head.dirty && !hasPendingEntries(head)) return false; const defaultView = dom.defaultView; head._du = true; let didRender = false; try { let track = function(key, fn, fresh) { renderState._s[key] = !fresh && previous[key] || fn; delete previous[key]; }, trackEvent = function(id, k, ev, source, $el, target) { const key = `${id}:event:${k}`; const prev = renderState._l.get(key); if (prev && prev[0] === target && prev[1] === ev && prev[2] === source) { track(key, prev[4]); return; } prev?.[4](); const dk = `data-${k}`; const handler = ((e) => source.call($el, e)); const cleanup = () => { target.removeEventListener(ev, handler); if ($el.getAttribute(dk) === \"\") $el.removeAttribute(dk); if (renderState._l.get(key)?.[3] === handler) renderState._l.delete(key); }; target.addEventListener(ev, handler); renderState._l.set(key, [target, ev, source, handler, cleanup]); $el.setAttribute(dk, \"\"); track(key, cleanup, true); }, trackCtx = function({ id, $el, tag }) { renderState._e.set(id, $el); if (!tag.tag.endsWith(\"Attrs\")) { const text = tag.textContent; if (text != null && text !== \"\") { if (text !== $el.textContent) $el.textContent = text; track(`${id}:text`, () => { if ($el.textContent === text) $el.textContent = \"\"; }, true); } const html = tag.innerHTML; if (html != null && html !== \"\") { if (html !== $el.innerHTML) $el.innerHTML = html; track(`${id}:html`, () => { if ($el.innerHTML === html) $el.innerHTML = \"\"; }, true); } const elKey = `${id}:el`; track(elKey, previous[elKey] || (() => { $el?.remove(); renderState._e.delete(id); })); } for (const k in tag.props) { const v = tag.props[k]; if (k[0] === \"o\" && k[1] === \"n\" && typeof v === \"function\") { const ev = k.slice(2); if ($el?.dataset?.[`${k}fired`]) v.call($el, new (defaultView?.Event || Event)(ev)); trackEvent(id, k, ev, v, $el, tag.tag === \"bodyAttrs\" && defaultView ? defaultView : $el); continue; } const ck = `${id}:attr:${k}`; if (k === \"class\" && v) { for (const c of v) { const key = `${ck}:${c}`; track(key, previous[key] || (() => $el.classList.remove(c))); if (!$el.classList.contains(c)) $el.classList.add(c); } } else if (k === \"style\" && v) { for (const [sk, sv] of v) { const key = `${ck}:${sk}`; track(key, previous[key] || (() => $el.style.removeProperty(sk))); $el.style.setProperty(sk, sv); } } else if (v !== false && v !== null) { if ($el.getAttribute(k) !== v) $el.setAttribute(k, v === true ? \"\" : String(v)); track(ck, previous[ck] || (() => $el.removeAttribute(k))); } } }; const beforeRenderCtx = { shouldRender: true, tags: [] }; callHook(head, \"dom:beforeRender\", beforeRenderCtx); if (!beforeRenderCtx.shouldRender) return false; let state = activeState; if (state?._d !== dom) { if (state) { for (const k in state._s) state._s[k](); for (const k in state._p) state._p[k](); state._s = state._p = {}; state._e.clear(); state._l.clear(); } state = void 0; } if (!state) { state = createDomState(head, dom); } else { state._p = state._s; } state._s = {}; const renderState = state; const previous = renderState._p; const pending = []; const frag = {}; head.dirty = false; const rawTags = resolveTags(head, options.tagWeight ? { tagWeight: options.tagWeight } : void 0); const tags = []; const dupeKeyCounter = {}; for (const tag of rawTags) { const count = dupeKeyCounter[tag._d] || 0; const id = (count ? `${tag._d}:${count}` : tag._d) || tag._h; const ctx = { tag, id, shouldRender: true }; if (tag.tag === \"meta\" && tag._d && isMetaArrayDupeKey(tag._d)) dupeKeyCounter[tag._d] = count + 1; tags.push(ctx); if (tag.tag === \"title\") { dom.title = tag.textContent; track(\"title:\", () => dom.title = renderState._t); continue; } ctx.$el = renderState._e.get(id); if (ctx.$el) trackCtx(ctx); else if (HasElementTags.has(tag.tag)) pending.push(ctx); } if (pending.length) { const tracked = new Set(renderState._e.values()); for (const el of [...dom.body.children, ...dom.head.children]) { const elTag = el.tagName.toLowerCase(); if (!HasElementTags.has(elTag) || tracked.has(el)) continue; const props = { innerHTML: el.innerHTML }; for (const n of el.getAttributeNames()) props[n] = el.getAttribute(n); const next = normalizeProps({ tag: elTag, props: {} }, props); next.key = el.getAttribute(\"data-hid\") || void 0; const dedupe = dedupeKey(next) || hashTag(next); let k = dedupe; let c = 1; while (renderState._e.has(k)) k = `${dedupe}:${c++}`; renderState._e.set(k, el); } } for (const ctx of pending) { const found = renderState._e.get(ctx.id); ctx.$el = found || dom.createElement(ctx.tag.tag); trackCtx(ctx); if (!found) (frag[ctx.tag.tagPosition || \"head\"] ??= dom.createDocumentFragment()).appendChild(ctx.$el); } if (frag.head) dom.head.appendChild(frag.head); if (frag.bodyOpen) dom.body.insertBefore(frag.bodyOpen, dom.body.firstChild); if (frag.bodyClose) dom.body.appendChild(frag.bodyClose); for (const k in previous) previous[k](); head._dom = renderState; didRender = true; callHook(head, \"dom:rendered\", { renders: tags }); } catch (e) { head.dirty = true; throw e; } finally { head._du = false; } if (didRender && (head.dirty || hasPendingEntries(head))) _renderDOMHead(head, options); return didRender; } function registerPlugin(head, p) { if (typeof p === \"function\" && p.key && head.plugins.has(p.key)) return; const plugin = typeof p === \"function\" ? p(head) : p; const key = plugin.key || String(head.plugins.size + 1); if (!head.plugins.get(key)) { head.plugins.set(key, plugin); for (const k in plugin.hooks || {}) head.hooks?.hook(k, plugin.hooks[k]); } } function createUnhead(renderer, resolvedOptions = {}) { const ssr = !resolvedOptions.document; const entries = new Map(); const plugins = new Map(); const head = { _entryCount: 1, _h: 0, plugins, resolvedOptions, ssr, entries, hooks: void 0, render: () => renderer(head), use: (p) => registerPlugin(head, p), push(input, _options) { const _i = _options?._index ?? head._entryCount++; const options = _options ? { ..._options } : {}; delete options.head; delete options.onRendered; delete options._index; const entry = { _i, input, options }; entries.set(_i, entry); const active = { _i, dispose() { entries.delete(_i); }, patch(input2) { if (ssr) { entry.input = input2; delete entry._tags; } else { entry._pending = input2; } if (!entries.has(_i)) entries.set(_i, entry); } }; return active; } }; resolvedOptions.init?.forEach((e) => e && head.push(e)); return head; } const DEFAULT_STREAM_KEY = \"__unhead__\"; function init(options = {}) { const { streamKey = DEFAULT_STREAM_KEY } = options; const win = \u0074ypeof window !== \"undefined\" ? window : void 0; if (!win) return; const queue = win[streamKey]; if (queue?._head) return queue._head; const doc = typeof document !== \"undefined\" ? document : void 0; const head = createUnhead(createDomRenderer(), { document: doc }); function pushStreamed(entry) { const active = head.push(entry); const stored = head.entries.get(active._i); if (stored) stored._streamed = true; } function pushBatch(entries) { const nested = head._b; head._b = true; try { for (const entry of entries) { pushStreamed(entry); } } finally { head._b = nested; if (!nested) { head.dirty = true; head.render(); } } } if (queue?._q?.length) { pushBatch(queue._q.flat()); } win[streamKey] = { _q: [], _head: head, push: pushBatch }; return head; } exports.init = init; return exports; })({});__unhead_iife__.init();";
2
+ export const streamingIifeSize = 21331;