@ainyc/canonry 1.4.1 → 1.4.3
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.
- package/LICENSE +105 -661
- package/README.md +2 -2
- package/assets/assets/{index-CXv_OnJT.js → index-BubLqs-I.js} +1 -1
- package/assets/index.html +1 -1
- package/package.json +6 -6
package/LICENSE
CHANGED
|
@@ -1,661 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
A "Standard Interface" means an interface that either is an official
|
|
107
|
-
standard defined by a recognized standards body, or, in the case of
|
|
108
|
-
interfaces specified for a particular programming language, one that
|
|
109
|
-
is widely used among developers working in that language.
|
|
110
|
-
|
|
111
|
-
The "System Libraries" of an executable work include anything, other
|
|
112
|
-
than the work as a whole, that (a) is included in the normal form of
|
|
113
|
-
packaging a Major Component, but which is not part of that Major
|
|
114
|
-
Component, and (b) serves only to enable use of the work with that
|
|
115
|
-
Major Component, or to implement a Standard Interface for which an
|
|
116
|
-
implementation is available to the public in source code form. A
|
|
117
|
-
"Major Component", in this context, means a major essential component
|
|
118
|
-
(kernel, window system, and so on) of the specific operating system
|
|
119
|
-
(if any) on which the executable work runs, or a compiler used to
|
|
120
|
-
produce the work, or an object code interpreter used to run it.
|
|
121
|
-
|
|
122
|
-
The "Corresponding Source" for a work in object code form means all
|
|
123
|
-
the source code needed to generate, install, and (for an executable
|
|
124
|
-
work) run the object code and to modify the work, including scripts to
|
|
125
|
-
control those activities. However, it does not include the work's
|
|
126
|
-
System Libraries, or general-purpose tools or generally available free
|
|
127
|
-
programs which are used unmodified in performing those activities but
|
|
128
|
-
which are not part of the work. For example, Corresponding Source
|
|
129
|
-
includes interface definition files associated with source files for
|
|
130
|
-
the work, and the source code for shared libraries and dynamically
|
|
131
|
-
linked subprograms that the work is specifically designed to require,
|
|
132
|
-
such as by intimate data communication or control flow between those
|
|
133
|
-
subprograms and other parts of the work.
|
|
134
|
-
|
|
135
|
-
The Corresponding Source need not include anything that users
|
|
136
|
-
can regenerate automatically from other parts of the Corresponding
|
|
137
|
-
Source.
|
|
138
|
-
|
|
139
|
-
The Corresponding Source for a work in source code form is that
|
|
140
|
-
same work.
|
|
141
|
-
|
|
142
|
-
2. Basic Permissions.
|
|
143
|
-
|
|
144
|
-
All rights granted under this License are granted for the term of
|
|
145
|
-
copyright on the Program, and are irrevocable provided the stated
|
|
146
|
-
conditions are met. This License explicitly affirms your unlimited
|
|
147
|
-
permission to run the unmodified Program. The output from running a
|
|
148
|
-
covered work is covered by this License only if the output, given its
|
|
149
|
-
content, constitutes a covered work. This License acknowledges your
|
|
150
|
-
rights of fair use or other equivalent, as provided by copyright law.
|
|
151
|
-
|
|
152
|
-
You may make, run and propagate covered works that you do not
|
|
153
|
-
convey, without conditions so long as your license otherwise remains
|
|
154
|
-
in force. You may convey covered works to others for the sole purpose
|
|
155
|
-
of having them make modifications exclusively for you, or provide you
|
|
156
|
-
with facilities for running those works, provided that you comply with
|
|
157
|
-
the terms of this License in conveying all material for which you do
|
|
158
|
-
not control copyright. Those thus making or running the covered works
|
|
159
|
-
for you must do so exclusively on your behalf, under your direction
|
|
160
|
-
and control, on terms that prohibit them from making any copies of
|
|
161
|
-
your copyrighted material outside their relationship with you.
|
|
162
|
-
|
|
163
|
-
Conveying under any other circumstances is permitted solely under
|
|
164
|
-
the conditions stated below. Sublicensing is not allowed; section 10
|
|
165
|
-
makes it unnecessary.
|
|
166
|
-
|
|
167
|
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
168
|
-
|
|
169
|
-
No covered work shall be deemed part of an effective technological
|
|
170
|
-
measure under any applicable law fulfilling obligations under article
|
|
171
|
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
172
|
-
similar laws prohibiting or restricting circumvention of such
|
|
173
|
-
measures.
|
|
174
|
-
|
|
175
|
-
When you convey a covered work, you waive any legal power to forbid
|
|
176
|
-
circumvention of technological measures to the extent such circumvention
|
|
177
|
-
is effected by exercising rights under this License with respect to
|
|
178
|
-
the covered work, and you disclaim any intention to limit operation or
|
|
179
|
-
modification of the work as a means of enforcing, against the work's
|
|
180
|
-
users, your or third parties' legal rights to forbid circumvention of
|
|
181
|
-
technological measures.
|
|
182
|
-
|
|
183
|
-
4. Conveying Verbatim Copies.
|
|
184
|
-
|
|
185
|
-
You may convey verbatim copies of the Program's source code as you
|
|
186
|
-
receive it, in any medium, provided that you conspicuously and
|
|
187
|
-
appropriately publish on each copy an appropriate copyright notice;
|
|
188
|
-
keep intact all notices stating that this License and any
|
|
189
|
-
non-permissive terms added in accord with section 7 apply to the code;
|
|
190
|
-
keep intact all notices of the absence of any warranty; and give all
|
|
191
|
-
recipients a copy of this License along with the Program.
|
|
192
|
-
|
|
193
|
-
You may charge any price or no price for each copy that you convey,
|
|
194
|
-
and you may offer support or warranty protection for a fee.
|
|
195
|
-
|
|
196
|
-
5. Conveying Modified Source Versions.
|
|
197
|
-
|
|
198
|
-
You may convey a work based on the Program, or the modifications to
|
|
199
|
-
produce it from the Program, in the form of source code under the
|
|
200
|
-
terms of section 4, provided that you also meet all of these conditions:
|
|
201
|
-
|
|
202
|
-
a) The work must carry prominent notices stating that you modified
|
|
203
|
-
it, and giving a relevant date.
|
|
204
|
-
|
|
205
|
-
b) The work must carry prominent notices stating that it is
|
|
206
|
-
released under this License and any conditions added under section
|
|
207
|
-
7. This requirement modifies the requirement in section 4 to
|
|
208
|
-
"keep intact all notices".
|
|
209
|
-
|
|
210
|
-
c) You must license the entire work, as a whole, under this
|
|
211
|
-
License to anyone who comes into possession of a copy. This
|
|
212
|
-
License will therefore apply, along with any applicable section 7
|
|
213
|
-
additional terms, to the whole of the work, and all its parts,
|
|
214
|
-
regardless of how they are packaged. This License gives no
|
|
215
|
-
permission to license the work in any other way, but it does not
|
|
216
|
-
invalidate such permission if you have separately received it.
|
|
217
|
-
|
|
218
|
-
d) If the work has interactive user interfaces, each must display
|
|
219
|
-
Appropriate Legal Notices; however, if the Program has interactive
|
|
220
|
-
interfaces that do not display Appropriate Legal Notices, your
|
|
221
|
-
work need not make them do so.
|
|
222
|
-
|
|
223
|
-
A compilation of a covered work with other separate and independent
|
|
224
|
-
works, which are not by their nature extensions of the covered work,
|
|
225
|
-
and which are not combined with it such as to form a larger program,
|
|
226
|
-
in or on a volume of a storage or distribution medium, is called an
|
|
227
|
-
"aggregate" if the compilation and its resulting copyright are not
|
|
228
|
-
used to limit the access or legal rights of the compilation's users
|
|
229
|
-
beyond what the individual works permit. Inclusion of a covered work
|
|
230
|
-
in an aggregate does not cause this License to apply to the other
|
|
231
|
-
parts of the aggregate.
|
|
232
|
-
|
|
233
|
-
6. Conveying Non-Source Forms.
|
|
234
|
-
|
|
235
|
-
You may convey a covered work in object code form under the terms
|
|
236
|
-
of sections 4 and 5, provided that you also convey the
|
|
237
|
-
machine-readable Corresponding Source under the terms of this License,
|
|
238
|
-
in one of these ways:
|
|
239
|
-
|
|
240
|
-
a) Convey the object code in, or embodied in, a physical product
|
|
241
|
-
(including a physical distribution medium), accompanied by the
|
|
242
|
-
Corresponding Source fixed on a durable physical medium
|
|
243
|
-
customarily used for software interchange.
|
|
244
|
-
|
|
245
|
-
b) Convey the object code in, or embodied in, a physical product
|
|
246
|
-
(including a physical distribution medium), accompanied by a
|
|
247
|
-
written offer, valid for at least three years and valid for as
|
|
248
|
-
long as you offer spare parts or customer support for that product
|
|
249
|
-
model, to give anyone who possesses the object code either (1) a
|
|
250
|
-
copy of the Corresponding Source for all the software in the
|
|
251
|
-
product that is covered by this License, on a durable physical
|
|
252
|
-
medium customarily used for software interchange, for a price no
|
|
253
|
-
more than your reasonable cost of physically performing this
|
|
254
|
-
conveying of source, or (2) access to copy the
|
|
255
|
-
Corresponding Source from a network server at no charge.
|
|
256
|
-
|
|
257
|
-
c) Convey individual copies of the object code with a copy of the
|
|
258
|
-
written offer to provide the Corresponding Source. This
|
|
259
|
-
alternative is allowed only occasionally and noncommercially, and
|
|
260
|
-
only if you received the object code with such an offer, in accord
|
|
261
|
-
with subsection 6b.
|
|
262
|
-
|
|
263
|
-
d) Convey the object code by offering access from a designated
|
|
264
|
-
place (gratis or for a charge), and offer equivalent access to the
|
|
265
|
-
Corresponding Source in the same way through the same place at no
|
|
266
|
-
further charge. You need not require recipients to copy the
|
|
267
|
-
Corresponding Source along with the object code. If the place to
|
|
268
|
-
copy the object code is a network server, the Corresponding Source
|
|
269
|
-
may be on a different server (operated by you or a third party)
|
|
270
|
-
that supports equivalent copying facilities, provided you maintain
|
|
271
|
-
clear directions next to the object code saying where to find the
|
|
272
|
-
Corresponding Source. Regardless of what server hosts the
|
|
273
|
-
Corresponding Source, you remain obligated to ensure that it is
|
|
274
|
-
available for as long as needed to satisfy these requirements.
|
|
275
|
-
|
|
276
|
-
e) Convey the object code using peer-to-peer transmission, provided
|
|
277
|
-
you inform other peers where the object code and Corresponding
|
|
278
|
-
Source of the work are being offered to the general public at no
|
|
279
|
-
charge under subsection 6d.
|
|
280
|
-
|
|
281
|
-
A separable portion of the object code, whose source code is excluded
|
|
282
|
-
from the Corresponding Source as a System Library, need not be
|
|
283
|
-
included in conveying the object code work.
|
|
284
|
-
|
|
285
|
-
A "User Product" is either (1) a "consumer product", which means any
|
|
286
|
-
tangible personal property which is normally used for personal, family,
|
|
287
|
-
or household purposes, or (2) anything designed or sold for incorporation
|
|
288
|
-
into a dwelling. In determining whether a product is a consumer product,
|
|
289
|
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
290
|
-
product received by a particular user, "normally used" refers to a
|
|
291
|
-
typical or common use of that class of product, regardless of the status
|
|
292
|
-
of the particular user or of the way in which the particular user
|
|
293
|
-
actually uses, or expects or is expected to use, the product. A product
|
|
294
|
-
is a consumer product regardless of whether the product has substantial
|
|
295
|
-
commercial, industrial or non-consumer uses, unless such uses represent
|
|
296
|
-
the only significant mode of use of the product.
|
|
297
|
-
|
|
298
|
-
"Installation Information" for a User Product means any methods,
|
|
299
|
-
procedures, authorization keys, or other information required to install
|
|
300
|
-
and execute modified versions of a covered work in that User Product from
|
|
301
|
-
a modified version of its Corresponding Source. The information must
|
|
302
|
-
suffice to ensure that the continued functioning of the modified object
|
|
303
|
-
code is in no case prevented or interfered with solely because
|
|
304
|
-
modification has been made.
|
|
305
|
-
|
|
306
|
-
If you convey an object code work under this section in, or with, or
|
|
307
|
-
specifically for use in, a User Product, and the conveying occurs as
|
|
308
|
-
part of a transaction in which the right of possession and use of the
|
|
309
|
-
User Product is transferred to the recipient in perpetuity or for a
|
|
310
|
-
fixed term (regardless of how the transaction is characterized), the
|
|
311
|
-
Corresponding Source conveyed under this section must be accompanied
|
|
312
|
-
by the Installation Information. But this requirement does not apply
|
|
313
|
-
if neither you nor any third party retains the ability to install
|
|
314
|
-
modified object code on the User Product (for example, the work has
|
|
315
|
-
been installed in ROM).
|
|
316
|
-
|
|
317
|
-
The requirement to provide Installation Information does not include a
|
|
318
|
-
requirement to continue to provide support service, warranty, or updates
|
|
319
|
-
for a work that has been modified or installed by the recipient, or for
|
|
320
|
-
the User Product in which it has been modified or installed. Access to a
|
|
321
|
-
network may be denied when the modification itself materially and
|
|
322
|
-
adversely affects the operation of the network or violates the rules and
|
|
323
|
-
protocols for communication across the network.
|
|
324
|
-
|
|
325
|
-
Corresponding Source conveyed, and Installation Information provided,
|
|
326
|
-
in accord with this section must be in a format that is publicly
|
|
327
|
-
documented (and with an implementation available to the public in
|
|
328
|
-
source code form), and must require no special password or key for
|
|
329
|
-
unpacking, reading or copying.
|
|
330
|
-
|
|
331
|
-
7. Additional Terms.
|
|
332
|
-
|
|
333
|
-
"Additional permissions" are terms that supplement the terms of this
|
|
334
|
-
License by making exceptions from one or more of its conditions.
|
|
335
|
-
Additional permissions that are applicable to the entire Program shall
|
|
336
|
-
be treated as though they were included in this License, to the extent
|
|
337
|
-
that they are valid under applicable law. If additional permissions
|
|
338
|
-
apply only to part of the Program, that part may be used separately
|
|
339
|
-
under those permissions, but the entire Program remains governed by
|
|
340
|
-
this License without regard to the additional permissions.
|
|
341
|
-
|
|
342
|
-
When you convey a copy of a covered work, you may at your option
|
|
343
|
-
remove any additional permissions from that copy, or from any part of
|
|
344
|
-
it. (Additional permissions may be written to require their own
|
|
345
|
-
removal in certain cases when you modify the work.) You may place
|
|
346
|
-
additional permissions on material, added by you to a covered work,
|
|
347
|
-
for which you have or can give appropriate copyright permission.
|
|
348
|
-
|
|
349
|
-
Notwithstanding any other provision of this License, for material you
|
|
350
|
-
add to a covered work, you may (if authorized by the copyright holders of
|
|
351
|
-
that material) supplement the terms of this License with terms:
|
|
352
|
-
|
|
353
|
-
a) Disclaiming warranty or limiting liability differently from the
|
|
354
|
-
terms of sections 15 and 16 of this License; or
|
|
355
|
-
|
|
356
|
-
b) Requiring preservation of specified reasonable legal notices or
|
|
357
|
-
author attributions in that material or in the Appropriate Legal
|
|
358
|
-
Notices displayed by works containing it; or
|
|
359
|
-
|
|
360
|
-
c) Prohibiting misrepresentation of the origin of that material, or
|
|
361
|
-
requiring that modified versions of such material be marked in
|
|
362
|
-
reasonable ways as different from the original version; or
|
|
363
|
-
|
|
364
|
-
d) Limiting the use for publicity purposes of names of licensors or
|
|
365
|
-
authors of the material; or
|
|
366
|
-
|
|
367
|
-
e) Declining to grant rights under trademark law for use of some
|
|
368
|
-
trade names, trademarks, or service marks; or
|
|
369
|
-
|
|
370
|
-
f) Requiring indemnification of licensors and authors of that
|
|
371
|
-
material by anyone who conveys the material (or modified versions of
|
|
372
|
-
it) with contractual assumptions of liability to the recipient, for
|
|
373
|
-
any liability that these contractual assumptions directly impose on
|
|
374
|
-
those licensors and authors.
|
|
375
|
-
|
|
376
|
-
All other non-permissive additional terms are considered "further
|
|
377
|
-
restrictions" within the meaning of section 10. If the Program as you
|
|
378
|
-
received it, or any part of it, contains a notice stating that it is
|
|
379
|
-
governed by this License along with a term that is a further
|
|
380
|
-
restriction, you may remove that term. If a license document contains
|
|
381
|
-
a further restriction but permits relicensing or conveying under this
|
|
382
|
-
License, you may add to a covered work material governed by the terms
|
|
383
|
-
of that license document, provided that the further restriction does
|
|
384
|
-
not survive such relicensing or conveying.
|
|
385
|
-
|
|
386
|
-
If you add terms to a covered work in accord with this section, you
|
|
387
|
-
must place, in the relevant source files, a statement of the
|
|
388
|
-
additional terms that apply to those files, or a notice indicating
|
|
389
|
-
where to find the applicable terms.
|
|
390
|
-
|
|
391
|
-
Additional terms, permissive or non-permissive, may be stated in the
|
|
392
|
-
form of a separately written license, or stated as exceptions;
|
|
393
|
-
the above requirements apply either way.
|
|
394
|
-
|
|
395
|
-
8. Termination.
|
|
396
|
-
|
|
397
|
-
You may not propagate or modify a covered work except as expressly
|
|
398
|
-
provided under this License. Any attempt otherwise to propagate or
|
|
399
|
-
modify it is void, and will automatically terminate your rights under
|
|
400
|
-
this License (including any patent licenses granted under the third
|
|
401
|
-
paragraph of section 11).
|
|
402
|
-
|
|
403
|
-
However, if you cease all violation of this License, then your
|
|
404
|
-
license from a particular copyright holder is reinstated (a)
|
|
405
|
-
provisionally, unless and until the copyright holder explicitly and
|
|
406
|
-
finally terminates your license, and (b) permanently, if the copyright
|
|
407
|
-
holder fails to notify you of the violation by some reasonable means
|
|
408
|
-
prior to 60 days after the cessation.
|
|
409
|
-
|
|
410
|
-
Moreover, your license from a particular copyright holder is
|
|
411
|
-
reinstated permanently if the copyright holder notifies you of the
|
|
412
|
-
violation by some reasonable means, this is the first time you have
|
|
413
|
-
received notice of violation of this License (for any work) from that
|
|
414
|
-
copyright holder, and you cure the violation prior to 30 days after
|
|
415
|
-
your receipt of the notice.
|
|
416
|
-
|
|
417
|
-
Termination of your rights under this section does not terminate the
|
|
418
|
-
licenses of parties who have received copies or rights from you under
|
|
419
|
-
this License. If your rights have been terminated and not permanently
|
|
420
|
-
reinstated, you do not qualify to receive new licenses for the same
|
|
421
|
-
material under section 10.
|
|
422
|
-
|
|
423
|
-
9. Acceptance Not Required for Having Copies.
|
|
424
|
-
|
|
425
|
-
You are not required to accept this License in order to receive or
|
|
426
|
-
run a copy of the Program. Ancillary propagation of a covered work
|
|
427
|
-
occurring solely as a consequence of using peer-to-peer transmission
|
|
428
|
-
to receive a copy likewise does not require acceptance. However,
|
|
429
|
-
nothing other than this License grants you permission to propagate or
|
|
430
|
-
modify any covered work. These actions infringe copyright if you do
|
|
431
|
-
not accept this License. Therefore, by modifying or propagating a
|
|
432
|
-
covered work, you indicate your acceptance of this License to do so.
|
|
433
|
-
|
|
434
|
-
10. Automatic Licensing of Downstream Recipients.
|
|
435
|
-
|
|
436
|
-
Each time you convey a covered work, the recipient automatically
|
|
437
|
-
receives a license from the original licensors, to run, modify and
|
|
438
|
-
propagate that work, subject to this License. You are not responsible
|
|
439
|
-
for enforcing compliance by third parties with this License.
|
|
440
|
-
|
|
441
|
-
An "entity transaction" is a transaction transferring control of an
|
|
442
|
-
organization, or substantially all assets of one, or subdividing an
|
|
443
|
-
organization, or merging organizations. If propagation of a covered
|
|
444
|
-
work results from an entity transaction, each party to that
|
|
445
|
-
transaction who receives a copy of the work also receives whatever
|
|
446
|
-
licenses to the work the party's predecessor in interest had or could
|
|
447
|
-
give under the previous paragraph, plus a right to possession of the
|
|
448
|
-
Corresponding Source of the work from the predecessor in interest, if
|
|
449
|
-
the predecessor has it or can get it with reasonable efforts.
|
|
450
|
-
|
|
451
|
-
You may not impose any further restrictions on the exercise of the
|
|
452
|
-
rights granted or affirmed under this License. For example, you may
|
|
453
|
-
not impose a license fee, royalty, or other charge for exercise of
|
|
454
|
-
rights granted under this License, and you may not initiate litigation
|
|
455
|
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
456
|
-
any patent claim is infringed by making, using, selling, offering for
|
|
457
|
-
sale, or importing the Program or any portion of it.
|
|
458
|
-
|
|
459
|
-
11. Patents.
|
|
460
|
-
|
|
461
|
-
A "contributor" is a copyright holder who authorizes use under this
|
|
462
|
-
License of the Program or a work on which the Program is based. The
|
|
463
|
-
work thus licensed is called the contributor's "contributor version".
|
|
464
|
-
|
|
465
|
-
A contributor's "essential patent claims" are all patent claims
|
|
466
|
-
owned or controlled by the contributor, whether already acquired or
|
|
467
|
-
hereafter acquired, that would be infringed by some manner, permitted
|
|
468
|
-
by this License, of making, using, or selling its contributor version,
|
|
469
|
-
but do not include claims that would be infringed only as a
|
|
470
|
-
consequence of further modification of the contributor version. For
|
|
471
|
-
purposes of this definition, "control" includes the right to grant
|
|
472
|
-
patent sublicenses in a manner consistent with the requirements of
|
|
473
|
-
this License.
|
|
474
|
-
|
|
475
|
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
476
|
-
patent license under the contributor's essential patent claims, to
|
|
477
|
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
478
|
-
propagate the contents of its contributor version.
|
|
479
|
-
|
|
480
|
-
In the following three paragraphs, a "patent license" is any express
|
|
481
|
-
agreement or commitment, however denominated, not to enforce a patent
|
|
482
|
-
(such as an express permission to practice a patent or covenant not to
|
|
483
|
-
sue for patent infringement). To "grant" such a patent license to a
|
|
484
|
-
party means to make such an agreement or commitment not to enforce a
|
|
485
|
-
patent against the party.
|
|
486
|
-
|
|
487
|
-
If you convey a covered work, knowingly relying on a patent license,
|
|
488
|
-
and the Corresponding Source of the work is not available for anyone
|
|
489
|
-
to copy, free of charge and under the terms of this License, through a
|
|
490
|
-
publicly available network server or other readily accessible means,
|
|
491
|
-
then you must either (1) cause the Corresponding Source to be so
|
|
492
|
-
available, or (2) arrange to deprive yourself of the benefit of the
|
|
493
|
-
patent license for this particular work, or (3) arrange, in a manner
|
|
494
|
-
consistent with the requirements of this License, to extend the patent
|
|
495
|
-
license to downstream recipients. "Knowingly relying" means you have
|
|
496
|
-
actual knowledge that, but for the patent license, your conveying the
|
|
497
|
-
covered work in a country, or your recipient's use of the covered work
|
|
498
|
-
in a country, would infringe one or more identifiable patents in that
|
|
499
|
-
country that you have reason to believe are valid.
|
|
500
|
-
|
|
501
|
-
If, pursuant to or in connection with a single transaction or
|
|
502
|
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
503
|
-
covered work, and grant a patent license to some of the parties
|
|
504
|
-
receiving the covered work authorizing them to use, propagate, modify
|
|
505
|
-
or convey a specific copy of the covered work, then the patent license
|
|
506
|
-
you grant is automatically extended to all recipients of the covered
|
|
507
|
-
work and works based on it.
|
|
508
|
-
|
|
509
|
-
A patent license is "discriminatory" if it does not include within
|
|
510
|
-
the scope of its coverage, prohibits the exercise of, or is
|
|
511
|
-
conditioned on the non-exercise of one or more of the rights that are
|
|
512
|
-
specifically granted under this License. You may not convey a covered
|
|
513
|
-
work if you are a party to an arrangement with a third party that is
|
|
514
|
-
in the business of distributing software, under which you make payment
|
|
515
|
-
to the third party based on the extent of your activity of conveying
|
|
516
|
-
the work, and under which the third party grants, to any of the
|
|
517
|
-
parties who would receive the covered work from you, a discriminatory
|
|
518
|
-
patent license (a) in connection with copies of the covered work
|
|
519
|
-
conveyed by you (or copies made from those copies), or (b) primarily
|
|
520
|
-
for and in connection with specific products or compilations that
|
|
521
|
-
contain the covered work, unless you entered into that arrangement,
|
|
522
|
-
or that patent license was granted, prior to 28 March 2007.
|
|
523
|
-
|
|
524
|
-
Nothing in this License shall be construed as excluding or limiting
|
|
525
|
-
any implied license or other defenses to infringement that may
|
|
526
|
-
otherwise be available to you under applicable patent law.
|
|
527
|
-
|
|
528
|
-
12. No Surrender of Others' Freedom.
|
|
529
|
-
|
|
530
|
-
If conditions are imposed on you (whether by court order, agreement or
|
|
531
|
-
otherwise) that contradict the conditions of this License, they do not
|
|
532
|
-
excuse you from the conditions of this License. If you cannot convey a
|
|
533
|
-
covered work so as to satisfy simultaneously your obligations under this
|
|
534
|
-
License and any other pertinent obligations, then as a consequence you may
|
|
535
|
-
not convey it at all. For example, if you agree to terms that obligate you
|
|
536
|
-
to collect a royalty for further conveying from those to whom you convey
|
|
537
|
-
the Program, the only way you could satisfy both those terms and this
|
|
538
|
-
License would be to refrain entirely from conveying the Program.
|
|
539
|
-
|
|
540
|
-
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
541
|
-
|
|
542
|
-
Notwithstanding any other provision of this License, if you modify the
|
|
543
|
-
Program, your modified version must prominently offer all users
|
|
544
|
-
interacting with it remotely through a computer network (if your version
|
|
545
|
-
supports such interaction) an opportunity to receive the Corresponding
|
|
546
|
-
Source of your version by providing access to the Corresponding Source
|
|
547
|
-
from a network server at no charge, through some standard or customary
|
|
548
|
-
means of facilitating copying of software. This Corresponding Source
|
|
549
|
-
shall include the Corresponding Source for any work covered by version 3
|
|
550
|
-
of the GNU General Public License that is incorporated pursuant to the
|
|
551
|
-
following paragraph.
|
|
552
|
-
|
|
553
|
-
Notwithstanding any other provision of this License, you have
|
|
554
|
-
permission to link or combine any covered work with a work licensed
|
|
555
|
-
under version 3 of the GNU General Public License into a single
|
|
556
|
-
combined work, and to convey the resulting work. The terms of this
|
|
557
|
-
License will continue to apply to the part which is the covered work,
|
|
558
|
-
but the work with which it is combined will remain governed by version
|
|
559
|
-
3 of the GNU General Public License.
|
|
560
|
-
|
|
561
|
-
14. Revised Versions of this License.
|
|
562
|
-
|
|
563
|
-
The Free Software Foundation may publish revised and/or new versions of
|
|
564
|
-
the GNU Affero General Public License from time to time. Such new versions
|
|
565
|
-
will be similar in spirit to the present version, but may differ in detail to
|
|
566
|
-
address new problems or concerns.
|
|
567
|
-
|
|
568
|
-
Each version is given a distinguishing version number. If the
|
|
569
|
-
Program specifies that a certain numbered version of the GNU Affero General
|
|
570
|
-
Public License "or any later version" applies to it, you have the
|
|
571
|
-
option of following the terms and conditions either of that numbered
|
|
572
|
-
version or of any later version published by the Free Software
|
|
573
|
-
Foundation. If the Program does not specify a version number of the
|
|
574
|
-
GNU Affero General Public License, you may choose any version ever published
|
|
575
|
-
by the Free Software Foundation.
|
|
576
|
-
|
|
577
|
-
If the Program specifies that a proxy can decide which future
|
|
578
|
-
versions of the GNU Affero General Public License can be used, that proxy's
|
|
579
|
-
public statement of acceptance of a version permanently authorizes you
|
|
580
|
-
to choose that version for the Program.
|
|
581
|
-
|
|
582
|
-
Later license versions may give you additional or different
|
|
583
|
-
permissions. However, no additional obligations are imposed on any
|
|
584
|
-
author or copyright holder as a result of your choosing to follow a
|
|
585
|
-
later version.
|
|
586
|
-
|
|
587
|
-
15. Disclaimer of Warranty.
|
|
588
|
-
|
|
589
|
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
590
|
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
591
|
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
592
|
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
593
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
594
|
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
595
|
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
596
|
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
597
|
-
|
|
598
|
-
16. Limitation of Liability.
|
|
599
|
-
|
|
600
|
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
601
|
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
602
|
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
603
|
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
604
|
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
605
|
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
606
|
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
607
|
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
608
|
-
SUCH DAMAGES.
|
|
609
|
-
|
|
610
|
-
17. Interpretation of Sections 15 and 16.
|
|
611
|
-
|
|
612
|
-
If the disclaimer of warranty and limitation of liability provided
|
|
613
|
-
above cannot be given local legal effect according to their terms,
|
|
614
|
-
reviewing courts shall apply local law that most closely approximates
|
|
615
|
-
an absolute waiver of all civil liability in connection with the
|
|
616
|
-
Program, unless a warranty or assumption of liability accompanies a
|
|
617
|
-
copy of the Program in return for a fee.
|
|
618
|
-
|
|
619
|
-
END OF TERMS AND CONDITIONS
|
|
620
|
-
|
|
621
|
-
How to Apply These Terms to Your New Programs
|
|
622
|
-
|
|
623
|
-
If you develop a new program, and you want it to be of the greatest
|
|
624
|
-
possible use to the public, the best way to achieve this is to make it
|
|
625
|
-
free software which everyone can redistribute and change under these terms.
|
|
626
|
-
|
|
627
|
-
To do so, attach the following notices to the program. It is safest
|
|
628
|
-
to attach them to the start of each source file to most effectively
|
|
629
|
-
state the exclusion of warranty; and each file should have at least
|
|
630
|
-
the "copyright" line and a pointer to where the full notice is found.
|
|
631
|
-
|
|
632
|
-
<one line to give the program's name and a brief idea of what it does.>
|
|
633
|
-
Copyright (C) <year> <name of author>
|
|
634
|
-
|
|
635
|
-
This program is free software: you can redistribute it and/or modify
|
|
636
|
-
it under the terms of the GNU Affero General Public License as published by
|
|
637
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
638
|
-
(at your option) any later version.
|
|
639
|
-
|
|
640
|
-
This program is distributed in the hope that it will be useful,
|
|
641
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
642
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
643
|
-
GNU Affero General Public License for more details.
|
|
644
|
-
|
|
645
|
-
You should have received a copy of the GNU Affero General Public License
|
|
646
|
-
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
647
|
-
|
|
648
|
-
Also add information on how to contact you by electronic and paper mail.
|
|
649
|
-
|
|
650
|
-
If your software can interact with users remotely through a computer
|
|
651
|
-
network, you should also make sure that it provides a way for users to
|
|
652
|
-
get its source. For example, if your program is a web application, its
|
|
653
|
-
interface could display a "Source" link that leads users to an archive
|
|
654
|
-
of the code. There are many ways you could offer source, and different
|
|
655
|
-
solutions will be better for different programs; see section 13 for the
|
|
656
|
-
specific requirements.
|
|
657
|
-
|
|
658
|
-
You should also get your employer (if you work as a programmer) or school,
|
|
659
|
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
660
|
-
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
661
|
-
<https://www.gnu.org/licenses/>.
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-ALv2
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 Arber X
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Canonry
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@ainyc/canonry) [](https://www.npmjs.com/package/@ainyc/canonry) [](https://fsl.software/) [](https://nodejs.org)
|
|
4
4
|
|
|
5
5
|
**Open-source AEO monitoring for your domain.** Canonry tracks how AI answer engines (ChatGPT, Gemini, Claude, and others) cite or omit your website for the keywords you care about.
|
|
6
6
|
|
|
@@ -323,7 +323,7 @@ Contributions are welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup in
|
|
|
323
323
|
|
|
324
324
|
## License
|
|
325
325
|
|
|
326
|
-
[
|
|
326
|
+
[FSL-1.1-ALv2](./LICENSE) — Free to use, modify, and self-host. Each version converts to Apache 2.0 after two years.
|
|
327
327
|
|
|
328
328
|
---
|
|
329
329
|
|
|
@@ -183,7 +183,7 @@ If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHid
|
|
|
183
183
|
For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return w.useEffect(()=>{a&&(document.getElementById(a)||console.error(s))},[s,a]),null},Ow="DialogDescriptionWarning",_w=({contentRef:a,descriptionId:i})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mv(Ow).contentName}}.`;return w.useEffect(()=>{const c=a.current?.getAttribute("aria-describedby");i&&c&&(document.getElementById(i)||console.warn(r))},[r,a,i]),null},zw=tv,Dw=iv,pv=sv,gv=lv,yv=cv,vv=uv,Mw=fv;const Rw=zw,Lw=Dw,bv=w.forwardRef(({className:a,...i},s)=>u.jsx(pv,{ref:s,className:Ft("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",a),...i}));bv.displayName=pv.displayName;const Uw=400,Bw=1200,Hw=720,xv=w.forwardRef(({className:a,children:i,...s},r)=>{const[c,d]=w.useState(Hw),h=w.useRef(!1),m=w.useRef(0),y=w.useRef(0),g=w.useCallback(x=>{h.current=!0,m.current=x.clientX,y.current=c,x.target.setPointerCapture(x.pointerId),x.preventDefault()},[c]),j=w.useCallback(x=>{if(!h.current)return;const k=m.current-x.clientX,T=Math.min(Bw,Math.max(Uw,y.current+k));d(T)},[]),b=w.useCallback(()=>{h.current=!1},[]);return u.jsxs(Lw,{children:[u.jsx(bv,{}),u.jsxs(gv,{ref:r,className:Ft("fixed z-50 flex flex-col bg-zinc-950 px-5 py-4 shadow-2xl overflow-hidden","max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88vh] max-md:rounded-t-2xl max-md:border-t","md:inset-y-0 md:right-0 md:h-full md:border-l","border-zinc-800",a),style:{width:`min(${c}px, 100vw)`},...s,children:[u.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-zinc-700/50 active:bg-zinc-600/50 transition-colors max-md:hidden",onPointerDown:g,onPointerMove:j,onPointerUp:b}),i,u.jsxs(Mw,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-900 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",children:[u.jsx(yy,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});xv.displayName=gv.displayName;const qw=({className:a,...i})=>u.jsx("div",{className:Ft("flex flex-col gap-1.5 pr-10",a),...i}),Sv=w.forwardRef(({className:a,...i},s)=>u.jsx(yv,{ref:s,className:Ft("text-lg font-medium text-zinc-50",a),...i}));Sv.displayName=yv.displayName;const jv=w.forwardRef(({className:a,...i},s)=>u.jsx(vv,{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));jv.displayName=vv.displayName;function ln(a){const i=new Date("2026-02-20");return a.map((s,r)=>({citationState:s,createdAt:new Date(i.getTime()+r*2*24*60*60*1e3).toISOString()}))}const Gi=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en",tags:["local intent","priority"],labels:{},configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",country:"US",language:"en",tags:["lead gen"],labels:{},configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",country:"US",language:"en",tags:["multi-location"],labels:{},configSource:"cli",configRevision:1}];function Pi(a){return{id:a.id,projectId:a.projectId,projectName:a.projectName,kind:a.kind,kindLabel:a.kindLabel,status:a.status,trigger:a.trigger??"manual",createdAt:a.createdAt,startedAt:a.startedAt,duration:a.duration,statusDetail:a.statusDetail,summary:a.summary,triggerLabel:a.triggerLabel}}const wv=Pi({id:"run_citypoint_visibility_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T12:15:00.000Z",startedAt:"Mar 8, 12:15 PM",duration:"6m 12s",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),Pr=Pi({id:"run_citypoint_audit_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"site-audit",kindLabel:"Technical readiness audit",status:"partial",createdAt:"2026-03-08T09:20:00.000Z",startedAt:"Mar 8, 9:20 AM",duration:"14m 41s",statusDetail:"Sitemap fallback engaged; 461 of 500 pages analyzed and llms.txt was not found.",summary:"Fallback crawl completed with missing llms.txt",triggerLabel:"Manual"}),Rd=Pi({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting for slot",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),Ld=Pi({id:"run_harbor_visibility_20260308",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T11:05:00.000Z",startedAt:"Mar 8, 11:05 AM",duration:"5m 07s",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),Nv=Pi({id:"run_harbor_audit_20260307",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"site-audit",kindLabel:"Technical readiness audit",status:"completed",createdAt:"2026-03-07T15:40:00.000Z",startedAt:"Mar 7, 3:40 PM",duration:"11m 33s",statusDetail:"Sitemap-first crawl completed with 99% success and no blocking readiness regressions.",summary:"Audit clean after service-page consolidation",triggerLabel:"Scheduled"}),Wr=Pi({id:"run_northstar_visibility_20260308",projectId:"project_northstar",projectName:"Northstar Orthopedics",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"running",createdAt:"2026-03-08T13:40:00.000Z",startedAt:"Mar 8, 1:40 PM",duration:"3m 10s",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),Yw=[Rd,wv,Pr,Ld,Nv,Wr],Kw=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",citationState:"lost",changeLabel:"Lost since Mar 5",answerSnippet:"For urgent dental care in Brooklyn, Downtown Smiles and Harbor Dental are now cited first for emergency availability and same-day booking.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:["https://downtownsmiles.com/emergency-dentist-brooklyn","https://harbordental.com/same-day-emergency-care"],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing on the emergency service page","llms.txt not found during latest site audit","Location pages link weakly into the emergency care hub"],summary:"AI answers now cite two competitors while your emergency page is no longer grounded.",runHistory:ln(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",keyword:"emergency dentist brooklyn",provider:"openai",citationState:"cited",changeLabel:"Cited for 6 runs",answerSnippet:"Citypoint Dental is listed as a top emergency dentist in Brooklyn for same-day appointments and walk-in availability.",citedDomains:["citypointdental.com","downtownsmiles.com"],evidenceUrls:["https://citypointdental.com/emergency-dentist-brooklyn"],competitorDomains:["downtownsmiles.com"],groundingSources:[],relatedTechnicalSignals:["Emergency page indexed with structured data"],summary:"OpenAI cites your emergency page consistently alongside one competitor.",runHistory:ln(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"Based on the search results, top-rated emergency dental practices in Brooklyn include Downtown Smiles and Harbor Dental.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:[],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing","llms.txt not found"],summary:"Claude does not cite your domain for this emergency query.",runHistory:ln(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_invisalign_openai",keyword:"best invisalign dentist downtown brooklyn",provider:"openai",citationState:"emerging",changeLabel:"First citation in 7 days",answerSnippet:"Citypoint Dental appears as an emerging recommendation for Invisalign in Downtown Brooklyn, supported by recent before-and-after case pages.",citedDomains:["citypointdental.com","clearlineortho.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn","https://citypointdental.com/case-studies/invisalign-open-bite"],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["Structured data now present on two case-study pages","Internal links from service pages to case studies improved crawl depth"],summary:"Fresh case-study content is starting to earn citations on Invisalign prompts.",runHistory:ln(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",keyword:"best invisalign dentist downtown brooklyn",provider:"gemini",citationState:"cited",changeLabel:"Cited for 8 runs",answerSnippet:"Citypoint Dental in Downtown Brooklyn is highlighted for its Invisalign expertise and patient outcomes.",citedDomains:["citypointdental.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn"],competitorDomains:[],groundingSources:[],relatedTechnicalSignals:["Case study pages well-indexed"],summary:"Gemini consistently cites your Invisalign page with no competitor overlap.",runHistory:ln(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",keyword:"best invisalign dentist downtown brooklyn",provider:"claude",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For Invisalign in Downtown Brooklyn, Clear Line Ortho and Brooklyn Smiles are frequently recommended for their experienced orthodontists.",citedDomains:["clearlineortho.com","brooklynsmiles.com"],evidenceUrls:[],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["No before/after schema on case study pages"],summary:"Claude does not surface your Invisalign content despite strong page quality.",runHistory:ln(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_claude",keyword:"pediatric dentist brooklyn heights",provider:"claude",citationState:"not-cited",changeLabel:"No citation across 4 runs",answerSnippet:"Answers cite neighborhood-specific pediatric practices with stronger family-focused FAQ content and clearer insurance details.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:["https://brightkidsdental.com/pediatric-dentist-brooklyn-heights","https://parkpediatricdental.com/insurance"],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric service page exists for Brooklyn Heights","Insurance content is buried three clicks deep"],summary:"Coverage gap is content-driven, not purely technical.",runHistory:ln(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For pediatric dentistry in Brooklyn Heights, Bright Kids Dental and Park Pediatric Dental are cited for family-friendly care.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:[],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric page for Brooklyn Heights"],summary:"Gemini does not surface your domain for pediatric queries in this area.",runHistory:ln(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_openai",keyword:"pediatric dentist brooklyn heights",provider:"openai",citationState:"cited",changeLabel:"First citation this month",answerSnippet:"Citypoint Dental is mentioned as offering pediatric services in Brooklyn, though specialized pediatric-only practices are also highlighted.",citedDomains:["citypointdental.com","brightkidsdental.com"],evidenceUrls:["https://citypointdental.com/family-dentistry"],competitorDomains:["brightkidsdental.com"],groundingSources:[],relatedTechnicalSignals:["Family dentistry page recently updated"],summary:"OpenAI recently started citing your family dentistry page for this query.",runHistory:ln(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],Gw=[{project:Gi[0],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Local-intent monitoring",visibilitySummary:{label:"Answer Visibility",value:"61 / 100",delta:"-8 this week",tone:"caution",description:"Lost citation share on emergency-intent prompts while Invisalign visibility improved.",trend:[73,71,69,66,61]},providerScores:[{provider:"gemini",score:55,cited:5,total:9},{provider:"openai",score:67,cited:6,total:9},{provider:"claude",score:44,cited:4,total:9}],readinessSummary:{label:"Technical Readiness",value:"78 / 100",delta:"+4 after schema fixes",tone:"positive",description:"Schema fixes landed, but sitemap fallback and missing llms.txt still reduce confidence.",trend:[71,72,73,76,78]},competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest technical audit completed in fallback mode; next visibility sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",providers:["gemini"],citationState:"lost"}]},{id:"insight_citypoint_emerging",tone:"positive",title:"New citation on 1 key phrase",detail:"Case-study content is earning citations on Invisalign prompts.",actionLabel:"Emerging",affectedPhrases:[{keyword:"best invisalign dentist downtown brooklyn",evidenceId:"evidence_citypoint_invisalign_openai",providers:["openai"],citationState:"emerging"}]},{id:"insight_citypoint_content_gap",tone:"caution",title:"1 key phrase not cited by any provider",detail:"No dedicated neighborhood page to support pediatric queries.",actionLabel:"Gap",affectedPhrases:[{keyword:"pediatric dentist brooklyn heights",evidenceId:"evidence_citypoint_children_claude",providers:["claude","gemini"],citationState:"not-cited"}]}],visibilityEvidence:Kw,technicalFindings:[{id:"finding_citypoint_schema",severity:"high",title:"Emergency service page lost FAQ schema",detail:"The page most closely tied to high-intent emergency prompts is no longer exposing FAQPage markup.",impact:"Removes a strong grounding signal from the page that previously earned citations."},{id:"finding_citypoint_llms",severity:"medium",title:"llms.txt is still missing",detail:"The latest site audit could not fetch llms.txt or llms-full.txt.",impact:"Lowers crawler clarity and weakens the story when visibility drops."},{id:"finding_citypoint_internal_links",severity:"low",title:"Insurance and pediatric content sit too deep",detail:"Supporting pages needed for family and insurance prompts sit three clicks from the homepage.",impact:"Limits discovery for lower-volume but high-trust prompt variants."}],competitors:[{id:"competitor_citypoint_downtown",domain:"downtownsmiles.com",citationCount:4,totalKeywords:8,pressureLabel:"High",citedKeywords:["emergency dentist","same-day dental","walk-in dentist","tooth pain"],movement:"Up on emergency and availability prompts",notes:"Recently added same-day booking proof and FAQ content."},{id:"competitor_citypoint_harbor",domain:"harbordental.com",citationCount:2,totalKeywords:8,pressureLabel:"Moderate",citedKeywords:["family dentist","emergency dentist"],movement:"Holding citations on family and emergency intents",notes:"Strong appointment and insurance content keeps answers grounded."},{id:"competitor_citypoint_clearline",domain:"clearlineortho.com",citationCount:1,totalKeywords:8,pressureLabel:"Low",citedKeywords:["invisalign near me"],movement:"Softening on Invisalign prompts",notes:"Case-study content is aging, opening room for Citypoint."}],recentRuns:[Rd,wv,Pr]},{project:Gi[1],dateRangeLabel:"Last 14 days",contextLabel:"US / English / Service-area legal prompts",visibilitySummary:{label:"Answer Visibility",value:"74 / 100",delta:"+2 this week",tone:"positive",description:"Branded prompts are stable and informational queries are gradually improving.",trend:[68,70,71,73,74]},providerScores:[{provider:"gemini",score:75,cited:3,total:4},{provider:"openai",score:50,cited:2,total:4}],readinessSummary:{label:"Technical Readiness",value:"83 / 100",delta:"+1 this week",tone:"positive",description:"Service pages consolidated cleanly and structured data remains intact.",trend:[80,80,81,82,83]},competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility and audit runs completed without fallback.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",providers:["gemini"],citationState:"cited"}]},{id:"insight_harbor_local",tone:"neutral",title:"No significant changes",detail:"No new displacement on borough-specific injury prompts this week.",actionLabel:"Stable",affectedPhrases:[]}],visibilityEvidence:[{id:"evidence_harbor_personal_injury",keyword:"brooklyn personal injury lawyer",provider:"gemini",citationState:"cited",changeLabel:"Held for 5 runs",answerSnippet:"Harbor Legal Group remains cited for borough-specific personal injury queries due to clear practice-area and case-result content.",citedDomains:["harborlegal.com"],evidenceUrls:["https://harborlegal.com/personal-injury/brooklyn"],competitorDomains:["shorelineinjury.com"],groundingSources:[],relatedTechnicalSignals:["Practice-area schema intact","Case results link directly from service pages"],summary:"Grounding remains durable after the service-page consolidation.",runHistory:ln(["cited","cited","cited","cited","cited"])}],technicalFindings:[{id:"finding_harbor_faq",severity:"low",title:"FAQ answers could be more concise",detail:"Some FAQ answers are still long enough to reduce snippet clarity.",impact:"This is optimization, not a blocker."}],competitors:[{id:"competitor_harbor_shoreline",domain:"shorelineinjury.com",citationCount:2,totalKeywords:6,pressureLabel:"Moderate",citedKeywords:["personal injury lawyer","car accident attorney"],movement:"Stable",notes:"Strong case-result pages keep it in rotation."}],recentRuns:[Ld,Nv]},{project:Gi[2],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Multi-location treatment prompts",visibilitySummary:{label:"Answer Visibility",value:"58 / 100",delta:"Run in progress",tone:"neutral",description:"The current run is measuring whether treatment-location pages improved citation breadth.",trend:[52,54,55,57,58]},providerScores:[{provider:"openai",score:58,cited:4,total:7}],readinessSummary:{label:"Technical Readiness",value:"76 / 100",delta:"+3 after template cleanup",tone:"positive",description:"Location templates are cleaner, but location-specific proof still needs depth.",trend:[69,71,72,74,76]},competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",providers:["openai"],citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",citationState:"emerging",changeLabel:"Improving",answerSnippet:"Northstar Orthopedics is beginning to appear on location-sensitive treatment prompts when physician bios and treatment pages are tightly linked.",citedDomains:["northstarortho.com","regionaljointcare.com"],evidenceUrls:["https://northstarortho.com/locations/westchester/knee-replacement"],competitorDomains:["regionaljointcare.com"],groundingSources:[],relatedTechnicalSignals:["Physician bios now linked from treatment pages"],summary:"Template cleanup is helping, but proof depth still matters.",runHistory:ln(["not-cited","not-cited","not-cited","cited"])}],technicalFindings:[{id:"finding_northstar_proof",severity:"medium",title:"Location pages lack physician-specific proof",detail:"Treatment pages are structurally sound but still too generic for highly specific prompts.",impact:"Limits how often the provider is cited for local treatment questions."}],competitors:[{id:"competitor_northstar_regional",domain:"regionaljointcare.com",citationCount:5,totalKeywords:7,pressureLabel:"High",citedKeywords:["knee replacement","hip surgery","joint pain treatment","orthopedic surgeon","sports medicine"],movement:"Winning broad treatment prompts",notes:"Heavy physician proof and patient-story content."}],recentRuns:[Wr]}],$w={portfolioOverview:{projects:[{project:Gi[0],visibilityScore:61,visibilityDelta:"-8 this week",readinessScore:78,readinessDelta:"+4 after schema fixes",lastRun:Pr,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:Gi[1],visibilityScore:74,visibilityDelta:"+2 this week",readinessScore:83,readinessDelta:"+1 this week",lastRun:Ld,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:Gi[2],visibilityScore:58,visibilityDelta:"Run in progress",readinessScore:76,readinessDelta:"+3 after template cleanup",lastRun:Wr,insight:"Location pages are improving, but local treatment proof still trails competitors.",trend:[52,54,55,57,58],competitorPressureLabel:"Moderate"}],attentionItems:[{id:"attention_citypoint",tone:"negative",title:"Citypoint Dental lost emergency-intent citations",detail:"Three high-intent prompts now cite competitors first.",actionLabel:"Open project",href:"/projects/project_citypoint"},{id:"attention_worker",tone:"neutral",title:"One follow-up run is queued",detail:"Citypoint has a queued visibility sweep waiting on provider quota.",actionLabel:"Open runs",href:"/runs"},{id:"attention_northstar",tone:"caution",title:"Northstar run still in progress",detail:"Nine prompts remain before the current treatment-location sweep finishes.",actionLabel:"View timeline",href:"/runs"}],recentRuns:[Rd,Wr,Pr],systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Healthy",meta:"phase-1 · database configured"},{id:"worker",label:"Worker",tone:"positive",detail:"Healthy",meta:"heartbeat moments ago"},{id:"providers",label:"Providers",tone:"positive",detail:"2 of 3 configured",meta:"Gemini · OpenAI"}],lastUpdatedAt:"Mar 9, 8:08 AM ET"},projects:Gw,runs:Yw,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"Primary control plane is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"worker",label:"Worker heartbeats received",detail:"Background execution loop is alive.",state:"ready",guidance:"Required before any answer-visibility or site-audit run can start."},{id:"provider",label:"Provider configured",detail:"Gemini key and quota defaults are present.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:18,preview:["emergency dentist brooklyn","best invisalign dentist downtown brooklyn","pediatric dentist brooklyn heights"]},competitorDraft:{domains:["downtownsmiles.com","harbordental.com","clearlineortho.com"],notes:"Start with the domains that already displace the project on money prompts."},launchState:{enabled:!0,ctaLabel:"Launch first run",summary:"Queue a visibility sweep first, then follow with a site audit to explain movement."}},settings:{providerStatuses:[{name:"Gemini",model:"gemini-2.5-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-4o",state:"ready",detail:"API key configured.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"Claude",model:"claude-sonnet-4-6",state:"needs-config",detail:"API key is missing."}],selfHostNotes:["Run behind a reverse proxy before exposing the dashboard outside a trusted network.","Keep bootstrap and provider secrets out of source control.","Use persistent Postgres storage before treating run history as durable."],bootstrapNote:"Bootstrap/admin secrets stay in the environment; they do not belong in the UI."}},Vw={apiStatus:{label:"API",state:"ok",detail:"phase-1 · database configured",version:"phase-1",databaseConfigured:!0},workerStatus:{label:"Worker",state:"ok",detail:"phase-1 · database configured · heartbeat 2026-03-09T08:07:00.000Z",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T08:07:00.000Z"}};function Qw(a={}){const i=structuredClone($w),s=structuredClone(Vw);if(a.emptyPortfolio&&(i.portfolioOverview.projects=[],i.portfolioOverview.attentionItems=[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Start the guided setup flow to add a domain, import keywords, and launch the first run.",actionLabel:"Open setup",href:"/setup"}],i.portfolioOverview.recentRuns=[],i.portfolioOverview.emptyState={title:"No projects yet",detail:"Canonry becomes useful after one project, a small keyword set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}),a.runScenario==="partial"&&(i.runs[0].status="partial",i.runs[0].duration="7m 24s",i.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",i.runs[0].summary="Partial visibility sweep after quota cap",i.portfolioOverview.recentRuns[0]=i.runs[0]),a.runScenario==="failed"&&(i.runs[0].status="failed",i.runs[0].duration="1m 43s",i.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",i.runs[0].summary="Provider retries exhausted before results were captured",i.portfolioOverview.recentRuns[0]=i.runs[0],i.portfolioOverview.attentionItems.unshift({id:"attention_failed_run",tone:"negative",title:"One queued follow-up failed to start cleanly",detail:"Worker retries exhausted before the provider returned a response.",actionLabel:"Open runs",href:"/runs"})),a.degradedWorker&&(s.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),a.providerNeedsConfig&&(i.settings.providerStatuses=i.settings.providerStatuses.map(r=>({...r,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),a.visibilityDropProjectId){const r=i.projects.find(d=>d.project.id===a.visibilityDropProjectId),c=i.portfolioOverview.projects.find(d=>d.project.id===a.visibilityDropProjectId);r&&(r.visibilitySummary.value="49 / 100",r.visibilitySummary.delta="-12 in 48h",r.visibilitySummary.tone="negative",r.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",r.insights.unshift({id:`${r.project.id}_drop`,tone:"negative",title:"Sharp citation drop detected",detail:"Answers that previously cited the domain now ground competitors on both local and service-intent prompts.",actionLabel:"Lost",affectedPhrases:r.visibilityEvidence.filter(d=>d.citationState==="lost").slice(0,5).map(d=>({keyword:d.keyword,evidenceId:d.id,providers:[d.provider].filter(Boolean),citationState:d.citationState}))}),r.technicalFindings?.unshift({id:`${r.project.id}_drop_finding`,severity:"high",title:"Primary supporting page fell out of crawl emphasis",detail:"The drop correlates with weaker internal links and missing FAQ markup on the main conversion page.",impact:"Both citation share and trust signals deteriorated at the same time."})),c&&(c.visibilityScore=49,c.visibilityDelta="-12 in 48h",c.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard:i,health:s}}function Ev(a,i){return a.projects.find(s=>s.project.id===i)}function Xw(a,i){return a.runs.find(s=>s.id===i)}function Zw(a,i){for(const s of a.projects){const r=s.visibilityEvidence.find(c=>c.id===i);if(r)return{project:s,evidence:r}}}const Iw="/api/v1";function Jw(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function Ye(a,i){const s=Jw(),r=await fetch(`${Iw}${a}`,{...i,headers:{"Content-Type":"application/json",...s?{Authorization:`Bearer ${s}`}:{},...i?.headers}});if(!r.ok)throw new Error(`API ${r.status}: ${r.statusText}`);if(r.status!==204)return r.json()}function Fw(){return Ye("/projects")}function Pw(){return Ye("/runs")}function ud(a){return Ye(`/runs/${encodeURIComponent(a)}`)}function Ww(a){return Ye(`/projects/${encodeURIComponent(a)}/keywords`)}function Av(a){return Ye(`/projects/${encodeURIComponent(a)}/competitors`)}function eN(a){return Ye(`/projects/${encodeURIComponent(a)}/timeline`)}function Cv(a,i){return Ye(`/projects/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}function tN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:i})})}function nN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/keywords`,{method:"POST",body:JSON.stringify({keywords:i})})}function kv(a,i){return Ye(`/projects/${encodeURIComponent(a)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:i})})}function Tv(a){return Ye(`/projects/${encodeURIComponent(a)}/runs`,{method:"POST",body:"{}"})}async function aN(a){await Ye(`/projects/${encodeURIComponent(a)}`,{method:"DELETE",body:"{}"})}function iN(a){return Ye(`/projects/${encodeURIComponent(a)}/export`)}function sN(){return Ye("/settings")}function lN(a,i){return Ye(`/settings/providers/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}async function rN(a){try{return await Ye(`/projects/${encodeURIComponent(a)}/schedule`)}catch(i){if(i instanceof Error&&i.message.includes("404"))return null;throw i}}function Eg(a,i){return Ye(`/projects/${encodeURIComponent(a)}/schedule`,{method:"PUT",body:JSON.stringify(i)})}async function cN(a){await Ye(`/projects/${encodeURIComponent(a)}/schedule`,{method:"DELETE",body:"{}"})}function oN(a){return Ye(`/projects/${encodeURIComponent(a)}/notifications`)}function uN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/notifications`,{method:"POST",body:JSON.stringify(i)})}async function dN(a,i){await Ye(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}`,{method:"DELETE",body:"{}"})}function fN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}/test`,{method:"POST",body:"{}"})}function hN(a,i,s){return Ye(`/projects/${encodeURIComponent(a)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:i,count:s})})}function mN(a){return Ye("/apply",{method:"POST",body:JSON.stringify(a)})}function Ov(a){return{id:a.id,name:a.name,displayName:a.displayName,canonicalDomain:a.canonicalDomain,country:a.country,language:a.language,tags:a.tags,labels:a.labels,configSource:a.configSource,configRevision:a.configRevision,createdAt:a.createdAt,updatedAt:a.updatedAt}}function Ag(a){try{return new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return a}}function pN(a,i){if(!a)return"Waiting";if(!i)return"Running";const s=new Date(i).getTime()-new Date(a).getTime();if(s<1e3)return"<1s";const r=Math.floor(s/1e3);if(r<60)return`${r}s`;const c=Math.floor(r/60),d=r%60;return`${c}m ${d}s`}function _v(a){return a==="answer-visibility"?"Answer visibility sweep":a}function gN(a){return a==="manual"?"Manual":a==="scheduled"?"Scheduled":a==="config-apply"?"Config apply":a}function Ud(a,i){return{id:a.id,projectId:a.projectId,projectName:i,kind:a.kind,kindLabel:_v(a.kind),status:a.status,trigger:a.trigger??"manual",createdAt:a.createdAt,startedAt:a.startedAt?Ag(a.startedAt):Ag(a.createdAt),duration:pN(a.startedAt,a.finishedAt),statusDetail:a.error?zv(a.error):yN(a),summary:vN(a),triggerLabel:gN(a.trigger)}}function zv(a){try{const s=JSON.parse(a);if(typeof s=="object"&&s!==null){const r=s.message??s.error?.message??s[0]?.error?.message;if(typeof r=="string"&&r.length>0)return r.length>200?r.slice(0,200)+"…":r}}catch{}const i=a.match(/\[.*?\]\s*(.+)/);if(i){const s=i[1];return s.length>200?s.slice(0,200)+"…":s}return a.length>200?a.slice(0,200)+"…":a}function yN(a){switch(a.status){case"queued":return"Waiting for execution slot.";case"running":return"Provider queries in progress.";case"completed":return"All key phrases checked.";case"partial":return"Run completed with some key phrases skipped.";case"failed":return a.error?zv(a.error):"Run failed.";default:return""}}function vN(a){switch(a.status){case"queued":return"Queued for execution";case"running":return"In progress";case"completed":return"Visibility sweep completed";case"partial":return"Partial completion";case"failed":return"Run failed";default:return a.status}}function Dv(a){if(a.length===0)return{score:0,citedCount:0,totalCount:0};const i=new Map;for(const d of a){const h=d.keyword??d.id;i.has(h)||i.set(h,!1),d.citationState==="cited"&&i.set(h,!0)}const s=i.size,r=[...i.values()].filter(Boolean).length;return{score:s>0?Math.round(r/s*100):0,citedCount:r,totalCount:s}}function bN(a){return a>=70?"positive":a>=40?"caution":"negative"}function xN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function Mv(a,i){if(a.length===0||i.length===0)return{label:"None",count:0};const s=new Set(i);let r=0;for(const d of a)d.competitorOverlap.some(h=>s.has(h))&&r++;const c=r/a.length;return c>=.5?{label:"High",count:r}:c>=.2?{label:"Moderate",count:r}:{label:"Low",count:r}}function SN(a,i,s,r){const c=[];let d=0;const h=new Set;if(s){const m=new Map;for(const g of s.snapshots)if(g.keyword){const j=`${g.keyword}::${g.provider}`;m.set(j,g)}const y=[...new Set(s.snapshots.map(g=>g.provider))].sort();y.length===0&&y.push("gemini");for(const g of i){if(g.runs.length===0)continue;h.add(g.keyword);const b=g.runs.at(-1)?.transition??"not-cited",x=b==="lost"?"lost":b==="emerging"?"emerging":b==="cited"?"cited":"not-cited";for(const k of y){const T=m.get(`${g.keyword}::${k}`);if(!T&&y.length>1)continue;const S=g.providerRuns?.[k],N=S&&S.length>0,H=N?S.at(-1).transition:b,G=H==="lost"?"lost":H==="emerging"?"emerging":T?T.citationState==="cited"?"cited":"not-cited":x,M=Cg(N?S:g.runs),U=(N?S:g.runs).map(Y=>({citationState:Y.citationState,createdAt:Y.createdAt}));c.push({id:`evidence_${a}_${d++}`,keyword:g.keyword,provider:T?.provider??k,citationState:G,changeLabel:jN(H,M),answerSnippet:T?.answerText??"",citedDomains:T?.citedDomains??[],evidenceUrls:[],competitorDomains:T?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:T?.groundingSources??[],summary:wN(G,g.keyword),runHistory:U})}}}for(const m of r)h.has(m.keyword)||c.push({id:`evidence_${a}_${d++}`,keyword:m.keyword,provider:"",citationState:"pending",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.keyword}" has been added but no visibility run has been triggered yet.`,runHistory:[]});return c}function Cg(a){if(a.length===0)return 0;const i=a[a.length-1].citationState;let s=0;for(let r=a.length-1;r>=0&&a[r].citationState===i;r--)s++;return s}function jN(a,i){switch(a){case"new":return"First observation";case"cited":return i<=1?"Cited in latest run":`Cited for ${i} runs`;case"lost":return"Lost since last run";case"emerging":return"First citation";case"not-cited":return i<=1?"Not cited in latest run":`Not cited across ${i} runs`;default:return a}}function wN(a,i){switch(a){case"cited":return`Your domain is cited in AI answers for "${i}".`;case"lost":return`Citation was lost for "${i}". Competitors may have gained ground.`;case"emerging":return`Your domain is starting to appear in answers for "${i}".`;case"not-cited":return`No citation detected for "${i}".`;case"pending":return`"${i}" has been added but no visibility run has been triggered yet.`}}function NN(a){const i=a.map(s=>s.citationState);return i.includes("cited")?"cited":i.includes("emerging")?"emerging":i.includes("lost")?"lost":i.includes("pending")?"pending":"not-cited"}function EN(a){const i=[],s=new Map;for(const m of a){const y=s.get(m.keyword)??[];s.set(m.keyword,[...y,m])}function r(m,y){return{keyword:m[0].keyword,evidenceId:m.find(g=>g.citationState===y)?.id??m[0].id,providers:m.map(g=>g.provider).filter(Boolean),citationState:y}}const c=[],d=[],h=[];for(const[,m]of s){const y=NN(m);y==="lost"?c.push(r(m,"lost")):y==="emerging"?d.push(r(m,"emerging")):y==="not-cited"&&h.push(r(m,"not-cited"))}return c.length>0&&i.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${c.length} key phrase${c.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:c}),d.length>0&&i.push({id:"insight_emerging",tone:"positive",title:`New citation on ${d.length} key phrase${d.length>1?"s":""}`,detail:"Your domain started appearing in AI answers.",actionLabel:"Emerging",affectedPhrases:d}),h.length>0&&i.push({id:"insight_gap",tone:"caution",title:`${h.length} key phrase${h.length>1?"s":""} not cited by any provider`,detail:"No citations detected across all providers.",actionLabel:"Gap",affectedPhrases:h}),i.length===0&&i.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),i}function AN(a){const i=a[0];if(!i)return{label:"Run Status",value:"None",delta:"No runs yet",tone:"neutral",description:"Trigger a visibility sweep to start tracking.",tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]};const s=i.status==="completed"?"Healthy":i.status==="running"?"Running":i.status==="queued"?"Queued":i.status==="partial"?"Partial":"Failed",r=i.status==="completed"?"positive":i.status==="failed"?"negative":i.status==="partial"?"caution":"neutral";return{label:"Run Status",value:s,delta:`${a.length} total runs`,tone:r,description:`Latest: ${_v(i.kind)} — ${i.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function CN(a){const i=Ov(a.project),s=SN(i.name,a.timeline,a.latestRunDetail,a.keywords),r=a.latestRunDetail?.snapshots??[],c=Dv(r),d=Mv(r,a.competitors.map(b=>b.domain)),h=EN(s),m=[...a.runs].sort((b,x)=>x.createdAt.localeCompare(b.createdAt)),y=m.map(b=>Ud(b,a.project.displayName||a.project.name)),g=new Map;for(const b of r){const x=b.provider||"gemini",k=g.get(x)??{cited:0,total:0};k.total++,b.citationState==="cited"&&k.cited++,g.set(x,k)}const j=[...g.entries()].sort(([b],[x])=>b.localeCompare(x)).map(([b,{cited:x,total:k}])=>({provider:b,score:k>0?Math.round(x/k*100):0,cited:x,total:k}));return{project:i,dateRangeLabel:"All time",contextLabel:`${i.country} / ${i.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:r.length>0?`${c.score}`:"No data",delta:r.length>0?`${c.citedCount} of ${c.totalCount} key phrases visible`:"Run a sweep first",tone:r.length>0?bN(c.score):"neutral",description:r.length>0?`${c.citedCount} of ${c.totalCount} tracked key phrases found your domain in at least one AI answer engine.`:"No visibility data yet. Trigger a run to start tracking.",tooltip:'Percentage of tracked key phrases where your domain is cited by at least one AI answer engine. A key phrase is "visible" if any configured provider includes your site in its response.',trend:[]},providerScores:j,readinessSummary:void 0,competitorPressure:{label:"Competitor Pressure",value:d.label,delta:d.count>0?`${d.count} overlapping citations`:"No overlap detected",tone:xN(d.label),description:a.competitors.length>0?`${a.competitors.length} competitor${a.competitors.length>1?"s":""} tracked.`:"No competitors configured.",tooltip:"How often competitor domains appear alongside yours in AI answers. High pressure means competitors are frequently cited for the same key phrases.",trend:[]},runStatus:AN(m),insights:h,visibilityEvidence:s,technicalFindings:void 0,competitors:a.competitors.map((b,x)=>{const k=new Set;for(const G of r)(G.competitorOverlap.includes(b.domain)||G.citedDomains.includes(b.domain))&&G.keyword&&k.add(G.keyword);const T=[...k],S=new Set(r.map(G=>G.keyword).filter(Boolean)),N=S.size>0?T.length/S.size:0,H=N>=.5?"High":N>=.2?"Moderate":T.length>0?"Low":"None";return{id:b.id||`comp_${x}`,domain:b.domain,citationCount:T.length,totalKeywords:S.size,pressureLabel:H,citedKeywords:T,movement:"",notes:""}}),recentRuns:y.slice(0,5)}}function kN(a){const i=Ov(a.project),s=a.latestRunDetail?.snapshots??[],r=Dv(s),c=Mv(s,a.competitors.map(y=>y.domain)),h=[...a.runs].sort((y,g)=>g.createdAt.localeCompare(y.createdAt))[0],m=h?Ud(h,a.project.displayName||a.project.name):{id:"none",projectId:a.project.id,projectName:a.project.displayName||a.project.name,kind:"answer-visibility",kindLabel:"No runs yet",status:"queued",trigger:"manual",createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""};return{project:i,visibilityScore:r.score,visibilityDelta:s.length>0?`${r.citedCount} of ${r.totalCount} key phrases`:"No data",readinessScore:void 0,readinessDelta:void 0,lastRun:m,insight:s.length>0?`${r.citedCount} of ${r.totalCount} key phrases visible across ${new Set(s.map(y=>y.provider)).size} provider${new Set(s.map(y=>y.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:c.label}}function TN(a,i){const s=[],r=[],c=[];for(const h of a){r.push(CN(h)),c.push(kN(h));const m=[...h.runs].sort((y,g)=>g.createdAt.localeCompare(y.createdAt));for(const y of m)s.push(Ud(y,h.project.displayName||h.project.name))}s.sort((h,m)=>m.createdAt.localeCompare(h.createdAt));const d=a.length>0;return{portfolioOverview:{projects:c,attentionItems:d?ON(r):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:s.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],lastUpdatedAt:new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),...d?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small key phrase set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:r,runs:s,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:d,ctaLabel:d?"Trigger run":"Create a project first",summary:d?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(i?.providers??[]).map(h=>({name:h.name,model:h.model,state:h.configured?"ready":"needs-config",detail:h.configured?"Provider is configured.":"API key is missing.",quota:h.quota})),selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Manage settings via ~/.canonry/config.yaml and restart the server."}}}function ON(a){const i=[];for(const s of a){const r=s.visibilityEvidence.filter(d=>d.citationState==="lost");r.length>0&&i.push({id:`attention_${s.project.id}_lost`,tone:"negative",title:`${s.project.displayName||s.project.name} lost citations`,detail:`${r.length} key phrase${r.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${s.project.id}`});const c=s.recentRuns.filter(d=>d.status==="running"||d.status==="queued");c.length>0&&i.push({id:`attention_${s.project.id}_active`,tone:"neutral",title:`${s.project.displayName||s.project.name} has active runs`,detail:`${c.length} run${c.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return i.length===0&&i.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag.",actionLabel:"View portfolio",href:"/"}),i}const kg=[{label:"Architecture",href:"https://github.com/AINYC/canonry/blob/main/docs/architecture.md"},{label:"Testing Guide",href:"https://github.com/AINYC/canonry/blob/main/docs/testing.md"}],_N=Qw(),Tg=a=>({label:a,state:"checking",detail:"Checking service health"}),zN={apiStatus:Tg("API"),workerStatus:Tg("Worker")};async function DN(a,i){try{const s=await fetch(a);if(!s.ok)return{label:i,state:"error",detail:`HTTP ${s.status}`};const r=await s.json(),c=typeof r.version=="string"?r.version:"unknown",d=typeof r.databaseUrlConfigured=="boolean"?r.databaseUrlConfigured:void 0,h=typeof r.lastHeartbeatAt=="string"?r.lastHeartbeatAt:void 0,m=[c,d===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:i,state:"ok",detail:m,version:c,databaseConfigured:d,lastHeartbeatAt:h}}catch(s){return{label:i,state:"error",detail:s instanceof Error?s.message:"unreachable"}}}function $i(a){if(!a)return"/";const i=a.split("?")[0]??"/";return i===""?"/":i.length>1&&i.endsWith("/")?i.slice(0,-1):i}function MN(a,i){const s=$i(a);if(s==="/")return{kind:"overview",path:"/"};if(s==="/runs")return{kind:"runs",path:"/runs"};if(s==="/settings")return{kind:"settings",path:"/settings"};if(s==="/setup")return{kind:"setup",path:"/setup"};if(s==="/projects")return{kind:"projects",path:"/projects"};if(s.startsWith("/projects/")){const r=s.slice(10);return Ev(i,r)?{kind:"project",path:s,projectId:r}:{kind:"not-found",path:s}}return{kind:"not-found",path:s}}function RN(a){return a?$i(a):typeof window<"u"?$i(window.location.pathname):"/"}function ec(a){return a.state==="ok"?"positive":a.state==="checking"?"neutral":"negative"}function Rv(a){switch(a){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function LN(a){switch(a){case"cited":return"positive";case"emerging":return"positive";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function UN(a){switch(a){case"high":return"negative";case"medium":return"caution";case"low":return"neutral"}}function BN(a){const i=a.match(/^(\[.*?\])\s*(.+)/);if(i){const s=i[1],r=i[2],c=r.indexOf("{");if(c>=0){const d=r.slice(0,c).trim(),h=r.slice(c);try{const m=JSON.parse(h);return`${s} ${d}
|
|
184
184
|
|
|
185
185
|
${JSON.stringify(m,null,2)}`}catch{}}return`${s}
|
|
186
|
-
${r}`}try{const s=JSON.parse(a);return JSON.stringify(s,null,2)}catch{return a}}function cl(a){return a.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function HN(a,i,s){return a.map(r=>{if(r.id==="api")return{...r,tone:ec(i.apiStatus),detail:i.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:i.apiStatus.detail};if(r.id==="worker")return{...r,tone:ec(i.workerStatus),detail:i.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:i.workerStatus.detail};const c=s.providerStatuses.filter(y=>y.state==="ready").length,d=s.providerStatuses.length,h=c>0,m=s.providerStatuses.filter(y=>y.state==="ready").map(y=>Bv[y.name]??y.name).join(" · ");return{...r,label:"Providers",tone:h?"positive":"caution",detail:`${c} of ${d} configured`,meta:m||"None configured"}})}function qN(a,i){if(a.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(a.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(a.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!i.providerStatuses.some(s=>s.state==="ready"))return"Launch is blocked until at least one provider is configured."}function YN(a,i,s){const r=qN(i,s),c=structuredClone(a);return c.healthChecks=c.healthChecks.map(d=>{if(d.id==="api")return{...d,detail:i.apiStatus.detail,state:i.apiStatus.state==="ok"?"ready":"attention"};if(d.id==="worker")return{...d,detail:i.workerStatus.detail,state:i.workerStatus.state==="ok"?"ready":"attention"};const h=s.providerStatuses.some(m=>m.state==="ready");return{...d,detail:h?"At least one provider configured.":"No providers configured.",state:h?"ready":"attention"}}),c.launchState.enabled=r===void 0,c.launchState.blockedReason=r,c.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",c}function Mt(a,i){return s=>{s.preventDefault(),s.stopPropagation(),a(i)}}function Yr(a,i){return i==="projects"?a.kind==="projects"||a.kind==="project":i==="project"?a.kind==="project":a.kind===i}function KN({points:a,tone:i}){const s=w.useId();if(a.length===0)return null;const r=42,c=132,d=5,h=Math.min(...a),y=Math.max(...a)-h||1,g=c-d*2,j=r-d*2,b=a.map((x,k)=>{const T=d+k/Math.max(a.length-1,1)*g,S=d+(1-(x-h)/y)*j;return`${T},${S}`}).join(" ");return u.jsxs("svg",{className:`sparkline sparkline-${i}`,viewBox:`0 0 ${c} ${r}`,"aria-hidden":"true",children:[u.jsx("defs",{children:u.jsx("clipPath",{id:s,children:u.jsx("rect",{x:d,y:d,width:g,height:j,rx:"8"})})}),u.jsx("line",{className:"sparkline-guide",x1:d,x2:c-d,y1:r-d,y2:r-d}),u.jsx("polyline",{clipPath:`url(#${s})`,points:b,vectorEffect:"non-scaling-stroke"})]})}function Lv({text:a}){return u.jsxs("span",{className:"info-tooltip-wrapper",children:[u.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[u.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),u.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:a})]})}function Js({value:a,label:i,delta:s,tone:r,description:c,tooltip:d,isNumeric:h=!0}){const g=2*Math.PI*48,j=Number.parseInt(a,10),b=h&&!Number.isNaN(j)?Math.min(j/100,1):.5,x=g*(1-b);return u.jsxs("div",{className:"score-gauge",children:[u.jsxs("div",{className:"gauge-ring-wrapper",children:[u.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[u.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),u.jsx("circle",{className:`gauge-fill gauge-fill-${r}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:g,strokeDashoffset:x,transform:"rotate(-90 60 60)"})]}),u.jsx("div",{className:"gauge-center",children:u.jsx("span",{className:h?"gauge-value":"gauge-value-text",children:a.split(" / ")[0]})})]}),u.jsxs("p",{className:"gauge-label",children:[i,d&&u.jsx(Lv,{text:d})]}),u.jsx("p",{className:"gauge-delta",children:s}),u.jsx("p",{className:"gauge-description",children:c})]})}function nt({tone:a,children:i}){const s=a==="positive"?"success":a==="caution"?"warning":a==="negative"?"destructive":"neutral";return u.jsx(Ry,{variant:s,children:i})}function gc({status:a}){return u.jsx(nt,{tone:Rv(a),children:cl(a)})}function tc({state:a}){return u.jsx(nt,{tone:LN(a),children:cl(a)})}function Uv({run:a,onOpen:i}){return u.jsxs("article",{className:"run-row",children:[u.jsxs("div",{className:"run-row-main",children:[u.jsxs("div",{className:"run-row-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:a.summary}),u.jsxs("p",{className:"run-row-subtitle",children:[a.projectName," · ",a.kindLabel]})]}),u.jsx(gc,{status:a.status})]}),u.jsx("p",{className:"run-row-detail",children:a.statusDetail})]}),u.jsxs("dl",{className:"run-row-meta",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:a.startedAt})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Duration"}),u.jsx("dd",{children:a.duration})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Trigger"}),u.jsx("dd",{children:a.triggerLabel})]})]}),u.jsx(de,{variant:"outline",size:"sm",type:"button",onClick:()=>i(a.id),children:"View run"})]})}function Xi({provider:a}){const i={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return u.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${i[a]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:a})}function GN({insights:a,onOpenEvidence:i}){const[s,r]=w.useState(null);return u.jsx("div",{className:"insight-list",children:a.map(c=>{const d=s===c.id,h=c.affectedPhrases.length>0;return u.jsxs("div",{children:[u.jsxs("div",{className:`insight-row insight-row-${c.tone} ${h?"cursor-pointer":""}`,onClick:h?()=>r(d?null:c.id):void 0,children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h&&u.jsx(fc,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${d?"rotate-90":""}`}),u.jsx(nt,{tone:c.tone,children:c.actionLabel}),u.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:c.title}),u.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:c.detail})]}),h&&u.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[c.affectedPhrases.length," phrase",c.affectedPhrases.length>1?"s":""]})]}),d&&u.jsx("div",{className:"divide-y divide-zinc-800/20",children:c.affectedPhrases.map(m=>u.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(tc,{state:m.citationState}),u.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),u.jsx("div",{className:"hidden sm:flex gap-1",children:m.providers.map(y=>u.jsx(Xi,{provider:y},y))})]}),u.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:y=>{y.stopPropagation(),i(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},c.id)})})}function Og({history:a,maxDots:i=12}){const s=a.slice(-i);if(s.length===0)return u.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const r={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-emerald-400 ring-1 ring-emerald-300/60"};return u.jsx("div",{className:"flex items-center gap-[3px]",title:`${s.length} runs`,children:s.map((c,d)=>u.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${r[c.citationState]??"bg-zinc-700"}`,title:`${c.citationState} — ${new Date(c.createdAt).toLocaleDateString()}`},d))})}function $N(a){const i=new Map;for(const r of a)for(const c of r.runHistory){const d=i.get(c.createdAt);d?d.push(c.citationState):i.set(c.createdAt,[c.citationState])}return[...i.entries()].sort(([r],[c])=>r.localeCompare(c)).map(([r,c])=>({createdAt:r,citationState:c.includes("cited")?"cited":c.includes("emerging")?"emerging":"not-cited"}))}function VN({evidence:a,onOpenEvidence:i}){const[s,r]=w.useState(new Set),c=w.useMemo(()=>{const h=new Map;for(const m of a){const y=h.get(m.keyword)??[];h.set(m.keyword,[...y,m])}return[...h.entries()].map(([m,y])=>({phrase:m,items:y}))},[a]),d=h=>{r(m=>{const y=new Set(m);return y.has(h)?y.delete(h):y.add(h),y})};return u.jsx("div",{className:"evidence-table-wrap",children:u.jsxs("table",{className:"evidence-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"2rem"}}),u.jsx("th",{children:"Key Phrase"}),u.jsx("th",{children:"Status"}),u.jsx("th",{children:"Citation History"}),u.jsx("th",{children:"Change"}),u.jsx("th",{})]})}),u.jsx("tbody",{children:c.map(({phrase:h,items:m})=>{const y=s.has(h),g=m.map(T=>T.citationState),j=g.includes("cited")?"cited":g.includes("emerging")?"emerging":g.includes("lost")?"lost":g.every(T=>T==="pending")?"pending":"not-cited",b=$N(m),x=m.filter(T=>T.citationState==="cited"||T.citationState==="emerging").length,k=(()=>{if(b.length===0)return"Awaiting first run";if(b.length===1)return"First observation";const T=b[b.length-1].citationState,S=b[b.length-2].citationState;if(S!=="cited"&&T==="cited")return"Newly cited";if(S==="cited"&&T!=="cited")return"Lost since last run";let N=0;for(let H=b.length-1;H>=0&&b[H].citationState===T;H--)N++;return T==="cited"?N<=1?"Cited in latest run":`Cited for ${N} runs`:N<=1?"Not cited in latest run":`Not cited across ${N} runs`})();return u.jsxs(w.Fragment,{children:[u.jsxs("tr",{className:"evidence-phrase-row cursor-pointer hover:bg-zinc-800/40",onClick:()=>d(h),"aria-expanded":y,children:[u.jsx("td",{children:u.jsx(fc,{size:14,className:`transition-transform duration-150 text-zinc-500 ${y?"rotate-90":""}`})}),u.jsx("td",{className:"evidence-keyword-cell",children:u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-zinc-100",children:h}),u.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:m.map(T=>u.jsx(Xi,{provider:T.provider},T.id))})]})}),u.jsx("td",{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(tc,{state:j}),u.jsxs("span",{className:"text-[11px] text-zinc-500",children:[x,"/",m.length]})]})}),u.jsx("td",{children:u.jsx(Og,{history:b})}),u.jsx("td",{className:"evidence-change-cell",children:k}),u.jsx("td",{})]}),y&&m.map(T=>u.jsxs("tr",{className:"bg-zinc-900/30",children:[u.jsx("td",{}),u.jsx("td",{className:"evidence-keyword-cell pl-5",children:u.jsx(Xi,{provider:T.provider})}),u.jsx("td",{children:u.jsx(tc,{state:T.citationState})}),u.jsx("td",{children:u.jsx(Og,{history:T.runHistory})}),u.jsx("td",{className:"evidence-change-cell",children:T.changeLabel}),u.jsx("td",{children:u.jsx(de,{variant:"ghost",size:"sm",type:"button",onClick:S=>{S.stopPropagation(),i(T.id)},children:"View"})})]},T.id))]},h)})})]})})}function QN({findings:a}){return u.jsx("div",{className:"findings-table-wrap",children:u.jsxs("table",{className:"findings-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Severity"}),u.jsx("th",{children:"Finding"}),u.jsx("th",{children:"Detail"}),u.jsx("th",{children:"Impact"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{children:u.jsx(nt,{tone:UN(i.severity),children:cl(i.severity)})}),u.jsx("td",{className:"font-medium text-zinc-100",children:i.title}),u.jsx("td",{className:"text-zinc-400",children:i.detail}),u.jsx("td",{className:"text-zinc-500",children:i.impact})]},i.id))})]})})}function XN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function ZN({competitors:a}){return a.length===0?u.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):u.jsx("div",{className:"competitor-table-wrap",children:u.jsxs("table",{className:"competitor-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Pressure"}),u.jsx("th",{children:"Citations"}),u.jsx("th",{children:"Key Phrases"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{className:"font-medium text-zinc-100",children:i.domain}),u.jsx("td",{children:u.jsx(nt,{tone:XN(i.pressureLabel),children:i.pressureLabel})}),u.jsx("td",{className:"text-zinc-300 tabular-nums",children:i.totalKeywords>0?`${i.citationCount} / ${i.totalKeywords}`:"—"}),u.jsx("td",{className:"text-zinc-500 text-xs",children:i.citedKeywords.length>0?i.citedKeywords.join(", "):"Not cited"})]},i.id))})]})})}function IN({project:a,onNavigate:i}){const s=`/projects/${a.project.id}`;return u.jsxs("a",{className:"project-row cursor-pointer",href:s,onClick:Mt(i,s),children:[u.jsxs("div",{className:"project-row-primary",children:[u.jsxs("div",{children:[u.jsx("p",{className:"project-name",children:a.project.name}),u.jsx("p",{className:"project-domain",children:a.project.canonicalDomain})]}),u.jsx("p",{className:"project-insight",children:a.insight})]}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),u.jsx("p",{className:"metric-inline-value",children:a.visibilityScore}),u.jsx("p",{className:"metric-inline-delta",children:a.visibilityDelta})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Technical Readiness"}),u.jsx("p",{className:"metric-inline-value text-zinc-500",children:a.readinessScore??"—"}),u.jsx("p",{className:"metric-inline-delta",children:a.readinessDelta??"Coming soon"})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),u.jsx("p",{className:"metric-inline-value",children:a.competitorPressureLabel}),u.jsxs("p",{className:"metric-inline-delta",children:[a.lastRun.kindLabel," · ",cl(a.lastRun.status)]})]})}),u.jsx("div",{className:"project-row-chart",children:u.jsx(KN,{points:a.trend,tone:Rv(a.lastRun.status)})}),u.jsx("span",{className:"project-row-link",children:u.jsx(fc,{className:"h-4 w-4 text-zinc-500"})})]})}function JN({model:a,systemHealth:i,onNavigate:s,onOpenRun:r}){return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Portfolio"}),u.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),u.jsx("div",{className:"page-header-right",children:u.jsx("p",{className:"text-[11px] text-zinc-600",children:a.lastUpdatedAt})})]}),a.projects.length>0?u.jsx("div",{className:"project-list project-list-scrollable",children:a.projects.map(c=>u.jsx(IN,{project:c,onNavigate:s},c.project.id))}):u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:a.emptyState?.title??"No projects yet"}),u.jsx("p",{children:a.emptyState?.detail}),u.jsx(de,{asChild:!0,children:u.jsx("a",{href:a.emptyState?.ctaHref??"/setup",onClick:Mt(s,a.emptyState?.ctaHref??"/setup"),children:a.emptyState?.ctaLabel??"Launch setup"})})]}),u.jsxs("div",{className:"overview-secondary-grid",children:[a.attentionItems.length>0&&u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),u.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),u.jsx("div",{className:"attention-list attention-list-scrollable",children:a.attentionItems.map(c=>u.jsxs("a",{className:`attention-item attention-item-${c.tone}`,href:c.href,onClick:Mt(s,c.href),children:[u.jsxs("div",{children:[u.jsx("p",{className:"attention-title",children:c.title}),u.jsx("p",{className:"attention-detail",children:c.detail})]}),u.jsx("span",{className:"attention-action",children:c.actionLabel})]},c.id))})]}),u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),u.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),u.jsx("div",{className:"compact-stack compact-stack-scrollable",children:a.recentRuns.length>0?a.recentRuns.map(c=>u.jsxs("button",{className:"compact-run",type:"button",onClick:()=>r(c.id),children:[u.jsxs("div",{children:[u.jsx("p",{className:"compact-run-title",children:c.projectName}),u.jsx("p",{className:"compact-run-detail",children:c.summary})]}),u.jsx(gc,{status:c.status})]},c.id)):u.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),u.jsxs("section",{className:"page-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),u.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),u.jsx("div",{className:"health-grid",children:i.map(c=>u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:c.label}),u.jsx("h3",{children:c.detail})]}),u.jsx(nt,{tone:c.tone,children:c.label})]}),u.jsx("p",{className:"supporting-copy",children:c.meta})]},c.id))})]})]})}function FN({projects:a,onNavigate:i,onProjectCreated:s}){const[r,c]=w.useState(!1),[d,h]=w.useState(""),[m,y]=w.useState(""),[g,j]=w.useState(""),[b,x]=w.useState("US"),[k,T]=w.useState("en"),[S,N]=w.useState(!1),[H,G]=w.useState(null),M=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),U=async()=>{if(!(!M||!g)){N(!0),G(null);try{const Y=await Cv(M,{displayName:m||d,canonicalDomain:g,country:b,language:k});s(),h(""),y(""),j(""),x("US"),T("en"),c(!1),i(`/projects/${Y.id}`)}catch(Y){G(Y instanceof Error?Y.message:"Failed to create project")}finally{N(!1)}}};return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Projects"}),u.jsxs("p",{className:"page-subtitle",children:[a.length," project",a.length!==1?"s":""," tracked"]})]}),u.jsx("div",{className:"page-header-right",children:u.jsxs(de,{type:"button",onClick:()=>c(Y=>!Y),children:[u.jsx(ag,{className:"size-4 mr-1.5"}),"Add project"]})})]}),r?u.jsxs(Ie,{className:"surface-card mb-6",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),u.jsxs("div",{className:"compact-stack mt-4",children:[u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),u.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:d,onChange:Y=>h(Y.target.value)}),M&&M!==d?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",M]}):null]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),u.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:Y=>y(Y.target.value)})]})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),u.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:g,onChange:Y=>j(Y.target.value)})]}),u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),u.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:b,onChange:Y=>x(Y.target.value.toUpperCase())})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),u.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:k,onChange:Y=>T(Y.target.value.toLowerCase())})]})]})]}),H?u.jsx("p",{className:"text-rose-400 text-sm mt-3",children:H}):null,u.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[u.jsx(de,{type:"button",disabled:!M||!g||S,onClick:U,children:S?"Creating...":"Create project"}),u.jsx(de,{type:"button",variant:"ghost",onClick:()=>c(!1),children:"Cancel"})]})]}):null,a.length>0?u.jsx("div",{className:"data-table-wrapper",children:u.jsxs("table",{className:"data-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Name"}),u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Visibility"}),u.jsx("th",{children:"Last run"}),u.jsx("th",{className:"text-right",children:"Country"})]})}),u.jsx("tbody",{children:a.map(Y=>{const X=`/projects/${Y.project.id}`,Z=Y.recentRuns[0];return u.jsxs("tr",{className:"cursor-pointer",onClick:()=>i(X),children:[u.jsxs("td",{children:[u.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:X,onClick:Mt(i,X),children:Y.project.displayName||Y.project.name}),u.jsx("p",{className:"text-[11px] text-zinc-500",children:Y.project.name})]}),u.jsx("td",{className:"text-zinc-400",children:Y.project.canonicalDomain}),u.jsx("td",{children:u.jsx(nt,{tone:Y.visibilitySummary.tone,children:Y.visibilitySummary.value})}),u.jsx("td",{className:"text-zinc-500 text-sm",children:Z?u.jsx(gc,{status:Z.status}):u.jsx("span",{className:"text-zinc-600",children:"No runs"})}),u.jsx("td",{className:"text-right text-zinc-500",children:Y.project.country})]},Y.project.id)})})]})}):r?null:u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),u.jsxs(de,{type:"button",onClick:()=>c(!0),children:[u.jsx(ag,{className:"size-4 mr-1.5"}),"Add project"]})]}),u.jsx(PN,{onApplied:s})]})}function PN({onApplied:a}){const[i,s]=w.useState(""),[r,c]=w.useState(!1),[d,h]=w.useState([]),[m,y]=w.useState([]),g=async()=>{if(!i.trim())return;c(!0),h([]),y([]);const j=NS(i),b=[],x=[];for(let k=0;k<j.length;k++){const T=j[k];if(T.errors.length>0){b.push(`Document ${k+1}: ${T.errors[0]?.message}`);continue}const S=T.toJSON();if(!(!S||typeof S!="object"))try{const N=await mN(S);x.push(`Applied "${N.displayName||N.name}" (revision ${N.configRevision})`)}catch(N){b.push(`Document ${k+1}: ${N instanceof Error?N.message:String(N)}`)}}h(x),y(b),c(!1),x.length>0&&a()};return u.jsxs("section",{className:"mt-8",children:[u.jsx("div",{className:"page-section-divider"}),u.jsx("div",{className:"section-head mt-6",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),u.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",u.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",u.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),u.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
186
|
+
${r}`}try{const s=JSON.parse(a);return JSON.stringify(s,null,2)}catch{return a}}function cl(a){return a.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function HN(a,i,s){return a.map(r=>{if(r.id==="api")return{...r,tone:ec(i.apiStatus),detail:i.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:i.apiStatus.detail};if(r.id==="worker")return{...r,tone:ec(i.workerStatus),detail:i.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:i.workerStatus.detail};const c=s.providerStatuses.filter(y=>y.state==="ready").length,d=s.providerStatuses.length,h=c>0,m=s.providerStatuses.filter(y=>y.state==="ready").map(y=>Bv[y.name]??y.name).join(" · ");return{...r,label:"Providers",tone:h?"positive":"caution",detail:`${c} of ${d} configured`,meta:m||"None configured"}})}function qN(a,i){if(a.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(a.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(a.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!i.providerStatuses.some(s=>s.state==="ready"))return"Launch is blocked until at least one provider is configured."}function YN(a,i,s){const r=qN(i,s),c=structuredClone(a);return c.healthChecks=c.healthChecks.map(d=>{if(d.id==="api")return{...d,detail:i.apiStatus.detail,state:i.apiStatus.state==="ok"?"ready":"attention"};if(d.id==="worker")return{...d,detail:i.workerStatus.detail,state:i.workerStatus.state==="ok"?"ready":"attention"};const h=s.providerStatuses.some(m=>m.state==="ready");return{...d,detail:h?"At least one provider configured.":"No providers configured.",state:h?"ready":"attention"}}),c.launchState.enabled=r===void 0,c.launchState.blockedReason=r,c.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",c}function Mt(a,i){return s=>{s.preventDefault(),s.stopPropagation(),a(i)}}function Yr(a,i){return i==="projects"?a.kind==="projects"||a.kind==="project":i==="project"?a.kind==="project":a.kind===i}function KN({points:a,tone:i}){const s=w.useId();if(a.length===0)return null;const r=42,c=132,d=5,h=Math.min(...a),y=Math.max(...a)-h||1,g=c-d*2,j=r-d*2,b=a.map((x,k)=>{const T=d+k/Math.max(a.length-1,1)*g,S=d+(1-(x-h)/y)*j;return`${T},${S}`}).join(" ");return u.jsxs("svg",{className:`sparkline sparkline-${i}`,viewBox:`0 0 ${c} ${r}`,"aria-hidden":"true",children:[u.jsx("defs",{children:u.jsx("clipPath",{id:s,children:u.jsx("rect",{x:d,y:d,width:g,height:j,rx:"8"})})}),u.jsx("line",{className:"sparkline-guide",x1:d,x2:c-d,y1:r-d,y2:r-d}),u.jsx("polyline",{clipPath:`url(#${s})`,points:b,vectorEffect:"non-scaling-stroke"})]})}function Lv({text:a}){return u.jsxs("span",{className:"info-tooltip-wrapper",children:[u.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[u.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),u.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:a})]})}function Js({value:a,label:i,delta:s,tone:r,description:c,tooltip:d,isNumeric:h=!0}){const g=2*Math.PI*48,j=Number.parseInt(a,10),b=h&&!Number.isNaN(j)?Math.min(j/100,1):.5,x=g*(1-b);return u.jsxs("div",{className:"score-gauge",children:[u.jsxs("div",{className:"gauge-ring-wrapper",children:[u.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[u.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),u.jsx("circle",{className:`gauge-fill gauge-fill-${r}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:g,strokeDashoffset:x,transform:"rotate(-90 60 60)"})]}),u.jsx("div",{className:"gauge-center",children:u.jsx("span",{className:h?"gauge-value":"gauge-value-text",children:a.split(" / ")[0]})})]}),u.jsxs("p",{className:"gauge-label",children:[i,d&&u.jsx(Lv,{text:d})]}),u.jsx("p",{className:"gauge-delta",children:s}),u.jsx("p",{className:"gauge-description",children:c})]})}function nt({tone:a,children:i}){const s=a==="positive"?"success":a==="caution"?"warning":a==="negative"?"destructive":"neutral";return u.jsx(Ry,{variant:s,children:i})}function gc({status:a}){return u.jsx(nt,{tone:Rv(a),children:cl(a)})}function tc({state:a}){return u.jsx(nt,{tone:LN(a),children:cl(a)})}function Uv({run:a,onOpen:i}){return u.jsxs("article",{className:"run-row",children:[u.jsxs("div",{className:"run-row-main",children:[u.jsxs("div",{className:"run-row-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:a.summary}),u.jsxs("p",{className:"run-row-subtitle",children:[a.projectName," · ",a.kindLabel]})]}),u.jsx(gc,{status:a.status})]}),u.jsx("p",{className:"run-row-detail",children:a.statusDetail})]}),u.jsxs("dl",{className:"run-row-meta",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:a.startedAt})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Duration"}),u.jsx("dd",{children:a.duration})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Trigger"}),u.jsx("dd",{children:a.triggerLabel})]})]}),u.jsx(de,{variant:"outline",size:"sm",type:"button",onClick:()=>i(a.id),children:"View run"})]})}function Xi({provider:a}){const i={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return u.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${i[a]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:a})}function GN({insights:a,onOpenEvidence:i}){const[s,r]=w.useState(null);return u.jsx("div",{className:"insight-list",children:a.map(c=>{const d=s===c.id,h=c.affectedPhrases.length>0;return u.jsxs("div",{children:[u.jsxs("div",{className:`insight-row insight-row-${c.tone} ${h?"cursor-pointer":""}`,onClick:h?()=>r(d?null:c.id):void 0,children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h&&u.jsx(fc,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${d?"rotate-90":""}`}),u.jsx(nt,{tone:c.tone,children:c.actionLabel}),u.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:c.title}),u.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:c.detail})]}),h&&u.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[c.affectedPhrases.length," phrase",c.affectedPhrases.length>1?"s":""]})]}),d&&u.jsx("div",{className:"divide-y divide-zinc-800/20",children:c.affectedPhrases.map(m=>u.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(tc,{state:m.citationState}),u.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),u.jsx("div",{className:"hidden sm:flex gap-1",children:m.providers.map(y=>u.jsx(Xi,{provider:y},y))})]}),u.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:y=>{y.stopPropagation(),i(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},c.id)})})}function Og({history:a,maxDots:i=12}){const s=a.slice(-i);if(s.length===0)return u.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const r={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-emerald-400 ring-1 ring-emerald-300/60"};return u.jsx("div",{className:"flex items-center gap-[3px]",title:`${s.length} runs`,children:s.map((c,d)=>u.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${r[c.citationState]??"bg-zinc-700"}`,title:`${c.citationState} — ${new Date(c.createdAt).toLocaleDateString()}`},d))})}function $N(a){const i=new Map;for(const r of a)for(const c of r.runHistory){const d=i.get(c.createdAt);d?d.push(c.citationState):i.set(c.createdAt,[c.citationState])}return[...i.entries()].sort(([r],[c])=>r.localeCompare(c)).map(([r,c])=>({createdAt:r,citationState:c.includes("cited")?"cited":c.includes("emerging")?"emerging":"not-cited"}))}function VN({evidence:a,onOpenEvidence:i}){const[s,r]=w.useState(new Set),c=w.useMemo(()=>{const h=new Map;for(const m of a){const y=h.get(m.keyword)??[];h.set(m.keyword,[...y,m])}return[...h.entries()].map(([m,y])=>({phrase:m,items:y}))},[a]),d=h=>{r(m=>{const y=new Set(m);return y.has(h)?y.delete(h):y.add(h),y})};return u.jsx("div",{className:"evidence-table-wrap",children:u.jsxs("table",{className:"evidence-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"2rem"}}),u.jsx("th",{children:"Key Phrase"}),u.jsx("th",{children:"Status"}),u.jsx("th",{children:"Citation History"}),u.jsx("th",{children:"Change"}),u.jsx("th",{})]})}),u.jsx("tbody",{children:c.map(({phrase:h,items:m})=>{const y=s.has(h),g=m.map(T=>T.citationState),j=g.includes("cited")?"cited":g.includes("emerging")?"emerging":g.includes("lost")?"lost":g.every(T=>T==="pending")?"pending":"not-cited",b=$N(m),x=m.filter(T=>T.citationState==="cited"||T.citationState==="emerging").length,k=(()=>{if(b.length===0)return"Awaiting first run";if(b.length===1)return"First observation";const T=b[b.length-1].citationState,S=b[b.length-2].citationState;if(S!=="cited"&&T==="cited")return"Newly cited";if(S==="cited"&&T!=="cited")return"Lost since last run";let N=0;for(let H=b.length-1;H>=0&&b[H].citationState===T;H--)N++;return T==="cited"?N<=1?"Cited in latest run":`Cited for ${N} runs`:N<=1?"Not cited in latest run":`Not cited across ${N} runs`})();return u.jsxs(w.Fragment,{children:[u.jsxs("tr",{className:"evidence-phrase-row cursor-pointer hover:bg-zinc-800/40",onClick:()=>d(h),"aria-expanded":y,children:[u.jsx("td",{children:u.jsx(fc,{size:14,className:`transition-transform duration-150 text-zinc-500 ${y?"rotate-90":""}`})}),u.jsx("td",{className:"evidence-keyword-cell",children:u.jsxs("div",{children:[u.jsx("span",{className:"font-medium text-zinc-100",children:h}),u.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:m.map(T=>u.jsx(Xi,{provider:T.provider},T.id))})]})}),u.jsx("td",{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(tc,{state:j}),u.jsxs("span",{className:"text-[11px] text-zinc-500",children:[x,"/",m.length]})]})}),u.jsx("td",{children:u.jsx(Og,{history:b})}),u.jsx("td",{className:"evidence-change-cell",children:k}),u.jsx("td",{})]}),y&&m.map(T=>u.jsxs("tr",{className:"bg-zinc-900/30",children:[u.jsx("td",{}),u.jsx("td",{className:"evidence-keyword-cell pl-5",children:u.jsx(Xi,{provider:T.provider})}),u.jsx("td",{children:u.jsx(tc,{state:T.citationState})}),u.jsx("td",{children:u.jsx(Og,{history:T.runHistory})}),u.jsx("td",{className:"evidence-change-cell",children:T.changeLabel}),u.jsx("td",{children:u.jsx(de,{variant:"ghost",size:"sm",type:"button",onClick:S=>{S.stopPropagation(),i(T.id)},children:"View"})})]},T.id))]},h)})})]})})}function QN({findings:a}){return u.jsx("div",{className:"findings-table-wrap",children:u.jsxs("table",{className:"findings-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Severity"}),u.jsx("th",{children:"Finding"}),u.jsx("th",{children:"Detail"}),u.jsx("th",{children:"Impact"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{children:u.jsx(nt,{tone:UN(i.severity),children:cl(i.severity)})}),u.jsx("td",{className:"font-medium text-zinc-100",children:i.title}),u.jsx("td",{className:"text-zinc-400",children:i.detail}),u.jsx("td",{className:"text-zinc-500",children:i.impact})]},i.id))})]})})}function XN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function ZN({competitors:a}){return a.length===0?u.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):u.jsx("div",{className:"competitor-table-wrap",children:u.jsxs("table",{className:"competitor-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Pressure"}),u.jsx("th",{children:"Citations"}),u.jsx("th",{children:"Key Phrases"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{className:"font-medium text-zinc-100",children:i.domain}),u.jsx("td",{children:u.jsx(nt,{tone:XN(i.pressureLabel),children:i.pressureLabel})}),u.jsx("td",{className:"text-zinc-300 tabular-nums",children:i.totalKeywords>0?`${i.citationCount} / ${i.totalKeywords}`:"—"}),u.jsx("td",{className:"text-zinc-500 text-xs",children:i.citedKeywords.length>0?i.citedKeywords.join(", "):"Not cited"})]},i.id))})]})})}function IN({project:a,onNavigate:i}){const s=`/projects/${a.project.id}`;return u.jsxs("a",{className:"project-row cursor-pointer",href:s,onClick:Mt(i,s),children:[u.jsxs("div",{className:"project-row-primary",children:[u.jsxs("div",{children:[u.jsx("p",{className:"project-name",children:a.project.name}),u.jsx("p",{className:"project-domain",children:a.project.canonicalDomain})]}),u.jsx("p",{className:"project-insight",children:a.insight})]}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),u.jsx("p",{className:"metric-inline-value",children:a.visibilityScore}),u.jsx("p",{className:"metric-inline-delta",children:a.visibilityDelta})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Technical Readiness"}),u.jsx("p",{className:"metric-inline-value text-zinc-500",children:a.readinessScore??"—"}),u.jsx("p",{className:"metric-inline-delta",children:a.readinessDelta??"Coming soon"})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),u.jsx("p",{className:"metric-inline-value",children:a.competitorPressureLabel}),u.jsxs("p",{className:"metric-inline-delta",children:[a.lastRun.kindLabel," · ",cl(a.lastRun.status)]})]})}),u.jsx("div",{className:"project-row-chart",children:u.jsx(KN,{points:a.trend,tone:Rv(a.lastRun.status)})}),u.jsx("span",{className:"project-row-link",children:u.jsx(fc,{className:"h-4 w-4 text-zinc-500"})})]})}function JN({model:a,systemHealth:i,onNavigate:s,onOpenRun:r}){return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Portfolio"}),u.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),u.jsx("div",{className:"page-header-right",children:u.jsx("p",{className:"text-[11px] text-zinc-600",children:a.lastUpdatedAt})})]}),a.projects.length>0?u.jsx("div",{className:"project-list project-list-scrollable",children:a.projects.map(c=>u.jsx(IN,{project:c,onNavigate:s},c.project.id))}):u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:a.emptyState?.title??"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:a.emptyState?.detail}),u.jsx(de,{size:"sm",asChild:!0,children:u.jsx("a",{href:a.emptyState?.ctaHref??"/setup",onClick:Mt(s,a.emptyState?.ctaHref??"/setup"),children:a.emptyState?.ctaLabel??"Launch setup"})})]}),u.jsxs("div",{className:"overview-secondary-grid",children:[a.attentionItems.length>0&&u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),u.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),u.jsx("div",{className:"attention-list attention-list-scrollable",children:a.attentionItems.map(c=>u.jsxs("a",{className:`attention-item attention-item-${c.tone}`,href:c.href,onClick:Mt(s,c.href),children:[u.jsxs("div",{children:[u.jsx("p",{className:"attention-title",children:c.title}),u.jsx("p",{className:"attention-detail",children:c.detail})]}),u.jsx("span",{className:"attention-action",children:c.actionLabel})]},c.id))})]}),u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),u.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),u.jsx("div",{className:"compact-stack compact-stack-scrollable",children:a.recentRuns.length>0?a.recentRuns.map(c=>u.jsxs("button",{className:"compact-run",type:"button",onClick:()=>r(c.id),children:[u.jsxs("div",{children:[u.jsx("p",{className:"compact-run-title",children:c.projectName}),u.jsx("p",{className:"compact-run-detail",children:c.summary})]}),u.jsx(gc,{status:c.status})]},c.id)):u.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),u.jsxs("section",{className:"page-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),u.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),u.jsx("div",{className:"health-grid",children:i.map(c=>u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:c.label}),u.jsx("h3",{children:c.detail})]}),u.jsx(nt,{tone:c.tone,children:c.label})]}),u.jsx("p",{className:"supporting-copy",children:c.meta})]},c.id))})]})]})}function FN({projects:a,onNavigate:i,onProjectCreated:s}){const[r,c]=w.useState(!1),[d,h]=w.useState(""),[m,y]=w.useState(""),[g,j]=w.useState(""),[b,x]=w.useState("US"),[k,T]=w.useState("en"),[S,N]=w.useState(!1),[H,G]=w.useState(null),M=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),U=async()=>{if(!(!M||!g)){N(!0),G(null);try{const Y=await Cv(M,{displayName:m||d,canonicalDomain:g,country:b,language:k});s(),h(""),y(""),j(""),x("US"),T("en"),c(!1),i(`/projects/${Y.id}`)}catch(Y){G(Y instanceof Error?Y.message:"Failed to create project")}finally{N(!1)}}};return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Projects"}),u.jsxs("p",{className:"page-subtitle",children:[a.length," project",a.length!==1?"s":""," tracked"]})]}),u.jsx("div",{className:"page-header-right",children:u.jsxs(de,{type:"button",onClick:()=>c(Y=>!Y),children:[u.jsx(ag,{className:"size-4 mr-1.5"}),"Add project"]})})]}),r?u.jsxs(Ie,{className:"surface-card mb-6",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),u.jsxs("div",{className:"compact-stack mt-4",children:[u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),u.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:d,onChange:Y=>h(Y.target.value)}),M&&M!==d?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",M]}):null]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),u.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:Y=>y(Y.target.value)})]})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),u.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:g,onChange:Y=>j(Y.target.value)})]}),u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),u.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:b,onChange:Y=>x(Y.target.value.toUpperCase())})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),u.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:k,onChange:Y=>T(Y.target.value.toLowerCase())})]})]})]}),H?u.jsx("p",{className:"text-rose-400 text-sm mt-3",children:H}):null,u.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[u.jsx(de,{type:"button",disabled:!M||!g||S,onClick:U,children:S?"Creating...":"Create project"}),u.jsx(de,{type:"button",variant:"ghost",onClick:()=>c(!1),children:"Cancel"})]})]}):null,a.length>0?u.jsx("div",{className:"data-table-wrapper",children:u.jsxs("table",{className:"data-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Name"}),u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Visibility"}),u.jsx("th",{children:"Last run"}),u.jsx("th",{className:"text-right",children:"Country"})]})}),u.jsx("tbody",{children:a.map(Y=>{const X=`/projects/${Y.project.id}`,Z=Y.recentRuns[0];return u.jsxs("tr",{className:"cursor-pointer",onClick:()=>i(X),children:[u.jsxs("td",{children:[u.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:X,onClick:Mt(i,X),children:Y.project.displayName||Y.project.name}),u.jsx("p",{className:"text-[11px] text-zinc-500",children:Y.project.name})]}),u.jsx("td",{className:"text-zinc-400",children:Y.project.canonicalDomain}),u.jsx("td",{children:u.jsx(nt,{tone:Y.visibilitySummary.tone,children:Y.visibilitySummary.value})}),u.jsx("td",{className:"text-zinc-500 text-sm",children:Z?u.jsx(gc,{status:Z.status}):u.jsx("span",{className:"text-zinc-600",children:"No runs"})}),u.jsx("td",{className:"text-right text-zinc-500",children:Y.project.country})]},Y.project.id)})})]})}):r?null:u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),u.jsxs(de,{type:"button",onClick:()=>c(!0),children:[u.jsx(ag,{className:"size-4 mr-1.5"}),"Add project"]})]}),u.jsx(PN,{onApplied:s})]})}function PN({onApplied:a}){const[i,s]=w.useState(""),[r,c]=w.useState(!1),[d,h]=w.useState([]),[m,y]=w.useState([]),g=async()=>{if(!i.trim())return;c(!0),h([]),y([]);const j=NS(i),b=[],x=[];for(let k=0;k<j.length;k++){const T=j[k];if(T.errors.length>0){b.push(`Document ${k+1}: ${T.errors[0]?.message}`);continue}const S=T.toJSON();if(!(!S||typeof S!="object"))try{const N=await mN(S);x.push(`Applied "${N.displayName||N.name}" (revision ${N.configRevision})`)}catch(N){b.push(`Document ${k+1}: ${N instanceof Error?N.message:String(N)}`)}}h(x),y(b),c(!1),x.length>0&&a()};return u.jsxs("section",{className:"mt-8",children:[u.jsx("div",{className:"page-section-divider"}),u.jsx("div",{className:"section-head mt-6",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),u.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",u.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",u.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),u.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
187
187
|
kind: Project
|
|
188
188
|
metadata:
|
|
189
189
|
name: my-project
|
package/assets/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
content="Canonry is the AINYC monitoring dashboard for answer visibility and technical readiness."
|
|
9
9
|
/>
|
|
10
10
|
<title>Canonry</title>
|
|
11
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/assets/index-BubLqs-I.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/assets/index-haBJWzyU.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The ultimate open-source AEO monitoring tool - track how answer engines cite your domain",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "FSL-1.1-ALv2",
|
|
7
7
|
"homepage": "https://ainyc.ai",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"@types/node-cron": "^3.0.11",
|
|
52
52
|
"tsup": "^8.5.1",
|
|
53
53
|
"tsx": "^4.19.0",
|
|
54
|
-
"@ainyc/canonry-contracts": "0.0.0",
|
|
55
54
|
"@ainyc/canonry-api-routes": "0.0.0",
|
|
55
|
+
"@ainyc/canonry-config": "0.0.0",
|
|
56
56
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
57
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
58
|
+
"@ainyc/canonry-db": "0.0.0",
|
|
57
59
|
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
58
|
-
"@ainyc/canonry-config": "0.0.0",
|
|
59
60
|
"@ainyc/canonry-provider-local": "0.0.0",
|
|
60
|
-
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
61
|
-
"@ainyc/canonry-db": "0.0.0"
|
|
61
|
+
"@ainyc/canonry-provider-openai": "0.0.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsup && tsx build-web.ts",
|