@aglyn/plugins-ai 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/package.json +17 -17
  2. package/src/lib/components/ai-insight-dialog.component.js +7 -2
  3. package/src/lib/components/ai-insight-dialog.component.js.map +1 -1
  4. package/src/lib/components/ai-job-request.component.d.ts +28 -0
  5. package/src/lib/components/ai-job-request.component.js +103 -0
  6. package/src/lib/components/ai-job-request.component.js.map +1 -0
  7. package/src/lib/components/ai-jobs-list-page.component.d.ts +2 -0
  8. package/src/lib/components/ai-jobs-list-page.component.js +2 -2
  9. package/src/lib/components/ai-jobs-list-page.component.js.map +1 -1
  10. package/src/lib/components/ai-site-build-page.component.js +36 -6
  11. package/src/lib/components/ai-site-build-page.component.js.map +1 -1
  12. package/src/lib/components/ai-site-import-job.component.js +2 -2
  13. package/src/lib/components/ai-site-import-job.component.js.map +1 -1
  14. package/src/lib/insights/ai-insight-digest.d.ts +34 -5
  15. package/src/lib/insights/ai-insight-digest.js +171 -10
  16. package/src/lib/insights/ai-insight-digest.js.map +1 -1
  17. package/src/lib/jobs/ai-job-import-step.d.ts +35 -2
  18. package/src/lib/jobs/ai-job-import-step.js +124 -12
  19. package/src/lib/jobs/ai-job-import-step.js.map +1 -1
  20. package/src/lib/jobs/ai-job-insight-step.d.ts +1 -1
  21. package/src/lib/jobs/ai-job-insight-step.js +5 -1
  22. package/src/lib/jobs/ai-job-insight-step.js.map +1 -1
  23. package/src/lib/jobs/ai-jobs.d.ts +6 -0
  24. package/src/lib/jobs/ai-jobs.js +43 -6
  25. package/src/lib/jobs/ai-jobs.js.map +1 -1
  26. package/src/lib/jobs/ai-layout-stock-photos.d.ts +13 -6
  27. package/src/lib/jobs/ai-layout-stock-photos.js +104 -32
  28. package/src/lib/jobs/ai-layout-stock-photos.js.map +1 -1
  29. package/src/lib/jobs/ai-site-import-compile.js +110 -23
  30. package/src/lib/jobs/ai-site-import-compile.js.map +1 -1
  31. package/src/lib/jobs/ai-site-import-document.d.ts +5 -0
  32. package/src/lib/jobs/ai-site-import-document.js.map +1 -1
  33. package/src/lib/jobs/ai-site-import-forms.d.ts +83 -0
  34. package/src/lib/jobs/ai-site-import-forms.js +376 -0
  35. package/src/lib/jobs/ai-site-import-forms.js.map +1 -0
  36. package/src/lib/jobs/fixtures/ai-stock-photo-agl4092-1101-recordings.d.ts +21 -0
  37. package/src/lib/jobs/fixtures/ai-stock-photo-agl4092-1101-recordings.js +77 -0
  38. package/src/lib/jobs/fixtures/ai-stock-photo-agl4092-1101-recordings.js.map +1 -0
  39. package/src/lib/layout-language/ai-layout-compiler.d.ts +2 -0
  40. package/src/lib/layout-language/ai-layout-compiler.js +215 -30
  41. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  42. package/src/lib/layout-language/ai-layout-language.d.ts +12 -0
  43. package/src/lib/layout-language/ai-layout-language.js.map +1 -1
  44. package/src/lib/model/ai-credit-estimate.d.ts +25 -22
  45. package/src/lib/model/ai-credit-estimate.js +24 -22
  46. package/src/lib/model/ai-credit-estimate.js.map +1 -1
  47. package/src/lib/model/ai-insight.d.ts +4 -0
  48. package/src/lib/model/ai-insight.js +1 -0
  49. package/src/lib/model/ai-insight.js.map +1 -1
  50. package/src/lib/model/ai-site-build-progress.d.ts +8 -0
  51. package/src/lib/model/ai-site-build-progress.js +62 -1
  52. package/src/lib/model/ai-site-build-progress.js.map +1 -1
  53. package/src/lib/model/ai-site-import-fidelity.d.ts +2 -0
  54. package/src/lib/model/ai-site-import-fidelity.js +41 -5
  55. package/src/lib/model/ai-site-import-fidelity.js.map +1 -1
  56. package/src/lib/model/ai-site-import-report.d.ts +60 -0
  57. package/src/lib/model/ai-site-import-report.js +116 -0
  58. package/src/lib/model/ai-site-import-report.js.map +1 -0
  59. package/src/lib/model/ai-site-import-view.d.ts +7 -1
  60. package/src/lib/model/ai-site-import-view.js +14 -2
  61. package/src/lib/model/ai-site-import-view.js.map +1 -1
  62. package/src/lib/model/ai-site-import.d.ts +49 -2
  63. package/src/lib/model/ai-site-import.js +81 -23
  64. package/src/lib/model/ai-site-import.js.map +1 -1
  65. package/src/lib/plugin.js +1 -1
  66. package/src/lib/plugin.js.map +1 -1
  67. package/src/lib/runtime/ai-insight-check.js +22 -6
  68. package/src/lib/runtime/ai-insight-check.js.map +1 -1
  69. package/src/lib/server/ai-insight-digest-route.js +3 -1
  70. package/src/lib/server/ai-insight-digest-route.js.map +1 -1
  71. package/src/lib/site-import/fixtures/site-layout-recordings.d.ts +4 -0
  72. package/src/lib/site-import/fixtures/site-layout-recordings.js +9 -4
  73. package/src/lib/site-import/fixtures/site-layout-recordings.js.map +1 -1
  74. package/src/lib/site-import/site-import-css.d.ts +10 -1
  75. package/src/lib/site-import/site-import-css.js +19 -12
  76. package/src/lib/site-import/site-import-css.js.map +1 -1
  77. package/src/lib/site-import/site-import-html.d.ts +17 -4
  78. package/src/lib/site-import/site-import-html.js +146 -17
  79. package/src/lib/site-import/site-import-html.js.map +1 -1
  80. package/src/lib/site-import/site-import-layout.js +194 -32
  81. package/src/lib/site-import/site-import-layout.js.map +1 -1
  82. package/src/lib/tools/ai-insight-tool.js +11 -3
  83. package/src/lib/tools/ai-insight-tool.js.map +1 -1
@@ -0,0 +1,83 @@
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
+ import type { AglynOrgBilling } from '@aglyn/aglyn/foundation/definitions/org-billing.types';
18
+ import { type NodesMap } from '@aglyn/aglyn/types/nodes';
19
+ import type { AiJob, AiJobItemLedger, AiJobOutput } from '../model/ai-jobs.types';
20
+ import type { AiSiteImportPage, AiSiteImportState, SiteImportLayout } from '../model/ai-site-import';
21
+ import { readSiteInventory } from '../runtime/site-inventory';
22
+ import type { SiteImportBlock, SiteImportForm } from '../site-import/site-import-html';
23
+ import { writeAiDraft } from './ai-job-drafts';
24
+ /** What a rebuilt form is called where no heading stands above it. */
25
+ export declare const AI_SITE_IMPORT_FORM_DEFAULT_NAME = "Contact form";
26
+ /** Customer-safe sentences, on the page's row. */
27
+ export declare const AI_SITE_IMPORT_FORM_COPY: {
28
+ readonly rebuilt: (name: string) => string;
29
+ readonly noRoom: "Your plan has no room for another form, so this page’s form is left out. Every word of the page is here.";
30
+ readonly notBuilt: "This page’s form could not be rebuilt, so it is left out. Every word of the page is here.";
31
+ readonly leftOut: (fields: readonly string[]) => string;
32
+ };
33
+ /**
34
+ * A form of a page brought in as a tree of the Form element and MUI's separate
35
+ * form elements: each field a Form Control holding its Form Label and its
36
+ * answer, a lone tick a Choice Label holding one Checkbox, as the Forms page
37
+ * builds them. The tree `aiFormDraft` stamps, binds and declares.
38
+ */
39
+ export declare function aiSiteImportFormTree(form: SiteImportForm): {
40
+ rootId: string;
41
+ nodes: NodesMap;
42
+ };
43
+ /** What identifies a form across a site's pages: what it asks and its button, never where it sits. */
44
+ export declare function aiSiteImportFormSignature(form: SiteImportForm): string;
45
+ /** Each form of a page's layout, with the nearest heading above it in its section: what it is called. */
46
+ export declare function aiSiteImportFormPlaces(layout: SiteImportLayout, blocks: readonly SiteImportBlock[]): Array<{
47
+ form: number;
48
+ heading: string | null;
49
+ }>;
50
+ /** The forms of a page still to rebuild or place: each one of its layout that asks something. */
51
+ export declare function aiSiteImportFormsOwed(page: Pick<AiSiteImportPage, 'read'>): Array<{
52
+ form: number;
53
+ heading: string | null;
54
+ }>;
55
+ export interface AiSiteImportFormsDeps {
56
+ readInventory?: typeof readSiteInventory;
57
+ writeDraft?: typeof writeAiDraft;
58
+ }
59
+ export interface AiSiteImportFormsRebuilt {
60
+ /** Each form of the page by its index on the read, and the saved form that takes its place; `null` where none does. */
61
+ forms: Array<{
62
+ index: number;
63
+ formId: string | null;
64
+ }>;
65
+ /** A ledger row for each form written, at no credits. */
66
+ rows: AiJobItemLedger[];
67
+ outputs: AiJobOutput[];
68
+ /** What the page's row says of its forms. */
69
+ note: string | null;
70
+ }
71
+ /**
72
+ * A page's forms as the site's own: one the site already has is placed, and
73
+ * any other is saved as a form of the site (AGL-4083). Pure of any model, so
74
+ * it spends nothing; a site with no room keeps the page's words and is told.
75
+ */
76
+ export declare function aiRebuildImportedForms(firestore: FirebaseFirestore.Firestore, input: {
77
+ job: Pick<AiJob, '$id' | 'orgId' | 'createdBy'>;
78
+ hostId: string;
79
+ state: AiSiteImportState;
80
+ page: AiSiteImportPage;
81
+ org: Partial<AglynOrgBilling> | null;
82
+ now: Date;
83
+ }, deps?: AiSiteImportFormsDeps): Promise<AiSiteImportFormsRebuilt>;
@@ -0,0 +1,376 @@
1
+ import { _ as _extends } from "@swc/helpers/_/_extends";
2
+ /**
3
+ * @license
4
+ * Copyright 2026 Aglyn LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */ /*==========================================
18
+ * A FORM ON A PAGE BROUGHT IN, REBUILT AS THE SITE'S OWN (AGL-4083).
19
+ *
20
+ * A fresh site has no saved form, so an import that placed only a form the
21
+ * site already had left "Send us a message" with nothing under it. A form on
22
+ * a page brought in is rebuilt from its fields, by code and with no model:
23
+ * the same fields, required marks and button, built of MUI's separate form
24
+ * elements as the Forms page builds them, and saved as a form draft of the
25
+ * site, as a form job saves one (`aiFormDraft`, `writeAiDraft`). Its answers
26
+ * land in the site's Inbox, and the consent field every form that asks for an
27
+ * email carries takes the place of the source's own marketing box. A form
28
+ * with a password or a card field never gets here: the reader leaves it out.
29
+ *
30
+ * A site that already has this form places it. A site with no room for
31
+ * another keeps the page's words and is told why. The form's id comes from
32
+ * the job and the form's fields, so a pass run twice writes one form.
33
+ *=========================================*/ import { createHash } from "node:crypto";
34
+ import { FORM_COMPONENT_ID, FORM_DISPLAY_NAME_MAX_LENGTH, FORM_INPUT_ELEMENT_IDS, isMarketingConsentFieldName } from "@aglyn/aglyn/app-utils/forms";
35
+ import { NodeType } from "@aglyn/aglyn/types/nodes";
36
+ import { AI_PALETTE } from "../runtime/ai-palette.generated.js";
37
+ import { readSiteInventory } from "../runtime/site-inventory.js";
38
+ import { aiFormDraft, aiFormDraftViolations } from "./ai-job-form-step.js";
39
+ import { writeAiDraft } from "./ai-job-drafts.js";
40
+ /** What a rebuilt form is called where no heading stands above it. */ export const AI_SITE_IMPORT_FORM_DEFAULT_NAME = 'Contact form';
41
+ /** The node a rebuilt form hangs from. */ const FORM_NODE_ID = 'importedForm';
42
+ /** Customer-safe sentences, on the page's row. */ export const AI_SITE_IMPORT_FORM_COPY = {
43
+ rebuilt: (name)=>`Your form “${name}” is rebuilt on this page, and what visitors send lands in your Inbox.`,
44
+ noRoom: 'Your plan has no room for another form, so this page’s form is left out. Every word of the page is here.',
45
+ notBuilt: 'This page’s form could not be rebuilt, so it is left out. Every word of the page is here.',
46
+ leftOut: (fields)=>`A form can’t take a file here, so “${fields.join('”, “')}” is left out of it.`
47
+ };
48
+ const clean = (text)=>(text != null ? text : '').replace(/\s+/g, ' ').trim();
49
+ /** A field's words in camelCase, for a name a form can submit under. */ function camelCase(words) {
50
+ var _words_match;
51
+ const parts = (_words_match = words.match(/[A-Za-z0-9]+/g)) != null ? _words_match : [];
52
+ return parts.map((part, at)=>{
53
+ var _part_;
54
+ return at === 0 ? part.toLowerCase() : `${(_part_ = part[0]) == null ? void 0 : _part_.toUpperCase()}${part.slice(1).toLowerCase()}`;
55
+ }).join('');
56
+ }
57
+ /** The name a field submits under: the source's where it reads as one, else its words'. Never a second of one name. */ function fieldNameOf(field, at, taken) {
58
+ var _field_label;
59
+ const own = /^[A-Za-z][A-Za-z0-9_-]{0,62}$/.test(field.name) ? field.name : '';
60
+ const base = own || camelCase((_field_label = field.label) != null ? _field_label : '') || `field${at + 1}`;
61
+ let name = base;
62
+ for(let next = 2; taken.has(name.toLowerCase()); next += 1)name = `${base}${next}`;
63
+ taken.add(name.toLowerCase());
64
+ return name;
65
+ }
66
+ /**
67
+ * A form of a page brought in as a tree of the Form element and MUI's separate
68
+ * form elements: each field a Form Control holding its Form Label and its
69
+ * answer, a lone tick a Choice Label holding one Checkbox, as the Forms page
70
+ * builds them. The tree `aiFormDraft` stamps, binds and declares.
71
+ */ export function aiSiteImportFormTree(form) {
72
+ var _AI_PALETTE_FORM_COMPONENT_ID;
73
+ const { formControl, formLabel, input, select, selectOption, radioGroup, radio, checkbox, choiceLabel, datePicker, timePicker } = FORM_INPUT_ELEMENT_IDS;
74
+ const nodes = {};
75
+ const add = (id, componentId, parentId, props, children = [])=>{
76
+ var _AI_PALETTE_componentId;
77
+ nodes[id] = {
78
+ $id: id,
79
+ type: NodeType.NODE,
80
+ componentId,
81
+ pluginId: (_AI_PALETTE_componentId = AI_PALETTE[componentId]) == null ? void 0 : _AI_PALETTE_componentId.pluginId,
82
+ parentId,
83
+ nodes: [
84
+ ...children
85
+ ],
86
+ props
87
+ };
88
+ return id;
89
+ };
90
+ const taken = new Set();
91
+ const children = form.fields.map((field, at)=>{
92
+ var _field_options, _options_, _options_1;
93
+ const id = `field${at}`;
94
+ const name = fieldNameOf(field, at, taken);
95
+ const label = clean(field.label) || name;
96
+ const required = field.required ? {
97
+ required: true
98
+ } : {};
99
+ const placeholder = field.placeholder ? {
100
+ placeholder: field.placeholder
101
+ } : {};
102
+ const options = ((_field_options = field.options) != null ? _field_options : []).map(clean).filter(Boolean);
103
+ const choice = (index, words, element, props, parent)=>{
104
+ const box = add(`${id}-opt-${index}-input`, element, `${id}-opt-${index}`, props);
105
+ return add(`${id}-opt-${index}`, choiceLabel, parent, {
106
+ label: words
107
+ }, [
108
+ box
109
+ ]);
110
+ };
111
+ // A lone tick is its own question: the words beside it say it all.
112
+ if (field.type === 'checkbox' && options.length <= 1) return choice(0, (_options_ = options[0]) != null ? _options_ : label, checkbox, _extends({
113
+ name,
114
+ value: (_options_1 = options[0]) != null ? _options_1 : label
115
+ }, required), FORM_NODE_ID);
116
+ const wrapper = (answers)=>add(id, formControl, FORM_NODE_ID, _extends({
117
+ fullWidth: true
118
+ }, required), [
119
+ add(`${id}-label`, formLabel, id, {
120
+ children: label
121
+ }),
122
+ ...answers
123
+ ]);
124
+ if (field.type === 'checkbox') return wrapper(options.map((option, index)=>choice(index, option, checkbox, {
125
+ name,
126
+ value: option
127
+ }, id)));
128
+ if (field.type === 'radio' && options.length) {
129
+ const group = add(`${id}-input`, radioGroup, id, {
130
+ name
131
+ }, options.map((option, index)=>choice(index, option, radio, _extends({
132
+ value: option
133
+ }, required), `${id}-input`)));
134
+ return wrapper([
135
+ group
136
+ ]);
137
+ }
138
+ if (field.type === 'select' && options.length) {
139
+ const list = add(`${id}-input`, select, id, _extends({
140
+ name,
141
+ fullWidth: true
142
+ }, required, placeholder), options.map((option, index)=>add(`${id}-opt-${index}`, selectOption, `${id}-input`, {
143
+ children: option
144
+ })));
145
+ return wrapper([
146
+ list
147
+ ]);
148
+ }
149
+ if (field.type === 'date' || field.type === 'time') return wrapper([
150
+ add(`${id}-input`, field.type === 'date' ? datePicker : timePicker, id, _extends({
151
+ name
152
+ }, required))
153
+ ]);
154
+ const type = [
155
+ 'email',
156
+ 'tel',
157
+ 'url',
158
+ 'number'
159
+ ].includes(field.type) ? field.type : 'text';
160
+ return wrapper([
161
+ add(`${id}-input`, input, id, _extends({
162
+ name,
163
+ type
164
+ }, field.type === 'textarea' ? {
165
+ multiline: true,
166
+ minRows: 3
167
+ } : {}, placeholder, required, {
168
+ fullWidth: true
169
+ }))
170
+ ]);
171
+ });
172
+ const submit = clean(form.submit);
173
+ nodes[FORM_NODE_ID] = {
174
+ $id: FORM_NODE_ID,
175
+ type: NodeType.NODE,
176
+ componentId: FORM_COMPONENT_ID,
177
+ pluginId: (_AI_PALETTE_FORM_COMPONENT_ID = AI_PALETTE[FORM_COMPONENT_ID]) == null ? void 0 : _AI_PALETTE_FORM_COMPONENT_ID.pluginId,
178
+ nodes: children,
179
+ props: submit ? {
180
+ submitLabel: submit
181
+ } : {}
182
+ };
183
+ return {
184
+ rootId: FORM_NODE_ID,
185
+ nodes
186
+ };
187
+ }
188
+ /** What identifies a form across a site's pages: what it asks and its button, never where it sits. */ export function aiSiteImportFormSignature(form) {
189
+ const shape = form.fields.map((field)=>{
190
+ var _field_options;
191
+ return [
192
+ field.type,
193
+ field.name,
194
+ clean(field.label),
195
+ field.required === true,
196
+ (_field_options = field.options) != null ? _field_options : []
197
+ ];
198
+ });
199
+ return createHash('sha256').update(JSON.stringify([
200
+ shape,
201
+ clean(form.submit)
202
+ ])).digest('hex').slice(0, 12);
203
+ }
204
+ /** Each form of a page's layout, with the nearest heading above it in its section: what it is called. */ export function aiSiteImportFormPlaces(layout, blocks) {
205
+ const places = [];
206
+ let heading = null;
207
+ const note = (ref)=>{
208
+ const block = blocks[ref];
209
+ if ((block == null ? void 0 : block.kind) === 'heading') heading = clean(block.text) || heading;
210
+ };
211
+ const visit = (nodes)=>{
212
+ for (const node of nodes){
213
+ if (node.kind === 'line') note(node.line);
214
+ else if (node.kind === 'form') places.push({
215
+ form: node.form,
216
+ heading
217
+ });
218
+ else if (node.kind === 'row') for (const cell of node.cells)visit(cell.nodes);
219
+ else if (node.kind === 'group') for (const item of node.items)item.lines.forEach(note);
220
+ else if (node.kind === 'tabs') for (const tab of node.tabs)visit(tab.panel);
221
+ }
222
+ };
223
+ for (const section of layout.sections){
224
+ heading = null;
225
+ visit(section.nodes);
226
+ }
227
+ return places;
228
+ }
229
+ /** The forms of a page still to rebuild or place: each one of its layout that asks something. */ export function aiSiteImportFormsOwed(page) {
230
+ var _read_blocks;
231
+ var _read_forms;
232
+ const { read } = page;
233
+ if (!(read == null ? void 0 : read.layout) || !((_read_forms = read.forms) == null ? void 0 : _read_forms.length)) return [];
234
+ return aiSiteImportFormPlaces(read.layout, (_read_blocks = read.blocks) != null ? _read_blocks : []).filter((place)=>{
235
+ var _ref;
236
+ var _read_forms_place_form, _read_forms;
237
+ return ((_ref = (_read_forms = read.forms) == null ? void 0 : (_read_forms_place_form = _read_forms[place.form]) == null ? void 0 : _read_forms_place_form.fields.length) != null ? _ref : 0) > 0;
238
+ });
239
+ }
240
+ const askedNames = (names)=>names.filter((name)=>!isMarketingConsentFieldName(name)).map((name)=>name.toLowerCase()).sort();
241
+ const sameFields = (a, b)=>{
242
+ const [one, two] = [
243
+ askedNames(a),
244
+ askedNames(b)
245
+ ];
246
+ return one.length === two.length && one.every((name, at)=>name === two[at]);
247
+ };
248
+ /**
249
+ * A page's forms as the site's own: one the site already has is placed, and
250
+ * any other is saved as a form of the site (AGL-4083). Pure of any model, so
251
+ * it spends nothing; a site with no room keeps the page's words and is told.
252
+ */ export async function aiRebuildImportedForms(firestore, input, deps = {}) {
253
+ var _deps_writeDraft, _deps_readInventory, _ref;
254
+ const { job, hostId, state, page, org, now } = input;
255
+ const write = (_deps_writeDraft = deps.writeDraft) != null ? _deps_writeDraft : writeAiDraft;
256
+ const inventory = await ((_deps_readInventory = deps.readInventory) != null ? _deps_readInventory : readSiteInventory)(job.orgId, hostId, {
257
+ firestore
258
+ });
259
+ const saved = ((_ref = inventory == null ? void 0 : inventory.forms) != null ? _ref : []).map((form)=>{
260
+ var _form_fields;
261
+ return {
262
+ id: form.id,
263
+ fields: (_form_fields = form.fields) != null ? _form_fields : []
264
+ };
265
+ });
266
+ let met = state.pages.some((entry)=>{
267
+ var _entry_forms;
268
+ return (_entry_forms = entry.forms) == null ? void 0 : _entry_forms.length;
269
+ });
270
+ const out = {
271
+ forms: [],
272
+ rows: [],
273
+ outputs: [],
274
+ note: null
275
+ };
276
+ const notes = [];
277
+ for (const place of aiSiteImportFormsOwed(page)){
278
+ var _place_heading, _saved_find;
279
+ var _page_read_forms, _page_read, _form_leftOut;
280
+ const form = (_page_read = page.read) == null ? void 0 : (_page_read_forms = _page_read.forms) == null ? void 0 : _page_read_forms[place.form];
281
+ const signature = aiSiteImportFormSignature(form);
282
+ const formId = `${job.$id}-form-${signature}`;
283
+ const name = ((_place_heading = place.heading) != null ? _place_heading : '').slice(0, FORM_DISPLAY_NAME_MAX_LENGTH) || AI_SITE_IMPORT_FORM_DEFAULT_NAME;
284
+ const draft = aiFormDraft(aiSiteImportFormTree(form), {
285
+ routing: {
286
+ kind: 'inbox',
287
+ list: null
288
+ },
289
+ cannotCollect: []
290
+ }, {
291
+ formId,
292
+ name
293
+ });
294
+ const names = draft.fields.map((field)=>field.fieldName);
295
+ // A site's only form takes the first form an import meets, as it always has.
296
+ const existing = (_saved_find = saved.find((entry)=>entry.id === formId || sameFields(entry.fields, names))) != null ? _saved_find : !met && saved.length === 1 ? saved[0] : undefined;
297
+ met = true;
298
+ if (existing) {
299
+ out.forms.push({
300
+ index: place.form,
301
+ formId: existing.id
302
+ });
303
+ continue;
304
+ }
305
+ if (aiFormDraftViolations(draft, formId, {}).length) {
306
+ out.forms.push({
307
+ index: place.form,
308
+ formId: null
309
+ });
310
+ notes.push(AI_SITE_IMPORT_FORM_COPY.notBuilt);
311
+ continue;
312
+ }
313
+ const written = await write(firestore, {
314
+ kind: 'form',
315
+ hostId,
316
+ id: formId,
317
+ uid: job.createdBy,
318
+ org,
319
+ name,
320
+ nodes: draft.nodes,
321
+ form: {
322
+ rootId: draft.rootId,
323
+ formNodeId: draft.formNodeId,
324
+ fields: draft.fields,
325
+ consentFieldName: draft.consentFieldName,
326
+ routing: draft.routing
327
+ },
328
+ now
329
+ });
330
+ if (written.ok === false) {
331
+ if (written.status === 404) throw new Error(`site ${hostId} vanished while its form was rebuilt`);
332
+ out.forms.push({
333
+ index: place.form,
334
+ formId: null
335
+ });
336
+ notes.push(AI_SITE_IMPORT_FORM_COPY.noRoom);
337
+ continue;
338
+ }
339
+ saved.push({
340
+ id: formId,
341
+ fields: names
342
+ });
343
+ out.forms.push({
344
+ index: place.form,
345
+ formId
346
+ });
347
+ notes.push(AI_SITE_IMPORT_FORM_COPY.rebuilt(written.name));
348
+ if ((_form_leftOut = form.leftOut) == null ? void 0 : _form_leftOut.length) notes.push(AI_SITE_IMPORT_FORM_COPY.leftOut(form.leftOut));
349
+ out.rows.push({
350
+ slot: `form-${signature}`,
351
+ op: 'form',
352
+ label: written.name,
353
+ status: 'succeeded',
354
+ attempt: 1,
355
+ creditsSpent: 0,
356
+ creditsRefunded: 0,
357
+ outputs: [
358
+ formId
359
+ ]
360
+ });
361
+ out.outputs.push({
362
+ resource: 'form',
363
+ id: formId,
364
+ versionId: written.versionId,
365
+ hostId,
366
+ hostSubdomain: written.hostSubdomain,
367
+ label: written.name
368
+ });
369
+ }
370
+ out.note = [
371
+ ...new Set(notes)
372
+ ].join(' ') || null;
373
+ return out;
374
+ }
375
+
376
+ //# sourceMappingURL=ai-site-import-forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/jobs/ai-site-import-forms.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 * A FORM ON A PAGE BROUGHT IN, REBUILT AS THE SITE'S OWN (AGL-4083).\n *\n * A fresh site has no saved form, so an import that placed only a form the\n * site already had left \"Send us a message\" with nothing under it. A form on\n * a page brought in is rebuilt from its fields, by code and with no model:\n * the same fields, required marks and button, built of MUI's separate form\n * elements as the Forms page builds them, and saved as a form draft of the\n * site, as a form job saves one (`aiFormDraft`, `writeAiDraft`). Its answers\n * land in the site's Inbox, and the consent field every form that asks for an\n * email carries takes the place of the source's own marketing box. A form\n * with a password or a card field never gets here: the reader leaves it out.\n *\n * A site that already has this form places it. A site with no room for\n * another keeps the page's words and is told why. The form's id comes from\n * the job and the form's fields, so a pass run twice writes one form.\n *=========================================*/\n\nimport { createHash } from 'node:crypto'\nimport { FORM_COMPONENT_ID, FORM_DISPLAY_NAME_MAX_LENGTH, FORM_INPUT_ELEMENT_IDS, isMarketingConsentFieldName } from '@aglyn/aglyn/app-utils/forms'\nimport type { AglynOrgBilling } from '@aglyn/aglyn/foundation/definitions/org-billing.types'\nimport { NodeType, type NodesMap } from '@aglyn/aglyn/types/nodes'\nimport type { AiJob, AiJobItemLedger, AiJobOutput } from '../model/ai-jobs.types'\nimport type { AiSiteImportPage, AiSiteImportState, SiteImportLayout, SiteImportLayoutNode } from '../model/ai-site-import'\nimport { AI_PALETTE } from '../runtime/ai-palette.generated'\nimport { readSiteInventory } from '../runtime/site-inventory'\nimport type { SiteImportBlock, SiteImportForm, SiteImportFormField } from '../site-import/site-import-html'\nimport { aiFormDraft, aiFormDraftViolations } from './ai-job-form-step'\nimport { writeAiDraft } from './ai-job-drafts'\n\n/** What a rebuilt form is called where no heading stands above it. */\nexport const AI_SITE_IMPORT_FORM_DEFAULT_NAME = 'Contact form'\n\n/** The node a rebuilt form hangs from. */\nconst FORM_NODE_ID = 'importedForm'\n\n/** Customer-safe sentences, on the page's row. */\nexport const AI_SITE_IMPORT_FORM_COPY = {\n rebuilt: (name: string) => `Your form “${name}” is rebuilt on this page, and what visitors send lands in your Inbox.`,\n noRoom: 'Your plan has no room for another form, so this page’s form is left out. Every word of the page is here.',\n notBuilt: 'This page’s form could not be rebuilt, so it is left out. Every word of the page is here.',\n leftOut: (fields: readonly string[]) => `A form can’t take a file here, so “${fields.join('”, “')}” is left out of it.`,\n} as const\n\nconst clean = (text: string | undefined) => (text ?? '').replace(/\\s+/g, ' ').trim()\n\n/** A field's words in camelCase, for a name a form can submit under. */\nfunction camelCase(words: string): string {\n const parts = words.match(/[A-Za-z0-9]+/g) ?? []\n return parts.map((part, at) => (at === 0 ? part.toLowerCase() : `${part[0]?.toUpperCase()}${part.slice(1).toLowerCase()}`)).join('')\n}\n\n/** The name a field submits under: the source's where it reads as one, else its words'. Never a second of one name. */\nfunction fieldNameOf(field: SiteImportFormField, at: number, taken: Set<string>): string {\n const own = /^[A-Za-z][A-Za-z0-9_-]{0,62}$/.test(field.name) ? field.name : ''\n const base = own || camelCase(field.label ?? '') || `field${at + 1}`\n let name = base\n for (let next = 2; taken.has(name.toLowerCase()); next += 1) name = `${base}${next}`\n taken.add(name.toLowerCase())\n return name\n}\n\n/**\n * A form of a page brought in as a tree of the Form element and MUI's separate\n * form elements: each field a Form Control holding its Form Label and its\n * answer, a lone tick a Choice Label holding one Checkbox, as the Forms page\n * builds them. The tree `aiFormDraft` stamps, binds and declares.\n */\nexport function aiSiteImportFormTree(form: SiteImportForm): { rootId: string; nodes: NodesMap } {\n const { formControl, formLabel, input, select, selectOption, radioGroup, radio, checkbox, choiceLabel, datePicker, timePicker } = FORM_INPUT_ELEMENT_IDS\n const nodes: NodesMap = {}\n const add = (id: string, componentId: string, parentId: string, props: Record<string, unknown>, children: readonly string[] = []) => {\n nodes[id] = { $id: id, type: NodeType.NODE, componentId, pluginId: AI_PALETTE[componentId]?.pluginId, parentId, nodes: [...children], props } as NodesMap[string]\n return id\n }\n const taken = new Set<string>()\n const children = form.fields.map((field, at) => {\n const id = `field${at}`\n const name = fieldNameOf(field, at, taken)\n const label = clean(field.label) || name\n const required = field.required ? { required: true } : {}\n const placeholder = field.placeholder ? { placeholder: field.placeholder } : {}\n const options = (field.options ?? []).map(clean).filter(Boolean)\n const choice = (index: number, words: string, element: string, props: Record<string, unknown>, parent: string) => {\n const box = add(`${id}-opt-${index}-input`, element, `${id}-opt-${index}`, props)\n return add(`${id}-opt-${index}`, choiceLabel, parent, { label: words }, [box])\n }\n // A lone tick is its own question: the words beside it say it all.\n if (field.type === 'checkbox' && options.length <= 1) return choice(0, options[0] ?? label, checkbox, { name, value: options[0] ?? label, ...required }, FORM_NODE_ID)\n const wrapper = (answers: readonly string[]) => add(id, formControl, FORM_NODE_ID, { fullWidth: true, ...required }, [add(`${id}-label`, formLabel, id, { children: label }), ...answers])\n if (field.type === 'checkbox') return wrapper(options.map((option, index) => choice(index, option, checkbox, { name, value: option }, id)))\n if (field.type === 'radio' && options.length) {\n const group = add(`${id}-input`, radioGroup, id, { name }, options.map((option, index) => choice(index, option, radio, { value: option, ...required }, `${id}-input`)))\n return wrapper([group])\n }\n if (field.type === 'select' && options.length) {\n const list = add(`${id}-input`, select, id, { name, fullWidth: true, ...required, ...placeholder }, options.map((option, index) => add(`${id}-opt-${index}`, selectOption, `${id}-input`, { children: option })))\n return wrapper([list])\n }\n if (field.type === 'date' || field.type === 'time') return wrapper([add(`${id}-input`, field.type === 'date' ? datePicker : timePicker, id, { name, ...required })])\n const type = ['email', 'tel', 'url', 'number'].includes(field.type) ? field.type : 'text'\n return wrapper([add(`${id}-input`, input, id, { name, type, ...(field.type === 'textarea' ? { multiline: true, minRows: 3 } : {}), ...placeholder, ...required, fullWidth: true })])\n })\n const submit = clean(form.submit)\n nodes[FORM_NODE_ID] = { $id: FORM_NODE_ID, type: NodeType.NODE, componentId: FORM_COMPONENT_ID, pluginId: AI_PALETTE[FORM_COMPONENT_ID]?.pluginId, nodes: children, props: submit ? { submitLabel: submit } : {} } as NodesMap[string]\n return { rootId: FORM_NODE_ID, nodes }\n}\n\n/** What identifies a form across a site's pages: what it asks and its button, never where it sits. */\nexport function aiSiteImportFormSignature(form: SiteImportForm): string {\n const shape = form.fields.map((field) => [field.type, field.name, clean(field.label), field.required === true, field.options ?? []])\n return createHash('sha256').update(JSON.stringify([shape, clean(form.submit)])).digest('hex').slice(0, 12)\n}\n\n/** Each form of a page's layout, with the nearest heading above it in its section: what it is called. */\nexport function aiSiteImportFormPlaces(layout: SiteImportLayout, blocks: readonly SiteImportBlock[]): Array<{ form: number; heading: string | null }> {\n const places: Array<{ form: number; heading: string | null }> = []\n let heading: string | null = null\n const note = (ref: number) => {\n const block = blocks[ref]\n if (block?.kind === 'heading') heading = clean(block.text) || heading\n }\n const visit = (nodes: readonly SiteImportLayoutNode[]) => {\n for (const node of nodes) {\n if (node.kind === 'line') note(node.line)\n else if (node.kind === 'form') places.push({ form: node.form, heading })\n else if (node.kind === 'row') for (const cell of node.cells) visit(cell.nodes)\n else if (node.kind === 'group') for (const item of node.items) item.lines.forEach(note)\n else if (node.kind === 'tabs') for (const tab of node.tabs) visit(tab.panel)\n }\n }\n for (const section of layout.sections) {\n heading = null\n visit(section.nodes)\n }\n return places\n}\n\n/** The forms of a page still to rebuild or place: each one of its layout that asks something. */\nexport function aiSiteImportFormsOwed(page: Pick<AiSiteImportPage, 'read'>): Array<{ form: number; heading: string | null }> {\n const { read } = page\n if (!read?.layout || !read.forms?.length) return []\n return aiSiteImportFormPlaces(read.layout, read.blocks ?? []).filter((place) => (read.forms?.[place.form]?.fields.length ?? 0) > 0)\n}\n\nconst askedNames = (names: readonly string[]) => names.filter((name) => !isMarketingConsentFieldName(name)).map((name) => name.toLowerCase()).sort()\n\nconst sameFields = (a: readonly string[], b: readonly string[]) => {\n const [one, two] = [askedNames(a), askedNames(b)]\n return one.length === two.length && one.every((name, at) => name === two[at])\n}\n\nexport interface AiSiteImportFormsDeps {\n readInventory?: typeof readSiteInventory\n writeDraft?: typeof writeAiDraft\n}\n\nexport interface AiSiteImportFormsRebuilt {\n /** Each form of the page by its index on the read, and the saved form that takes its place; `null` where none does. */\n forms: Array<{ index: number; formId: string | null }>\n /** A ledger row for each form written, at no credits. */\n rows: AiJobItemLedger[]\n outputs: AiJobOutput[]\n /** What the page's row says of its forms. */\n note: string | null\n}\n\n/**\n * A page's forms as the site's own: one the site already has is placed, and\n * any other is saved as a form of the site (AGL-4083). Pure of any model, so\n * it spends nothing; a site with no room keeps the page's words and is told.\n */\nexport async function aiRebuildImportedForms(\n firestore: FirebaseFirestore.Firestore,\n input: { job: Pick<AiJob, '$id' | 'orgId' | 'createdBy'>; hostId: string; state: AiSiteImportState; page: AiSiteImportPage; org: Partial<AglynOrgBilling> | null; now: Date },\n deps: AiSiteImportFormsDeps = {},\n): Promise<AiSiteImportFormsRebuilt> {\n const { job, hostId, state, page, org, now } = input\n const write = deps.writeDraft ?? writeAiDraft\n const inventory = await (deps.readInventory ?? readSiteInventory)(job.orgId, hostId, { firestore })\n const saved = (inventory?.forms ?? []).map((form) => ({ id: form.id, fields: form.fields ?? [] }))\n let met = state.pages.some((entry) => entry.forms?.length)\n const out: AiSiteImportFormsRebuilt = { forms: [], rows: [], outputs: [], note: null }\n const notes: string[] = []\n for (const place of aiSiteImportFormsOwed(page)) {\n const form = page.read?.forms?.[place.form] as SiteImportForm\n const signature = aiSiteImportFormSignature(form)\n const formId = `${job.$id}-form-${signature}`\n const name = (place.heading ?? '').slice(0, FORM_DISPLAY_NAME_MAX_LENGTH) || AI_SITE_IMPORT_FORM_DEFAULT_NAME\n const draft = aiFormDraft(aiSiteImportFormTree(form), { routing: { kind: 'inbox', list: null }, cannotCollect: [] }, { formId, name })\n const names = draft.fields.map((field) => field.fieldName)\n // A site's only form takes the first form an import meets, as it always has.\n const existing = saved.find((entry) => entry.id === formId || sameFields(entry.fields, names)) ?? (!met && saved.length === 1 ? saved[0] : undefined)\n met = true\n if (existing) {\n out.forms.push({ index: place.form, formId: existing.id })\n continue\n }\n if (aiFormDraftViolations(draft, formId, {}).length) {\n out.forms.push({ index: place.form, formId: null })\n notes.push(AI_SITE_IMPORT_FORM_COPY.notBuilt)\n continue\n }\n const written = await write(firestore, {\n kind: 'form',\n hostId,\n id: formId,\n uid: job.createdBy,\n org,\n name,\n nodes: draft.nodes,\n form: { rootId: draft.rootId, formNodeId: draft.formNodeId, fields: draft.fields, consentFieldName: draft.consentFieldName, routing: draft.routing },\n now,\n })\n if (written.ok === false) {\n if (written.status === 404) throw new Error(`site ${hostId} vanished while its form was rebuilt`)\n out.forms.push({ index: place.form, formId: null })\n notes.push(AI_SITE_IMPORT_FORM_COPY.noRoom)\n continue\n }\n saved.push({ id: formId, fields: names })\n out.forms.push({ index: place.form, formId })\n notes.push(AI_SITE_IMPORT_FORM_COPY.rebuilt(written.name))\n if (form.leftOut?.length) notes.push(AI_SITE_IMPORT_FORM_COPY.leftOut(form.leftOut))\n out.rows.push({ slot: `form-${signature}`, op: 'form', label: written.name, status: 'succeeded', attempt: 1, creditsSpent: 0, creditsRefunded: 0, outputs: [formId] })\n out.outputs.push({ resource: 'form', id: formId, versionId: written.versionId, hostId, hostSubdomain: written.hostSubdomain, label: written.name })\n }\n out.note = [...new Set(notes)].join(' ') || null\n return out\n}\n"],"names":["createHash","FORM_COMPONENT_ID","FORM_DISPLAY_NAME_MAX_LENGTH","FORM_INPUT_ELEMENT_IDS","isMarketingConsentFieldName","NodeType","AI_PALETTE","readSiteInventory","aiFormDraft","aiFormDraftViolations","writeAiDraft","AI_SITE_IMPORT_FORM_DEFAULT_NAME","FORM_NODE_ID","AI_SITE_IMPORT_FORM_COPY","rebuilt","name","noRoom","notBuilt","leftOut","fields","join","clean","text","replace","trim","camelCase","words","parts","match","map","part","at","toLowerCase","toUpperCase","slice","fieldNameOf","field","taken","own","test","base","label","next","has","add","aiSiteImportFormTree","form","formControl","formLabel","input","select","selectOption","radioGroup","radio","checkbox","choiceLabel","datePicker","timePicker","nodes","id","componentId","parentId","props","children","$id","type","NODE","pluginId","Set","options","required","placeholder","filter","Boolean","choice","index","element","parent","box","length","value","wrapper","answers","fullWidth","option","group","list","includes","multiline","minRows","submit","submitLabel","rootId","aiSiteImportFormSignature","shape","update","JSON","stringify","digest","aiSiteImportFormPlaces","layout","blocks","places","heading","note","ref","block","kind","visit","node","line","push","cell","cells","item","items","lines","forEach","tab","tabs","panel","section","sections","aiSiteImportFormsOwed","page","read","forms","place","askedNames","names","sort","sameFields","a","b","one","two","every","aiRebuildImportedForms","firestore","deps","job","hostId","state","org","now","write","writeDraft","inventory","readInventory","orgId","saved","met","pages","some","entry","out","rows","outputs","notes","signature","formId","draft","routing","cannotCollect","fieldName","existing","find","undefined","written","uid","createdBy","formNodeId","consentFieldName","ok","status","Error","slot","op","attempt","creditsSpent","creditsRefunded","resource","versionId","hostSubdomain"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;;;;;;;;2CAgB2C,GAE3C,SAASA,UAAU,QAAQ,cAAa;AACxC,SAASC,iBAAiB,EAAEC,4BAA4B,EAAEC,sBAAsB,EAAEC,2BAA2B,QAAQ,+BAA8B;AAEnJ,SAASC,QAAQ,QAAuB,2BAA0B;AAGlE,SAASC,UAAU,QAAQ,qCAAiC;AAC5D,SAASC,iBAAiB,QAAQ,+BAA2B;AAE7D,SAASC,WAAW,EAAEC,qBAAqB,QAAQ,wBAAoB;AACvE,SAASC,YAAY,QAAQ,qBAAiB;AAE9C,oEAAoE,GACpE,OAAO,MAAMC,mCAAmC,eAAc;AAE9D,wCAAwC,GACxC,MAAMC,eAAe;AAErB,gDAAgD,GAChD,OAAO,MAAMC,2BAA2B;IACtCC,SAAS,CAACC,OAAiB,CAAC,WAAW,EAAEA,KAAK,sEAAsE,CAAC;IACrHC,QAAQ;IACRC,UAAU;IACVC,SAAS,CAACC,SAA8B,CAAC,mCAAmC,EAAEA,OAAOC,IAAI,CAAC,QAAQ,oBAAoB,CAAC;AACzH,EAAU;AAEV,MAAMC,QAAQ,CAACC,OAA6B,CAACA,eAAAA,OAAQ,IAAIC,OAAO,CAAC,QAAQ,KAAKC,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yI,IAAIC,IAAI,CAAC7C,IAAI,CAAC;YAAEiE,MAAM,CAAC,KAAK,EAAEjB,WAAW;YAAEkB,IAAI;YAAQxI,OAAO+H,QAAQzJ,IAAI;YAAE+J,QAAQ;YAAaI,SAAS;YAAGC,cAAc;YAAGC,iBAAiB;YAAGvB,SAAS;gBAACG;aAAO;QAAC;QACpKL,IAAIE,OAAO,CAAC9C,IAAI,CAAC;YAAEsE,UAAU;YAAQ1H,IAAIqG;YAAQsB,WAAWd,QAAQc,SAAS;YAAEzC;YAAQ0C,eAAef,QAAQe,aAAa;YAAE9I,OAAO+H,QAAQzJ,IAAI;QAAC;IACnJ;IACA4I,IAAInD,IAAI,GAAG;WAAI,IAAIpC,IAAI0F;KAAO,CAAC1I,IAAI,CAAC,QAAQ;IAC5C,OAAOuI;AACT"}
@@ -0,0 +1,21 @@
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
+ import type { StockPhoto } from '@aglyn/aglyn/plugin-manager/stock-photo-provider';
18
+ /** Every recorded hit, by id. */
19
+ export declare const AGL4092_1101_HITS: ReadonlyMap<string, StockPhoto>;
20
+ /** What each search answered on 2026-11-01. */
21
+ export declare const AGL4092_1101_ANSWERS: Readonly<Record<string, readonly StockPhoto[]>>;
@@ -0,0 +1,77 @@
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
+ * WHAT PIXABAY ANSWERED THE RIDERS PAGE'S TWO SEARCHES ON 2026-11-01 (AGL-4092).
18
+ *
19
+ * The live check that day started an amateur motocross team afresh, and its
20
+ * riders page showed a kitesurfer in the section about joining the team (photo
21
+ * 7288297, search "joining young rider"). Its media library records only the
22
+ * search that found the photo, so the two searches its slot sends before its
23
+ * broad ones were asked of Pixabay, read-only, as the provider asks them. Every
24
+ * other search of the replay is {@link AGL4092_1029_ANSWERS}'s.
25
+ *
26
+ * Each list is the first 20 hits of its answer, in its order. A hit's tags are
27
+ * the provider's, less one that names a person and one the marketplace's naming
28
+ * sweep refuses, neither of them read; its size is its large copy's. Each
29
+ * contributor is a number, one per contributor; no name, no contact details.
30
+ * Keyed as `aiAgl40921029AnswerKey` keys them.
31
+ */ const hit = (id, width, height, slug, contributor, tags)=>({
32
+ provider: 'pixabay',
33
+ id: String(id),
34
+ width,
35
+ height,
36
+ pageUrl: `https://pixabay.com/photos/${slug}-${id}/`,
37
+ photographer: `Pixabay contributor ${contributor}`,
38
+ tags: tags.split(', ').filter(Boolean),
39
+ downloadUrl: `https://pixabay.com/get/g${id}_1280.jpg`
40
+ });
41
+ /** Every recorded hit, by id. */ export const AGL4092_1101_HITS = new Map([
42
+ hit(20333, 1280, 853, 'hands-puzzle-pieces-connect', 1, 'hands, puzzle pieces, connect, connection, cooperation, holding, isolated, jigsaw, join, partnership, people, pieces, puzzle, teamwork, two, unity, monochrome, idea, concept, black and white, hands, hands, connect, connect, connection, connection, connection, cooperation, cooperation, partnership, partnership, partnership, people, people, people, people, puzzle, puzzle, puzzle, puzzle, puzzle, teamwork, teamwork, teamwork, teamwork, two, idea, idea, idea'),
43
+ hit(3372907, 1280, 720, 'reiter-horse-water-sunset-dawn', 2, 'reiter, nature, horse, water, sunset, dawn, sky, sun, waters, mirroring, reflection, silhouette, lake, pond, bank, equestrian, ride, freedom, indians, horse wallpaper'),
44
+ hit(407123, 1280, 853, 'biker-motorcycle-ride-vehicle', 3, 'biker, motorcycle, ride, vehicle, motorbike, road, travel, asphalt, vintage, motorcycle ride, motorcycle rider, riding, motorcycle, motorcycle, motorcycle, motorcycle, motorcycle, motorbike'),
45
+ hit(9331340, 1280, 853, 'horse-pony-woman-nature-animal', 4, 'horse, pony, woman, nature, animal'),
46
+ hit(9702440, 1280, 1280, 'cartoon-hands-joining-hands', 5, 'cartoon hands, joining hands, unity circle, teamwork symbol, friendship hands, hands together, support icon, diversity hands, connected hands, group unity, circle of hands, togetherness vector, cooperation symbol, helping hands, solidarity icon, team support, round hands shape, cartoon unity, collective support, friendly gesture, partnership icon'),
47
+ hit(8209523, 1280, 854, 'horse-rider-rodeo-cowboy-show', 6, 'horse, rider, rodeo, cowboy, nature, show, agriculture, animal, livestock'),
48
+ hit(3237649, 1280, 856, 'teamwork-match-together', 7, 'teamwork, match, together, hand in hand, connect, connection, collaboration, hands, keep, join, partnership, people, piece, puzzle, solution, team, two, unit, characters, wood, doll, articulated manikin, match, connect, connect, connect, connect, connect, collaboration, collaboration, collaboration, collaboration, join, partnership, partnership, partnership, puzzle, puzzle, solution'),
49
+ hit(7469078, 1280, 853, 'girl-horse-happy-rider-joy-fun', 6, 'girl, horse, happy, rider, joy, fun, smile, young, nature, saddle, riding'),
50
+ hit(7288297, 1280, 853, 'kitesurfer-young-rider-kitesurfing', 8, 'kitesurfer, young, rider, nature, kitesurfing, sea, grandparents, watching, water, line, beach'),
51
+ hit(7200409, 1280, 854, 'cow-grassland-grazing-nomad', 9, 'cow, grassland, grazing, nomad, dornod plain, asahi, mongolia, landscape, cow, cow, cow, cow, cow, mongolia, mongolia'),
52
+ hit(10135205, 1280, 912, 'motorcycle-motocross-race-speed', 10, 'motorcycle, motocross, race, speed, sand, adrenaline, smart, glowing, extreme sport, stunt, rappelling, helmet, armor, terrain, thrill, camera, control, tag, entertainment, gear'),
53
+ hit(557261, 1280, 853, 'horse-silhouettes-horse-back-riding', 11, 'horse, silhouettes, horse back riding, sunset, backlighting, bow, nature, saddle'),
54
+ hit(95032, 1280, 853, 'mountain-biking-sports-leaping', 12, 'mountain biking, sports, leaping, jumping, freeriding, biking, bike, bicycle, mountain bicycle, nature, leap, jump, desert, utah'),
55
+ hit(5221914, 1280, 768, 'skateboard-feet-shoes-guy-skating', 13, 'skateboard, feet, shoes, guy, skating, active, wheels, outdoors, movement, speed, fun, recreation, race, sport, exercise, street, freedom, skateboard, skateboard, skateboard, shoes, shoes, shoes, shoes, shoes, skating, exercise, exercise'),
56
+ hit(1869727, 1280, 853, 'skateboard-skater-boy-skater', 14, 'skateboard, skater boy, skater, teenager, activity, recreational, asphalt, dawn, outdoors, street, sunset, sports, nature, fun'),
57
+ hit(10388622, 1280, 853, 'motocross-motorcycle-road-riding', 15, 'motocross, motorcycle, road, riding, adventure, travel, nature, desert, sand, dawn, sunset, sand dunes, dusty, desert ride, speed, landscape photography, enduro, off-road, feeling, outdoor'),
58
+ hit(3066167, 1280, 719, 'snow-mountain-fat-bikes-winter', 16, 'snow, nature, mountain, fat bikes, winter, mountain bikes, mtb, biking, bicycles, adventure, cold, sports, action, outdoors, bike, cycling'),
59
+ hit(8022334, 1280, 853, 'scooter-motorcycle-city-paris', 17, 'scooter, motorcycle, city, paris, france, away, urban, landscape, yego, paris, paris, paris, paris, paris'),
60
+ hit(1139142, 1280, 853, 'horse-horse-head-horseback-riding', 18, 'horse, horse head, horseback riding, animal, close up, nature, riding, equine, equestrian, saddle, horse saddle, bridle'),
61
+ hit(394205, 1280, 853, 'horses-horse-tradition-rider', 19, 'horses, nature, horse, tradition, rider, hungarian, animals, gallop, speed, horse race'),
62
+ hit(5360648, 1280, 853, 'to-go-biking-cycle-heaven', 20, 'to go biking, windows wallpaper, cycle, heaven, cloudburst, hd wallpaper, girl, bicycle, wallpaper 4k, free wallpaper, nature, silhouette, cool backgrounds, dramatic, background, screensaver, rain, 4k wallpaper 1920x1080, clouds, rain clouds, 4k wallpaper, sunlight, pretty, pleasure, unicycle, desktop backgrounds, free background, balance, beautiful wallpaper, homeland, laptop wallpaper, bad weather, wallpaper hd, mac wallpaper, full hd wallpaper, the atmosphere, air'),
63
+ hit(8386051, 1280, 853, 'people-man-lonely-sad-alone', 21, 'people, man, lonely, sad, alone, uninhibited, under, graffiti, motorbike, sad, sad, sad, sad, sad'),
64
+ hit(6281973, 1280, 853, 'road-city-motorcycle-morning', 22, 'road, city, motorcycle, morning, sunlight, motorbike, vehicle, pavement, street, highway, urban, road, road, road, motorcycle, motorcycle, motorcycle, motorcycle, motorcycle, motorbike, street, highway, highway, highway, highway'),
65
+ hit(930715, 1280, 914, 'superbike-motorsport-fast-speed', 23, 'superbike, motorsport, fast, speed, red, track, race, power, motorcycle, sport, bike, motorbike, helmet, rider, gray sports, gray bike, gray power, fast, motorcycle, motorcycle, sport, bike, bike, bike, bike, bike'),
66
+ hit(5101069, 1280, 853, 'horse-mountains-lagoon-sea', 24, 'horse, mountains, lagoon, sea, reflections, silhouette, nature, landscape, animal, sky, outdoor, cape town, noordhoek, sunset, brown nature, brown sky, brown city, beach, brown animals, brown landscape, brown sunset, brown sea, brown mountain, brown horse, brown ocean, brown natural, horse, horse, horse, horse, horse')
67
+ ].map((photo)=>[
68
+ photo.id,
69
+ photo
70
+ ]));
71
+ const of = (...ids)=>ids.map((id)=>AGL4092_1101_HITS.get(String(id)));
72
+ /** What each search answered on 2026-11-01. */ export const AGL4092_1101_ANSWERS = {
73
+ /** horizontal, 900 wide; first 20 of 40 */ 'joining young rider|horizontal|900|': of(20333, 3372907, 407123, 9331340, 9702440, 8209523, 3237649, 7469078, 7288297, 7200409, 10135205, 557261, 95032, 5221914, 1869727, 10388622, 3066167, 8022334, 1139142, 394205),
74
+ /** horizontal, 900 wide; first 20 of 40 */ 'rider|horizontal|900|': of(3372907, 407123, 9331340, 8209523, 7200409, 10135205, 10388622, 557261, 5221914, 95032, 8022334, 1869727, 3066167, 1139142, 394205, 5360648, 8386051, 6281973, 930715, 5101069)
75
+ };
76
+
77
+ //# sourceMappingURL=ai-stock-photo-agl4092-1101-recordings.js.map