@redocly/config-rules-builder 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
- import { useEffect as N, useId as Dr, useMemo as Y, useRef as A, useState as I } from "react";
2
- import n, { css as Ne } from "styled-components";
3
- import { Oas3_1Types as Lr, YamlParseError as Or, createConfig as zr, getAstNodeByPointer as Br, lintFromString as Nr } from "@redocly/openapi-core";
4
- import { safeLoad as jr } from "yaml-ast-parser";
5
- import { dump as qr, load as Fr } from "js-yaml";
6
- import { Fragment as X, jsx as r, jsxs as d } from "react/jsx-runtime";
7
- import { defaultKeymap as _r, history as Kr, historyKeymap as Ur } from "@codemirror/commands";
8
- import { yaml as Wr } from "@codemirror/lang-yaml";
9
- import { defaultHighlightStyle as Hr, syntaxHighlighting as Gr } from "@codemirror/language";
10
- import { EditorState as Yr, RangeSet as je, StateEffect as qe, StateField as Fe } from "@codemirror/state";
11
- import { Decoration as z, EditorView as ie, GutterMarker as Vr, gutter as Jr, hoverTooltip as Qr, keymap as Xr, lineNumbers as Zr } from "@codemirror/view";
12
- var yr = "var(--font-family-base, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif)", D = "var(--font-family-monospaced, 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, Monaco, 'Courier New', monospace)", H = {
1
+ import { useEffect as D, useId as zr, useMemo as G, useRef as L, useState as M } from "react";
2
+ import n, { css as De } from "styled-components";
3
+ import { Oas3_1Types as Or, YamlParseError as Tr, createConfig as Nr, getAstNodeByPointer as Br, lintFromString as Dr } from "@redocly/openapi-core";
4
+ import { safeLoad as Kr } from "yaml-ast-parser";
5
+ import { dump as jr, load as Fr } from "js-yaml";
6
+ import { Fragment as Q, jsx as r, jsxs as p } from "react/jsx-runtime";
7
+ import { defaultKeymap as Wr, history as _r, historyKeymap as Hr } from "@codemirror/commands";
8
+ import { yaml as qr } from "@codemirror/lang-yaml";
9
+ import { defaultHighlightStyle as Ur, syntaxHighlighting as Yr } from "@codemirror/language";
10
+ import { EditorState as Gr, RangeSet as Ke, StateEffect as je, StateField as Fe } from "@codemirror/state";
11
+ import { Decoration as N, EditorView as ie, GutterMarker as Vr, gutter as Jr, hoverTooltip as Xr, keymap as Qr, lineNumbers as Zr } from "@codemirror/view";
12
+ var xr = "var(--font-family-base, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif)", z = "var(--font-family-monospaced, 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, Monaco, 'Courier New', monospace)", U = {
13
13
  subject: {
14
14
  fg: "#2563eb",
15
15
  line: "#c9dafb",
@@ -35,7 +35,7 @@ var yr = "var(--font-family-base, 'Inter', -apple-system, BlinkMacSystemFont, 'S
35
35
  line: "#bfe3ec",
36
36
  soft: "#e7f4f8"
37
37
  }
38
- }, be = {
38
+ }, ve = {
39
39
  bg: "var(--color-success-bg, #eaf7ef)",
40
40
  fg: "var(--color-success-text, #15803d)"
41
41
  }, F = {
@@ -51,896 +51,194 @@ var yr = "var(--font-family-base, 'Inter', -apple-system, BlinkMacSystemFont, 'S
51
51
  bg: "var(--color-warm-grey-1, #fbfbfc)",
52
52
  fg: "var(--text-color-secondary, #64748b)"
53
53
  }
54
- }, et = `openapi: 3.1.0
55
- info:
56
- title: Redocly Museum API
57
- description: Imaginary, but delightful Museum API for interacting with museum services and information. Built with love by Redocly.
58
- version: 1.2.1
59
- termsOfService: 'https://redocly.com/subscription-agreement/'
60
- contact:
61
- email: team@redocly.com
62
- url: "https://redocly.com/docs/cli/"
63
- license:
64
- name: MIT
65
- url: "https://opensource.org/license/mit/"
66
- servers:
67
- - url: "https://redocly.com/_mock/docs/openapi/museum-api"
68
- paths:
69
- /museum-hours:
70
- get:
71
- summary: Get museum hours
72
- description: Get upcoming museum operating hours.
73
- operationId: getMuseumHours
74
- tags:
75
- - Operations
76
- parameters:
77
- - $ref: "#/components/parameters/StartDate"
78
- - $ref: "#/components/parameters/PaginationPage"
79
- - $ref: "#/components/parameters/PaginationLimit"
80
- responses:
81
- "200":
82
- description: Success.
83
- content:
84
- application/json:
85
- schema:
86
- $ref: "#/components/schemas/MuseumHours"
87
- examples:
88
- default_example:
89
- $ref: "#/components/examples/GetMuseumHoursResponseExample"
90
- "400":
91
- $ref: '#/components/responses/BadRequest'
92
- "404":
93
- $ref: '#/components/responses/NotFound'
94
- /special-events:
95
- post:
96
- summary: Create special events
97
- description: Creates a new special event for the museum.
98
- operationId: createSpecialEvent
99
- tags:
100
- - Events
101
- requestBody:
102
- required: true
103
- content:
104
- application/json:
105
- schema:
106
- $ref: "#/components/schemas/SpecialEvent"
107
- examples:
108
- default_example:
109
- $ref: "#/components/examples/CreateSpecialEventRequestExample"
110
- responses:
111
- "201":
112
- description: Created.
113
- content:
114
- application/json:
115
- schema:
116
- $ref: "#/components/schemas/SpecialEvent"
117
- examples:
118
- default_example:
119
- $ref: "#/components/examples/CreateSpecialEventResponseExample"
120
- "400":
121
- $ref: '#/components/responses/BadRequest'
122
- "404":
123
- $ref: '#/components/responses/NotFound'
124
- get:
125
- summary: List special events
126
- description: Return a list of upcoming special events at the museum.
127
- operationId: listSpecialEvents
128
- tags:
129
- - Events
130
- parameters:
131
- - $ref: "#/components/parameters/StartDate"
132
- - $ref: "#/components/parameters/EndDate"
133
- - $ref: "#/components/parameters/PaginationPage"
134
- - $ref: "#/components/parameters/PaginationLimit"
135
- responses:
136
- "200":
137
- description: Success.
138
- content:
139
- application/json:
140
- schema:
141
- $ref: "#/components/schemas/SpecialEventCollection"
142
- examples:
143
- default_example:
144
- $ref: "#/components/examples/ListSpecialEventsResponseExample"
145
- "400":
146
- $ref: '#/components/responses/BadRequest'
147
- "404":
148
- $ref: '#/components/responses/NotFound'
149
- /special-events/{eventId}:
150
- get:
151
- summary: Get special event
152
- description: Get details about a special event.
153
- operationId: getSpecialEvent
154
- tags:
155
- - Events
156
- parameters:
157
- - $ref: "#/components/parameters/EventId"
158
- responses:
159
- "200":
160
- description: Success.
161
- content:
162
- application/json:
163
- schema:
164
- $ref: "#/components/schemas/SpecialEvent"
165
- examples:
166
- default_example:
167
- $ref: "#/components/examples/GetSpecialEventResponseExample"
168
- "400":
169
- $ref: '#/components/responses/BadRequest'
170
- "404":
171
- $ref: '#/components/responses/NotFound'
172
- patch:
173
- summary: Update special event
174
- description: Update the details of a special event.
175
- operationId: updateSpecialEvent
176
- tags:
177
- - Events
178
- parameters:
179
- - $ref: "#/components/parameters/EventId"
180
- requestBody:
181
- required: true
182
- content:
183
- application/json:
184
- schema:
185
- $ref: "#/components/schemas/SpecialEventFields"
186
- examples:
187
- default_example:
188
- $ref: "#/components/examples/UpdateSpecialEventRequestExample"
189
- responses:
190
- "200":
191
- description: Success.
192
- content:
193
- application/json:
194
- schema:
195
- $ref: "#/components/schemas/SpecialEvent"
196
- examples:
197
- default_example:
198
- $ref: "#/components/examples/UpdateSpecialEventResponseExample"
199
- "400":
200
- $ref: '#/components/responses/BadRequest'
201
- "404":
202
- $ref: '#/components/responses/NotFound'
203
- delete:
204
- summary: Delete special event
205
- description: Delete a special event from the collection. Allows museum to cancel planned events.
206
- operationId: deleteSpecialEvent
207
- tags:
208
- - Events
209
- parameters:
210
- - $ref: "#/components/parameters/EventId"
211
- responses:
212
- "204":
213
- description: Success - no content.
214
- "400":
215
- $ref: '#/components/responses/BadRequest'
216
- "401":
217
- $ref: '#/components/responses/Unauthorized'
218
- "404":
219
- $ref: '#/components/responses/NotFound'
220
- /tickets:
221
- post:
222
- summary: Buy museum tickets
223
- description: Purchase museum tickets for general entry or special events.
224
- operationId: buyMuseumTickets
225
- tags:
226
- - Tickets
227
- requestBody:
228
- required: true
229
- content:
230
- application/json:
231
- schema:
232
- $ref: "#/components/schemas/BuyMuseumTickets"
233
- examples:
234
- general_entry:
235
- $ref: "#/components/examples/BuyGeneralTicketsRequestExample"
236
- event_entry:
237
- $ref: "#/components/examples/BuyEventTicketsRequestExample"
238
- responses:
239
- "201":
240
- description: Created.
241
- content:
242
- application/json:
243
- schema:
244
- $ref: "#/components/schemas/MuseumTicketsConfirmation"
245
- examples:
246
- general_entry:
247
- $ref: "#/components/examples/BuyGeneralTicketsResponseExample"
248
- event_entry:
249
- $ref: "#/components/examples/BuyEventTicketsResponseExample"
250
- "400":
251
- $ref: '#/components/responses/BadRequest'
252
- "404":
253
- $ref: '#/components/responses/NotFound'
254
- /tickets/{ticketId}/qr:
255
- get:
256
- summary: Get ticket QR code
257
- description: Return an image of your ticket with scannable QR code. Used for event entry.
258
- operationId: getTicketCode
259
- tags:
260
- - Tickets
261
- parameters:
262
- - $ref: "#/components/parameters/TicketId"
263
- responses:
264
- "200":
265
- description: Scannable event ticket in image format.
266
- content:
267
- image/png:
268
- schema:
269
- $ref: "#/components/schemas/TicketCodeImage"
270
- "400":
271
- $ref: '#/components/responses/BadRequest'
272
- "404":
273
- $ref: '#/components/responses/NotFound'
274
- webhooks:
275
- publishNewEvent:
276
- post:
277
- summary: New special event added
278
- description: Publish details of a new or updated event.
279
- operationId: publishNewEvent
280
- tags:
281
- - Events
282
- requestBody:
283
- content:
284
- application/json:
285
- schema:
286
- $ref: "#/components/schemas/SpecialEvent"
287
- examples:
288
- default_example:
289
- $ref: "#/components/examples/GetSpecialEventResponseExample"
290
- responses:
291
- "202":
292
- description: Data accepted.
293
-
294
- components:
295
- schemas:
296
- TicketType:
297
- description: Type of ticket being purchased. Use \`general\` for regular museum entry and \`event\` for tickets to special events.
298
- type: string
299
- enum:
300
- - event
301
- - general
302
- example: event
303
- Date:
304
- type: string
305
- format: date
306
- example: '2023-10-29'
307
- Email:
308
- description: Email address for ticket purchaser.
309
- type: string
310
- format: email
311
- example: museum-lover@example.com
312
- BuyMuseumTickets:
313
- description: Data to purchase a ticket.
314
- type: object
315
- allOf:
316
- - type: object
317
- properties:
318
- email:
319
- $ref: "#/components/schemas/Email"
320
- - $ref: "#/components/schemas/Ticket"
321
- TicketMessage:
322
- description: Confirmation message after a ticket purchase.
323
- type: string
324
- example: Museum general entry ticket purchased
325
- TicketId:
326
- description: Unique identifier for museum ticket. Generated when purchased.
327
- type: string
328
- format: uuid
329
- example: a54a57ca-36f8-421b-a6b4-2e8f26858a4c
330
- TicketConfirmation:
331
- description: Unique confirmation code used to verify ticket purchase.
332
- type: string
333
- example: 'ticket-event-a98c8f-7eb12'
334
- Ticket:
335
- description: Ticket for museum entry, can be general admission or special event.
336
- type: object
337
- properties:
338
- ticketId:
339
- $ref: "#/components/schemas/TicketId"
340
- ticketDate:
341
- description: Date when this ticket can be used for museum entry.
342
- $ref: "#/components/schemas/Date"
343
- ticketType:
344
- $ref: "#/components/schemas/TicketType"
345
- eventId:
346
- description: Unique identifier for a special event. Required if purchasing tickets for the museum's special events.
347
- $ref: "#/components/schemas/EventId"
348
- required:
349
- - ticketType
350
- - ticketDate
351
- MuseumTicketsConfirmation:
352
- description: Details for a museum ticket after a successful purchase.
353
- allOf:
354
- - $ref: "#/components/schemas/Ticket"
355
- - type: object
356
- properties:
357
- message:
358
- $ref: "#/components/schemas/TicketMessage"
359
- confirmationCode:
360
- $ref: "#/components/schemas/TicketConfirmation"
361
- required:
362
- - message
363
- - confirmationCode
364
- TicketCodeImage:
365
- description: Image of a ticket with a QR code used for museum or event entry.
366
- type: string
367
- format: binary
368
- MuseumHours:
369
- description: List of museum operating hours for a date range.
370
- type: array
371
- items:
372
- $ref: "#/components/schemas/MuseumDailyHours"
373
- MuseumDailyHours:
374
- description: Daily operating hours for the museum.
375
- type: object
376
- properties:
377
- date:
378
- description: Date the operating hours apply to.
379
- $ref: "#/components/schemas/Date"
380
- example: '2024-12-31'
381
- timeOpen:
382
- type: string
383
- pattern: '^([01]\\d|2[0-3]):?([0-5]\\d)$'
384
- description: Time the museum opens on a specific date. Uses 24 hour time format (\`HH:mm\`).
385
- example: 09:00
386
- timeClose:
387
- description: Time the museum closes on a specific date. Uses 24 hour time format (\`HH:mm\`).
388
- type: string
389
- pattern: '^([01]\\d|2[0-3]):?([0-5]\\d)$'
390
- example: 18:00
391
- required:
392
- - date
393
- - timeOpen
394
- - timeClose
395
- EventId:
396
- description: Identifier for a special event.
397
- type: string
398
- format: uuid
399
- example: 3be6453c-03eb-4357-ae5a-984a0e574a54
400
- EventName:
401
- type: string
402
- description: Name of the special event.
403
- example: Pirate Coding Workshop
404
- EventLocation:
405
- type: string
406
- description: Location where the special event is held.
407
- example: Computer Room
408
- EventDescription:
409
- type: string
410
- description: Description of the special event.
411
- example: Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).
412
- EventDates:
413
- type: array
414
- items:
415
- $ref: "#/components/schemas/Date"
416
- description: List of planned dates for the special event.
417
- EventPrice:
418
- description: Price of a ticket for the special event.
419
- type: number
420
- format: float
421
- example: 25
422
- SpecialEventFields:
423
- type: object
424
- properties:
425
- name:
426
- $ref: "#/components/schemas/EventName"
427
- location:
428
- $ref: "#/components/schemas/EventLocation"
429
- eventDescription:
430
- $ref: "#/components/schemas/EventDescription"
431
- dates:
432
- $ref: "#/components/schemas/EventDates"
433
- price:
434
- $ref: "#/components/schemas/EventPrice"
435
- SpecialEvent:
436
- type: object
437
- properties:
438
- eventId:
439
- $ref: "#/components/schemas/EventId"
440
- name:
441
- $ref: "#/components/schemas/EventName"
442
- location:
443
- $ref: "#/components/schemas/EventLocation"
444
- eventDescription:
445
- $ref: "#/components/schemas/EventDescription"
446
- dates:
447
- $ref: "#/components/schemas/EventDates"
448
- price:
449
- $ref: "#/components/schemas/EventPrice"
450
- required:
451
- - name
452
- - location
453
- - eventDescription
454
- - dates
455
- - price
456
- SpecialEventCollection:
457
- description: List of upcoming special events.
458
- type: array
459
- items:
460
- $ref: "#/components/schemas/SpecialEvent"
461
- Error:
462
- type: object
463
- properties:
464
- type:
465
- type: string
466
- example: object
467
- title:
468
- type: string
469
- example: Validation failed
470
-
471
- securitySchemes:
472
- MuseumPlaceholderAuth:
473
- type: http
474
- scheme: basic
475
- examples:
476
- BuyGeneralTicketsRequestExample:
477
- summary: General entry ticket
478
- value:
479
- ticketType: general
480
- ticketDate: '2023-09-07'
481
- email: todd@example.com
482
- BuyEventTicketsRequestExample:
483
- summary: Special event ticket
484
- value:
485
- ticketType: event
486
- eventId: dad4bce8-f5cb-4078-a211-995864315e39
487
- ticketDate: '2023-09-05'
488
- email: todd@example.com
489
- BuyGeneralTicketsResponseExample:
490
- summary: General entry ticket
491
- value:
492
- message: Museum general entry ticket purchased
493
- ticketId: 382c0820-0530-4f4b-99af-13811ad0f17a
494
- ticketType: general
495
- ticketDate: '2023-09-07'
496
- confirmationCode: ticket-general-e5e5c6-dce78
497
- BuyEventTicketsResponseExample:
498
- summary: Special event ticket
499
- value:
500
- message: Museum special event ticket purchased
501
- ticketId: b811f723-17b2-44f7-8952-24b03e43d8a9
502
- eventName: Mermaid Treasure Identification and Analysis
503
- ticketType: event
504
- ticketDate: '2023-09-05'
505
- confirmationCode: ticket-event-9c55eg-8v82a
506
- CreateSpecialEventRequestExample:
507
- summary: Create special event
508
- value:
509
- name: Mermaid Treasure Identification and Analysis
510
- location: Under the seaaa 🦀 🎶 🌊.
511
- eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.
512
- dates:
513
- - '2023-09-05'
514
- - '2023-09-08'
515
- price: 0
516
- CreateSpecialEventResponseExample:
517
- summary: Special event created
518
- value:
519
- eventId: dad4bce8-f5cb-4078-a211-995864315e39
520
- name: Mermaid Treasure Identification and Analysis
521
- location: Under the seaaa 🦀 🎶 🌊.
522
- eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.
523
- dates:
524
- - '2023-09-05'
525
- - '2023-09-08'
526
- price: 30
527
- GetSpecialEventResponseExample:
528
- summary: Get special event
529
- value:
530
- eventId: 6744a0da-4121-49cd-8479-f8cc20526495
531
- name: Time Traveler Tea Party
532
- location: Temporal Tearoom
533
- eventDescription: Sip tea with important historical figures.
534
- dates:
535
- - '2023-11-18'
536
- - '2023-11-25'
537
- - '2023-12-02'
538
- price: 60
539
- ListSpecialEventsResponseExample:
540
- summary: List of special events
541
- value:
542
- - eventId: f3e0e76e-e4a8-466e-ab9c-ae36c15b8e97
543
- name: Sasquatch Ballet
544
- location: Seattle... probably
545
- eventDescription: They're big, they're hairy, but they're also graceful. Come learn how the biggest feet can have the lightest touch.
546
- dates:
547
- - '2023-12-15'
548
- - '2023-12-22'
549
- price: 40
550
- - eventId: 2f14374a-9c65-4ee5-94b7-fba66d893483
551
- name: Solar Telescope Demonstration
552
- location: Far from the sun.
553
- eventDescription: Look at the sun without going blind!
554
- dates:
555
- - '2023-09-07'
556
- - '2023-09-14'
557
- price: 50
558
- - eventId: 6aaa61ba-b2aa-4868-b803-603dbbf7bfdb
559
- name: Cook like a Caveman
560
- location: Fire Pit on East side
561
- eventDescription: Learn to cook on an open flame.
562
- dates:
563
- - '2023-11-10'
564
- - '2023-11-17'
565
- - '2023-11-24'
566
- price: 5
567
- - eventId: 602b75e1-5696-4ab8-8c7a-f9e13580f910
568
- name: Underwater Basket Weaving
569
- location: Rec Center Pool next door.
570
- eventDescription: Learn to weave baskets underwater.
571
- dates:
572
- - '2023-09-12'
573
- - '2023-09-15'
574
- price: 15
575
- - eventId: dad4bce8-f5cb-4078-a211-995864315e39
576
- name: Mermaid Treasure Identification and Analysis
577
- location: Room Sea-12
578
- eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits — kindly donated by Ariel.
579
- dates:
580
- - '2023-09-05'
581
- - '2023-09-08'
582
- price: 30
583
- - eventId: 6744a0da-4121-49cd-8479-f8cc20526495
584
- name: Time Traveler Tea Party
585
- location: Temporal Tearoom
586
- eventDescription: Sip tea with important historical figures.
587
- dates:
588
- - '2023-11-18'
589
- - '2023-11-25'
590
- - '2023-12-02'
591
- price: 60
592
- - eventId: 3be6453c-03eb-4357-ae5a-984a0e574a54
593
- name: Pirate Coding Workshop
594
- location: Computer Room
595
- eventDescription: Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).
596
- dates:
597
- - '2023-10-29'
598
- - '2023-10-30'
599
- - '2023-10-31'
600
- price: 45
601
- - eventId: 9d90d29a-2af5-4206-97d9-9ea9ceadcb78
602
- name: Llama Street Art Through the Ages
603
- location: Auditorium
604
- eventDescription: Llama street art?! Alpaca my bags -- let's go!
605
- dates:
606
- - '2023-10-29'
607
- - '2023-10-30'
608
- - '2023-10-31'
609
- price: 45
610
- - eventId: a3c7b2c4-b5fb-4ef7-9322-00a919864957
611
- name: The Great Parrot Debate
612
- location: Outdoor Amphitheatre
613
- eventDescription: See leading parrot minds discuss important geopolitical issues.
614
- dates:
615
- - '2023-11-03'
616
- - '2023-11-10'
617
- price: 35
618
- - eventId: b92d46b7-4c5d-422b-87a5-287767e26f29
619
- name: Eat a Bunch of Corn
620
- location: Cafeteria
621
- eventDescription: We accidentally bought too much corn. Please come eat it.
622
- dates:
623
- - '2023-11-10'
624
- - '2023-11-17'
625
- - '2023-11-24'
626
- price: 5
627
- UpdateSpecialEventRequestExample:
628
- summary: Update special event request
629
- value:
630
- location: On the beach.
631
- price: 15
632
- UpdateSpecialEventResponseExample:
633
- summary: Update special event
634
- value:
635
- eventId: dad4bce8-f5cb-4078-a211-995864315e39
636
- name: Mermaid Treasure Identification and Analysis
637
- location: On the beach.
638
- eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.
639
- dates:
640
- - '2023-09-05'
641
- - '2023-09-08'
642
- price: 15
643
- GetMuseumHoursResponseExample:
644
- summary: Get hours response
645
- value:
646
- - date: "2023-09-11"
647
- timeOpen: "09:00"
648
- timeClose: "18:00"
649
- - date: "2023-09-12"
650
- timeOpen: "09:00"
651
- timeClose: "18:00"
652
- - date: "2023-09-13"
653
- timeOpen: "09:00"
654
- timeClose: "18:00"
655
- - date: "2023-09-14"
656
- timeOpen: "09:00"
657
- timeClose: "18:00"
658
- - date: "2023-09-15"
659
- timeOpen: "10:00"
660
- timeClose: "16:00"
661
- - date: "2023-09-18"
662
- timeOpen: "09:00"
663
- timeClose: "18:00"
664
- - date: "2023-09-19"
665
- timeOpen: "09:00"
666
- timeClose: "18:00"
667
- - date: "2023-09-20"
668
- timeOpen: "09:00"
669
- timeClose: "18:00"
670
- - date: "2023-09-21"
671
- timeOpen: "09:00"
672
- timeClose: "18:00"
673
- - date: "2023-09-22"
674
- timeOpen: "10:00"
675
- timeClose: "16:00"
676
- parameters:
677
- PaginationPage:
678
- name: page
679
- in: query
680
- description: Page number to retrieve.
681
- schema:
682
- type: integer
683
- default: 1
684
- example: 2
685
- PaginationLimit:
686
- name: limit
687
- in: query
688
- description: Number of days per page.
689
- schema:
690
- type: integer
691
- default: 10
692
- maximum: 30
693
- example: 15
694
- EventId:
695
- name: eventId
696
- in: path
697
- description: Identifier for a special event.
698
- required: true
699
- schema:
700
- type: string
701
- format: uuid
702
- example: dad4bce8-f5cb-4078-a211-995864315e39
703
- StartDate:
704
- name: startDate
705
- in: query
706
- description: Starting date to retrieve future operating hours from. Defaults to today's date.
707
- schema:
708
- type: string
709
- format: date
710
- example: '2023-02-23'
711
- EndDate:
712
- name: endDate
713
- in: query
714
- description: End of a date range to retrieve special events for. Defaults to 7 days after \`startDate\`.
715
- schema:
716
- type: string
717
- format: date
718
- example: '2023-04-18'
719
- TicketId:
720
- name: ticketId
721
- in: path
722
- description: Identifier for a ticket to a museum event. Used to generate ticket image.
723
- required: true
724
- schema:
725
- type: string
726
- format: uuid
727
- example: a54a57ca-36f8-421b-a6b4-2e8f26858a4c
728
- responses:
729
- BadRequest:
730
- description: Bad request.
731
- content:
732
- application/problem+json:
733
- schema:
734
- $ref: '#/components/schemas/Error'
735
- NotFound:
736
- description: Not found.
737
- content:
738
- application/problem+json:
739
- schema:
740
- $ref: '#/components/schemas/Error'
741
- Unauthorized:
742
- description: Unauthorized.
743
- content:
744
- application/problem+json:
745
- schema:
746
- $ref: '#/components/schemas/Error'
747
- tags:
748
- - name: Operations
749
- description: Operational information about the museum.
750
- - name: Events
751
- description: Special events hosted by the museum.
752
- - name: Tickets
753
- description: Museum tickets for general entrance or special events.
754
- security:
755
- - MuseumPlaceholderAuth: []
756
- `;
757
- function xr(e) {
54
+ };
55
+ function yr(e) {
758
56
  return {
759
- subject: _e(e.subject),
57
+ subject: We(e.subject),
760
58
  assertions: e.assertions ?? {},
761
- ...Te(e.where) ? { where: Te(e.where) } : {},
59
+ ...Ie(e.where) ? { where: Ie(e.where) } : {},
762
60
  ...e.message ? { message: e.message } : {},
763
61
  ...e.suggest?.length ? { suggest: e.suggest } : {},
764
62
  ...e.reference ? { reference: e.reference } : {},
765
63
  ...e.severity && e.severity !== "error" ? { severity: e.severity } : {}
766
64
  };
767
65
  }
768
- function Te(e) {
66
+ function Ie(e) {
769
67
  if (!e?.length) return;
770
- const t = e.filter((o) => o.subject?.type).map((o) => ({
771
- subject: _e(o.subject),
772
- assertions: o.assertions ?? {}
68
+ const o = e.filter((t) => t.subject?.type).map((t) => ({
69
+ subject: We(t.subject),
70
+ assertions: t.assertions ?? {}
773
71
  }));
774
- return t.length ? t : void 0;
72
+ return o.length ? o : void 0;
775
73
  }
776
- function _e(e) {
777
- const t = Array.isArray(e.property) ? e.property.filter(Boolean) : e.property;
74
+ function We(e) {
75
+ const o = Array.isArray(e.property) ? e.property.filter(Boolean) : e.property;
778
76
  return {
779
77
  type: e.type,
780
- ...t && (!Array.isArray(t) || t.length) ? { property: Array.isArray(t) && t.length === 1 ? t[0] : t } : {},
78
+ ...o && (!Array.isArray(o) || o.length) ? { property: Array.isArray(o) && o.length === 1 ? o[0] : o } : {},
781
79
  ...e.filterInParentKeys?.length ? { filterInParentKeys: e.filterInParentKeys } : {},
782
80
  ...e.filterOutParentKeys?.length ? { filterOutParentKeys: e.filterOutParentKeys } : {},
783
81
  ...e.matchParentKeys ? { matchParentKeys: e.matchParentKeys } : {}
784
82
  };
785
83
  }
786
- function kr(e, t) {
787
- return `rule/${(e || `untitled-${t + 1}`).trim().replace(/\s+/g, "-")}`;
84
+ function wr(e, o) {
85
+ return `rule/${(e || `untitled-${o + 1}`).trim().replace(/\s+/g, "-")}`;
788
86
  }
789
- var Ve = "rules-builder", Je = "rule/rules-builder-match-", Qe = Promise.resolve();
790
- function rt(e) {
791
- const t = Qe.then(e, e);
792
- return Qe = t.catch(() => {
793
- }), t;
87
+ var Ve = "rules-builder", Je = "rule/rules-builder-match-", Xe = Promise.resolve();
88
+ function eo(e) {
89
+ const o = Xe.then(e, e);
90
+ return Xe = o.catch(() => {
91
+ }), o;
794
92
  }
795
- function tt(e, t, o = "openapi.yaml") {
796
- return rt(async () => {
797
- const i = t.map((l, p) => ({
798
- named: l,
799
- index: p
800
- })), a = await Xe(e, i, o);
93
+ function ro(e, o, t = "openapi.yaml") {
94
+ return eo(async () => {
95
+ const i = o.map((s, d) => ({
96
+ named: s,
97
+ index: d
98
+ })), a = await Qe(e, i, t);
801
99
  if (a.error === void 0) return {
802
100
  matches: a.matches,
803
101
  problems: a.problems,
804
102
  ruleErrors: a.ruleErrors
805
103
  };
806
104
  const c = Ze(a.error);
807
- if (a.error instanceof Or || ot(c)) return {
105
+ if (a.error instanceof Tr || oo(c)) return {
808
106
  matches: [],
809
107
  problems: [],
810
108
  ruleErrors: [],
811
109
  specError: c
812
110
  };
813
- const s = {
111
+ const l = {
814
112
  matches: [],
815
113
  problems: [],
816
114
  ruleErrors: []
817
115
  };
818
- for (const l of i) {
819
- const p = await Xe(e, [l], o);
820
- if (p.error !== void 0) {
821
- s.ruleErrors.push(`rule/${l.named.name}: ${Ze(p.error)}`);
116
+ for (const s of i) {
117
+ const d = await Qe(e, [s], t);
118
+ if (d.error !== void 0) {
119
+ l.ruleErrors.push(`rule/${s.named.name}: ${Ze(d.error)}`);
822
120
  continue;
823
121
  }
824
- s.matches.push(...p.matches), s.problems.push(...p.problems), s.ruleErrors.push(...p.ruleErrors);
122
+ l.matches.push(...d.matches), l.problems.push(...d.problems), l.ruleErrors.push(...d.ruleErrors);
825
123
  }
826
- return s;
124
+ return l;
827
125
  });
828
126
  }
829
- async function Xe(e, t, o) {
127
+ async function Qe(e, o, t) {
830
128
  const i = /* @__PURE__ */ new Map(), a = {
831
129
  matches: [],
832
130
  problems: [],
833
131
  ruleErrors: []
834
- }, c = (p, f, m) => {
835
- const h = m, { ruleIndex: y } = f, u = h.location?.pointer;
836
- if (u === void 0) return [];
837
- const g = `${y}:${u}`;
838
- let x = i.get(g);
839
- x || (x = {
840
- ruleIndex: y,
841
- pointer: u,
842
- nodeType: h.type?.name ?? "",
843
- key: String(h.key ?? ""),
132
+ }, c = (d, u, h) => {
133
+ const g = h, { ruleIndex: x } = u, f = g.location?.pointer;
134
+ if (f === void 0) return [];
135
+ const b = `${x}:${f}`;
136
+ let y = i.get(b);
137
+ y || (y = {
138
+ ruleIndex: x,
139
+ pointer: f,
140
+ nodeType: g.type?.name ?? "",
141
+ key: String(g.key ?? ""),
844
142
  propertyPointers: []
845
- }, i.set(g, x));
846
- const C = h.baseLocation?.pointer;
847
- return C && C !== u && x.propertyPointers.push(C), [];
848
- }, s = {}, l = /* @__PURE__ */ new Map();
849
- for (const { named: p, index: f } of t) {
850
- const m = p.rule;
851
- if (m.subject?.type) {
852
- if (m.severity !== "off") {
853
- let h = kr(p.name, f);
854
- for (; l.has(h); ) h += "-dup";
855
- l.set(h, f), s[h] = xr(m);
143
+ }, i.set(b, y));
144
+ const R = g.baseLocation?.pointer;
145
+ return R && R !== f && y.propertyPointers.push(R), [];
146
+ }, l = {}, s = /* @__PURE__ */ new Map();
147
+ for (const { named: d, index: u } of o) {
148
+ const h = d.rule;
149
+ if (h.subject?.type) {
150
+ if (h.severity !== "off") {
151
+ let g = wr(d.name, u);
152
+ for (; s.has(g); ) g += "-dup";
153
+ s.set(g, u), l[g] = yr(h);
856
154
  }
857
- s[`${Je}${f}`] = {
858
- subject: _e(m.subject),
859
- where: Te(m.where),
860
- assertions: { [`${Ve}/collect`]: { ruleIndex: f } }
155
+ l[`${Je}${u}`] = {
156
+ subject: We(h.subject),
157
+ where: Ie(h.where),
158
+ assertions: { [`${Ve}/collect`]: { ruleIndex: u } }
861
159
  };
862
160
  }
863
161
  }
864
162
  try {
865
- const p = await zr({
163
+ const d = await Nr({
866
164
  extends: [],
867
165
  plugins: [{
868
166
  id: Ve,
869
167
  assertions: { collect: c }
870
168
  }],
871
- rules: s
872
- }), f = await Nr({
169
+ rules: l
170
+ }), u = await Dr({
873
171
  source: e,
874
- absoluteRef: `/${o}`,
875
- config: p
172
+ absoluteRef: `/${t}`,
173
+ config: d
876
174
  });
877
- for (const m of f) {
878
- const h = l.get(m.ruleId);
879
- if (h === void 0) {
880
- if (m.ruleId.startsWith(Je)) continue;
881
- a.ruleErrors.push(m.message);
175
+ for (const h of u) {
176
+ const g = s.get(h.ruleId);
177
+ if (g === void 0) {
178
+ if (h.ruleId.startsWith(Je)) continue;
179
+ a.ruleErrors.push(h.message);
882
180
  continue;
883
181
  }
884
- const y = m.location?.[0];
182
+ const x = h.location?.[0];
885
183
  a.problems.push({
886
- ruleIndex: h,
887
- ruleId: m.ruleId,
888
- severity: m.severity === "warn" ? "warn" : "error",
889
- message: m.message,
890
- suggest: m.suggest ?? [],
891
- pointer: y && "pointer" in y && y.pointer || "#/",
892
- reportOnKey: !!y?.reportOnKey
184
+ ruleIndex: g,
185
+ ruleId: h.ruleId,
186
+ severity: h.severity === "warn" ? "warn" : "error",
187
+ message: h.message,
188
+ suggest: h.suggest ?? [],
189
+ pointer: x && "pointer" in x && x.pointer || "#/",
190
+ reportOnKey: !!x?.reportOnKey
893
191
  });
894
192
  }
895
- } catch (p) {
896
- a.error = p ?? /* @__PURE__ */ new Error("Unknown lint error");
193
+ } catch (d) {
194
+ a.error = d ?? /* @__PURE__ */ new Error("Unknown lint error");
897
195
  }
898
196
  return a.matches = Array.from(i.values()), a;
899
197
  }
900
198
  function Ze(e) {
901
199
  return e instanceof Error ? e.message : String(e);
902
200
  }
903
- function ot(e) {
201
+ function oo(e) {
904
202
  return /parse|unsupported|version|document/i.test(e);
905
203
  }
906
204
  function er(e) {
907
- let t;
205
+ let o;
908
206
  try {
909
- t = jr(e);
207
+ o = Kr(e);
910
208
  } catch {
911
- t = void 0;
209
+ o = void 0;
912
210
  }
913
- const o = [0];
211
+ const t = [0];
914
212
  for (let i = 0; i < e.length; i++) e[i] === `
915
- ` && o.push(i + 1);
213
+ ` && t.push(i + 1);
916
214
  return {
917
215
  resolve(i, a) {
918
- if (!t) return;
216
+ if (!o) return;
919
217
  let c;
920
218
  try {
921
- c = Br(t, i, a);
219
+ c = Br(o, i, a);
922
220
  } catch {
923
221
  return;
924
222
  }
925
223
  if (!c || typeof c.startPosition != "number" || typeof c.endPosition != "number") return;
926
- const s = Math.max(0, Math.min(c.startPosition, e.length)), l = Math.max(s, Math.min(c.endPosition, e.length));
927
- if (!(l <= s))
224
+ const l = Math.max(0, Math.min(c.startPosition, e.length)), s = Math.max(l, Math.min(c.endPosition, e.length));
225
+ if (!(s <= l))
928
226
  return {
929
- from: s,
930
- to: l
227
+ from: l,
228
+ to: s
931
229
  };
932
230
  },
933
231
  lineAt(i) {
934
- let a = 0, c = o.length - 1;
232
+ let a = 0, c = t.length - 1;
935
233
  for (; a < c; ) {
936
- const s = a + c + 1 >> 1;
937
- o[s] <= i ? a = s : c = s - 1;
234
+ const l = a + c + 1 >> 1;
235
+ t[l] <= i ? a = l : c = l - 1;
938
236
  }
939
237
  return a + 1;
940
238
  },
941
- lineCount: o.length,
239
+ lineCount: t.length,
942
240
  lineRange(i) {
943
- const a = o[i - 1] ?? 0, c = i < o.length ? o[i] - 1 : e.length;
241
+ const a = t[i - 1] ?? 0, c = i < t.length ? t[i] - 1 : e.length;
944
242
  return {
945
243
  from: a,
946
244
  to: Math.max(a, c)
@@ -948,28 +246,28 @@ function er(e) {
948
246
  }
949
247
  };
950
248
  }
951
- function we() {
249
+ function ke() {
952
250
  return typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : Math.random().toString(36).slice(2);
953
251
  }
954
- function nt(e) {
955
- return e.map(({ name: t, rule: o }) => ({
956
- name: t,
957
- rule: o
252
+ function to(e) {
253
+ return e.map(({ name: o, rule: t }) => ({
254
+ name: o,
255
+ rule: t
958
256
  }));
959
257
  }
960
- function at(e) {
258
+ function no(e) {
961
259
  return {
962
- id: we(),
260
+ id: ke(),
963
261
  name: e.name,
964
262
  rule: e.rule
965
263
  };
966
264
  }
967
- function it(e) {
968
- let t = e.length + 1;
969
- for (; e.includes(`my-rule-${t}`); ) t++;
265
+ function ao(e) {
266
+ let o = e.length + 1;
267
+ for (; e.includes(`my-rule-${o}`); ) o++;
970
268
  return {
971
- id: we(),
972
- name: `my-rule-${t}`,
269
+ id: ke(),
270
+ name: `my-rule-${o}`,
973
271
  rule: {
974
272
  subject: { type: "Operation" },
975
273
  assertions: { defined: !0 },
@@ -977,24 +275,24 @@ function it(e) {
977
275
  }
978
276
  };
979
277
  }
980
- function st(e) {
981
- const t = {};
982
- return e.forEach((o, i) => {
983
- if (!o.rule.subject?.type) return;
984
- let a = kr(o.name, i);
985
- for (; a in t; ) a += "-dup";
986
- t[a] = xr(o.rule);
987
- }), qr({ rules: t }, {
278
+ function io(e) {
279
+ const o = {};
280
+ return e.forEach((t, i) => {
281
+ if (!t.rule.subject?.type) return;
282
+ let a = wr(t.name, i);
283
+ for (; a in o; ) a += "-dup";
284
+ o[a] = yr(t.rule);
285
+ }), jr({ rules: o }, {
988
286
  noRefs: !0,
989
287
  lineWidth: 100,
990
288
  quotingType: "'"
991
289
  });
992
290
  }
993
- function lt({ problems: e, ruleErrors: t, specError: o, isRunning: i, onSelect: a }) {
994
- const c = e.filter((l) => l.severity === "error").length, s = e.length - c;
995
- return /* @__PURE__ */ d(ct, { children: [/* @__PURE__ */ d(pt, { children: [
291
+ function lo({ problems: e, ruleErrors: o, specError: t, isRunning: i, onSelect: a }) {
292
+ const c = e.filter((s) => s.severity === "error").length, l = e.length - c;
293
+ return /* @__PURE__ */ p(so, { children: [/* @__PURE__ */ p(co, { children: [
996
294
  "Problems",
997
- c > 0 && /* @__PURE__ */ d(rr, {
295
+ c > 0 && /* @__PURE__ */ p(rr, {
998
296
  style: {
999
297
  background: F.error.bg,
1000
298
  color: F.error.fg
@@ -1005,65 +303,65 @@ function lt({ problems: e, ruleErrors: t, specError: o, isRunning: i, onSelect:
1005
303
  c === 1 ? "" : "s"
1006
304
  ]
1007
305
  }),
1008
- s > 0 && /* @__PURE__ */ d(rr, {
306
+ l > 0 && /* @__PURE__ */ p(rr, {
1009
307
  style: {
1010
308
  background: F.warn.bg,
1011
309
  color: F.warn.fg
1012
310
  },
1013
311
  children: [
1014
- s,
312
+ l,
1015
313
  " warning",
1016
- s === 1 ? "" : "s"
314
+ l === 1 ? "" : "s"
1017
315
  ]
1018
316
  }),
1019
- i && /* @__PURE__ */ r(dt, { children: "checking…" })
1020
- ] }), /* @__PURE__ */ d(ut, { children: [
1021
- o && /* @__PURE__ */ d(tr, {
317
+ i && /* @__PURE__ */ r(po, { children: "checking…" })
318
+ ] }), /* @__PURE__ */ p(fo, { children: [
319
+ t && /* @__PURE__ */ p(or, {
1022
320
  role: "alert",
1023
- children: ["Could not lint the document: ", o]
321
+ children: ["Could not lint the document: ", t]
1024
322
  }),
1025
- t.map((l, p) => /* @__PURE__ */ d(tr, {
323
+ o.map((s, d) => /* @__PURE__ */ p(or, {
1026
324
  role: "alert",
1027
- children: ["Rule configuration error: ", l]
1028
- }, p)),
1029
- !o && e.length === 0 && /* @__PURE__ */ r($t, { children: "No problems found in the current document." }),
1030
- e.map((l, p) => {
1031
- const f = F[l.severity];
1032
- return /* @__PURE__ */ d(ft, {
325
+ children: ["Rule configuration error: ", s]
326
+ }, d)),
327
+ !t && e.length === 0 && /* @__PURE__ */ r($o, { children: "No problems found in the current document." }),
328
+ e.map((s, d) => {
329
+ const u = F[s.severity];
330
+ return /* @__PURE__ */ p(uo, {
1033
331
  type: "button",
1034
332
  style: {
1035
- background: f.bg,
1036
- "--sev": f.fg
333
+ background: u.bg,
334
+ "--sev": u.fg
1037
335
  },
1038
- onClick: () => a(l),
1039
- children: [/* @__PURE__ */ r(mt, { style: { background: f.fg } }), /* @__PURE__ */ d(ht, { children: [
1040
- /* @__PURE__ */ d(gt, { children: [
1041
- /* @__PURE__ */ r(vt, {
1042
- style: { color: f.fg },
1043
- children: l.severity
336
+ onClick: () => a(s),
337
+ children: [/* @__PURE__ */ r(ho, { style: { background: u.fg } }), /* @__PURE__ */ p(go, { children: [
338
+ /* @__PURE__ */ p(bo, { children: [
339
+ /* @__PURE__ */ r(mo, {
340
+ style: { color: u.fg },
341
+ children: s.severity
1044
342
  }),
1045
- /* @__PURE__ */ r(bt, {
1046
- style: { color: f.fg },
1047
- children: l.ruleId
343
+ /* @__PURE__ */ r(vo, {
344
+ style: { color: u.fg },
345
+ children: s.ruleId
1048
346
  }),
1049
- /* @__PURE__ */ r(yt, {}),
1050
- l.line !== void 0 && /* @__PURE__ */ d(xt, {
1051
- style: { color: f.fg },
347
+ /* @__PURE__ */ r(xo, {}),
348
+ s.line !== void 0 && /* @__PURE__ */ p(yo, {
349
+ style: { color: u.fg },
1052
350
  children: [
1053
351
  ":",
1054
- l.line,
1055
- l.col !== void 0 ? `:${l.col}` : ""
352
+ s.line,
353
+ s.col !== void 0 ? `:${s.col}` : ""
1056
354
  ]
1057
355
  })
1058
356
  ] }),
1059
- /* @__PURE__ */ r(kt, { children: l.message }),
1060
- l.suggest.length > 0 && /* @__PURE__ */ r(wt, { children: l.suggest.map((m, h) => /* @__PURE__ */ r(Et, { children: m }, h)) })
357
+ /* @__PURE__ */ r(wo, { children: s.message }),
358
+ s.suggest.length > 0 && /* @__PURE__ */ r(ko, { children: s.suggest.map((h, g) => /* @__PURE__ */ r(Co, { children: h }, g)) })
1061
359
  ] })]
1062
- }, `${l.pointer}-${p}`);
360
+ }, `${s.pointer}-${d}`);
1063
361
  })
1064
362
  ] })] });
1065
363
  }
1066
- var ct = n.div`
364
+ var so = n.div`
1067
365
  border: 1px solid var(--border-color-secondary, #e5e9f0);
1068
366
  border-radius: 16px;
1069
367
  padding: 10px 14px 12px;
@@ -1072,7 +370,7 @@ var ct = n.div`
1072
370
  gap: 6px;
1073
371
  max-height: 240px;
1074
372
  background: var(--bg-color, #ffffff);
1075
- `, pt = n.div`
373
+ `, co = n.div`
1076
374
  font-weight: 700;
1077
375
  font-size: 14px;
1078
376
  display: flex;
@@ -1085,16 +383,16 @@ var ct = n.div`
1085
383
  font-size: 11.5px;
1086
384
  font-weight: 700;
1087
385
  padding: 2px 9px;
1088
- `, dt = n.span`
386
+ `, po = n.span`
1089
387
  color: var(--text-color-secondary, #64748b);
1090
388
  font-size: 12px;
1091
389
  font-weight: 400;
1092
- `, ut = n.div`
390
+ `, fo = n.div`
1093
391
  display: flex;
1094
392
  flex-direction: column;
1095
393
  gap: 8px;
1096
394
  overflow-y: auto;
1097
- `, ft = n.button`
395
+ `, uo = n.button`
1098
396
  display: flex;
1099
397
  gap: 12px;
1100
398
  border: 1px solid transparent;
@@ -1114,24 +412,24 @@ var ct = n.div`
1114
412
  outline: 2px solid var(--sev);
1115
413
  outline-offset: -2px;
1116
414
  }
1117
- `, mt = n.span`
415
+ `, ho = n.span`
1118
416
  width: 7px;
1119
417
  height: 7px;
1120
418
  border-radius: 50%;
1121
419
  flex-shrink: 0;
1122
420
  margin-top: 6px;
1123
- `, ht = n.div`
421
+ `, go = n.div`
1124
422
  flex: 1;
1125
423
  display: flex;
1126
424
  flex-direction: column;
1127
425
  gap: 3px;
1128
426
  min-width: 0;
1129
- `, gt = n.div`
427
+ `, bo = n.div`
1130
428
  display: flex;
1131
429
  align-items: center;
1132
430
  gap: 8px;
1133
431
  flex-wrap: wrap;
1134
- `, vt = n.span`
432
+ `, mo = n.span`
1135
433
  font-size: 10.5px;
1136
434
  font-weight: 700;
1137
435
  background: rgba(255, 255, 255, 0.75);
@@ -1139,34 +437,34 @@ var ct = n.div`
1139
437
  padding: 1px 7px;
1140
438
  text-transform: uppercase;
1141
439
  letter-spacing: 0.04em;
1142
- `, bt = n.span`
1143
- font-family: ${D};
440
+ `, vo = n.span`
441
+ font-family: ${z};
1144
442
  font-size: 12px;
1145
443
  font-weight: 600;
1146
- `, yt = n.span`
444
+ `, xo = n.span`
1147
445
  flex: 1;
1148
- `, xt = n.span`
1149
- font-family: ${D};
446
+ `, yo = n.span`
447
+ font-family: ${z};
1150
448
  font-size: 11.5px;
1151
449
  opacity: 0.75;
1152
- `, kt = n.span`
450
+ `, wo = n.span`
1153
451
  font-size: 12.5px;
1154
452
  color: var(--text-color-primary, #1b2430);
1155
453
  line-height: 1.45;
1156
- `, wt = n.ul`
454
+ `, ko = n.ul`
1157
455
  margin: 5px 0 0;
1158
456
  padding: 0;
1159
457
  list-style: none;
1160
458
  display: flex;
1161
459
  flex-direction: column;
1162
460
  gap: 3px;
1163
- `, Et = n.li`
461
+ `, Co = n.li`
1164
462
  display: flex;
1165
463
  align-items: baseline;
1166
464
  gap: 6px;
1167
465
  font-size: 12px;
1168
466
  line-height: 1.4;
1169
- color: ${H.suggest.fg};
467
+ color: ${U.suggest.fg};
1170
468
  background: rgba(255, 255, 255, 0.65);
1171
469
  border-radius: 8px;
1172
470
  padding: 3px 8px;
@@ -1176,11 +474,11 @@ var ct = n.div`
1176
474
  content: '→';
1177
475
  opacity: 0.75;
1178
476
  }
1179
- `, $t = n.div`
477
+ `, $o = n.div`
1180
478
  font-size: 13px;
1181
479
  color: var(--text-color-secondary, #64748b);
1182
480
  padding: 3px 4px;
1183
- `, tr = n.div`
481
+ `, or = n.div`
1184
482
  font-size: 12px;
1185
483
  color: var(--color-error-base, #dc2626);
1186
484
  background: var(--color-error-bg, #fef2f2);
@@ -1188,35 +486,35 @@ var ct = n.div`
1188
486
  padding: 5px 8px;
1189
487
  white-space: pre-wrap;
1190
488
  `;
1191
- function wr({ title: e, subtitle: t, onClose: o, children: i, footer: a, width: c = 560 }) {
1192
- return N(() => {
1193
- const s = (l) => l.key === "Escape" && o();
1194
- return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
1195
- }, [o]), /* @__PURE__ */ r(Ct, {
1196
- onClick: o,
1197
- children: /* @__PURE__ */ d(St, {
489
+ function kr({ title: e, subtitle: o, onClose: t, children: i, footer: a, width: c = 560 }) {
490
+ return D(() => {
491
+ const l = (s) => s.key === "Escape" && t();
492
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
493
+ }, [t]), /* @__PURE__ */ r(Ro, {
494
+ onClick: t,
495
+ children: /* @__PURE__ */ p(So, {
1198
496
  role: "dialog",
1199
497
  "aria-modal": !0,
1200
498
  "aria-label": e,
1201
499
  style: { maxWidth: c },
1202
- onClick: (s) => s.stopPropagation(),
500
+ onClick: (l) => l.stopPropagation(),
1203
501
  children: [
1204
- /* @__PURE__ */ d(Rt, { children: [/* @__PURE__ */ d("div", {
502
+ /* @__PURE__ */ p(Eo, { children: [/* @__PURE__ */ p("div", {
1205
503
  style: { flex: 1 },
1206
- children: [/* @__PURE__ */ r(It, { children: e }), t && /* @__PURE__ */ r(Mt, { children: t })]
1207
- }), /* @__PURE__ */ r(Pt, {
504
+ children: [/* @__PURE__ */ r(Mo, { children: e }), o && /* @__PURE__ */ r(Po, { children: o })]
505
+ }), /* @__PURE__ */ r(Ao, {
1208
506
  type: "button",
1209
507
  "aria-label": "Close",
1210
- onClick: o,
508
+ onClick: t,
1211
509
  children: "×"
1212
510
  })] }),
1213
- /* @__PURE__ */ r(Tt, { children: i }),
1214
- a && /* @__PURE__ */ r(At, { children: a })
511
+ /* @__PURE__ */ r(Io, { children: i }),
512
+ a && /* @__PURE__ */ r(Lo, { children: a })
1215
513
  ]
1216
514
  })
1217
515
  });
1218
516
  }
1219
- var Ct = n.div`
517
+ var Ro = n.div`
1220
518
  position: fixed;
1221
519
  inset: 0;
1222
520
  background: rgba(15, 23, 42, 0.45);
@@ -1225,7 +523,7 @@ var Ct = n.div`
1225
523
  align-items: center;
1226
524
  justify-content: center;
1227
525
  padding: 20px;
1228
- `, St = n.div`
526
+ `, So = n.div`
1229
527
  background: var(--bg-color, #ffffff);
1230
528
  border-radius: 16px;
1231
529
  width: 100%;
@@ -1234,21 +532,21 @@ var Ct = n.div`
1234
532
  flex-direction: column;
1235
533
  overflow: hidden;
1236
534
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
1237
- `, Rt = n.div`
535
+ `, Eo = n.div`
1238
536
  display: flex;
1239
537
  align-items: flex-start;
1240
538
  gap: 12px;
1241
539
  padding: 18px 20px 14px;
1242
540
  border-bottom: 1px solid var(--border-color-secondary, #e5e9f0);
1243
- `, It = n.div`
541
+ `, Mo = n.div`
1244
542
  font-size: 15.5px;
1245
543
  font-weight: 700;
1246
544
  color: var(--text-color-primary, #1b2430);
1247
- `, Mt = n.div`
545
+ `, Po = n.div`
1248
546
  font-size: 12.5px;
1249
547
  color: var(--text-color-secondary, #64748b);
1250
548
  margin-top: 3px;
1251
- `, Pt = n.button`
549
+ `, Ao = n.button`
1252
550
  background: none;
1253
551
  border: none;
1254
552
  color: var(--color-warm-grey-6, #94a3b8);
@@ -1260,11 +558,11 @@ var Ct = n.div`
1260
558
  &:hover {
1261
559
  color: var(--text-color-primary, #1b2430);
1262
560
  }
1263
- `, Tt = n.div`
561
+ `, Io = n.div`
1264
562
  padding: 20px;
1265
563
  overflow: auto;
1266
564
  flex: 1;
1267
- `, At = n.div`
565
+ `, Lo = n.div`
1268
566
  display: flex;
1269
567
  justify-content: flex-end;
1270
568
  gap: 10px;
@@ -1272,7 +570,7 @@ var Ct = n.div`
1272
570
  border-top: 1px solid var(--border-color-secondary, #e5e9f0);
1273
571
  background: var(--color-warm-grey-1, #fbfbfc);
1274
572
  flex-wrap: wrap;
1275
- `, he = n.select`
573
+ `, ge = n.select`
1276
574
  border: 1px solid var(--border-color-secondary, #e5e9f0);
1277
575
  border-radius: 10px;
1278
576
  background: var(--bg-color, #ffffff);
@@ -1288,7 +586,7 @@ var Ct = n.div`
1288
586
  outline: none;
1289
587
  border-color: var(--color-primary-base, #2563eb);
1290
588
  }
1291
- `, le = n.input`
589
+ `, se = n.input`
1292
590
  border: 1px solid var(--border-color-secondary, #e5e9f0);
1293
591
  border-radius: 10px;
1294
592
  background: var(--bg-color, #ffffff);
@@ -1308,10 +606,10 @@ var Ct = n.div`
1308
606
  color: var(--text-color-secondary, #64748b);
1309
607
  opacity: 0.8;
1310
608
  }
1311
- `, Ae = n(le)`
1312
- font-family: ${D};
609
+ `, Le = n(se)`
610
+ font-family: ${z};
1313
611
  font-size: 12px;
1314
- `, or = n.button`
612
+ `, tr = n.button`
1315
613
  border: 1px solid var(--border-color-secondary, #e5e9f0);
1316
614
  border-radius: 10px;
1317
615
  background: transparent;
@@ -1329,7 +627,7 @@ var Ct = n.div`
1329
627
  &:focus-visible {
1330
628
  outline: 2px solid var(--color-primary-base, #2563eb);
1331
629
  }
1332
- `, Er = n.button`
630
+ `, Cr = n.button`
1333
631
  display: inline-flex;
1334
632
  align-items: center;
1335
633
  gap: 7px;
@@ -1351,7 +649,7 @@ var Ct = n.div`
1351
649
  &:focus-visible {
1352
650
  outline: 2px solid var(--color-primary-base, #2563eb);
1353
651
  }
1354
- `, De = n.button`
652
+ `, ze = n.button`
1355
653
  background: var(--bg-color, #ffffff);
1356
654
  color: var(--text-color-primary, #1b2430);
1357
655
  border: 1px solid var(--border-color-primary, #d6dde8);
@@ -1365,7 +663,7 @@ var Ct = n.div`
1365
663
  border-color: var(--color-primary-base, #2563eb);
1366
664
  color: var(--color-primary-base, #2563eb);
1367
665
  }
1368
- `, Ke = n.button`
666
+ `, _e = n.button`
1369
667
  display: inline-flex;
1370
668
  align-items: center;
1371
669
  gap: 7px;
@@ -1394,44 +692,44 @@ var Ct = n.div`
1394
692
  outline: 2px solid var(--text-color-primary, #1b2430);
1395
693
  outline-offset: 1px;
1396
694
  }
1397
- `, se = n.span`
695
+ `, le = n.span`
1398
696
  color: var(--text-color-secondary, #64748b);
1399
697
  font-style: italic;
1400
- `, Dt = n.span`
698
+ `, zo = n.span`
1401
699
  font-size: 13px;
1402
700
  font-weight: 700;
1403
701
  color: var(--sec);
1404
702
  flex-shrink: 0;
1405
- `, Lt = n.span`
703
+ `, Oo = n.span`
1406
704
  display: block;
1407
705
  font-size: 12px;
1408
706
  color: var(--text-color-secondary, #64748b);
1409
707
  margin-top: 4px;
1410
- `, Ot = n.div`
708
+ `, To = n.div`
1411
709
  padding: 16px 2px 6px;
1412
710
 
1413
711
  & + & {
1414
712
  border-top: 1px solid var(--border-color-secondary, #e5e9f0);
1415
713
  }
1416
- `, zt = n.div`
714
+ `, No = n.div`
1417
715
  margin-bottom: 12px;
1418
- `, Bt = n.div`
716
+ `, Bo = n.div`
1419
717
  display: flex;
1420
718
  align-items: center;
1421
719
  gap: 12px;
1422
- `, Nt = n.span`
720
+ `, Do = n.span`
1423
721
  flex: 1;
1424
722
  height: 1px;
1425
723
  background: var(--sec-line);
1426
724
  `;
1427
- function ne({ tone: e, label: t, hint: o, children: i }) {
1428
- const a = H[e];
1429
- return /* @__PURE__ */ d(Ot, {
725
+ function ne({ tone: e, label: o, hint: t, children: i }) {
726
+ const a = U[e];
727
+ return /* @__PURE__ */ p(To, {
1430
728
  style: {
1431
729
  "--sec": a.fg,
1432
730
  "--sec-line": a.line
1433
731
  },
1434
- children: [/* @__PURE__ */ d(zt, { children: [/* @__PURE__ */ d(Bt, { children: [/* @__PURE__ */ r(Dt, { children: t }), /* @__PURE__ */ r(Nt, {})] }), /* @__PURE__ */ r(Lt, { children: o })] }), i]
732
+ children: [/* @__PURE__ */ p(No, { children: [/* @__PURE__ */ p(Bo, { children: [/* @__PURE__ */ r(zo, { children: o }), /* @__PURE__ */ r(Do, {})] }), /* @__PURE__ */ r(Oo, { children: t })] }), i]
1435
733
  });
1436
734
  }
1437
735
  var ce = n.div`
@@ -1463,81 +761,81 @@ function $r({ open: e }) {
1463
761
  })
1464
762
  });
1465
763
  }
1466
- var jt = (e) => `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3' viewBox='0 0 6 3'><path d='M0 2.5 Q1.5 0.5 3 2.5 Q4.5 4.5 6 2.5' fill='none' stroke='${e}' stroke-width='1'/></svg>`)}")`, qt = Ne`
1467
- background-image: ${jt("#dc2626")};
764
+ var Ko = (e) => `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='6' height='3' viewBox='0 0 6 3'><path d='M0 2.5 Q1.5 0.5 3 2.5 Q4.5 4.5 6 2.5' fill='none' stroke='${e}' stroke-width='1'/></svg>`)}")`, jo = De`
765
+ background-image: ${Ko("#dc2626")};
1468
766
  background-repeat: repeat-x;
1469
767
  background-position: bottom left;
1470
768
  background-size: 6px 3px;
1471
769
  padding-bottom: 3px;
1472
- `, Ft = n.span`
770
+ `, Fo = n.span`
1473
771
  display: inline-flex;
1474
772
  align-items: center;
1475
773
  gap: 6px;
1476
774
 
1477
- ${(e) => e.$error && qt}
775
+ ${(e) => e.$error && jo}
1478
776
  `;
1479
- function ye({ error: e, children: t, style: o }) {
1480
- return /* @__PURE__ */ r(Ft, {
777
+ function xe({ error: e, children: o, style: t }) {
778
+ return /* @__PURE__ */ r(Fo, {
1481
779
  $error: e,
1482
780
  title: e,
1483
781
  "aria-invalid": !!e || void 0,
1484
- style: o,
1485
- children: t
782
+ style: t,
783
+ children: o
1486
784
  });
1487
785
  }
1488
- function _t({ yaml: e, host: t, fileName: o = "redocly.yaml" }) {
1489
- const [i, a] = I(!1), [c, s] = I(!1), l = async () => {
1490
- await (t?.copyToClipboard ?? ((f) => navigator.clipboard.writeText(f)))(e).then(() => !0, () => !1) && (s(!0), setTimeout(() => s(!1), 1500));
1491
- }, p = async () => {
1492
- if (t?.downloadFile) {
1493
- await t.downloadFile(o, e);
786
+ function Wo({ yaml: e, host: o, fileName: t = "redocly.yaml" }) {
787
+ const [i, a] = M(!1), [c, l] = M(!1), s = async () => {
788
+ await (o?.copyToClipboard ?? ((u) => navigator.clipboard.writeText(u)))(e).then(() => !0, () => !1) && (l(!0), setTimeout(() => l(!1), 1500));
789
+ }, d = async () => {
790
+ if (o?.downloadFile) {
791
+ await o.downloadFile(t, e);
1494
792
  return;
1495
793
  }
1496
- const f = URL.createObjectURL(new Blob([e], { type: "text/yaml" })), m = document.createElement("a");
1497
- m.href = f, m.download = o, document.body.appendChild(m), m.click(), m.remove(), setTimeout(() => URL.revokeObjectURL(f), 1e3);
794
+ const u = URL.createObjectURL(new Blob([e], { type: "text/yaml" })), h = document.createElement("a");
795
+ h.href = u, h.download = t, document.body.appendChild(h), h.click(), h.remove(), setTimeout(() => URL.revokeObjectURL(u), 1e3);
1498
796
  };
1499
- return /* @__PURE__ */ d(X, { children: [/* @__PURE__ */ d(Er, {
797
+ return /* @__PURE__ */ p(Q, { children: [/* @__PURE__ */ p(Cr, {
1500
798
  type: "button",
1501
799
  onClick: () => a(!0),
1502
800
  children: [
1503
- /* @__PURE__ */ r(Kt, {}),
801
+ /* @__PURE__ */ r(_o, {}),
1504
802
  " Generated ",
1505
- o
803
+ t
1506
804
  ]
1507
- }), i && /* @__PURE__ */ r(wr, {
1508
- title: `Generated ${o}`,
805
+ }), i && /* @__PURE__ */ r(kr, {
806
+ title: `Generated ${t}`,
1509
807
  subtitle: "Ready to drop into your project root",
1510
808
  width: 620,
1511
809
  onClose: () => a(!1),
1512
- footer: /* @__PURE__ */ d(X, { children: [
1513
- /* @__PURE__ */ r(De, {
810
+ footer: /* @__PURE__ */ p(Q, { children: [
811
+ /* @__PURE__ */ r(ze, {
1514
812
  type: "button",
1515
813
  onClick: () => a(!1),
1516
814
  children: "Close"
1517
815
  }),
1518
- /* @__PURE__ */ r(De, {
816
+ /* @__PURE__ */ r(ze, {
1519
817
  type: "button",
1520
- onClick: l,
818
+ onClick: s,
1521
819
  children: c ? "Copied!" : "Copy"
1522
820
  }),
1523
- /* @__PURE__ */ d(Ke, {
821
+ /* @__PURE__ */ p(_e, {
1524
822
  type: "button",
1525
- onClick: p,
823
+ onClick: d,
1526
824
  children: [
1527
- /* @__PURE__ */ r(Ut, {}),
825
+ /* @__PURE__ */ r(Ho, {}),
1528
826
  " Download ",
1529
- o
827
+ t
1530
828
  ]
1531
829
  })
1532
830
  ] }),
1533
- children: /* @__PURE__ */ r(Wt, {
1534
- "aria-label": `Generated ${o}`,
831
+ children: /* @__PURE__ */ r(qo, {
832
+ "aria-label": `Generated ${t}`,
1535
833
  children: e
1536
834
  })
1537
835
  })] });
1538
836
  }
1539
- function Kt() {
1540
- return /* @__PURE__ */ d("svg", {
837
+ function _o() {
838
+ return /* @__PURE__ */ p("svg", {
1541
839
  width: "13",
1542
840
  height: "13",
1543
841
  viewBox: "0 0 14 14",
@@ -1557,7 +855,7 @@ function Kt() {
1557
855
  })]
1558
856
  });
1559
857
  }
1560
- function Ut() {
858
+ function Ho() {
1561
859
  return /* @__PURE__ */ r("svg", {
1562
860
  width: "13",
1563
861
  height: "13",
@@ -1573,13 +871,13 @@ function Ut() {
1573
871
  })
1574
872
  });
1575
873
  }
1576
- var Wt = n.pre`
874
+ var qo = n.pre`
1577
875
  margin: 0;
1578
876
  background: #0f172a;
1579
877
  color: #cbd5e1;
1580
878
  border-radius: 12px;
1581
879
  padding: 16px;
1582
- font-family: ${D};
880
+ font-family: ${z};
1583
881
  font-size: 12px;
1584
882
  line-height: 1.75;
1585
883
  overflow: auto;
@@ -1591,67 +889,67 @@ function V(e) {
1591
889
  function nr(e) {
1592
890
  return V(e) && V(e.subject) && typeof e.subject.type == "string";
1593
891
  }
1594
- function Cr(e) {
892
+ function Rr(e) {
1595
893
  return V(e) ? e : {};
1596
894
  }
1597
- function Ht(e) {
1598
- return e.map((t) => {
1599
- const o = V(t) ? t : {}, i = V(o.subject) ? o.subject : {};
895
+ function Uo(e) {
896
+ return e.map((o) => {
897
+ const t = V(o) ? o : {}, i = V(t.subject) ? t.subject : {};
1600
898
  return {
1601
899
  subject: {
1602
900
  ...i,
1603
901
  type: typeof i.type == "string" ? i.type : ""
1604
902
  },
1605
- assertions: Cr(o.assertions)
903
+ assertions: Rr(t.assertions)
1606
904
  };
1607
905
  });
1608
906
  }
1609
907
  function ar(e) {
1610
908
  return {
1611
909
  subject: e.subject,
1612
- assertions: Cr(e.assertions),
1613
- ...Array.isArray(e.where) ? { where: Ht(e.where) } : {},
910
+ assertions: Rr(e.assertions),
911
+ ...Array.isArray(e.where) ? { where: Uo(e.where) } : {},
1614
912
  ...typeof e.message == "string" ? { message: e.message } : {},
1615
913
  ...Array.isArray(e.suggest) ? { suggest: e.suggest } : {},
1616
914
  ...typeof e.reference == "string" ? { reference: e.reference } : {},
1617
915
  ...e.severity === "warn" || e.severity === "off" || e.severity === "error" ? { severity: e.severity } : {}
1618
916
  };
1619
917
  }
1620
- function Gt(e) {
1621
- let t;
918
+ function Yo(e) {
919
+ let o;
1622
920
  try {
1623
- t = Fr(e);
1624
- } catch (s) {
921
+ o = Fr(e);
922
+ } catch (l) {
1625
923
  return {
1626
924
  rules: [],
1627
925
  skipped: [],
1628
- error: `Could not parse the document: ${s instanceof Error ? s.message : String(s)}`
926
+ error: `Could not parse the document: ${l instanceof Error ? l.message : String(l)}`
1629
927
  };
1630
928
  }
1631
- if (!V(t)) return {
929
+ if (!V(o)) return {
1632
930
  rules: [],
1633
931
  skipped: [],
1634
932
  error: "Expected a YAML/JSON object"
1635
933
  };
1636
- const o = t;
1637
- if (nr(o)) return {
934
+ const t = o;
935
+ if (nr(t)) return {
1638
936
  rules: [{
1639
937
  name: "imported-rule",
1640
- rule: ar(o)
938
+ rule: ar(t)
1641
939
  }],
1642
940
  skipped: []
1643
941
  };
1644
- const i = V(o.rules) ? o.rules : Object.keys(o).some((s) => s.startsWith("rule/")) ? o : void 0;
942
+ const i = V(t.rules) ? t.rules : Object.keys(t).some((l) => l.startsWith("rule/")) ? t : void 0;
1645
943
  if (!i) return {
1646
944
  rules: [],
1647
945
  skipped: [],
1648
946
  error: "No configurable rules found — expected a `rules:` map with `rule/<name>` entries, or a single rule object"
1649
947
  };
1650
948
  const a = [], c = [];
1651
- for (const [s, l] of Object.entries(i)) s.startsWith("rule/") && nr(l) ? a.push({
1652
- name: s.slice(5),
1653
- rule: ar(l)
1654
- }) : c.push(s);
949
+ for (const [l, s] of Object.entries(i)) l.startsWith("rule/") && nr(s) ? a.push({
950
+ name: l.slice(5),
951
+ rule: ar(s)
952
+ }) : c.push(l);
1655
953
  return a.length === 0 ? {
1656
954
  rules: a,
1657
955
  skipped: c,
@@ -1661,24 +959,24 @@ function Gt(e) {
1661
959
  skipped: c
1662
960
  };
1663
961
  }
1664
- function Ue({ value: e, options: t, onChange: o, ariaLabel: i }) {
1665
- return /* @__PURE__ */ r(Yt, {
962
+ function He({ value: e, options: o, onChange: t, ariaLabel: i }) {
963
+ return /* @__PURE__ */ r(Go, {
1666
964
  role: "radiogroup",
1667
965
  "aria-label": i,
1668
- children: t.map((a) => /* @__PURE__ */ r(Vt, {
966
+ children: o.map((a) => /* @__PURE__ */ r(Vo, {
1669
967
  type: "button",
1670
968
  role: "radio",
1671
969
  "aria-checked": e === a.value,
1672
970
  $active: e === a.value,
1673
971
  $activeColor: a.activeColor,
1674
972
  onClick: (c) => {
1675
- c.stopPropagation(), o(a.value);
973
+ c.stopPropagation(), t(a.value);
1676
974
  },
1677
975
  children: a.label
1678
976
  }, a.value))
1679
977
  });
1680
978
  }
1681
- var Yt = n.span`
979
+ var Go = n.span`
1682
980
  display: inline-flex;
1683
981
  background: var(--bg-color, #ffffff);
1684
982
  border: 1px solid var(--border-color-primary, #d6dde8);
@@ -1686,7 +984,7 @@ var Yt = n.span`
1686
984
  padding: 2px;
1687
985
  gap: 2px;
1688
986
  flex-shrink: 0;
1689
- `, Vt = n.button`
987
+ `, Vo = n.button`
1690
988
  border: none;
1691
989
  border-radius: 999px;
1692
990
  background: transparent;
@@ -1701,7 +999,7 @@ var Yt = n.span`
1701
999
  background 0.12s,
1702
1000
  color 0.12s;
1703
1001
 
1704
- ${(e) => e.$active && Ne`
1002
+ ${(e) => e.$active && De`
1705
1003
  color: #fff;
1706
1004
  background: ${e.$activeColor ?? "var(--color-primary-base, #2563eb)"};
1707
1005
  `}
@@ -1711,40 +1009,40 @@ var Yt = n.span`
1711
1009
  outline-offset: -2px;
1712
1010
  }
1713
1011
  `;
1714
- function Jt({ onImport: e }) {
1715
- const [t, o] = I(!1), [i, a] = I("paste"), [c, s] = I(""), [l, p] = I(), [f, m] = I(), [h, y] = I(!1), u = A(null), g = () => {
1716
- o(!1), p(void 0), m(void 0);
1717
- }, x = ($) => {
1718
- const v = Gt($);
1719
- if (v.error) {
1720
- p(v.error), m(void 0);
1012
+ function Jo({ onImport: e }) {
1013
+ const [o, t] = M(!1), [i, a] = M("paste"), [c, l] = M(""), [s, d] = M(), [u, h] = M(), [g, x] = M(!1), f = L(null), b = () => {
1014
+ t(!1), d(void 0), h(void 0);
1015
+ }, y = ($) => {
1016
+ const m = Yo($);
1017
+ if (m.error) {
1018
+ d(m.error), h(void 0);
1721
1019
  return;
1722
1020
  }
1723
- e(v.rules), s(""), v.skipped.length ? (p(void 0), m(`Imported ${v.rules.length} rule(s); skipped non-configurable entries: ${v.skipped.join(", ")}`)) : g();
1724
- }, C = ($) => {
1725
- const v = new FileReader();
1726
- v.onload = () => x(String(v.result ?? "")), v.onerror = () => p("Could not read the file"), v.readAsText($);
1021
+ e(m.rules), l(""), m.skipped.length ? (d(void 0), h(`Imported ${m.rules.length} rule(s); skipped non-configurable entries: ${m.skipped.join(", ")}`)) : b();
1022
+ }, R = ($) => {
1023
+ const m = new FileReader();
1024
+ m.onload = () => y(String(m.result ?? "")), m.onerror = () => d("Could not read the file"), m.readAsText($);
1727
1025
  };
1728
- return /* @__PURE__ */ d(X, { children: [/* @__PURE__ */ d(Er, {
1026
+ return /* @__PURE__ */ p(Q, { children: [/* @__PURE__ */ p(Cr, {
1729
1027
  type: "button",
1730
- onClick: () => o(!0),
1028
+ onClick: () => t(!0),
1731
1029
  children: [/* @__PURE__ */ r(ir, {}), " Import rules"]
1732
- }), t && /* @__PURE__ */ d(wr, {
1030
+ }), o && /* @__PURE__ */ p(kr, {
1733
1031
  title: "Import rules",
1734
1032
  subtitle: "Add existing rules from a redocly.yaml file",
1735
- onClose: g,
1736
- footer: /* @__PURE__ */ d(X, { children: [/* @__PURE__ */ r(De, {
1033
+ onClose: b,
1034
+ footer: /* @__PURE__ */ p(Q, { children: [/* @__PURE__ */ r(ze, {
1737
1035
  type: "button",
1738
- onClick: g,
1036
+ onClick: b,
1739
1037
  children: "Cancel"
1740
- }), i === "paste" && /* @__PURE__ */ r(Ke, {
1038
+ }), i === "paste" && /* @__PURE__ */ r(_e, {
1741
1039
  type: "button",
1742
1040
  disabled: !c.trim(),
1743
- onClick: () => x(c),
1041
+ onClick: () => y(c),
1744
1042
  children: "Import rules"
1745
1043
  })] }),
1746
1044
  children: [
1747
- /* @__PURE__ */ r(Qt, { children: /* @__PURE__ */ r(Ue, {
1045
+ /* @__PURE__ */ r(Xo, { children: /* @__PURE__ */ r(He, {
1748
1046
  ariaLabel: "Import mode",
1749
1047
  value: i,
1750
1048
  onChange: a,
@@ -1756,7 +1054,7 @@ function Jt({ onImport: e }) {
1756
1054
  label: "upload file"
1757
1055
  }]
1758
1056
  }) }),
1759
- i === "paste" ? /* @__PURE__ */ r(Xt, {
1057
+ i === "paste" ? /* @__PURE__ */ r(Qo, {
1760
1058
  "aria-label": "Rules YAML",
1761
1059
  value: c,
1762
1060
  placeholder: `rules:
@@ -1767,45 +1065,45 @@ function Jt({ onImport: e }) {
1767
1065
  assertions:
1768
1066
  defined: true
1769
1067
  maxLength: 20`,
1770
- onChange: ($) => s($.target.value)
1771
- }) : /* @__PURE__ */ d(Zt, {
1772
- $active: h,
1773
- onClick: () => u.current?.click(),
1068
+ onChange: ($) => l($.target.value)
1069
+ }) : /* @__PURE__ */ p(Zo, {
1070
+ $active: g,
1071
+ onClick: () => f.current?.click(),
1774
1072
  onDragOver: ($) => {
1775
- $.preventDefault(), $.dataTransfer.dropEffect = "copy", h || y(!0);
1073
+ $.preventDefault(), $.dataTransfer.dropEffect = "copy", g || x(!0);
1776
1074
  },
1777
1075
  onDragLeave: ($) => {
1778
- $.currentTarget.contains($.relatedTarget) || y(!1);
1076
+ $.currentTarget.contains($.relatedTarget) || x(!1);
1779
1077
  },
1780
1078
  onDrop: ($) => {
1781
- $.preventDefault(), y(!1);
1782
- const v = $.dataTransfer.files?.[0];
1783
- v && C(v);
1079
+ $.preventDefault(), x(!1);
1080
+ const m = $.dataTransfer.files?.[0];
1081
+ m && R(m);
1784
1082
  },
1785
1083
  children: [
1786
- /* @__PURE__ */ r(eo, { children: /* @__PURE__ */ r(ir, { size: 18 }) }),
1787
- /* @__PURE__ */ r(ro, { children: "Drop your redocly.yaml here" }),
1788
- /* @__PURE__ */ d(to, { children: [
1084
+ /* @__PURE__ */ r(et, { children: /* @__PURE__ */ r(ir, { size: 18 }) }),
1085
+ /* @__PURE__ */ r(rt, { children: "Drop your redocly.yaml here" }),
1086
+ /* @__PURE__ */ p(ot, { children: [
1789
1087
  "or ",
1790
1088
  /* @__PURE__ */ r("b", { children: "browse files" }),
1791
1089
  " · .yaml, .yml, .json"
1792
1090
  ] })
1793
1091
  ]
1794
1092
  }),
1795
- l && /* @__PURE__ */ r(oo, {
1093
+ s && /* @__PURE__ */ r(tt, {
1796
1094
  role: "alert",
1797
- children: l
1095
+ children: s
1798
1096
  }),
1799
- f && /* @__PURE__ */ r(no, { children: f }),
1097
+ u && /* @__PURE__ */ r(nt, { children: u }),
1800
1098
  /* @__PURE__ */ r("input", {
1801
- ref: u,
1099
+ ref: f,
1802
1100
  type: "file",
1803
1101
  accept: ".yaml,.yml,.json,.txt",
1804
1102
  hidden: !0,
1805
1103
  "aria-label": "Upload rules file",
1806
1104
  onChange: ($) => {
1807
- const v = $.target.files?.[0];
1808
- $.target.value = "", v && C(v);
1105
+ const m = $.target.files?.[0];
1106
+ $.target.value = "", m && R(m);
1809
1107
  }
1810
1108
  })
1811
1109
  ]
@@ -1827,9 +1125,9 @@ function ir({ size: e = 13 }) {
1827
1125
  })
1828
1126
  });
1829
1127
  }
1830
- var Qt = n.div`
1128
+ var Xo = n.div`
1831
1129
  margin-bottom: 14px;
1832
- `, Xt = n.textarea`
1130
+ `, Qo = n.textarea`
1833
1131
  width: 100%;
1834
1132
  box-sizing: border-box;
1835
1133
  display: block;
@@ -1838,7 +1136,7 @@ var Qt = n.div`
1838
1136
  border: 1px solid var(--border-color-primary, #d6dde8);
1839
1137
  border-radius: 12px;
1840
1138
  padding: 14px;
1841
- font-family: ${D};
1139
+ font-family: ${z};
1842
1140
  font-size: 12px;
1843
1141
  line-height: 1.7;
1844
1142
  color: var(--text-color-primary, #1b2430);
@@ -1848,7 +1146,7 @@ var Qt = n.div`
1848
1146
  &:focus {
1849
1147
  border-color: var(--color-primary-base, #2563eb);
1850
1148
  }
1851
- `, Zt = n.div`
1149
+ `, Zo = n.div`
1852
1150
  border: 1.5px dashed ${(e) => e.$active ? "var(--color-primary-base, #2563eb)" : "var(--border-color-primary, #d6dde8)"};
1853
1151
  border-radius: 12px;
1854
1152
  background: var(--color-warm-grey-1, #fbfbfc);
@@ -1863,7 +1161,7 @@ var Qt = n.div`
1863
1161
  &:hover {
1864
1162
  border-color: var(--color-primary-base, #2563eb);
1865
1163
  }
1866
- `, eo = n.div`
1164
+ `, et = n.div`
1867
1165
  width: 40px;
1868
1166
  height: 40px;
1869
1167
  border-radius: 12px;
@@ -1872,26 +1170,26 @@ var Qt = n.div`
1872
1170
  display: flex;
1873
1171
  align-items: center;
1874
1172
  justify-content: center;
1875
- `, ro = n.div`
1173
+ `, rt = n.div`
1876
1174
  font-size: 13.5px;
1877
1175
  font-weight: 600;
1878
1176
  color: var(--text-color-primary, #1b2430);
1879
- `, to = n.div`
1177
+ `, ot = n.div`
1880
1178
  font-size: 12.5px;
1881
1179
  color: var(--text-color-secondary, #64748b);
1882
1180
 
1883
1181
  b {
1884
1182
  color: var(--color-primary-base, #2563eb);
1885
1183
  }
1886
- `, oo = n.p`
1184
+ `, tt = n.p`
1887
1185
  color: var(--color-error-base, #dc2626);
1888
1186
  font-size: 12.5px;
1889
1187
  margin: 12px 0 0;
1890
- `, no = n.p`
1188
+ `, nt = n.p`
1891
1189
  color: var(--text-color-secondary, #64748b);
1892
1190
  font-size: 12.5px;
1893
1191
  margin: 12px 0 0;
1894
- `, ao = [
1192
+ `, at = [
1895
1193
  "camelCase",
1896
1194
  "kebab-case",
1897
1195
  "snake_case",
@@ -1899,7 +1197,7 @@ var Qt = n.div`
1899
1197
  "MACRO_CASE",
1900
1198
  "COBOL-CASE",
1901
1199
  "flatcase"
1902
- ], io = [
1200
+ ], it = [
1903
1201
  "Root",
1904
1202
  "Info",
1905
1203
  "Contact",
@@ -1953,7 +1251,7 @@ var Qt = n.div`
1953
1251
  "Tag",
1954
1252
  "TagList",
1955
1253
  "ExternalDocs"
1956
- ], so = ["any", ...Array.from(/* @__PURE__ */ new Set([...io, ...Object.keys(Lr)])).sort()], Le = [
1254
+ ], lt = ["any", ...Array.from(/* @__PURE__ */ new Set([...it, ...Object.keys(Or)])).sort()], Oe = [
1957
1255
  {
1958
1256
  key: "casing",
1959
1257
  kind: "casing",
@@ -2050,7 +1348,7 @@ var Qt = n.div`
2050
1348
  propertyMode: "forbidden",
2051
1349
  hint: "at least one of these keys is defined"
2052
1350
  }
2053
- ], xe = Object.fromEntries(Le.map((e) => [e.key, e])), lo = [
1351
+ ], ye = Object.fromEntries(Oe.map((e) => [e.key, e])), st = [
2054
1352
  "{{assertionName}}",
2055
1353
  "{{nodeType}}",
2056
1354
  "{{key}}",
@@ -2058,60 +1356,60 @@ var Qt = n.div`
2058
1356
  "{{problems}}",
2059
1357
  "{{pointer}}",
2060
1358
  "{{file}}"
2061
- ], co = /^[a-zA-Z][a-zA-Z0-9-]*$/;
1359
+ ], ct = /^[a-zA-Z][a-zA-Z0-9-]*$/;
2062
1360
  function Sr(e) {
2063
1361
  return Array.isArray(e.property) ? e.property.length > 0 : !!e.property;
2064
1362
  }
2065
- function Oe(e) {
2066
- const t = e.lastIndexOf("/"), o = e.startsWith("/") && t > 0;
1363
+ function Te(e) {
1364
+ const o = e.lastIndexOf("/"), t = e.startsWith("/") && o > 0;
2067
1365
  try {
2068
- return o ? new RegExp(e.slice(1, t), e.slice(t + 1)) : new RegExp(e), !0;
1366
+ return t ? new RegExp(e.slice(1, o), e.slice(o + 1)) : new RegExp(e), !0;
2069
1367
  } catch {
2070
1368
  return !1;
2071
1369
  }
2072
1370
  }
2073
- function sr(e, t, o) {
2074
- e.type || (o[`${t}type`] = "Choose a node type"), e.matchParentKeys && !Oe(e.matchParentKeys) && (o[`${t}matchParentKeys`] = "Invalid regular expression");
1371
+ function lr(e, o, t) {
1372
+ e.type || (t[`${o}type`] = "Choose a node type"), e.matchParentKeys && !Te(e.matchParentKeys) && (t[`${o}matchParentKeys`] = "Invalid regular expression");
2075
1373
  }
2076
- function lr(e, t, o, i) {
2077
- const a = Sr(t);
2078
- for (const [c, s] of Object.entries(e)) {
2079
- const l = xe[c];
2080
- if (!l) continue;
2081
- const p = `${o}assertion:${c}`;
2082
- if (l.propertyMode === "required" && !a) {
2083
- i[p] = `\`${c}\` needs a single property target`;
1374
+ function sr(e, o, t, i) {
1375
+ const a = Sr(o);
1376
+ for (const [c, l] of Object.entries(e)) {
1377
+ const s = ye[c];
1378
+ if (!s) continue;
1379
+ const d = `${t}assertion:${c}`;
1380
+ if (s.propertyMode === "required" && !a) {
1381
+ i[d] = `\`${c}\` needs a single property target`;
2084
1382
  continue;
2085
1383
  }
2086
- if (l.propertyMode === "forbidden" && a) {
2087
- i[p] = `\`${c}\` asserts on key names — target the whole node`;
1384
+ if (s.propertyMode === "forbidden" && a) {
1385
+ i[d] = `\`${c}\` asserts on key names — target the whole node`;
2088
1386
  continue;
2089
1387
  }
2090
- switch (l.kind) {
1388
+ switch (s.kind) {
2091
1389
  case "regex":
2092
- typeof s != "string" || !s ? i[p] = "Enter a regular expression" : Oe(s) || (i[p] = "Invalid regular expression");
1390
+ typeof l != "string" || !l ? i[d] = "Enter a regular expression" : Te(l) || (i[d] = "Invalid regular expression");
2093
1391
  break;
2094
1392
  case "stringList":
2095
- (!Array.isArray(s) || s.length === 0) && (i[p] = "Add at least one value");
1393
+ (!Array.isArray(l) || l.length === 0) && (i[d] = "Add at least one value");
2096
1394
  break;
2097
1395
  case "number":
2098
- (!Number.isInteger(s) || s < 0) && (i[p] = "Enter a non-negative integer");
1396
+ (!Number.isInteger(l) || l < 0) && (i[d] = "Enter a non-negative integer");
2099
1397
  break;
2100
1398
  case "text":
2101
- (typeof s != "string" || s.trim() === "") && (i[p] = "Enter a value");
1399
+ (typeof l != "string" || l.trim() === "") && (i[d] = "Enter a value");
2102
1400
  break;
2103
1401
  case "refValue":
2104
- typeof s == "string" && (!s || !Oe(s)) && (i[p] = "Enter a valid pattern");
1402
+ typeof l == "string" && (!l || !Te(l)) && (i[d] = "Enter a valid pattern");
2105
1403
  }
2106
1404
  }
2107
1405
  }
2108
- function po(e, t) {
2109
- const o = {};
2110
- return co.test(e) || (o.name = "Use letters, digits and dashes, starting with a letter"), sr(t.subject, "subject.", o), lr(t.assertions ?? {}, t.subject, "", o), (t.where ?? []).forEach((i, a) => {
2111
- sr(i.subject, `where:${a}.`, o), lr(i.assertions ?? {}, i.subject, `where:${a}.`, o);
2112
- }), o;
1406
+ function dt(e, o) {
1407
+ const t = {};
1408
+ return ct.test(e) || (t.name = "Use letters, digits and dashes, starting with a letter"), lr(o.subject, "subject.", t), sr(o.assertions ?? {}, o.subject, "", t), (o.where ?? []).forEach((i, a) => {
1409
+ lr(i.subject, `where:${a}.`, t), sr(i.assertions ?? {}, i.subject, `where:${a}.`, t);
1410
+ }), t;
2113
1411
  }
2114
- var uo = n.span`
1412
+ var pt = n.span`
2115
1413
  display: inline-flex;
2116
1414
  flex-wrap: wrap;
2117
1415
  gap: 4px;
@@ -2125,17 +1423,17 @@ var uo = n.span`
2125
1423
  border-color: var(--color-primary-base, #2563eb);
2126
1424
  border-style: solid;
2127
1425
  }
2128
- `, fo = n.span`
1426
+ `, ft = n.span`
2129
1427
  display: inline-flex;
2130
1428
  align-items: center;
2131
1429
  gap: 3px;
2132
1430
  font-size: 12px;
2133
- font-family: ${D};
1431
+ font-family: ${z};
2134
1432
  background: var(--color-primary-bg, #eff4fe);
2135
1433
  color: var(--text-color-primary, #1b2430);
2136
1434
  border-radius: 10px;
2137
1435
  padding: 1px 3px 1px 7px;
2138
- `, mo = n.button`
1436
+ `, ut = n.button`
2139
1437
  font: inherit;
2140
1438
  font-size: 12px;
2141
1439
  line-height: 1;
@@ -2153,10 +1451,10 @@ var uo = n.span`
2153
1451
  &:focus-visible {
2154
1452
  outline: 2px solid var(--color-primary-base, #2563eb);
2155
1453
  }
2156
- `, ho = n.input`
1454
+ `, ht = n.input`
2157
1455
  font: inherit;
2158
1456
  font-size: 12px;
2159
- font-family: ${D};
1457
+ font-family: ${z};
2160
1458
  border: none;
2161
1459
  outline: none;
2162
1460
  background: transparent;
@@ -2170,28 +1468,28 @@ var uo = n.span`
2170
1468
  opacity: 0.8;
2171
1469
  }
2172
1470
  `;
2173
- function ke({ values: e, onChange: t, ariaLabel: o, placeholder: i }) {
2174
- const [a, c] = I(""), s = (l) => {
2175
- const p = l.trim();
2176
- p && !e.includes(p) && t([...e, p]), c("");
1471
+ function we({ values: e, onChange: o, ariaLabel: t, placeholder: i }) {
1472
+ const [a, c] = M(""), l = (s) => {
1473
+ const d = s.trim();
1474
+ d && !e.includes(d) && o([...e, d]), c("");
2177
1475
  };
2178
- return /* @__PURE__ */ d(uo, {
1476
+ return /* @__PURE__ */ p(pt, {
2179
1477
  role: "group",
2180
- "aria-label": o,
2181
- children: [e.map((l) => /* @__PURE__ */ d(fo, { children: [l, /* @__PURE__ */ r(mo, {
1478
+ "aria-label": t,
1479
+ children: [e.map((s) => /* @__PURE__ */ p(ft, { children: [s, /* @__PURE__ */ r(ut, {
2182
1480
  type: "button",
2183
- "aria-label": `Remove ${l}`,
2184
- onClick: () => t(e.filter((p) => p !== l)),
1481
+ "aria-label": `Remove ${s}`,
1482
+ onClick: () => o(e.filter((d) => d !== s)),
2185
1483
  children: "×"
2186
- })] }, l)), /* @__PURE__ */ r(ho, {
1484
+ })] }, s)), /* @__PURE__ */ r(ht, {
2187
1485
  value: a,
2188
- "aria-label": `Add value to ${o}`,
1486
+ "aria-label": `Add value to ${t}`,
2189
1487
  placeholder: e.length === 0 ? i ?? "add value…" : "add…",
2190
- onChange: (l) => c(l.target.value),
2191
- onKeyDown: (l) => {
2192
- l.key === "Enter" || l.key === "," ? (l.preventDefault(), s(a)) : l.key === "Backspace" && a === "" && e.length && t(e.slice(0, -1));
1488
+ onChange: (s) => c(s.target.value),
1489
+ onKeyDown: (s) => {
1490
+ s.key === "Enter" || s.key === "," ? (s.preventDefault(), l(a)) : s.key === "Backspace" && a === "" && e.length && o(e.slice(0, -1));
2193
1491
  },
2194
- onBlur: () => a.trim() && s(a)
1492
+ onBlur: () => a.trim() && l(a)
2195
1493
  })]
2196
1494
  });
2197
1495
  }
@@ -2213,100 +1511,100 @@ var cr = {
2213
1511
  required: [],
2214
1512
  requireAny: []
2215
1513
  };
2216
- function pr({ assertions: e, onChange: t, keyword: o, tone: i, errors: a, errorPrefix: c }) {
2217
- const s = Le.filter((u) => e[u.key] !== void 0).map((u) => u.key), l = Le.filter((u) => e[u.key] === void 0), p = Object.keys(e).filter((u) => !xe[u] && e[u] !== void 0), f = H[i].fg, m = (u, g) => {
2218
- t({
1514
+ function dr({ assertions: e, onChange: o, keyword: t, tone: i, errors: a, errorPrefix: c }) {
1515
+ const l = Oe.filter((f) => e[f.key] !== void 0).map((f) => f.key), s = Oe.filter((f) => e[f.key] === void 0), d = Object.keys(e).filter((f) => !ye[f] && e[f] !== void 0), u = U[i].fg, h = (f, b) => {
1516
+ o({
2219
1517
  ...e,
2220
- [u]: g
1518
+ [f]: b
2221
1519
  });
2222
- }, h = (u, g) => {
2223
- const x = { ...e };
2224
- delete x[u], t({
2225
- ...x,
2226
- [g]: cr[g]
1520
+ }, g = (f, b) => {
1521
+ const y = { ...e };
1522
+ delete y[f], o({
1523
+ ...y,
1524
+ [b]: cr[b]
2227
1525
  });
2228
- }, y = (u) => {
2229
- const g = { ...e };
2230
- delete g[u], t(g);
1526
+ }, x = (f) => {
1527
+ const b = { ...e };
1528
+ delete b[f], o(b);
2231
1529
  };
2232
- return /* @__PURE__ */ d(vo, { children: [
2233
- s.map((u) => {
2234
- const g = xe[u], x = a[`${c}assertion:${u}`];
2235
- return /* @__PURE__ */ d(dr, { children: [
2236
- /* @__PURE__ */ r(ur, {
2237
- style: { color: f },
2238
- children: o
1530
+ return /* @__PURE__ */ p(bt, { children: [
1531
+ l.map((f) => {
1532
+ const b = ye[f], y = a[`${c}assertion:${f}`];
1533
+ return /* @__PURE__ */ p(pr, { children: [
1534
+ /* @__PURE__ */ r(fr, {
1535
+ style: { color: u },
1536
+ children: t
2239
1537
  }),
2240
- /* @__PURE__ */ d(he, {
1538
+ /* @__PURE__ */ p(ge, {
2241
1539
  "aria-label": "Assertion kind",
2242
- value: u,
2243
- onChange: (C) => h(u, C.target.value),
1540
+ value: f,
1541
+ onChange: (R) => g(f, R.target.value),
2244
1542
  children: [/* @__PURE__ */ r("option", {
2245
- value: u,
2246
- children: u
2247
- }), l.map((C) => /* @__PURE__ */ r("option", {
2248
- value: C.key,
2249
- children: C.key
2250
- }, C.key))]
1543
+ value: f,
1544
+ children: f
1545
+ }), s.map((R) => /* @__PURE__ */ r("option", {
1546
+ value: R.key,
1547
+ children: R.key
1548
+ }, R.key))]
2251
1549
  }),
2252
- /* @__PURE__ */ r(ye, {
2253
- error: x,
2254
- children: /* @__PURE__ */ r(go, {
2255
- assertionKey: u,
2256
- value: e[u],
2257
- onChange: (C) => m(u, C)
1550
+ /* @__PURE__ */ r(xe, {
1551
+ error: y,
1552
+ children: /* @__PURE__ */ r(gt, {
1553
+ assertionKey: f,
1554
+ value: e[f],
1555
+ onChange: (R) => h(f, R)
2258
1556
  })
2259
1557
  }),
2260
- /* @__PURE__ */ r(fr, { children: g.hint }),
2261
- /* @__PURE__ */ r(mr, {
1558
+ /* @__PURE__ */ r(ur, { children: b.hint }),
1559
+ /* @__PURE__ */ r(hr, {
2262
1560
  type: "button",
2263
- "aria-label": `Remove ${u} assertion`,
2264
- onClick: () => y(u),
1561
+ "aria-label": `Remove ${f} assertion`,
1562
+ onClick: () => x(f),
2265
1563
  children: "×"
2266
1564
  })
2267
- ] }, u);
1565
+ ] }, f);
2268
1566
  }),
2269
- p.map((u) => /* @__PURE__ */ d(dr, { children: [
2270
- /* @__PURE__ */ r(ur, {
2271
- style: { color: f },
2272
- children: o
1567
+ d.map((f) => /* @__PURE__ */ p(pr, { children: [
1568
+ /* @__PURE__ */ r(fr, {
1569
+ style: { color: u },
1570
+ children: t
2273
1571
  }),
2274
- /* @__PURE__ */ r(bo, { children: u }),
2275
- /* @__PURE__ */ r(yo, { children: JSON.stringify(e[u]) }),
2276
- /* @__PURE__ */ r(fr, { children: "edit in the generated YAML" }),
2277
- /* @__PURE__ */ r(mr, {
1572
+ /* @__PURE__ */ r(mt, { children: f }),
1573
+ /* @__PURE__ */ r(vt, { children: JSON.stringify(e[f]) }),
1574
+ /* @__PURE__ */ r(ur, { children: "edit in the generated YAML" }),
1575
+ /* @__PURE__ */ r(hr, {
2278
1576
  type: "button",
2279
- "aria-label": `Remove ${u} assertion`,
2280
- onClick: () => y(u),
1577
+ "aria-label": `Remove ${f} assertion`,
1578
+ onClick: () => x(f),
2281
1579
  children: "×"
2282
1580
  })
2283
- ] }, u)),
2284
- l.length > 0 && /* @__PURE__ */ r(xo, {
1581
+ ] }, f)),
1582
+ s.length > 0 && /* @__PURE__ */ r(xt, {
2285
1583
  type: "button",
2286
- style: { color: f },
2287
- onClick: () => m(l[0].key, cr[l[0].key]),
1584
+ style: { color: u },
1585
+ onClick: () => h(s[0].key, cr[s[0].key]),
2288
1586
  children: "+ Add assertion"
2289
1587
  })
2290
1588
  ] });
2291
1589
  }
2292
- function go({ assertionKey: e, value: t, onChange: o }) {
2293
- const i = xe[e], a = `${e} value`;
1590
+ function gt({ assertionKey: e, value: o, onChange: t }) {
1591
+ const i = ye[e], a = `${e} value`;
2294
1592
  switch (i.kind) {
2295
1593
  case "casing":
2296
- return /* @__PURE__ */ r(he, {
1594
+ return /* @__PURE__ */ r(ge, {
2297
1595
  "aria-label": a,
2298
- value: t,
2299
- onChange: (c) => o(c.target.value),
2300
- children: ao.map((c) => /* @__PURE__ */ r("option", {
1596
+ value: o,
1597
+ onChange: (c) => t(c.target.value),
1598
+ children: at.map((c) => /* @__PURE__ */ r("option", {
2301
1599
  value: c,
2302
1600
  children: c
2303
1601
  }, c))
2304
1602
  });
2305
1603
  case "boolean":
2306
- return /* @__PURE__ */ d(he, {
1604
+ return /* @__PURE__ */ p(ge, {
2307
1605
  "aria-label": a,
2308
- value: String(!!t),
2309
- onChange: (c) => o(c.target.value === "true"),
1606
+ value: String(!!o),
1607
+ onChange: (c) => t(c.target.value === "true"),
2310
1608
  children: [/* @__PURE__ */ r("option", {
2311
1609
  value: "true",
2312
1610
  children: "yes"
@@ -2316,36 +1614,36 @@ function go({ assertionKey: e, value: t, onChange: o }) {
2316
1614
  })]
2317
1615
  });
2318
1616
  case "number":
2319
- return /* @__PURE__ */ r(le, {
1617
+ return /* @__PURE__ */ r(se, {
2320
1618
  type: "number",
2321
1619
  "aria-label": a,
2322
- value: t,
1620
+ value: o,
2323
1621
  min: 0,
2324
1622
  style: { width: 70 },
2325
- onChange: (c) => o(Number(c.target.value))
1623
+ onChange: (c) => t(Number(c.target.value))
2326
1624
  });
2327
1625
  case "regex":
2328
- return /* @__PURE__ */ r(Ae, {
1626
+ return /* @__PURE__ */ r(Le, {
2329
1627
  "aria-label": a,
2330
- value: t,
1628
+ value: o,
2331
1629
  placeholder: "/\\\\.$/",
2332
1630
  style: { width: 150 },
2333
- onChange: (c) => o(c.target.value)
1631
+ onChange: (c) => t(c.target.value)
2334
1632
  });
2335
1633
  case "stringList":
2336
- return /* @__PURE__ */ r(ke, {
1634
+ return /* @__PURE__ */ r(we, {
2337
1635
  ariaLabel: a,
2338
- values: t ?? [],
2339
- onChange: o
1636
+ values: o ?? [],
1637
+ onChange: t
2340
1638
  });
2341
1639
  case "refValue": {
2342
- const c = typeof t == "string" ? "pattern" : String(!!t);
2343
- return /* @__PURE__ */ d(X, { children: [/* @__PURE__ */ d(he, {
1640
+ const c = typeof o == "string" ? "pattern" : String(!!o);
1641
+ return /* @__PURE__ */ p(Q, { children: [/* @__PURE__ */ p(ge, {
2344
1642
  "aria-label": `${e} mode`,
2345
1643
  value: c,
2346
- onChange: (s) => {
2347
- const l = s.target.value;
2348
- o(l === "pattern" ? "" : l === "true");
1644
+ onChange: (l) => {
1645
+ const s = l.target.value;
1646
+ t(s === "pattern" ? "" : s === "true");
2349
1647
  },
2350
1648
  children: [
2351
1649
  /* @__PURE__ */ r("option", {
@@ -2361,29 +1659,29 @@ function go({ assertionKey: e, value: t, onChange: o }) {
2361
1659
  children: "$ref matches pattern…"
2362
1660
  })
2363
1661
  ]
2364
- }), c === "pattern" && /* @__PURE__ */ r(Ae, {
1662
+ }), c === "pattern" && /* @__PURE__ */ r(Le, {
2365
1663
  "aria-label": `${e} pattern`,
2366
- value: t,
1664
+ value: o,
2367
1665
  placeholder: "/components\\\\/schemas/",
2368
1666
  style: { width: 170 },
2369
- onChange: (s) => o(s.target.value)
1667
+ onChange: (l) => t(l.target.value)
2370
1668
  })] });
2371
1669
  }
2372
1670
  default:
2373
- return /* @__PURE__ */ r(le, {
1671
+ return /* @__PURE__ */ r(se, {
2374
1672
  "aria-label": a,
2375
- value: t ?? "",
1673
+ value: o ?? "",
2376
1674
  placeholder: "value",
2377
1675
  style: { width: 150 },
2378
- onChange: (c) => o(c.target.value)
1676
+ onChange: (c) => t(c.target.value)
2379
1677
  });
2380
1678
  }
2381
1679
  }
2382
- var vo = n.div`
1680
+ var bt = n.div`
2383
1681
  display: flex;
2384
1682
  flex-direction: column;
2385
1683
  gap: 8px;
2386
- `, dr = n.div`
1684
+ `, pr = n.div`
2387
1685
  display: flex;
2388
1686
  align-items: center;
2389
1687
  gap: 10px;
@@ -2393,28 +1691,28 @@ var vo = n.div`
2393
1691
  border: 1px solid var(--border-color-secondary, #e5e9f0);
2394
1692
  border-radius: 12px;
2395
1693
  padding: 8px 12px;
2396
- `, ur = n.span`
1694
+ `, fr = n.span`
2397
1695
  font-size: 13px;
2398
1696
  font-style: italic;
2399
1697
  flex-shrink: 0;
2400
- `, bo = n.span`
2401
- font-family: ${D};
1698
+ `, mt = n.span`
1699
+ font-family: ${z};
2402
1700
  font-size: 13px;
2403
1701
  font-weight: 600;
2404
- `, yo = n.code`
2405
- font-family: ${D};
1702
+ `, vt = n.code`
1703
+ font-family: ${z};
2406
1704
  font-size: 12px;
2407
1705
  color: var(--text-color-secondary, #64748b);
2408
1706
  overflow: hidden;
2409
1707
  text-overflow: ellipsis;
2410
1708
  white-space: nowrap;
2411
1709
  max-width: 260px;
2412
- `, fr = n.span`
1710
+ `, ur = n.span`
2413
1711
  font-size: 12px;
2414
1712
  color: var(--color-warm-grey-6, #94a3b8);
2415
1713
  flex: 1 1 140px;
2416
1714
  min-width: 120px;
2417
- `, mr = n.button`
1715
+ `, hr = n.button`
2418
1716
  background: none;
2419
1717
  border: none;
2420
1718
  cursor: pointer;
@@ -2430,7 +1728,7 @@ var vo = n.div`
2430
1728
  &:focus-visible {
2431
1729
  outline: 2px solid var(--color-primary-base, #2563eb);
2432
1730
  }
2433
- `, xo = n.button`
1731
+ `, xt = n.button`
2434
1732
  align-self: flex-start;
2435
1733
  background: none;
2436
1734
  border: none;
@@ -2444,11 +1742,11 @@ var vo = n.div`
2444
1742
  outline: 2px solid currentColor;
2445
1743
  }
2446
1744
  `;
2447
- function ko({ value: e, onChange: t }) {
2448
- return /* @__PURE__ */ r(Ue, {
1745
+ function yt({ value: e, onChange: o }) {
1746
+ return /* @__PURE__ */ r(He, {
2449
1747
  ariaLabel: "Severity",
2450
1748
  value: e,
2451
- onChange: t,
1749
+ onChange: o,
2452
1750
  options: [
2453
1751
  {
2454
1752
  value: "error",
@@ -2468,10 +1766,10 @@ function ko({ value: e, onChange: t }) {
2468
1766
  ]
2469
1767
  });
2470
1768
  }
2471
- var wo = n.div`
1769
+ var wt = n.div`
2472
1770
  position: relative;
2473
1771
  display: inline-block;
2474
- `, Eo = n.input`
1772
+ `, kt = n.input`
2475
1773
  font: inherit;
2476
1774
  font-size: 13px;
2477
1775
  font-weight: 600;
@@ -2492,7 +1790,7 @@ var wo = n.div`
2492
1790
  outline: none;
2493
1791
  border-color: var(--color-primary-base, #2563eb);
2494
1792
  }
2495
- `, $o = n.span`
1793
+ `, Ct = n.span`
2496
1794
  position: absolute;
2497
1795
  right: 7px;
2498
1796
  top: 50%;
@@ -2500,7 +1798,7 @@ var wo = n.div`
2500
1798
  pointer-events: none;
2501
1799
  font-size: 9px;
2502
1800
  color: var(--text-color-secondary, #64748b);
2503
- `, Co = n.ul`
1801
+ `, $t = n.ul`
2504
1802
  position: absolute;
2505
1803
  z-index: 30;
2506
1804
  top: calc(100% + 4px);
@@ -2515,144 +1813,144 @@ var wo = n.div`
2515
1813
  border: 1px solid var(--border-color-secondary, #e5e9f0);
2516
1814
  border-radius: 16px;
2517
1815
  box-shadow: 0 8px 24px rgba(15, 20, 40, 0.14);
2518
- `, So = n.li`
1816
+ `, Rt = n.li`
2519
1817
  padding: 5px 10px;
2520
1818
  border-radius: 5px;
2521
1819
  font-size: 13px;
2522
1820
  cursor: pointer;
2523
1821
  color: var(--text-color-primary, #1b2430);
2524
1822
  background: ${(e) => e.$active ? "var(--color-primary-bg, #eff4fe)" : "transparent"};
2525
- `, Ro = n.li`
1823
+ `, St = n.li`
2526
1824
  padding: 5px 10px;
2527
1825
  font-size: 12px;
2528
1826
  color: var(--text-color-secondary, #64748b);
2529
1827
  `;
2530
- function Io({ value: e, options: t, onChange: o, ariaLabel: i, placeholder: a, width: c }) {
2531
- const [s, l] = I(!1), [p, f] = I(null), [m, h] = I(0), y = A(null), u = A(null), g = Dr(), x = Y(() => {
2532
- if (p === null || p === "") return t;
2533
- const v = p.toLowerCase();
2534
- return t.filter((P) => P.toLowerCase().includes(v));
2535
- }, [t, p]);
2536
- N(() => {
2537
- if (!s) return;
2538
- const v = (P) => {
2539
- y.current?.contains(P.target) || (l(!1), f(null));
1828
+ function Et({ value: e, options: o, onChange: t, ariaLabel: i, placeholder: a, width: c }) {
1829
+ const [l, s] = M(!1), [d, u] = M(null), [h, g] = M(0), x = L(null), f = L(null), b = zr(), y = G(() => {
1830
+ if (d === null || d === "") return o;
1831
+ const m = d.toLowerCase();
1832
+ return o.filter((A) => A.toLowerCase().includes(m));
1833
+ }, [o, d]);
1834
+ D(() => {
1835
+ if (!l) return;
1836
+ const m = (A) => {
1837
+ x.current?.contains(A.target) || (s(!1), u(null));
2540
1838
  };
2541
- return document.addEventListener("pointerdown", v), () => document.removeEventListener("pointerdown", v);
2542
- }, [s]), N(() => {
2543
- s && u.current?.children[m]?.scrollIntoView({ block: "nearest" });
2544
- }, [m, s]);
2545
- const C = (v) => {
2546
- o(v), l(!1), f(null);
2547
- }, $ = (v) => {
2548
- if (!s && (v.key === "ArrowDown" || v.key === "Enter")) {
2549
- l(!0), h(Math.max(0, x.indexOf(e))), v.preventDefault();
1839
+ return document.addEventListener("pointerdown", m), () => document.removeEventListener("pointerdown", m);
1840
+ }, [l]), D(() => {
1841
+ l && f.current?.children[h]?.scrollIntoView({ block: "nearest" });
1842
+ }, [h, l]);
1843
+ const R = (m) => {
1844
+ t(m), s(!1), u(null);
1845
+ }, $ = (m) => {
1846
+ if (!l && (m.key === "ArrowDown" || m.key === "Enter")) {
1847
+ s(!0), g(Math.max(0, y.indexOf(e))), m.preventDefault();
2550
1848
  return;
2551
1849
  }
2552
- if (s)
2553
- switch (v.key) {
1850
+ if (l)
1851
+ switch (m.key) {
2554
1852
  case "ArrowDown":
2555
- h((P) => Math.min(P + 1, x.length - 1)), v.preventDefault();
1853
+ g((A) => Math.min(A + 1, y.length - 1)), m.preventDefault();
2556
1854
  break;
2557
1855
  case "ArrowUp":
2558
- h((P) => Math.max(P - 1, 0)), v.preventDefault();
1856
+ g((A) => Math.max(A - 1, 0)), m.preventDefault();
2559
1857
  break;
2560
1858
  case "Enter":
2561
- x[m] && C(x[m]), v.preventDefault();
1859
+ y[h] && R(y[h]), m.preventDefault();
2562
1860
  break;
2563
1861
  case "Escape":
2564
- l(!1), f(null), v.preventDefault();
1862
+ s(!1), u(null), m.preventDefault();
2565
1863
  }
2566
1864
  };
2567
- return /* @__PURE__ */ d(wo, {
2568
- ref: y,
1865
+ return /* @__PURE__ */ p(wt, {
1866
+ ref: x,
2569
1867
  children: [
2570
- /* @__PURE__ */ r(Eo, {
1868
+ /* @__PURE__ */ r(kt, {
2571
1869
  role: "combobox",
2572
- "aria-expanded": s,
2573
- "aria-controls": g,
1870
+ "aria-expanded": l,
1871
+ "aria-controls": b,
2574
1872
  "aria-autocomplete": "list",
2575
1873
  "aria-label": i,
2576
- "aria-activedescendant": s ? `${g}-${m}` : void 0,
2577
- value: p ?? e,
1874
+ "aria-activedescendant": l ? `${b}-${h}` : void 0,
1875
+ value: d ?? e,
2578
1876
  placeholder: a ?? "Select...",
2579
1877
  style: c ? { width: c } : void 0,
2580
- onChange: (v) => {
2581
- f(v.target.value), h(0), l(!0);
1878
+ onChange: (m) => {
1879
+ u(m.target.value), g(0), s(!0);
2582
1880
  },
2583
1881
  onClick: () => {
2584
- l((v) => !v), h(Math.max(0, x.indexOf(e)));
1882
+ s((m) => !m), g(Math.max(0, y.indexOf(e)));
2585
1883
  },
2586
1884
  onKeyDown: $,
2587
1885
  onBlur: () => {
2588
- setTimeout(() => f(null), 150);
1886
+ setTimeout(() => u(null), 150);
2589
1887
  }
2590
1888
  }),
2591
- /* @__PURE__ */ r($o, {
1889
+ /* @__PURE__ */ r(Ct, {
2592
1890
  "aria-hidden": !0,
2593
1891
  children: "▾"
2594
1892
  }),
2595
- s && /* @__PURE__ */ d(Co, {
1893
+ l && /* @__PURE__ */ p($t, {
2596
1894
  role: "listbox",
2597
- id: g,
2598
- ref: u,
2599
- children: [x.length === 0 && /* @__PURE__ */ r(Ro, { children: "No matches" }), x.map((v, P) => /* @__PURE__ */ r(So, {
2600
- id: `${g}-${P}`,
1895
+ id: b,
1896
+ ref: f,
1897
+ children: [y.length === 0 && /* @__PURE__ */ r(St, { children: "No matches" }), y.map((m, A) => /* @__PURE__ */ r(Rt, {
1898
+ id: `${b}-${A}`,
2601
1899
  role: "option",
2602
- "aria-selected": v === e,
2603
- $active: P === m,
2604
- onMouseEnter: () => h(P),
2605
- onMouseDown: (b) => {
2606
- b.preventDefault(), C(v);
1900
+ "aria-selected": m === e,
1901
+ $active: A === h,
1902
+ onMouseEnter: () => g(A),
1903
+ onMouseDown: (v) => {
1904
+ v.preventDefault(), R(m);
2607
1905
  },
2608
- children: v
2609
- }, v))]
1906
+ children: m
1907
+ }, m))]
2610
1908
  })
2611
1909
  ]
2612
1910
  });
2613
1911
  }
2614
- function Me(e) {
1912
+ function Pe(e) {
2615
1913
  return e ? Array.isArray(e) ? e.join(", ") : e : "";
2616
1914
  }
2617
- function hr(e) {
2618
- const t = e.split(",").map((o) => o.trim()).filter(Boolean);
2619
- if (t.length !== 0)
2620
- return t.length === 1 ? t[0] : t;
1915
+ function gr(e) {
1916
+ const o = e.split(",").map((t) => t.trim()).filter(Boolean);
1917
+ if (o.length !== 0)
1918
+ return o.length === 1 ? o[0] : o;
2621
1919
  }
2622
- function gr({ subject: e, onChange: t, lead: o, ariaPrefix: i, errors: a, errorPrefix: c }) {
2623
- const s = Sr(e), l = !!(e.filterInParentKeys?.length || e.filterOutParentKeys?.length || e.matchParentKeys), [p, f] = I(l), [m, h] = I(Me(e.property)), y = A(Me(e.property)), u = (g) => {
2624
- if (g === "node")
2625
- s && (y.current = Me(e.property)), h(""), t({
1920
+ function br({ subject: e, onChange: o, lead: t, ariaPrefix: i, errors: a, errorPrefix: c }) {
1921
+ const l = Sr(e), s = !!(e.filterInParentKeys?.length || e.filterOutParentKeys?.length || e.matchParentKeys), [d, u] = M(s), [h, g] = M(Pe(e.property)), x = L(Pe(e.property)), f = (b) => {
1922
+ if (b === "node")
1923
+ l && (x.current = Pe(e.property)), g(""), o({
2626
1924
  ...e,
2627
1925
  property: void 0
2628
1926
  });
2629
1927
  else {
2630
- const x = y.current;
2631
- h(x), t({
1928
+ const y = x.current;
1929
+ g(y), o({
2632
1930
  ...e,
2633
- property: hr(x) ?? ""
1931
+ property: gr(y) ?? ""
2634
1932
  });
2635
1933
  }
2636
1934
  };
2637
- return /* @__PURE__ */ d(X, { children: [/* @__PURE__ */ d(ce, { children: [
2638
- /* @__PURE__ */ r("span", { children: o }),
2639
- /* @__PURE__ */ r(ye, {
1935
+ return /* @__PURE__ */ p(Q, { children: [/* @__PURE__ */ p(ce, { children: [
1936
+ /* @__PURE__ */ r("span", { children: t }),
1937
+ /* @__PURE__ */ r(xe, {
2640
1938
  error: a[`${c}type`],
2641
- children: /* @__PURE__ */ r(Io, {
1939
+ children: /* @__PURE__ */ r(Et, {
2642
1940
  ariaLabel: `${i} node type`,
2643
1941
  value: e.type,
2644
- options: so,
2645
- onChange: (g) => t({
1942
+ options: lt,
1943
+ onChange: (b) => o({
2646
1944
  ...e,
2647
- type: g
1945
+ type: b
2648
1946
  })
2649
1947
  })
2650
1948
  }),
2651
1949
  /* @__PURE__ */ r("span", { children: "node, check" }),
2652
- /* @__PURE__ */ r(Ue, {
1950
+ /* @__PURE__ */ r(He, {
2653
1951
  ariaLabel: `${i} target`,
2654
- value: s || e.property === "" ? "property" : "node",
2655
- onChange: u,
1952
+ value: l || e.property === "" ? "property" : "node",
1953
+ onChange: f,
2656
1954
  options: [{
2657
1955
  value: "node",
2658
1956
  label: "whole node"
@@ -2661,67 +1959,67 @@ function gr({ subject: e, onChange: t, lead: o, ariaPrefix: i, errors: a, errorP
2661
1959
  label: "single property"
2662
1960
  }]
2663
1961
  }),
2664
- (s || e.property === "") && /* @__PURE__ */ r(le, {
1962
+ (l || e.property === "") && /* @__PURE__ */ r(se, {
2665
1963
  "aria-label": `${i} property name`,
2666
- value: m,
1964
+ value: h,
2667
1965
  placeholder: "e.g. summary",
2668
1966
  style: { width: 140 },
2669
- onChange: (g) => {
2670
- h(g.target.value), t({
1967
+ onChange: (b) => {
1968
+ g(b.target.value), o({
2671
1969
  ...e,
2672
- property: hr(g.target.value) ?? ""
1970
+ property: gr(b.target.value) ?? ""
2673
1971
  });
2674
1972
  }
2675
1973
  })
2676
- ] }), /* @__PURE__ */ d(Mo, { children: [/* @__PURE__ */ d(Po, {
1974
+ ] }), /* @__PURE__ */ p(Mt, { children: [/* @__PURE__ */ p(Pt, {
2677
1975
  type: "button",
2678
- "aria-expanded": p,
2679
- onClick: () => f((g) => !g),
1976
+ "aria-expanded": d,
1977
+ onClick: () => u((b) => !b),
2680
1978
  children: [
2681
- /* @__PURE__ */ r($r, { open: p }),
1979
+ /* @__PURE__ */ r($r, { open: d }),
2682
1980
  " Advanced",
2683
- !p && l && /* @__PURE__ */ r(To, { title: "Parent-key filters are set" })
1981
+ !d && s && /* @__PURE__ */ r(At, { title: "Parent-key filters are set" })
2684
1982
  ]
2685
- }), p && /* @__PURE__ */ d(Ao, { children: [
2686
- /* @__PURE__ */ d(Pe, { children: [/* @__PURE__ */ r(se, { children: "under parent keys" }), /* @__PURE__ */ r(ke, {
1983
+ }), d && /* @__PURE__ */ p(It, { children: [
1984
+ /* @__PURE__ */ p(Ae, { children: [/* @__PURE__ */ r(le, { children: "under parent keys" }), /* @__PURE__ */ r(we, {
2687
1985
  ariaLabel: `${i} filterInParentKeys`,
2688
1986
  values: e.filterInParentKeys ?? [],
2689
1987
  placeholder: "post, put…",
2690
- onChange: (g) => t({
1988
+ onChange: (b) => o({
2691
1989
  ...e,
2692
- filterInParentKeys: g.length ? g : void 0
1990
+ filterInParentKeys: b.length ? b : void 0
2693
1991
  })
2694
1992
  })] }),
2695
- /* @__PURE__ */ d(Pe, { children: [/* @__PURE__ */ r(se, { children: "not under parent keys" }), /* @__PURE__ */ r(ke, {
1993
+ /* @__PURE__ */ p(Ae, { children: [/* @__PURE__ */ r(le, { children: "not under parent keys" }), /* @__PURE__ */ r(we, {
2696
1994
  ariaLabel: `${i} filterOutParentKeys`,
2697
1995
  values: e.filterOutParentKeys ?? [],
2698
1996
  placeholder: "none",
2699
- onChange: (g) => t({
1997
+ onChange: (b) => o({
2700
1998
  ...e,
2701
- filterOutParentKeys: g.length ? g : void 0
1999
+ filterOutParentKeys: b.length ? b : void 0
2702
2000
  })
2703
2001
  })] }),
2704
- /* @__PURE__ */ d(Pe, { children: [/* @__PURE__ */ r(se, { children: "under parent keys matching" }), /* @__PURE__ */ r(ye, {
2002
+ /* @__PURE__ */ p(Ae, { children: [/* @__PURE__ */ r(le, { children: "under parent keys matching" }), /* @__PURE__ */ r(xe, {
2705
2003
  error: a[`${c}matchParentKeys`],
2706
- children: /* @__PURE__ */ r(Ae, {
2004
+ children: /* @__PURE__ */ r(Le, {
2707
2005
  "aria-label": `${i} matchParentKeys regex`,
2708
2006
  value: e.matchParentKeys ?? "",
2709
2007
  placeholder: "^x-",
2710
2008
  style: { width: 140 },
2711
- onChange: (g) => t({
2009
+ onChange: (b) => o({
2712
2010
  ...e,
2713
- matchParentKeys: g.target.value || void 0
2011
+ matchParentKeys: b.target.value || void 0
2714
2012
  })
2715
2013
  })
2716
2014
  })] })
2717
2015
  ] })] })] });
2718
2016
  }
2719
- var Mo = n.div`
2017
+ var Mt = n.div`
2720
2018
  margin-top: 10px;
2721
2019
  border: 1px solid var(--border-color-secondary, #e5e9f0);
2722
2020
  border-radius: 12px;
2723
2021
  overflow: hidden;
2724
- `, Po = n.button`
2022
+ `, Pt = n.button`
2725
2023
  width: 100%;
2726
2024
  display: flex;
2727
2025
  align-items: center;
@@ -2744,100 +2042,100 @@ var Mo = n.div`
2744
2042
  outline: 2px solid var(--color-primary-base, #2563eb);
2745
2043
  outline-offset: -2px;
2746
2044
  }
2747
- `, To = n.span`
2045
+ `, At = n.span`
2748
2046
  width: 6px;
2749
2047
  height: 6px;
2750
2048
  border-radius: 50%;
2751
2049
  background: var(--color-primary-base, #2563eb);
2752
- `, Ao = n.div`
2050
+ `, It = n.div`
2753
2051
  border-top: 1px solid var(--border-color-secondary, #e5e9f0);
2754
2052
  padding: 6px 8px;
2755
2053
  display: flex;
2756
2054
  flex-direction: column;
2757
2055
  gap: 2px;
2758
- `, Pe = n(ce)`
2056
+ `, Ae = n(ce)`
2759
2057
  padding: 3px 4px;
2760
2058
  border-radius: 8px;
2761
2059
 
2762
2060
  &:hover {
2763
2061
  background: var(--color-warm-grey-1, #fbfbfc);
2764
2062
  }
2765
- `, Do = {
2063
+ `, Lt = {
2766
2064
  subject: { type: "PathItem" },
2767
2065
  assertions: { defined: !0 }
2768
2066
  };
2769
- function Lo({ entry: e, selected: t, matchCount: o, isDuplicateName: i, isEvaluating: a, onToggle: c, onChange: s, onRemove: l }) {
2770
- const { name: p, rule: f } = e, m = A(null), h = Y(() => po(p, f), [p, f]), y = (b) => {
2771
- s({
2067
+ function zt({ entry: e, selected: o, matchCount: t, isDuplicateName: i, isEvaluating: a, onToggle: c, onChange: l, onRemove: s }) {
2068
+ const { name: d, rule: u } = e, h = L(null), g = G(() => dt(d, u), [d, u]), x = (v) => {
2069
+ l({
2772
2070
  ...e,
2773
2071
  rule: {
2774
- ...f,
2775
- ...b
2072
+ ...u,
2073
+ ...v
2776
2074
  }
2777
2075
  });
2778
- }, u = f.where ?? [], g = A([]);
2779
- for (; g.current.length < u.length; ) g.current.push(we());
2780
- g.current.length > u.length && (g.current.length = u.length);
2781
- const x = (b, R) => {
2782
- const T = [...u];
2783
- T[b] = R, y({ where: T });
2784
- }, C = (b) => {
2785
- g.current.splice(b, 1), y({ where: u.filter((R, T) => T !== b) });
2786
- }, $ = (b) => {
2787
- const R = m.current, T = f.message ?? "", _ = R?.selectionStart ?? T.length;
2788
- y({ message: T.slice(0, _) + b + T.slice(_) }), requestAnimationFrame(() => {
2789
- R?.focus(), R?.setSelectionRange(_ + b.length, _ + b.length);
2076
+ }, f = u.where ?? [], b = L([]);
2077
+ for (; b.current.length < f.length; ) b.current.push(ke());
2078
+ b.current.length > f.length && (b.current.length = f.length);
2079
+ const y = (v, E) => {
2080
+ const I = [...f];
2081
+ I[v] = E, x({ where: I });
2082
+ }, R = (v) => {
2083
+ b.current.splice(v, 1), x({ where: f.filter((E, I) => I !== v) });
2084
+ }, $ = (v) => {
2085
+ const E = h.current, I = u.message ?? "", W = E?.selectionStart ?? I.length;
2086
+ x({ message: I.slice(0, W) + v + I.slice(W) }), requestAnimationFrame(() => {
2087
+ E?.focus(), E?.setSelectionRange(W + v.length, W + v.length);
2790
2088
  });
2791
- }, v = h.name ?? (i ? "Rule names must be unique" : void 0), P = f.severity ?? "error";
2792
- return /* @__PURE__ */ d(Oo, {
2793
- $selected: t,
2794
- children: [/* @__PURE__ */ d(zo, {
2089
+ }, m = g.name ?? (i ? "Rule names must be unique" : void 0), A = u.severity ?? "error";
2090
+ return /* @__PURE__ */ p(Ot, {
2091
+ $selected: o,
2092
+ children: [/* @__PURE__ */ p(Tt, {
2795
2093
  onClick: c,
2796
2094
  children: [
2797
- /* @__PURE__ */ r(Bo, {
2095
+ /* @__PURE__ */ r(Nt, {
2798
2096
  type: "button",
2799
- "aria-expanded": t,
2800
- "aria-label": `${t ? "Collapse" : "Expand"} rule ${p}`,
2801
- onClick: (b) => {
2802
- b.stopPropagation(), c();
2097
+ "aria-expanded": o,
2098
+ "aria-label": `${o ? "Collapse" : "Expand"} rule ${d}`,
2099
+ onClick: (v) => {
2100
+ v.stopPropagation(), c();
2803
2101
  },
2804
- children: /* @__PURE__ */ r($r, { open: t })
2102
+ children: /* @__PURE__ */ r($r, { open: o })
2805
2103
  }),
2806
- /* @__PURE__ */ d(No, {
2807
- onClick: (b) => t && b.stopPropagation(),
2808
- children: [/* @__PURE__ */ r(jo, { children: "rule/" }), t ? /* @__PURE__ */ r(ye, {
2809
- error: v,
2104
+ /* @__PURE__ */ p(Bt, {
2105
+ onClick: (v) => o && v.stopPropagation(),
2106
+ children: [/* @__PURE__ */ r(Dt, { children: "rule/" }), o ? /* @__PURE__ */ r(xe, {
2107
+ error: m,
2810
2108
  style: { flex: 1 },
2811
- children: /* @__PURE__ */ r(qo, {
2109
+ children: /* @__PURE__ */ r(Kt, {
2812
2110
  "aria-label": "Rule name",
2813
- value: p,
2814
- onChange: (b) => s({
2111
+ value: d,
2112
+ onChange: (v) => l({
2815
2113
  ...e,
2816
- name: b.target.value.replace(/\s+/g, "-")
2114
+ name: v.target.value.replace(/\s+/g, "-")
2817
2115
  })
2818
2116
  })
2819
- }) : /* @__PURE__ */ r(Fo, { children: p })]
2117
+ }) : /* @__PURE__ */ r(jt, { children: d })]
2820
2118
  }),
2821
- /* @__PURE__ */ d(_o, { children: [
2822
- t ? /* @__PURE__ */ r(ko, {
2823
- value: P,
2824
- onChange: (b) => y({ severity: b })
2825
- }) : /* @__PURE__ */ r(ge, {
2119
+ /* @__PURE__ */ p(Ft, { children: [
2120
+ o ? /* @__PURE__ */ r(yt, {
2121
+ value: A,
2122
+ onChange: (v) => x({ severity: v })
2123
+ }) : /* @__PURE__ */ r(be, {
2826
2124
  style: {
2827
- background: F[P].bg,
2828
- color: F[P].fg
2125
+ background: F[A].bg,
2126
+ color: F[A].fg
2829
2127
  },
2830
- children: P
2128
+ children: A
2831
2129
  }),
2832
- o > 0 ? /* @__PURE__ */ d(ge, {
2130
+ t > 0 ? /* @__PURE__ */ p(be, {
2833
2131
  $dim: a,
2834
2132
  title: "Nodes matched in the current document",
2835
2133
  style: {
2836
- background: be.bg,
2837
- color: be.fg
2134
+ background: ve.bg,
2135
+ color: ve.fg
2838
2136
  },
2839
- children: [o, " matched"]
2840
- }, o) : /* @__PURE__ */ r(ge, {
2137
+ children: [t, " matched"]
2138
+ }, t) : /* @__PURE__ */ r(be, {
2841
2139
  $dim: a,
2842
2140
  title: "The subject and where conditions match no nodes in this document",
2843
2141
  style: {
@@ -2846,12 +2144,12 @@ function Lo({ entry: e, selected: t, matchCount: o, isDuplicateName: i, isEvalua
2846
2144
  },
2847
2145
  children: "no matches"
2848
2146
  }, "none"),
2849
- /* @__PURE__ */ r(Ko, {
2147
+ /* @__PURE__ */ r(Wt, {
2850
2148
  type: "button",
2851
- "aria-label": `Remove rule ${p}`,
2149
+ "aria-label": `Remove rule ${d}`,
2852
2150
  title: "Remove rule",
2853
- onClick: (b) => {
2854
- b.stopPropagation(), l();
2151
+ onClick: (v) => {
2152
+ v.stopPropagation(), s();
2855
2153
  },
2856
2154
  children: /* @__PURE__ */ r("svg", {
2857
2155
  width: "12",
@@ -2868,64 +2166,64 @@ function Lo({ entry: e, selected: t, matchCount: o, isDuplicateName: i, isEvalua
2868
2166
  })
2869
2167
  ] })
2870
2168
  ]
2871
- }), t && /* @__PURE__ */ d(Uo, { children: [
2169
+ }), o && /* @__PURE__ */ p(_t, { children: [
2872
2170
  /* @__PURE__ */ r(ne, {
2873
2171
  tone: "subject",
2874
2172
  label: "Subject",
2875
2173
  hint: "what the rule checks",
2876
- children: /* @__PURE__ */ r(gr, {
2174
+ children: /* @__PURE__ */ r(br, {
2877
2175
  lead: "On each",
2878
- subject: f.subject,
2176
+ subject: u.subject,
2879
2177
  ariaPrefix: "Subject",
2880
- errors: h,
2178
+ errors: g,
2881
2179
  errorPrefix: "subject.",
2882
- onChange: (b) => y({ subject: b })
2180
+ onChange: (v) => x({ subject: v })
2883
2181
  })
2884
2182
  }),
2885
- /* @__PURE__ */ d(ne, {
2183
+ /* @__PURE__ */ p(ne, {
2886
2184
  tone: "where",
2887
2185
  label: "Where",
2888
2186
  hint: "narrows top-to-bottom — each condition is a descendant of the previous one",
2889
- children: [u.map((b, R) => /* @__PURE__ */ d(Wo, {
2890
- style: { marginTop: R ? 8 : 0 },
2187
+ children: [f.map((v, E) => /* @__PURE__ */ p(Ht, {
2188
+ style: { marginTop: E ? 8 : 0 },
2891
2189
  children: [
2892
- /* @__PURE__ */ d(Ho, { children: [
2893
- /* @__PURE__ */ r(Go, { children: "where" }),
2894
- R > 0 && /* @__PURE__ */ d(Yo, { children: ["descendant of condition ", R] }),
2895
- /* @__PURE__ */ r(Vo, {
2190
+ /* @__PURE__ */ p(qt, { children: [
2191
+ /* @__PURE__ */ r(Ut, { children: "where" }),
2192
+ E > 0 && /* @__PURE__ */ p(Yt, { children: ["descendant of condition ", E] }),
2193
+ /* @__PURE__ */ r(Gt, {
2896
2194
  type: "button",
2897
- "aria-label": `Remove where condition ${R + 1}`,
2898
- onClick: () => C(R),
2195
+ "aria-label": `Remove where condition ${E + 1}`,
2196
+ onClick: () => R(E),
2899
2197
  children: "×"
2900
2198
  })
2901
2199
  ] }),
2902
- /* @__PURE__ */ r(gr, {
2200
+ /* @__PURE__ */ r(br, {
2903
2201
  lead: "inside a",
2904
- subject: b.subject,
2905
- ariaPrefix: `Where ${R + 1}`,
2906
- errors: h,
2907
- errorPrefix: `where:${R}.`,
2908
- onChange: (T) => x(R, {
2909
- ...b,
2910
- subject: T
2202
+ subject: v.subject,
2203
+ ariaPrefix: `Where ${E + 1}`,
2204
+ errors: g,
2205
+ errorPrefix: `where:${E}.`,
2206
+ onChange: (I) => y(E, {
2207
+ ...v,
2208
+ subject: I
2911
2209
  })
2912
2210
  }),
2913
- /* @__PURE__ */ r(pr, {
2211
+ /* @__PURE__ */ r(dr, {
2914
2212
  tone: "where",
2915
2213
  keyword: "that satisfies",
2916
- assertions: b.assertions,
2917
- errors: h,
2918
- errorPrefix: `where:${R}.`,
2919
- onChange: (T) => x(R, {
2920
- ...b,
2921
- assertions: T
2214
+ assertions: v.assertions,
2215
+ errors: g,
2216
+ errorPrefix: `where:${E}.`,
2217
+ onChange: (I) => y(E, {
2218
+ ...v,
2219
+ assertions: I
2922
2220
  })
2923
2221
  })
2924
2222
  ]
2925
- }, g.current[R])), /* @__PURE__ */ r(Jo, {
2223
+ }, b.current[E])), /* @__PURE__ */ r(Vt, {
2926
2224
  type: "button",
2927
- $tone: H.where.fg,
2928
- onClick: () => y({ where: [...u, structuredClone(Do)] }),
2225
+ $tone: U.where.fg,
2226
+ onClick: () => x({ where: [...f, structuredClone(Lt)] }),
2929
2227
  children: "+ Add condition"
2930
2228
  })]
2931
2229
  }),
@@ -2933,41 +2231,41 @@ function Lo({ entry: e, selected: t, matchCount: o, isDuplicateName: i, isEvalua
2933
2231
  tone: "assert",
2934
2232
  label: "Assert",
2935
2233
  hint: "flags a problem when an assertion evaluates to false",
2936
- children: /* @__PURE__ */ r(pr, {
2234
+ children: /* @__PURE__ */ r(dr, {
2937
2235
  tone: "assert",
2938
2236
  keyword: "assert",
2939
- assertions: f.assertions,
2940
- errors: h,
2237
+ assertions: u.assertions,
2238
+ errors: g,
2941
2239
  errorPrefix: "",
2942
- onChange: (b) => y({ assertions: b })
2240
+ onChange: (v) => x({ assertions: v })
2943
2241
  })
2944
2242
  }),
2945
- /* @__PURE__ */ d(ne, {
2243
+ /* @__PURE__ */ p(ne, {
2946
2244
  tone: "message",
2947
2245
  label: "Message",
2948
2246
  hint: "optional — click a placeholder to insert it",
2949
2247
  children: [
2950
- /* @__PURE__ */ d(ce, { children: [/* @__PURE__ */ r(se, { children: "message" }), /* @__PURE__ */ r(Qo, {
2951
- ref: m,
2248
+ /* @__PURE__ */ p(ce, { children: [/* @__PURE__ */ r(le, { children: "message" }), /* @__PURE__ */ r(Jt, {
2249
+ ref: h,
2952
2250
  "aria-label": "Problem message",
2953
2251
  rows: 1,
2954
- value: f.message ?? "",
2252
+ value: u.message ?? "",
2955
2253
  placeholder: "Problem message (optional)",
2956
- onChange: (b) => y({ message: b.target.value || void 0 })
2254
+ onChange: (v) => x({ message: v.target.value || void 0 })
2957
2255
  })] }),
2958
- /* @__PURE__ */ r(Xo, { children: lo.map((b) => /* @__PURE__ */ r(Zo, {
2256
+ /* @__PURE__ */ r(Xt, { children: st.map((v) => /* @__PURE__ */ r(Qt, {
2959
2257
  type: "button",
2960
- onClick: () => $(b),
2961
- children: b
2962
- }, b)) }),
2963
- /* @__PURE__ */ d(ce, {
2258
+ onClick: () => $(v),
2259
+ children: v
2260
+ }, v)) }),
2261
+ /* @__PURE__ */ p(ce, {
2964
2262
  style: { marginTop: 8 },
2965
- children: [/* @__PURE__ */ r(se, { children: "reference" }), /* @__PURE__ */ r(le, {
2263
+ children: [/* @__PURE__ */ r(le, { children: "reference" }), /* @__PURE__ */ r(se, {
2966
2264
  "aria-label": "Reference link",
2967
- value: f.reference ?? "",
2265
+ value: u.reference ?? "",
2968
2266
  placeholder: "Link to the style guide entry (optional)",
2969
2267
  style: { flex: 1 },
2970
- onChange: (b) => y({ reference: b.target.value || void 0 })
2268
+ onChange: (v) => x({ reference: v.target.value || void 0 })
2971
2269
  })]
2972
2270
  })
2973
2271
  ]
@@ -2976,34 +2274,34 @@ function Lo({ entry: e, selected: t, matchCount: o, isDuplicateName: i, isEvalua
2976
2274
  tone: "suggest",
2977
2275
  label: "Suggest",
2978
2276
  hint: "suggestions to display when the problem occurs",
2979
- children: /* @__PURE__ */ r(ke, {
2277
+ children: /* @__PURE__ */ r(we, {
2980
2278
  ariaLabel: "Suggestions",
2981
- values: f.suggest ?? [],
2279
+ values: u.suggest ?? [],
2982
2280
  placeholder: "add a suggestion…",
2983
- onChange: (b) => y({ suggest: b.length ? b : void 0 })
2281
+ onChange: (v) => x({ suggest: v.length ? v : void 0 })
2984
2282
  })
2985
2283
  })
2986
2284
  ] })]
2987
2285
  });
2988
2286
  }
2989
- var Oo = n.div`
2287
+ var Ot = n.div`
2990
2288
  background: var(--bg-color, #ffffff);
2991
2289
  border: 1px solid var(--border-color-secondary, #e5e9f0);
2992
2290
  border-radius: 16px;
2993
2291
  overflow: hidden;
2994
2292
  flex-shrink: 0;
2995
2293
 
2996
- ${(e) => e.$selected && Ne`
2294
+ ${(e) => e.$selected && De`
2997
2295
  border-color: var(--color-primary-base, #2563eb);
2998
2296
  `}
2999
- `, zo = n.div`
2297
+ `, Tt = n.div`
3000
2298
  display: flex;
3001
2299
  align-items: center;
3002
2300
  gap: 10px;
3003
2301
  padding: 11px 14px;
3004
2302
  cursor: pointer;
3005
2303
  min-width: 0;
3006
- `, Bo = n.button`
2304
+ `, Nt = n.button`
3007
2305
  display: inline-flex;
3008
2306
  align-items: center;
3009
2307
  justify-content: center;
@@ -3023,22 +2321,22 @@ var Oo = n.div`
3023
2321
  &:focus-visible {
3024
2322
  outline: 2px solid var(--color-primary-base, #2563eb);
3025
2323
  }
3026
- `, No = n.div`
2324
+ `, Bt = n.div`
3027
2325
  display: flex;
3028
2326
  align-items: center;
3029
2327
  gap: 6px;
3030
2328
  min-width: 0;
3031
2329
  flex: 1;
3032
- `, jo = n.span`
2330
+ `, Dt = n.span`
3033
2331
  color: var(--color-warm-grey-6, #94a3b8);
3034
- font-family: ${D};
2332
+ font-family: ${z};
3035
2333
  font-size: 13px;
3036
2334
  flex-shrink: 0;
3037
- `, qo = n.input`
2335
+ `, Kt = n.input`
3038
2336
  border: none;
3039
2337
  border-bottom: 1px dashed var(--border-color-primary, #d6dde8);
3040
2338
  background: transparent;
3041
- font-family: ${D};
2339
+ font-family: ${z};
3042
2340
  font-size: 13px;
3043
2341
  color: inherit;
3044
2342
  outline: none;
@@ -3049,20 +2347,20 @@ var Oo = n.div`
3049
2347
  &:focus {
3050
2348
  border-bottom-color: var(--color-primary-base, #2563eb);
3051
2349
  }
3052
- `, Fo = n.span`
3053
- font-family: ${D};
2350
+ `, jt = n.span`
2351
+ font-family: ${z};
3054
2352
  font-size: 13px;
3055
2353
  font-weight: 600;
3056
2354
  overflow: hidden;
3057
2355
  text-overflow: ellipsis;
3058
2356
  white-space: nowrap;
3059
- `, _o = n.div`
2357
+ `, Ft = n.div`
3060
2358
  display: flex;
3061
2359
  align-items: center;
3062
2360
  gap: 8px;
3063
2361
  flex-shrink: 0;
3064
2362
  margin-left: auto;
3065
- `, ge = n.span`
2363
+ `, be = n.span`
3066
2364
  font-size: 12px;
3067
2365
  font-weight: 600;
3068
2366
  border-radius: 999px;
@@ -3084,7 +2382,7 @@ var Oo = n.div`
3084
2382
  transform: scale(1);
3085
2383
  }
3086
2384
  }
3087
- `, Ko = n.button`
2385
+ `, Wt = n.button`
3088
2386
  width: 28px;
3089
2387
  height: 28px;
3090
2388
  border-radius: 8px;
@@ -3106,31 +2404,31 @@ var Oo = n.div`
3106
2404
  &:focus-visible {
3107
2405
  outline: 2px solid var(--color-primary-base, #2563eb);
3108
2406
  }
3109
- `, Uo = n.div`
2407
+ `, _t = n.div`
3110
2408
  padding: 2px 16px 14px;
3111
2409
  border-top: 1px solid var(--border-color-secondary, #e5e9f0);
3112
- `, Wo = n.div`
2410
+ `, Ht = n.div`
3113
2411
  display: flex;
3114
2412
  flex-direction: column;
3115
2413
  gap: 8px;
3116
2414
  background: var(--color-warm-grey-1, #fbfbfc);
3117
2415
  border: 1px solid var(--border-color-secondary, #e5e9f0);
3118
- border-left: 3px solid ${H.where.fg};
2416
+ border-left: 3px solid ${U.where.fg};
3119
2417
  border-radius: 12px;
3120
2418
  padding: 10px 14px;
3121
- `, Ho = n.div`
2419
+ `, qt = n.div`
3122
2420
  display: flex;
3123
2421
  align-items: center;
3124
2422
  gap: 10px;
3125
- `, Go = n.span`
2423
+ `, Ut = n.span`
3126
2424
  font-size: 12.5px;
3127
- color: ${H.where.fg};
2425
+ color: ${U.where.fg};
3128
2426
  font-style: italic;
3129
2427
  font-weight: 600;
3130
- `, Yo = n.span`
2428
+ `, Yt = n.span`
3131
2429
  font-size: 11.5px;
3132
2430
  color: var(--text-color-secondary, #64748b);
3133
- `, Vo = n.button`
2431
+ `, Gt = n.button`
3134
2432
  background: none;
3135
2433
  border: none;
3136
2434
  cursor: pointer;
@@ -3142,7 +2440,7 @@ var Oo = n.div`
3142
2440
  &:hover {
3143
2441
  color: var(--color-error-base, #dc2626);
3144
2442
  }
3145
- `, Jo = n.button`
2443
+ `, Vt = n.button`
3146
2444
  align-self: flex-start;
3147
2445
  margin-top: 8px;
3148
2446
  background: none;
@@ -3157,7 +2455,7 @@ var Oo = n.div`
3157
2455
  &:focus-visible {
3158
2456
  outline: 2px solid ${(e) => e.$tone};
3159
2457
  }
3160
- `, Qo = n.textarea`
2458
+ `, Jt = n.textarea`
3161
2459
  flex: 1;
3162
2460
  min-height: 30px;
3163
2461
  resize: vertical;
@@ -3180,14 +2478,14 @@ var Oo = n.div`
3180
2478
  color: var(--text-color-secondary, #64748b);
3181
2479
  opacity: 0.8;
3182
2480
  }
3183
- `, Xo = n(ce)`
2481
+ `, Xt = n(ce)`
3184
2482
  margin-top: 10px;
3185
- `, Zo = n.button`
2483
+ `, Qt = n.button`
3186
2484
  font: inherit;
3187
2485
  font-size: 11px;
3188
- font-family: ${D};
3189
- color: ${H.message.fg};
3190
- background: ${H.message.soft};
2486
+ font-family: ${z};
2487
+ color: ${U.message.fg};
2488
+ background: ${U.message.soft};
3191
2489
  border: none;
3192
2490
  border-radius: 8px;
3193
2491
  padding: 3px 8px;
@@ -3198,39 +2496,39 @@ var Oo = n.div`
3198
2496
  }
3199
2497
 
3200
2498
  &:focus-visible {
3201
- outline: 2px solid ${H.message.fg};
2499
+ outline: 2px solid ${U.message.fg};
3202
2500
  }
3203
2501
  `;
3204
- function en({ entries: e, selectedId: t, matchCountById: o, onToggle: i, onChangeEntry: a, onRemove: c, onAdd: s, isEvaluating: l, importProps: p, configPreviewProps: f }) {
3205
- const m = e.map((h) => h.name);
3206
- return /* @__PURE__ */ d(rn, { children: [/* @__PURE__ */ d(tn, { children: [
2502
+ function Zt({ entries: e, selectedId: o, matchCountById: t, onToggle: i, onChangeEntry: a, onRemove: c, onAdd: l, isEvaluating: s, importProps: d, configPreviewProps: u }) {
2503
+ const h = e.map((g) => g.name);
2504
+ return /* @__PURE__ */ p(en, { children: [/* @__PURE__ */ p(rn, { children: [
3207
2505
  /* @__PURE__ */ r(on, { children: "Rules" }),
3208
- /* @__PURE__ */ r(nn, { children: e.length }),
3209
- /* @__PURE__ */ r(an, {}),
3210
- /* @__PURE__ */ r(Jt, { ...p }),
3211
- /* @__PURE__ */ r(_t, { ...f }),
3212
- /* @__PURE__ */ r(Ke, {
2506
+ /* @__PURE__ */ r(tn, { children: e.length }),
2507
+ /* @__PURE__ */ r(nn, {}),
2508
+ /* @__PURE__ */ r(Jo, { ...d }),
2509
+ /* @__PURE__ */ r(Wo, { ...u }),
2510
+ /* @__PURE__ */ r(_e, {
3213
2511
  type: "button",
3214
- onClick: s,
2512
+ onClick: l,
3215
2513
  children: "+ Add rule"
3216
2514
  })
3217
- ] }), /* @__PURE__ */ r(sn, { children: e.map((h) => /* @__PURE__ */ r(Lo, {
3218
- entry: h,
3219
- selected: h.id === t,
3220
- matchCount: o[h.id] ?? 0,
3221
- isDuplicateName: m.filter((y) => y === h.name).length > 1,
3222
- isEvaluating: l,
3223
- onToggle: () => i(h.id),
2515
+ ] }), /* @__PURE__ */ r(an, { children: e.map((g) => /* @__PURE__ */ r(zt, {
2516
+ entry: g,
2517
+ selected: g.id === o,
2518
+ matchCount: t[g.id] ?? 0,
2519
+ isDuplicateName: h.filter((x) => x === g.name).length > 1,
2520
+ isEvaluating: s,
2521
+ onToggle: () => i(g.id),
3224
2522
  onChange: a,
3225
- onRemove: () => c(h.id)
3226
- }, h.id)) })] });
2523
+ onRemove: () => c(g.id)
2524
+ }, g.id)) })] });
3227
2525
  }
3228
- var rn = n.div`
2526
+ var en = n.div`
3229
2527
  display: flex;
3230
2528
  flex-direction: column;
3231
2529
  min-height: 0;
3232
2530
  gap: 12px;
3233
- `, tn = n.div`
2531
+ `, rn = n.div`
3234
2532
  display: flex;
3235
2533
  align-items: center;
3236
2534
  gap: 10px;
@@ -3244,16 +2542,16 @@ var rn = n.div`
3244
2542
  font-size: 14.5px;
3245
2543
  font-weight: 700;
3246
2544
  color: var(--text-color-primary, #1b2430);
3247
- `, nn = n.span`
2545
+ `, tn = n.span`
3248
2546
  background: var(--color-warm-grey-1, #fbfbfc);
3249
2547
  color: var(--text-color-secondary, #64748b);
3250
2548
  font-size: 11.5px;
3251
2549
  font-weight: 700;
3252
2550
  border-radius: 999px;
3253
2551
  padding: 2px 9px;
3254
- `, an = n.span`
2552
+ `, nn = n.span`
3255
2553
  flex: 1;
3256
- `, sn = n.div`
2554
+ `, an = n.div`
3257
2555
  display: flex;
3258
2556
  flex-direction: column;
3259
2557
  gap: 12px;
@@ -3265,17 +2563,17 @@ var rn = n.div`
3265
2563
  overflow-y: visible;
3266
2564
  }
3267
2565
  `;
3268
- function ln({ markers: e, totalLines: t, onMarkerClick: o }) {
3269
- return /* @__PURE__ */ r(cn, { children: e.map((i, a) => /* @__PURE__ */ r(pn, {
2566
+ function ln({ markers: e, totalLines: o, onMarkerClick: t }) {
2567
+ return /* @__PURE__ */ r(sn, { children: e.map((i, a) => /* @__PURE__ */ r(cn, {
3270
2568
  type: "button",
3271
2569
  $kind: i.kind,
3272
2570
  title: i.title,
3273
2571
  "aria-label": `Jump to line ${i.line}`,
3274
- style: { top: `${(i.line - 0.5) / t * 100}%` },
3275
- onClick: () => o(i)
2572
+ style: { top: `${(i.line - 0.5) / o * 100}%` },
2573
+ onClick: () => t(i)
3276
2574
  }, a)) });
3277
2575
  }
3278
- var cn = n.div`
2576
+ var sn = n.div`
3279
2577
  position: absolute;
3280
2578
  top: 0;
3281
2579
  right: 0;
@@ -3284,7 +2582,7 @@ var cn = n.div`
3284
2582
  z-index: 5;
3285
2583
  pointer-events: none;
3286
2584
  background: transparent;
3287
- `, pn = n.button`
2585
+ `, cn = n.button`
3288
2586
  position: absolute;
3289
2587
  right: 2px;
3290
2588
  width: ${(e) => e.$kind === "match" ? "4px" : "8px"};
@@ -3300,7 +2598,7 @@ var cn = n.div`
3300
2598
  matchBlocks: [],
3301
2599
  matchProps: [],
3302
2600
  fails: []
3303
- }, un = n.div`
2601
+ }, pn = n.div`
3304
2602
  display: flex;
3305
2603
  flex-direction: column;
3306
2604
  min-height: 0;
@@ -3315,8 +2613,8 @@ var cn = n.div`
3315
2613
  gap: 8px;
3316
2614
  padding: 6px 12px;
3317
2615
  border-bottom: 1px solid var(--border-color-secondary, #e5e9f0);
3318
- `, mn = n.span`
3319
- font-family: ${D};
2616
+ `, un = n.span`
2617
+ font-family: ${z};
3320
2618
  font-size: 13px;
3321
2619
  color: var(--text-color-secondary, #64748b);
3322
2620
  flex: 1;
@@ -3349,10 +2647,10 @@ var cn = n.div`
3349
2647
  outline: 2px solid var(--color-info-base, #2563eb);
3350
2648
  outline-offset: 1px;
3351
2649
  }
3352
- `, vn = n.span`
2650
+ `, bn = n.span`
3353
2651
  font-weight: 600;
3354
2652
  opacity: 0.75;
3355
- `, bn = n.span`
2653
+ `, mn = n.span`
3356
2654
  display: inline-flex;
3357
2655
  align-items: center;
3358
2656
  gap: 5px;
@@ -3363,7 +2661,7 @@ var cn = n.div`
3363
2661
  white-space: nowrap;
3364
2662
  color: var(--color-warning-text, #b45309);
3365
2663
  background: var(--color-warning-bg, #fef3e2);
3366
- `, yn = n.span`
2664
+ `, vn = n.span`
3367
2665
  width: 6px;
3368
2666
  height: 6px;
3369
2667
  border-radius: 50%;
@@ -3375,7 +2673,7 @@ var cn = n.div`
3375
2673
  background: var(--color-warning-bg, #fef3e2);
3376
2674
  border-bottom: 1px solid var(--border-color-secondary, #e5e9f0);
3377
2675
  padding: 8px 12px;
3378
- `, kn = n.div`
2676
+ `, yn = n.div`
3379
2677
  position: relative;
3380
2678
  flex: 1;
3381
2679
  min-height: 0;
@@ -3386,7 +2684,7 @@ var cn = n.div`
3386
2684
  }
3387
2685
 
3388
2686
  .cm-scroller {
3389
- font-family: ${D};
2687
+ font-family: ${z};
3390
2688
  overflow: auto;
3391
2689
  padding-right: 12px;
3392
2690
  }
@@ -3481,7 +2779,7 @@ var cn = n.div`
3481
2779
  max-width: 420px;
3482
2780
  padding: 6px 10px;
3483
2781
  white-space: pre-line;
3484
- font-family: ${yr};
2782
+ font-family: ${xr};
3485
2783
  font-size: 12px;
3486
2784
  line-height: 1.45;
3487
2785
  color: var(--text-color-primary, #1b2430);
@@ -3489,7 +2787,7 @@ var cn = n.div`
3489
2787
  border: 1px solid var(--color-error-base, #dc2626);
3490
2788
  border-radius: 12px;
3491
2789
  }
3492
- `, ze = qe.define(), Be = qe.define(), ve = qe.define(), Rr = class extends Vr {
2790
+ `, Ne = je.define(), Be = je.define(), me = je.define(), Er = class extends Vr {
3493
2791
  severity;
3494
2792
  constructor(e) {
3495
2793
  super(), this.severity = e;
@@ -3500,212 +2798,212 @@ var cn = n.div`
3500
2798
  toDOM() {
3501
2799
  const e = document.createElement("div");
3502
2800
  e.className = `cm-rb-gutter-marker cm-rb-gutter-${this.severity}`;
3503
- const t = document.createElement("span");
3504
- return t.textContent = "!", e.appendChild(t), e;
2801
+ const o = document.createElement("span");
2802
+ return o.textContent = "!", e.appendChild(o), e;
3505
2803
  }
3506
- }, vr = Fe.define({
3507
- create: () => je.empty,
3508
- update(e, t) {
3509
- let o = e.map(t.changes);
3510
- for (const i of t.effects) i.is(Be) && (o = i.value);
3511
- return o;
2804
+ }, mr = Fe.define({
2805
+ create: () => Ke.empty,
2806
+ update(e, o) {
2807
+ let t = e.map(o.changes);
2808
+ for (const i of o.effects) i.is(Be) && (t = i.value);
2809
+ return t;
3512
2810
  }
3513
2811
  }), wn = Fe.define({
3514
- create: () => z.none,
3515
- update(e, t) {
3516
- let o = e.map(t.changes);
3517
- for (const i of t.effects) i.is(ze) && (o = i.value);
3518
- return o;
2812
+ create: () => N.none,
2813
+ update(e, o) {
2814
+ let t = e.map(o.changes);
2815
+ for (const i of o.effects) i.is(Ne) && (t = i.value);
2816
+ return t;
3519
2817
  },
3520
2818
  provide: (e) => ie.decorations.from(e)
3521
- }), En = z.mark({ class: "cm-rb-flash" }), $n = Fe.define({
3522
- create: () => z.none,
3523
- update(e, t) {
3524
- let o = e.map(t.changes);
3525
- for (const i of t.effects) i.is(ve) && (o = i.value ? z.set([En.range(i.value.from, i.value.to)]) : z.none);
3526
- return o;
2819
+ }), kn = N.mark({ class: "cm-rb-flash" }), Cn = Fe.define({
2820
+ create: () => N.none,
2821
+ update(e, o) {
2822
+ let t = e.map(o.changes);
2823
+ for (const i of o.effects) i.is(me) && (t = i.value ? N.set([kn.range(i.value.from, i.value.to)]) : N.none);
2824
+ return t;
3527
2825
  },
3528
2826
  provide: (e) => ie.decorations.from(e)
3529
- }), Cn = {
3530
- error: z.line({ class: "cm-rb-line-error" }),
3531
- warn: z.line({ class: "cm-rb-line-warn" })
2827
+ }), $n = {
2828
+ error: N.line({ class: "cm-rb-line-error" }),
2829
+ warn: N.line({ class: "cm-rb-line-warn" })
3532
2830
  };
3533
- function Sn(e, t) {
3534
- const o = /* @__PURE__ */ new Map();
2831
+ function Rn(e, o) {
2832
+ const t = /* @__PURE__ */ new Map();
3535
2833
  for (const i of e) {
3536
- if (i.from > t.length) continue;
3537
- const a = t.lineAt(i.from), c = o.get(a.number) ?? {
2834
+ if (i.from > o.length) continue;
2835
+ const a = o.lineAt(i.from), c = t.get(a.number) ?? {
3538
2836
  lineFrom: a.from,
3539
2837
  severity: i.severity,
3540
2838
  messages: []
3541
2839
  };
3542
- i.severity === "error" && (c.severity = "error"), c.messages.push(...i.messages), o.set(a.number, c);
2840
+ i.severity === "error" && (c.severity = "error"), c.messages.push(...i.messages), t.set(a.number, c);
3543
2841
  }
3544
- return o;
2842
+ return t;
3545
2843
  }
3546
2844
  var ae = {
3547
- block: z.mark({ class: "cm-rb-match-block" }),
3548
- matchKey: z.mark({ class: "cm-rb-match-key" }),
3549
- prop: z.mark({ class: "cm-rb-match-prop" }),
3550
- failError: z.mark({ class: "cm-rb-fail-error" }),
3551
- failWarn: z.mark({ class: "cm-rb-fail-warn" })
2845
+ block: N.mark({ class: "cm-rb-match-block" }),
2846
+ matchKey: N.mark({ class: "cm-rb-match-key" }),
2847
+ prop: N.mark({ class: "cm-rb-match-prop" }),
2848
+ failError: N.mark({ class: "cm-rb-fail-error" }),
2849
+ failWarn: N.mark({ class: "cm-rb-fail-warn" })
3552
2850
  };
3553
- function Rn(e, t, o) {
3554
- const i = [], a = (s, l) => {
3555
- for (const p of s) p.from < p.to && p.to <= t.length && i.push(l.range(p.from, p.to));
2851
+ function Sn(e, o, t) {
2852
+ const i = [], a = (l, s) => {
2853
+ for (const d of l) d.from < d.to && d.to <= o.length && i.push(s.range(d.from, d.to));
3556
2854
  };
3557
- for (const s of o.values()) i.push(Cn[s.severity].range(s.lineFrom));
3558
- const c = (s) => e.fails.some((l) => l.from < s.to && s.from < l.to);
3559
- return a(e.matchBlocks, ae.block), a(e.matchProps.filter((s) => !c(s)), ae.prop), a(e.matchKeys.filter((s) => !c(s)), ae.matchKey), a(e.fails.filter((s) => s.severity === "error"), ae.failError), a(e.fails.filter((s) => s.severity === "warn"), ae.failWarn), z.set(i, !0);
2855
+ for (const l of t.values()) i.push($n[l.severity].range(l.lineFrom));
2856
+ const c = (l) => e.fails.some((s) => s.from < l.to && l.from < s.to);
2857
+ return a(e.matchBlocks, ae.block), a(e.matchProps.filter((l) => !c(l)), ae.prop), a(e.matchKeys.filter((l) => !c(l)), ae.matchKey), a(e.fails.filter((l) => l.severity === "error"), ae.failError), a(e.fails.filter((l) => l.severity === "warn"), ae.failWarn), N.set(i, !0);
3560
2858
  }
3561
- function In(e) {
3562
- const t = [];
3563
- for (const o of e.values()) t.push(new Rr(o.severity).range(o.lineFrom));
3564
- return je.of(t, !0);
2859
+ function En(e) {
2860
+ const o = [];
2861
+ for (const t of e.values()) o.push(new Er(t.severity).range(t.lineFrom));
2862
+ return Ke.of(o, !0);
3565
2863
  }
3566
2864
  var Mn = 2097152;
3567
- function Pn({ spec: e, fileName: t, highlights: o, rulerMarkers: i, matchTargets: a, totalLines: c, jump: s, matchCount: l, showMatchStatus: p, isEvaluating: f, onSpecChange: m, onResetSpec: h, uploadError: y, onUploadError: u, host: g }) {
3568
- const x = A(null), C = A(null), $ = A(null), v = A(o.fails);
3569
- v.current = o.fails;
3570
- const P = A(m);
3571
- P.current = m;
3572
- const b = A(void 0), [R, T] = I(-1), _ = (w) => {
3573
- const M = C.current;
3574
- if (!M) return;
3575
- const L = Math.min(w.to, M.state.doc.length), j = Math.min(w.from, L);
3576
- j >= L || (M.dispatch({ effects: [ie.scrollIntoView(j, { y: "center" }), ve.of({
3577
- from: j,
3578
- to: L
3579
- })] }), clearTimeout(b.current), b.current = setTimeout(() => {
3580
- C.current?.dispatch({ effects: ve.of(null) });
2865
+ function Pn({ spec: e, fileName: o, highlights: t, rulerMarkers: i, matchTargets: a, totalLines: c, jump: l, matchCount: s, showMatchStatus: d, isEvaluating: u, onSpecChange: h, onResetSpec: g, uploadError: x, onUploadError: f, host: b }) {
2866
+ const y = L(null), R = L(null), $ = L(null), m = L(t.fails);
2867
+ m.current = t.fails;
2868
+ const A = L(h);
2869
+ A.current = h;
2870
+ const v = L(void 0), [E, I] = M(-1), W = (k) => {
2871
+ const P = R.current;
2872
+ if (!P) return;
2873
+ const O = Math.min(k.to, P.state.doc.length), K = Math.min(k.from, O);
2874
+ K >= O || (P.dispatch({ effects: [ie.scrollIntoView(K, { y: "center" }), me.of({
2875
+ from: K,
2876
+ to: O
2877
+ })] }), clearTimeout(v.current), v.current = setTimeout(() => {
2878
+ R.current?.dispatch({ effects: me.of(null) });
3581
2879
  }, 1400));
3582
2880
  };
3583
- N(() => {
3584
- T(-1);
2881
+ D(() => {
2882
+ I(-1);
3585
2883
  }, [a]);
3586
- const G = async () => {
3587
- if (!g?.pickSpecFile) {
2884
+ const Y = async () => {
2885
+ if (!b?.pickSpecFile) {
3588
2886
  $.current?.click();
3589
2887
  return;
3590
2888
  }
3591
2889
  try {
3592
- const w = await g.pickSpecFile();
3593
- if (!w) return;
3594
- u(void 0), m(w.content, w.name);
3595
- } catch (w) {
3596
- u(w instanceof Error ? w.message : "Could not read the file");
2890
+ const k = await b.pickSpecFile();
2891
+ if (!k) return;
2892
+ f(void 0), h(k.content, k.name);
2893
+ } catch (k) {
2894
+ f(k instanceof Error ? k.message : "Could not read the file");
3597
2895
  }
3598
2896
  }, Z = () => {
3599
2897
  if (!a.length) return;
3600
- const w = (R + 1) % a.length;
3601
- T(w), _(a[w]);
3602
- }, pe = Y(() => Qr((w, M) => {
3603
- const L = v.current.filter((j) => M >= j.from && M <= j.to);
3604
- return L.length ? {
3605
- pos: M,
2898
+ const k = (E + 1) % a.length;
2899
+ I(k), W(a[k]);
2900
+ }, de = G(() => Xr((k, P) => {
2901
+ const O = m.current.filter((K) => P >= K.from && P <= K.to);
2902
+ return O.length ? {
2903
+ pos: P,
3606
2904
  above: !0,
3607
2905
  create: () => {
3608
- const j = document.createElement("div");
3609
- j.className = "cm-rb-tooltip";
3610
- for (const Ee of L) for (const ee of Ee.messages) {
2906
+ const K = document.createElement("div");
2907
+ K.className = "cm-rb-tooltip";
2908
+ for (const Ce of O) for (const ee of Ce.messages) {
3611
2909
  const re = document.createElement("div");
3612
- re.textContent = `✗ ${ee}`, j.appendChild(re);
2910
+ re.textContent = `✗ ${ee}`, K.appendChild(re);
3613
2911
  }
3614
- return { dom: j };
2912
+ return { dom: K };
3615
2913
  }
3616
2914
  } : null;
3617
2915
  }), []);
3618
- return N(() => {
3619
- if (!x.current) return;
3620
- const w = new ie({
3621
- parent: x.current,
3622
- state: Yr.create({
2916
+ return D(() => {
2917
+ if (!y.current) return;
2918
+ const k = new ie({
2919
+ parent: y.current,
2920
+ state: Gr.create({
3623
2921
  doc: e,
3624
2922
  extensions: [
3625
- vr,
2923
+ mr,
3626
2924
  Jr({
3627
2925
  class: "cm-rb-gutter",
3628
- markers: (M) => M.state.field(vr),
3629
- initialSpacer: () => new Rr("error")
2926
+ markers: (P) => P.state.field(mr),
2927
+ initialSpacer: () => new Er("error")
3630
2928
  }),
3631
2929
  Zr(),
3632
- Kr(),
3633
- Xr.of([..._r, ...Ur]),
3634
- Wr(),
3635
- Gr(Hr),
2930
+ _r(),
2931
+ Qr.of([...Wr, ...Hr]),
2932
+ qr(),
2933
+ Yr(Ur),
3636
2934
  wn,
3637
- $n,
3638
- pe,
3639
- ie.updateListener.of((M) => {
3640
- M.docChanged && P.current(M.state.doc.toString());
2935
+ Cn,
2936
+ de,
2937
+ ie.updateListener.of((P) => {
2938
+ P.docChanged && A.current(P.state.doc.toString());
3641
2939
  })
3642
2940
  ]
3643
2941
  })
3644
2942
  });
3645
- return C.current = w, () => {
3646
- w.destroy(), C.current = null;
2943
+ return R.current = k, () => {
2944
+ k.destroy(), R.current = null;
3647
2945
  };
3648
- }, [pe]), N(() => {
3649
- const w = C.current;
3650
- !w || w.state.doc.toString() === e || w.dispatch({
2946
+ }, [de]), D(() => {
2947
+ const k = R.current;
2948
+ !k || k.state.doc.toString() === e || k.dispatch({
3651
2949
  changes: {
3652
2950
  from: 0,
3653
- to: w.state.doc.length,
2951
+ to: k.state.doc.length,
3654
2952
  insert: e
3655
2953
  },
3656
2954
  effects: [
3657
- ze.of(z.none),
3658
- Be.of(je.empty),
3659
- ve.of(null)
2955
+ Ne.of(N.none),
2956
+ Be.of(Ke.empty),
2957
+ me.of(null)
3660
2958
  ]
3661
2959
  });
3662
- }, [e]), N(() => {
3663
- const w = C.current;
3664
- if (!w) return;
3665
- const M = Sn(o.fails, w.state.doc);
3666
- w.dispatch({ effects: [ze.of(Rn(o, w.state.doc, M)), Be.of(In(M))] });
3667
- }, [o]), N(() => {
3668
- s && _(s);
3669
- }, [s]), N(() => () => clearTimeout(b.current), []), /* @__PURE__ */ d(un, { children: [
3670
- /* @__PURE__ */ d(fn, { children: [
3671
- /* @__PURE__ */ r(mn, { children: t }),
3672
- p && (l > 0 ? /* @__PURE__ */ d(gn, {
2960
+ }, [e]), D(() => {
2961
+ const k = R.current;
2962
+ if (!k) return;
2963
+ const P = Rn(t.fails, k.state.doc);
2964
+ k.dispatch({ effects: [Ne.of(Sn(t, k.state.doc, P)), Be.of(En(P))] });
2965
+ }, [t]), D(() => {
2966
+ l && W(l);
2967
+ }, [l]), D(() => () => clearTimeout(v.current), []), /* @__PURE__ */ p(pn, { children: [
2968
+ /* @__PURE__ */ p(fn, { children: [
2969
+ /* @__PURE__ */ r(un, { children: o }),
2970
+ d && (s > 0 ? /* @__PURE__ */ p(gn, {
3673
2971
  type: "button",
3674
2972
  onClick: Z,
3675
2973
  disabled: !a.length,
3676
2974
  title: "Jump to the next matched node",
3677
2975
  children: [
3678
- l,
2976
+ s,
3679
2977
  " node",
3680
- l === 1 ? "" : "s",
2978
+ s === 1 ? "" : "s",
3681
2979
  " matched",
3682
- R >= 0 && /* @__PURE__ */ d(vn, {
3683
- "aria-label": `showing match ${R + 1} of ${a.length}`,
2980
+ E >= 0 && /* @__PURE__ */ p(bn, {
2981
+ "aria-label": `showing match ${E + 1} of ${a.length}`,
3684
2982
  children: [
3685
- R + 1,
2983
+ E + 1,
3686
2984
  "/",
3687
2985
  a.length
3688
2986
  ]
3689
2987
  })
3690
2988
  ]
3691
- }) : /* @__PURE__ */ d(bn, {
2989
+ }) : /* @__PURE__ */ p(mn, {
3692
2990
  role: "status",
3693
- children: [/* @__PURE__ */ r(yn, { "aria-hidden": !0 }), "Nothing matched"]
2991
+ children: [/* @__PURE__ */ r(vn, { "aria-hidden": !0 }), "Nothing matched"]
3694
2992
  })),
3695
- y && /* @__PURE__ */ r(hn, {
2993
+ x && /* @__PURE__ */ r(hn, {
3696
2994
  role: "alert",
3697
- children: y
2995
+ children: x
3698
2996
  }),
3699
- /* @__PURE__ */ r(or, {
2997
+ /* @__PURE__ */ r(tr, {
3700
2998
  type: "button",
3701
2999
  onClick: () => {
3702
- G();
3000
+ Y();
3703
3001
  },
3704
3002
  children: "Upload"
3705
3003
  }),
3706
- /* @__PURE__ */ r(or, {
3004
+ /* @__PURE__ */ r(tr, {
3707
3005
  type: "button",
3708
- onClick: h,
3006
+ onClick: g,
3709
3007
  children: "Reset sample"
3710
3008
  }),
3711
3009
  /* @__PURE__ */ r("input", {
@@ -3714,44 +3012,44 @@ function Pn({ spec: e, fileName: t, highlights: o, rulerMarkers: i, matchTargets
3714
3012
  accept: ".yaml,.yml,.json",
3715
3013
  hidden: !0,
3716
3014
  "aria-label": "Upload OpenAPI document",
3717
- onChange: (w) => {
3718
- const M = w.target.files?.[0];
3719
- if (w.target.value = "", !M) return;
3720
- if (M.size > Mn) {
3721
- u("File is too large (max 2 MB)");
3015
+ onChange: (k) => {
3016
+ const P = k.target.files?.[0];
3017
+ if (k.target.value = "", !P) return;
3018
+ if (P.size > Mn) {
3019
+ f("File is too large (max 2 MB)");
3722
3020
  return;
3723
3021
  }
3724
- const L = new FileReader();
3725
- L.onload = () => {
3726
- u(void 0), m(String(L.result ?? ""), M.name);
3727
- }, L.onerror = () => u("Could not read the file"), L.readAsText(M);
3022
+ const O = new FileReader();
3023
+ O.onload = () => {
3024
+ f(void 0), h(String(O.result ?? ""), P.name);
3025
+ }, O.onerror = () => f("Could not read the file"), O.readAsText(P);
3728
3026
  }
3729
3027
  })
3730
3028
  ] }),
3731
- p && l === 0 && !f && /* @__PURE__ */ r(xn, {
3029
+ d && s === 0 && !u && /* @__PURE__ */ r(xn, {
3732
3030
  role: "status",
3733
3031
  children: "No nodes in this document match the rule’s subject and where conditions — widen the node type or relax the conditions."
3734
3032
  }),
3735
- /* @__PURE__ */ r(kn, {
3736
- ref: x,
3033
+ /* @__PURE__ */ r(yn, {
3034
+ ref: y,
3737
3035
  role: "region",
3738
3036
  "aria-label": "OpenAPI document editor",
3739
3037
  children: /* @__PURE__ */ r(ln, {
3740
3038
  markers: i,
3741
3039
  totalLines: c,
3742
- onMarkerClick: _
3040
+ onMarkerClick: W
3743
3041
  })
3744
3042
  })
3745
3043
  ] });
3746
3044
  }
3747
- var Tn = n.div`
3748
- font-family: ${yr};
3045
+ var An = n.div`
3046
+ font-family: ${xr};
3749
3047
  color: var(--text-color-primary, #1b2430);
3750
3048
  display: flex;
3751
3049
  flex-direction: column;
3752
3050
  background: var(--color-warm-grey-1, #f3f5f8);
3753
3051
  border-radius: 16px;
3754
- `, An = n.div`
3052
+ `, In = n.div`
3755
3053
  display: flex;
3756
3054
  width: 30px;
3757
3055
  height: 30px;
@@ -3762,7 +3060,7 @@ var Tn = n.div`
3762
3060
  color: #fff;
3763
3061
  font-size: 14px;
3764
3062
  font-weight: 800;
3765
- `, br = n.div`
3063
+ `, vr = n.div`
3766
3064
  display: flex;
3767
3065
  height: 56px;
3768
3066
  padding: 0 20px;
@@ -3776,14 +3074,14 @@ var Tn = n.div`
3776
3074
  font-weight: 600;
3777
3075
  text-decoration: none;
3778
3076
  }
3779
- `, Dn = n.span`
3077
+ `, Ln = n.span`
3780
3078
  display: inline-block;
3781
3079
  width: 6px;
3782
3080
  height: 6px;
3783
3081
  border-radius: 50%;
3784
3082
  background: currentColor;
3785
3083
  margin-right: 6px;
3786
- `, Ln = n.div`
3084
+ `, zn = n.div`
3787
3085
  display: flex;
3788
3086
  justify-content: space-between;
3789
3087
  align-items: center;
@@ -3809,13 +3107,13 @@ var Tn = n.div`
3809
3107
  height: auto;
3810
3108
  min-height: 0;
3811
3109
  }
3812
- `, zn = n.div`
3110
+ `, Tn = n.div`
3813
3111
  display: flex;
3814
3112
  flex-direction: column;
3815
3113
  gap: 12px;
3816
3114
  min-height: 0;
3817
3115
  min-width: 0;
3818
- `, Bn = n.div`
3116
+ `, Nn = n.div`
3819
3117
  flex: 1;
3820
3118
  min-height: 240px;
3821
3119
  min-width: 0;
@@ -3824,7 +3122,7 @@ var Tn = n.div`
3824
3122
  flex: none;
3825
3123
  height: 60vh;
3826
3124
  }
3827
- `, Nn = n.div`
3125
+ `, Bn = n.div`
3828
3126
  display: flex;
3829
3127
  flex-direction: column;
3830
3128
  gap: 1px;
@@ -3844,7 +3142,7 @@ var Tn = n.div`
3844
3142
  line-height: 1.5;
3845
3143
  color: var(--text-color-secondary, #64748b);
3846
3144
  }
3847
- `, jn = {
3145
+ `, Dn = {
3848
3146
  subject: {
3849
3147
  type: "Operation",
3850
3148
  property: "summary"
@@ -3855,237 +3153,236 @@ var Tn = n.div`
3855
3153
  },
3856
3154
  severity: "warn",
3857
3155
  message: "Operation summary of {{key}} must be defined and under 20 characters."
3858
- }, qn = {
3156
+ }, Kn = {
3859
3157
  matches: [],
3860
3158
  problems: [],
3861
3159
  ruleErrors: []
3862
3160
  };
3863
- function Xn({ defaultSpec: e, defaultSpecFileName: t, initialRule: o, initialRuleName: i, onRuleChange: a, host: c, height: s = 640 }) {
3864
- const l = e ?? et, p = t ?? "museum-api.yaml", [f, m] = I(() => [{
3865
- id: we(),
3161
+ function Xn({ defaultSpec: e, defaultSpecFileName: o, initialRule: t, initialRuleName: i, onRuleChange: a, host: c, height: l = 640 }) {
3162
+ const s = e, d = o ?? "openapi.yaml", [u, h] = M(() => [{
3163
+ id: ke(),
3866
3164
  name: i ?? "operation-summary",
3867
- rule: o ? structuredClone(o) : structuredClone(jn)
3868
- }]), [h, y] = I(() => f[0]?.id ?? null), [u, g] = I({
3869
- text: l,
3870
- fileName: p
3871
- }), [x, C] = I(() => ({
3872
- result: qn,
3873
- resolver: er(l),
3165
+ rule: t ? structuredClone(t) : structuredClone(Dn)
3166
+ }]), [g, x] = M(() => u[0]?.id ?? null), [f, b] = M({
3167
+ text: s,
3168
+ fileName: d
3169
+ }), [y, R] = M(() => ({
3170
+ result: Kn,
3171
+ resolver: er(s),
3874
3172
  ruleIds: []
3875
- })), [$, v] = I(!1), [P, b] = I(), [R, T] = I(), _ = A(0), G = Y(() => nt(f), [f]), Z = Y(() => st(G), [G]);
3876
- N(() => {
3877
- const E = ++_.current;
3878
- v(!0);
3879
- const k = setTimeout(() => {
3880
- const B = f.map((K) => K.id);
3881
- tt(u.text, G, u.fileName).then((K) => {
3882
- _.current === E && (C({
3883
- result: K,
3884
- resolver: er(u.text),
3173
+ })), [$, m] = M(!1), [A, v] = M(), [E, I] = M(), W = L(0), Y = G(() => to(u), [u]), Z = G(() => io(Y), [Y]);
3174
+ D(() => {
3175
+ const C = ++W.current;
3176
+ m(!0);
3177
+ const w = setTimeout(() => {
3178
+ const B = u.map((_) => _.id);
3179
+ ro(f.text, Y, f.fileName).then((_) => {
3180
+ W.current === C && (R({
3181
+ result: _,
3182
+ resolver: er(f.text),
3885
3183
  ruleIds: B
3886
- }), v(!1));
3184
+ }), m(!1));
3887
3185
  });
3888
3186
  }, 250);
3889
- return () => clearTimeout(k);
3187
+ return () => clearTimeout(w);
3890
3188
  }, [
3891
- u,
3892
- G,
3893
- f
3894
- ]), N(() => {
3895
- a?.(Z, G);
3189
+ f,
3190
+ Y,
3191
+ u
3192
+ ]), D(() => {
3193
+ a?.(Z, Y);
3896
3194
  }, [
3897
3195
  Z,
3898
- G,
3196
+ Y,
3899
3197
  a
3900
3198
  ]);
3901
- const pe = f.findIndex((E) => E.id === h), { highlights: w, problemsWithLines: M, matchCountById: L, rulerMarkers: j, matchTargets: Ee, firstMatchRange: ee, firstProblemRange: re } = Y(() => {
3902
- const { result: E, resolver: k, ruleIds: B } = x, K = {
3199
+ const de = u.findIndex((C) => C.id === g), { highlights: k, problemsWithLines: P, matchCountById: O, rulerMarkers: K, matchTargets: Ce, firstMatchRange: ee, firstProblemRange: re } = G(() => {
3200
+ const { result: C, resolver: w, ruleIds: B } = y, _ = {
3903
3201
  matchKeys: [],
3904
3202
  matchBlocks: [],
3905
3203
  matchProps: [],
3906
3204
  fails: []
3907
- }, te = [], J = [], Se = /* @__PURE__ */ new Map();
3908
- let fe;
3909
- const Re = [];
3910
- for (const S of E.problems) {
3911
- const O = k.resolve(S.pointer, S.reportOnKey);
3912
- if (!O) {
3913
- Re.push(S);
3205
+ }, oe = [], J = [], Se = /* @__PURE__ */ new Map();
3206
+ let ue;
3207
+ const Ee = [];
3208
+ for (const S of C.problems) {
3209
+ const T = w.resolve(S.pointer, S.reportOnKey);
3210
+ if (!T) {
3211
+ Ee.push(S);
3914
3212
  continue;
3915
3213
  }
3916
- const oe = `${O.from}-${O.to}`, U = Se.get(oe) ?? {
3917
- ...O,
3214
+ const te = `${T.from}-${T.to}`, H = Se.get(te) ?? {
3215
+ ...T,
3918
3216
  messages: [],
3919
3217
  severity: S.severity
3920
3218
  };
3921
- U.messages.push([`${S.ruleId}: ${S.message}`, ...S.suggest.map((me) => `→ ${me}`)].join(`
3922
- `)), S.severity === "error" && (U.severity = "error"), Se.set(oe, U), B[S.ruleIndex] === h && (!fe || O.from < fe.from) && (fe = O), Re.push({
3219
+ H.messages.push([`${S.ruleId}: ${S.message}`, ...S.suggest.map((he) => `→ ${he}`)].join(`
3220
+ `)), S.severity === "error" && (H.severity = "error"), Se.set(te, H), B[S.ruleIndex] === g && (!ue || T.from < ue.from) && (ue = T), Ee.push({
3923
3221
  ...S,
3924
- line: k.lineAt(O.from)
3222
+ line: w.lineAt(T.from)
3925
3223
  });
3926
3224
  }
3927
- K.fails = Array.from(Se.values());
3928
- for (const S of K.fails) te.push({
3929
- line: k.lineAt(S.from),
3225
+ _.fails = Array.from(Se.values());
3226
+ for (const S of _.fails) oe.push({
3227
+ line: w.lineAt(S.from),
3930
3228
  from: S.from,
3931
3229
  to: S.to,
3932
3230
  kind: S.severity,
3933
3231
  title: S.messages.join(`
3934
3232
  `)
3935
3233
  });
3936
- const Ie = {};
3937
- for (const S of E.matches) {
3938
- const O = B[S.ruleIndex];
3939
- if (!O || (Ie[O] = (Ie[O] ?? 0) + 1, O !== h)) continue;
3234
+ const Me = {};
3235
+ for (const S of C.matches) {
3236
+ const T = B[S.ruleIndex];
3237
+ if (!T || (Me[T] = (Me[T] ?? 0) + 1, T !== g)) continue;
3940
3238
  if (S.nodeType === "Root") {
3941
- const W = k.lineRange(1);
3942
- J.push(W), te.push({
3239
+ const q = w.lineRange(1);
3240
+ J.push(q), oe.push({
3943
3241
  line: 1,
3944
- ...W,
3242
+ ...q,
3945
3243
  kind: "match",
3946
3244
  title: "Matched Root"
3947
3245
  });
3948
3246
  continue;
3949
3247
  }
3950
- const oe = S.propertyPointers.flatMap((W) => {
3951
- const Q = k.resolve(W, !1);
3952
- return Q ? [{
3953
- key: k.resolve(W, !0),
3954
- value: Q
3248
+ const te = S.propertyPointers.flatMap((q) => {
3249
+ const X = w.resolve(q, !1);
3250
+ return X ? [{
3251
+ key: w.resolve(q, !0),
3252
+ value: X
3955
3253
  }] : [];
3956
3254
  });
3957
- if (oe.length) {
3958
- for (const { key: W, value: Q } of oe) {
3959
- W && K.matchKeys.push(W), K.matchProps.push(Q);
3960
- const Ge = W ?? Q, Ye = {
3961
- from: Ge.from,
3962
- to: Q.to
3255
+ if (te.length) {
3256
+ for (const { key: q, value: X } of te) {
3257
+ q && _.matchKeys.push(q), _.matchProps.push(X);
3258
+ const Ye = q ?? X, Ge = {
3259
+ from: Ye.from,
3260
+ to: X.to
3963
3261
  };
3964
- J.push(Ye), te.push({
3965
- line: k.lineAt(Ge.from),
3966
- ...Ye,
3262
+ J.push(Ge), oe.push({
3263
+ line: w.lineAt(Ye.from),
3264
+ ...Ge,
3967
3265
  kind: "match",
3968
3266
  title: `Matched ${S.nodeType} property`
3969
3267
  });
3970
3268
  }
3971
3269
  continue;
3972
3270
  }
3973
- const U = k.resolve(S.pointer, !0), me = k.resolve(S.pointer, !1);
3974
- U && (K.matchKeys.push(U), J.push(U), te.push({
3975
- line: k.lineAt(U.from),
3976
- from: U.from,
3977
- to: U.to,
3271
+ const H = w.resolve(S.pointer, !0), he = w.resolve(S.pointer, !1);
3272
+ H && (_.matchKeys.push(H), J.push(H), oe.push({
3273
+ line: w.lineAt(H.from),
3274
+ from: H.from,
3275
+ to: H.to,
3978
3276
  kind: "match",
3979
3277
  title: `Matched ${S.nodeType}`
3980
- })), me && K.matchBlocks.push(me);
3278
+ })), he && _.matchBlocks.push(he);
3981
3279
  }
3982
- return J.sort((S, O) => S.from - O.from), {
3983
- highlights: K,
3984
- problemsWithLines: Re,
3985
- matchCountById: Ie,
3986
- rulerMarkers: te,
3280
+ return J.sort((S, T) => S.from - T.from), {
3281
+ highlights: _,
3282
+ problemsWithLines: Ee,
3283
+ matchCountById: Me,
3284
+ rulerMarkers: oe,
3987
3285
  matchTargets: J,
3988
3286
  firstMatchRange: J[0],
3989
- firstProblemRange: fe
3287
+ firstProblemRange: ue
3990
3288
  };
3991
- }, [x, h]), q = f[pe], Ir = q ? L[q.id] ?? 0 : 0, Mr = !!q, de = Y(() => q ? JSON.stringify({
3992
- id: q.id,
3993
- subject: q.rule.subject,
3994
- where: q.rule.where
3995
- }) : "", [q]), ue = Y(() => q ? JSON.stringify({
3996
- assertions: q.rule.assertions,
3997
- severity: q.rule.severity
3998
- }) : "", [q]), We = A(de), He = A(ue), [$e, Ce] = I(null);
3999
- N(() => {
4000
- const E = We.current !== de, k = He.current !== ue;
4001
- We.current = de, He.current = ue, E ? Ce("match") : k && Ce("problem");
4002
- }, [de, ue]), N(() => {
3289
+ }, [y, g]), j = u[de], Mr = j ? O[j.id] ?? 0 : 0, Pr = !!j, pe = G(() => j ? JSON.stringify({
3290
+ id: j.id,
3291
+ subject: j.rule.subject,
3292
+ where: j.rule.where
3293
+ }) : "", [j]), fe = G(() => j ? JSON.stringify({
3294
+ assertions: j.rule.assertions,
3295
+ severity: j.rule.severity
3296
+ }) : "", [j]), qe = L(pe), Ue = L(fe), [$e, Re] = M(null);
3297
+ D(() => {
3298
+ const C = qe.current !== pe, w = Ue.current !== fe;
3299
+ qe.current = pe, Ue.current = fe, C ? Re("match") : w && Re("problem");
3300
+ }, [pe, fe]), D(() => {
4003
3301
  if (!$e || $) return;
4004
- Ce(null);
4005
- const E = $e === "problem" ? re ?? ee : ee;
4006
- E && b({ ...E });
3302
+ Re(null);
3303
+ const C = $e === "problem" ? re ?? ee : ee;
3304
+ C && v({ ...C });
4007
3305
  }, [
4008
3306
  $e,
4009
3307
  $,
4010
3308
  ee,
4011
3309
  re
4012
3310
  ]);
4013
- const Pr = (E) => {
4014
- const k = x.resolver.resolve(E.pointer, E.reportOnKey);
4015
- k && b({ ...k });
4016
- }, Tr = (E) => {
4017
- m((k) => k.filter((B) => B.id !== E)), E === h && y(f.find((k) => k.id !== E)?.id ?? null);
4018
- }, Ar = (E) => {
4019
- const k = E.map(at);
4020
- m((B) => [...B, ...k]), k[0] && y(k[0].id);
3311
+ const Ar = (C) => {
3312
+ const w = y.resolver.resolve(C.pointer, C.reportOnKey);
3313
+ w && v({ ...w });
3314
+ }, Ir = (C) => {
3315
+ h((w) => w.filter((B) => B.id !== C)), C === g && x(u.find((w) => w.id !== C)?.id ?? null);
3316
+ }, Lr = (C) => {
3317
+ const w = C.map(no);
3318
+ h((B) => [...B, ...w]), w[0] && x(w[0].id);
4021
3319
  };
4022
- return /* @__PURE__ */ d(Tn, { children: [/* @__PURE__ */ d(Ln, { children: [/* @__PURE__ */ d(br, { children: [/* @__PURE__ */ r(An, { children: "R" }), /* @__PURE__ */ d(Nn, { children: [/* @__PURE__ */ r("h4", { children: "Rules Builder" }), /* @__PURE__ */ r("p", { children: "Build rule/* entries visually · evaluated by @redocly/openapi-core in your browser" })] })] }), /* @__PURE__ */ d(br, { children: [/* @__PURE__ */ d(ge, {
3320
+ return /* @__PURE__ */ p(An, { children: [/* @__PURE__ */ p(zn, { children: [/* @__PURE__ */ p(vr, { children: [/* @__PURE__ */ r(In, { children: "R" }), /* @__PURE__ */ p(Bn, { children: [/* @__PURE__ */ r("h4", { children: "Rules Builder" }), /* @__PURE__ */ r("p", { children: "Build rule/* entries visually · evaluated by @redocly/openapi-core in your browser" })] })] }), /* @__PURE__ */ p(vr, { children: [/* @__PURE__ */ p(be, {
4023
3321
  style: {
4024
- background: be.bg,
4025
- color: be.fg
3322
+ background: ve.bg,
3323
+ color: ve.fg
4026
3324
  },
4027
- children: [/* @__PURE__ */ r(Dn, {}), "Live linting"]
3325
+ children: [/* @__PURE__ */ r(Ln, {}), "Live linting"]
4028
3326
  }), /* @__PURE__ */ r("a", {
4029
3327
  href: "https://redocly.com/docs/cli/rules/configurable-rules",
4030
3328
  target: "_blank",
4031
3329
  rel: "noopener noreferrer",
4032
3330
  children: "Docs ↗"
4033
- })] })] }), /* @__PURE__ */ d(On, {
4034
- $height: s,
4035
- children: [/* @__PURE__ */ r(en, {
4036
- entries: f,
4037
- selectedId: h,
4038
- matchCountById: L,
4039
- onToggle: (E) => y((k) => k === E ? null : E),
4040
- onChangeEntry: (E) => m((k) => k.map((B) => B.id === E.id ? E : B)),
4041
- onRemove: Tr,
3331
+ })] })] }), /* @__PURE__ */ p(On, {
3332
+ $height: l,
3333
+ children: [/* @__PURE__ */ r(Zt, {
3334
+ entries: u,
3335
+ selectedId: g,
3336
+ matchCountById: O,
3337
+ onToggle: (C) => x((w) => w === C ? null : C),
3338
+ onChangeEntry: (C) => h((w) => w.map((B) => B.id === C.id ? C : B)),
3339
+ onRemove: Ir,
4042
3340
  onAdd: () => {
4043
- const E = it(f.map((k) => k.name));
4044
- m((k) => [...k, E]), y(E.id);
3341
+ const C = ao(u.map((w) => w.name));
3342
+ h((w) => [...w, C]), x(C.id);
4045
3343
  },
4046
3344
  isEvaluating: $,
4047
- importProps: { onImport: Ar },
3345
+ importProps: { onImport: Lr },
4048
3346
  configPreviewProps: {
4049
3347
  yaml: Z,
4050
3348
  host: c
4051
3349
  }
4052
- }), /* @__PURE__ */ d(zn, { children: [/* @__PURE__ */ r(Bn, { children: /* @__PURE__ */ r(Pn, {
3350
+ }), /* @__PURE__ */ p(Tn, { children: [/* @__PURE__ */ r(Nn, { children: /* @__PURE__ */ r(Pn, {
4053
3351
  host: c,
4054
- spec: u.text,
4055
- fileName: u.fileName,
4056
- highlights: x.result.specError ? dn : w,
4057
- rulerMarkers: x.result.specError ? [] : j,
4058
- matchTargets: x.result.specError ? [] : Ee,
4059
- totalLines: x.resolver.lineCount,
4060
- jump: P,
4061
- matchCount: Ir,
4062
- showMatchStatus: Mr && !x.result.specError,
3352
+ spec: f.text,
3353
+ fileName: f.fileName,
3354
+ highlights: y.result.specError ? dn : k,
3355
+ rulerMarkers: y.result.specError ? [] : K,
3356
+ matchTargets: y.result.specError ? [] : Ce,
3357
+ totalLines: y.resolver.lineCount,
3358
+ jump: A,
3359
+ matchCount: Mr,
3360
+ showMatchStatus: Pr && !y.result.specError,
4063
3361
  isEvaluating: $,
4064
- uploadError: R,
4065
- onUploadError: T,
4066
- onSpecChange: (E, k) => g((B) => ({
4067
- text: E,
4068
- fileName: k ?? B.fileName
3362
+ uploadError: E,
3363
+ onUploadError: I,
3364
+ onSpecChange: (C, w) => b((B) => ({
3365
+ text: C,
3366
+ fileName: w ?? B.fileName
4069
3367
  })),
4070
- onResetSpec: () => g({
4071
- text: l,
4072
- fileName: p
3368
+ onResetSpec: () => b({
3369
+ text: s,
3370
+ fileName: d
4073
3371
  })
4074
- }) }), /* @__PURE__ */ r(lt, {
4075
- problems: M,
4076
- ruleErrors: x.result.ruleErrors,
4077
- specError: x.result.specError,
3372
+ }) }), /* @__PURE__ */ r(lo, {
3373
+ problems: P,
3374
+ ruleErrors: y.result.ruleErrors,
3375
+ specError: y.result.specError,
4078
3376
  isRunning: $,
4079
- onSelect: Pr
3377
+ onSelect: Ar
4080
3378
  })] })]
4081
3379
  })] });
4082
3380
  }
4083
3381
  export {
4084
- et as DEFAULT_SPEC,
4085
3382
  Xn as RulesBuilder,
4086
- tt as evaluateRules,
4087
- Gt as parseImportedRules,
4088
- st as serializeRules
3383
+ ro as evaluateRules,
3384
+ Yo as parseImportedRules,
3385
+ io as serializeRules
4089
3386
  };
4090
3387
 
4091
3388
  //# sourceMappingURL=config-rules-builder.js.map