shelfware 0.0.1 → 0.1.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 (206) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/6IstVYrV.js +1 -0
  3. package/.output/public/_nuxt/9C5WUlLE.js +36 -0
  4. package/.output/public/_nuxt/BDNMzG2s.js +1 -0
  5. package/.output/public/_nuxt/BW3xJdEx.js +1 -0
  6. package/.output/public/_nuxt/BXXtFil5.js +1 -0
  7. package/.output/public/_nuxt/BZuUK3cr.js +1 -0
  8. package/.output/public/_nuxt/BeLyMmd4.js +1 -0
  9. package/.output/public/_nuxt/C_VgD9ZI.js +3 -0
  10. package/.output/public/_nuxt/DB5Vxbte.js +2 -0
  11. package/.output/public/_nuxt/DMg0j7gv.js +14 -0
  12. package/.output/public/_nuxt/builds/latest.json +1 -0
  13. package/.output/public/_nuxt/builds/meta/4c307968-4837-497b-a570-d6ee336accc4.json +1 -0
  14. package/.output/public/_nuxt/entry.b3_DJTEt.css +2 -0
  15. package/.output/public/_nuxt/error-404.CHsn7XF-.css +1 -0
  16. package/.output/public/_nuxt/error-500.Bawx2bLr.css +1 -0
  17. package/.output/server/chunks/_/api-handler.mjs +44 -0
  18. package/.output/server/chunks/_/batch.mjs +27 -0
  19. package/.output/server/chunks/_/catalog.mjs +1115 -0
  20. package/.output/server/chunks/_/detail.mjs +16 -0
  21. package/.output/server/chunks/_/error-500.mjs +19 -0
  22. package/.output/server/chunks/_/quarantine.mjs +159 -0
  23. package/.output/server/chunks/nitro/nitro.mjs +5399 -0
  24. package/.output/server/chunks/routes/api/_..._.mjs +16 -0
  25. package/.output/server/chunks/routes/api/health.get.mjs +13 -0
  26. package/.output/server/chunks/routes/api/skills/_id/file.get.mjs +25 -0
  27. package/.output/server/chunks/routes/api/skills/_id_.get.mjs +25 -0
  28. package/.output/server/chunks/routes/api/skills/_id_.put.mjs +74 -0
  29. package/.output/server/chunks/routes/api/skills/delete.post.mjs +48 -0
  30. package/.output/server/chunks/routes/api/skills/quarantine.post.mjs +26 -0
  31. package/.output/server/chunks/routes/api/skills/restore.post.mjs +26 -0
  32. package/.output/server/chunks/routes/api/skills.get.mjs +41 -0
  33. package/.output/server/chunks/routes/renderer.mjs +341 -0
  34. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +3 -0
  35. package/.output/server/chunks/virtual/precomputed.mjs +3 -0
  36. package/.output/server/index.mjs +9 -0
  37. package/.output/server/node_modules/@babel/parser/lib/index.js +14611 -0
  38. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  39. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6801 -0
  40. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  41. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +692 -0
  42. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  43. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1420 -0
  44. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  45. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1903 -0
  46. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  47. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6980 -0
  48. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  49. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1867 -0
  50. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  51. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +904 -0
  52. package/.output/server/node_modules/@vue/server-renderer/package.json +53 -0
  53. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +636 -0
  54. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  55. package/.output/server/node_modules/devalue/index.js +17 -0
  56. package/.output/server/node_modules/devalue/package.json +39 -0
  57. package/.output/server/node_modules/devalue/src/base64.js +60 -0
  58. package/.output/server/node_modules/devalue/src/constants.js +12 -0
  59. package/.output/server/node_modules/devalue/src/operations.js +193 -0
  60. package/.output/server/node_modules/devalue/src/parse.js +274 -0
  61. package/.output/server/node_modules/devalue/src/stringify.js +428 -0
  62. package/.output/server/node_modules/devalue/src/uneval.js +606 -0
  63. package/.output/server/node_modules/devalue/src/utils.js +185 -0
  64. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  65. package/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  66. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  67. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  68. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  69. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  70. package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  71. package/.output/server/node_modules/entities/package.json +120 -0
  72. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  73. package/.output/server/node_modules/estree-walker/package.json +37 -0
  74. package/.output/server/node_modules/hookable/dist/index.mjs +257 -0
  75. package/.output/server/node_modules/hookable/package.json +53 -0
  76. package/.output/server/node_modules/nostics/dist/formatters/ansi.mjs +19 -0
  77. package/.output/server/node_modules/nostics/dist/index.mjs +187 -0
  78. package/.output/server/node_modules/nostics/package.json +125 -0
  79. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  80. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  81. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  82. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  83. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  84. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  85. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  86. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  87. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  88. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  89. package/.output/server/node_modules/source-map-js/package.json +71 -0
  90. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  91. package/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  92. package/.output/server/node_modules/ufo/package.json +48 -0
  93. package/.output/server/node_modules/unhead/dist/client.mjs +22 -0
  94. package/.output/server/node_modules/unhead/dist/legacy.mjs +33 -0
  95. package/.output/server/node_modules/unhead/dist/minify.mjs +183 -0
  96. package/.output/server/node_modules/unhead/dist/parser.mjs +518 -0
  97. package/.output/server/node_modules/unhead/dist/plugins.mjs +720 -0
  98. package/.output/server/node_modules/unhead/dist/server.mjs +99 -0
  99. package/.output/server/node_modules/unhead/dist/shared/unhead.-hZVKou0.mjs +400 -0
  100. package/.output/server/node_modules/unhead/dist/shared/unhead.BEmVMkeA.mjs +673 -0
  101. package/.output/server/node_modules/unhead/dist/shared/unhead.BGFxPGPQ.mjs +47 -0
  102. package/.output/server/node_modules/unhead/dist/shared/unhead.BQWSw36o.mjs +192 -0
  103. package/.output/server/node_modules/unhead/dist/shared/unhead.Bf_fPVYA.mjs +6 -0
  104. package/.output/server/node_modules/unhead/dist/shared/unhead.Bjbp1C8D.mjs +224 -0
  105. package/.output/server/node_modules/unhead/dist/shared/unhead.Bm4Y6XQI.mjs +17 -0
  106. package/.output/server/node_modules/unhead/dist/shared/unhead.C5Bksi2B.mjs +49 -0
  107. package/.output/server/node_modules/unhead/dist/shared/unhead.CGPOfp5O.mjs +32 -0
  108. package/.output/server/node_modules/unhead/dist/shared/unhead.CHEy9ana.mjs +7 -0
  109. package/.output/server/node_modules/unhead/dist/shared/unhead.D7HkBzZn.mjs +59 -0
  110. package/.output/server/node_modules/unhead/dist/shared/unhead.Dssd7L5I.mjs +196 -0
  111. package/.output/server/node_modules/unhead/dist/shared/unhead.jEy9BmRq.mjs +264 -0
  112. package/.output/server/node_modules/unhead/dist/shared/unhead.oZ7pkTV1.mjs +19 -0
  113. package/.output/server/node_modules/unhead/dist/shared/unhead.tQnRaXfX.mjs +240 -0
  114. package/.output/server/node_modules/unhead/dist/stream/client.mjs +33 -0
  115. package/.output/server/node_modules/unhead/dist/stream/iife.mjs +2 -0
  116. package/.output/server/node_modules/unhead/dist/stream/server.mjs +445 -0
  117. package/.output/server/node_modules/unhead/dist/utils.mjs +7 -0
  118. package/.output/server/node_modules/unhead/package.json +179 -0
  119. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  120. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  121. package/.output/server/node_modules/vue/index.js +7 -0
  122. package/.output/server/node_modules/vue/index.mjs +1 -0
  123. package/.output/server/node_modules/vue/package.json +112 -0
  124. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  125. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +278 -0
  126. package/.output/server/node_modules/vue-bundle-renderer/package.json +54 -0
  127. package/.output/server/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  128. package/.output/server/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  129. package/.output/server/node_modules/yaml/dist/compose/compose-node.js +112 -0
  130. package/.output/server/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  131. package/.output/server/node_modules/yaml/dist/compose/composer.js +224 -0
  132. package/.output/server/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  133. package/.output/server/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  134. package/.output/server/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  135. package/.output/server/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  136. package/.output/server/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  137. package/.output/server/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
  138. package/.output/server/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  139. package/.output/server/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  140. package/.output/server/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  141. package/.output/server/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  142. package/.output/server/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  143. package/.output/server/node_modules/yaml/dist/doc/Document.js +337 -0
  144. package/.output/server/node_modules/yaml/dist/doc/anchors.js +76 -0
  145. package/.output/server/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  146. package/.output/server/node_modules/yaml/dist/doc/createNode.js +90 -0
  147. package/.output/server/node_modules/yaml/dist/doc/directives.js +178 -0
  148. package/.output/server/node_modules/yaml/dist/errors.js +62 -0
  149. package/.output/server/node_modules/yaml/dist/index.js +50 -0
  150. package/.output/server/node_modules/yaml/dist/log.js +19 -0
  151. package/.output/server/node_modules/yaml/dist/nodes/Alias.js +118 -0
  152. package/.output/server/node_modules/yaml/dist/nodes/Collection.js +151 -0
  153. package/.output/server/node_modules/yaml/dist/nodes/Node.js +40 -0
  154. package/.output/server/node_modules/yaml/dist/nodes/Pair.js +39 -0
  155. package/.output/server/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  156. package/.output/server/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  157. package/.output/server/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  158. package/.output/server/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  159. package/.output/server/node_modules/yaml/dist/nodes/identity.js +53 -0
  160. package/.output/server/node_modules/yaml/dist/nodes/toJS.js +39 -0
  161. package/.output/server/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  162. package/.output/server/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  163. package/.output/server/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  164. package/.output/server/node_modules/yaml/dist/parse/cst.js +112 -0
  165. package/.output/server/node_modules/yaml/dist/parse/lexer.js +723 -0
  166. package/.output/server/node_modules/yaml/dist/parse/line-counter.js +41 -0
  167. package/.output/server/node_modules/yaml/dist/parse/parser.js +980 -0
  168. package/.output/server/node_modules/yaml/dist/public-api.js +107 -0
  169. package/.output/server/node_modules/yaml/dist/schema/Schema.js +39 -0
  170. package/.output/server/node_modules/yaml/dist/schema/common/map.js +19 -0
  171. package/.output/server/node_modules/yaml/dist/schema/common/null.js +17 -0
  172. package/.output/server/node_modules/yaml/dist/schema/common/seq.js +19 -0
  173. package/.output/server/node_modules/yaml/dist/schema/common/string.js +16 -0
  174. package/.output/server/node_modules/yaml/dist/schema/core/bool.js +21 -0
  175. package/.output/server/node_modules/yaml/dist/schema/core/float.js +47 -0
  176. package/.output/server/node_modules/yaml/dist/schema/core/int.js +42 -0
  177. package/.output/server/node_modules/yaml/dist/schema/core/schema.js +25 -0
  178. package/.output/server/node_modules/yaml/dist/schema/json/schema.js +64 -0
  179. package/.output/server/node_modules/yaml/dist/schema/tags.js +99 -0
  180. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  181. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  182. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  183. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  184. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
  185. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  186. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  187. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  188. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  189. package/.output/server/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  190. package/.output/server/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  191. package/.output/server/node_modules/yaml/dist/stringify/stringify.js +132 -0
  192. package/.output/server/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  193. package/.output/server/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  194. package/.output/server/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  195. package/.output/server/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
  196. package/.output/server/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  197. package/.output/server/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  198. package/.output/server/node_modules/yaml/dist/visit.js +236 -0
  199. package/.output/server/node_modules/yaml/package.json +97 -0
  200. package/.output/server/package.json +28 -0
  201. package/LICENSE +21 -0
  202. package/README.md +57 -1
  203. package/bin/launch.mjs +158 -0
  204. package/bin/shelfware.mjs +6 -0
  205. package/package.json +64 -5
  206. package/cli.mjs +0 -3
@@ -0,0 +1,47 @@
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
+ return isJson ? (val || "").replace(BACKSLASH_RE, "\\\\").replace(LT_RE, "\\u003C").replace(DOUBLE_QUOTE_RE, '\\"') : val || "";
18
+ }
19
+ return void 0;
20
+ }
21
+ function processTemplateParams(s, p, sep, isJson = false) {
22
+ if (typeof s !== "string" || !s.includes("%"))
23
+ return s;
24
+ let decoded = s;
25
+ try {
26
+ decoded = decodeURI(s);
27
+ } catch {
28
+ }
29
+ const tokens = decoded.match(TOKEN_RE);
30
+ if (!tokens) {
31
+ return s;
32
+ }
33
+ const hasSepSub = s.includes(SepSub);
34
+ s = s.replace(TOKEN_RE, (token) => {
35
+ if (token === SepSub || !tokens.includes(token)) {
36
+ return token;
37
+ }
38
+ const re = sub(p, token.slice(1), isJson);
39
+ return re !== void 0 ? re : token;
40
+ }).trim();
41
+ if (hasSepSub) {
42
+ s = s.split(SepSub).map((part) => part.trim()).filter((part) => part !== "").join(sep ? ` ${sep} ` : " ");
43
+ }
44
+ return s;
45
+ }
46
+
47
+ export { processTemplateParams as p };
@@ -0,0 +1,192 @@
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 transformObject(obj) {
69
+ return Array.isArray(obj) ? obj.map(transformObject) : !obj || typeof obj !== "object" ? obj : Object.fromEntries(Object.entries(obj).map(([k, v]) => [fixKeyCase(k), transformObject(v)]));
70
+ }
71
+ function unpackToString(value, options = {}) {
72
+ const { entrySeparator = "", keyValueSeparator = "", wrapValue, resolve } = options;
73
+ return Object.entries(value).map(([key, val]) => {
74
+ if (resolve) {
75
+ const resolved = resolve({ key, value: val });
76
+ if (resolved !== void 0)
77
+ return resolved;
78
+ }
79
+ 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;
80
+ return `${key}${keyValueSeparator}${processedVal}`;
81
+ }).join(entrySeparator);
82
+ }
83
+ function handleObjectEntry(key, value) {
84
+ const sanitizedValue = sanitizeObject(value);
85
+ const fixedKey = fixKeyCase(key);
86
+ const attr = resolveMetaKeyType(fixedKey);
87
+ if (!MetaTagsArrayable.has(fixedKey)) {
88
+ return [{ [attr]: fixedKey, ...sanitizedValue }];
89
+ }
90
+ const input = Object.fromEntries(
91
+ Object.entries(sanitizedValue).map(([k, v]) => [`${key}${k === "url" ? "" : `${k[0].toUpperCase()}${k.slice(1)}`}`, v])
92
+ );
93
+ return unpackMeta(input || {}).sort((a, b) => (a[attr]?.length || 0) - (b[attr]?.length || 0));
94
+ }
95
+ function resolveMetaKeyType(key) {
96
+ if (MetaPackingSchema[key]?.metaKey === "http-equiv" || HTTP_EQUIV_KEYS.includes(key)) {
97
+ return "http-equiv";
98
+ }
99
+ const fixed = fixKeyCase(key);
100
+ const colonIndex = fixed.indexOf(":");
101
+ return colonIndex === -1 ? "name" : PROPERTY_NAMESPACES.includes(fixed.slice(0, colonIndex)) ? "property" : "name";
102
+ }
103
+ function resolveMetaKeyValue(key) {
104
+ return META_ALIASES[key] || fixKeyCase(key);
105
+ }
106
+ function resolvePackedMetaObjectValue(value, key) {
107
+ if (key === "refresh")
108
+ return `${value.seconds};url=${value.url}`;
109
+ return unpackToString(transformObject(value), {
110
+ keyValueSeparator: "=",
111
+ entrySeparator: ", ",
112
+ resolve: ({ value: value2, key: key2 }) => value2 === null ? "" : typeof value2 === "boolean" ? key2 : void 0,
113
+ ...MetaPackingSchema[key]?.unpack
114
+ });
115
+ }
116
+ function unpackMeta(input) {
117
+ const extras = [];
118
+ const primitives = {};
119
+ for (const [key, value] of Object.entries(input)) {
120
+ if (Array.isArray(value)) {
121
+ if (key === "themeColor") {
122
+ value.forEach((v) => {
123
+ if (typeof v === "object" && v !== null) {
124
+ extras.push({ name: "theme-color", ...v });
125
+ }
126
+ });
127
+ continue;
128
+ }
129
+ for (const v of value) {
130
+ if (typeof v === "object" && v !== null) {
131
+ const urlProps = [];
132
+ const otherProps = [];
133
+ for (const [propKey, propValue] of Object.entries(v)) {
134
+ const metaKey = `${key}${propKey === "url" ? "" : `:${propKey}`}`;
135
+ const meta2 = unpackMeta({ [metaKey]: propValue });
136
+ (propKey === "url" ? urlProps : otherProps).push(...meta2);
137
+ }
138
+ extras.push(...urlProps, ...otherProps);
139
+ } else {
140
+ extras.push(...typeof v === "string" ? unpackMeta({ [key]: v }) : handleObjectEntry(key, v));
141
+ }
142
+ }
143
+ continue;
144
+ }
145
+ if (typeof value === "object" && value) {
146
+ if (MEDIA_KEYS.includes(key)) {
147
+ const prefix = key.startsWith("twitter") ? "twitter" : "og";
148
+ const type = key.replace(OG_TWITTER_RE, "").toLowerCase();
149
+ const metaKey = prefix === "twitter" ? "name" : "property";
150
+ if (value.url) {
151
+ extras.push({
152
+ [metaKey]: `${prefix}:${type}`,
153
+ content: value.url
154
+ });
155
+ }
156
+ if (value.secureUrl) {
157
+ extras.push({
158
+ [metaKey]: `${prefix}:${type}:secure_url`,
159
+ content: value.secureUrl
160
+ });
161
+ }
162
+ for (const [propKey, propValue] of Object.entries(value)) {
163
+ if (propKey !== "url" && propKey !== "secureUrl") {
164
+ extras.push({
165
+ [metaKey]: `${prefix}:${type}:${propKey}`,
166
+ content: propValue
167
+ });
168
+ }
169
+ }
170
+ } else if (MetaTagsArrayable.has(fixKeyCase(key))) {
171
+ extras.push(...handleObjectEntry(key, value));
172
+ } else {
173
+ primitives[key] = sanitizeObject(value);
174
+ }
175
+ } else {
176
+ primitives[key] = value;
177
+ }
178
+ }
179
+ const meta = Object.entries(primitives).map(([key, value]) => {
180
+ if (key === "charset")
181
+ return { charset: value === null ? "_null" : value };
182
+ const metaKey = resolveMetaKeyType(key);
183
+ const keyValue = resolveMetaKeyValue(key);
184
+ const processedValue = value === null ? "_null" : typeof value === "object" ? resolvePackedMetaObjectValue(value, key) : typeof value === "number" ? value.toString() : value;
185
+ return metaKey === "http-equiv" ? { "http-equiv": keyValue, "content": processedValue } : { [metaKey]: keyValue, content: processedValue };
186
+ });
187
+ return [...extras, ...meta].map(
188
+ (m) => !("content" in m) ? m : m.content === "_null" ? { ...m, content: null } : m
189
+ );
190
+ }
191
+
192
+ export { resolveMetaKeyValue as a, resolvePackedMetaObjectValue as b, resolveMetaKeyType as r, unpackMeta as u };
@@ -0,0 +1,6 @@
1
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
2
+ function hasOwn(object, key) {
3
+ return hasOwnProperty.call(object, key);
4
+ }
5
+
6
+ export { hasOwn as h };
@@ -0,0 +1,224 @@
1
+ import { H as HasElementTags } from './unhead.CGPOfp5O.mjs';
2
+ import { r as resolveTags, i as isMetaArrayDupeKey, b as normalizeProps, d as dedupeKey, h as hashTag } from './unhead.-hZVKou0.mjs';
3
+ import { a as callHook } from './unhead.Bm4Y6XQI.mjs';
4
+
5
+ const WHITESPACE_RE = /\s+/;
6
+ // @__NO_SIDE_EFFECTS__
7
+ function createDomRenderer(options = {}) {
8
+ return (head) => _renderDOMHead(head, options);
9
+ }
10
+ function renderDOMHead(head, options = {}) {
11
+ return _renderDOMHead(head, options);
12
+ }
13
+ function hasPendingEntries(head) {
14
+ for (const entry of head.entries.values()) {
15
+ if (entry._pending !== void 0)
16
+ return true;
17
+ }
18
+ return false;
19
+ }
20
+ function createDomState(head, dom) {
21
+ const state = { _d: dom, _t: dom.title, _e: /* @__PURE__ */ new Map([["htmlAttrs", dom.documentElement], ["bodyAttrs", dom.body]]), _p: {}, _s: {}, _l: /* @__PURE__ */ new Map() };
22
+ for (const entry of head.entries.values()) {
23
+ if (entry._o !== void 0) {
24
+ const orig = entry._o;
25
+ for (const t of ["bodyAttrs", "htmlAttrs"]) {
26
+ const cls = orig[t]?.class;
27
+ if (typeof cls === "string") {
28
+ const $el = state._e.get(t);
29
+ for (const c of cls.split(WHITESPACE_RE)) {
30
+ if (c)
31
+ state._p[`${t}:attr:class:${c}`] = () => $el.classList.remove(c);
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ return state;
38
+ }
39
+ function _renderDOMHead(head, options = {}) {
40
+ const dom = options.document || head.resolvedOptions.document;
41
+ const activeState = head._dom;
42
+ if (!dom || head._du || activeState && activeState._d === dom && !head.dirty && !hasPendingEntries(head))
43
+ return false;
44
+ const defaultView = dom.defaultView;
45
+ head._du = true;
46
+ let didRender = false;
47
+ try {
48
+ let track = function(key, fn, fresh) {
49
+ renderState._s[key] = !fresh && previous[key] || fn;
50
+ delete previous[key];
51
+ }, trackEvent = function(id, k, ev, source, $el, target) {
52
+ const key = `${id}:event:${k}`;
53
+ const prev = renderState._l.get(key);
54
+ if (prev && prev[0] === target && prev[1] === ev && prev[2] === source) {
55
+ track(key, prev[4]);
56
+ return;
57
+ }
58
+ prev?.[4]();
59
+ const dk = `data-${k}`;
60
+ const handler = ((e) => source.call($el, e));
61
+ const cleanup = () => {
62
+ target.removeEventListener(ev, handler);
63
+ if ($el.getAttribute(dk) === "")
64
+ $el.removeAttribute(dk);
65
+ if (renderState._l.get(key)?.[3] === handler)
66
+ renderState._l.delete(key);
67
+ };
68
+ target.addEventListener(ev, handler);
69
+ renderState._l.set(key, [target, ev, source, handler, cleanup]);
70
+ $el.setAttribute(dk, "");
71
+ track(key, cleanup, true);
72
+ }, trackCtx = function({ id, $el, tag }) {
73
+ renderState._e.set(id, $el);
74
+ if (!tag.tag.endsWith("Attrs")) {
75
+ const text = tag.textContent;
76
+ if (text != null && text !== "") {
77
+ if (text !== $el.textContent)
78
+ $el.textContent = text;
79
+ track(`${id}:text`, () => {
80
+ if ($el.textContent === text)
81
+ $el.textContent = "";
82
+ }, true);
83
+ }
84
+ const html = tag.innerHTML;
85
+ if (html != null && html !== "") {
86
+ if (html !== $el.innerHTML)
87
+ $el.innerHTML = html;
88
+ track(`${id}:html`, () => {
89
+ if ($el.innerHTML === html)
90
+ $el.innerHTML = "";
91
+ }, true);
92
+ }
93
+ const elKey = `${id}:el`;
94
+ track(elKey, previous[elKey] || (() => {
95
+ $el?.remove();
96
+ renderState._e.delete(id);
97
+ }));
98
+ }
99
+ for (const k in tag.props) {
100
+ const v = tag.props[k];
101
+ if (k[0] === "o" && k[1] === "n" && typeof v === "function") {
102
+ const ev = k.slice(2);
103
+ if ($el?.dataset?.[`${k}fired`])
104
+ v.call($el, new (defaultView?.Event || Event)(ev));
105
+ trackEvent(id, k, ev, v, $el, tag.tag === "bodyAttrs" && defaultView ? defaultView : $el);
106
+ continue;
107
+ }
108
+ const ck = `${id}:attr:${k}`;
109
+ if (k === "class" && v) {
110
+ for (const c of v) {
111
+ const key = `${ck}:${c}`;
112
+ track(key, previous[key] || (() => $el.classList.remove(c)));
113
+ if (!$el.classList.contains(c))
114
+ $el.classList.add(c);
115
+ }
116
+ } else if (k === "style" && v) {
117
+ for (const [sk, sv] of v) {
118
+ const key = `${ck}:${sk}`;
119
+ track(key, previous[key] || (() => $el.style.removeProperty(sk)));
120
+ $el.style.setProperty(sk, sv);
121
+ }
122
+ } else if (v !== false && v !== null) {
123
+ if ($el.getAttribute(k) !== v)
124
+ $el.setAttribute(k, v === true ? "" : String(v));
125
+ track(ck, previous[ck] || (() => $el.removeAttribute(k)));
126
+ }
127
+ }
128
+ };
129
+ const beforeRenderCtx = { shouldRender: true, tags: [] };
130
+ callHook(head, "dom:beforeRender", beforeRenderCtx);
131
+ if (!beforeRenderCtx.shouldRender)
132
+ return false;
133
+ let state = activeState;
134
+ if (state?._d !== dom) {
135
+ if (state) {
136
+ for (const k in state._s) state._s[k]();
137
+ for (const k in state._p) state._p[k]();
138
+ state._s = state._p = {};
139
+ state._e.clear();
140
+ state._l.clear();
141
+ }
142
+ state = void 0;
143
+ }
144
+ if (!state) {
145
+ state = createDomState(head, dom);
146
+ } else {
147
+ state._p = state._s;
148
+ }
149
+ state._s = {};
150
+ const renderState = state;
151
+ const previous = renderState._p;
152
+ const pending = [];
153
+ const frag = {};
154
+ head.dirty = false;
155
+ const rawTags = resolveTags(head, options.tagWeight ? { tagWeight: options.tagWeight } : void 0);
156
+ const tags = [];
157
+ const dupeKeyCounter = {};
158
+ for (const tag of rawTags) {
159
+ const count = dupeKeyCounter[tag._d] || 0;
160
+ const id = (count ? `${tag._d}:${count}` : tag._d) || tag._h;
161
+ const ctx = { tag, id, shouldRender: true };
162
+ if (tag.tag === "meta" && tag._d && isMetaArrayDupeKey(tag._d))
163
+ dupeKeyCounter[tag._d] = count + 1;
164
+ tags.push(ctx);
165
+ if (tag.tag === "title") {
166
+ dom.title = tag.textContent;
167
+ track("title:", () => dom.title = renderState._t);
168
+ continue;
169
+ }
170
+ ctx.$el = renderState._e.get(id);
171
+ if (ctx.$el)
172
+ trackCtx(ctx);
173
+ else if (HasElementTags.has(tag.tag))
174
+ pending.push(ctx);
175
+ }
176
+ if (pending.length) {
177
+ const tracked = new Set(renderState._e.values());
178
+ for (const el of [...dom.body.children, ...dom.head.children]) {
179
+ const elTag = el.tagName.toLowerCase();
180
+ if (!HasElementTags.has(elTag) || tracked.has(el))
181
+ continue;
182
+ const props = { innerHTML: el.innerHTML };
183
+ for (const n of el.getAttributeNames())
184
+ props[n] = el.getAttribute(n);
185
+ const next = normalizeProps({ tag: elTag, props: {} }, props);
186
+ next.key = el.getAttribute("data-hid") || void 0;
187
+ const dedupe = dedupeKey(next) || hashTag(next);
188
+ let k = dedupe;
189
+ let c = 1;
190
+ while (renderState._e.has(k))
191
+ k = `${dedupe}:${c++}`;
192
+ renderState._e.set(k, el);
193
+ }
194
+ }
195
+ for (const ctx of pending) {
196
+ const found = renderState._e.get(ctx.id);
197
+ ctx.$el = found || dom.createElement(ctx.tag.tag);
198
+ trackCtx(ctx);
199
+ if (!found)
200
+ (frag[ctx.tag.tagPosition || "head"] ??= dom.createDocumentFragment()).appendChild(ctx.$el);
201
+ }
202
+ if (frag.head)
203
+ dom.head.appendChild(frag.head);
204
+ if (frag.bodyOpen)
205
+ dom.body.insertBefore(frag.bodyOpen, dom.body.firstChild);
206
+ if (frag.bodyClose)
207
+ dom.body.appendChild(frag.bodyClose);
208
+ for (const k in previous)
209
+ previous[k]();
210
+ head._dom = renderState;
211
+ didRender = true;
212
+ callHook(head, "dom:rendered", { renders: tags });
213
+ } catch (e) {
214
+ head.dirty = true;
215
+ throw e;
216
+ } finally {
217
+ head._du = false;
218
+ }
219
+ if (didRender && (head.dirty || hasPendingEntries(head)))
220
+ _renderDOMHead(head, options);
221
+ return didRender;
222
+ }
223
+
224
+ export { createDomRenderer as c, renderDOMHead as r };
@@ -0,0 +1,17 @@
1
+ import { HookableCore } from 'hookable';
2
+
3
+ function createHooks(hooks) {
4
+ const instance = new HookableCore();
5
+ for (const key in hooks || {}) {
6
+ instance.hook(key, hooks[key]);
7
+ }
8
+ return instance;
9
+ }
10
+ function callHook(head, hook, ctx) {
11
+ const hooks = head.hooks?._hooks?.[hook];
12
+ if (!hooks?.length)
13
+ return;
14
+ return head.hooks?.callHook(hook, ctx);
15
+ }
16
+
17
+ export { callHook as a, createHooks as c };
@@ -0,0 +1,49 @@
1
+ import { r as registerPlugin } from './unhead.D7HkBzZn.mjs';
2
+
3
+ function createClientHeadAdapter(core, hooks, render) {
4
+ const corePush = core.push;
5
+ const head = core;
6
+ head.ssr = false;
7
+ head.hooks = hooks;
8
+ head.dirty = !!head.dirty;
9
+ head.use = (p) => registerPlugin(head, p);
10
+ head.render = () => render(head);
11
+ function notify() {
12
+ hooks.callHook("entries:updated", head);
13
+ if (!head._b)
14
+ head.render();
15
+ }
16
+ head.invalidate = () => {
17
+ for (const entry of head.entries.values())
18
+ delete entry._tags;
19
+ head.dirty = true;
20
+ notify();
21
+ };
22
+ head.push = (input, entryOptions) => {
23
+ const unhook = entryOptions?.onRendered ? hooks.hook("dom:rendered", entryOptions.onRendered) : void 0;
24
+ const active = corePush(input, entryOptions);
25
+ const entry = core.entries.get(active._i);
26
+ if (entry)
27
+ entry._o = input;
28
+ head.dirty = true;
29
+ notify();
30
+ return {
31
+ _i: active._i,
32
+ patch(input2) {
33
+ active.patch(input2);
34
+ head.dirty = true;
35
+ notify();
36
+ },
37
+ dispose() {
38
+ unhook?.();
39
+ if (core.entries.has(active._i)) {
40
+ active.dispose();
41
+ head.invalidate();
42
+ }
43
+ }
44
+ };
45
+ };
46
+ return head;
47
+ }
48
+
49
+ export { createClientHeadAdapter as c };
@@ -0,0 +1,32 @@
1
+ const SelfClosingTags = /* @__PURE__ */ new Set(["meta", "link", "base"]);
2
+ const DupeableTags = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]);
3
+ const TagsWithInnerContent = /* @__PURE__ */ new Set(["title", "titleTemplate", "script", "style", "noscript"]);
4
+ const HasElementTags = /* @__PURE__ */ new Set(["base", "meta", "link", "style", "script", "noscript"]);
5
+ const ValidHeadTags = /* @__PURE__ */ new Set(["title", "base", "htmlAttrs", "bodyAttrs", "meta", "link", "style", "script", "noscript"]);
6
+ const UniqueTags = /* @__PURE__ */ new Set(["base", "title", "titleTemplate", "bodyAttrs", "htmlAttrs", "templateParams"]);
7
+ const TagConfigKeys = /* @__PURE__ */ new Set(["key", "tagPosition", "tagPriority", "tagDuplicateStrategy", "innerHTML", "textContent", "processTemplateParams"]);
8
+ const ScriptNetworkEvents = /* @__PURE__ */ new Set(["onload", "onerror"]);
9
+ const UsesMergeStrategy = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]);
10
+ const MetaTagsArrayable = /* @__PURE__ */ new Set([
11
+ "theme-color",
12
+ "google-site-verification",
13
+ "author",
14
+ "og:locale:alternate",
15
+ "og:image",
16
+ "og:video",
17
+ "og:audio",
18
+ "article:author",
19
+ "article:tag",
20
+ "book:author",
21
+ "book:tag",
22
+ "twitter:image"
23
+ ]);
24
+ const TagPriorityAliases = { critical: -8, high: -1, low: 2 };
25
+ const hasContent = (value) => typeof value === "number" ? Number.isFinite(value) : value;
26
+
27
+ // @__NO_SIDE_EFFECTS__
28
+ function isUnsafeKey(key) {
29
+ return key === "__proto__" || key === "constructor" || key === "prototype";
30
+ }
31
+
32
+ export { DupeableTags as D, HasElementTags as H, MetaTagsArrayable as M, ScriptNetworkEvents as S, TagConfigKeys as T, UniqueTags as U, ValidHeadTags as V, SelfClosingTags as a, TagPriorityAliases as b, TagsWithInnerContent as c, UsesMergeStrategy as d, hasContent as h, isUnsafeKey as i };
@@ -0,0 +1,7 @@
1
+ function defineHeadPlugin(plugin, key) {
2
+ if (key && typeof plugin === "function")
3
+ plugin.key = key;
4
+ return plugin;
5
+ }
6
+
7
+ export { defineHeadPlugin as d };
@@ -0,0 +1,59 @@
1
+ function registerPlugin(head, p) {
2
+ if (typeof p === "function" && p.key && head.plugins.has(p.key))
3
+ return;
4
+ const plugin = typeof p === "function" ? p(head) : p;
5
+ const key = plugin.key || String(head.plugins.size + 1);
6
+ if (!head.plugins.get(key)) {
7
+ head.plugins.set(key, plugin);
8
+ for (const k in plugin.hooks || {})
9
+ head.hooks?.hook(k, plugin.hooks[k]);
10
+ }
11
+ }
12
+ // @__NO_SIDE_EFFECTS__
13
+ function createUnhead(renderer, resolvedOptions = {}) {
14
+ const ssr = !resolvedOptions.document;
15
+ const entries = /* @__PURE__ */ new Map();
16
+ const plugins = /* @__PURE__ */ new Map();
17
+ const head = {
18
+ _entryCount: 1,
19
+ _h: 0,
20
+ plugins,
21
+ resolvedOptions,
22
+ ssr,
23
+ entries,
24
+ // adapters decorate this same object; reserve the slot to keep its shape stable
25
+ hooks: void 0,
26
+ render: () => renderer(head),
27
+ use: (p) => registerPlugin(head, p),
28
+ push(input, _options) {
29
+ const _i = _options?._index ?? head._entryCount++;
30
+ const options = _options ? { ..._options } : {};
31
+ delete options.head;
32
+ delete options.onRendered;
33
+ delete options._index;
34
+ const entry = { _i, input, options };
35
+ entries.set(_i, entry);
36
+ const active = {
37
+ _i,
38
+ dispose() {
39
+ entries.delete(_i);
40
+ },
41
+ patch(input2) {
42
+ if (ssr) {
43
+ entry.input = input2;
44
+ delete entry._tags;
45
+ } else {
46
+ entry._pending = input2;
47
+ }
48
+ if (!entries.has(_i))
49
+ entries.set(_i, entry);
50
+ }
51
+ };
52
+ return active;
53
+ }
54
+ };
55
+ resolvedOptions.init?.forEach((e) => e && head.push(e));
56
+ return head;
57
+ }
58
+
59
+ export { createUnhead as c, registerPlugin as r };