@aglyn/aglyn 1.0.0-beta.143

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 (963) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +11 -0
  3. package/package.json +66 -0
  4. package/src/index.d.ts +25 -0
  5. package/src/index.js +26 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/aglyn.d.ts +31 -0
  8. package/src/lib/aglyn.js +114 -0
  9. package/src/lib/aglyn.js.map +1 -0
  10. package/src/lib/app-utils/abuse-report.d.ts +193 -0
  11. package/src/lib/app-utils/abuse-report.js +321 -0
  12. package/src/lib/app-utils/abuse-report.js.map +1 -0
  13. package/src/lib/app-utils/accept-negotiation.d.ts +129 -0
  14. package/src/lib/app-utils/accept-negotiation.js +266 -0
  15. package/src/lib/app-utils/accept-negotiation.js.map +1 -0
  16. package/src/lib/app-utils/account-emails.d.ts +263 -0
  17. package/src/lib/app-utils/account-emails.js +264 -0
  18. package/src/lib/app-utils/account-emails.js.map +1 -0
  19. package/src/lib/app-utils/actions.d.ts +717 -0
  20. package/src/lib/app-utils/actions.js +1031 -0
  21. package/src/lib/app-utils/actions.js.map +1 -0
  22. package/src/lib/app-utils/activity-presenter.d.ts +152 -0
  23. package/src/lib/app-utils/activity-presenter.js +326 -0
  24. package/src/lib/app-utils/activity-presenter.js.map +1 -0
  25. package/src/lib/app-utils/advertising-tag-mounts.d.ts +133 -0
  26. package/src/lib/app-utils/advertising-tag-mounts.js +118 -0
  27. package/src/lib/app-utils/advertising-tag-mounts.js.map +1 -0
  28. package/src/lib/app-utils/advertising-tags.d.ts +307 -0
  29. package/src/lib/app-utils/advertising-tags.js +525 -0
  30. package/src/lib/app-utils/advertising-tags.js.map +1 -0
  31. package/src/lib/app-utils/agent-api-catalog.d.ts +94 -0
  32. package/src/lib/app-utils/agent-api-catalog.js +106 -0
  33. package/src/lib/app-utils/agent-api-catalog.js.map +1 -0
  34. package/src/lib/app-utils/agent-openapi.d.ts +103 -0
  35. package/src/lib/app-utils/agent-openapi.js +1128 -0
  36. package/src/lib/app-utils/agent-openapi.js.map +1 -0
  37. package/src/lib/app-utils/analytics-beacon.d.ts +154 -0
  38. package/src/lib/app-utils/analytics-beacon.js +152 -0
  39. package/src/lib/app-utils/analytics-beacon.js.map +1 -0
  40. package/src/lib/app-utils/analytics-environment.d.ts +133 -0
  41. package/src/lib/app-utils/analytics-environment.js +152 -0
  42. package/src/lib/app-utils/analytics-environment.js.map +1 -0
  43. package/src/lib/app-utils/analytics-events.d.ts +744 -0
  44. package/src/lib/app-utils/analytics-events.js +650 -0
  45. package/src/lib/app-utils/analytics-events.js.map +1 -0
  46. package/src/lib/app-utils/analytics-link-clicks.d.ts +102 -0
  47. package/src/lib/app-utils/analytics-link-clicks.js +267 -0
  48. package/src/lib/app-utils/analytics-link-clicks.js.map +1 -0
  49. package/src/lib/app-utils/analytics-path-key.d.ts +46 -0
  50. package/src/lib/app-utils/analytics-path-key.js +46 -0
  51. package/src/lib/app-utils/analytics-path-key.js.map +1 -0
  52. package/src/lib/app-utils/api-adapter.d.ts +47 -0
  53. package/src/lib/app-utils/api-adapter.js +367 -0
  54. package/src/lib/app-utils/api-adapter.js.map +1 -0
  55. package/src/lib/app-utils/api-idempotency.d.ts +169 -0
  56. package/src/lib/app-utils/api-idempotency.js +213 -0
  57. package/src/lib/app-utils/api-idempotency.js.map +1 -0
  58. package/src/lib/app-utils/api-plugins.d.ts +210 -0
  59. package/src/lib/app-utils/api-plugins.js +221 -0
  60. package/src/lib/app-utils/api-plugins.js.map +1 -0
  61. package/src/lib/app-utils/assist-credits.d.ts +482 -0
  62. package/src/lib/app-utils/assist-credits.js +509 -0
  63. package/src/lib/app-utils/assist-credits.js.map +1 -0
  64. package/src/lib/app-utils/attribution-attribute.d.ts +34 -0
  65. package/src/lib/app-utils/attribution-attribute.js +34 -0
  66. package/src/lib/app-utils/attribution-attribute.js.map +1 -0
  67. package/src/lib/app-utils/attribution-guard.d.ts +130 -0
  68. package/src/lib/app-utils/attribution-guard.js +410 -0
  69. package/src/lib/app-utils/attribution-guard.js.map +1 -0
  70. package/src/lib/app-utils/author-css.d.ts +123 -0
  71. package/src/lib/app-utils/author-css.js +275 -0
  72. package/src/lib/app-utils/author-css.js.map +1 -0
  73. package/src/lib/app-utils/author-html-markdown.d.ts +31 -0
  74. package/src/lib/app-utils/author-html-markdown.js +497 -0
  75. package/src/lib/app-utils/author-html-markdown.js.map +1 -0
  76. package/src/lib/app-utils/author-html.d.ts +135 -0
  77. package/src/lib/app-utils/author-html.js +1037 -0
  78. package/src/lib/app-utils/author-html.js.map +1 -0
  79. package/src/lib/app-utils/automation-placeholders.d.ts +72 -0
  80. package/src/lib/app-utils/automation-placeholders.js +207 -0
  81. package/src/lib/app-utils/automation-placeholders.js.map +1 -0
  82. package/src/lib/app-utils/bandwidth-cap.d.ts +183 -0
  83. package/src/lib/app-utils/bandwidth-cap.js +193 -0
  84. package/src/lib/app-utils/bandwidth-cap.js.map +1 -0
  85. package/src/lib/app-utils/binding-token-catalog.d.ts +82 -0
  86. package/src/lib/app-utils/binding-token-catalog.js +293 -0
  87. package/src/lib/app-utils/binding-token-catalog.js.map +1 -0
  88. package/src/lib/app-utils/binding-tokens.d.ts +157 -0
  89. package/src/lib/app-utils/binding-tokens.js +251 -0
  90. package/src/lib/app-utils/binding-tokens.js.map +1 -0
  91. package/src/lib/app-utils/breadcrumb-json-ld.d.ts +57 -0
  92. package/src/lib/app-utils/breadcrumb-json-ld.js +67 -0
  93. package/src/lib/app-utils/breadcrumb-json-ld.js.map +1 -0
  94. package/src/lib/app-utils/campaign-attribution.d.ts +117 -0
  95. package/src/lib/app-utils/campaign-attribution.js +162 -0
  96. package/src/lib/app-utils/campaign-attribution.js.map +1 -0
  97. package/src/lib/app-utils/campaign-forwarding.d.ts +220 -0
  98. package/src/lib/app-utils/campaign-forwarding.js +332 -0
  99. package/src/lib/app-utils/campaign-forwarding.js.map +1 -0
  100. package/src/lib/app-utils/campaign-membership.d.ts +109 -0
  101. package/src/lib/app-utils/campaign-membership.js +176 -0
  102. package/src/lib/app-utils/campaign-membership.js.map +1 -0
  103. package/src/lib/app-utils/campaign-touch.d.ts +206 -0
  104. package/src/lib/app-utils/campaign-touch.js +326 -0
  105. package/src/lib/app-utils/campaign-touch.js.map +1 -0
  106. package/src/lib/app-utils/child-contract-compose.d.ts +28 -0
  107. package/src/lib/app-utils/child-contract-compose.js +140 -0
  108. package/src/lib/app-utils/child-contract-compose.js.map +1 -0
  109. package/src/lib/app-utils/child-contract.d.ts +129 -0
  110. package/src/lib/app-utils/child-contract.js +153 -0
  111. package/src/lib/app-utils/child-contract.js.map +1 -0
  112. package/src/lib/app-utils/collection-delete.d.ts +113 -0
  113. package/src/lib/app-utils/collection-delete.js +120 -0
  114. package/src/lib/app-utils/collection-delete.js.map +1 -0
  115. package/src/lib/app-utils/collection-entries.d.ts +833 -0
  116. package/src/lib/app-utils/collection-entries.js +1285 -0
  117. package/src/lib/app-utils/collection-entries.js.map +1 -0
  118. package/src/lib/app-utils/collection-entry-date.d.ts +129 -0
  119. package/src/lib/app-utils/collection-entry-date.js +183 -0
  120. package/src/lib/app-utils/collection-entry-date.js.map +1 -0
  121. package/src/lib/app-utils/collection-kind.d.ts +55 -0
  122. package/src/lib/app-utils/collection-kind.js +69 -0
  123. package/src/lib/app-utils/collection-kind.js.map +1 -0
  124. package/src/lib/app-utils/collection-slug.d.ts +79 -0
  125. package/src/lib/app-utils/collection-slug.js +70 -0
  126. package/src/lib/app-utils/collection-slug.js.map +1 -0
  127. package/src/lib/app-utils/compose-layout-nodes.d.ts +147 -0
  128. package/src/lib/app-utils/compose-layout-nodes.js +261 -0
  129. package/src/lib/app-utils/compose-layout-nodes.js.map +1 -0
  130. package/src/lib/app-utils/compose-layout-props.d.ts +71 -0
  131. package/src/lib/app-utils/compose-layout-props.js +61 -0
  132. package/src/lib/app-utils/compose-layout-props.js.map +1 -0
  133. package/src/lib/app-utils/compose-reusable-components.d.ts +504 -0
  134. package/src/lib/app-utils/compose-reusable-components.js +1366 -0
  135. package/src/lib/app-utils/compose-reusable-components.js.map +1 -0
  136. package/src/lib/app-utils/compress.d.ts +35 -0
  137. package/src/lib/app-utils/compress.js +38 -0
  138. package/src/lib/app-utils/compress.js.map +1 -0
  139. package/src/lib/app-utils/consent-banner-ui.d.ts +226 -0
  140. package/src/lib/app-utils/consent-banner-ui.js +583 -0
  141. package/src/lib/app-utils/consent-banner-ui.js.map +1 -0
  142. package/src/lib/app-utils/consent-groups.d.ts +189 -0
  143. package/src/lib/app-utils/consent-groups.js +219 -0
  144. package/src/lib/app-utils/consent-groups.js.map +1 -0
  145. package/src/lib/app-utils/consent-preferences-dialog.d.ts +58 -0
  146. package/src/lib/app-utils/consent-preferences-dialog.js +106 -0
  147. package/src/lib/app-utils/consent-preferences-dialog.js.map +1 -0
  148. package/src/lib/app-utils/console-record-links.d.ts +163 -0
  149. package/src/lib/app-utils/console-record-links.js +178 -0
  150. package/src/lib/app-utils/console-record-links.js.map +1 -0
  151. package/src/lib/app-utils/console-routes.d.ts +658 -0
  152. package/src/lib/app-utils/console-routes.js +489 -0
  153. package/src/lib/app-utils/console-routes.js.map +1 -0
  154. package/src/lib/app-utils/console-widget-slot-context.d.ts +46 -0
  155. package/src/lib/app-utils/console-widget-slot-context.js +23 -0
  156. package/src/lib/app-utils/console-widget-slot-context.js.map +1 -0
  157. package/src/lib/app-utils/contact-custom-fields.d.ts +191 -0
  158. package/src/lib/app-utils/contact-custom-fields.js +349 -0
  159. package/src/lib/app-utils/contact-custom-fields.js.map +1 -0
  160. package/src/lib/app-utils/contact-holder.d.ts +52 -0
  161. package/src/lib/app-utils/contact-holder.js +98 -0
  162. package/src/lib/app-utils/contact-holder.js.map +1 -0
  163. package/src/lib/app-utils/contact-merge.d.ts +136 -0
  164. package/src/lib/app-utils/contact-merge.js +379 -0
  165. package/src/lib/app-utils/contact-merge.js.map +1 -0
  166. package/src/lib/app-utils/contacts.d.ts +554 -0
  167. package/src/lib/app-utils/contacts.js +401 -0
  168. package/src/lib/app-utils/contacts.js.map +1 -0
  169. package/src/lib/app-utils/content-author-profile.d.ts +68 -0
  170. package/src/lib/app-utils/content-author-profile.js +118 -0
  171. package/src/lib/app-utils/content-author-profile.js.map +1 -0
  172. package/src/lib/app-utils/content-authors.d.ts +662 -0
  173. package/src/lib/app-utils/content-authors.js +771 -0
  174. package/src/lib/app-utils/content-authors.js.map +1 -0
  175. package/src/lib/app-utils/content-schema-type.d.ts +81 -0
  176. package/src/lib/app-utils/content-schema-type.js +87 -0
  177. package/src/lib/app-utils/content-schema-type.js.map +1 -0
  178. package/src/lib/app-utils/contexts.d.ts +35 -0
  179. package/src/lib/app-utils/contexts.js +35 -0
  180. package/src/lib/app-utils/contexts.js.map +1 -0
  181. package/src/lib/app-utils/create-resource-uid.d.ts +18 -0
  182. package/src/lib/app-utils/create-resource-uid.js +23 -0
  183. package/src/lib/app-utils/create-resource-uid.js.map +1 -0
  184. package/src/lib/app-utils/crm-booking.d.ts +75 -0
  185. package/src/lib/app-utils/crm-booking.js +133 -0
  186. package/src/lib/app-utils/crm-booking.js.map +1 -0
  187. package/src/lib/app-utils/crm-csv.d.ts +232 -0
  188. package/src/lib/app-utils/crm-csv.js +432 -0
  189. package/src/lib/app-utils/crm-csv.js.map +1 -0
  190. package/src/lib/app-utils/crm-digest.d.ts +179 -0
  191. package/src/lib/app-utils/crm-digest.js +271 -0
  192. package/src/lib/app-utils/crm-digest.js.map +1 -0
  193. package/src/lib/app-utils/crm-email-templates.d.ts +172 -0
  194. package/src/lib/app-utils/crm-email-templates.js +382 -0
  195. package/src/lib/app-utils/crm-email-templates.js.map +1 -0
  196. package/src/lib/app-utils/crm-inbound.d.ts +245 -0
  197. package/src/lib/app-utils/crm-inbound.js +407 -0
  198. package/src/lib/app-utils/crm-inbound.js.map +1 -0
  199. package/src/lib/app-utils/crm-kinds.d.ts +73 -0
  200. package/src/lib/app-utils/crm-kinds.js +92 -0
  201. package/src/lib/app-utils/crm-kinds.js.map +1 -0
  202. package/src/lib/app-utils/crm-next-activity.d.ts +107 -0
  203. package/src/lib/app-utils/crm-next-activity.js +140 -0
  204. package/src/lib/app-utils/crm-next-activity.js.map +1 -0
  205. package/src/lib/app-utils/crm-reports.d.ts +479 -0
  206. package/src/lib/app-utils/crm-reports.js +680 -0
  207. package/src/lib/app-utils/crm-reports.js.map +1 -0
  208. package/src/lib/app-utils/crm-task-reminders.d.ts +129 -0
  209. package/src/lib/app-utils/crm-task-reminders.js +139 -0
  210. package/src/lib/app-utils/crm-task-reminders.js.map +1 -0
  211. package/src/lib/app-utils/crm.d.ts +1546 -0
  212. package/src/lib/app-utils/crm.js +1814 -0
  213. package/src/lib/app-utils/crm.js.map +1 -0
  214. package/src/lib/app-utils/csp-report.d.ts +84 -0
  215. package/src/lib/app-utils/csp-report.js +177 -0
  216. package/src/lib/app-utils/csp-report.js.map +1 -0
  217. package/src/lib/app-utils/csv-import.d.ts +192 -0
  218. package/src/lib/app-utils/csv-import.js +279 -0
  219. package/src/lib/app-utils/csv-import.js.map +1 -0
  220. package/src/lib/app-utils/dataset-csv.d.ts +109 -0
  221. package/src/lib/app-utils/dataset-csv.js +235 -0
  222. package/src/lib/app-utils/dataset-csv.js.map +1 -0
  223. package/src/lib/app-utils/dataset-models.d.ts +194 -0
  224. package/src/lib/app-utils/dataset-models.js +409 -0
  225. package/src/lib/app-utils/dataset-models.js.map +1 -0
  226. package/src/lib/app-utils/dataset-query.d.ts +57 -0
  227. package/src/lib/app-utils/dataset-query.js +126 -0
  228. package/src/lib/app-utils/dataset-query.js.map +1 -0
  229. package/src/lib/app-utils/datasets.d.ts +136 -0
  230. package/src/lib/app-utils/datasets.js +177 -0
  231. package/src/lib/app-utils/datasets.js.map +1 -0
  232. package/src/lib/app-utils/decompress.d.ts +36 -0
  233. package/src/lib/app-utils/decompress.js +32 -0
  234. package/src/lib/app-utils/decompress.js.map +1 -0
  235. package/src/lib/app-utils/dedicated-sending-domain.d.ts +47 -0
  236. package/src/lib/app-utils/dedicated-sending-domain.js +114 -0
  237. package/src/lib/app-utils/dedicated-sending-domain.js.map +1 -0
  238. package/src/lib/app-utils/deferred-image.d.ts +86 -0
  239. package/src/lib/app-utils/deferred-image.js +83 -0
  240. package/src/lib/app-utils/deferred-image.js.map +1 -0
  241. package/src/lib/app-utils/definition-canvas-tree.d.ts +61 -0
  242. package/src/lib/app-utils/definition-canvas-tree.js +126 -0
  243. package/src/lib/app-utils/definition-canvas-tree.js.map +1 -0
  244. package/src/lib/app-utils/deployment-shape.d.ts +167 -0
  245. package/src/lib/app-utils/deployment-shape.js +238 -0
  246. package/src/lib/app-utils/deployment-shape.js.map +1 -0
  247. package/src/lib/app-utils/detect-template-placeholders.d.ts +30 -0
  248. package/src/lib/app-utils/detect-template-placeholders.js +53 -0
  249. package/src/lib/app-utils/detect-template-placeholders.js.map +1 -0
  250. package/src/lib/app-utils/dmca-counter-notice.d.ts +185 -0
  251. package/src/lib/app-utils/dmca-counter-notice.js +277 -0
  252. package/src/lib/app-utils/dmca-counter-notice.js.map +1 -0
  253. package/src/lib/app-utils/docs-deflection.d.ts +156 -0
  254. package/src/lib/app-utils/docs-deflection.js +547 -0
  255. package/src/lib/app-utils/docs-deflection.js.map +1 -0
  256. package/src/lib/app-utils/docs-help.d.ts +57 -0
  257. package/src/lib/app-utils/docs-help.generated.d.ts +303 -0
  258. package/src/lib/app-utils/docs-help.generated.js +867 -0
  259. package/src/lib/app-utils/docs-help.generated.js.map +1 -0
  260. package/src/lib/app-utils/docs-help.js +46 -0
  261. package/src/lib/app-utils/docs-help.js.map +1 -0
  262. package/src/lib/app-utils/docs-index.generated.d.ts +29 -0
  263. package/src/lib/app-utils/docs-index.generated.js +8388 -0
  264. package/src/lib/app-utils/docs-index.generated.js.map +1 -0
  265. package/src/lib/app-utils/docs-retrieval.d.ts +67 -0
  266. package/src/lib/app-utils/docs-retrieval.js +188 -0
  267. package/src/lib/app-utils/docs-retrieval.js.map +1 -0
  268. package/src/lib/app-utils/document-landmark.d.ts +50 -0
  269. package/src/lib/app-utils/document-landmark.js +100 -0
  270. package/src/lib/app-utils/document-landmark.js.map +1 -0
  271. package/src/lib/app-utils/duplicate-resource.d.ts +101 -0
  272. package/src/lib/app-utils/duplicate-resource.js +206 -0
  273. package/src/lib/app-utils/duplicate-resource.js.map +1 -0
  274. package/src/lib/app-utils/dynamic-list-rule.d.ts +471 -0
  275. package/src/lib/app-utils/dynamic-list-rule.js +914 -0
  276. package/src/lib/app-utils/dynamic-list-rule.js.map +1 -0
  277. package/src/lib/app-utils/element-animation.d.ts +200 -0
  278. package/src/lib/app-utils/element-animation.js +233 -0
  279. package/src/lib/app-utils/element-animation.js.map +1 -0
  280. package/src/lib/app-utils/element-hidden-style.d.ts +46 -0
  281. package/src/lib/app-utils/element-hidden-style.js +48 -0
  282. package/src/lib/app-utils/element-hidden-style.js.map +1 -0
  283. package/src/lib/app-utils/element-ui.d.ts +243 -0
  284. package/src/lib/app-utils/element-ui.js +459 -0
  285. package/src/lib/app-utils/element-ui.js.map +1 -0
  286. package/src/lib/app-utils/email-starter-policy.d.ts +160 -0
  287. package/src/lib/app-utils/email-starter-policy.js +327 -0
  288. package/src/lib/app-utils/email-starter-policy.js.map +1 -0
  289. package/src/lib/app-utils/email-topics.d.ts +310 -0
  290. package/src/lib/app-utils/email-topics.js +336 -0
  291. package/src/lib/app-utils/email-topics.js.map +1 -0
  292. package/src/lib/app-utils/enabled-plugins-context.d.ts +100 -0
  293. package/src/lib/app-utils/enabled-plugins-context.js +113 -0
  294. package/src/lib/app-utils/enabled-plugins-context.js.map +1 -0
  295. package/src/lib/app-utils/ensure-canvas-root.d.ts +38 -0
  296. package/src/lib/app-utils/ensure-canvas-root.js +61 -0
  297. package/src/lib/app-utils/ensure-canvas-root.js.map +1 -0
  298. package/src/lib/app-utils/entity-picker-context.d.ts +199 -0
  299. package/src/lib/app-utils/entity-picker-context.js +93 -0
  300. package/src/lib/app-utils/entity-picker-context.js.map +1 -0
  301. package/src/lib/app-utils/error-beacon.d.ts +107 -0
  302. package/src/lib/app-utils/error-beacon.js +296 -0
  303. package/src/lib/app-utils/error-beacon.js.map +1 -0
  304. package/src/lib/app-utils/expand-repeatables.d.ts +172 -0
  305. package/src/lib/app-utils/expand-repeatables.js +299 -0
  306. package/src/lib/app-utils/expand-repeatables.js.map +1 -0
  307. package/src/lib/app-utils/foreign-script.d.ts +82 -0
  308. package/src/lib/app-utils/foreign-script.js +102 -0
  309. package/src/lib/app-utils/foreign-script.js.map +1 -0
  310. package/src/lib/app-utils/form-abuse-ceiling.d.ts +146 -0
  311. package/src/lib/app-utils/form-abuse-ceiling.js +158 -0
  312. package/src/lib/app-utils/form-abuse-ceiling.js.map +1 -0
  313. package/src/lib/app-utils/form-contract.d.ts +198 -0
  314. package/src/lib/app-utils/form-contract.js +282 -0
  315. package/src/lib/app-utils/form-contract.js.map +1 -0
  316. package/src/lib/app-utils/form-dataset-binding.d.ts +50 -0
  317. package/src/lib/app-utils/form-dataset-binding.js +74 -0
  318. package/src/lib/app-utils/form-dataset-binding.js.map +1 -0
  319. package/src/lib/app-utils/forms.d.ts +727 -0
  320. package/src/lib/app-utils/forms.js +777 -0
  321. package/src/lib/app-utils/forms.js.map +1 -0
  322. package/src/lib/app-utils/functions.d.ts +188 -0
  323. package/src/lib/app-utils/functions.js +529 -0
  324. package/src/lib/app-utils/functions.js.map +1 -0
  325. package/src/lib/app-utils/guarded-version-save.d.ts +91 -0
  326. package/src/lib/app-utils/guarded-version-save.js +131 -0
  327. package/src/lib/app-utils/guarded-version-save.js.map +1 -0
  328. package/src/lib/app-utils/health-report.d.ts +1766 -0
  329. package/src/lib/app-utils/health-report.js +2072 -0
  330. package/src/lib/app-utils/health-report.js.map +1 -0
  331. package/src/lib/app-utils/host-naming.d.ts +135 -0
  332. package/src/lib/app-utils/host-naming.js +188 -0
  333. package/src/lib/app-utils/host-naming.js.map +1 -0
  334. package/src/lib/app-utils/host-permissions.d.ts +76 -0
  335. package/src/lib/app-utils/host-permissions.js +119 -0
  336. package/src/lib/app-utils/host-permissions.js.map +1 -0
  337. package/src/lib/app-utils/host-tokens.d.ts +228 -0
  338. package/src/lib/app-utils/host-tokens.js +304 -0
  339. package/src/lib/app-utils/host-tokens.js.map +1 -0
  340. package/src/lib/app-utils/idp-profile.d.ts +83 -0
  341. package/src/lib/app-utils/idp-profile.js +268 -0
  342. package/src/lib/app-utils/idp-profile.js.map +1 -0
  343. package/src/lib/app-utils/image-upload-types.d.ts +49 -0
  344. package/src/lib/app-utils/image-upload-types.js +86 -0
  345. package/src/lib/app-utils/image-upload-types.js.map +1 -0
  346. package/src/lib/app-utils/index.d.ts +18 -0
  347. package/src/lib/app-utils/index.js +23 -0
  348. package/src/lib/app-utils/index.js.map +1 -0
  349. package/src/lib/app-utils/internal-traffic.d.ts +197 -0
  350. package/src/lib/app-utils/internal-traffic.js +288 -0
  351. package/src/lib/app-utils/internal-traffic.js.map +1 -0
  352. package/src/lib/app-utils/lineal-order.d.ts +62 -0
  353. package/src/lib/app-utils/lineal-order.js +65 -0
  354. package/src/lib/app-utils/lineal-order.js.map +1 -0
  355. package/src/lib/app-utils/link-references.d.ts +36 -0
  356. package/src/lib/app-utils/link-references.js +89 -0
  357. package/src/lib/app-utils/link-references.js.map +1 -0
  358. package/src/lib/app-utils/link-target-search-context.d.ts +123 -0
  359. package/src/lib/app-utils/link-target-search-context.js +221 -0
  360. package/src/lib/app-utils/link-target-search-context.js.map +1 -0
  361. package/src/lib/app-utils/list-assignment-policy.d.ts +169 -0
  362. package/src/lib/app-utils/list-assignment-policy.js +170 -0
  363. package/src/lib/app-utils/list-assignment-policy.js.map +1 -0
  364. package/src/lib/app-utils/list-import.d.ts +158 -0
  365. package/src/lib/app-utils/list-import.js +332 -0
  366. package/src/lib/app-utils/list-import.js.map +1 -0
  367. package/src/lib/app-utils/llms-txt.d.ts +104 -0
  368. package/src/lib/app-utils/llms-txt.js +144 -0
  369. package/src/lib/app-utils/llms-txt.js.map +1 -0
  370. package/src/lib/app-utils/local-storage-budget.d.ts +75 -0
  371. package/src/lib/app-utils/local-storage-budget.js +153 -0
  372. package/src/lib/app-utils/local-storage-budget.js.map +1 -0
  373. package/src/lib/app-utils/lockdown.d.ts +698 -0
  374. package/src/lib/app-utils/lockdown.js +929 -0
  375. package/src/lib/app-utils/lockdown.js.map +1 -0
  376. package/src/lib/app-utils/margin-utilization.d.ts +267 -0
  377. package/src/lib/app-utils/margin-utilization.js +351 -0
  378. package/src/lib/app-utils/margin-utilization.js.map +1 -0
  379. package/src/lib/app-utils/markdown-lite.d.ts +297 -0
  380. package/src/lib/app-utils/markdown-lite.js +705 -0
  381. package/src/lib/app-utils/markdown-lite.js.map +1 -0
  382. package/src/lib/app-utils/marketing-consent.d.ts +704 -0
  383. package/src/lib/app-utils/marketing-consent.js +783 -0
  384. package/src/lib/app-utils/marketing-consent.js.map +1 -0
  385. package/src/lib/app-utils/marketplace-listing-visibility.d.ts +120 -0
  386. package/src/lib/app-utils/marketplace-listing-visibility.js +139 -0
  387. package/src/lib/app-utils/marketplace-listing-visibility.js.map +1 -0
  388. package/src/lib/app-utils/marketplace-overrides.d.ts +271 -0
  389. package/src/lib/app-utils/marketplace-overrides.js +462 -0
  390. package/src/lib/app-utils/marketplace-overrides.js.map +1 -0
  391. package/src/lib/app-utils/marketplace-provenance.d.ts +150 -0
  392. package/src/lib/app-utils/marketplace-provenance.js +136 -0
  393. package/src/lib/app-utils/marketplace-provenance.js.map +1 -0
  394. package/src/lib/app-utils/marketplace-theme.d.ts +237 -0
  395. package/src/lib/app-utils/marketplace-theme.js +525 -0
  396. package/src/lib/app-utils/marketplace-theme.js.map +1 -0
  397. package/src/lib/app-utils/marketplace-update-state.d.ts +119 -0
  398. package/src/lib/app-utils/marketplace-update-state.js +132 -0
  399. package/src/lib/app-utils/marketplace-update-state.js.map +1 -0
  400. package/src/lib/app-utils/marketplace-verification.d.ts +95 -0
  401. package/src/lib/app-utils/marketplace-verification.js +81 -0
  402. package/src/lib/app-utils/marketplace-verification.js.map +1 -0
  403. package/src/lib/app-utils/measure-node-map.d.ts +76 -0
  404. package/src/lib/app-utils/measure-node-map.js +111 -0
  405. package/src/lib/app-utils/measure-node-map.js.map +1 -0
  406. package/src/lib/app-utils/media-alt.d.ts +55 -0
  407. package/src/lib/app-utils/media-alt.js +58 -0
  408. package/src/lib/app-utils/media-alt.js.map +1 -0
  409. package/src/lib/app-utils/media-asset-facts.d.ts +125 -0
  410. package/src/lib/app-utils/media-asset-facts.js +467 -0
  411. package/src/lib/app-utils/media-asset-facts.js.map +1 -0
  412. package/src/lib/app-utils/media-cdn-scope.d.ts +65 -0
  413. package/src/lib/app-utils/media-cdn-scope.js +75 -0
  414. package/src/lib/app-utils/media-cdn-scope.js.map +1 -0
  415. package/src/lib/app-utils/media-folders.d.ts +161 -0
  416. package/src/lib/app-utils/media-folders.js +230 -0
  417. package/src/lib/app-utils/media-folders.js.map +1 -0
  418. package/src/lib/app-utils/media-metadata.d.ts +277 -0
  419. package/src/lib/app-utils/media-metadata.js +388 -0
  420. package/src/lib/app-utils/media-metadata.js.map +1 -0
  421. package/src/lib/app-utils/media-picker-context.d.ts +93 -0
  422. package/src/lib/app-utils/media-picker-context.js +26 -0
  423. package/src/lib/app-utils/media-picker-context.js.map +1 -0
  424. package/src/lib/app-utils/media-quarantine.d.ts +247 -0
  425. package/src/lib/app-utils/media-quarantine.js +323 -0
  426. package/src/lib/app-utils/media-quarantine.js.map +1 -0
  427. package/src/lib/app-utils/media-ref.d.ts +661 -0
  428. package/src/lib/app-utils/media-ref.js +1055 -0
  429. package/src/lib/app-utils/media-ref.js.map +1 -0
  430. package/src/lib/app-utils/media-takedown-reach.d.ts +126 -0
  431. package/src/lib/app-utils/media-takedown-reach.js +143 -0
  432. package/src/lib/app-utils/media-takedown-reach.js.map +1 -0
  433. package/src/lib/app-utils/member-email-aliases.d.ts +180 -0
  434. package/src/lib/app-utils/member-email-aliases.js +217 -0
  435. package/src/lib/app-utils/member-email-aliases.js.map +1 -0
  436. package/src/lib/app-utils/merge-node-sx.d.ts +47 -0
  437. package/src/lib/app-utils/merge-node-sx.js +123 -0
  438. package/src/lib/app-utils/merge-node-sx.js.map +1 -0
  439. package/src/lib/app-utils/name-match.d.ts +155 -0
  440. package/src/lib/app-utils/name-match.js +175 -0
  441. package/src/lib/app-utils/name-match.js.map +1 -0
  442. package/src/lib/app-utils/name-search.d.ts +117 -0
  443. package/src/lib/app-utils/name-search.js +145 -0
  444. package/src/lib/app-utils/name-search.js.map +1 -0
  445. package/src/lib/app-utils/node-capabilities.d.ts +85 -0
  446. package/src/lib/app-utils/node-capabilities.js +88 -0
  447. package/src/lib/app-utils/node-capabilities.js.map +1 -0
  448. package/src/lib/app-utils/node-definition-sanitizer.d.ts +164 -0
  449. package/src/lib/app-utils/node-definition-sanitizer.js +402 -0
  450. package/src/lib/app-utils/node-definition-sanitizer.js.map +1 -0
  451. package/src/lib/app-utils/node-identity.d.ts +47 -0
  452. package/src/lib/app-utils/node-identity.js +50 -0
  453. package/src/lib/app-utils/node-identity.js.map +1 -0
  454. package/src/lib/app-utils/node-interactions.d.ts +102 -0
  455. package/src/lib/app-utils/node-interactions.js +192 -0
  456. package/src/lib/app-utils/node-interactions.js.map +1 -0
  457. package/src/lib/app-utils/node-url-policy.d.ts +54 -0
  458. package/src/lib/app-utils/node-url-policy.js +72 -0
  459. package/src/lib/app-utils/node-url-policy.js.map +1 -0
  460. package/src/lib/app-utils/notifications.d.ts +71 -0
  461. package/src/lib/app-utils/notifications.js +101 -0
  462. package/src/lib/app-utils/notifications.js.map +1 -0
  463. package/src/lib/app-utils/onboarding-deep-link.d.ts +120 -0
  464. package/src/lib/app-utils/onboarding-deep-link.js +142 -0
  465. package/src/lib/app-utils/onboarding-deep-link.js.map +1 -0
  466. package/src/lib/app-utils/operator-identity.d.ts +207 -0
  467. package/src/lib/app-utils/operator-identity.js +186 -0
  468. package/src/lib/app-utils/operator-identity.js.map +1 -0
  469. package/src/lib/app-utils/org-billing-doc.d.ts +231 -0
  470. package/src/lib/app-utils/org-billing-doc.js +238 -0
  471. package/src/lib/app-utils/org-billing-doc.js.map +1 -0
  472. package/src/lib/app-utils/org-override-reason.d.ts +100 -0
  473. package/src/lib/app-utils/org-override-reason.js +116 -0
  474. package/src/lib/app-utils/org-override-reason.js.map +1 -0
  475. package/src/lib/app-utils/org-permissions.d.ts +194 -0
  476. package/src/lib/app-utils/org-permissions.js +357 -0
  477. package/src/lib/app-utils/org-permissions.js.map +1 -0
  478. package/src/lib/app-utils/org-roles.d.ts +72 -0
  479. package/src/lib/app-utils/org-roles.js +131 -0
  480. package/src/lib/app-utils/org-roles.js.map +1 -0
  481. package/src/lib/app-utils/organizations.d.ts +407 -0
  482. package/src/lib/app-utils/organizations.js +511 -0
  483. package/src/lib/app-utils/organizations.js.map +1 -0
  484. package/src/lib/app-utils/page-header-actions-context.d.ts +83 -0
  485. package/src/lib/app-utils/page-header-actions-context.js +58 -0
  486. package/src/lib/app-utils/page-header-actions-context.js.map +1 -0
  487. package/src/lib/app-utils/page-header-record-context.d.ts +80 -0
  488. package/src/lib/app-utils/page-header-record-context.js +64 -0
  489. package/src/lib/app-utils/page-header-record-context.js.map +1 -0
  490. package/src/lib/app-utils/page-markdown.d.ts +103 -0
  491. package/src/lib/app-utils/page-markdown.js +385 -0
  492. package/src/lib/app-utils/page-markdown.js.map +1 -0
  493. package/src/lib/app-utils/paid-media-source.d.ts +90 -0
  494. package/src/lib/app-utils/paid-media-source.js +184 -0
  495. package/src/lib/app-utils/paid-media-source.js.map +1 -0
  496. package/src/lib/app-utils/palette-sx.d.ts +34 -0
  497. package/src/lib/app-utils/palette-sx.js +150 -0
  498. package/src/lib/app-utils/palette-sx.js.map +1 -0
  499. package/src/lib/app-utils/password-policy.d.ts +47 -0
  500. package/src/lib/app-utils/password-policy.js +46 -0
  501. package/src/lib/app-utils/password-policy.js.map +1 -0
  502. package/src/lib/app-utils/payments-configured.d.ts +84 -0
  503. package/src/lib/app-utils/payments-configured.js +88 -0
  504. package/src/lib/app-utils/payments-configured.js.map +1 -0
  505. package/src/lib/app-utils/person-erasure.d.ts +126 -0
  506. package/src/lib/app-utils/person-erasure.js +121 -0
  507. package/src/lib/app-utils/person-erasure.js.map +1 -0
  508. package/src/lib/app-utils/person-key.d.ts +32 -0
  509. package/src/lib/app-utils/person-key.js +62 -0
  510. package/src/lib/app-utils/person-key.js.map +1 -0
  511. package/src/lib/app-utils/plan-entitlements.d.ts +2756 -0
  512. package/src/lib/app-utils/plan-entitlements.js +4085 -0
  513. package/src/lib/app-utils/plan-entitlements.js.map +1 -0
  514. package/src/lib/app-utils/platform-ad-conversions.d.ts +122 -0
  515. package/src/lib/app-utils/platform-ad-conversions.js +174 -0
  516. package/src/lib/app-utils/platform-ad-conversions.js.map +1 -0
  517. package/src/lib/app-utils/platform-advertising-tags.d.ts +139 -0
  518. package/src/lib/app-utils/platform-advertising-tags.js +203 -0
  519. package/src/lib/app-utils/platform-advertising-tags.js.map +1 -0
  520. package/src/lib/app-utils/platform-brand.d.ts +151 -0
  521. package/src/lib/app-utils/platform-brand.js +175 -0
  522. package/src/lib/app-utils/platform-brand.js.map +1 -0
  523. package/src/lib/app-utils/platform-consent-default.d.ts +142 -0
  524. package/src/lib/app-utils/platform-consent-default.js +295 -0
  525. package/src/lib/app-utils/platform-consent-default.js.map +1 -0
  526. package/src/lib/app-utils/platform-marketing-consent.d.ts +151 -0
  527. package/src/lib/app-utils/platform-marketing-consent.js +182 -0
  528. package/src/lib/app-utils/platform-marketing-consent.js.map +1 -0
  529. package/src/lib/app-utils/platform-marketing-host.d.ts +33 -0
  530. package/src/lib/app-utils/platform-marketing-host.js +97 -0
  531. package/src/lib/app-utils/platform-marketing-host.js.map +1 -0
  532. package/src/lib/app-utils/platform-visitor-consent.d.ts +252 -0
  533. package/src/lib/app-utils/platform-visitor-consent.js +533 -0
  534. package/src/lib/app-utils/platform-visitor-consent.js.map +1 -0
  535. package/src/lib/app-utils/plugin-api-cross-origin.d.ts +61 -0
  536. package/src/lib/app-utils/plugin-api-cross-origin.js +202 -0
  537. package/src/lib/app-utils/plugin-api-cross-origin.js.map +1 -0
  538. package/src/lib/app-utils/plugin-api-rate-limit.d.ts +192 -0
  539. package/src/lib/app-utils/plugin-api-rate-limit.js +270 -0
  540. package/src/lib/app-utils/plugin-api-rate-limit.js.map +1 -0
  541. package/src/lib/app-utils/plugin-artifact-path.d.ts +32 -0
  542. package/src/lib/app-utils/plugin-artifact-path.js +33 -0
  543. package/src/lib/app-utils/plugin-artifact-path.js.map +1 -0
  544. package/src/lib/app-utils/plugin-bundle-checks.d.ts +148 -0
  545. package/src/lib/app-utils/plugin-bundle-checks.js +989 -0
  546. package/src/lib/app-utils/plugin-bundle-checks.js.map +1 -0
  547. package/src/lib/app-utils/plugin-manifest.d.ts +516 -0
  548. package/src/lib/app-utils/plugin-manifest.js +687 -0
  549. package/src/lib/app-utils/plugin-manifest.js.map +1 -0
  550. package/src/lib/app-utils/published-legal-pages.d.ts +71 -0
  551. package/src/lib/app-utils/published-legal-pages.js +90 -0
  552. package/src/lib/app-utils/published-legal-pages.js.map +1 -0
  553. package/src/lib/app-utils/publisher-agreement.d.ts +254 -0
  554. package/src/lib/app-utils/publisher-agreement.js +274 -0
  555. package/src/lib/app-utils/publisher-agreement.js.map +1 -0
  556. package/src/lib/app-utils/publisher-attestation.d.ts +99 -0
  557. package/src/lib/app-utils/publisher-attestation.js +158 -0
  558. package/src/lib/app-utils/publisher-attestation.js.map +1 -0
  559. package/src/lib/app-utils/recipient-email-render.d.ts +216 -0
  560. package/src/lib/app-utils/recipient-email-render.js +221 -0
  561. package/src/lib/app-utils/recipient-email-render.js.map +1 -0
  562. package/src/lib/app-utils/redispatch-caught-error.d.ts +38 -0
  563. package/src/lib/app-utils/redispatch-caught-error.js +46 -0
  564. package/src/lib/app-utils/redispatch-caught-error.js.map +1 -0
  565. package/src/lib/app-utils/registering-plugin.d.ts +19 -0
  566. package/src/lib/app-utils/registering-plugin.js +38 -0
  567. package/src/lib/app-utils/registering-plugin.js.map +1 -0
  568. package/src/lib/app-utils/release-flags.d.ts +283 -0
  569. package/src/lib/app-utils/release-flags.js +518 -0
  570. package/src/lib/app-utils/release-flags.js.map +1 -0
  571. package/src/lib/app-utils/repair-canvas-nodes.d.ts +130 -0
  572. package/src/lib/app-utils/repair-canvas-nodes.js +298 -0
  573. package/src/lib/app-utils/repair-canvas-nodes.js.map +1 -0
  574. package/src/lib/app-utils/repeat-infringer.d.ts +166 -0
  575. package/src/lib/app-utils/repeat-infringer.js +188 -0
  576. package/src/lib/app-utils/repeat-infringer.js.map +1 -0
  577. package/src/lib/app-utils/repeat-sources.d.ts +115 -0
  578. package/src/lib/app-utils/repeat-sources.js +86 -0
  579. package/src/lib/app-utils/repeat-sources.js.map +1 -0
  580. package/src/lib/app-utils/request-geo.d.ts +114 -0
  581. package/src/lib/app-utils/request-geo.js +247 -0
  582. package/src/lib/app-utils/request-geo.js.map +1 -0
  583. package/src/lib/app-utils/request-ip.d.ts +213 -0
  584. package/src/lib/app-utils/request-ip.js +344 -0
  585. package/src/lib/app-utils/request-ip.js.map +1 -0
  586. package/src/lib/app-utils/resolve-named-tokens.d.ts +26 -0
  587. package/src/lib/app-utils/resolve-named-tokens.js +59 -0
  588. package/src/lib/app-utils/resolve-named-tokens.js.map +1 -0
  589. package/src/lib/app-utils/responsive-typography-sx.d.ts +77 -0
  590. package/src/lib/app-utils/responsive-typography-sx.js +122 -0
  591. package/src/lib/app-utils/responsive-typography-sx.js.map +1 -0
  592. package/src/lib/app-utils/reusable-component-keys.d.ts +135 -0
  593. package/src/lib/app-utils/reusable-component-keys.js +140 -0
  594. package/src/lib/app-utils/reusable-component-keys.js.map +1 -0
  595. package/src/lib/app-utils/reusable-prop-values.d.ts +199 -0
  596. package/src/lib/app-utils/reusable-prop-values.js +494 -0
  597. package/src/lib/app-utils/reusable-prop-values.js.map +1 -0
  598. package/src/lib/app-utils/safe-json-ld.d.ts +29 -0
  599. package/src/lib/app-utils/safe-json-ld.js +37 -0
  600. package/src/lib/app-utils/safe-json-ld.js.map +1 -0
  601. package/src/lib/app-utils/sanitize-svg.d.ts +55 -0
  602. package/src/lib/app-utils/sanitize-svg.js +460 -0
  603. package/src/lib/app-utils/sanitize-svg.js.map +1 -0
  604. package/src/lib/app-utils/scheme-sx.d.ts +84 -0
  605. package/src/lib/app-utils/scheme-sx.js +148 -0
  606. package/src/lib/app-utils/scheme-sx.js.map +1 -0
  607. package/src/lib/app-utils/scope-tokens.d.ts +249 -0
  608. package/src/lib/app-utils/scope-tokens.js +331 -0
  609. package/src/lib/app-utils/scope-tokens.js.map +1 -0
  610. package/src/lib/app-utils/screen-link-context-value.d.ts +57 -0
  611. package/src/lib/app-utils/screen-link-context-value.js +43 -0
  612. package/src/lib/app-utils/screen-link-context-value.js.map +1 -0
  613. package/src/lib/app-utils/screen-link-context.d.ts +185 -0
  614. package/src/lib/app-utils/screen-link-context.js +304 -0
  615. package/src/lib/app-utils/screen-link-context.js.map +1 -0
  616. package/src/lib/app-utils/screen-link-value.d.ts +269 -0
  617. package/src/lib/app-utils/screen-link-value.js +384 -0
  618. package/src/lib/app-utils/screen-link-value.js.map +1 -0
  619. package/src/lib/app-utils/screen-route.d.ts +669 -0
  620. package/src/lib/app-utils/screen-route.js +751 -0
  621. package/src/lib/app-utils/screen-route.js.map +1 -0
  622. package/src/lib/app-utils/screen-seo-fields.d.ts +37 -0
  623. package/src/lib/app-utils/screen-seo-fields.js +42 -0
  624. package/src/lib/app-utils/screen-seo-fields.js.map +1 -0
  625. package/src/lib/app-utils/search-indexing.d.ts +162 -0
  626. package/src/lib/app-utils/search-indexing.js +207 -0
  627. package/src/lib/app-utils/search-indexing.js.map +1 -0
  628. package/src/lib/app-utils/seo-listing-fields.d.ts +70 -0
  629. package/src/lib/app-utils/seo-listing-fields.js +75 -0
  630. package/src/lib/app-utils/seo-listing-fields.js.map +1 -0
  631. package/src/lib/app-utils/seo-locale.d.ts +119 -0
  632. package/src/lib/app-utils/seo-locale.js +133 -0
  633. package/src/lib/app-utils/seo-locale.js.map +1 -0
  634. package/src/lib/app-utils/seo-title-variables.d.ts +149 -0
  635. package/src/lib/app-utils/seo-title-variables.js +190 -0
  636. package/src/lib/app-utils/seo-title-variables.js.map +1 -0
  637. package/src/lib/app-utils/seo-title.d.ts +70 -0
  638. package/src/lib/app-utils/seo-title.js +117 -0
  639. package/src/lib/app-utils/seo-title.js.map +1 -0
  640. package/src/lib/app-utils/server.d.ts +174 -0
  641. package/src/lib/app-utils/server.js +314 -0
  642. package/src/lib/app-utils/server.js.map +1 -0
  643. package/src/lib/app-utils/site-context.d.ts +106 -0
  644. package/src/lib/app-utils/site-context.js +100 -0
  645. package/src/lib/app-utils/site-context.js.map +1 -0
  646. package/src/lib/app-utils/sitemap.d.ts +117 -0
  647. package/src/lib/app-utils/sitemap.js +183 -0
  648. package/src/lib/app-utils/sitemap.js.map +1 -0
  649. package/src/lib/app-utils/social-image.d.ts +112 -0
  650. package/src/lib/app-utils/social-image.js +191 -0
  651. package/src/lib/app-utils/social-image.js.map +1 -0
  652. package/src/lib/app-utils/starter-templates.d.ts +99 -0
  653. package/src/lib/app-utils/starter-templates.js +579 -0
  654. package/src/lib/app-utils/starter-templates.js.map +1 -0
  655. package/src/lib/app-utils/stored-nodes.d.ts +120 -0
  656. package/src/lib/app-utils/stored-nodes.js +174 -0
  657. package/src/lib/app-utils/stored-nodes.js.map +1 -0
  658. package/src/lib/app-utils/strip-undefined.d.ts +59 -0
  659. package/src/lib/app-utils/strip-undefined.js +95 -0
  660. package/src/lib/app-utils/strip-undefined.js.map +1 -0
  661. package/src/lib/app-utils/stripe-deployment-mode.d.ts +47 -0
  662. package/src/lib/app-utils/stripe-deployment-mode.js +70 -0
  663. package/src/lib/app-utils/stripe-deployment-mode.js.map +1 -0
  664. package/src/lib/app-utils/support-tiers.d.ts +108 -0
  665. package/src/lib/app-utils/support-tiers.js +201 -0
  666. package/src/lib/app-utils/support-tiers.js.map +1 -0
  667. package/src/lib/app-utils/timezone-geo-hint.d.ts +36 -0
  668. package/src/lib/app-utils/timezone-geo-hint.js +180 -0
  669. package/src/lib/app-utils/timezone-geo-hint.js.map +1 -0
  670. package/src/lib/app-utils/upload-cors.d.ts +155 -0
  671. package/src/lib/app-utils/upload-cors.js +254 -0
  672. package/src/lib/app-utils/upload-cors.js.map +1 -0
  673. package/src/lib/app-utils/upload-inspection.d.ts +159 -0
  674. package/src/lib/app-utils/upload-inspection.js +539 -0
  675. package/src/lib/app-utils/upload-inspection.js.map +1 -0
  676. package/src/lib/app-utils/url-slug.d.ts +40 -0
  677. package/src/lib/app-utils/url-slug.js +42 -0
  678. package/src/lib/app-utils/url-slug.js.map +1 -0
  679. package/src/lib/app-utils/usage-budget.d.ts +429 -0
  680. package/src/lib/app-utils/usage-budget.js +421 -0
  681. package/src/lib/app-utils/usage-budget.js.map +1 -0
  682. package/src/lib/app-utils/variables.d.ts +96 -0
  683. package/src/lib/app-utils/variables.js +233 -0
  684. package/src/lib/app-utils/variables.js.map +1 -0
  685. package/src/lib/app-utils/video-asset-facts.d.ts +61 -0
  686. package/src/lib/app-utils/video-asset-facts.js +70 -0
  687. package/src/lib/app-utils/video-asset-facts.js.map +1 -0
  688. package/src/lib/app-utils/video-object.d.ts +89 -0
  689. package/src/lib/app-utils/video-object.js +245 -0
  690. package/src/lib/app-utils/video-object.js.map +1 -0
  691. package/src/lib/app-utils/visitor-consent.d.ts +757 -0
  692. package/src/lib/app-utils/visitor-consent.js +981 -0
  693. package/src/lib/app-utils/visitor-consent.js.map +1 -0
  694. package/src/lib/app-utils/visitor-record-ceiling.d.ts +223 -0
  695. package/src/lib/app-utils/visitor-record-ceiling.js +215 -0
  696. package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -0
  697. package/src/lib/app-utils/web-vitals-rum.d.ts +53 -0
  698. package/src/lib/app-utils/web-vitals-rum.js +278 -0
  699. package/src/lib/app-utils/web-vitals-rum.js.map +1 -0
  700. package/src/lib/app-utils/webhook-delivery.d.ts +324 -0
  701. package/src/lib/app-utils/webhook-delivery.js +413 -0
  702. package/src/lib/app-utils/webhook-delivery.js.map +1 -0
  703. package/src/lib/app-utils/where-used.d.ts +57 -0
  704. package/src/lib/app-utils/where-used.js +59 -0
  705. package/src/lib/app-utils/where-used.js.map +1 -0
  706. package/src/lib/app-utils/wistia-embed.d.ts +86 -0
  707. package/src/lib/app-utils/wistia-embed.js +119 -0
  708. package/src/lib/app-utils/wistia-embed.js.map +1 -0
  709. package/src/lib/app-utils/workflows.d.ts +136 -0
  710. package/src/lib/app-utils/workflows.js +346 -0
  711. package/src/lib/app-utils/workflows.js.map +1 -0
  712. package/src/lib/canvas-manager/canvas-manager-tree.d.ts +109 -0
  713. package/src/lib/canvas-manager/canvas-manager-tree.js +139 -0
  714. package/src/lib/canvas-manager/canvas-manager-tree.js.map +1 -0
  715. package/src/lib/canvas-manager/canvas-manager.d.ts +549 -0
  716. package/src/lib/canvas-manager/canvas-manager.js +1311 -0
  717. package/src/lib/canvas-manager/canvas-manager.js.map +1 -0
  718. package/src/lib/canvas-manager/index.d.ts +20 -0
  719. package/src/lib/canvas-manager/index.js +21 -0
  720. package/src/lib/canvas-manager/index.js.map +1 -0
  721. package/src/lib/canvas-manager/stores/index.d.ts +17 -0
  722. package/src/lib/canvas-manager/stores/index.js +18 -0
  723. package/src/lib/canvas-manager/stores/index.js.map +1 -0
  724. package/src/lib/canvas-manager/stores/node.store.d.ts +30 -0
  725. package/src/lib/canvas-manager/stores/node.store.js +45 -0
  726. package/src/lib/canvas-manager/stores/node.store.js.map +1 -0
  727. package/src/lib/components-manager/components-manager.d.ts +56 -0
  728. package/src/lib/components-manager/components-manager.js +191 -0
  729. package/src/lib/components-manager/components-manager.js.map +1 -0
  730. package/src/lib/components-manager/index.d.ts +18 -0
  731. package/src/lib/components-manager/index.js +19 -0
  732. package/src/lib/components-manager/index.js.map +1 -0
  733. package/src/lib/emit-manager/emit-manager.d.ts +56 -0
  734. package/src/lib/emit-manager/emit-manager.js +60 -0
  735. package/src/lib/emit-manager/emit-manager.js.map +1 -0
  736. package/src/lib/emit-manager/index.d.ts +18 -0
  737. package/src/lib/emit-manager/index.js +19 -0
  738. package/src/lib/emit-manager/index.js.map +1 -0
  739. package/src/lib/foundation/constants/_internal.d.ts +18 -0
  740. package/src/lib/foundation/constants/_internal.js +62 -0
  741. package/src/lib/foundation/constants/_internal.js.map +1 -0
  742. package/src/lib/foundation/constants/app.d.ts +23 -0
  743. package/src/lib/foundation/constants/app.js +25 -0
  744. package/src/lib/foundation/constants/app.js.map +1 -0
  745. package/src/lib/foundation/constants/canvas.d.ts +18 -0
  746. package/src/lib/foundation/constants/canvas.js +18 -0
  747. package/src/lib/foundation/constants/canvas.js.map +1 -0
  748. package/src/lib/foundation/constants/components.d.ts +54 -0
  749. package/src/lib/foundation/constants/components.js +61 -0
  750. package/src/lib/foundation/constants/components.js.map +1 -0
  751. package/src/lib/foundation/constants/shared.d.ts +50 -0
  752. package/src/lib/foundation/constants/shared.js +49 -0
  753. package/src/lib/foundation/constants/shared.js.map +1 -0
  754. package/src/lib/foundation/constants/symbol.d.ts +63 -0
  755. package/src/lib/foundation/constants/symbol.js +75 -0
  756. package/src/lib/foundation/constants/symbol.js.map +1 -0
  757. package/src/lib/foundation/definitions/components.types.d.ts +372 -0
  758. package/src/lib/foundation/definitions/components.types.js +180 -0
  759. package/src/lib/foundation/definitions/components.types.js.map +1 -0
  760. package/src/lib/foundation/definitions/contact.types.d.ts +73 -0
  761. package/src/lib/foundation/definitions/contact.types.js +107 -0
  762. package/src/lib/foundation/definitions/contact.types.js.map +1 -0
  763. package/src/lib/foundation/definitions/host-content-collections.d.ts +137 -0
  764. package/src/lib/foundation/definitions/host-content-collections.js +219 -0
  765. package/src/lib/foundation/definitions/host-content-collections.js.map +1 -0
  766. package/src/lib/foundation/definitions/org-billing.types.d.ts +1361 -0
  767. package/src/lib/foundation/definitions/org-billing.types.js +77 -0
  768. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -0
  769. package/src/lib/foundation/definitions/organization.types.d.ts +307 -0
  770. package/src/lib/foundation/definitions/organization.types.js +42 -0
  771. package/src/lib/foundation/definitions/organization.types.js.map +1 -0
  772. package/src/lib/foundation/definitions/platform.types.d.ts +1326 -0
  773. package/src/lib/foundation/definitions/platform.types.js +124 -0
  774. package/src/lib/foundation/definitions/platform.types.js.map +1 -0
  775. package/src/lib/foundation/definitions/property-kinds.d.ts +189 -0
  776. package/src/lib/foundation/definitions/property-kinds.js +565 -0
  777. package/src/lib/foundation/definitions/property-kinds.js.map +1 -0
  778. package/src/lib/foundation/definitions/shared.d.ts +23 -0
  779. package/src/lib/foundation/definitions/shared.js +18 -0
  780. package/src/lib/foundation/definitions/shared.js.map +1 -0
  781. package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +249 -0
  782. package/src/lib/foundation/definitions/write-deny-coverage.util.js +499 -0
  783. package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -0
  784. package/src/lib/foundation/index.d.ts +32 -0
  785. package/src/lib/foundation/index.js +67 -0
  786. package/src/lib/foundation/index.js.map +1 -0
  787. package/src/lib/lifecycle.d.ts +24 -0
  788. package/src/lib/lifecycle.js +39 -0
  789. package/src/lib/lifecycle.js.map +1 -0
  790. package/src/lib/mst/common.d.ts +17 -0
  791. package/src/lib/mst/common.js +23 -0
  792. package/src/lib/mst/common.js.map +1 -0
  793. package/src/lib/mst/index.d.ts +19 -0
  794. package/src/lib/mst/index.js +20 -0
  795. package/src/lib/mst/index.js.map +1 -0
  796. package/src/lib/mst/json.d.ts +22 -0
  797. package/src/lib/mst/json.js +23 -0
  798. package/src/lib/mst/json.js.map +1 -0
  799. package/src/lib/mst/types.d.ts +20 -0
  800. package/src/lib/mst/types.js +18 -0
  801. package/src/lib/mst/types.js.map +1 -0
  802. package/src/lib/plugin-manager/billing-webhook-hooks.d.ts +77 -0
  803. package/src/lib/plugin-manager/billing-webhook-hooks.js +55 -0
  804. package/src/lib/plugin-manager/billing-webhook-hooks.js.map +1 -0
  805. package/src/lib/plugin-manager/commerce-zone-props.d.ts +172 -0
  806. package/src/lib/plugin-manager/commerce-zone-props.js +31 -0
  807. package/src/lib/plugin-manager/commerce-zone-props.js.map +1 -0
  808. package/src/lib/plugin-manager/custom-fields.d.ts +60 -0
  809. package/src/lib/plugin-manager/custom-fields.js +39 -0
  810. package/src/lib/plugin-manager/custom-fields.js.map +1 -0
  811. package/src/lib/plugin-manager/editor-sessions.d.ts +109 -0
  812. package/src/lib/plugin-manager/editor-sessions.js +137 -0
  813. package/src/lib/plugin-manager/editor-sessions.js.map +1 -0
  814. package/src/lib/plugin-manager/enabled-plugins.d.ts +438 -0
  815. package/src/lib/plugin-manager/enabled-plugins.js +403 -0
  816. package/src/lib/plugin-manager/enabled-plugins.js.map +1 -0
  817. package/src/lib/plugin-manager/feature-plugins.d.ts +1314 -0
  818. package/src/lib/plugin-manager/feature-plugins.js +609 -0
  819. package/src/lib/plugin-manager/feature-plugins.js.map +1 -0
  820. package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +11 -0
  821. package/src/lib/plugin-manager/first-party-plugins.generated.js +149 -0
  822. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -0
  823. package/src/lib/plugin-manager/index.d.ts +42 -0
  824. package/src/lib/plugin-manager/index.js +46 -0
  825. package/src/lib/plugin-manager/index.js.map +1 -0
  826. package/src/lib/plugin-manager/install-presets.d.ts +93 -0
  827. package/src/lib/plugin-manager/install-presets.js +86 -0
  828. package/src/lib/plugin-manager/install-presets.js.map +1 -0
  829. package/src/lib/plugin-manager/media-delivery-provider.d.ts +124 -0
  830. package/src/lib/plugin-manager/media-delivery-provider.js +53 -0
  831. package/src/lib/plugin-manager/media-delivery-provider.js.map +1 -0
  832. package/src/lib/plugin-manager/order-fulfilment.d.ts +142 -0
  833. package/src/lib/plugin-manager/order-fulfilment.js +104 -0
  834. package/src/lib/plugin-manager/order-fulfilment.js.map +1 -0
  835. package/src/lib/plugin-manager/plugin-activity-actions.d.ts +122 -0
  836. package/src/lib/plugin-manager/plugin-activity-actions.js +140 -0
  837. package/src/lib/plugin-manager/plugin-activity-actions.js.map +1 -0
  838. package/src/lib/plugin-manager/plugin-bridge.d.ts +98 -0
  839. package/src/lib/plugin-manager/plugin-bridge.js +154 -0
  840. package/src/lib/plugin-manager/plugin-bridge.js.map +1 -0
  841. package/src/lib/plugin-manager/plugin-config.d.ts +148 -0
  842. package/src/lib/plugin-manager/plugin-config.js +228 -0
  843. package/src/lib/plugin-manager/plugin-config.js.map +1 -0
  844. package/src/lib/plugin-manager/plugin-console-crons.d.ts +139 -0
  845. package/src/lib/plugin-manager/plugin-console-crons.js +177 -0
  846. package/src/lib/plugin-manager/plugin-console-crons.js.map +1 -0
  847. package/src/lib/plugin-manager/plugin-contact-capture.d.ts +220 -0
  848. package/src/lib/plugin-manager/plugin-contact-capture.js +89 -0
  849. package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -0
  850. package/src/lib/plugin-manager/plugin-contributions.d.ts +244 -0
  851. package/src/lib/plugin-manager/plugin-contributions.js +283 -0
  852. package/src/lib/plugin-manager/plugin-contributions.js.map +1 -0
  853. package/src/lib/plugin-manager/plugin-entitlement-keys.d.ts +169 -0
  854. package/src/lib/plugin-manager/plugin-entitlement-keys.js +84 -0
  855. package/src/lib/plugin-manager/plugin-entitlement-keys.js.map +1 -0
  856. package/src/lib/plugin-manager/plugin-entitlements.d.ts +181 -0
  857. package/src/lib/plugin-manager/plugin-entitlements.js +188 -0
  858. package/src/lib/plugin-manager/plugin-entitlements.js.map +1 -0
  859. package/src/lib/plugin-manager/plugin-events.d.ts +145 -0
  860. package/src/lib/plugin-manager/plugin-events.js +79 -0
  861. package/src/lib/plugin-manager/plugin-events.js.map +1 -0
  862. package/src/lib/plugin-manager/plugin-figures.d.ts +251 -0
  863. package/src/lib/plugin-manager/plugin-figures.js +252 -0
  864. package/src/lib/plugin-manager/plugin-figures.js.map +1 -0
  865. package/src/lib/plugin-manager/plugin-host-collections.d.ts +146 -0
  866. package/src/lib/plugin-manager/plugin-host-collections.js +116 -0
  867. package/src/lib/plugin-manager/plugin-host-collections.js.map +1 -0
  868. package/src/lib/plugin-manager/plugin-jobs.d.ts +130 -0
  869. package/src/lib/plugin-manager/plugin-jobs.js +182 -0
  870. package/src/lib/plugin-manager/plugin-jobs.js.map +1 -0
  871. package/src/lib/plugin-manager/plugin-loader.d.ts +86 -0
  872. package/src/lib/plugin-manager/plugin-loader.js +223 -0
  873. package/src/lib/plugin-manager/plugin-loader.js.map +1 -0
  874. package/src/lib/plugin-manager/plugin-manager.d.ts +95 -0
  875. package/src/lib/plugin-manager/plugin-manager.js +343 -0
  876. package/src/lib/plugin-manager/plugin-manager.js.map +1 -0
  877. package/src/lib/plugin-manager/plugin-metered-lines.d.ts +97 -0
  878. package/src/lib/plugin-manager/plugin-metered-lines.js +123 -0
  879. package/src/lib/plugin-manager/plugin-metered-lines.js.map +1 -0
  880. package/src/lib/plugin-manager/plugin-org-erasure.d.ts +52 -0
  881. package/src/lib/plugin-manager/plugin-org-erasure.js +100 -0
  882. package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -0
  883. package/src/lib/plugin-manager/plugin-permissions.d.ts +69 -0
  884. package/src/lib/plugin-manager/plugin-permissions.js +77 -0
  885. package/src/lib/plugin-manager/plugin-permissions.js.map +1 -0
  886. package/src/lib/plugin-manager/plugin-person-erasure.d.ts +58 -0
  887. package/src/lib/plugin-manager/plugin-person-erasure.js +109 -0
  888. package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -0
  889. package/src/lib/plugin-manager/plugin-record-cards.d.ts +99 -0
  890. package/src/lib/plugin-manager/plugin-record-cards.js +59 -0
  891. package/src/lib/plugin-manager/plugin-record-cards.js.map +1 -0
  892. package/src/lib/plugin-manager/plugin-record-facts.d.ts +111 -0
  893. package/src/lib/plugin-manager/plugin-record-facts.js +51 -0
  894. package/src/lib/plugin-manager/plugin-record-facts.js.map +1 -0
  895. package/src/lib/plugin-manager/plugin-record-routes.d.ts +129 -0
  896. package/src/lib/plugin-manager/plugin-record-routes.js +93 -0
  897. package/src/lib/plugin-manager/plugin-record-routes.js.map +1 -0
  898. package/src/lib/plugin-manager/plugin-record-timeline.d.ts +147 -0
  899. package/src/lib/plugin-manager/plugin-record-timeline.js +39 -0
  900. package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -0
  901. package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +137 -0
  902. package/src/lib/plugin-manager/plugin-resource-drafts.js +51 -0
  903. package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -0
  904. package/src/lib/plugin-manager/plugin-services.d.ts +94 -0
  905. package/src/lib/plugin-manager/plugin-services.js +153 -0
  906. package/src/lib/plugin-manager/plugin-services.js.map +1 -0
  907. package/src/lib/plugin-manager/plugin-styles-ui.d.ts +71 -0
  908. package/src/lib/plugin-manager/plugin-styles-ui.js +80 -0
  909. package/src/lib/plugin-manager/plugin-styles-ui.js.map +1 -0
  910. package/src/lib/plugin-manager/plugin-styles.d.ts +176 -0
  911. package/src/lib/plugin-manager/plugin-styles.js +186 -0
  912. package/src/lib/plugin-manager/plugin-styles.js.map +1 -0
  913. package/src/lib/plugin-manager/plugin-subprocessors.d.ts +135 -0
  914. package/src/lib/plugin-manager/plugin-subprocessors.js +129 -0
  915. package/src/lib/plugin-manager/plugin-subprocessors.js.map +1 -0
  916. package/src/lib/plugin-manager/plugin-tax-profile.d.ts +84 -0
  917. package/src/lib/plugin-manager/plugin-tax-profile.js +39 -0
  918. package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -0
  919. package/src/lib/plugin-manager/plugin-user-erasure.d.ts +53 -0
  920. package/src/lib/plugin-manager/plugin-user-erasure.js +84 -0
  921. package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -0
  922. package/src/lib/plugin-manager/plugin-zones.d.ts +121 -0
  923. package/src/lib/plugin-manager/plugin-zones.js +74 -0
  924. package/src/lib/plugin-manager/plugin-zones.js.map +1 -0
  925. package/src/lib/plugin-manager/realm-plugins.d.ts +112 -0
  926. package/src/lib/plugin-manager/realm-plugins.js +196 -0
  927. package/src/lib/plugin-manager/realm-plugins.js.map +1 -0
  928. package/src/lib/plugin-manager/realm-server.d.ts +54 -0
  929. package/src/lib/plugin-manager/realm-server.js +88 -0
  930. package/src/lib/plugin-manager/realm-server.js.map +1 -0
  931. package/src/lib/plugin-manager/record-zone-props.d.ts +126 -0
  932. package/src/lib/plugin-manager/record-zone-props.js +31 -0
  933. package/src/lib/plugin-manager/record-zone-props.js.map +1 -0
  934. package/src/lib/plugin-manager/site-page-hooks.d.ts +102 -0
  935. package/src/lib/plugin-manager/site-page-hooks.js +114 -0
  936. package/src/lib/plugin-manager/site-page-hooks.js.map +1 -0
  937. package/src/lib/plugin-manager/site-runtime.d.ts +57 -0
  938. package/src/lib/plugin-manager/site-runtime.js +25 -0
  939. package/src/lib/plugin-manager/site-runtime.js.map +1 -0
  940. package/src/lib/plugin-manager/usage-alert-contributors.d.ts +115 -0
  941. package/src/lib/plugin-manager/usage-alert-contributors.js +106 -0
  942. package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -0
  943. package/src/lib/types/ast.d.ts +199 -0
  944. package/src/lib/types/ast.js +20 -0
  945. package/src/lib/types/ast.js.map +1 -0
  946. package/src/lib/types/index.d.ts +20 -0
  947. package/src/lib/types/index.js +21 -0
  948. package/src/lib/types/index.js.map +1 -0
  949. package/src/lib/types/nodes.d.ts +608 -0
  950. package/src/lib/types/nodes.js +28 -0
  951. package/src/lib/types/nodes.js.map +1 -0
  952. package/src/lib/types/routing.d.ts +17 -0
  953. package/src/lib/types/routing.js +18 -0
  954. package/src/lib/types/routing.js.map +1 -0
  955. package/src/lib/types/screen.d.ts +23 -0
  956. package/src/lib/types/screen.js +18 -0
  957. package/src/lib/types/screen.js.map +1 -0
  958. package/src/lib/utils.d.ts +25 -0
  959. package/src/lib/utils.js +42 -0
  960. package/src/lib/utils.js.map +1 -0
  961. package/src/server.d.ts +37 -0
  962. package/src/server.js +55 -0
  963. package/src/server.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/collection-entries.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { AglynNodeSchema, NodeId } from '../foundation'\nimport {\n COLLECTION_ENTRY_DATE_FORMAT_DEFAULT,\n type CollectionEntryDateFormat,\n collectionEntryPublishedAtIso,\n formatCollectionEntryDate,\n normalizeCollectionEntryDateFormat,\n} from './collection-entry-date'\nimport {\n type ContentAuthorLink,\n type ContentAuthorRecord,\n contentAuthorPageUrl,\n normalizeContentAuthorLinks,\n} from './content-authors'\nimport { resolveNamedTokens } from './resolve-named-tokens'\n\nexport * from './collection-entry-date'\n\n/**\n * Persisted component id of the \"Collection entries\" repeater block\n * (plugins-mui). Like `layoutSlot`, the id lives here so the tenant compose\n * pipeline can find the block without importing the component bundle.\n */\nexport const COLLECTION_ENTRIES_COMPONENT_ID = 'collectionEntries'\n\n/** Persisted component id of the markdown \"Entry body\" block (plugins-mui). */\nexport const COLLECTION_ENTRY_BODY_COMPONENT_ID = 'collectionEntryBody'\n\n/**\n * Persisted component id of the \"Related posts\" block (plugins-mui,\n * AGL-582). The compose pipeline stamps the related entries onto the node,\n * so the id lives here like the entries/body blocks.\n */\nexport const COLLECTION_RELATED_COMPONENT_ID = 'collectionRelated'\n\n/** Persisted component id of the share-bar block (plugins-mui, AGL-582). */\nexport const COLLECTION_SHARE_COMPONENT_ID = 'collectionShare'\n\n/** Persisted component id of the entry-meta block (plugins-mui, AGL-582). */\nexport const COLLECTION_ENTRY_META_COMPONENT_ID = 'collectionEntryMeta'\n\n/**\n * Persisted component id of the author card that closes an article\n * (plugins-mui, AGL-2486).\n *\n * Entry Meta prints the byline — a NAME, on one line, beside the date. The\n * author record it now resolves against carries a portrait, a bio, a job\n * title and a url, and none of those have anywhere to render: a template that\n * wanted the card the article frame draws had to type the name and the blurb\n * as literal text, which then said \"The Aglyn Team\" under a post somebody\n * else wrote and went stale the moment the author record was edited. The id\n * lives here, with the other collection blocks, so the compose pipeline can\n * fill the card without importing the bundle.\n */\nexport const COLLECTION_ENTRY_AUTHOR_COMPONENT_ID = 'collectionEntryAuthor'\n\n/**\n * Persisted component id of the \"Category Pills\" block (plugins-mui,\n * AGL-1321). Like the entries repeater, the id lives here so the tenant\n * compose pipeline can stamp the block's links without importing the bundle.\n */\nexport const COLLECTION_CATEGORIES_COMPONENT_ID = 'collectionCategories'\n\n/**\n * Persisted component id of the standalone \"Collection Search\" block\n * (plugins-mui, AGL-1516).\n *\n * The Collection Entries block grew its own search box first, and it renders\n * INSIDE that block — first child of the block's own stack. Figma 494:1220\n * puts the field in the listing's toolbar row instead, beside the RSS button\n * with the category pills opposite it, and no amount of authoring can lift a\n * block's own child out of it. The pills cannot move the other way either:\n * every child of an entries block is cloned once per entry.\n *\n * So the field became a block an author can put where the frame draws it.\n * Suggestion-panel only, by construction rather than by omission — a\n * standalone box has no clones to hide, so `filter` is a thing it genuinely\n * cannot do, and the one behaviour it does have is the toolbar behaviour the\n * frame asks for.\n */\nexport const COLLECTION_SEARCH_COMPONENT_ID = 'collectionSearch'\n\n/**\n * Reserved list sub-paths (AGL-620 `page`, AGL-1321 `category`). Both are\n * only reserved as the HEAD of a longer path, so an entry legitimately\n * slugged `page` or `category` keeps serving at `/{collection}/{entry}`.\n */\nexport const COLLECTION_PAGE_ROUTE_SEGMENT = 'page'\nexport const COLLECTION_CATEGORY_ROUTE_SEGMENT = 'category'\n\n/** Namespaces cloned template ids per container/entry (cf. `rep__`). */\nexport const COLLECTION_ENTRIES_NODE_ID_PREFIX = 'centry__'\n\n/** Hard bound on entries a single block renders, before `entriesLimit`. */\nexport const COLLECTION_ENTRIES_MAX = 100\n\n/**\n * Hard bound on the entries one READ of a collection returns (AGL-1516) — the\n * `.limit()` the tenant's live-entries query carries.\n *\n * Named here, beside the render bound it has always silently matched, because\n * a search index has to know the difference. The render bound is a choice\n * about a block; this one is a choice about the DATA, and a set that reaches\n * it is a set nobody has seen all of. Two 100s that happened to agree meant\n * `entries.length === 100` could be read either as \"this collection has 100\n * entries\" or \"this read stopped at 100\", and the honest empty state turns on\n * exactly that distinction.\n */\nexport const COLLECTION_SOURCE_MAX = 100\n\n/**\n * Whether a collection source is a COMPLETE read or a bounded one\n * (AGL-1516) — true when the read came back holding its own limit, which is\n * the only signal a limited query without a count leaves behind.\n *\n * Deliberately errs toward \"bounded\": a collection of exactly\n * {@link COLLECTION_SOURCE_MAX} entries answers true and gets described one\n * notch more cautiously than it needed. Overstating what a search covered is\n * the failure that renders as a confident \"nothing matched\".\n */\nexport function collectionSourceReachedBound(\n entries: readonly unknown[] | undefined,\n): boolean {\n return (entries?.length ?? 0) >= COLLECTION_SOURCE_MAX\n}\n\n/**\n * Whether the read behind a collection source was a bounded one (AGL-1516),\n * asking the READER first and only then falling back to counting.\n *\n * The count is a proxy, and it under-reports in two ways that both landed\n * after `collectionSourceReachedBound` was written:\n *\n * 1. The query takes `status in ['published', 'scheduled']` and the loader\n * then drops what is not live yet — a future `publishAt`, or since AGL-471\n * a due schedule the plan does not carry. A read that came back holding\n * its full 100 docs can therefore hand over 96 entries, and 96 does not\n * look like a ceiling. A blog with a scheduling queue is exactly the site\n * that hits this.\n * 2. A category route filters `entries` before compose ever sees them, so the\n * \"raw set\" the entries block is careful to measure is already narrowed.\n *\n * Both make the flag read FALSE on a read that really did stop at its bound,\n * and false is the direction that produces the confident \"nothing matched\"\n * this signal exists to prevent. So `reachedBound` is threaded down from the\n * query that owns the fact, and the count survives only as the fallback for a\n * source that predates it — a payload cached before this shipped, or a caller\n * that assembles a source by hand.\n */\nexport function collectionSourceIsBounded(\n source: Pick<CollectionEntriesSource, 'entries' | 'reachedBound'> | undefined,\n): boolean {\n if (source?.reachedBound) return true\n return collectionSourceReachedBound(source?.entries)\n}\n\n/** Default entries per page for a paginated collection list (AGL-620). */\nexport const COLLECTION_LIST_PAGE_SIZE = 10\n\n/**\n * Total pages for `total` entries at `perPage` per page — at least 1 so an\n * empty collection still has a page 1 (AGL-620).\n */\nexport function collectionTotalPages(total: number, perPage: number): number {\n if (perPage <= 0) return 1\n return Math.max(1, Math.ceil(total / perPage))\n}\n\n/** Default/most related posts a Related posts block renders (AGL-582). */\nexport const COLLECTION_RELATED_DEFAULT_LIMIT = 3\nexport const COLLECTION_RELATED_MAX = 12\n\n/** Most categories a collection's taxonomy holds (AGL-582). */\nexport const COLLECTION_CATEGORIES_MAX = 50\n\n/**\n * One taxonomy category on a COLLECTION doc (AGL-582): `id` is the stable\n * slug-like key entries reference (`categoryId`), generated once from the\n * initial name and never changed; `name` is the display label and freely\n * renameable. Stored as an array to preserve author-defined ordering.\n */\nexport interface CollectionCategory {\n id: string\n name: string\n /**\n * What this category's listing is about, for the `<meta name=\"description\">`\n * of `/{collection}/category/{slug}`.\n *\n * Without one every filtered listing on a site inherits the list template\n * screen's description — six `/blog/category/*` URLs all described as \"the\n * blog\", which is the same duplicate-result problem the composed category\n * TITLE was introduced to solve (AGL-1321), one tag over. Optional, and the\n * template's description remains the fallback: a category nobody has\n * described is better summarized by the list it filters than by nothing.\n */\n description?: string\n}\n\n/**\n * How many LIVE entries one content collection may hold (AGL-2266).\n *\n * `hosts/{hostId}/collections/{cid}/entries/{eid}` had a DEDICATED rules block\n * re-granting `create` to any editor, client-direct — deliberately, because the\n * name-based exclusions on the host catch-all must not reach entries — so it\n * was the one quota-governed shape under a host with no quota at all. A free\n * org could mint unbounded Firestore documents from the browser.\n *\n * This is a flat PLATFORM cap, not a plan dimension. AGL-1387 declined\n * `collectionsPerHost` and this does not re-open it: nothing here is priced,\n * no `OrgEntitlements` key is added, and every plan gets the same number. It is\n * the `WEBHOOK_MAX_PER_HOST` (AGL-1360) / `NON_PAGE_SCREEN_MAX_PER_HOST`\n * (AGL-1399) shape, which both issues invented for exactly this: uncapped\n * infrastructure behind a $0 subscription.\n *\n * ## Per COLLECTION, paired with {@link COLLECTIONS_MAX_PER_HOST}\n *\n * A per-HOST entry cap would need a count across every collection the host\n * holds, which is a collection-group read the entry documents carry no `hostId`\n * to scope. Per collection is one `count()` on the collection the create is\n * addressed to — the same read every other cap on `/api/hosts/resources`\n * already pays — and the host is bounded by the PRODUCT of the two numbers,\n * which is why the sibling cap had to land in the same change. One of the two\n * alone bounds nothing: unbounded collections each holding 10,000 entries is\n * the same unbounded store, spelled differently.\n *\n * ## Why 10,000\n *\n * A blog publishing daily reaches it after twenty-seven years; the largest\n * content collection in production holds double digits. The failure mode of a\n * flat cap set too low is blocking real authoring with an error the price list\n * cannot explain, so it is sized to the heaviest plausible library rather than\n * to today's data. It also bounds the cost of the console's own listing, which\n * reads entries with `limit(200)` and would otherwise page through a store with\n * no ceiling.\n */\nexport const ENTRIES_MAX_PER_COLLECTION = 10000\n\n/**\n * How many LIVE content collections one host may hold (AGL-2266).\n *\n * The other half of the entry bound above, and the reason it means anything.\n * Collection creation was already server-owned — the rules deny client `create`\n * and `/api/hosts/collections` claims the slug transactionally (AGL-978) — so\n * the collection had a WRITER with authority and simply no number to enforce.\n *\n * Again a platform cap and not `collectionsPerHost`: AGL-1387 decided\n * collections are not a thing customers are charged for, and that decision is\n * untouched. 100 is far past any real site's taxonomy — production's busiest\n * host has a handful — and short enough that the entries ceiling above\n * multiplies out to a bounded store rather than an unbounded one.\n */\nexport const COLLECTIONS_MAX_PER_HOST = 100\n\n/**\n * One published content-collection entry as the compose pipeline sees it\n * (AGL-551). Mirrors the tenant's `CollectionEntrySummary` without the\n * Firestore dependency so the expansion stays pure.\n */\nexport interface CollectionEntryRecord {\n $id?: string\n title?: string\n slug?: string\n excerpt?: string\n /**\n * Per-entry byline (AGL-686); falls back to the site as author.\n *\n * Since AGL-2486 this is either the legacy free-typed string or the NAME of\n * the author record `authorId` points at, denormalized by the tenant runtime\n * so the byline block, the `{{entry.author}}` token and the RSS feed all\n * keep reading one field.\n */\n authorName?: string\n /**\n * Reference into `hosts/{hostId}/authors` (AGL-2486) — the custom author\n * this entry publishes under. Absent on every entry written before it, and\n * on any entry whose editor chose a one-off byline instead of a record.\n */\n authorId?: string\n /**\n * The resolved author record, attached by the tenant runtime alongside the\n * `authorName` it denormalizes (`get-collection-content.ts`). Carries the\n * portrait, which is why the byline can show the author's own face rather\n * than the site's mark — see {@link expandCollectionEntryMeta}.\n */\n author?: ContentAuthorRecord | null\n body?: string\n coverImage?: string\n /**\n * The entry's featured video (AGL-2956), stored in the shape\n * {@link coverImage} is: a `media:{scope}/{id}` reference or a URL, a Wistia\n * media link included. Raw here for the reason every image field in this\n * file is raw — the resolver needs the rendering host, which this record\n * does not carry.\n *\n * An entry of a video collection is an article whose featured video sits\n * where a post's cover image would, which is what makes its page a watch\n * page. `{{entry.coverVideo}}` binds it into a template's Video element, and\n * the built-in entry page plays it with no template at all.\n */\n coverVideo?: string\n /** Search-result title override (AGL-582); falls back to `title`. */\n seoTitle?: string\n /** Meta description override (AGL-582); falls back to `excerpt`. */\n seoDescription?: string\n /**\n * Stable reference into the collection's `categories` taxonomy\n * (AGL-582): the ID survives renames, so display names resolve at\n * render via {@link resolveEntryCategoryName}.\n */\n categoryId?: string\n /**\n * Legacy free-typed bucket (AGL-582), e.g. \"Engineering\". Still READ\n * as a fallback everywhere; the editor writes `categoryId` going\n * forward.\n */\n category?: string\n /** Free-form labels (AGL-582), e.g. [\"nextjs\", \"seo\"]. */\n tags?: string[]\n publishedAt?: { seconds: number } | null\n /**\n * The collection this entry came OUT of, stamped where the read happened\n * (AGL-2518).\n *\n * Absent everywhere the routed collection already answers the question,\n * which is every listing the platform had until now: a `/blog` page renders\n * blog entries, so `entry.url` is built from the one slug the route\n * resolved and no entry needs to carry its own.\n *\n * The author page breaks that assumption — it lists a blog post, a\n * changelog note and a press release side by side, and building all three\n * URLs from a single routed slug would produce two links to pages that do\n * not exist. So the reader that mixes collections stamps each entry with\n * where it came from, and {@link collectionEntryTokens} prefers it. Every\n * other caller keeps passing one slug and keeps behaving identically.\n */\n collectionSlug?: string\n /**\n * The display name of {@link collectionSlug} — \"Changelog\", not\n * \"changelog\" — so a card on a mixed listing can label which section a\n * post belongs to. Stamped by the same reader, for the same reason.\n */\n collectionName?: string\n}\n\n/** A collection's published entries, keyed for expansion by its slug. */\nexport interface CollectionEntriesSource {\n slug: string\n entries: CollectionEntryRecord[]\n /** The collection's category taxonomy (AGL-582), for name resolution. */\n categories?: CollectionCategory[]\n /**\n * Whether the READ that produced `entries` came back holding its own\n * `.limit()` (AGL-1516) — a fact recorded where the query ran, because by\n * the time `entries` gets here it has been through a liveness filter and\n * possibly a route's category filter, and its length no longer answers the\n * question. See {@link collectionSourceIsBounded}.\n */\n reachedBound?: boolean\n /**\n * The page the ROUTE asked for (AGL-1321), set only for the collection the\n * URL resolved. Fills in a block that declares `perPage` but no `page` —\n * which is every block a designer can author, since design time cannot\n * know which page a visitor is on. A block that names its own `page` still\n * wins: that is a deliberately pinned window, not a paginated list.\n */\n page?: number\n}\n\n/**\n * Display name of an entry's category (AGL-582): the `categoryId` lookup\n * into the collection's taxonomy wins; the legacy free-typed\n * `entry.category` string is the fallback so existing data keeps\n * rendering. An ID referencing a deleted category resolves to nothing —\n * by design the entry simply shows no category.\n */\nexport function resolveEntryCategoryName(\n entry: Pick<CollectionEntryRecord, 'categoryId' | 'category'>,\n // `readonly` because this only reads (AGL-1321): the route helpers hold\n // the taxonomy as readonly and would otherwise have to copy it to ask.\n categories?: readonly CollectionCategory[],\n): string | undefined {\n const categoryId = (entry.categoryId ?? '').trim()\n if (categoryId) {\n const match = (categories ?? []).find(\n (category) => category.id === categoryId,\n )\n if (match?.name) return match.name\n }\n const legacy = (entry.category ?? '').trim()\n return legacy || undefined\n}\n\n/* ── Published-date formats (AGL-1459) ──────────────────────────────────── */\n\n\n/**\n * The values an Entry Meta block shows, in the exact spellings the\n * `{{entry.date}}` / `{{entry.author}}` / `{{entry.category}}` /\n * `{{entry.tags}}` tokens produce (AGL-1385, author added AGL-1459).\n *\n * Extracted so the token map and {@link expandCollectionEntryMeta} cannot\n * drift: the same entry has to read the same way whether the author bound the\n * tokens by hand or let the server fill the block in.\n */\nexport function collectionEntryMetaValues(\n entry: CollectionEntryRecord,\n categories?: readonly CollectionCategory[],\n dateFormat?: CollectionEntryDateFormat,\n): { date: string; author: string; category: string; tags: string } {\n return {\n date: formatCollectionEntryDate(entry.publishedAt, dateFormat),\n // The per-entry byline the editor already collects (AGL-686). It was\n // reachable in the entry's JSON-LD and nowhere on the page, which is what\n // made the frame's byline unauthorable (AGL-1459).\n //\n // The resolved RECORD first, then the legacy string (AGL-2486) — the\n // precedence `resolveEntryAuthor` applies, spelled the same way here. The\n // tenant denormalizes the record's name onto `authorName` before this\n // runs, so on a live render the two agree; reading the record directly is\n // what makes that a convenience rather than the only thing holding the\n // byline up.\n author: (entry.author?.name || entry.authorName || '').trim(),\n // Entry model v2 (AGL-582): category resolves by stable ID against the\n // collection's taxonomy, falling back to the legacy free-typed string.\n category: resolveEntryCategoryName(entry, categories) ?? '',\n tags: (entry.tags ?? []).join(', '),\n }\n}\n\n/**\n * The values an Entry Author card shows (AGL-2486) — the fields of the\n * resolved author RECORD, in the spellings the `{{entry.author*}}` tokens\n * produce.\n *\n * Extracted for the reason {@link collectionEntryMetaValues} was: the card,\n * the token map and {@link expandCollectionEntryAuthor} have to agree, and\n * three copies of \"name, falling back to the legacy string\" would not.\n *\n * `image` stays RAW — a `media:` reference or a plain url, whichever the\n * author saved — because the resolver that turns one into a fetchable src\n * needs the rendering host and this function has no host (`resolveMediaSrc`,\n * AGL-1215). Every other consumer of an image field in this file does the\n * same.\n */\nexport function collectionEntryAuthorValues(entry: CollectionEntryRecord): {\n name: string\n bio: string\n image: string\n url: string\n pageUrl: string\n links: ContentAuthorLink[]\n} {\n const author = entry.author\n return {\n // Their page on THIS site (AGL-2518/2519) — a different destination from\n // `url`, which is their own. Empty when nothing addresses them, so the\n // byline renders as plain text rather than as a link to `/author/`.\n pageUrl: contentAuthorPageUrl({\n ...(author ? { author } : {}),\n ...(entry.authorId ? { authorId: entry.authorId } : {}),\n ...(entry.authorName ? { authorName: entry.authorName } : {}),\n }),\n // The rows the card PRINTS (AGL-2516). Normalized here rather than\n // trusted, because this is the boundary a stored document crosses to\n // become props: the renderer guards the href too, but only one of the two\n // sits on the path a hand-written document would take.\n links: normalizeContentAuthorLinks(author?.links),\n // The record wins, then the legacy free-typed byline (AGL-686), which is\n // the same precedence `resolveEntryAuthor` applies — an entry written\n // before custom authors still fills a card, with the one field it has.\n name: (author?.name ?? entry.authorName ?? '').trim(),\n bio: (author?.bio ?? '').trim(),\n image: (author?.image ?? '').trim(),\n url: (author?.url ?? '').trim(),\n }\n}\n\n/**\n * The `{{entry.*}}` token map for one entry (AGL-105/551): substituted\n * globally on entry-template screens and per-clone inside the Collection\n * entries block. `entry.url` resolves to the entry's auto-route so links\n * (`Read more`, titles) work without hardcoding the collection slug.\n */\nexport function collectionEntryTokens(\n entry: CollectionEntryRecord,\n collectionSlug: string,\n categories?: CollectionCategory[],\n): Record<string, string> {\n const meta = collectionEntryMetaValues(entry, categories)\n const author = collectionEntryAuthorValues(entry)\n // The entry's OWN collection wins over the routed one (AGL-2518) — see\n // `CollectionEntryRecord.collectionSlug`. Unset on every single-collection\n // listing, which is why this changes nothing for them.\n const slug = (entry.collectionSlug ?? '').trim() || collectionSlug\n return {\n 'entry.title': entry.title ?? '',\n 'entry.excerpt': entry.excerpt ?? '',\n 'entry.body': entry.body ?? '',\n 'entry.coverImage': entry.coverImage ?? '',\n // The featured video (AGL-2956), raw like the cover: a template binds it\n // into a Video element's source, and the element resolves a reference\n // against the site rendering it.\n 'entry.coverVideo': entry.coverVideo ?? '',\n 'entry.slug': entry.slug ?? '',\n 'entry.url': `/${slug}/${entry.slug ?? ''}`,\n // Which section this entry belongs to (AGL-2518). Worth binding only on a\n // listing that MIXES collections — the author page — where a card\n // otherwise gives a reader no way to tell a release note from an essay.\n 'entry.collection': (entry.collectionName ?? '').trim(),\n 'entry.collectionSlug': slug,\n 'entry.collectionUrl': slug ? `/${slug}` : '',\n 'entry.date': meta.date,\n // The same instant for a parser (AGL-2956). `entry.date` is written for a\n // reader, so a Video element's publication date bound to it publishes an\n // `uploadDate` no crawler can read; this one is an ISO date-time.\n 'entry.publishedAt': collectionEntryPublishedAtIso(entry.publishedAt),\n // The byline (AGL-1459). Bindable by hand for the same reason every other\n // field is: a template that wants it somewhere Entry Meta does not reach.\n 'entry.author': meta.author,\n // The rest of the author RECORD (AGL-2486). Bindable by hand for the\n // same reason `entry.author` is: a card laid out by the designer rather\n // than dropped as the Entry Author block still has to say who wrote the\n // piece, and typing the blurb in as literal text is how a byline starts\n // naming the wrong person.\n 'entry.authorBio': author.bio,\n 'entry.authorImage': author.image,\n 'entry.authorUrl': author.url,\n /**\n * This author's page on this site (AGL-2518) — \"more from the person who\n * wrote this\".\n *\n * A separate token from `entry.authorUrl`, which is the author's own site,\n * because they are different destinations and a template should be able to\n * offer either or both. Empty when there is nothing addressable, so a\n * binding renders no link rather than one pointing at `/author/`.\n */\n 'entry.authorPageUrl': contentAuthorPageUrl({\n ...(entry.author ? { author: entry.author } : {}),\n ...(entry.authorId ? { authorId: entry.authorId } : {}),\n ...(entry.authorName ? { authorName: entry.authorName } : {}),\n }),\n // Entry model v2 (AGL-582): taxonomy + SEO tokens. The SEO pair falls\n // back to title/excerpt so templates can bind them unconditionally.\n 'entry.category': meta.category,\n 'entry.tags': meta.tags,\n 'entry.seoTitle': entry.seoTitle || entry.title || '',\n 'entry.seoDescription': entry.seoDescription || entry.excerpt || '',\n }\n}\n\n/**\n * Category/tag membership check (AGL-582), shared by the Collection entries\n * filter props and the query-less list surfaces. Matching is trimmed and\n * case-insensitive — editors type these by hand. A category filter matches\n * either the entry's stable `categoryId` or its RESOLVED display name (id\n * lookup first, legacy string fallback), so filters written against either\n * spelling keep working across the taxonomy migration.\n */\nexport function entryMatchesFilter(\n entry: CollectionEntryRecord,\n filter: { category?: string; tag?: string },\n categories?: CollectionCategory[],\n): boolean {\n const normalize = (value: string) => value.trim().toLowerCase()\n if (filter.category) {\n const wanted = normalize(filter.category)\n const matchesId =\n Boolean((entry.categoryId ?? '').trim()) &&\n normalize(entry.categoryId ?? '') === wanted\n const matchesName =\n normalize(resolveEntryCategoryName(entry, categories) ?? '') === wanted\n if (!matchesId && !matchesName) return false\n }\n if (filter.tag) {\n const wanted = normalize(filter.tag)\n if (!(entry.tags ?? []).some((tag) => normalize(tag) === wanted)) {\n return false\n }\n }\n return true\n}\n\n/* ── Category routes (AGL-1321) ─────────────────────────────────────────── */\n\n/**\n * URL form of a category id or display name (AGL-1321): lowercase, runs of\n * non-alphanumerics collapsed to a single `-`, no leading/trailing dash.\n *\n * Deliberately lossy and idempotent, so the same category addresses the same\n * URL whether the author typed the taxonomy id, the display name, or the URL\n * segment itself. `Open source` → `open-source` → `open-source`.\n */\nexport function collectionCategorySlug(value: string | undefined): string {\n return String(value ?? '')\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n\n/**\n * The taxonomy category a URL segment addresses (AGL-1321), matched on the\n * stable `id` OR the slugified display name — an author linking\n * `/blog/category/open-source` should not have to know which of the two the\n * data happens to store, and an `id` that survives a rename is exactly why\n * the taxonomy has one. `undefined` = the segment names no known category;\n * the caller renders an empty listing rather than crashing.\n */\nexport function resolveCollectionCategoryBySlug(\n categories: readonly CollectionCategory[] | undefined,\n slug: string | undefined,\n): CollectionCategory | undefined {\n const wanted = collectionCategorySlug(slug)\n if (!wanted) return undefined\n return (categories ?? []).find(\n (category) =>\n collectionCategorySlug(category.id) === wanted ||\n collectionCategorySlug(category.name) === wanted,\n )\n}\n\n/**\n * The canonical URL of a collection listing (AGL-1321). ONE builder, because\n * the pills, the pager, the `<link rel=\"canonical\">`, the JSON-LD and the\n * sitemap must all agree on the shape or the filter quietly becomes a\n * duplicate-content generator.\n *\n * The unfiltered page-1 listing is the bare `/{collection}` — there is no\n * `/{collection}/category/all` and no `?category=all`, so \"All\" cannot become\n * a second address for the page that already exists.\n */\nexport function collectionListUrl(options: {\n collectionSlug: string\n categorySlug?: string | null\n page?: number | null\n}): string {\n const scoped = options.categorySlug\n ? `/${options.collectionSlug}/${COLLECTION_CATEGORY_ROUTE_SEGMENT}/` +\n collectionCategorySlug(options.categorySlug)\n : `/${options.collectionSlug}`\n const page = Number(options.page)\n return Number.isFinite(page) && page > 1\n ? `${scoped}/${COLLECTION_PAGE_ROUTE_SEGMENT}/${Math.floor(page)}`\n : scoped\n}\n\n/** Where a listing's pager can go from here (AGL-1386). */\nexport interface CollectionPaginationLinks {\n /** 1-based current page; 1 when the listing is unpaginated. */\n page: number\n /** Total pages in the CURRENT (possibly category-filtered) set. */\n totalPages: number\n /** The previous page's URL, or `''` on the first page. */\n prevUrl: string\n /** The next page's URL, or `''` on the last page. */\n nextUrl: string\n}\n\n/**\n * Everything a pager needs for one listing (AGL-1386): which page it is on,\n * how many there are, and where prev/next go — through\n * {@link collectionListUrl}, so both links stay inside the category they are\n * paging rather than dumping the reader back onto the unfiltered list.\n *\n * **The edges resolve to the empty string, never to a URL.** No previous page\n * means `prevUrl` is `''`; no next page means `nextUrl` is `''`. That is what\n * lets an authored template bind these unconditionally: one static list screen\n * serves the bare listing, every `/page/{n}`, and every\n * `/category/{slug}` — and there is no runtime conditional to hide a link\n * with. A link whose href resolves to `''` renders as an inert placeholder of\n * the same element (AGL-1268/1357), which is the correct pager on page 1 of 1.\n *\n * ONE computation, because it has two consumers that must agree: the built-in\n * fallback pager's nodes and the `{{pagination.*}}` tokens an authored\n * template binds. A second derivation is how a fallback and a template start\n * disagreeing about which page they are on.\n */\nexport function collectionPaginationLinks(options: {\n collectionSlug: string\n categorySlug?: string | null\n /** 1-based current page; anything unusable reads as page 1. */\n page?: number | null\n /** Total pages; anything unusable reads as a single page. */\n totalPages?: number | null\n}): CollectionPaginationLinks {\n const positive = (value: number | null | undefined): number => {\n const parsed = Math.floor(Number(value))\n return Number.isFinite(parsed) && parsed > 0 ? parsed : 1\n }\n const page = positive(options.page)\n const totalPages = positive(options.totalPages)\n const href = (n: number) =>\n collectionListUrl({\n collectionSlug: options.collectionSlug,\n ...(options.categorySlug ? { categorySlug: options.categorySlug } : {}),\n page: n,\n })\n return {\n page,\n totalPages,\n prevUrl: page > 1 ? href(page - 1) : '',\n nextUrl: page < totalPages ? href(page + 1) : '',\n }\n}\n\n/** A content-collection path resolved to what it addresses (AGL-1321). */\nexport interface CollectionRoute {\n collectionSlug: string\n /** Set only for `/{collection}/{entry}`. */\n entrySlug?: string\n /** Set only for `/{collection}/category/{slug}[/page/{n}]`. */\n categorySlug?: string\n /** 1-based list page; always 1 for entry routes. */\n page: number\n}\n\nconst POSITIVE_INTEGER = /^[1-9]\\d*$/\n\n/**\n * Parses a non-screen path against the content-collection route shapes\n * (AGL-81/620/1321), or `null` when it is none of them and the caller should\n * fall through to the 404 chain:\n *\n * ```\n * /{collection} list, page 1, all categories\n * /{collection}/{entry} one entry\n * /{collection}/page/{n} list page n\n * /{collection}/category/{slug} filtered list, page 1\n * /{collection}/category/{slug}/page/{n} filtered list, page n\n * ```\n *\n * Pure, and shared by the tenant loader and its tests, because the route\n * table IS the ISR cache key here: the tenant catch-all caches by PATH, so a\n * listing variant that lives in the path gets its own cache entry for free,\n * while one that lived in a query string would share `/blog`'s entry and\n * serve one category's HTML for another.\n */\nexport function parseCollectionRoute(\n segments: readonly string[],\n): CollectionRoute | null {\n const [collectionSlug, ...rest] = segments\n if (!collectionSlug) return null\n if (!rest.length) return { collectionSlug, page: 1 }\n if (rest.length === 1) return { collectionSlug, entrySlug: rest[0], page: 1 }\n if (rest.length === 2 && rest[0] === COLLECTION_PAGE_ROUTE_SEGMENT) {\n return POSITIVE_INTEGER.test(rest[1])\n ? { collectionSlug, page: Number(rest[1]) }\n : null\n }\n if (rest.length === 2 && rest[0] === COLLECTION_CATEGORY_ROUTE_SEGMENT) {\n const categorySlug = collectionCategorySlug(rest[1])\n return categorySlug ? { collectionSlug, categorySlug, page: 1 } : null\n }\n if (\n rest.length === 4 &&\n rest[0] === COLLECTION_CATEGORY_ROUTE_SEGMENT &&\n rest[2] === COLLECTION_PAGE_ROUTE_SEGMENT &&\n POSITIVE_INTEGER.test(rest[3])\n ) {\n const categorySlug = collectionCategorySlug(rest[1])\n return categorySlug\n ? { collectionSlug, categorySlug, page: Number(rest[3]) }\n : null\n }\n return null\n}\n\n/**\n * Does this entry belong to the category a URL segment addresses (AGL-1321)?\n *\n * Every spelling the route could plausibly mean is slugified into one set and\n * checked against both of the entry's own spellings — the stable `categoryId`\n * and the RESOLVED display name. So `/blog/category/open-source` answers for\n * a taxonomy whose id is `opensource`, for one whose id is opaque but whose\n * name is \"Open source\", and for a legacy free-typed entry that predates the\n * taxonomy entirely. `entryMatchesFilter` cannot stand in: it compares raw\n * trimmed strings, so it would miss every multi-word category name.\n */\nexport function entryMatchesCategoryRoute(\n entry: CollectionEntryRecord,\n route: { slug: string; category?: CollectionCategory },\n categories?: readonly CollectionCategory[],\n): boolean {\n const wanted = new Set(\n [route.slug, route.category?.id, route.category?.name]\n .map((value) => collectionCategorySlug(value))\n .filter(Boolean),\n )\n if (!wanted.size) return false\n const entryId = collectionCategorySlug(entry.categoryId)\n if (entryId && wanted.has(entryId)) return true\n const entryName = collectionCategorySlug(\n resolveEntryCategoryName(entry, categories),\n )\n return Boolean(entryName) && wanted.has(entryName)\n}\n\n/** One category pill as stamped onto a Category Pills block (AGL-1321). */\nexport interface CollectionCategoryLink {\n label: string\n href: string\n /** The pill for the listing currently being rendered. */\n active: boolean\n}\n\n/** Label the unfiltered pill carries when the author never named one. */\nexport const COLLECTION_ALL_PILL_DEFAULT = 'All'\n\n/**\n * The value that persists \"no All pill\" (AGL-1336).\n *\n * The attribute documented \"clear it to omit that pill\" and could not do it:\n * the attributes form strips an emptied text field's KEY (ddf maps an\n * emptied field to its `clearedValue`, final-form's default parse turns\n * `''` into `undefined`, and `updateNodeProps` replaces the props object),\n * so the absent key took {@link COLLECTION_ALL_PILL_DEFAULT} and the pill\n * came straight back. `''` is therefore not a value this field can hold —\n * the same AGL-1191 trap that made the App Bar's \"Default\" unpersistable.\n *\n * So the field carries this as its `clearedValue`: clearing the box writes\n * the word `none`, which survives the round trip and is honoured here.\n * Deliberately a readable word rather than a magic character — an author who\n * reopens the panel sees `none` in the All-label box and can read what it\n * did. Removing the prop entirely (the ✕ affordance) still means \"unset\",\n * and restores the default.\n */\nexport const COLLECTION_ALL_PILL_NONE = 'none'\n\n/**\n * What the unfiltered pill should be labelled, or `''` to omit it — the ONE\n * place the {@link COLLECTION_ALL_PILL_NONE} sentinel is interpreted\n * (AGL-1336). Matched case-insensitively on the trimmed value, because the\n * sentinel is typed by a human only when they are re-entering it by hand.\n *\n * `undefined` is UNSET and takes the default. `null` is CLEARED and omits —\n * it reaches here only from a hand-edited or imported document, but the two\n * are different questions and must not collapse into one answer.\n */\nexport function resolveCollectionAllLabel(value?: string | null): string {\n if (value === undefined) return COLLECTION_ALL_PILL_DEFAULT\n if (value === null) return ''\n const text = `${value}`.trim()\n if (!text) return ''\n return text.toLowerCase() === COLLECTION_ALL_PILL_NONE ? '' : text\n}\n\n/**\n * The pill row for a collection (AGL-1321): \"All\" pointing at the canonical\n * unfiltered listing, then one pill per taxonomy category.\n *\n * Each pill addresses its category by the STABLE id where there is one, so a\n * rename moves the label without breaking the link. Active state is decided\n * through the same resolver the route used, not by string equality, because\n * the URL may legitimately have named the category by either spelling.\n */\nexport function buildCollectionCategoryLinks(options: {\n collectionSlug: string\n categories?: readonly CollectionCategory[]\n activeCategorySlug?: string\n /**\n * Label for the unfiltered pill. Absent takes the default; `''` or the\n * {@link COLLECTION_ALL_PILL_NONE} sentinel omits the pill.\n */\n allLabel?: string | null\n}): CollectionCategoryLink[] {\n const { collectionSlug } = options\n const active = collectionCategorySlug(options.activeCategorySlug)\n const links: CollectionCategoryLink[] = []\n for (const category of options.categories ?? []) {\n const idSlug = collectionCategorySlug(category.id)\n const nameSlug = collectionCategorySlug(category.name)\n const slug = idSlug || nameSlug\n if (!slug) continue\n links.push({\n label: category.name,\n href: collectionListUrl({ collectionSlug, categorySlug: slug }),\n active: Boolean(active) && (idSlug === active || nameSlug === active),\n })\n }\n // A lone \"All\" pill is not a filter, it is decoration — a collection with\n // no taxonomy gets no row at all.\n if (!links.length) return []\n const allLabel = resolveCollectionAllLabel(options.allLabel)\n return allLabel\n ? [\n {\n label: allLabel,\n href: collectionListUrl({ collectionSlug }),\n active: !active,\n },\n ...links,\n ]\n : links\n}\n\n/**\n * The matchable text a search box holds for a set of entries (AGL-1516),\n * built ONCE for both blocks that carry one — the entries block's in-place\n * filter and the standalone toolbar box (AGL-1516, Figma 494:1220).\n *\n * Shared rather than copied for the same reason\n * {@link COLLECTION_SEARCH_FUSE_OPTIONS} is: the two boxes can sit on the\n * same page, over the same collection, and a reader who sees a suggestion in\n * one and a miss in the other has been told the site is broken. Two builders\n * is how the row's date, chip and link drift apart.\n *\n * The row's link, date and category are resolved HERE, where the entry still\n * exists — a component only holds rendered markup by the time it runs, and\n * the suggestion panel draws its rows from this index rather than from the\n * clones. Through the same three resolvers Related posts uses (AGL-1926 for\n * the date especially): a suggestion for a post is the same post as the card\n * below it and must not be able to disagree with it about its date.\n */\nexport function buildCollectionSearchIndex(\n entries: readonly CollectionEntryRecord[],\n collectionSlug: string,\n categories?: readonly CollectionCategory[],\n): CollectionEntrySearchItem[] {\n return entries.map((entry): CollectionEntrySearchItem => {\n const categoryName = resolveEntryCategoryName(entry, categories)\n return {\n title: entry.title ?? '',\n excerpt: entry.excerpt ?? '',\n // Absent keys rather than empty strings, so the row asks one question\n // per field instead of two — the shape Related posts settled on\n // (AGL-1457).\n // The entry's own collection wins over the passed one, as in\n // `collectionEntryTokens` and for the same reason (AGL-2518): a mixed\n // listing's search index must not send every hit to one collection.\n ...(entry.slug\n ? {\n url: `/${(entry.collectionSlug ?? '').trim() || collectionSlug}/${\n entry.slug\n }`,\n }\n : {}),\n ...(entry.publishedAt?.seconds\n ? { date: formatCollectionEntryDate(entry.publishedAt) }\n : {}),\n ...(categoryName ? { category: categoryName } : {}),\n }\n })\n}\n\n/**\n * The collection blocks that can be BOUND to a collection by name, rather\n * than inheriting the routed one.\n *\n * The same three `scanCollectionBlocks` resolves a source for, and the same\n * three that can therefore put a collection's entries on a page that is not\n * one of the collection's own routes — a \"Latest posts\" rail on the home\n * page, a category pill strip in a layout's chrome, a search box in a header.\n *\n * Related posts is deliberately absent. It resolves against the routed\n * collection and renders nothing without a current entry in context, so it\n * only ever appears on an entry page, which the entry's own address already\n * covers.\n */\nconst COLLECTION_BOUND_COMPONENT_IDS: readonly string[] = [\n COLLECTION_ENTRIES_COMPONENT_ID,\n COLLECTION_CATEGORIES_COMPONENT_ID,\n COLLECTION_SEARCH_COMPONENT_ID,\n]\n\n/**\n * Does this tree render the collection `collectionSlug` away from the\n * collection's own routes?\n *\n * The content twin of {@link nodesPlaceForm}, and it exists for the same\n * reason: an entry edit changes every page that renders the collection, and\n * those pages are found by SEARCHING node trees rather than by matching a\n * pointer. A collection's own addresses are derivable from its slug; a rail\n * on the home page is not derivable from anything.\n *\n * Matches only an EXPLICIT `collectionSlug`. A block that names none inherits\n * the routed collection — which means it renders nothing at all off-route\n * (`scanCollectionBlocks` adds no slug, so the block is left untouched) and\n * renders the routed collection on-route, where the collection's own list and\n * entry addresses already reach it. Treating an unbound block as a dependent\n * of every collection on the site would make every entry save drop every page\n * that carries one.\n *\n * The comparison is against the slug rather than the document id because that\n * is what the binding stores, and what `scanCollectionBlocks` resolves. A\n * collection whose slug was just changed is a different question, and one the\n * slug change itself has to answer.\n */\nexport function nodesRenderCollection(\n nodes: Record<NodeId, AglynNodeSchema | undefined> | undefined | null,\n collectionSlug: string,\n): boolean {\n const wanted = String(collectionSlug ?? '').trim()\n if (!wanted) return false\n for (const node of Object.values(nodes ?? {})) {\n if (!node) continue\n if (!COLLECTION_BOUND_COMPONENT_IDS.includes(String(node.componentId))) {\n continue\n }\n const bound = (node.props as Record<string, unknown> | undefined)?.[\n 'collectionSlug'\n ]\n if (typeof bound === 'string' && bound.trim() === wanted) return true\n }\n return false\n}\n\n/**\n * Collection entries blocks (AGL-551): a `collectionEntries` container\n * treats its children as the item template and renders them once per\n * published entry, with `{{entry.*}}` tokens in cloned string props replaced\n * per entry — the content-collection sibling of {@link expandRepeatables}.\n *\n * - The block's collection resolves from its `collectionSlug` prop, falling\n * back to `defaultSlug` (the routed collection on list-template screens).\n * - Clone ids are namespaced `centry__{containerId}__{index}__…` so repeats\n * never collide; run AFTER grafting and BEFORE binding resolution.\n * - Rows are bounded by `props.entriesLimit` and\n * {@link COLLECTION_ENTRIES_MAX}.\n * - `props.firstPageOnly` renders zero rows past page 1 of the ROUTED\n * listing (AGL-1871), so a lead card does not repeat down the pagination.\n * - An UNKNOWN collection leaves the node untouched (fail-open: a renamed\n * collection must never take a screen down). A known collection with no\n * matching entries renders zero rows — never the unsubstituted template.\n * - Inputs are never mutated; template nodes stay in the map unreferenced.\n */\nexport function expandCollectionEntries<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: Record<NodeId, N>,\n sourcesBySlug: Record<string, CollectionEntriesSource | undefined>,\n defaultSlug?: string,\n): Record<NodeId, N> {\n const containers = Object.entries(nodes).filter(\n ([, node]) => node?.componentId === COLLECTION_ENTRIES_COMPONENT_ID,\n )\n if (!containers.length) return nodes\n\n const next: Record<NodeId, N> = { ...nodes }\n for (const [containerId, container] of containers) {\n const slug =\n String((container.props as any)?.collectionSlug ?? '').trim() ||\n defaultSlug\n const source = slug ? sourcesBySlug[slug] : undefined\n // An UNKNOWN collection leaves the node untouched — fail-open, so a\n // renamed collection never takes a published screen down.\n //\n // A KNOWN collection with nothing to show is a different question, and\n // used to get the same answer (AGL-1321). Leaving the template in place\n // renders it once, with its `{{entry.title}}` / `{{entry.url}}` tokens\n // never substituted, so the page shipped a ghost row of literal braces.\n // That was rare while the only way to empty a list was to publish an\n // empty collection; a category filter makes it reachable from any pill\n // whose category has no posts yet. Zero entries now means zero rows.\n if (!source) continue\n const limitRaw = Number((container.props as any)?.entriesLimit)\n const limit =\n Number.isFinite(limitRaw) && limitRaw > 0\n ? Math.min(limitRaw, COLLECTION_ENTRIES_MAX)\n : COLLECTION_ENTRIES_MAX\n\n // Pagination (AGL-620): when `perPage` is set the block renders one page\n // window `[(page-1)*perPage, page*perPage)`; without it, the legacy\n // `entriesLimit` slice from the top applies unchanged.\n const perPageRaw = Number((container.props as any)?.perPage)\n const perPage =\n Number.isFinite(perPageRaw) && perPageRaw > 0\n ? Math.min(Math.floor(perPageRaw), COLLECTION_ENTRIES_MAX)\n : undefined\n // The block's own `page` wins; otherwise the ROUTE's page applies, so\n // `/blog/page/2` and `/blog/category/guides/page/2` render page 2 of a\n // template listing instead of silently re-serving page 1 at a second URL\n // (AGL-1321). Only ever the routed collection: `source.page` is set\n // nowhere else.\n const pageRaw = Number((container.props as any)?.page)\n const routedPage = Number(source.page)\n const page =\n Number.isFinite(pageRaw) && pageRaw >= 1\n ? Math.floor(pageRaw)\n : Number.isFinite(routedPage) && routedPage >= 1\n ? Math.floor(routedPage)\n : 1\n // \"Only on page 1\" (AGL-1871): a LEAD block takes the top of the set and\n // has no page window of its own, so on `/blog/page/2` it repeats exactly\n // what page 1 led with — same cover, same title, same excerpt — above a\n // page of different posts, under an eyebrow that reads \"Latest\". True on\n // page 1, false everywhere after it.\n //\n // Opt-in and default off. The alternative reading — \"a block with no\n // `perPage` on a paginated route is a lead block\" — is wrong: a \"popular\n // posts\" rail is the same shape and belongs on every page of the listing.\n // Only the author knows which one they built, so the author says so.\n //\n // Gated on the ROUTE's page, never on the block's own pinned `page`. A\n // block that names its own page is a deliberately fixed window (\"the\n // entries page 3 would show, here\"), which says nothing about which page\n // of the listing the reader is on; and off a routed listing entirely\n // (a blog rail on the homepage) `source.page` is unset, so the switch\n // correctly hides nothing.\n const firstPageOnly = Boolean((container.props as any)?.firstPageOnly)\n const suppressedBeyondFirstPage =\n firstPageOnly && Number.isFinite(routedPage) && routedPage > 1\n\n const templateIds = Array.isArray(container.nodes)\n ? (container.nodes as NodeId[])\n : []\n if (!templateIds.length) continue\n\n // Category/tag filter props (AGL-582): the block-level answer to\n // /blog?tag=x — query params never reach the ISR-cached loader, so\n // filtered lists are designed as filtered BLOCKS instead.\n const filterCategory = String(\n (container.props as any)?.filterCategory ?? '',\n ).trim()\n const filterTag = String(\n (container.props as any)?.filterTag ?? '',\n ).trim()\n const filtered =\n filterCategory || filterTag\n ? source.entries.filter((entry) =>\n entryMatchesFilter(\n entry,\n {\n category: filterCategory || undefined,\n tag: filterTag || undefined,\n },\n source.categories,\n ),\n )\n : source.entries\n // Whether the READ behind `source.entries` reached its own bound\n // (AGL-1516). Taken off the raw set, never off `filtered`: a block-level\n // category filter legitimately narrows a complete read, and a narrowed\n // set is not a bounded one. The source's own `reachedBound` wins over\n // counting it, because the count cannot see a read that came back full\n // and was then thinned by the liveness gate.\n const sourceCapped = collectionSourceIsBounded(source)\n\n const windowed = suppressedBeyondFirstPage\n ? []\n : perPage\n ? filtered.slice((page - 1) * perPage, (page - 1) * perPage + perPage)\n : filtered.slice(0, limit)\n\n const childIds: NodeId[] = []\n windowed.forEach((entry, index) => {\n const prefix = `${COLLECTION_ENTRIES_NODE_ID_PREFIX}${containerId}__${index}__`\n const prefixId = (id: NodeId) => `${prefix}${id}`\n const cloned: Record<NodeId, N> = {}\n const cloneSubtree = (id: NodeId, parentId: NodeId) => {\n const node = nodes[id]\n if (!node) return\n const clonedChildren = Array.isArray(node.nodes)\n ? (node.nodes as NodeId[])\n : undefined\n cloned[prefixId(id)] = {\n ...node,\n $id: prefixId(id),\n parentId,\n ...(clonedChildren && {\n nodes: clonedChildren.map((childId) => prefixId(childId)),\n }),\n }\n clonedChildren?.forEach((childId) =>\n cloneSubtree(childId, prefixId(id)),\n )\n }\n for (const templateId of templateIds) {\n cloneSubtree(templateId, containerId)\n childIds.push(prefixId(templateId))\n }\n // Fill the entry blocks in THIS card from THIS card's entry (AGL-2486).\n //\n // The routed-entry passes (`expandCollectionEntryMeta`,\n // `expandCollectionEntryAuthor`) skip clones deliberately: stamping the\n // routed entry into a listing would date every card the same. That left\n // a cloned block with only its `{{entry.*}}` bindings, and a binding\n // carries no FORMAT — so an Entry Meta inside a card rendered the locale\n // default whatever its Date format said, while the identical block on\n // the article above it obeyed the picker. A field that cannot move the\n // thing it names is worse than a missing one.\n //\n // The fill runs against each clone's own entry, so every card dates\n // itself, and it runs BEFORE substitution so a filled value is already\n // a literal by the time the tokens resolve. The precedence is the\n // shared one: an authored value wins, except the `{{entry.date}}`\n // binding under a chosen format, which is the case this exists for.\n for (const [cloneId, cloneNode] of Object.entries(cloned)) {\n const fill =\n cloneNode?.componentId === COLLECTION_ENTRY_META_COMPONENT_ID\n ? entryMetaFill(cloneNode, entry, source.categories)\n : cloneNode?.componentId === COLLECTION_ENTRY_AUTHOR_COMPONENT_ID\n ? entryAuthorFill(cloneNode, entry)\n : undefined\n if (!fill || !Object.keys(fill).length) continue\n cloned[cloneId] = {\n ...cloneNode,\n props: { ...(cloneNode.props ?? {}), ...fill },\n } as N\n }\n Object.assign(\n next,\n resolveNamedTokens(\n cloned,\n collectionEntryTokens(entry, source.slug, source.categories),\n ),\n )\n })\n // Search (AGL-1516): the block's search box filters CLIENT-SIDE over the\n // entries this expansion just rendered — the ISR-cached page is the whole\n // data set, so no query ever goes back to Firestore. The component only\n // holds cloned markup by render time, so the matchable text is stamped\n // here, where the entries still exist, index-aligned with the clone\n // groups. Stamped ONLY when the author enabled it: an untouched block's\n // node — and its serialized payload — stays byte-identical.\n const searchEnabled = Boolean((container.props as any)?.search)\n next[containerId] = searchEnabled\n ? {\n ...container,\n props: {\n ...(container.props as any),\n searchIndex: buildCollectionSearchIndex(\n windowed,\n source.slug,\n source.categories,\n ),\n // How many entries the window above was drawn FROM (AGL-1516).\n //\n // The component has to tell the reader whether a miss means \"not\n // here\" or \"not anywhere\", and it cannot work that out for\n // itself: it sees `perPage`, but `perPage` is only one of three\n // ways this block gets truncated. `entriesLimit` slices too, and\n // so does COLLECTION_ENTRIES_MAX at 100. A block set to \"latest 6\n // posts\" indexes 6 of 40 and, keyed off `perPage` alone, told the\n // reader flatly that their post does not exist.\n //\n // Stamped as the COUNT rather than as a `truncated` verdict, so\n // the component decides the wording and this stays a fact. It is\n // the post-filter total — a category-filtered block searches its\n // category, and \"the rest of the collection\" means the rest of\n // what this block would otherwise show.\n searchTotal: filtered.length,\n // And whether `searchTotal` is itself a ceiling (AGL-1516).\n //\n // `source.entries` is a READ, and that read is bounded — the\n // tenant fetches a collection's live entries with a hard\n // `.limit(100)` and no `orderBy`. On a collection past that bound\n // `filtered.length` reports the bound, not the collection, so\n // `searchIndex.length === searchTotal` — the test the component\n // reads as \"this block holds the whole set\" — is satisfied by a\n // block that holds 100 of 400 posts. The completeness claim is\n // the one thing a truncated read must never be allowed to make:\n // \"no matches\" over a quarter of a collection is a confident lie\n // about the other three quarters.\n //\n // A fact, like the count beside it: \"the read that produced this\n // index reached its bound\". A collection of exactly 100 sets it\n // too, and is described one notch more cautiously than it needed\n // to be — which is the safe direction, and the only one available\n // without a second count query.\n ...(sourceCapped ? { searchCapped: true } : {}),\n },\n nodes: childIds,\n }\n : { ...container, nodes: childIds }\n }\n return next\n}\n\n/**\n * Category Pills blocks (AGL-1321): stamps each `collectionCategories` node\n * with its collection's pill row as a serializable `items` prop the component\n * renders as real anchors — the same server-stamped shape Related posts uses,\n * and for the same reason: the block owns its markup, so there is no template\n * to clone.\n *\n * `activeCategorySlug` marks a pill only on the ROUTED collection. A pills\n * block pointing at some other collection is not what this URL filters, so\n * marking one of its pills current would be a lie in the HTML.\n *\n * A collection with no taxonomy leaves its block untouched, so the component's\n * besigner affordance / empty site render applies. Inputs are never mutated.\n */\nexport function expandCollectionCategories<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: Record<NodeId, N>,\n sourcesBySlug: Record<string, CollectionEntriesSource | undefined>,\n defaultSlug?: string,\n activeCategorySlug?: string,\n): Record<NodeId, N> {\n const containers = Object.entries(nodes).filter(\n ([, node]) => node?.componentId === COLLECTION_CATEGORIES_COMPONENT_ID,\n )\n if (!containers.length) return nodes\n\n const next: Record<NodeId, N> = { ...nodes }\n for (const [containerId, container] of containers) {\n const slug =\n String((container.props as any)?.collectionSlug ?? '').trim() ||\n defaultSlug\n const source = slug ? sourcesBySlug[slug] : undefined\n if (!source) continue\n const allLabel = (container.props as any)?.allLabel\n const items = buildCollectionCategoryLinks({\n collectionSlug: source.slug,\n categories: source.categories,\n ...(slug === defaultSlug ? { activeCategorySlug } : {}),\n // Absent means \"never set\" and takes the default; `null` is a cleared\n // value and is forwarded AS null, because `String(null)` would have\n // labelled the pill \"null\" (AGL-1336).\n ...(allLabel === undefined\n ? {}\n : { allLabel: allLabel === null ? null : String(allLabel) }),\n })\n if (!items.length) continue\n next[containerId] = {\n ...container,\n props: { ...(container.props as any), items },\n }\n }\n return next\n}\n\n/**\n * Collection Search blocks (AGL-1516): stamps each `collectionSearch` node\n * with its collection's search index, the size of the set that index was\n * drawn from, and whether that set was a bounded read — the same\n * server-stamped shape Category Pills and Related posts use, and for the same\n * reason: the block owns its markup, so there is no template to clone.\n *\n * Indexes the WHOLE source rather than a page window. The entries block's box\n * searches the entries that block rendered because it filters them in place;\n * a toolbar box filters nothing and suggests, so scoping it to one page of a\n * listing would be an arbitrary cut nobody asked for. What it can honestly\n * cover is the set the page's listing is drawn from — which on a category\n * route is that category, because `source.entries` arrives filtered.\n *\n * Clones are SKIPPED by their `centry__` prefix: a search box inside an entry\n * template would otherwise be stamped once per card. Nodes are never mutated,\n * and a collection with no entries leaves its block untouched, so the\n * component's besigner affordance and its empty site render both stand.\n */\nexport function expandCollectionSearch<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: Record<NodeId, N>,\n sourcesBySlug: Record<string, CollectionEntriesSource | undefined>,\n defaultSlug?: string,\n): Record<NodeId, N> {\n const containers = Object.entries(nodes).filter(\n ([id, node]) =>\n node?.componentId === COLLECTION_SEARCH_COMPONENT_ID &&\n !id.startsWith(COLLECTION_ENTRIES_NODE_ID_PREFIX),\n )\n if (!containers.length) return nodes\n\n const next: Record<NodeId, N> = { ...nodes }\n for (const [containerId, container] of containers) {\n const slug =\n String((container.props as any)?.collectionSlug ?? '').trim() ||\n defaultSlug\n const source = slug ? sourcesBySlug[slug] : undefined\n // An unknown collection leaves the node untouched — fail-open, exactly as\n // the entries and pills blocks do, so a rename never takes a screen down.\n if (!source) continue\n // A collection with nothing published gets no box. A search field over an\n // empty index can only ever answer \"no matches\", which reads as a fact\n // about the reader's query rather than about the empty collection it\n // really describes.\n if (!source.entries.length) continue\n next[containerId] = {\n ...container,\n props: {\n ...(container.props as any),\n searchIndex: buildCollectionSearchIndex(\n source.entries,\n source.slug,\n source.categories,\n ),\n searchTotal: source.entries.length,\n ...(collectionSourceIsBounded(source) ? { searchCapped: true } : {}),\n },\n }\n }\n return next\n}\n\n/**\n * Entry Meta blocks (AGL-1385): stamps each `collectionEntryMeta` node with\n * the routed entry's date, category and tags — the same server-stamped shape\n * Category Pills and Related posts already use.\n *\n * MEASURED on the live marketing blog, which is what this fixes. The block was\n * on `blogEntryTmpl` carrying props `{showDate: true, showCategory: true,\n * showTags: true}` and NOTHING else, and rendered as an empty `<div>` at height\n * 0 — while the very same entry's `<pubDate>` and `Guides` category appeared in\n * its feed item, its JSON-LD, and a heading two nodes above it. So the data was\n * never missing; the block simply had nothing bound to it.\n *\n * The design is what made that reachable. Every other collection block sources\n * itself; this one required the author to type `{{entry.date}}` into a text\n * field. Only the PRESET seeds those tokens — drag the bare component out of\n * the palette and you get three switches labelled \"Show date / Show category /\n * Show tags\", all defaulting to on, gating values that can never exist. That is\n * an affordance promising something the component cannot deliver, so this is a\n * defect in the block and not in anyone's content, and it hits every collection\n * that uses it, not just blog.\n *\n * Deliberately narrow:\n *\n * - An AUTHORED value always wins. Only an absent or blank prop is filled, so\n * a hand-typed byline, a pinned string, or a `{{entry.*}}` token still\n * awaiting substitution is never overwritten. (Blank counts as unset\n * because a cleared text field cannot persist `''` anyway — AGL-1336. The\n * way to hide a value is the switch that exists for it.)\n * - Nodes cloned per entry by {@link expandCollectionEntries} are SKIPPED by\n * their `centry__` id prefix. Their tokens resolve per clone; stamping the\n * routed entry into them would date every card in a listing the same.\n * - Without a routed entry — a list route, a plain screen — nothing is\n * stamped, so the besigner affordance and the empty site render stand.\n *\n * `dateFormat` (AGL-1459) is answered here, where the timestamp still exists,\n * and is the ONE exception to \"an authored value always wins\" — narrowly, and\n * only for the literal `{{entry.date}}` binding. That binding is what the\n * block's own preset seeds, so a format that filled blanks only would do\n * nothing on the exact surface it was built for. The token is not a hand-typed\n * override; it NAMES the value being reformatted. A literal string an author\n * typed still wins, unchanged.\n *\n * Inputs are never mutated.\n */\nexport function expandCollectionEntryMeta<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: Record<NodeId, N>,\n entry: CollectionEntryRecord | null | undefined,\n categories?: readonly CollectionCategory[],\n): Record<NodeId, N> {\n if (!entry) return nodes\n const containers = Object.entries(nodes).filter(\n ([id, node]) =>\n node?.componentId === COLLECTION_ENTRY_META_COMPONENT_ID &&\n !id.startsWith(COLLECTION_ENTRIES_NODE_ID_PREFIX),\n )\n if (!containers.length) return nodes\n\n const next: Record<NodeId, N> = { ...nodes }\n for (const [containerId, container] of containers) {\n const filled = entryMetaFill(container, entry, categories)\n if (!Object.keys(filled).length) continue\n next[containerId] = {\n ...container,\n props: { ...(container.props ?? {}), ...filled } as any,\n }\n }\n return next\n}\n\n/**\n * The values ONE Entry Meta node takes from ONE entry (AGL-2486).\n *\n * Extracted so a node inside a listing's card can be filled from the entry\n * that card is for, which is a different entry per clone and therefore\n * cannot come from the routed-entry pass above. Both callers apply the same\n * precedence, because the same block cannot mean two things depending on\n * where an author dropped it.\n *\n * Returns only the keys that change; an empty object means \"leave this node\n * exactly as authored\".\n */\nfunction entryMetaFill(\n container: { props?: unknown },\n entry: CollectionEntryRecord,\n categories?: readonly CollectionCategory[],\n): Record<string, string> {\n {\n const props = (container.props ?? {}) as Record<string, unknown>\n // Per node: the format is a prop, so two blocks on one template can read\n // their dates differently.\n const dateFormat = normalizeCollectionEntryDateFormat(props['dateFormat'])\n const values = collectionEntryMetaValues(entry, categories, dateFormat)\n const filled: Record<string, string> = {}\n for (const key of ['date', 'author', 'category', 'tags'] as const) {\n const authored = String(props[key] ?? '').trim()\n if (authored && !reformattableEntryDate(key, authored, dateFormat)) {\n continue\n }\n if (!values[key]) continue\n filled[key] = values[key]\n }\n // The byline avatar follows the BYLINE, and is the second narrow\n // exception to \"an authored value always wins\" (after `dateFormat`).\n //\n // `avatarImage` was introduced as a block-level pick because entries then\n // carried a byline STRING and no portrait anywhere, so the site's brand\n // mark chosen once on the template was the only answer available. Custom\n // authors changed that: an entry resolves to a record, and a record has\n // an `image`. Keeping the authored mark in front of it would print the\n // company logo beside a named person — the wrong face, on every post that\n // person wrote, which is worse than the generic mark it was standing in\n // for.\n //\n // Deliberately narrow, so nothing else moves: only a resolved author\n // RECORD that actually carries an image displaces the authored value. A\n // legacy string byline, an author with no portrait, and an entry with no\n // author at all all leave the template's mark exactly where it was.\n //\n // And only where a byline is actually PRINTED. This block is also the\n // product's tag row — the article frame ends on one with `Show author`,\n // `Show date` and `Show category` off and nothing but chips left — so a\n // portrait filled in unconditionally lands beside the tags, halfway down\n // the page from the byline it belongs to. The avatar is `alt=\"\"` on the\n // grounds that \"the byline names the author in text right beside it\",\n // which is exactly the thing a chips-only block does not have.\n const authorImage = String(entry.author?.image ?? '').trim()\n const bylineShown =\n props['showAuthor'] !== false &&\n Boolean(filled['author'] || String(props['author'] ?? '').trim())\n if (authorImage && bylineShown && props['showAvatar'] !== false) {\n filled['avatarImage'] = authorImage\n }\n /*\n Where the byline GOES (AGL-2519).\n\n Filled on the same terms as the avatar and for the same reason: it\n belongs to the byline, so it is only filled where a byline is actually\n printed. This block doubles as the product's tag row — the article frame\n ends on one with the author, date and category all switched off — and a\n link stamped there would have nothing to attach to.\n\n An authored value still wins, which is what `Link author` off leaves\n behind once the switch has written an explicit `false`: the switch is\n read by the renderer, and this only supplies the destination.\n */\n if (bylineShown) {\n const pageUrl = collectionEntryAuthorValues(entry).pageUrl\n if (pageUrl && !String(props['authorPageUrl'] ?? '').trim()) {\n filled['authorPageUrl'] = pageUrl\n }\n }\n return filled\n }\n}\n\n/**\n * Fill Entry Author cards from the routed entry's author record (AGL-2486),\n * on the same terms {@link expandCollectionEntryMeta} fills the byline:\n *\n * - an authored value always wins, and a blank one is a blank, not a\n * request for the default — the way to hide a field is its Show switch;\n * - per-entry clones (`centry__`) are skipped, so a listing's cards keep\n * resolving their own tokens rather than every card naming the routed\n * entry's author;\n * - without a routed entry nothing is stamped, which leaves the besigner's\n * placeholder card visible on the canvas.\n *\n * Inputs are never mutated.\n */\nexport function expandCollectionEntryAuthor<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: Record<NodeId, N>,\n entry: CollectionEntryRecord | null | undefined,\n): Record<NodeId, N> {\n if (!entry) return nodes\n const containers = Object.entries(nodes).filter(\n ([id, node]) =>\n node?.componentId === COLLECTION_ENTRY_AUTHOR_COMPONENT_ID &&\n !id.startsWith(COLLECTION_ENTRIES_NODE_ID_PREFIX),\n )\n if (!containers.length) return nodes\n\n const next: Record<NodeId, N> = { ...nodes }\n for (const [containerId, container] of containers) {\n const filled = entryAuthorFill(container, entry)\n if (!Object.keys(filled).length) continue\n next[containerId] = {\n ...container,\n props: { ...(container.props ?? {}), ...filled } as any,\n }\n }\n return next\n}\n\n/**\n * The values ONE Entry Author node takes from ONE entry (AGL-2486) — the\n * companion to {@link entryMetaFill}, extracted for the same reason: a card\n * inside a listing is filled from the entry that card is for.\n */\nfunction entryAuthorFill(\n container: { props?: unknown },\n entry: CollectionEntryRecord,\n): Record<string, unknown> {\n const values = collectionEntryAuthorValues(entry)\n const props = (container.props ?? {}) as Record<string, unknown>\n const filled: Record<string, unknown> = {}\n for (const key of ['name', 'bio', 'image', 'url', 'pageUrl'] as const) {\n if (String(props[key] ?? '').trim()) continue\n if (!values[key]) continue\n filled[key] = values[key]\n }\n // `links` is not authorable as text — a row carries a platform or a picked\n // icon, and the console's author editor is where those are chosen — so\n // there is no authored value to defer to. The record's rows are the only\n // ones there are; `Show links` is the template's control over them.\n if (values.links.length) filled['links'] = values.links\n return filled\n}\n\n/** The one binding a chosen date format may replace (AGL-1459). */\nconst ENTRY_DATE_BINDING = '{{entry.date}}'\n\n/**\n * Is this authored value the `{{entry.date}}` binding under a chosen format\n * (AGL-1459)? Anything else — a literal string, another token, the default\n * format — answers no, and the authored value stands.\n */\nfunction reformattableEntryDate(\n key: string,\n authored: string,\n dateFormat: CollectionEntryDateFormat,\n): boolean {\n return (\n key === 'date' &&\n authored === ENTRY_DATE_BINDING &&\n dateFormat !== COLLECTION_ENTRY_DATE_FORMAT_DEFAULT\n )\n}\n\n/**\n * The ONE matcher configuration behind every entry search in the product\n * (AGL-1516/AGL-1525) — the block's toolbar box, its suggestion panel, and\n * the site-wide results page the panel links to.\n *\n * Shared rather than copied because the two halves are joined by a link the\n * reader clicks: the panel's \"View all results\" hands its query to /search,\n * and if the results page matched more strictly it would answer a visible\n * suggestion with \"no results\". A typo the panel forgave — \"platfrom\" — is\n * exactly the query most likely to make that trip.\n *\n * The shape is the icon picker's (use-mdi-icons-fuzzy), tuned once for prose\n * and MEASURED before shipping: the title names the post and the excerpt\n * merely describes it, so they are weighted 0.7/0.3; the default location\n * scoring buries a legitimate mid-sentence hit in a sentence-long excerpt,\n * and the default 0.6 threshold matches \"media\" against every post on letter\n * soup, so location is ignored and the threshold tightened to 0.3.\n *\n * A plain object, not a Fuse instance: `libs/aglyn` is dependency-light by\n * design, and each consumer already imports Fuse from the vendor bundle.\n */\nexport const COLLECTION_SEARCH_FUSE_OPTIONS = {\n keys: [\n { name: 'title', weight: 0.7 },\n { name: 'excerpt', weight: 0.3 },\n ],\n includeScore: true,\n shouldSort: true,\n ignoreLocation: true,\n threshold: 0.3,\n}\n\n/**\n * One entry of a Collection Entries search index (AGL-1516): the fields the\n * block's client-side search box matches against, index-aligned with the\n * entry clones the block rendered. Stamped by {@link expandCollectionEntries}\n * only when the block's `search` prop is on; never set by hand.\n */\nexport interface CollectionEntrySearchItem {\n title: string\n excerpt: string\n /**\n * Entry permalink (AGL-1525). The `filter` mode never needs it — it hides\n * and shows clones that already carry their own links — but a suggestion\n * row IS the link, and the panel is drawn from the index, not from the\n * clones. Optional because a page cached before this shipped has an index\n * without it; the panel degrades to plain text rather than to a dead link.\n */\n url?: string\n /** Published date, through {@link formatCollectionEntryDate} (AGL-1525). */\n date?: string\n /** Category display name for the suggestion row's chip (AGL-1525). */\n category?: string\n}\n\n/** One related post as stamped onto a Related posts block (AGL-582). */\nexport interface CollectionRelatedItem {\n title: string\n url: string\n date?: string\n excerpt?: string\n /** Per-entry byline (AGL-686); falls back to the site as author. */\n authorName?: string\n category?: string\n /**\n * The entry's cover, as STORED (AGL-1457) — a `media:` reference, a legacy\n * URL, or a hotlink. Left unresolved on purpose: the block resolves it at\n * render through `resolveMediaSrc`, exactly as the Image element does, so\n * one reference keeps working across sites and CDN route changes.\n */\n coverImage?: string\n /**\n * The author's description of that cover (AGL-2418). Travels WITH\n * `coverImage`, and absent means \"fall back to the title\" rather than\n * \"silent\" — on this block the cover is the link's own content.\n */\n coverImageAlt?: string\n}\n\n/**\n * Related-post selection (AGL-582): other entries of the same collection\n * that share the current entry's category or at least one tag, newest\n * first. Pure so the compose stage and tests share one implementation. An\n * entry with no category and no tags relates to nothing — the caller\n * renders nothing rather than guessing.\n *\n * Two entries share a category when their stable `categoryId`s are equal\n * (survives renames AND deletions) or their RESOLVED display names match\n * case-insensitively — so a legacy free-typed entry still relates to a\n * migrated `categoryId` entry whose taxonomy name spells the same.\n */\nexport function selectRelatedEntries(\n entries: CollectionEntryRecord[],\n current: CollectionEntryRecord,\n limit = COLLECTION_RELATED_DEFAULT_LIMIT,\n categories?: CollectionCategory[],\n): CollectionEntryRecord[] {\n const categoryId = (current.categoryId ?? '').trim()\n const categoryName = (\n resolveEntryCategoryName(current, categories) ?? ''\n ).toLowerCase()\n const tags = (current.tags ?? []).map((tag) => tag.trim()).filter(Boolean)\n if (!categoryId && !categoryName && !tags.length) return []\n const bounded = Math.min(\n Math.max(limit, 0) || COLLECTION_RELATED_DEFAULT_LIMIT,\n COLLECTION_RELATED_MAX,\n )\n return entries\n .filter((entry) => {\n if (\n (entry.$id && entry.$id === current.$id) ||\n (entry.slug && entry.slug === current.slug)\n ) {\n return false\n }\n if (categoryId && (entry.categoryId ?? '').trim() === categoryId) {\n return true\n }\n if (\n categoryName &&\n (resolveEntryCategoryName(entry, categories) ?? '')\n .trim()\n .toLowerCase() === categoryName\n ) {\n return true\n }\n return tags.some((tag) => entryMatchesFilter(entry, { tag }))\n })\n .sort(\n (a, b) => (b.publishedAt?.seconds ?? 0) - (a.publishedAt?.seconds ?? 0),\n )\n .slice(0, bounded)\n}\n\n/**\n * Related posts blocks (AGL-582): stamps each `collectionRelated` node with\n * the current entry's related posts as a serializable `entries` prop the\n * component renders directly (no template cloning — the block owns its\n * markup). Runs only on entry renders; without an entry context the nodes\n * stay untouched, so the component's sample cards (editing surfaces) or its\n * empty site render apply. Inputs are never mutated.\n */\nexport function expandCollectionRelated<\n N extends AglynNodeSchema = AglynNodeSchema,\n>(\n nodes: Record<NodeId, N>,\n source: CollectionEntriesSource | undefined,\n currentEntry: CollectionEntryRecord | null | undefined,\n): Record<NodeId, N> {\n if (!source || !currentEntry) return nodes\n const containers = Object.entries(nodes).filter(\n ([, node]) => node?.componentId === COLLECTION_RELATED_COMPONENT_ID,\n )\n if (!containers.length) return nodes\n\n const next: Record<NodeId, N> = { ...nodes }\n for (const [containerId, container] of containers) {\n const limitRaw = Number((container.props as any)?.limit)\n // Per node, exactly as the byline reads it (AGL-1459): the format is a\n // prop, so two rails on one template can date their cards differently.\n const dateFormat = normalizeCollectionEntryDateFormat(\n (container.props as any)?.dateFormat,\n )\n const related = selectRelatedEntries(\n source.entries ?? [],\n currentEntry,\n Number.isFinite(limitRaw) && limitRaw > 0\n ? limitRaw\n : COLLECTION_RELATED_DEFAULT_LIMIT,\n source.categories,\n )\n const items: CollectionRelatedItem[] = related.map((entry) => {\n const categoryName = resolveEntryCategoryName(entry, source.categories)\n return {\n title: entry.title ?? '',\n url: `/${source.slug}/${entry.slug ?? ''}`,\n // Through the one formatter (AGL-1926), not a second inline\n // `toLocaleDateString()`. It produced the same bytes only because\n // this runs on the server, where the implicit locale and zone happen\n // to be the ones `formatCollectionEntryDate` now pins; a related-post\n // card is the same published date as the byline above it and must not\n // be able to disagree with it.\n //\n // Answered HERE and not in the block (AGL-2486), for the reason the\n // byline's format is: by the time a date reaches the component it is\n // a formatted string, and re-parsing one is ambiguous by\n // construction — `8/9/2026` is 9 August under `en-US` and 8 September\n // under `en-GB`. The timestamp only exists on this side.\n ...(entry.publishedAt?.seconds\n ? { date: formatCollectionEntryDate(entry.publishedAt, dateFormat) }\n : {}),\n ...(entry.excerpt ? { excerpt: entry.excerpt } : {}),\n // AGL-1457: the block owns its markup, so there is no template to\n // bind `{{entry.coverImage}}` on — the cover can only reach it as a\n // stamped field. Absent covers omit the key rather than stamping an\n // empty string, so the render asks one question, not two.\n ...(entry.coverImage ? { coverImage: entry.coverImage } : {}),\n // Only alongside a cover, and only when authored (AGL-2418) — a\n // description with no picture is dead weight on every stamped node.\n ...(entry.coverImage && (entry as any).coverImageAlt\n ? { coverImageAlt: (entry as any).coverImageAlt }\n : {}),\n ...(categoryName ? { category: categoryName } : {}),\n }\n })\n next[containerId] = {\n ...container,\n props: { ...(container.props as any), entries: items },\n }\n }\n return next\n}\n\nexport default expandCollectionEntries\n"],"names":["COLLECTION_ENTRY_DATE_FORMAT_DEFAULT","collectionEntryPublishedAtIso","formatCollectionEntryDate","normalizeCollectionEntryDateFormat","contentAuthorPageUrl","normalizeContentAuthorLinks","resolveNamedTokens","COLLECTION_ENTRIES_COMPONENT_ID","COLLECTION_ENTRY_BODY_COMPONENT_ID","COLLECTION_RELATED_COMPONENT_ID","COLLECTION_SHARE_COMPONENT_ID","COLLECTION_ENTRY_META_COMPONENT_ID","COLLECTION_ENTRY_AUTHOR_COMPONENT_ID","COLLECTION_CATEGORIES_COMPONENT_ID","COLLECTION_SEARCH_COMPONENT_ID","COLLECTION_PAGE_ROUTE_SEGMENT","COLLECTION_CATEGORY_ROUTE_SEGMENT","COLLECTION_ENTRIES_NODE_ID_PREFIX","COLLECTION_ENTRIES_MAX","COLLECTION_SOURCE_MAX","collectionSourceReachedBound","entries","length","collectionSourceIsBounded","source","reachedBound","COLLECTION_LIST_PAGE_SIZE","collectionTotalPages","total","perPage","Math","max","ceil","COLLECTION_RELATED_DEFAULT_LIMIT","COLLECTION_RELATED_MAX","COLLECTION_CATEGORIES_MAX","ENTRIES_MAX_PER_COLLECTION","COLLECTIONS_MAX_PER_HOST","resolveEntryCategoryName","entry","categories","categoryId","trim","match","find","category","id","name","legacy","undefined","collectionEntryMetaValues","dateFormat","date","publishedAt","author","authorName","tags","join","collectionEntryAuthorValues","pageUrl","authorId","links","bio","image","url","collectionEntryTokens","collectionSlug","meta","slug","title","excerpt","body","coverImage","coverVideo","collectionName","seoTitle","seoDescription","entryMatchesFilter","filter","normalize","value","toLowerCase","wanted","matchesId","Boolean","matchesName","tag","some","collectionCategorySlug","String","replace","resolveCollectionCategoryBySlug","collectionListUrl","options","scoped","categorySlug","page","Number","isFinite","floor","collectionPaginationLinks","positive","parsed","totalPages","href","n","prevUrl","nextUrl","POSITIVE_INTEGER","parseCollectionRoute","segments","rest","entrySlug","test","entryMatchesCategoryRoute","route","Set","map","size","entryId","has","entryName","COLLECTION_ALL_PILL_DEFAULT","COLLECTION_ALL_PILL_NONE","resolveCollectionAllLabel","text","buildCollectionCategoryLinks","active","activeCategorySlug","idSlug","nameSlug","push","label","allLabel","buildCollectionSearchIndex","categoryName","seconds","COLLECTION_BOUND_COMPONENT_IDS","nodesRenderCollection","nodes","node","Object","values","includes","componentId","bound","props","expandCollectionEntries","sourcesBySlug","defaultSlug","containers","next","containerId","container","limitRaw","entriesLimit","limit","min","perPageRaw","pageRaw","routedPage","firstPageOnly","suppressedBeyondFirstPage","templateIds","Array","isArray","filterCategory","filterTag","filtered","sourceCapped","windowed","slice","childIds","forEach","index","prefix","prefixId","cloned","cloneSubtree","parentId","clonedChildren","$id","childId","templateId","cloneId","cloneNode","fill","entryMetaFill","entryAuthorFill","keys","assign","searchEnabled","search","searchIndex","searchTotal","searchCapped","expandCollectionCategories","items","expandCollectionSearch","startsWith","expandCollectionEntryMeta","filled","key","authored","reformattableEntryDate","authorImage","bylineShown","expandCollectionEntryAuthor","ENTRY_DATE_BINDING","COLLECTION_SEARCH_FUSE_OPTIONS","weight","includeScore","shouldSort","ignoreLocation","threshold","selectRelatedEntries","current","bounded","sort","a","b","expandCollectionRelated","currentEntry","related","coverImageAlt"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAGD,SACEA,oCAAoC,EAEpCC,6BAA6B,EAC7BC,yBAAyB,EACzBC,kCAAkC,QAC7B,6BAAyB;AAChC,SAGEC,oBAAoB,EACpBC,2BAA2B,QACtB,uBAAmB;AAC1B,SAASC,kBAAkB,QAAQ,4BAAwB;AAE3D,cAAc,6BAAyB;AAEvC;;;;CAIC,GACD,OAAO,MAAMC,kCAAkC,oBAAmB;AAElE,6EAA6E,GAC7E,OAAO,MAAMC,qCAAqC,sBAAqB;AAEvE;;;;CAIC,GACD,OAAO,MAAMC,k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AU0F;YAAa,IAAI,CAAC;QAErD;QACAgB,IAAI,CAACC,YAAY,GAAG,aACfC;YACHP,OAAO,aAAMO,UAAUP,KAAK;gBAAU7H,SAASgL;;;IAEnD;IACA,OAAO9C;AACT;AAEA,eAAeJ,wBAAuB"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * How an entry's published date is spelled, and the one function that spells
19
+ * it.
20
+ *
21
+ * Its own module because a published page's client bundle reads
22
+ * `formatCollectionEntryDate` and nothing else here: `collection-entries.ts`
23
+ * carries the whole collection runtime — routing, pagination, category links,
24
+ * the search index and the four block expanders — and a bundler cannot drop
25
+ * the rest of it around a single named import.
26
+ */
27
+ /**
28
+ * How an entry's published date reads (AGL-1459).
29
+ *
30
+ * Named shapes rather than a format string, for the same reason the styles
31
+ * panel offers a unit picker rather than a CSS box: an editor choosing a
32
+ * byline is not choosing a grammar, and a free-typed pattern is a field where
33
+ * every typo renders as itself on a published page.
34
+ */
35
+ export type CollectionEntryDateFormat = 'default' | 'monthYear' | 'mediumDate' | 'longDate' | 'iso';
36
+ /**
37
+ * "However the site already renders it" — a REAL value, never absence
38
+ * (AGL-1459).
39
+ *
40
+ * `''` is the shape AGL-1451/AGL-1453 closed repo-wide: an emptied field
41
+ * cannot survive a save, so an author who tried a format and wanted the
42
+ * original back would have no option to pick. So the do-nothing choice is a
43
+ * word, exactly like `COLLECTION_ALL_PILL_NONE` in `collection-entries.ts`.
44
+ */
45
+ export declare const COLLECTION_ENTRY_DATE_FORMAT_DEFAULT: CollectionEntryDateFormat;
46
+ /**
47
+ * The offered formats, with the labels an author reads (AGL-1459). Lives here
48
+ * rather than in the block's schema so the list and the formatter cannot
49
+ * drift into offering a shape nothing knows how to produce.
50
+ *
51
+ * Example dates in the labels are written the way the default runtime renders
52
+ * them, which is what makes the choice legible without opening a preview.
53
+ */
54
+ export declare const COLLECTION_ENTRY_DATE_FORMAT_OPTIONS: readonly {
55
+ value: CollectionEntryDateFormat;
56
+ label: string;
57
+ }[];
58
+ /** Any stored value read back as a format this module knows (AGL-1459). */
59
+ export declare function normalizeCollectionEntryDateFormat(value: unknown): CollectionEntryDateFormat;
60
+ /**
61
+ * One entry's published date, in the shape the author asked for (AGL-1459).
62
+ *
63
+ * **The formatting lives HERE, beside the timestamp, and deliberately not in
64
+ * the block.** By the time a date reaches the component it is already a
65
+ * formatted string, and re-parsing one is ambiguous by construction: the same
66
+ * `8/9/2026` reads as 9 August under an `en-US` runtime and 8 September under
67
+ * `en-GB`. A byline that silently moves an article by three weeks is far worse
68
+ * than one that is the wrong shape.
69
+ *
70
+ * `default` returns exactly `toLocaleDateString()` — the string this function
71
+ * replaced, character for character — because the block is live on published
72
+ * entries and opening a dropdown must not restyle them.
73
+ *
74
+ * ## Why the runtime gets no say (AGL-1926)
75
+ *
76
+ * Every branch pins BOTH the locale and the time zone, and the answer is a
77
+ * pure function of the timestamp. It used to pass `locale` straight through
78
+ * (normally `undefined`) with no `timeZone` at all, so the output was a
79
+ * function of the RUNTIME: `en-US` + UTC on a Vercel server, the visitor's
80
+ * own locale and zone in their browser. That is fine while only the server
81
+ * ever calls it — the string is stamped into node props at compose time and
82
+ * both sides then agree on it — but it makes the function a hydration
83
+ * mismatch waiting for its first client-side caller, and `catch-all-client`
84
+ * was exactly that caller. A post published at 02:30 UTC is dated the 10th by
85
+ * the server and the 9th by every visitor west of Greenwich; React reports
86
+ * the difference as a text mismatch (the live React #418 on tenant-web,
87
+ * AGL-1926) and then reconciles against a DOM it no longer describes, which
88
+ * is where the `removeChild`/`insertBefore` pair comes from.
89
+ *
90
+ * The pinned values are the ones production already emits, so no published
91
+ * page changes: Vercel runs UTC with an `en-US` ICU default, which is why
92
+ * every entry date served from aglyn.com today reads `8/9/2026`. Pinning
93
+ * makes that byte-for-byte guaranteed instead of a property of the host.
94
+ *
95
+ * `locale` still exists for a caller that must render in a different one; it
96
+ * now defaults to the value the server was picking implicitly rather than to
97
+ * "whatever this runtime happens to be".
98
+ */
99
+ export declare const COLLECTION_ENTRY_DATE_LOCALE = "en-US";
100
+ /**
101
+ * The zone the calendar day is read in. Entry timestamps are absolute
102
+ * instants; the day they are ATTRIBUTED to has to be one both sides agree on,
103
+ * and UTC is the only zone a server and an unknown visitor share.
104
+ */
105
+ export declare const COLLECTION_ENTRY_DATE_TIME_ZONE = "UTC";
106
+ export declare function formatCollectionEntryDate(publishedAt: {
107
+ seconds: number;
108
+ } | null | undefined, format?: CollectionEntryDateFormat, locale?: string): string;
109
+ /**
110
+ * One entry's publish instant for a machine to read: an ISO 8601 date-time in
111
+ * UTC, or `''` for an entry with no date (AGL-2956).
112
+ *
113
+ * {@link formatCollectionEntryDate} writes the date a READER sees, and every
114
+ * one of its shapes is ambiguous or incomplete to a parser: `8/9/2026` is a
115
+ * different day in `en-GB`, and even its `iso` shape is a calendar day with no
116
+ * time or zone. A field that has to be parsed — a Video element's publication
117
+ * date, which the page publishes as `VideoObject.uploadDate` — needs the
118
+ * instant itself, spelled by `toISOString()` as `Article.datePublished` is.
119
+ *
120
+ * It reads the same `publishedAt` and treats a missing or zero `seconds` the
121
+ * same way, so an entry is dated here exactly when it is dated there.
122
+ *
123
+ * A `seconds` no `Date` can hold answers `''` rather than throwing:
124
+ * `toISOString` raises a RangeError on an invalid date, and this runs while a
125
+ * page composes.
126
+ */
127
+ export declare function collectionEntryPublishedAtIso(publishedAt: {
128
+ seconds: number;
129
+ } | null | undefined): string;
@@ -0,0 +1,183 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * How an entry's published date is spelled, and the one function that spells
18
+ * it.
19
+ *
20
+ * Its own module because a published page's client bundle reads
21
+ * `formatCollectionEntryDate` and nothing else here: `collection-entries.ts`
22
+ * carries the whole collection runtime — routing, pagination, category links,
23
+ * the search index and the four block expanders — and a bundler cannot drop
24
+ * the rest of it around a single named import.
25
+ */ /**
26
+ * How an entry's published date reads (AGL-1459).
27
+ *
28
+ * Named shapes rather than a format string, for the same reason the styles
29
+ * panel offers a unit picker rather than a CSS box: an editor choosing a
30
+ * byline is not choosing a grammar, and a free-typed pattern is a field where
31
+ * every typo renders as itself on a published page.
32
+ */ /**
33
+ * "However the site already renders it" — a REAL value, never absence
34
+ * (AGL-1459).
35
+ *
36
+ * `''` is the shape AGL-1451/AGL-1453 closed repo-wide: an emptied field
37
+ * cannot survive a save, so an author who tried a format and wanted the
38
+ * original back would have no option to pick. So the do-nothing choice is a
39
+ * word, exactly like `COLLECTION_ALL_PILL_NONE` in `collection-entries.ts`.
40
+ */ export const COLLECTION_ENTRY_DATE_FORMAT_DEFAULT = 'default';
41
+ /**
42
+ * The offered formats, with the labels an author reads (AGL-1459). Lives here
43
+ * rather than in the block's schema so the list and the formatter cannot
44
+ * drift into offering a shape nothing knows how to produce.
45
+ *
46
+ * Example dates in the labels are written the way the default runtime renders
47
+ * them, which is what makes the choice legible without opening a preview.
48
+ */ export const COLLECTION_ENTRY_DATE_FORMAT_OPTIONS = [
49
+ {
50
+ value: 'default',
51
+ label: 'Site default — 8/9/2026'
52
+ },
53
+ {
54
+ value: 'monthYear',
55
+ label: 'Month and year — Aug 2026'
56
+ },
57
+ {
58
+ value: 'mediumDate',
59
+ label: 'Short date — Aug 9, 2026'
60
+ },
61
+ {
62
+ value: 'longDate',
63
+ label: 'Long date — August 9, 2026'
64
+ },
65
+ {
66
+ value: 'iso',
67
+ label: 'ISO — 2026-08-09'
68
+ }
69
+ ];
70
+ /** Any stored value read back as a format this module knows (AGL-1459). */ export function normalizeCollectionEntryDateFormat(value) {
71
+ var _ref;
72
+ const wanted = String(value != null ? value : '').trim();
73
+ const match = COLLECTION_ENTRY_DATE_FORMAT_OPTIONS.find((option)=>option.value === wanted);
74
+ return (_ref = match == null ? void 0 : match.value) != null ? _ref : COLLECTION_ENTRY_DATE_FORMAT_DEFAULT;
75
+ }
76
+ /**
77
+ * One entry's published date, in the shape the author asked for (AGL-1459).
78
+ *
79
+ * **The formatting lives HERE, beside the timestamp, and deliberately not in
80
+ * the block.** By the time a date reaches the component it is already a
81
+ * formatted string, and re-parsing one is ambiguous by construction: the same
82
+ * `8/9/2026` reads as 9 August under an `en-US` runtime and 8 September under
83
+ * `en-GB`. A byline that silently moves an article by three weeks is far worse
84
+ * than one that is the wrong shape.
85
+ *
86
+ * `default` returns exactly `toLocaleDateString()` — the string this function
87
+ * replaced, character for character — because the block is live on published
88
+ * entries and opening a dropdown must not restyle them.
89
+ *
90
+ * ## Why the runtime gets no say (AGL-1926)
91
+ *
92
+ * Every branch pins BOTH the locale and the time zone, and the answer is a
93
+ * pure function of the timestamp. It used to pass `locale` straight through
94
+ * (normally `undefined`) with no `timeZone` at all, so the output was a
95
+ * function of the RUNTIME: `en-US` + UTC on a Vercel server, the visitor's
96
+ * own locale and zone in their browser. That is fine while only the server
97
+ * ever calls it — the string is stamped into node props at compose time and
98
+ * both sides then agree on it — but it makes the function a hydration
99
+ * mismatch waiting for its first client-side caller, and `catch-all-client`
100
+ * was exactly that caller. A post published at 02:30 UTC is dated the 10th by
101
+ * the server and the 9th by every visitor west of Greenwich; React reports
102
+ * the difference as a text mismatch (the live React #418 on tenant-web,
103
+ * AGL-1926) and then reconciles against a DOM it no longer describes, which
104
+ * is where the `removeChild`/`insertBefore` pair comes from.
105
+ *
106
+ * The pinned values are the ones production already emits, so no published
107
+ * page changes: Vercel runs UTC with an `en-US` ICU default, which is why
108
+ * every entry date served from aglyn.com today reads `8/9/2026`. Pinning
109
+ * makes that byte-for-byte guaranteed instead of a property of the host.
110
+ *
111
+ * `locale` still exists for a caller that must render in a different one; it
112
+ * now defaults to the value the server was picking implicitly rather than to
113
+ * "whatever this runtime happens to be".
114
+ */ export const COLLECTION_ENTRY_DATE_LOCALE = 'en-US';
115
+ /**
116
+ * The zone the calendar day is read in. Entry timestamps are absolute
117
+ * instants; the day they are ATTRIBUTED to has to be one both sides agree on,
118
+ * and UTC is the only zone a server and an unknown visitor share.
119
+ */ export const COLLECTION_ENTRY_DATE_TIME_ZONE = 'UTC';
120
+ export function formatCollectionEntryDate(publishedAt, format, locale = COLLECTION_ENTRY_DATE_LOCALE) {
121
+ const seconds = publishedAt == null ? void 0 : publishedAt.seconds;
122
+ if (!seconds) return '';
123
+ const date = new Date(seconds * 1000);
124
+ const timeZone = COLLECTION_ENTRY_DATE_TIME_ZONE;
125
+ switch(normalizeCollectionEntryDateFormat(format)){
126
+ case 'monthYear':
127
+ return date.toLocaleDateString(locale, {
128
+ month: 'short',
129
+ year: 'numeric',
130
+ timeZone
131
+ });
132
+ case 'mediumDate':
133
+ return date.toLocaleDateString(locale, {
134
+ month: 'short',
135
+ day: 'numeric',
136
+ year: 'numeric',
137
+ timeZone
138
+ });
139
+ case 'longDate':
140
+ return date.toLocaleDateString(locale, {
141
+ month: 'long',
142
+ day: 'numeric',
143
+ year: 'numeric',
144
+ timeZone
145
+ });
146
+ case 'iso':
147
+ // The calendar day in the pinned zone, not `toISOString()`'s slice by
148
+ // luck and not the RUNTIME's local day: `getFullYear`/`getMonth`/
149
+ // `getDate` read the host's zone, so this branch moved an entry by a
150
+ // day depending on who rendered it. The UTC accessors are the same
151
+ // reading the three `toLocaleDateString` branches above now take.
152
+ return `${date.getUTCFullYear()}-` + `${String(date.getUTCMonth() + 1).padStart(2, '0')}-` + `${String(date.getUTCDate()).padStart(2, '0')}`;
153
+ default:
154
+ return date.toLocaleDateString(locale, {
155
+ timeZone
156
+ });
157
+ }
158
+ }
159
+ /**
160
+ * One entry's publish instant for a machine to read: an ISO 8601 date-time in
161
+ * UTC, or `''` for an entry with no date (AGL-2956).
162
+ *
163
+ * {@link formatCollectionEntryDate} writes the date a READER sees, and every
164
+ * one of its shapes is ambiguous or incomplete to a parser: `8/9/2026` is a
165
+ * different day in `en-GB`, and even its `iso` shape is a calendar day with no
166
+ * time or zone. A field that has to be parsed — a Video element's publication
167
+ * date, which the page publishes as `VideoObject.uploadDate` — needs the
168
+ * instant itself, spelled by `toISOString()` as `Article.datePublished` is.
169
+ *
170
+ * It reads the same `publishedAt` and treats a missing or zero `seconds` the
171
+ * same way, so an entry is dated here exactly when it is dated there.
172
+ *
173
+ * A `seconds` no `Date` can hold answers `''` rather than throwing:
174
+ * `toISOString` raises a RangeError on an invalid date, and this runs while a
175
+ * page composes.
176
+ */ export function collectionEntryPublishedAtIso(publishedAt) {
177
+ const seconds = publishedAt == null ? void 0 : publishedAt.seconds;
178
+ if (!seconds) return '';
179
+ const date = new Date(seconds * 1000);
180
+ return Number.isNaN(date.getTime()) ? '' : date.toISOString();
181
+ }
182
+
183
+ //# sourceMappingURL=collection-entry-date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/collection-entry-date.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * How an entry's published date is spelled, and the one function that spells\n * it.\n *\n * Its own module because a published page's client bundle reads\n * `formatCollectionEntryDate` and nothing else here: `collection-entries.ts`\n * carries the whole collection runtime — routing, pagination, category links,\n * the search index and the four block expanders — and a bundler cannot drop\n * the rest of it around a single named import.\n */\n\n/**\n * How an entry's published date reads (AGL-1459).\n *\n * Named shapes rather than a format string, for the same reason the styles\n * panel offers a unit picker rather than a CSS box: an editor choosing a\n * byline is not choosing a grammar, and a free-typed pattern is a field where\n * every typo renders as itself on a published page.\n */\nexport type CollectionEntryDateFormat =\n 'default' | 'monthYear' | 'mediumDate' | 'longDate' | 'iso'\n\n/**\n * \"However the site already renders it\" — a REAL value, never absence\n * (AGL-1459).\n *\n * `''` is the shape AGL-1451/AGL-1453 closed repo-wide: an emptied field\n * cannot survive a save, so an author who tried a format and wanted the\n * original back would have no option to pick. So the do-nothing choice is a\n * word, exactly like `COLLECTION_ALL_PILL_NONE` in `collection-entries.ts`.\n */\nexport const COLLECTION_ENTRY_DATE_FORMAT_DEFAULT: CollectionEntryDateFormat =\n 'default'\n\n/**\n * The offered formats, with the labels an author reads (AGL-1459). Lives here\n * rather than in the block's schema so the list and the formatter cannot\n * drift into offering a shape nothing knows how to produce.\n *\n * Example dates in the labels are written the way the default runtime renders\n * them, which is what makes the choice legible without opening a preview.\n */\nexport const COLLECTION_ENTRY_DATE_FORMAT_OPTIONS: readonly {\n value: CollectionEntryDateFormat\n label: string\n}[] = [\n { value: 'default', label: 'Site default — 8/9/2026' },\n { value: 'monthYear', label: 'Month and year — Aug 2026' },\n { value: 'mediumDate', label: 'Short date — Aug 9, 2026' },\n { value: 'longDate', label: 'Long date — August 9, 2026' },\n { value: 'iso', label: 'ISO — 2026-08-09' },\n]\n\n/** Any stored value read back as a format this module knows (AGL-1459). */\nexport function normalizeCollectionEntryDateFormat(\n value: unknown,\n): CollectionEntryDateFormat {\n const wanted = String(value ?? '').trim()\n const match = COLLECTION_ENTRY_DATE_FORMAT_OPTIONS.find(\n (option) => option.value === wanted,\n )\n return match?.value ?? COLLECTION_ENTRY_DATE_FORMAT_DEFAULT\n}\n\n/**\n * One entry's published date, in the shape the author asked for (AGL-1459).\n *\n * **The formatting lives HERE, beside the timestamp, and deliberately not in\n * the block.** By the time a date reaches the component it is already a\n * formatted string, and re-parsing one is ambiguous by construction: the same\n * `8/9/2026` reads as 9 August under an `en-US` runtime and 8 September under\n * `en-GB`. A byline that silently moves an article by three weeks is far worse\n * than one that is the wrong shape.\n *\n * `default` returns exactly `toLocaleDateString()` — the string this function\n * replaced, character for character — because the block is live on published\n * entries and opening a dropdown must not restyle them.\n *\n * ## Why the runtime gets no say (AGL-1926)\n *\n * Every branch pins BOTH the locale and the time zone, and the answer is a\n * pure function of the timestamp. It used to pass `locale` straight through\n * (normally `undefined`) with no `timeZone` at all, so the output was a\n * function of the RUNTIME: `en-US` + UTC on a Vercel server, the visitor's\n * own locale and zone in their browser. That is fine while only the server\n * ever calls it — the string is stamped into node props at compose time and\n * both sides then agree on it — but it makes the function a hydration\n * mismatch waiting for its first client-side caller, and `catch-all-client`\n * was exactly that caller. A post published at 02:30 UTC is dated the 10th by\n * the server and the 9th by every visitor west of Greenwich; React reports\n * the difference as a text mismatch (the live React #418 on tenant-web,\n * AGL-1926) and then reconciles against a DOM it no longer describes, which\n * is where the `removeChild`/`insertBefore` pair comes from.\n *\n * The pinned values are the ones production already emits, so no published\n * page changes: Vercel runs UTC with an `en-US` ICU default, which is why\n * every entry date served from aglyn.com today reads `8/9/2026`. Pinning\n * makes that byte-for-byte guaranteed instead of a property of the host.\n *\n * `locale` still exists for a caller that must render in a different one; it\n * now defaults to the value the server was picking implicitly rather than to\n * \"whatever this runtime happens to be\".\n */\nexport const COLLECTION_ENTRY_DATE_LOCALE = 'en-US'\n\n/**\n * The zone the calendar day is read in. Entry timestamps are absolute\n * instants; the day they are ATTRIBUTED to has to be one both sides agree on,\n * and UTC is the only zone a server and an unknown visitor share.\n */\nexport const COLLECTION_ENTRY_DATE_TIME_ZONE = 'UTC'\n\nexport function formatCollectionEntryDate(\n publishedAt: { seconds: number } | null | undefined,\n format?: CollectionEntryDateFormat,\n locale: string = COLLECTION_ENTRY_DATE_LOCALE,\n): string {\n const seconds = publishedAt?.seconds\n if (!seconds) return ''\n const date = new Date(seconds * 1000)\n const timeZone = COLLECTION_ENTRY_DATE_TIME_ZONE\n switch (normalizeCollectionEntryDateFormat(format)) {\n case 'monthYear':\n return date.toLocaleDateString(locale, {\n month: 'short',\n year: 'numeric',\n timeZone,\n })\n case 'mediumDate':\n return date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n timeZone,\n })\n case 'longDate':\n return date.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone,\n })\n case 'iso':\n // The calendar day in the pinned zone, not `toISOString()`'s slice by\n // luck and not the RUNTIME's local day: `getFullYear`/`getMonth`/\n // `getDate` read the host's zone, so this branch moved an entry by a\n // day depending on who rendered it. The UTC accessors are the same\n // reading the three `toLocaleDateString` branches above now take.\n return (\n `${date.getUTCFullYear()}-` +\n `${String(date.getUTCMonth() + 1).padStart(2, '0')}-` +\n `${String(date.getUTCDate()).padStart(2, '0')}`\n )\n default:\n return date.toLocaleDateString(locale, { timeZone })\n }\n}\n\n/**\n * One entry's publish instant for a machine to read: an ISO 8601 date-time in\n * UTC, or `''` for an entry with no date (AGL-2956).\n *\n * {@link formatCollectionEntryDate} writes the date a READER sees, and every\n * one of its shapes is ambiguous or incomplete to a parser: `8/9/2026` is a\n * different day in `en-GB`, and even its `iso` shape is a calendar day with no\n * time or zone. A field that has to be parsed — a Video element's publication\n * date, which the page publishes as `VideoObject.uploadDate` — needs the\n * instant itself, spelled by `toISOString()` as `Article.datePublished` is.\n *\n * It reads the same `publishedAt` and treats a missing or zero `seconds` the\n * same way, so an entry is dated here exactly when it is dated there.\n *\n * A `seconds` no `Date` can hold answers `''` rather than throwing:\n * `toISOString` raises a RangeError on an invalid date, and this runs while a\n * page composes.\n */\nexport function collectionEntryPublishedAtIso(\n publishedAt: { seconds: number } | null | undefined,\n): string {\n const seconds = publishedAt?.seconds\n if (!seconds) return ''\n const date = new Date(seconds * 1000)\n return Number.isNaN(date.getTime()) ? '' : date.toISOString()\n}\n"],"names":["COLLECTION_ENTRY_DATE_FORMAT_DEFAULT","COLLECTION_ENTRY_DATE_FORMAT_OPTIONS","value","label","normalizeCollectionEntryDateFormat","wanted","String","trim","match","find","option","COLLECTION_ENTRY_DATE_LOCALE","COLLECTION_ENTRY_DATE_TIME_ZONE","formatCollectionEntryDate","publishedAt","format","locale","seconds","date","Date","timeZone","toLocaleDateString","month","year","day","getUTCFullYear","getUTCMonth","padStart","getUTCDate","collectionEntryPublishedAtIso","Number","isNaN","getTime","toISOString"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;CASC,GAED;;;;;;;CAOC,GAID;;;;;;;;CAQC,GACD,OAAO,MAAMA,uCACX,UAAS;AAEX;;;;;;;CAOC,GACD,OAAO,MAAMC,uCAGP;IACJ;QAAEC,OAAO;QAAWC,OAAO;IAA0B;IACrD;QAAED,OAAO;QAAaC,OAAO;IAA4B;IACzD;QAAED,OAAO;QAAcC,OAAO;IAA2B;IACzD;QAAED,OAAO;QAAYC,OAAO;IAA6B;IACzD;QAAED,OAAO;QAAOC,OAAO;IAAmB;CAC3C,CAAA;AAED,yEAAyE,GACzE,OAAO,SAASC,mCACdF,KAAc;;IAEd,MAAMG,SAASC,OAAOJ,gBAAAA,QAAS,IAAIK,IAAI;IACvC,MAAMC,QAAQP,qCAAqCQ,IAAI,CACrD,CAACC,SAAWA,OAAOR,KAAK,KAAKG;IAE/B,eAAOG,yBAAAA,MAAON,KAAK,mBAAIF;AACzB;AAEA;;;;;;;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