usage-board 3.1.0 → 3.1.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 (219) hide show
  1. package/dist/index.mjs +1 -1
  2. package/dist/public/_nuxt/{BuL2_OVR.js → B6C9KBQ4.js} +1 -1
  3. package/dist/public/_nuxt/{CbwePq4F.js → Bv6agYS5.js} +1 -1
  4. package/dist/public/_nuxt/{LYzk-FvL.js → BvRyOET7.js} +1 -1
  5. package/dist/public/_nuxt/{CF27djws.js → CMWftE4h.js} +1 -1
  6. package/dist/public/_nuxt/{CoVMsEv_.js → COIbUy5w.js} +1 -1
  7. package/dist/public/_nuxt/{DS17D0R7.js → CXLmM1yO.js} +1 -1
  8. package/dist/public/_nuxt/{Bz0aA7IQ.js → DFqWEFN4.js} +1 -1
  9. package/dist/public/_nuxt/{WjVGlVHF.js → DUoLvn3A.js} +1 -1
  10. package/dist/public/_nuxt/{Dzuxw4nD.js → D_W11Quh.js} +1 -1
  11. package/dist/public/_nuxt/{D7Qebc1i.js → DgKrPjze.js} +2 -2
  12. package/dist/public/_nuxt/{CEZpUSPI.js → DkxY2YMp.js} +1 -1
  13. package/dist/public/_nuxt/{Dr4nyTE3.js → DtbPvE6R.js} +1 -1
  14. package/dist/public/_nuxt/{BJUAqwzD.js → HiqUua3-.js} +1 -1
  15. package/dist/public/_nuxt/builds/latest.json +1 -1
  16. package/dist/public/_nuxt/builds/meta/6f98f1cb-266c-475e-a249-dad346a55f24.json +1 -0
  17. package/dist/public/_nuxt/error-404.CFBEg71j.css +1 -0
  18. package/dist/public/_nuxt/error-500.BqCnH31G.css +1 -0
  19. package/dist/public/_nuxt/{Cd5S9Sm2.js → uHQwCIHg.js} +1 -1
  20. package/dist/server/chunks/_/error-500.mjs +2 -20
  21. package/dist/server/chunks/build/client.precomputed.mjs +1 -1
  22. package/dist/server/chunks/nitro/nitro.mjs +1885 -3648
  23. package/dist/server/chunks/routes/api/analysis/agent/session.json.mjs +8 -9
  24. package/dist/server/chunks/routes/api/analysis/agent/token.json.mjs +8 -9
  25. package/dist/server/chunks/routes/api/analysis/cache.json.mjs +8 -9
  26. package/dist/server/chunks/routes/api/analysis/hot-project.json.mjs +8 -9
  27. package/dist/server/chunks/routes/api/analysis/model.json.mjs +8 -9
  28. package/dist/server/chunks/routes/api/analysis/overview-cards.json.mjs +8 -9
  29. package/dist/server/chunks/routes/api/analysis/session.json.mjs +8 -9
  30. package/dist/server/chunks/routes/api/analysis/token/daily.json.mjs +8 -9
  31. package/dist/server/chunks/routes/api/analysis/token.json.mjs +8 -9
  32. package/dist/server/chunks/routes/api/payload.json.mjs +8 -9
  33. package/dist/server/chunks/routes/api/projects/_project/modules.get.mjs +8 -9
  34. package/dist/server/chunks/routes/api/projects/catalog.get.mjs +8 -9
  35. package/dist/server/chunks/routes/renderer.mjs +17 -39183
  36. package/dist/server/chunks/routes/ws.mjs +8 -9
  37. package/dist/server/index.mjs +9 -10
  38. package/dist/server/node_modules/@babel/parser/lib/index.js +14582 -0
  39. package/dist/server/node_modules/@babel/parser/package.json +50 -0
  40. package/dist/server/node_modules/@iconify/utils/lib/colors/index.js +292 -0
  41. package/dist/server/node_modules/@iconify/utils/lib/colors/keywords.js +702 -0
  42. package/dist/server/node_modules/@iconify/utils/lib/css/common.js +76 -0
  43. package/dist/server/node_modules/@iconify/utils/lib/css/format.js +40 -0
  44. package/dist/server/node_modules/@iconify/utils/lib/css/icon.js +52 -0
  45. package/dist/server/node_modules/@iconify/utils/lib/css/icons.js +133 -0
  46. package/dist/server/node_modules/@iconify/utils/lib/customisations/bool.js +20 -0
  47. package/dist/server/node_modules/@iconify/utils/lib/customisations/defaults.js +15 -0
  48. package/dist/server/node_modules/@iconify/utils/lib/customisations/flip.js +18 -0
  49. package/dist/server/node_modules/@iconify/utils/lib/customisations/merge.js +18 -0
  50. package/dist/server/node_modules/@iconify/utils/lib/customisations/rotate.js +31 -0
  51. package/dist/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +80 -0
  52. package/dist/server/node_modules/@iconify/utils/lib/emoji/convert.js +102 -0
  53. package/dist/server/node_modules/@iconify/utils/lib/emoji/data.js +29 -0
  54. package/dist/server/node_modules/@iconify/utils/lib/emoji/format.js +60 -0
  55. package/dist/server/node_modules/@iconify/utils/lib/emoji/parse.js +50 -0
  56. package/dist/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +204 -0
  57. package/dist/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +35 -0
  58. package/dist/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +134 -0
  59. package/dist/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +167 -0
  60. package/dist/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +81 -0
  61. package/dist/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +94 -0
  62. package/dist/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +28 -0
  63. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/components.js +78 -0
  64. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +68 -0
  65. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/name.js +47 -0
  66. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +105 -0
  67. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +38 -0
  68. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +94 -0
  69. package/dist/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +64 -0
  70. package/dist/server/node_modules/@iconify/utils/lib/icon/defaults.js +26 -0
  71. package/dist/server/node_modules/@iconify/utils/lib/icon/merge.js +18 -0
  72. package/dist/server/node_modules/@iconify/utils/lib/icon/name.js +58 -0
  73. package/dist/server/node_modules/@iconify/utils/lib/icon/square.js +34 -0
  74. package/dist/server/node_modules/@iconify/utils/lib/icon/transformations.js +13 -0
  75. package/dist/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +126 -0
  76. package/dist/server/node_modules/@iconify/utils/lib/icon-set/expand.js +21 -0
  77. package/dist/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +27 -0
  78. package/dist/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +38 -0
  79. package/dist/server/node_modules/@iconify/utils/lib/icon-set/minify.js +93 -0
  80. package/dist/server/node_modules/@iconify/utils/lib/icon-set/parse.js +48 -0
  81. package/dist/server/node_modules/@iconify/utils/lib/icon-set/tree.js +24 -0
  82. package/dist/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +44 -0
  83. package/dist/server/node_modules/@iconify/utils/lib/icon-set/validate.js +125 -0
  84. package/dist/server/node_modules/@iconify/utils/lib/index.js +53 -0
  85. package/dist/server/node_modules/@iconify/utils/lib/loader/custom.js +32 -0
  86. package/dist/server/node_modules/@iconify/utils/lib/loader/loader.js +28 -0
  87. package/dist/server/node_modules/@iconify/utils/lib/loader/modern.js +42 -0
  88. package/dist/server/node_modules/@iconify/utils/lib/loader/utils.js +63 -0
  89. package/dist/server/node_modules/@iconify/utils/lib/misc/objects.js +27 -0
  90. package/dist/server/node_modules/@iconify/utils/lib/misc/strings.js +27 -0
  91. package/dist/server/node_modules/@iconify/utils/lib/misc/title.js +10 -0
  92. package/dist/server/node_modules/@iconify/utils/lib/svg/build.js +115 -0
  93. package/dist/server/node_modules/@iconify/utils/lib/svg/defs.js +32 -0
  94. package/dist/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +15 -0
  95. package/dist/server/node_modules/@iconify/utils/lib/svg/html.js +10 -0
  96. package/dist/server/node_modules/@iconify/utils/lib/svg/id.js +42 -0
  97. package/dist/server/node_modules/@iconify/utils/lib/svg/inner-html.js +23 -0
  98. package/dist/server/node_modules/@iconify/utils/lib/svg/parse.js +69 -0
  99. package/dist/server/node_modules/@iconify/utils/lib/svg/pretty.js +55 -0
  100. package/dist/server/node_modules/@iconify/utils/lib/svg/size.js +28 -0
  101. package/dist/server/node_modules/@iconify/utils/lib/svg/trim.js +8 -0
  102. package/dist/server/node_modules/@iconify/utils/lib/svg/url.js +23 -0
  103. package/dist/server/node_modules/@iconify/utils/lib/svg/viewbox.js +9 -0
  104. package/dist/server/node_modules/@iconify/utils/package.json +118 -0
  105. package/dist/server/node_modules/@lonewolfyx/utils/dist/index.mjs +63 -0
  106. package/dist/server/node_modules/@lonewolfyx/utils/package.json +64 -0
  107. package/dist/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
  108. package/dist/server/node_modules/@vue/compiler-core/package.json +58 -0
  109. package/dist/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  110. package/dist/server/node_modules/@vue/compiler-dom/package.json +57 -0
  111. package/dist/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  112. package/dist/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  113. package/dist/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1877 -0
  114. package/dist/server/node_modules/@vue/reactivity/package.json +55 -0
  115. package/dist/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6856 -0
  116. package/dist/server/node_modules/@vue/runtime-core/package.json +52 -0
  117. package/dist/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1796 -0
  118. package/dist/server/node_modules/@vue/runtime-dom/package.json +60 -0
  119. package/dist/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
  120. package/dist/server/node_modules/@vue/server-renderer/package.json +55 -0
  121. package/dist/server/{chunks/_/shared.cjs.prod.mjs → node_modules/@vue/shared/dist/shared.cjs.prod.js} +76 -81
  122. package/dist/server/node_modules/@vue/shared/package.json +47 -0
  123. package/dist/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  124. package/dist/server/node_modules/better-sqlite3/lib/database.js +90 -0
  125. package/dist/server/node_modules/better-sqlite3/lib/index.js +3 -0
  126. package/dist/server/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  127. package/dist/server/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  128. package/dist/server/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  129. package/dist/server/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  130. package/dist/server/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  131. package/dist/server/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  132. package/dist/server/node_modules/better-sqlite3/lib/methods/table.js +189 -0
  133. package/dist/server/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  134. package/dist/server/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  135. package/dist/server/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
  136. package/dist/server/node_modules/better-sqlite3/lib/util.js +12 -0
  137. package/dist/server/node_modules/better-sqlite3/package.json +59 -0
  138. package/dist/server/node_modules/bindings/bindings.js +221 -0
  139. package/dist/server/node_modules/bindings/package.json +28 -0
  140. package/dist/server/node_modules/chokidar/handler.js +632 -0
  141. package/dist/server/node_modules/chokidar/index.js +822 -0
  142. package/dist/server/node_modules/chokidar/package.json +63 -0
  143. package/dist/server/{chunks/_ → node_modules/consola/dist/chunks}/prompt.mjs +2 -1
  144. package/dist/server/node_modules/consola/dist/core.mjs +512 -0
  145. package/dist/server/node_modules/consola/dist/index.mjs +651 -0
  146. package/dist/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  147. package/dist/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  148. package/dist/server/node_modules/consola/package.json +136 -0
  149. package/dist/server/node_modules/devalue/index.js +4 -0
  150. package/dist/server/node_modules/devalue/package.json +40 -0
  151. package/dist/server/node_modules/devalue/src/base64.js +60 -0
  152. package/dist/server/node_modules/devalue/src/constants.js +7 -0
  153. package/dist/server/node_modules/devalue/src/parse.js +268 -0
  154. package/dist/server/node_modules/devalue/src/stringify.js +335 -0
  155. package/dist/server/node_modules/devalue/src/uneval.js +552 -0
  156. package/dist/server/node_modules/devalue/src/utils.js +144 -0
  157. package/dist/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  158. package/dist/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  159. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  160. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  161. package/dist/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  162. package/dist/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  163. package/dist/server/node_modules/entities/dist/commonjs/package.json +3 -0
  164. package/dist/server/node_modules/entities/package.json +120 -0
  165. package/dist/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  166. package/dist/server/node_modules/estree-walker/package.json +37 -0
  167. package/dist/server/node_modules/file-uri-to-path/index.js +66 -0
  168. package/dist/server/node_modules/file-uri-to-path/package.json +32 -0
  169. package/dist/server/node_modules/glob/dist/esm/index.min.js +4 -0
  170. package/dist/server/node_modules/glob/dist/esm/package.json +3 -0
  171. package/dist/server/node_modules/glob/package.json +98 -0
  172. package/dist/server/node_modules/hookable/dist/index.mjs +257 -0
  173. package/dist/server/node_modules/hookable/package.json +53 -0
  174. package/dist/server/node_modules/md5-typescript/dist/bundles/bundle.umd.js +208 -0
  175. package/dist/server/node_modules/md5-typescript/package.json +31 -0
  176. package/dist/server/node_modules/path-type/index.js +42 -0
  177. package/dist/server/node_modules/path-type/package.json +51 -0
  178. package/dist/server/node_modules/readdirp/index.js +272 -0
  179. package/dist/server/node_modules/readdirp/package.json +66 -0
  180. package/dist/server/node_modules/source-map-js/lib/array-set.js +121 -0
  181. package/dist/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  182. package/dist/server/node_modules/source-map-js/lib/base64.js +67 -0
  183. package/dist/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  184. package/dist/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  185. package/dist/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  186. package/dist/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  187. package/dist/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  188. package/dist/server/node_modules/source-map-js/lib/source-node.js +413 -0
  189. package/dist/server/node_modules/source-map-js/lib/util.js +594 -0
  190. package/dist/server/node_modules/source-map-js/package.json +71 -0
  191. package/dist/server/node_modules/source-map-js/source-map.js +8 -0
  192. package/dist/server/node_modules/ufo/dist/index.mjs +645 -0
  193. package/dist/server/node_modules/ufo/package.json +48 -0
  194. package/dist/server/node_modules/unhead/dist/parser.mjs +508 -0
  195. package/dist/server/node_modules/unhead/dist/plugins.mjs +101 -0
  196. package/dist/server/node_modules/unhead/dist/server.mjs +180 -0
  197. package/dist/server/node_modules/unhead/dist/shared/unhead.B5FWS6X0.mjs +207 -0
  198. package/dist/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  199. package/dist/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  200. package/dist/server/node_modules/unhead/dist/shared/unhead.Ct24BOby.mjs +182 -0
  201. package/dist/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
  202. package/dist/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  203. package/dist/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
  204. package/dist/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  205. package/dist/server/node_modules/unhead/dist/utils.mjs +5 -0
  206. package/dist/server/node_modules/unhead/package.json +105 -0
  207. package/dist/server/node_modules/vue/dist/vue.cjs.js +80 -0
  208. package/dist/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  209. package/dist/server/node_modules/vue/index.js +7 -0
  210. package/dist/server/node_modules/vue/index.mjs +1 -0
  211. package/dist/server/node_modules/vue/package.json +112 -0
  212. package/dist/server/node_modules/vue/server-renderer/index.mjs +1 -0
  213. package/dist/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
  214. package/dist/server/node_modules/vue-bundle-renderer/package.json +55 -0
  215. package/dist/server/package.json +37 -0
  216. package/package.json +3 -1
  217. package/dist/public/_nuxt/builds/meta/5b933d30-47b4-45ca-8d5a-cba3255174fa.json +0 -1
  218. package/dist/public/_nuxt/error-404.B0EXnOcv.css +0 -1
  219. package/dist/public/_nuxt/error-500.CnSNZoEG.css +0 -1
@@ -0,0 +1,508 @@
1
+ const TAG_HTML = 0;
2
+ const TAG_HEAD = 1;
3
+ const TAG_TITLE = 4;
4
+ const TAG_META = 5;
5
+ const TAG_BODY = 44;
6
+ const TAG_SCRIPT = 52;
7
+ const TAG_STYLE = 53;
8
+ const TAG_LINK = 54;
9
+ const TAG_BASE = 56;
10
+ const LT_CHAR = 60;
11
+ const GT_CHAR = 62;
12
+ const SLASH_CHAR = 47;
13
+ const EQUALS_CHAR = 61;
14
+ const QUOTE_CHAR = 34;
15
+ const APOS_CHAR = 39;
16
+ const EXCLAMATION_CHAR = 33;
17
+ const BACKSLASH_CHAR = 92;
18
+ const DASH_CHAR = 45;
19
+ const TagIdMap = {
20
+ html: TAG_HTML,
21
+ head: TAG_HEAD,
22
+ title: TAG_TITLE,
23
+ meta: TAG_META,
24
+ body: TAG_BODY,
25
+ script: TAG_SCRIPT,
26
+ style: TAG_STYLE,
27
+ link: TAG_LINK,
28
+ base: TAG_BASE
29
+ };
30
+ function isWhitespace(charCode) {
31
+ return charCode === 32 || charCode === 9 || charCode === 10 || charCode === 13;
32
+ }
33
+ function processCommentOrDoctype(htmlChunk, position) {
34
+ let i = position;
35
+ const chunkLength = htmlChunk.length;
36
+ if (i + 3 < chunkLength && htmlChunk.charCodeAt(i + 2) === DASH_CHAR && htmlChunk.charCodeAt(i + 3) === DASH_CHAR) {
37
+ i += 4;
38
+ while (i < chunkLength - 2) {
39
+ if (htmlChunk.charCodeAt(i) === DASH_CHAR && htmlChunk.charCodeAt(i + 1) === DASH_CHAR && htmlChunk.charCodeAt(i + 2) === GT_CHAR) {
40
+ i += 3;
41
+ return {
42
+ complete: true,
43
+ newPosition: i,
44
+ remainingText: ""
45
+ };
46
+ }
47
+ i++;
48
+ }
49
+ return {
50
+ complete: false,
51
+ newPosition: position,
52
+ remainingText: htmlChunk.substring(position)
53
+ };
54
+ } else {
55
+ i += 2;
56
+ while (i < chunkLength) {
57
+ if (htmlChunk.charCodeAt(i) === GT_CHAR) {
58
+ i++;
59
+ return {
60
+ complete: true,
61
+ newPosition: i,
62
+ remainingText: ""
63
+ };
64
+ }
65
+ i++;
66
+ }
67
+ return {
68
+ complete: false,
69
+ newPosition: i,
70
+ remainingText: htmlChunk.substring(position, i)
71
+ };
72
+ }
73
+ }
74
+ function parseAttributes(attrStr) {
75
+ if (!attrStr)
76
+ return {};
77
+ const result = {};
78
+ const len = attrStr.length;
79
+ let i = 0;
80
+ const WHITESPACE = 0;
81
+ const NAME = 1;
82
+ const AFTER_NAME = 2;
83
+ const BEFORE_VALUE = 3;
84
+ const QUOTED_VALUE = 4;
85
+ const UNQUOTED_VALUE = 5;
86
+ let state = WHITESPACE;
87
+ let nameStart = 0;
88
+ let nameEnd = 0;
89
+ let valueStart = 0;
90
+ let quoteChar = 0;
91
+ let name = "";
92
+ while (i < len) {
93
+ const charCode = attrStr.charCodeAt(i);
94
+ const isSpace = isWhitespace(charCode);
95
+ switch (state) {
96
+ case WHITESPACE:
97
+ if (!isSpace) {
98
+ state = NAME;
99
+ nameStart = i;
100
+ nameEnd = 0;
101
+ }
102
+ break;
103
+ case NAME:
104
+ if (charCode === EQUALS_CHAR || isSpace) {
105
+ nameEnd = i;
106
+ name = attrStr.substring(nameStart, nameEnd).toLowerCase();
107
+ state = charCode === EQUALS_CHAR ? BEFORE_VALUE : AFTER_NAME;
108
+ }
109
+ break;
110
+ case AFTER_NAME:
111
+ if (charCode === EQUALS_CHAR) {
112
+ state = BEFORE_VALUE;
113
+ } else if (!isSpace) {
114
+ result[name] = "";
115
+ state = NAME;
116
+ nameStart = i;
117
+ nameEnd = 0;
118
+ }
119
+ break;
120
+ case BEFORE_VALUE:
121
+ if (charCode === QUOTE_CHAR || charCode === APOS_CHAR) {
122
+ quoteChar = charCode;
123
+ state = QUOTED_VALUE;
124
+ valueStart = i + 1;
125
+ } else if (!isSpace) {
126
+ state = UNQUOTED_VALUE;
127
+ valueStart = i;
128
+ }
129
+ break;
130
+ case QUOTED_VALUE:
131
+ if (charCode === BACKSLASH_CHAR && i + 1 < len) {
132
+ i++;
133
+ } else if (charCode === quoteChar) {
134
+ result[name] = attrStr.substring(valueStart, i);
135
+ state = WHITESPACE;
136
+ }
137
+ break;
138
+ case UNQUOTED_VALUE:
139
+ if (isSpace || charCode === GT_CHAR) {
140
+ result[name] = attrStr.substring(valueStart, i);
141
+ state = WHITESPACE;
142
+ }
143
+ break;
144
+ }
145
+ i++;
146
+ }
147
+ if (state === QUOTED_VALUE || state === UNQUOTED_VALUE) {
148
+ if (name) {
149
+ result[name] = attrStr.substring(valueStart, i);
150
+ }
151
+ } else if (state === NAME || state === AFTER_NAME || state === BEFORE_VALUE) {
152
+ nameEnd = nameEnd || i;
153
+ const currentName = attrStr.substring(nameStart, nameEnd).toLowerCase();
154
+ if (currentName) {
155
+ result[currentName] = "";
156
+ }
157
+ }
158
+ return result;
159
+ }
160
+ function parseHtmlForIndexes(html) {
161
+ const indexes = {
162
+ htmlTagStart: html.indexOf("<html"),
163
+ htmlTagEnd: -1,
164
+ headTagEnd: html.indexOf("</head>"),
165
+ bodyTagStart: html.indexOf("<body"),
166
+ bodyTagEnd: -1,
167
+ bodyCloseTagStart: html.indexOf("</body>")
168
+ };
169
+ if (indexes.htmlTagStart >= 0) {
170
+ const htmlTagEndPos = html.indexOf(">", indexes.htmlTagStart);
171
+ if (htmlTagEndPos >= 0) {
172
+ indexes.htmlTagEnd = htmlTagEndPos + 1;
173
+ }
174
+ }
175
+ if (indexes.bodyTagStart >= 0) {
176
+ const bodyTagEndPos = html.indexOf(">", indexes.bodyTagStart);
177
+ if (bodyTagEndPos >= 0) {
178
+ indexes.bodyTagEnd = bodyTagEndPos + 1;
179
+ }
180
+ }
181
+ return { html, input: {}, indexes };
182
+ }
183
+ function parseHtmlForUnheadExtraction(html) {
184
+ const input = {};
185
+ const htmlParts = [];
186
+ let position = 0;
187
+ let inHead = false;
188
+ let foundBodyStart = false;
189
+ let lastCopyPosition = 0;
190
+ let currentOutputLength = 0;
191
+ const indexes = {
192
+ htmlTagStart: -1,
193
+ htmlTagEnd: -1,
194
+ headTagEnd: -1,
195
+ bodyTagStart: -1,
196
+ bodyTagEnd: -1,
197
+ bodyCloseTagStart: -1
198
+ };
199
+ const headElementsToExtract = /* @__PURE__ */ new Set([TAG_TITLE, TAG_META, TAG_LINK, TAG_SCRIPT, TAG_STYLE, TAG_BASE]);
200
+ function copyAccumulatedText() {
201
+ if (lastCopyPosition < position) {
202
+ const textToAdd = html.substring(lastCopyPosition, position);
203
+ htmlParts.push(textToAdd);
204
+ currentOutputLength += textToAdd.length;
205
+ lastCopyPosition = position;
206
+ }
207
+ }
208
+ function addText(text) {
209
+ htmlParts.push(text);
210
+ currentOutputLength += text.length;
211
+ }
212
+ while (position < html.length && !foundBodyStart) {
213
+ const currentCharCode = html.charCodeAt(position);
214
+ if (currentCharCode !== LT_CHAR) {
215
+ position++;
216
+ continue;
217
+ }
218
+ if (position + 1 >= html.length) {
219
+ copyAccumulatedText();
220
+ addText(html[position]);
221
+ break;
222
+ }
223
+ const nextCharCode = html.charCodeAt(position + 1);
224
+ if (nextCharCode === EXCLAMATION_CHAR) {
225
+ const result = processCommentOrDoctype(html, position);
226
+ if (result.complete) {
227
+ copyAccumulatedText();
228
+ addText(html.substring(position, result.newPosition));
229
+ position = result.newPosition;
230
+ lastCopyPosition = position;
231
+ } else {
232
+ copyAccumulatedText();
233
+ addText(html.substring(position));
234
+ break;
235
+ }
236
+ continue;
237
+ }
238
+ if (nextCharCode === SLASH_CHAR) {
239
+ let tagEnd2 = position + 2;
240
+ while (tagEnd2 < html.length && html.charCodeAt(tagEnd2) !== GT_CHAR) {
241
+ tagEnd2++;
242
+ }
243
+ if (tagEnd2 >= html.length) {
244
+ copyAccumulatedText();
245
+ addText(html.substring(position));
246
+ break;
247
+ }
248
+ const tagName2 = html.substring(position + 2, tagEnd2).toLowerCase().trim();
249
+ const tagId2 = TagIdMap[tagName2] ?? -1;
250
+ if (tagId2 === TAG_HEAD) {
251
+ inHead = false;
252
+ copyAccumulatedText();
253
+ const headCloseStart = currentOutputLength;
254
+ addText(html.substring(position, tagEnd2 + 1));
255
+ indexes.headTagEnd = headCloseStart;
256
+ } else {
257
+ copyAccumulatedText();
258
+ addText(html.substring(position, tagEnd2 + 1));
259
+ }
260
+ position = tagEnd2 + 1;
261
+ lastCopyPosition = position;
262
+ continue;
263
+ }
264
+ const tagStart = position + 1;
265
+ let tagNameEnd = tagStart;
266
+ while (tagNameEnd < html.length) {
267
+ const c = html.charCodeAt(tagNameEnd);
268
+ if (isWhitespace(c) || c === SLASH_CHAR || c === GT_CHAR) {
269
+ break;
270
+ }
271
+ tagNameEnd++;
272
+ }
273
+ if (tagNameEnd >= html.length) {
274
+ copyAccumulatedText();
275
+ addText(html.substring(position));
276
+ break;
277
+ }
278
+ const tagName = html.substring(tagStart, tagNameEnd).toLowerCase();
279
+ const tagId = TagIdMap[tagName] ?? -1;
280
+ let tagEnd = tagNameEnd;
281
+ let inQuote = false;
282
+ let quoteChar = 0;
283
+ let foundEnd = false;
284
+ let isSelfClosing = false;
285
+ while (tagEnd < html.length && !foundEnd) {
286
+ const c = html.charCodeAt(tagEnd);
287
+ if (inQuote) {
288
+ if (c === quoteChar) {
289
+ inQuote = false;
290
+ }
291
+ } else if (c === QUOTE_CHAR || c === APOS_CHAR) {
292
+ inQuote = true;
293
+ quoteChar = c;
294
+ } else if (c === SLASH_CHAR && tagEnd + 1 < html.length && html.charCodeAt(tagEnd + 1) === GT_CHAR) {
295
+ isSelfClosing = true;
296
+ tagEnd += 2;
297
+ foundEnd = true;
298
+ continue;
299
+ } else if (c === GT_CHAR) {
300
+ tagEnd++;
301
+ foundEnd = true;
302
+ continue;
303
+ }
304
+ tagEnd++;
305
+ }
306
+ if (!foundEnd) {
307
+ copyAccumulatedText();
308
+ addText(html.substring(position));
309
+ break;
310
+ }
311
+ const attributesStr = html.substring(tagNameEnd, tagEnd - (isSelfClosing ? 2 : 1)).trim();
312
+ const attributes = parseAttributes(attributesStr);
313
+ if (tagId === TAG_HTML) {
314
+ copyAccumulatedText();
315
+ indexes.htmlTagStart = currentOutputLength;
316
+ if (Object.keys(attributes).length > 0) {
317
+ input.htmlAttrs = attributes;
318
+ addText(`<${tagName}>`);
319
+ } else {
320
+ addText(html.substring(position, tagEnd));
321
+ }
322
+ indexes.htmlTagEnd = currentOutputLength;
323
+ } else if (tagId === TAG_BODY) {
324
+ copyAccumulatedText();
325
+ indexes.bodyTagStart = currentOutputLength;
326
+ if (Object.keys(attributes).length > 0) {
327
+ input.bodyAttrs = attributes;
328
+ addText(`<${tagName}>`);
329
+ } else {
330
+ addText(html.substring(position, tagEnd));
331
+ }
332
+ indexes.bodyTagEnd = currentOutputLength;
333
+ foundBodyStart = true;
334
+ position = tagEnd;
335
+ lastCopyPosition = position;
336
+ break;
337
+ } else if (tagId === TAG_HEAD) {
338
+ inHead = true;
339
+ copyAccumulatedText();
340
+ addText(html.substring(position, tagEnd));
341
+ } else if (inHead && headElementsToExtract.has(tagId)) {
342
+ if (tagId === TAG_TITLE) {
343
+ if (!isSelfClosing) {
344
+ const titleEnd = findClosingTag(html, tagEnd, tagName);
345
+ if (titleEnd !== -1) {
346
+ const titleContent = html.substring(tagEnd, titleEnd).trim();
347
+ if (titleContent && !input.title) {
348
+ input.title = titleContent;
349
+ }
350
+ position = findTagEnd(html, titleEnd, tagName);
351
+ lastCopyPosition = position;
352
+ continue;
353
+ }
354
+ }
355
+ } else if (tagId === TAG_SCRIPT) {
356
+ const scriptAttrs = { ...attributes };
357
+ if (!isSelfClosing) {
358
+ const scriptEnd = findClosingTag(html, tagEnd, tagName);
359
+ if (scriptEnd !== -1) {
360
+ const scriptContent = html.substring(tagEnd, scriptEnd);
361
+ scriptAttrs.innerHTML = scriptContent || "";
362
+ position = findTagEnd(html, scriptEnd, tagName);
363
+ } else {
364
+ scriptAttrs.innerHTML = "";
365
+ position = tagEnd;
366
+ }
367
+ } else {
368
+ scriptAttrs.innerHTML = "";
369
+ position = tagEnd;
370
+ }
371
+ lastCopyPosition = position;
372
+ (input.script ||= []).push(scriptAttrs);
373
+ continue;
374
+ } else if (tagId === TAG_STYLE) {
375
+ const styleAttrs = { ...attributes };
376
+ if (!isSelfClosing) {
377
+ const styleEnd = findClosingTag(html, tagEnd, tagName);
378
+ if (styleEnd !== -1) {
379
+ const styleContent = html.substring(tagEnd, styleEnd);
380
+ styleAttrs.textContent = styleContent || "";
381
+ position = findTagEnd(html, styleEnd, tagName);
382
+ } else {
383
+ styleAttrs.textContent = "";
384
+ position = tagEnd;
385
+ }
386
+ } else {
387
+ styleAttrs.textContent = "";
388
+ position = tagEnd;
389
+ }
390
+ lastCopyPosition = position;
391
+ (input.style ||= []).push(styleAttrs);
392
+ continue;
393
+ } else if (tagId === TAG_META) {
394
+ (input.meta ||= []).push(attributes);
395
+ position = tagEnd;
396
+ lastCopyPosition = position;
397
+ continue;
398
+ } else if (tagId === TAG_LINK) {
399
+ (input.link ||= []).push(attributes);
400
+ position = tagEnd;
401
+ lastCopyPosition = position;
402
+ continue;
403
+ } else if (tagId === TAG_BASE && !input.base) {
404
+ input.base = attributes;
405
+ position = tagEnd;
406
+ lastCopyPosition = position;
407
+ continue;
408
+ }
409
+ } else {
410
+ copyAccumulatedText();
411
+ addText(html.substring(position, tagEnd));
412
+ }
413
+ position = tagEnd;
414
+ lastCopyPosition = position;
415
+ }
416
+ const remainingHtml = html.substring(position);
417
+ const bodyCloseIndex = remainingHtml.indexOf("</body>");
418
+ if (bodyCloseIndex !== -1) {
419
+ indexes.bodyCloseTagStart = currentOutputLength + bodyCloseIndex;
420
+ }
421
+ copyAccumulatedText();
422
+ addText(remainingHtml);
423
+ return { html: htmlParts.join(""), input, indexes };
424
+ }
425
+ function findClosingTag(html, startPos, tagName) {
426
+ const tagId = TagIdMap[tagName];
427
+ const isScriptOrStyle = tagId === TAG_SCRIPT || tagId === TAG_STYLE;
428
+ if (!isScriptOrStyle) {
429
+ const closingTag2 = `</${tagName}`;
430
+ const index = html.indexOf(closingTag2, startPos);
431
+ return index === -1 ? -1 : index;
432
+ }
433
+ const closingTag = `</${tagName}`;
434
+ let pos = startPos;
435
+ let inSingleQuote = false;
436
+ let inDoubleQuote = false;
437
+ let inBacktick = false;
438
+ let lastCharWasBackslash = false;
439
+ while (pos < html.length) {
440
+ const currentCharCode = html.charCodeAt(pos);
441
+ if (!lastCharWasBackslash) {
442
+ if (currentCharCode === APOS_CHAR && !inDoubleQuote && !inBacktick) {
443
+ inSingleQuote = !inSingleQuote;
444
+ } else if (currentCharCode === QUOTE_CHAR && !inSingleQuote && !inBacktick) {
445
+ inDoubleQuote = !inDoubleQuote;
446
+ } else if (currentCharCode === 96 && !inSingleQuote && !inDoubleQuote) {
447
+ inBacktick = !inBacktick;
448
+ }
449
+ }
450
+ lastCharWasBackslash = currentCharCode === BACKSLASH_CHAR && !lastCharWasBackslash;
451
+ const inQuotes = inSingleQuote || inDoubleQuote || inBacktick;
452
+ if (!inQuotes && html.startsWith(closingTag, pos)) {
453
+ const afterTagPos = pos + closingTag.length;
454
+ if (afterTagPos >= html.length) {
455
+ return pos;
456
+ }
457
+ const nextChar = html.charCodeAt(afterTagPos);
458
+ if (nextChar === GT_CHAR || isWhitespace(nextChar)) {
459
+ return pos;
460
+ }
461
+ }
462
+ pos++;
463
+ }
464
+ return -1;
465
+ }
466
+ function findTagEnd(html, closingTagStart, tagName) {
467
+ let pos = closingTagStart + tagName.length + 2;
468
+ while (pos < html.length && html.charCodeAt(pos) !== GT_CHAR) {
469
+ pos++;
470
+ }
471
+ return pos < html.length ? pos + 1 : pos;
472
+ }
473
+ function applyHeadToHtml(template, headHtml) {
474
+ const { html, indexes } = template;
475
+ const parts = [];
476
+ let lastIndex = 0;
477
+ if (indexes.htmlTagStart >= 0) {
478
+ parts.push(html.substring(lastIndex, indexes.htmlTagStart));
479
+ parts.push(`<html${headHtml.htmlAttrs}>`);
480
+ lastIndex = indexes.htmlTagEnd;
481
+ }
482
+ if (indexes.headTagEnd >= 0) {
483
+ parts.push(html.substring(lastIndex, indexes.headTagEnd));
484
+ parts.push(headHtml.headTags);
485
+ parts.push("</head>");
486
+ lastIndex = indexes.headTagEnd + 7;
487
+ }
488
+ if (indexes.bodyTagStart >= 0) {
489
+ parts.push(html.substring(lastIndex, indexes.bodyTagStart));
490
+ if (headHtml.bodyTagsOpen) {
491
+ parts.push(`<body${headHtml.bodyAttrs}>
492
+ ${headHtml.bodyTagsOpen}`);
493
+ } else {
494
+ parts.push(`<body${headHtml.bodyAttrs}>`);
495
+ }
496
+ lastIndex = indexes.bodyTagEnd;
497
+ }
498
+ if (indexes.bodyCloseTagStart >= 0) {
499
+ parts.push(html.substring(lastIndex, indexes.bodyCloseTagStart));
500
+ parts.push(headHtml.bodyTags);
501
+ parts.push(html.substring(indexes.bodyCloseTagStart));
502
+ } else {
503
+ parts.push(html.substring(lastIndex));
504
+ }
505
+ return parts.join("");
506
+ }
507
+
508
+ export { TagIdMap, applyHeadToHtml, parseAttributes, parseHtmlForIndexes, parseHtmlForUnheadExtraction };
@@ -0,0 +1,101 @@
1
+ export { A as AliasSortingPlugin, D as DeprecationsPlugin, P as PromisesPlugin, T as TemplateParamsPlugin } from './shared/unhead.TxTMM7cM.mjs';
2
+ import { d as defineHeadPlugin } from './shared/unhead.D4vSFytZ.mjs';
3
+ export { F as FlatMetaPlugin, S as SafeInputPlugin } from './shared/unhead.D4vSFytZ.mjs';
4
+ import './shared/unhead.CbpEuj3y.mjs';
5
+ import './shared/unhead.BYvz9V1x.mjs';
6
+ import './shared/unhead.DQc16pHI.mjs';
7
+ import './shared/unhead.yem5I2v_.mjs';
8
+
9
+ const META_TRANSFORMABLE_URL = [
10
+ "og:url",
11
+ "og:image",
12
+ "og:image:secure_url",
13
+ "twitter:image",
14
+ "twitter:image:src",
15
+ "og:video",
16
+ "og:video:secure_url",
17
+ "og:see_also"
18
+ ];
19
+ function CanonicalPlugin(options) {
20
+ return (head) => {
21
+ let host = options.canonicalHost || (!head.ssr ? window.location.origin : "");
22
+ if (!host.startsWith("http") && !host.startsWith("//")) {
23
+ host = `https://${host}`;
24
+ }
25
+ host = new URL(host).origin;
26
+ function resolvePath(path) {
27
+ if (options?.customResolver) {
28
+ return options.customResolver(path);
29
+ }
30
+ if (path.startsWith("http") || path.startsWith("//"))
31
+ return path;
32
+ try {
33
+ return new URL(path, host).toString();
34
+ } catch {
35
+ return path;
36
+ }
37
+ }
38
+ return {
39
+ key: "canonical",
40
+ hooks: {
41
+ "tags:resolve": (ctx) => {
42
+ for (const tag of ctx.tags) {
43
+ if (tag.tag === "meta" && (META_TRANSFORMABLE_URL.includes(tag.props?.property) || META_TRANSFORMABLE_URL.includes(tag.props?.name))) {
44
+ tag.props.content = resolvePath(tag.props.content);
45
+ } else if (tag.tag === "link" && tag.props.rel === "canonical") {
46
+ tag.props.href = resolvePath(tag.props.href);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ };
52
+ };
53
+ }
54
+
55
+ function InferSeoMetaPlugin(options = {}) {
56
+ return defineHeadPlugin((head) => {
57
+ head.push({
58
+ meta: [
59
+ {
60
+ name: "twitter:card",
61
+ content: options.twitterCard || "summary_large_image",
62
+ tagPriority: "low"
63
+ },
64
+ {
65
+ "property": "og:title",
66
+ "tagPriority": "low",
67
+ "data-infer": ""
68
+ },
69
+ {
70
+ "property": "og:description",
71
+ "tagPriority": "low",
72
+ "data-infer": ""
73
+ }
74
+ ]
75
+ });
76
+ return {
77
+ key: "infer-seo-meta",
78
+ hooks: {
79
+ "tags:beforeResolve": ({ tagMap }) => {
80
+ let title = head._titleTemplate || head._title;
81
+ const ogTitle = tagMap.get("meta:og:title");
82
+ if (typeof ogTitle?.props["data-infer"] !== "undefined") {
83
+ if (typeof title === "function") {
84
+ title = title(head._title);
85
+ }
86
+ ogTitle.props.content = options.ogTitle ? options.ogTitle(title) : title || "";
87
+ ogTitle.processTemplateParams = true;
88
+ }
89
+ const description = tagMap.get("meta:description")?.props?.content;
90
+ const ogDescription = tagMap.get("meta:og:description");
91
+ if (typeof ogDescription?.props["data-infer"] !== "undefined") {
92
+ ogDescription.props.content = options.ogDescription ? options.ogDescription(description) : description || "";
93
+ ogDescription.processTemplateParams = true;
94
+ }
95
+ }
96
+ }
97
+ };
98
+ });
99
+ }
100
+
101
+ export { CanonicalPlugin, InferSeoMetaPlugin, defineHeadPlugin };