@semiont/react-ui 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -55
- package/dist/{PdfAnnotationCanvas.client-CN3C3S55.js → PdfAnnotationCanvas.client-NIMALXNZ.js} +7 -27
- package/dist/PdfAnnotationCanvas.client-NIMALXNZ.js.map +1 -0
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +243 -99
- package/dist/index.js +539 -405
- package/dist/index.js.map +1 -1
- package/package.json +16 -12
- package/src/components/Button/__tests__/Button.test.tsx +0 -2
- package/src/components/CodeMirrorRenderer.tsx +2 -0
- package/src/components/ErrorBoundary.tsx +0 -9
- package/src/components/ProtectedErrorBoundary.tsx +6 -2
- package/src/components/__tests__/AnnotateReferencesProgressWidget.test.tsx +0 -1
- package/src/components/__tests__/ErrorBoundary.test.tsx +20 -13
- package/src/components/__tests__/LiveRegion.hooks.test.tsx +1 -1
- package/src/components/__tests__/ProtectedErrorBoundary.test.tsx +2 -1
- package/src/components/__tests__/ResizeHandle.test.tsx +0 -1
- package/src/components/__tests__/SessionExpiryBanner.test.tsx +0 -1
- package/src/components/__tests__/StatusDisplay.test.tsx +0 -1
- package/src/components/__tests__/Toast.test.tsx +2 -3
- package/src/components/__tests__/Toolbar.test.tsx +0 -1
- package/src/components/annotation/annotations.css +14 -0
- package/src/components/annotation-popups/__tests__/JsonLdView.test.tsx +3 -5
- package/src/components/annotation-popups/__tests__/SharedPopupElements.test.tsx +0 -1
- package/src/components/branding/__tests__/SemiontBranding.test.tsx +1 -2
- package/src/components/layout/__tests__/LeftSidebar.test.tsx +5 -6
- package/src/components/layout/__tests__/PageLayout.test.tsx +1 -3
- package/src/components/layout/__tests__/SkipLinks.a11y.test.tsx +8 -8
- package/src/components/layout/__tests__/UnifiedHeader.test.tsx +12 -1
- package/src/components/modals/__tests__/KeyboardShortcutsHelpModal.test.tsx +0 -1
- package/src/components/modals/__tests__/PermissionDeniedModal.test.tsx +3 -4
- package/src/components/modals/__tests__/ResourceSearchModal.test.tsx +0 -1
- package/src/components/modals/__tests__/SearchModal.basic.test.tsx +1 -1
- package/src/components/modals/__tests__/SearchModal.keyboard.test.tsx +0 -5
- package/src/components/modals/__tests__/SearchModal.search-wiring.test.tsx +0 -1
- package/src/components/modals/__tests__/SearchModal.visual.test.tsx +2 -2
- package/src/components/modals/__tests__/SessionExpiredModal.test.tsx +0 -1
- package/src/components/navigation/NavigationMenu.tsx +1 -1
- package/src/components/navigation/__tests__/Footer.a11y.test.tsx +4 -0
- package/src/components/navigation/__tests__/Footer.test.tsx +3 -6
- package/src/components/navigation/__tests__/NavigationMenu.a11y.test.tsx +1 -1
- package/src/components/navigation/__tests__/NavigationMenu.test.tsx +7 -9
- package/src/components/navigation/__tests__/ObservableLink.test.tsx +0 -1
- package/src/components/navigation/__tests__/SimpleNavigation.test.tsx +1 -2
- package/src/components/navigation/__tests__/SortableResourceTab.test.tsx +0 -1
- package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +6 -4
- package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +10 -19
- package/src/components/resource/__tests__/BrowseView.test.tsx +8 -6
- package/src/components/resource/__tests__/HistoryEvent.test.tsx +0 -4
- package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +4 -6
- package/src/components/resource/panels/ReferencesPanel.tsx +1 -1
- package/src/components/resource/panels/__tests__/AssessmentEntry.test.tsx +3 -4
- package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +7 -6
- package/src/components/resource/panels/__tests__/AssistSection.test.tsx +14 -10
- package/src/components/resource/panels/__tests__/CollaborationPanel.test.tsx +0 -1
- package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +30 -17
- package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +6 -5
- package/src/components/resource/panels/__tests__/HighlightEntry.test.tsx +4 -5
- package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +19 -13
- package/src/components/resource/panels/__tests__/JsonLdPanel.test.tsx +1 -3
- package/src/components/resource/panels/__tests__/PanelHeader.test.tsx +0 -1
- package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +5 -5
- package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +40 -7
- package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +3 -3
- package/src/components/resource/panels/__tests__/StatisticsPanel.test.tsx +30 -32
- package/src/components/resource/panels/__tests__/TagEntry.test.tsx +5 -5
- package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +6 -5
- package/src/components/settings/__tests__/SettingsPanel.test.tsx +0 -1
- package/src/components/viewers/__tests__/ImageViewer.test.tsx +0 -1
- package/src/features/auth/__tests__/SignInForm.a11y.test.tsx +2 -0
- package/src/features/auth/__tests__/SignUpForm.a11y.test.tsx +11 -12
- package/src/features/auth/__tests__/SignUpForm.test.tsx +3 -3
- package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +1 -0
- package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +2 -1
- package/src/features/resource-discovery/__tests__/ResourceCard.test.tsx +0 -1
- package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +33 -35
- package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +12 -11
- package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +204 -11
- package/src/features/resource-discovery/state/discover-state-unit.ts +70 -11
- package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +2 -2
- package/src/features/resource-viewer/components/ResourceViewerPage.tsx +3 -2
- package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +0 -1
- package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +5 -2
- package/src/integrations/__tests__/css-modules-helper.test.tsx +2 -3
- package/src/integrations/__tests__/styled-components-theme.test.ts +1 -3
- package/dist/PdfAnnotationCanvas.client-CN3C3S55.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1875,11 +1875,11 @@ var ChangeDesc = class _ChangeDesc {
|
|
|
1875
1875
|
provides the position of the range in the old document, `posB`
|
|
1876
1876
|
the new position in the changed document.
|
|
1877
1877
|
*/
|
|
1878
|
-
iterGaps(
|
|
1878
|
+
iterGaps(f11) {
|
|
1879
1879
|
for (let i12 = 0, posA = 0, posB = 0; i12 < this.sections.length; ) {
|
|
1880
1880
|
let len = this.sections[i12++], ins = this.sections[i12++];
|
|
1881
1881
|
if (ins < 0) {
|
|
1882
|
-
|
|
1882
|
+
f11(posA, posB, len);
|
|
1883
1883
|
posB += len;
|
|
1884
1884
|
} else {
|
|
1885
1885
|
posB += ins;
|
|
@@ -1899,8 +1899,8 @@ var ChangeDesc = class _ChangeDesc {
|
|
|
1899
1899
|
separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
|
|
1900
1900
|
reported separately.
|
|
1901
1901
|
*/
|
|
1902
|
-
iterChangedRanges(
|
|
1903
|
-
iterChanges(this,
|
|
1902
|
+
iterChangedRanges(f11, individual = false) {
|
|
1903
|
+
iterChanges(this, f11, individual);
|
|
1904
1904
|
}
|
|
1905
1905
|
/**
|
|
1906
1906
|
Get a description of the inverted form of these changes.
|
|
@@ -2075,8 +2075,8 @@ var ChangeSet = class _ChangeSet extends ChangeDesc {
|
|
|
2075
2075
|
When `individual` is true, adjacent changes are reported
|
|
2076
2076
|
separately.
|
|
2077
2077
|
*/
|
|
2078
|
-
iterChanges(
|
|
2079
|
-
iterChanges(this,
|
|
2078
|
+
iterChanges(f11, individual = false) {
|
|
2079
|
+
iterChanges(this, f11, individual);
|
|
2080
2080
|
}
|
|
2081
2081
|
/**
|
|
2082
2082
|
Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
|
|
@@ -2249,7 +2249,7 @@ function addInsert(values2, sections, value) {
|
|
|
2249
2249
|
values2.push(value);
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
|
-
function iterChanges(desc,
|
|
2252
|
+
function iterChanges(desc, f11, individual) {
|
|
2253
2253
|
let inserted = desc.inserted;
|
|
2254
2254
|
for (let posA = 0, posB = 0, i12 = 0; i12 < desc.sections.length; ) {
|
|
2255
2255
|
let len = desc.sections[i12++], ins = desc.sections[i12++];
|
|
@@ -2268,7 +2268,7 @@ function iterChanges(desc, f10, individual) {
|
|
|
2268
2268
|
len = desc.sections[i12++];
|
|
2269
2269
|
ins = desc.sections[i12++];
|
|
2270
2270
|
}
|
|
2271
|
-
|
|
2271
|
+
f11(posA, endA, posB, endB, text7);
|
|
2272
2272
|
posA = endA;
|
|
2273
2273
|
posB = endB;
|
|
2274
2274
|
}
|
|
@@ -3040,7 +3040,7 @@ var Configuration = class _Configuration {
|
|
|
3040
3040
|
dynamicSlots.push((a15) => dynamicFacetSlot(a15, facet, providers));
|
|
3041
3041
|
}
|
|
3042
3042
|
}
|
|
3043
|
-
let dynamic = dynamicSlots.map((
|
|
3043
|
+
let dynamic = dynamicSlots.map((f11) => f11(address));
|
|
3044
3044
|
return new _Configuration(base2, newCompartments, dynamic, address, staticValues, facets);
|
|
3045
3045
|
}
|
|
3046
3046
|
};
|
|
@@ -3542,13 +3542,13 @@ var EditorState = class _EditorState {
|
|
|
3542
3542
|
spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
|
|
3543
3543
|
[`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
|
|
3544
3544
|
*/
|
|
3545
|
-
changeByRange(
|
|
3545
|
+
changeByRange(f11) {
|
|
3546
3546
|
let sel = this.selection;
|
|
3547
|
-
let result1 =
|
|
3547
|
+
let result1 = f11(sel.ranges[0]);
|
|
3548
3548
|
let changes = this.changes(result1.changes), ranges = [result1.range];
|
|
3549
3549
|
let effects = asArray(result1.effects);
|
|
3550
3550
|
for (let i12 = 1; i12 < sel.ranges.length; i12++) {
|
|
3551
|
-
let result =
|
|
3551
|
+
let result = f11(sel.ranges[i12]);
|
|
3552
3552
|
let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);
|
|
3553
3553
|
for (let j7 = 0; j7 < i12; j7++)
|
|
3554
3554
|
ranges[j7] = ranges[j7].map(newMapped);
|
|
@@ -3774,7 +3774,7 @@ EditorState.readOnly = readOnly;
|
|
|
3774
3774
|
EditorState.phrases = /* @__PURE__ */ Facet.define({
|
|
3775
3775
|
compare(a15, b8) {
|
|
3776
3776
|
let kA = Object.keys(a15), kB = Object.keys(b8);
|
|
3777
|
-
return kA.length == kB.length && kA.every((
|
|
3777
|
+
return kA.length == kB.length && kA.every((k6) => a15[k6] == b8[k6]);
|
|
3778
3778
|
}
|
|
3779
3779
|
});
|
|
3780
3780
|
EditorState.languageData = languageData;
|
|
@@ -3867,9 +3867,9 @@ var Chunk = class _Chunk {
|
|
|
3867
3867
|
lo = mid + 1;
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
|
-
between(offset, from, to,
|
|
3870
|
+
between(offset, from, to, f11) {
|
|
3871
3871
|
for (let i12 = this.findIndex(from, -1e9, true), e6 = this.findIndex(to, 1e9, false, i12); i12 < e6; i12++)
|
|
3872
|
-
if (
|
|
3872
|
+
if (f11(this.from[i12] + offset, this.to[i12] + offset, this.value[i12]) === false)
|
|
3873
3873
|
return false;
|
|
3874
3874
|
}
|
|
3875
3875
|
map(offset, changes) {
|
|
@@ -4011,15 +4011,15 @@ var RangeSet = class _RangeSet {
|
|
|
4011
4011
|
be reported in any specific order. When the callback returns
|
|
4012
4012
|
`false`, iteration stops.
|
|
4013
4013
|
*/
|
|
4014
|
-
between(from, to,
|
|
4014
|
+
between(from, to, f11) {
|
|
4015
4015
|
if (this.isEmpty)
|
|
4016
4016
|
return;
|
|
4017
4017
|
for (let i12 = 0; i12 < this.chunk.length; i12++) {
|
|
4018
4018
|
let start2 = this.chunkPos[i12], chunk = this.chunk[i12];
|
|
4019
|
-
if (to >= start2 && from <= start2 + chunk.length && chunk.between(start2, from - start2, to - start2,
|
|
4019
|
+
if (to >= start2 && from <= start2 + chunk.length && chunk.between(start2, from - start2, to - start2, f11) === false)
|
|
4020
4020
|
return;
|
|
4021
4021
|
}
|
|
4022
|
-
this.nextLayer.between(from, to,
|
|
4022
|
+
this.nextLayer.between(from, to, f11);
|
|
4023
4023
|
}
|
|
4024
4024
|
/**
|
|
4025
4025
|
Iterate over the ranges in this set, in order, including all
|
|
@@ -4703,8 +4703,8 @@ var StyleSet = class {
|
|
|
4703
4703
|
}
|
|
4704
4704
|
if (index2 == -1) {
|
|
4705
4705
|
this.modules.splice(j7++, 0, mod);
|
|
4706
|
-
if (sheet) for (let
|
|
4707
|
-
sheet.insertRule(mod.rules[
|
|
4706
|
+
if (sheet) for (let k6 = 0; k6 < mod.rules.length; k6++)
|
|
4707
|
+
sheet.insertRule(mod.rules[k6], pos++);
|
|
4708
4708
|
} else {
|
|
4709
4709
|
while (j7 < index2) pos += this.modules[j7++].rules.length;
|
|
4710
4710
|
pos += mod.rules.length;
|
|
@@ -5094,8 +5094,8 @@ var Decoration = class extends RangeValue {
|
|
|
5094
5094
|
decorated range or ranges. If the ranges aren't already sorted,
|
|
5095
5095
|
pass `true` for `sort` to make the library sort them for you.
|
|
5096
5096
|
*/
|
|
5097
|
-
static set(
|
|
5098
|
-
return RangeSet.of(
|
|
5097
|
+
static set(of2, sort = false) {
|
|
5098
|
+
return RangeSet.of(of2, sort);
|
|
5099
5099
|
}
|
|
5100
5100
|
/**
|
|
5101
5101
|
@internal
|
|
@@ -5182,10 +5182,11 @@ function addRange(from, to, ranges, margin = 0) {
|
|
|
5182
5182
|
ranges.push(from, to);
|
|
5183
5183
|
}
|
|
5184
5184
|
var BlockWrapper = class _BlockWrapper extends RangeValue {
|
|
5185
|
-
constructor(tagName, attributes) {
|
|
5185
|
+
constructor(tagName, attributes, rank) {
|
|
5186
5186
|
super();
|
|
5187
5187
|
this.tagName = tagName;
|
|
5188
5188
|
this.attributes = attributes;
|
|
5189
|
+
this.rank = rank;
|
|
5189
5190
|
}
|
|
5190
5191
|
eq(other) {
|
|
5191
5192
|
return other == this || other instanceof _BlockWrapper && this.tagName == other.tagName && attrsEq(this.attributes, other.attributes);
|
|
@@ -5195,13 +5196,13 @@ var BlockWrapper = class _BlockWrapper extends RangeValue {
|
|
|
5195
5196
|
attributes.
|
|
5196
5197
|
*/
|
|
5197
5198
|
static create(spec) {
|
|
5198
|
-
return new _BlockWrapper(spec.tagName, spec.attributes || noAttrs);
|
|
5199
|
+
return new _BlockWrapper(spec.tagName, spec.attributes || noAttrs, spec.rank == null ? 50 : Math.max(0, Math.min(spec.rank, 100)));
|
|
5199
5200
|
}
|
|
5200
5201
|
/**
|
|
5201
5202
|
Create a range set from the given block wrapper ranges.
|
|
5202
5203
|
*/
|
|
5203
|
-
static set(
|
|
5204
|
-
return RangeSet.of(
|
|
5204
|
+
static set(of2, sort = false) {
|
|
5205
|
+
return RangeSet.of(of2, sort);
|
|
5205
5206
|
}
|
|
5206
5207
|
};
|
|
5207
5208
|
BlockWrapper.prototype.startSide = BlockWrapper.prototype.endSide = -1;
|
|
@@ -5327,11 +5328,11 @@ function scrollRectIntoView(dom, rect, side, x8, y4, xMargin, yMargin, ltr) {
|
|
|
5327
5328
|
}
|
|
5328
5329
|
let moveX = 0, moveY = 0;
|
|
5329
5330
|
if (y4 == "nearest") {
|
|
5330
|
-
if (rect.top < bounding.top) {
|
|
5331
|
+
if (rect.top < bounding.top + yMargin) {
|
|
5331
5332
|
moveY = rect.top - (bounding.top + yMargin);
|
|
5332
5333
|
if (side > 0 && rect.bottom > bounding.bottom + moveY)
|
|
5333
5334
|
moveY = rect.bottom - bounding.bottom + yMargin;
|
|
5334
|
-
} else if (rect.bottom > bounding.bottom) {
|
|
5335
|
+
} else if (rect.bottom > bounding.bottom - yMargin) {
|
|
5335
5336
|
moveY = rect.bottom - bounding.bottom + yMargin;
|
|
5336
5337
|
if (side < 0 && rect.top - moveY < bounding.top)
|
|
5337
5338
|
moveY = rect.top - (bounding.top + yMargin);
|
|
@@ -5342,11 +5343,11 @@ function scrollRectIntoView(dom, rect, side, x8, y4, xMargin, yMargin, ltr) {
|
|
|
5342
5343
|
moveY = targetTop - bounding.top;
|
|
5343
5344
|
}
|
|
5344
5345
|
if (x8 == "nearest") {
|
|
5345
|
-
if (rect.left < bounding.left) {
|
|
5346
|
+
if (rect.left < bounding.left + xMargin) {
|
|
5346
5347
|
moveX = rect.left - (bounding.left + xMargin);
|
|
5347
5348
|
if (side > 0 && rect.right > bounding.right + moveX)
|
|
5348
5349
|
moveX = rect.right - bounding.right + xMargin;
|
|
5349
|
-
} else if (rect.right > bounding.right) {
|
|
5350
|
+
} else if (rect.right > bounding.right - xMargin) {
|
|
5350
5351
|
moveX = rect.right - bounding.right + xMargin;
|
|
5351
5352
|
if (side < 0 && rect.left < bounding.left + moveX)
|
|
5352
5353
|
moveX = rect.left - (bounding.left + xMargin);
|
|
@@ -5954,7 +5955,7 @@ var nativeSelectionHidden = /* @__PURE__ */ Facet.define({
|
|
|
5954
5955
|
});
|
|
5955
5956
|
var scrollHandler = /* @__PURE__ */ Facet.define();
|
|
5956
5957
|
var ScrollTarget = class _ScrollTarget {
|
|
5957
|
-
constructor(range, y4
|
|
5958
|
+
constructor(range, y4, x8, yMargin, xMargin, isSnapshot = false) {
|
|
5958
5959
|
this.range = range;
|
|
5959
5960
|
this.y = y4;
|
|
5960
5961
|
this.x = x8;
|
|
@@ -6459,7 +6460,7 @@ var DocTile = class extends CompositeTile {
|
|
|
6459
6460
|
dom = dom.parentNode;
|
|
6460
6461
|
}
|
|
6461
6462
|
}
|
|
6462
|
-
blockTiles(
|
|
6463
|
+
blockTiles(f11) {
|
|
6463
6464
|
for (let stack = [], cur = this, i12 = 0, pos = 0; ; ) {
|
|
6464
6465
|
if (i12 == cur.children.length) {
|
|
6465
6466
|
if (!stack.length)
|
|
@@ -6476,7 +6477,7 @@ var DocTile = class extends CompositeTile {
|
|
|
6476
6477
|
i12 = 0;
|
|
6477
6478
|
} else {
|
|
6478
6479
|
let end = pos + next.length;
|
|
6479
|
-
let result =
|
|
6480
|
+
let result = f11(next, pos);
|
|
6480
6481
|
if (result !== void 0)
|
|
6481
6482
|
return result;
|
|
6482
6483
|
pos = end + next.breakAfter;
|
|
@@ -6914,6 +6915,7 @@ var TileBuilder = class {
|
|
|
6914
6915
|
);
|
|
6915
6916
|
let text7 = new TextTile(composition.text, composition.text.nodeValue);
|
|
6916
6917
|
text7.flags |= 8;
|
|
6918
|
+
this.pos = composition.range.toB;
|
|
6917
6919
|
head.append(text7);
|
|
6918
6920
|
}
|
|
6919
6921
|
addInlineWidget(widget, marks2, openStart) {
|
|
@@ -7018,7 +7020,8 @@ var TileBuilder = class {
|
|
|
7018
7020
|
this.wrappers.splice(i12, 1);
|
|
7019
7021
|
for (let cur = this.blockWrappers; cur.value && cur.from <= this.pos; cur.next())
|
|
7020
7022
|
if (cur.to >= this.pos) {
|
|
7021
|
-
let
|
|
7023
|
+
let rank = cur.rank * 102 + cur.value.rank;
|
|
7024
|
+
let wrap3 = new OpenWrapper(cur.from, cur.to, cur.value, rank), i12 = this.wrappers.length;
|
|
7022
7025
|
while (i12 > 0 && (this.wrappers[i12 - 1].rank - wrap3.rank || this.wrappers[i12 - 1].to - wrap3.to) < 0)
|
|
7023
7026
|
i12--;
|
|
7024
7027
|
this.wrappers.splice(i12, 0, wrap3);
|
|
@@ -8312,7 +8315,7 @@ function skipAtomsForSelection(atoms, sel) {
|
|
|
8312
8315
|
return ranges ? EditorSelection.create(ranges, sel.mainIndex) : sel;
|
|
8313
8316
|
}
|
|
8314
8317
|
function skipAtoms(view, oldPos, pos) {
|
|
8315
|
-
let newPos = skipAtomicRanges(view.state.facet(atomicRanges).map((
|
|
8318
|
+
let newPos = skipAtomicRanges(view.state.facet(atomicRanges).map((f11) => f11(view)), pos.from, oldPos.head > pos.from ? -1 : 1);
|
|
8316
8319
|
return newPos == pos.from ? pos : EditorSelection.cursor(newPos, newPos < pos.from ? 1 : -1);
|
|
8317
8320
|
}
|
|
8318
8321
|
var PosAssoc = class {
|
|
@@ -8395,7 +8398,7 @@ var InlineCoordsScan = class {
|
|
|
8395
8398
|
// (including the position after the last piece). For a text tile,
|
|
8396
8399
|
// these will be character clusters, for a composite tile, these
|
|
8397
8400
|
// will be child tiles.
|
|
8398
|
-
scan(positions, getRects) {
|
|
8401
|
+
scan(positions, getRects, recursed = false) {
|
|
8399
8402
|
let lo = 0, hi = positions.length - 1, seen = /* @__PURE__ */ new Set();
|
|
8400
8403
|
let bidi = this.bidiIn(positions[0], positions[hi]);
|
|
8401
8404
|
let above, below;
|
|
@@ -8450,7 +8453,18 @@ var InlineCoordsScan = class {
|
|
|
8450
8453
|
if (!closestRect) {
|
|
8451
8454
|
let side = above && (!below || this.y - above.bottom < below.top - this.y) ? above : below;
|
|
8452
8455
|
this.y = (side.top + side.bottom) / 2;
|
|
8453
|
-
return this.scan(positions, getRects);
|
|
8456
|
+
return this.scan(positions, getRects, true);
|
|
8457
|
+
}
|
|
8458
|
+
if (closestDx && !recursed) {
|
|
8459
|
+
let { top: top2, bottom } = closestRect;
|
|
8460
|
+
if (above && above.bottom > (top2 + top2 + bottom) / 3) {
|
|
8461
|
+
this.y = above.bottom - 1;
|
|
8462
|
+
return this.scan(positions, getRects, true);
|
|
8463
|
+
}
|
|
8464
|
+
if (below && below.top < (top2 + bottom + bottom) / 3) {
|
|
8465
|
+
this.y = below.top + 1;
|
|
8466
|
+
return this.scan(positions, getRects, true);
|
|
8467
|
+
}
|
|
8454
8468
|
}
|
|
8455
8469
|
let ltr = (bidi ? this.dirAt(positions[closestI], 1) : this.baseDir) == Direction.LTR;
|
|
8456
8470
|
return {
|
|
@@ -8754,7 +8768,7 @@ function applyDOMChange(view, domChange) {
|
|
|
8754
8768
|
scrollIntoView2 = true;
|
|
8755
8769
|
userEvent = view.inputState.lastSelectionOrigin;
|
|
8756
8770
|
if (userEvent == "select.pointer")
|
|
8757
|
-
newSel = skipAtomsForSelection(state.facet(atomicRanges).map((
|
|
8771
|
+
newSel = skipAtomsForSelection(state.facet(atomicRanges).map((f11) => f11(view)), newSel);
|
|
8758
8772
|
}
|
|
8759
8773
|
view.dispatch({ selection: newSel, scrollIntoView: scrollIntoView2, userEvent });
|
|
8760
8774
|
return true;
|
|
@@ -8783,7 +8797,7 @@ function applyDefaultInsert(view, change, newSel) {
|
|
|
8783
8797
|
let tr, startState = view.state, sel = startState.selection.main, inAtomic = -1;
|
|
8784
8798
|
if (change.from == change.to && change.from < sel.from || change.from > sel.to) {
|
|
8785
8799
|
let side = change.from < sel.from ? -1 : 1, pos = side < 0 ? sel.from : sel.to;
|
|
8786
|
-
let moved = skipAtomicRanges(startState.facet(atomicRanges).map((
|
|
8800
|
+
let moved = skipAtomicRanges(startState.facet(atomicRanges).map((f11) => f11(view)), pos, side);
|
|
8787
8801
|
if (change.from == moved)
|
|
8788
8802
|
inAtomic = moved;
|
|
8789
8803
|
}
|
|
@@ -9053,15 +9067,15 @@ function computeHandlers(plugins) {
|
|
|
9053
9067
|
let spec = plugin.spec, handlers3 = spec && spec.plugin.domEventHandlers, observers2 = spec && spec.plugin.domEventObservers;
|
|
9054
9068
|
if (handlers3)
|
|
9055
9069
|
for (let type in handlers3) {
|
|
9056
|
-
let
|
|
9057
|
-
if (
|
|
9058
|
-
record(type).handlers.push(bindHandler(plugin.value,
|
|
9070
|
+
let f11 = handlers3[type];
|
|
9071
|
+
if (f11)
|
|
9072
|
+
record(type).handlers.push(bindHandler(plugin.value, f11));
|
|
9059
9073
|
}
|
|
9060
9074
|
if (observers2)
|
|
9061
9075
|
for (let type in observers2) {
|
|
9062
|
-
let
|
|
9063
|
-
if (
|
|
9064
|
-
record(type).observers.push(bindHandler(plugin.value,
|
|
9076
|
+
let f11 = observers2[type];
|
|
9077
|
+
if (f11)
|
|
9078
|
+
record(type).observers.push(bindHandler(plugin.value, f11));
|
|
9065
9079
|
}
|
|
9066
9080
|
}
|
|
9067
9081
|
for (let type in handlers)
|
|
@@ -9095,7 +9109,7 @@ var MouseSelection = class {
|
|
|
9095
9109
|
this.scrolling = -1;
|
|
9096
9110
|
this.lastEvent = startEvent;
|
|
9097
9111
|
this.scrollParents = scrollableParents(view.contentDOM);
|
|
9098
|
-
this.atoms = view.state.facet(atomicRanges).map((
|
|
9112
|
+
this.atoms = view.state.facet(atomicRanges).map((f11) => f11(view));
|
|
9099
9113
|
let doc2 = view.contentDOM.ownerDocument;
|
|
9100
9114
|
doc2.addEventListener("mousemove", this.move = this.move.bind(this));
|
|
9101
9115
|
doc2.addEventListener("mouseup", this.up = this.up.bind(this));
|
|
@@ -9699,7 +9713,7 @@ var HeightOracle = class {
|
|
|
9699
9713
|
}
|
|
9700
9714
|
refresh(whiteSpace, lineHeight, charWidth, textHeight, lineLength, knownHeights) {
|
|
9701
9715
|
let lineWrapping = wrappingWhiteSpace.indexOf(whiteSpace) > -1;
|
|
9702
|
-
let changed = Math.abs(lineHeight - this.lineHeight) > 0.3 || this.lineWrapping != lineWrapping
|
|
9716
|
+
let changed = Math.abs(lineHeight - this.lineHeight) > 0.3 || this.lineWrapping != lineWrapping;
|
|
9703
9717
|
this.lineWrapping = lineWrapping;
|
|
9704
9718
|
this.lineHeight = lineHeight;
|
|
9705
9719
|
this.charWidth = charWidth;
|
|
@@ -9919,9 +9933,9 @@ var HeightMapBlock = class extends HeightMap {
|
|
|
9919
9933
|
let main = this.mainBlock(top2, offset);
|
|
9920
9934
|
return this.spaceAbove ? this.blockAt(0, oracle, top2, offset).join(main) : main;
|
|
9921
9935
|
}
|
|
9922
|
-
forEachLine(from, to, oracle, top2, offset,
|
|
9936
|
+
forEachLine(from, to, oracle, top2, offset, f11) {
|
|
9923
9937
|
if (from <= offset + this.length && to >= offset)
|
|
9924
|
-
|
|
9938
|
+
f11(this.lineAt(0, QueryType.ByPos, oracle, top2, offset));
|
|
9925
9939
|
}
|
|
9926
9940
|
setMeasuredHeight(measured) {
|
|
9927
9941
|
let next = measured.heights[measured.index++];
|
|
@@ -10026,7 +10040,7 @@ var HeightMapGap = class _HeightMapGap extends HeightMap {
|
|
|
10026
10040
|
let lineTop = top2 + perLine * linesAbove + perChar * (line.from - offset - linesAbove);
|
|
10027
10041
|
return new BlockInfo(line.from, line.length, Math.max(top2, Math.min(lineTop, top2 + this.height - lineHeight)), lineHeight, 0);
|
|
10028
10042
|
}
|
|
10029
|
-
forEachLine(from, to, oracle, top2, offset,
|
|
10043
|
+
forEachLine(from, to, oracle, top2, offset, f11) {
|
|
10030
10044
|
from = Math.max(from, offset);
|
|
10031
10045
|
to = Math.min(to, offset + this.length);
|
|
10032
10046
|
let { firstLine, perLine, perChar } = this.heightMetrics(oracle, offset);
|
|
@@ -10037,7 +10051,7 @@ var HeightMapGap = class _HeightMapGap extends HeightMap {
|
|
|
10037
10051
|
lineTop += perLine * linesAbove + perChar * (from - offset - linesAbove);
|
|
10038
10052
|
}
|
|
10039
10053
|
let lineHeight = perLine + perChar * line.length;
|
|
10040
|
-
|
|
10054
|
+
f11(new BlockInfo(line.from, line.length, lineTop, lineHeight, 0));
|
|
10041
10055
|
lineTop += lineHeight;
|
|
10042
10056
|
pos = line.to + 1;
|
|
10043
10057
|
}
|
|
@@ -10132,21 +10146,21 @@ var HeightMapBranch = class extends HeightMap {
|
|
|
10132
10146
|
else
|
|
10133
10147
|
return this.left.lineAt(rightOffset, subQuery, oracle, top2, offset).join(base2);
|
|
10134
10148
|
}
|
|
10135
|
-
forEachLine(from, to, oracle, top2, offset,
|
|
10149
|
+
forEachLine(from, to, oracle, top2, offset, f11) {
|
|
10136
10150
|
let rightTop = top2 + this.left.height, rightOffset = offset + this.left.length + this.break;
|
|
10137
10151
|
if (this.break) {
|
|
10138
10152
|
if (from < rightOffset)
|
|
10139
|
-
this.left.forEachLine(from, to, oracle, top2, offset,
|
|
10153
|
+
this.left.forEachLine(from, to, oracle, top2, offset, f11);
|
|
10140
10154
|
if (to >= rightOffset)
|
|
10141
|
-
this.right.forEachLine(from, to, oracle, rightTop, rightOffset,
|
|
10155
|
+
this.right.forEachLine(from, to, oracle, rightTop, rightOffset, f11);
|
|
10142
10156
|
} else {
|
|
10143
10157
|
let mid = this.lineAt(rightOffset, QueryType.ByPos, oracle, top2, offset);
|
|
10144
10158
|
if (from < mid.from)
|
|
10145
|
-
this.left.forEachLine(from, mid.from - 1, oracle, top2, offset,
|
|
10159
|
+
this.left.forEachLine(from, mid.from - 1, oracle, top2, offset, f11);
|
|
10146
10160
|
if (mid.to >= from && mid.from <= to)
|
|
10147
|
-
|
|
10161
|
+
f11(mid);
|
|
10148
10162
|
if (to > mid.to)
|
|
10149
|
-
this.right.forEachLine(mid.to + 1, to, oracle, rightTop, rightOffset,
|
|
10163
|
+
this.right.forEachLine(mid.to + 1, to, oracle, rightTop, rightOffset, f11);
|
|
10150
10164
|
}
|
|
10151
10165
|
}
|
|
10152
10166
|
replace(from, to, nodes) {
|
|
@@ -10928,9 +10942,9 @@ function findFraction(structure, pos) {
|
|
|
10928
10942
|
}
|
|
10929
10943
|
return counted / structure.total;
|
|
10930
10944
|
}
|
|
10931
|
-
function find(array,
|
|
10945
|
+
function find(array, f11) {
|
|
10932
10946
|
for (let val of array)
|
|
10933
|
-
if (
|
|
10947
|
+
if (f11(val))
|
|
10934
10948
|
return val;
|
|
10935
10949
|
return void 0;
|
|
10936
10950
|
}
|
|
@@ -11058,7 +11072,7 @@ var baseTheme$1 = /* @__PURE__ */ buildTheme("." + baseThemeID, {
|
|
|
11058
11072
|
display: "block",
|
|
11059
11073
|
whiteSpace: "pre",
|
|
11060
11074
|
wordWrap: "normal",
|
|
11061
|
-
//
|
|
11075
|
+
// Issue #456
|
|
11062
11076
|
boxSizing: "border-box",
|
|
11063
11077
|
minHeight: "100%",
|
|
11064
11078
|
padding: "4px 0",
|
|
@@ -11503,12 +11517,12 @@ var DOMObserver = class {
|
|
|
11503
11517
|
dom.addEventListener("scroll", this.onScroll);
|
|
11504
11518
|
}
|
|
11505
11519
|
}
|
|
11506
|
-
ignore(
|
|
11520
|
+
ignore(f11) {
|
|
11507
11521
|
if (!this.active)
|
|
11508
|
-
return
|
|
11522
|
+
return f11();
|
|
11509
11523
|
try {
|
|
11510
11524
|
this.stop();
|
|
11511
|
-
return
|
|
11525
|
+
return f11();
|
|
11512
11526
|
} finally {
|
|
11513
11527
|
this.start();
|
|
11514
11528
|
this.clear();
|
|
@@ -12125,7 +12139,8 @@ var EditorView = class _EditorView {
|
|
|
12125
12139
|
scrollTarget = scrollTarget.map(tr.changes);
|
|
12126
12140
|
if (tr.scrollIntoView) {
|
|
12127
12141
|
let { main } = tr.state.selection;
|
|
12128
|
-
|
|
12142
|
+
let { x: x8, y: y4 } = this.state.facet(_EditorView.cursorScrollMargin);
|
|
12143
|
+
scrollTarget = new ScrollTarget(main.empty ? main : EditorSelection.cursor(main.head, main.head > main.anchor ? -1 : 1), "nearest", "nearest", y4, x8);
|
|
12129
12144
|
}
|
|
12130
12145
|
for (let e6 of tr.effects)
|
|
12131
12146
|
if (e6.is(scrollIntoView))
|
|
@@ -12769,7 +12784,8 @@ var EditorView = class _EditorView {
|
|
|
12769
12784
|
cause it to scroll the given position or range into view.
|
|
12770
12785
|
*/
|
|
12771
12786
|
static scrollIntoView(pos, options = {}) {
|
|
12772
|
-
|
|
12787
|
+
var _a2, _b, _c, _d;
|
|
12788
|
+
return scrollIntoView.of(new ScrollTarget(typeof pos == "number" ? EditorSelection.cursor(pos) : pos, (_a2 = options.y) !== null && _a2 !== void 0 ? _a2 : "nearest", (_b = options.x) !== null && _b !== void 0 ? _b : "nearest", (_c = options.yMargin) !== null && _c !== void 0 ? _c : 5, (_d = options.xMargin) !== null && _d !== void 0 ? _d : 5));
|
|
12773
12789
|
}
|
|
12774
12790
|
/**
|
|
12775
12791
|
Return an effect that resets the editor to its current (at the
|
|
@@ -12835,7 +12851,7 @@ var EditorView = class _EditorView {
|
|
|
12835
12851
|
}
|
|
12836
12852
|
/**
|
|
12837
12853
|
Create a theme extension. The first argument can be a
|
|
12838
|
-
[`style-mod`](https://
|
|
12854
|
+
[`style-mod`](https://code.haverbeke.berlin/marijn/style-mod#documentation)
|
|
12839
12855
|
style spec providing the styles for the theme. These will be
|
|
12840
12856
|
prefixed with a generated class for the style.
|
|
12841
12857
|
|
|
@@ -12897,6 +12913,18 @@ EditorView.blockWrappers = blockWrappers;
|
|
|
12897
12913
|
EditorView.outerDecorations = outerDecorations;
|
|
12898
12914
|
EditorView.atomicRanges = atomicRanges;
|
|
12899
12915
|
EditorView.bidiIsolatedRanges = bidiIsolatedRanges;
|
|
12916
|
+
EditorView.cursorScrollMargin = /* @__PURE__ */ Facet.define({
|
|
12917
|
+
combine: (inputs) => {
|
|
12918
|
+
let x8 = 5, y4 = 5;
|
|
12919
|
+
for (let i12 of inputs) {
|
|
12920
|
+
if (typeof i12 == "number")
|
|
12921
|
+
x8 = y4 = i12;
|
|
12922
|
+
else
|
|
12923
|
+
({ x: x8, y: y4 } = i12);
|
|
12924
|
+
}
|
|
12925
|
+
return { x: x8, y: y4 };
|
|
12926
|
+
}
|
|
12927
|
+
});
|
|
12900
12928
|
EditorView.scrollMargins = scrollMargins;
|
|
12901
12929
|
EditorView.darkTheme = darkTheme;
|
|
12902
12930
|
EditorView.cspNonce = /* @__PURE__ */ Facet.define({ combine: (values2) => values2.length ? values2[0] : "" });
|
|
@@ -13010,7 +13038,7 @@ function buildKeymap(bindings, platform = currentPlatform) {
|
|
|
13010
13038
|
let add2 = (scope, key, command, preventDefault2, stopPropagation2) => {
|
|
13011
13039
|
var _a2, _b;
|
|
13012
13040
|
let scopeObj = bound[scope] || (bound[scope] = /* @__PURE__ */ Object.create(null));
|
|
13013
|
-
let parts = key.split(/ (?!$)/).map((
|
|
13041
|
+
let parts = key.split(/ (?!$)/).map((k6) => normalizeKeyName(k6, platform));
|
|
13014
13042
|
for (let i12 = 1; i12 < parts.length; i12++) {
|
|
13015
13043
|
let prefix = parts.slice(0, i12).join(" ");
|
|
13016
13044
|
checkPrefix(prefix, true);
|
|
@@ -15208,9 +15236,9 @@ var TreeFragment = class _TreeFragment {
|
|
|
15208
15236
|
*/
|
|
15209
15237
|
static addTree(tree, fragments = [], partial = false) {
|
|
15210
15238
|
let result = [new _TreeFragment(0, tree.length, tree, 0, false, partial)];
|
|
15211
|
-
for (let
|
|
15212
|
-
if (
|
|
15213
|
-
result.push(
|
|
15239
|
+
for (let f11 of fragments)
|
|
15240
|
+
if (f11.to > tree.length)
|
|
15241
|
+
result.push(f11);
|
|
15214
15242
|
return result;
|
|
15215
15243
|
}
|
|
15216
15244
|
/**
|
|
@@ -15517,8 +15545,12 @@ var StructureCursor = class {
|
|
|
15517
15545
|
let { cursor: cursor2 } = this, p6 = pos - this.offset;
|
|
15518
15546
|
while (!this.done && cursor2.from < p6) {
|
|
15519
15547
|
if (cursor2.to >= pos && cursor2.enter(p6, 1, IterMode.IgnoreOverlays | IterMode.ExcludeBuffers)) ;
|
|
15520
|
-
else if (
|
|
15521
|
-
|
|
15548
|
+
else if (cursor2.to <= pos) {
|
|
15549
|
+
if (!cursor2.next(false))
|
|
15550
|
+
this.done = true;
|
|
15551
|
+
} else {
|
|
15552
|
+
break;
|
|
15553
|
+
}
|
|
15522
15554
|
}
|
|
15523
15555
|
}
|
|
15524
15556
|
hasNode(cursor2) {
|
|
@@ -16646,11 +16678,11 @@ var ParseContext = class _ParseContext {
|
|
|
16646
16678
|
this.parse = null;
|
|
16647
16679
|
}
|
|
16648
16680
|
}
|
|
16649
|
-
withContext(
|
|
16681
|
+
withContext(f11) {
|
|
16650
16682
|
let prev = currentContext;
|
|
16651
16683
|
currentContext = this;
|
|
16652
16684
|
try {
|
|
16653
|
-
return
|
|
16685
|
+
return f11();
|
|
16654
16686
|
} finally {
|
|
16655
16687
|
currentContext = prev;
|
|
16656
16688
|
}
|
|
@@ -17359,6 +17391,9 @@ var ReferenceResolutionWidget = class extends WidgetType {
|
|
|
17359
17391
|
this.targetDocumentName = targetDocumentName;
|
|
17360
17392
|
this.isGenerating = isGenerating;
|
|
17361
17393
|
}
|
|
17394
|
+
annotation;
|
|
17395
|
+
targetDocumentName;
|
|
17396
|
+
isGenerating;
|
|
17362
17397
|
eq(other) {
|
|
17363
17398
|
const thisSource = getBodySource(this.annotation.body);
|
|
17364
17399
|
const otherSource = getBodySource(other.annotation.body);
|
|
@@ -17533,7 +17568,7 @@ function saveSelectedShapeForSelectorType(selectorType, shape) {
|
|
|
17533
17568
|
}
|
|
17534
17569
|
|
|
17535
17570
|
// src/index.ts
|
|
17536
|
-
import { createSearchPipeline as
|
|
17571
|
+
import { createSearchPipeline as createSearchPipeline3 } from "@semiont/sdk";
|
|
17537
17572
|
|
|
17538
17573
|
// src/lib/annotation-overlay.ts
|
|
17539
17574
|
import { getTextPositionSelector, getTargetSelector, getExactText, getBodySource as getBodySource2 } from "@semiont/core";
|
|
@@ -18947,7 +18982,8 @@ var baseTheme2 = /* @__PURE__ */ EditorView.baseTheme({
|
|
|
18947
18982
|
content: '"\xB7\xB7\xB7"',
|
|
18948
18983
|
opacity: 0.5,
|
|
18949
18984
|
display: "block",
|
|
18950
|
-
textAlign: "center"
|
|
18985
|
+
textAlign: "center",
|
|
18986
|
+
cursor: "pointer"
|
|
18951
18987
|
},
|
|
18952
18988
|
".cm-tooltip.cm-completionInfo": {
|
|
18953
18989
|
position: "absolute",
|
|
@@ -19070,6 +19106,8 @@ var Snippet = class _Snippet {
|
|
|
19070
19106
|
for (let line of template.split(/\r\n?|\n/)) {
|
|
19071
19107
|
while (m6 = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(line)) {
|
|
19072
19108
|
let seq = m6[1] ? +m6[1] : null, rawName = m6[2] || m6[3] || "", found = -1;
|
|
19109
|
+
if (seq === 0)
|
|
19110
|
+
seq = 1e9;
|
|
19073
19111
|
let name3 = rawName.replace(/\\[{}]/g, (m7) => m7[1]);
|
|
19074
19112
|
for (let i12 = 0; i12 < fields.length; i12++) {
|
|
19075
19113
|
if (seq != null ? fields[i12].seq == seq : name3 ? fields[i12].name == name3 : false)
|
|
@@ -19161,7 +19199,7 @@ var snippetState = /* @__PURE__ */ StateField.define({
|
|
|
19161
19199
|
value = null;
|
|
19162
19200
|
return value;
|
|
19163
19201
|
},
|
|
19164
|
-
provide: (
|
|
19202
|
+
provide: (f11) => EditorView.decorations.from(f11, (val) => val ? val.deco : Decoration.none)
|
|
19165
19203
|
});
|
|
19166
19204
|
function fieldSelection(ranges, field) {
|
|
19167
19205
|
return EditorSelection.create(ranges.filter((r14) => r14.field == field).map((r14) => EditorSelection.range(r14.from, r14.to)));
|
|
@@ -20795,10 +20833,10 @@ var InlineContext = class {
|
|
|
20795
20833
|
}
|
|
20796
20834
|
if (open.type.mark)
|
|
20797
20835
|
content4.push(this.elt(open.type.mark, start2, open.to));
|
|
20798
|
-
for (let
|
|
20799
|
-
if (this.parts[
|
|
20800
|
-
content4.push(this.parts[
|
|
20801
|
-
this.parts[
|
|
20836
|
+
for (let k6 = j7 + 1; k6 < i12; k6++) {
|
|
20837
|
+
if (this.parts[k6] instanceof Element2)
|
|
20838
|
+
content4.push(this.parts[k6]);
|
|
20839
|
+
this.parts[k6] = null;
|
|
20802
20840
|
}
|
|
20803
20841
|
if (close.type.mark)
|
|
20804
20842
|
content4.push(this.elt(close.type.mark, close.from, end));
|
|
@@ -21116,7 +21154,7 @@ var TableParser = class {
|
|
|
21116
21154
|
let lineText;
|
|
21117
21155
|
if ((line.next == 45 || line.next == 58 || line.next == 124) && delimiterLine.test(lineText = line.text.slice(line.pos))) {
|
|
21118
21156
|
let firstRow = [], firstCount = parseRow(cx, leaf.content, 0, firstRow, leaf.start);
|
|
21119
|
-
if (firstCount == parseRow(cx, lineText,
|
|
21157
|
+
if (firstCount == parseRow(cx, lineText, 0))
|
|
21120
21158
|
this.rows = [
|
|
21121
21159
|
cx.elt("TableHeader", leaf.start, leaf.start + leaf.content.length, firstRow),
|
|
21122
21160
|
cx.elt("TableDelimiter", cx.lineStart + line.pos, cx.lineStart + line.text.length)
|
|
@@ -21184,8 +21222,8 @@ var TaskList = {
|
|
|
21184
21222
|
}]
|
|
21185
21223
|
};
|
|
21186
21224
|
var autolinkRE = /(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy;
|
|
21187
|
-
var urlRE = /[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy;
|
|
21188
|
-
var lastTwoDomainWords = /[\w-]+\.[\w-]+(
|
|
21225
|
+
var urlRE = /[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy;
|
|
21226
|
+
var lastTwoDomainWords = /[\w-]+\.[\w-]+($|[/:])/;
|
|
21189
21227
|
var emailRE = /[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy;
|
|
21190
21228
|
var xmppResourceRE = /\/[a-zA-Z\d@.]+/gy;
|
|
21191
21229
|
function count(str, from, to, ch) {
|
|
@@ -21369,6 +21407,8 @@ var Stack = class _Stack {
|
|
|
21369
21407
|
if (dPrec)
|
|
21370
21408
|
this.score += dPrec;
|
|
21371
21409
|
if (depth == 0) {
|
|
21410
|
+
if (type < parser6.minRepeatTerm && this.reducePos < this.pos)
|
|
21411
|
+
this.reducePos = this.pos;
|
|
21372
21412
|
this.pushState(parser6.getGoto(this.state, type, true), this.reducePos);
|
|
21373
21413
|
if (type < parser6.minRepeatTerm)
|
|
21374
21414
|
this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
|
|
@@ -21376,7 +21416,10 @@ var Stack = class _Stack {
|
|
|
21376
21416
|
return;
|
|
21377
21417
|
}
|
|
21378
21418
|
let base2 = this.stack.length - (depth - 1) * 3 - (action & 262144 ? 6 : 0);
|
|
21379
|
-
let start2 = base2 ? this.stack[base2 - 2] : this.p.ranges[0].from
|
|
21419
|
+
let start2 = base2 ? this.stack[base2 - 2] : this.p.ranges[0].from;
|
|
21420
|
+
if (type < parser6.minRepeatTerm && start2 == this.reducePos && this.reducePos < this.pos)
|
|
21421
|
+
this.reducePos = this.pos;
|
|
21422
|
+
let size = this.reducePos - start2;
|
|
21380
21423
|
if (size >= 2e3 && !((_a2 = this.p.parser.nodeSet.types[type]) === null || _a2 === void 0 ? void 0 : _a2.isAnonymous)) {
|
|
21381
21424
|
if (start2 == this.p.lastBigReductionStart) {
|
|
21382
21425
|
this.p.bigReductionCount++;
|
|
@@ -21412,16 +21455,12 @@ var Stack = class _Stack {
|
|
|
21412
21455
|
*/
|
|
21413
21456
|
storeNode(term, start2, end, size = 4, mustSink = false) {
|
|
21414
21457
|
if (term == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
21415
|
-
let
|
|
21416
|
-
if (top2 == 0 &&
|
|
21417
|
-
top2 = cur.bufferBase - cur.parent.bufferBase;
|
|
21418
|
-
cur = cur.parent;
|
|
21419
|
-
}
|
|
21420
|
-
if (top2 > 0 && cur.buffer[top2 - 4] == 0 && cur.buffer[top2 - 1] > -1) {
|
|
21458
|
+
let top2 = this.buffer.length;
|
|
21459
|
+
if (top2 > 0 && this.buffer[top2 - 4] == 0 && this.buffer[top2 - 1] > -1) {
|
|
21421
21460
|
if (start2 == end)
|
|
21422
21461
|
return;
|
|
21423
|
-
if (
|
|
21424
|
-
|
|
21462
|
+
if (this.buffer[top2 - 2] >= start2) {
|
|
21463
|
+
this.buffer[top2 - 2] = end;
|
|
21425
21464
|
return;
|
|
21426
21465
|
}
|
|
21427
21466
|
}
|
|
@@ -21525,6 +21564,8 @@ var Stack = class _Stack {
|
|
|
21525
21564
|
split() {
|
|
21526
21565
|
let parent = this;
|
|
21527
21566
|
let off = parent.buffer.length;
|
|
21567
|
+
if (off && parent.buffer[off - 4] == 0)
|
|
21568
|
+
off -= 4;
|
|
21528
21569
|
while (off > 0 && parent.buffer[off - 2] > parent.reducePos)
|
|
21529
21570
|
off -= 4;
|
|
21530
21571
|
let buffer = parent.buffer.slice(off), base2 = parent.bufferBase + off;
|
|
@@ -23410,12 +23451,12 @@ function configureNesting(tags3 = [], attributes = []) {
|
|
|
23410
23451
|
}
|
|
23411
23452
|
|
|
23412
23453
|
// ../../node_modules/@lezer/css/dist/index.js
|
|
23413
|
-
var descendantOp =
|
|
23454
|
+
var descendantOp = 135;
|
|
23414
23455
|
var Unit = 1;
|
|
23415
|
-
var identifier =
|
|
23416
|
-
var callee =
|
|
23456
|
+
var identifier = 136;
|
|
23457
|
+
var callee = 137;
|
|
23417
23458
|
var VariableName = 2;
|
|
23418
|
-
var queryIdentifier =
|
|
23459
|
+
var queryIdentifier = 138;
|
|
23419
23460
|
var queryVariableName = 3;
|
|
23420
23461
|
var QueryCallee = 4;
|
|
23421
23462
|
var space2 = [
|
|
@@ -23493,10 +23534,12 @@ var identifierTokens = (id2, varName, callee2) => (input, stack) => {
|
|
|
23493
23534
|
}
|
|
23494
23535
|
};
|
|
23495
23536
|
var identifiers = new ExternalTokenizer(
|
|
23496
|
-
identifierTokens(identifier, VariableName, callee)
|
|
23537
|
+
identifierTokens(identifier, VariableName, callee),
|
|
23538
|
+
{ contextual: true }
|
|
23497
23539
|
);
|
|
23498
23540
|
var queryIdentifiers = new ExternalTokenizer(
|
|
23499
|
-
identifierTokens(queryIdentifier, queryVariableName, QueryCallee)
|
|
23541
|
+
identifierTokens(queryIdentifier, queryVariableName, QueryCallee),
|
|
23542
|
+
{ contextual: true }
|
|
23500
23543
|
);
|
|
23501
23544
|
var descendant = new ExternalTokenizer((input) => {
|
|
23502
23545
|
if (space2.includes(input.peek(-1))) {
|
|
@@ -23521,8 +23564,8 @@ var unitToken = new ExternalTokenizer((input) => {
|
|
|
23521
23564
|
}
|
|
23522
23565
|
});
|
|
23523
23566
|
var cssHighlighting = styleTags({
|
|
23524
|
-
"AtKeyword import charset namespace keyframes media supports": tags.definitionKeyword,
|
|
23525
|
-
"from to selector": tags.keyword,
|
|
23567
|
+
"AtKeyword import charset namespace keyframes media supports font-feature-values": tags.definitionKeyword,
|
|
23568
|
+
"from to selector scope MatchFlag": tags.keyword,
|
|
23526
23569
|
NamespaceName: tags.namespace,
|
|
23527
23570
|
KeyframeName: tags.labelName,
|
|
23528
23571
|
KeyframeRangeName: tags.operatorKeyword,
|
|
@@ -23535,7 +23578,7 @@ var cssHighlighting = styleTags({
|
|
|
23535
23578
|
NumberLiteral: tags.number,
|
|
23536
23579
|
KeywordQuery: tags.keyword,
|
|
23537
23580
|
UnaryQueryOp: tags.operatorKeyword,
|
|
23538
|
-
"CallTag ValueName": tags.atom,
|
|
23581
|
+
"CallTag ValueName FontName": tags.atom,
|
|
23539
23582
|
VariableName: tags.variableName,
|
|
23540
23583
|
Callee: tags.operatorKeyword,
|
|
23541
23584
|
Unit: tags.unit,
|
|
@@ -23549,37 +23592,37 @@ var cssHighlighting = styleTags({
|
|
|
23549
23592
|
"ParenthesizedContent StringLiteral": tags.string,
|
|
23550
23593
|
":": tags.punctuation,
|
|
23551
23594
|
"PseudoOp #": tags.derefOperator,
|
|
23552
|
-
"; ,": tags.separator,
|
|
23595
|
+
"; , |": tags.separator,
|
|
23553
23596
|
"( )": tags.paren,
|
|
23554
23597
|
"[ ]": tags.squareBracket,
|
|
23555
23598
|
"{ }": tags.brace
|
|
23556
23599
|
});
|
|
23557
|
-
var spec_callee = { __proto__: null, lang:
|
|
23558
|
-
var spec_queryIdentifier = { __proto__: null, or:
|
|
23559
|
-
var spec_QueryCallee = { __proto__: null, selector:
|
|
23560
|
-
var spec_AtKeyword = { __proto__: null, "@import":
|
|
23561
|
-
var spec_identifier = { __proto__: null, to:
|
|
23600
|
+
var spec_callee = { __proto__: null, lang: 44, "nth-child": 44, "nth-last-child": 44, "nth-of-type": 44, "nth-last-of-type": 44, dir: 44, "host-context": 44, if: 90, url: 132, "url-prefix": 132, domain: 132, regexp: 132 };
|
|
23601
|
+
var spec_queryIdentifier = { __proto__: null, or: 104, and: 104, not: 112, only: 112, layer: 186 };
|
|
23602
|
+
var spec_QueryCallee = { __proto__: null, selector: 118, layer: 182 };
|
|
23603
|
+
var spec_AtKeyword = { __proto__: null, "@import": 178, "@media": 190, "@charset": 194, "@namespace": 198, "@keyframes": 204, "@supports": 216, "@scope": 220, "@font-feature-values": 226 };
|
|
23604
|
+
var spec_identifier = { __proto__: null, to: 223 };
|
|
23562
23605
|
var parser3 = LRParser.deserialize({
|
|
23563
23606
|
version: 14,
|
|
23564
|
-
states: "
|
|
23565
|
-
stateData: "
|
|
23566
|
-
goto: "
|
|
23567
|
-
nodeNames: "\u26A0 Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",
|
|
23568
|
-
maxTerm:
|
|
23607
|
+
states: "IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FdO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#DtO'dQdO'#DvO'oQdO'#D}O'oQdO'#EQOOQP'#Fd'#FdO)OQhO'#EsOOQS'#Fc'#FcOOQS'#Ev'#EvQYQdOOO)VQdO'#EWO*cQhO'#E^O)VQdO'#E`O*jQdO'#EbO*uQdO'#EeO)zQhO'#EkO*}QdO'#EmO+YQdO'#EpO+_QaO'#CfO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l!yQ$r#QQ$u#UQ$x#XQ%e$OQ&S$tQ&y&OQ&|&TR'h&xSnP!RQ#]oQ$|#ZR&Z$}ZmPo!R#Z$}Q${#YQ&X$yR'P&WR$e!qQ&n%oR'm'_R!}gR#PhR$q#PS&O$p&PR'f&wV%|$p&P&wR#XkQ#_qR%Q#_QcOSoP!RU!kco$}R$}#ZQ%Z#pY&`%Z&f'U'^'sQ&f%_Q'U&aQ'^&kR's'kQ$Y!mQ$[!nQ$^!oV%j$Y$[$^Q%t$gR&t%tQ&j%gS']&j'lR'l'^Q&b%ZR'V&bQ&^%WR'T&^Q!QXR#l!QQ&W$yR'O&WQ#[nS%O#[%PR%P#]Q'`&nR'n'`Q$k!xR%x$kQ&P$pR&z&PQ&x&OR'g&xQ#WkR$w#WQ$O!dR%d$O_bOPco!R#Z$}^XOPco!R#Z$}Q!`]Q!a^Q#h|Q#i}Q#j!OQ#k!PQ$s#RQ%W#oR'S&]R%[#pQ!qdQ!zf[$V!m!n!o$Y$[$^Q$y#Yd%Y#p%Z%_&a&f&k'U'^'k'sQ%^#uQ%n$aS&U$y&WQ&[%UQ&}&VR'b&p]$X!m!n!o$Y$[$^Q!d`U!xe!q$eQ#QiQ#x!cS#{!d$OQ$Q!eQ%b#|Q%c#}Q%g$RS%r$g%tQ%w$jR'Z&iQ#z!cQ&h%`R'j'YR%i$RR%X#oQpPR#n!RQ!yeQ$d!qR%q$e",
|
|
23610
|
+
nodeNames: "\u26A0 Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",
|
|
23611
|
+
maxTerm: 159,
|
|
23569
23612
|
nodeProps: [
|
|
23570
|
-
["isolate", -2, 5,
|
|
23571
|
-
["openedBy",
|
|
23572
|
-
["closedBy",
|
|
23613
|
+
["isolate", -2, 5, 39, ""],
|
|
23614
|
+
["openedBy", 23, "(", 31, "[", 34, "{"],
|
|
23615
|
+
["closedBy", 24, ")", 32, "]", 35, "}"]
|
|
23573
23616
|
],
|
|
23574
23617
|
propSources: [cssHighlighting],
|
|
23575
|
-
skippedNodes: [0, 5,
|
|
23576
|
-
repeatNodeCount:
|
|
23577
|
-
tokenData: "
|
|
23578
|
-
tokenizers: [descendant, unitToken, identifiers, queryIdentifiers, 1, 2, 3, 4, new LocalTokenGroup("m~RRYZ[z{a~~g~aO
|
|
23579
|
-
topRules: { "StyleSheet": [0, 6], "Styles": [1,
|
|
23580
|
-
dynamicPrecedences: { "
|
|
23581
|
-
specialized: [{ term:
|
|
23582
|
-
tokenPrec:
|
|
23618
|
+
skippedNodes: [0, 5, 117],
|
|
23619
|
+
repeatNodeCount: 17,
|
|
23620
|
+
tokenData: "K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!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bEj#b;'S%j;'S;=`%{<%lO%jbEoU!e`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!e`Oy%jz#c%j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!e`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!e`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!e`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!e`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",
|
|
23621
|
+
tokenizers: [descendant, unitToken, identifiers, queryIdentifiers, 1, 2, 3, 4, new LocalTokenGroup("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~", 28, 142)],
|
|
23622
|
+
topRules: { "StyleSheet": [0, 6], "Styles": [1, 116] },
|
|
23623
|
+
dynamicPrecedences: { "84": 1 },
|
|
23624
|
+
specialized: [{ term: 137, get: (value) => spec_callee[value] || -1 }, { term: 138, get: (value) => spec_queryIdentifier[value] || -1 }, { term: 4, get: (value) => spec_QueryCallee[value] || -1 }, { term: 28, get: (value) => spec_AtKeyword[value] || -1 }, { term: 136, get: (value) => spec_identifier[value] || -1 }],
|
|
23625
|
+
tokenPrec: 2256
|
|
23583
23626
|
});
|
|
23584
23627
|
|
|
23585
23628
|
// ../../node_modules/@codemirror/lang-css/dist/index.js
|
|
@@ -26200,9 +26243,10 @@ function getAnnotationTooltip(annotation) {
|
|
|
26200
26243
|
}
|
|
26201
26244
|
return "Annotation";
|
|
26202
26245
|
}
|
|
26203
|
-
function getAnnotationDecorationMeta(annotation, isNew) {
|
|
26246
|
+
function getAnnotationDecorationMeta(annotation, isNew, segment) {
|
|
26204
26247
|
const baseClassName = Object.values(ANNOTATORS).find((a15) => a15.matchesAnnotation(annotation))?.className || "annotation-highlight";
|
|
26205
|
-
const
|
|
26248
|
+
const lowConfidenceClass = segment?.confidence && segment.confidence !== "high" ? " annotation-low-confidence" : "";
|
|
26249
|
+
const className = `${baseClassName}${isNew ? " annotation-sparkle" : ""}${lowConfidenceClass}`;
|
|
26206
26250
|
const isHighlightAnn = isHighlight2(annotation);
|
|
26207
26251
|
const isReferenceAnn = isReference2(annotation);
|
|
26208
26252
|
const isCommentAnn = isComment2(annotation);
|
|
@@ -26214,11 +26258,15 @@ function getAnnotationDecorationMeta(annotation, isNew) {
|
|
|
26214
26258
|
else if (isAssessmentAnn) annotationType = "assessment";
|
|
26215
26259
|
else if (isTagAnn) annotationType = "tag";
|
|
26216
26260
|
else if (isHighlightAnn) annotationType = "highlight";
|
|
26261
|
+
const baseTooltip = getAnnotationTooltip(annotation);
|
|
26262
|
+
const tooltip = segment?.strategy && segment.strategy !== "fast-path" && segment.strategy !== "unique-occurrence" ? `${baseTooltip} (anchored: ${segment.strategy})` : baseTooltip;
|
|
26217
26263
|
return {
|
|
26218
26264
|
className,
|
|
26219
26265
|
annotationType,
|
|
26220
26266
|
annotationId: annotation.id,
|
|
26221
|
-
tooltip
|
|
26267
|
+
tooltip,
|
|
26268
|
+
...segment?.strategy !== void 0 ? { strategy: segment.strategy } : {},
|
|
26269
|
+
...segment?.confidence !== void 0 ? { confidence: segment.confidence } : {}
|
|
26222
26270
|
};
|
|
26223
26271
|
}
|
|
26224
26272
|
function computeAnnotationDecorations(segments, newAnnotationIds) {
|
|
@@ -26228,7 +26276,10 @@ function computeAnnotationDecorations(segments, newAnnotationIds) {
|
|
|
26228
26276
|
return {
|
|
26229
26277
|
start: segment.start,
|
|
26230
26278
|
end: segment.end,
|
|
26231
|
-
meta: getAnnotationDecorationMeta(annotation, isNew
|
|
26279
|
+
meta: getAnnotationDecorationMeta(annotation, isNew, {
|
|
26280
|
+
...segment.strategy !== void 0 ? { strategy: segment.strategy } : {},
|
|
26281
|
+
...segment.confidence !== void 0 ? { confidence: segment.confidence } : {}
|
|
26282
|
+
})
|
|
26232
26283
|
};
|
|
26233
26284
|
});
|
|
26234
26285
|
}
|
|
@@ -26333,6 +26384,8 @@ function buildAnnotationDecorations(segments, newAnnotationIds) {
|
|
|
26333
26384
|
attributes: {
|
|
26334
26385
|
"data-annotation-id": meta2.annotationId,
|
|
26335
26386
|
"data-annotation-type": meta2.annotationType,
|
|
26387
|
+
...meta2.strategy ? { "data-anchor-strategy": meta2.strategy } : {},
|
|
26388
|
+
...meta2.confidence ? { "data-anchor-confidence": meta2.confidence } : {},
|
|
26336
26389
|
title: meta2.tooltip
|
|
26337
26390
|
}
|
|
26338
26391
|
});
|
|
@@ -26720,15 +26773,13 @@ var ErrorBoundary = class extends Component {
|
|
|
26720
26773
|
super(props);
|
|
26721
26774
|
this.state = {
|
|
26722
26775
|
hasError: false,
|
|
26723
|
-
error: null
|
|
26724
|
-
errorInfo: null
|
|
26776
|
+
error: null
|
|
26725
26777
|
};
|
|
26726
26778
|
}
|
|
26727
26779
|
static getDerivedStateFromError(error) {
|
|
26728
26780
|
return {
|
|
26729
26781
|
hasError: true,
|
|
26730
|
-
error
|
|
26731
|
-
errorInfo: null
|
|
26782
|
+
error
|
|
26732
26783
|
};
|
|
26733
26784
|
}
|
|
26734
26785
|
componentDidCatch(error, errorInfo) {
|
|
@@ -26738,15 +26789,11 @@ var ErrorBoundary = class extends Component {
|
|
|
26738
26789
|
if (this.props.onError) {
|
|
26739
26790
|
this.props.onError(error, errorInfo);
|
|
26740
26791
|
}
|
|
26741
|
-
this.setState({
|
|
26742
|
-
errorInfo
|
|
26743
|
-
});
|
|
26744
26792
|
}
|
|
26745
26793
|
handleReset = () => {
|
|
26746
26794
|
this.setState({
|
|
26747
26795
|
hasError: false,
|
|
26748
|
-
error: null
|
|
26749
|
-
errorInfo: null
|
|
26796
|
+
error: null
|
|
26750
26797
|
});
|
|
26751
26798
|
};
|
|
26752
26799
|
render() {
|
|
@@ -26838,6 +26885,8 @@ function ProtectedErrorBoundary({
|
|
|
26838
26885
|
);
|
|
26839
26886
|
}
|
|
26840
26887
|
function ProtectedErrorFallback({ error, resetErrorBoundary }) {
|
|
26888
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
26889
|
+
const stack = error instanceof Error ? error.stack : void 0;
|
|
26841
26890
|
return /* @__PURE__ */ jsx9("div", { className: "min-h-[400px] flex items-center justify-center p-4", children: /* @__PURE__ */ jsxs4("div", { className: "max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6", children: [
|
|
26842
26891
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
26843
26892
|
/* @__PURE__ */ jsx9("div", { className: "flex-shrink-0 w-10 h-10 bg-red-100 dark:bg-red-900/30 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx9("svg", { className: "w-6 h-6 text-red-600 dark:text-red-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx9("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }),
|
|
@@ -26847,8 +26896,8 @@ function ProtectedErrorFallback({ error, resetErrorBoundary }) {
|
|
|
26847
26896
|
process.env.NODE_ENV === "development" && /* @__PURE__ */ jsxs4("details", { className: "mb-4", children: [
|
|
26848
26897
|
/* @__PURE__ */ jsx9("summary", { className: "text-sm text-gray-500 cursor-pointer hover:text-gray-700 dark:hover:text-gray-300", children: "Error details (development only)" }),
|
|
26849
26898
|
/* @__PURE__ */ jsxs4("pre", { className: "mt-2 text-xs bg-gray-100 dark:bg-gray-900 p-2 rounded-sm overflow-auto", children: [
|
|
26850
|
-
|
|
26851
|
-
|
|
26899
|
+
message,
|
|
26900
|
+
stack
|
|
26852
26901
|
] })
|
|
26853
26902
|
] }),
|
|
26854
26903
|
/* @__PURE__ */ jsxs4("div", { className: "flex gap-3", children: [
|
|
@@ -27827,16 +27876,16 @@ function JsonLdView({ annotation, onBack }) {
|
|
|
27827
27876
|
|
|
27828
27877
|
// ../../node_modules/clsx/dist/clsx.mjs
|
|
27829
27878
|
function r(e6) {
|
|
27830
|
-
var t12,
|
|
27879
|
+
var t12, f11, n12 = "";
|
|
27831
27880
|
if ("string" == typeof e6 || "number" == typeof e6) n12 += e6;
|
|
27832
27881
|
else if ("object" == typeof e6) if (Array.isArray(e6)) {
|
|
27833
27882
|
var o12 = e6.length;
|
|
27834
|
-
for (t12 = 0; t12 < o12; t12++) e6[t12] && (
|
|
27835
|
-
} else for (
|
|
27883
|
+
for (t12 = 0; t12 < o12; t12++) e6[t12] && (f11 = r(e6[t12])) && (n12 && (n12 += " "), n12 += f11);
|
|
27884
|
+
} else for (f11 in e6) e6[f11] && (n12 && (n12 += " "), n12 += f11);
|
|
27836
27885
|
return n12;
|
|
27837
27886
|
}
|
|
27838
27887
|
function clsx() {
|
|
27839
|
-
for (var e6, t12,
|
|
27888
|
+
for (var e6, t12, f11 = 0, n12 = "", o12 = arguments.length; f11 < o12; f11++) (e6 = arguments[f11]) && (t12 = r(e6)) && (n12 && (n12 += " "), n12 += t12);
|
|
27840
27889
|
return n12;
|
|
27841
27890
|
}
|
|
27842
27891
|
|
|
@@ -27988,7 +28037,7 @@ function a2() {
|
|
|
27988
28037
|
}
|
|
27989
28038
|
|
|
27990
28039
|
// ../../node_modules/@headlessui/react/dist/utils/render.js
|
|
27991
|
-
import
|
|
28040
|
+
import v, { Fragment as S2, cloneElement as j, createElement as w, forwardRef as k, isValidElement as M, useCallback as x, useRef as O } from "react";
|
|
27992
28041
|
|
|
27993
28042
|
// ../../node_modules/@headlessui/react/dist/utils/class-names.js
|
|
27994
28043
|
function t5(...r14) {
|
|
@@ -28007,33 +28056,33 @@ function u(r14, n12, ...a15) {
|
|
|
28007
28056
|
|
|
28008
28057
|
// ../../node_modules/@headlessui/react/dist/utils/render.js
|
|
28009
28058
|
var A = ((a15) => (a15[a15.None = 0] = "None", a15[a15.RenderStrategy = 1] = "RenderStrategy", a15[a15.Static = 2] = "Static", a15))(A || {});
|
|
28010
|
-
var C2 = ((
|
|
28059
|
+
var C2 = ((t12) => (t12[t12.Unmount = 0] = "Unmount", t12[t12.Hidden = 1] = "Hidden", t12))(C2 || {});
|
|
28011
28060
|
function K() {
|
|
28012
|
-
let
|
|
28013
|
-
return x((r14) => U({ mergeRefs:
|
|
28014
|
-
}
|
|
28015
|
-
function U({ ourProps:
|
|
28016
|
-
|
|
28017
|
-
let
|
|
28018
|
-
if (
|
|
28019
|
-
let y4 =
|
|
28061
|
+
let e6 = I();
|
|
28062
|
+
return x((r14) => U({ mergeRefs: e6, ...r14 }), [e6]);
|
|
28063
|
+
}
|
|
28064
|
+
function U({ ourProps: e6, theirProps: r14, slot: t12, defaultTag: a15, features: o12, visible: n12 = true, name: i12, mergeRefs: l10 }) {
|
|
28065
|
+
l10 = l10 != null ? l10 : H;
|
|
28066
|
+
let s11 = P(r14, e6);
|
|
28067
|
+
if (n12) return F(s11, t12, a15, i12, l10);
|
|
28068
|
+
let y4 = o12 != null ? o12 : 0;
|
|
28020
28069
|
if (y4 & 2) {
|
|
28021
|
-
let { static:
|
|
28022
|
-
if (
|
|
28070
|
+
let { static: f11 = false, ...u12 } = s11;
|
|
28071
|
+
if (f11) return F(u12, t12, a15, i12, l10);
|
|
28023
28072
|
}
|
|
28024
28073
|
if (y4 & 1) {
|
|
28025
|
-
let { unmount:
|
|
28026
|
-
return u(
|
|
28074
|
+
let { unmount: f11 = true, ...u12 } = s11;
|
|
28075
|
+
return u(f11 ? 0 : 1, { [0]() {
|
|
28027
28076
|
return null;
|
|
28028
28077
|
}, [1]() {
|
|
28029
|
-
return F({ ...u12, hidden: true, style: { display: "none" } },
|
|
28078
|
+
return F({ ...u12, hidden: true, style: { display: "none" } }, t12, a15, i12, l10);
|
|
28030
28079
|
} });
|
|
28031
28080
|
}
|
|
28032
|
-
return F(
|
|
28081
|
+
return F(s11, t12, a15, i12, l10);
|
|
28033
28082
|
}
|
|
28034
|
-
function F(
|
|
28035
|
-
let { as:
|
|
28036
|
-
"className" in
|
|
28083
|
+
function F(e6, r14 = {}, t12, a15, o12) {
|
|
28084
|
+
let { as: n12 = t12, children: i12, refName: l10 = "ref", ...s11 } = h(e6, ["unmount", "static"]), y4 = e6.ref !== void 0 ? { [l10]: e6.ref } : {}, f11 = typeof i12 == "function" ? i12(r14) : i12;
|
|
28085
|
+
f11 = E(f11), "className" in s11 && s11.className && typeof s11.className == "function" && (s11.className = s11.className(r14)), s11["aria-labelledby"] && s11["aria-labelledby"] === s11.id && (s11["aria-labelledby"] = void 0);
|
|
28037
28086
|
let u12 = {};
|
|
28038
28087
|
if (r14) {
|
|
28039
28088
|
let d8 = false, p6 = [];
|
|
@@ -28043,72 +28092,79 @@ function F(n12, r14 = {}, e6, a15, s11) {
|
|
|
28043
28092
|
for (let c12 of p6) u12[`data-${c12}`] = "";
|
|
28044
28093
|
}
|
|
28045
28094
|
}
|
|
28046
|
-
if (b(
|
|
28047
|
-
if (Object.keys(m(
|
|
28095
|
+
if (b(n12) && (Object.keys(m(s11)).length > 0 || Object.keys(m(u12)).length > 0)) if (!M(f11) || Array.isArray(f11) && f11.length > 1 || L(f11)) {
|
|
28096
|
+
if (Object.keys(m(s11)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${a15} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(m(s11)).concat(Object.keys(m(u12))).map((d8) => ` - ${d8}`).join(`
|
|
28048
28097
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((d8) => ` - ${d8}`).join(`
|
|
28049
28098
|
`)].join(`
|
|
28050
28099
|
`));
|
|
28051
28100
|
} else {
|
|
28052
|
-
let d8 =
|
|
28101
|
+
let d8 = f11.props, p6 = d8 == null ? void 0 : d8.className, c12 = typeof p6 == "function" ? (...R2) => t5(p6(...R2), s11.className) : t5(p6, s11.className), T7 = c12 ? { className: c12 } : {}, g2 = P(f11.props, m(h(s11, ["ref"])));
|
|
28053
28102
|
for (let R2 in u12) R2 in g2 && delete u12[R2];
|
|
28054
|
-
return
|
|
28103
|
+
return j(f11, Object.assign({}, g2, u12, y4, { ref: o12(D(f11), y4.ref) }, T7));
|
|
28055
28104
|
}
|
|
28056
|
-
return
|
|
28105
|
+
return w(n12, Object.assign({}, h(s11, ["ref"]), !b(n12) && y4, !b(n12) && u12), f11);
|
|
28057
28106
|
}
|
|
28058
|
-
function
|
|
28059
|
-
let
|
|
28060
|
-
for (let a15 of
|
|
28107
|
+
function I() {
|
|
28108
|
+
let e6 = O([]), r14 = x((t12) => {
|
|
28109
|
+
for (let a15 of e6.current) a15 != null && (typeof a15 == "function" ? a15(t12) : a15.current = t12);
|
|
28061
28110
|
}, []);
|
|
28062
|
-
return (...
|
|
28063
|
-
if (!
|
|
28111
|
+
return (...t12) => {
|
|
28112
|
+
if (!t12.every((a15) => a15 == null)) return e6.current = t12, r14;
|
|
28064
28113
|
};
|
|
28065
28114
|
}
|
|
28066
|
-
function
|
|
28067
|
-
return
|
|
28068
|
-
for (let
|
|
28115
|
+
function H(...e6) {
|
|
28116
|
+
return e6.every((r14) => r14 == null) ? void 0 : (r14) => {
|
|
28117
|
+
for (let t12 of e6) t12 != null && (typeof t12 == "function" ? t12(r14) : t12.current = r14);
|
|
28069
28118
|
};
|
|
28070
28119
|
}
|
|
28071
|
-
function P(...
|
|
28120
|
+
function P(...e6) {
|
|
28072
28121
|
var a15;
|
|
28073
|
-
if (
|
|
28074
|
-
if (
|
|
28075
|
-
let r14 = {},
|
|
28076
|
-
for (let
|
|
28077
|
-
if (r14.disabled || r14["aria-disabled"]) for (let
|
|
28078
|
-
var
|
|
28079
|
-
return (
|
|
28122
|
+
if (e6.length === 0) return {};
|
|
28123
|
+
if (e6.length === 1) return e6[0];
|
|
28124
|
+
let r14 = {}, t12 = {};
|
|
28125
|
+
for (let o12 of e6) for (let n12 in o12) n12.startsWith("on") && typeof o12[n12] == "function" ? ((a15 = t12[n12]) != null || (t12[n12] = []), t12[n12].push(o12[n12])) : r14[n12] = o12[n12];
|
|
28126
|
+
if (r14.disabled || r14["aria-disabled"]) for (let o12 in t12) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o12) && (t12[o12] = [(n12) => {
|
|
28127
|
+
var i12;
|
|
28128
|
+
return (i12 = n12 == null ? void 0 : n12.preventDefault) == null ? void 0 : i12.call(n12);
|
|
28080
28129
|
}]);
|
|
28081
|
-
for (let
|
|
28082
|
-
let
|
|
28083
|
-
for (let
|
|
28084
|
-
if ((
|
|
28085
|
-
|
|
28130
|
+
for (let o12 in t12) Object.assign(r14, { [o12](n12, ...i12) {
|
|
28131
|
+
let l10 = t12[o12];
|
|
28132
|
+
for (let s11 of l10) {
|
|
28133
|
+
if ((n12 instanceof Event || (n12 == null ? void 0 : n12.nativeEvent) instanceof Event) && n12.defaultPrevented) return;
|
|
28134
|
+
s11(n12, ...i12);
|
|
28086
28135
|
}
|
|
28087
28136
|
} });
|
|
28088
28137
|
return r14;
|
|
28089
28138
|
}
|
|
28090
|
-
function Y(
|
|
28139
|
+
function Y(e6) {
|
|
28091
28140
|
var r14;
|
|
28092
|
-
return Object.assign(
|
|
28141
|
+
return Object.assign(k(e6), { displayName: (r14 = e6.displayName) != null ? r14 : e6.name });
|
|
28093
28142
|
}
|
|
28094
|
-
function m(
|
|
28095
|
-
let r14 = Object.assign({},
|
|
28096
|
-
for (let
|
|
28143
|
+
function m(e6) {
|
|
28144
|
+
let r14 = Object.assign({}, e6);
|
|
28145
|
+
for (let t12 in r14) r14[t12] === void 0 && delete r14[t12];
|
|
28097
28146
|
return r14;
|
|
28098
28147
|
}
|
|
28099
|
-
function h(
|
|
28100
|
-
let
|
|
28101
|
-
for (let a15 of r14) a15 in
|
|
28102
|
-
return
|
|
28148
|
+
function h(e6, r14 = []) {
|
|
28149
|
+
let t12 = Object.assign({}, e6);
|
|
28150
|
+
for (let a15 of r14) a15 in t12 && delete t12[a15];
|
|
28151
|
+
return t12;
|
|
28103
28152
|
}
|
|
28104
|
-
function
|
|
28105
|
-
return
|
|
28153
|
+
function D(e6) {
|
|
28154
|
+
return v.version.split(".")[0] >= "19" ? e6.props.ref : e6.ref;
|
|
28106
28155
|
}
|
|
28107
|
-
function
|
|
28108
|
-
|
|
28156
|
+
function E(e6) {
|
|
28157
|
+
if (e6 != null && e6.$$typeof === /* @__PURE__ */ Symbol.for("react.lazy")) {
|
|
28158
|
+
let r14 = e6._payload;
|
|
28159
|
+
if (r14 != null && r14.status === "fulfilled") return E(r14.value);
|
|
28160
|
+
}
|
|
28161
|
+
return e6;
|
|
28109
28162
|
}
|
|
28110
|
-
function
|
|
28111
|
-
return
|
|
28163
|
+
function b(e6) {
|
|
28164
|
+
return e6 === S2 || e6 === /* @__PURE__ */ Symbol.for("react.fragment");
|
|
28165
|
+
}
|
|
28166
|
+
function L(e6) {
|
|
28167
|
+
return b(e6.type);
|
|
28112
28168
|
}
|
|
28113
28169
|
|
|
28114
28170
|
// ../../node_modules/@headlessui/react/dist/hooks/use-id.js
|
|
@@ -28418,7 +28474,7 @@ var E2 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "butt
|
|
|
28418
28474
|
var S5 = ["[data-autofocus]"].map((e6) => `${e6}:not([tabindex='-1'])`).join(",");
|
|
28419
28475
|
var T4 = ((o12) => (o12[o12.First = 1] = "First", o12[o12.Previous = 2] = "Previous", o12[o12.Next = 4] = "Next", o12[o12.Last = 8] = "Last", o12[o12.WrapAround = 16] = "WrapAround", o12[o12.NoScroll = 32] = "NoScroll", o12[o12.AutoFocus = 64] = "AutoFocus", o12))(T4 || {});
|
|
28420
28476
|
var A2 = ((n12) => (n12[n12.Error = 0] = "Error", n12[n12.Overflow = 1] = "Overflow", n12[n12.Success = 2] = "Success", n12[n12.Underflow = 3] = "Underflow", n12))(A2 || {});
|
|
28421
|
-
var
|
|
28477
|
+
var O2 = ((t12) => (t12[t12.Previous = -1] = "Previous", t12[t12.Next = 1] = "Next", t12))(O2 || {});
|
|
28422
28478
|
function x3(e6 = document.body) {
|
|
28423
28479
|
return e6 == null ? [] : Array.from(e6.querySelectorAll(E2)).sort((r14, t12) => Math.sign((r14.tabIndex || Number.MAX_SAFE_INTEGER) - (t12.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
28424
28480
|
}
|
|
@@ -28468,7 +28524,7 @@ function v3(e6, r14, { sorted: t12 = true, relativeTo: l10 = null, skipElements:
|
|
|
28468
28524
|
if (r14 & 5) return 1;
|
|
28469
28525
|
if (r14 & 10) return -1;
|
|
28470
28526
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
28471
|
-
})(),
|
|
28527
|
+
})(), M6 = (() => {
|
|
28472
28528
|
if (r14 & 1) return 0;
|
|
28473
28529
|
if (r14 & 2) return Math.max(0, u12.indexOf(l10)) - 1;
|
|
28474
28530
|
if (r14 & 4) return Math.max(0, u12.indexOf(l10)) + 1;
|
|
@@ -28477,7 +28533,7 @@ function v3(e6, r14, { sorted: t12 = true, relativeTo: l10 = null, skipElements:
|
|
|
28477
28533
|
})(), N2 = r14 & 32 ? { preventScroll: true } : {}, m6 = 0, c12 = u12.length, s11;
|
|
28478
28534
|
do {
|
|
28479
28535
|
if (m6 >= c12 || m6 + c12 <= 0) return 0;
|
|
28480
|
-
let i12 =
|
|
28536
|
+
let i12 = M6 + m6;
|
|
28481
28537
|
if (r14 & 16) i12 = (i12 + c12) % c12;
|
|
28482
28538
|
else {
|
|
28483
28539
|
if (i12 < 0) return 3;
|
|
@@ -28527,17 +28583,17 @@ function s6(t12, e6, o12, n12) {
|
|
|
28527
28583
|
|
|
28528
28584
|
// ../../node_modules/@headlessui/react/dist/hooks/use-outside-click.js
|
|
28529
28585
|
var C5 = 30;
|
|
28530
|
-
function k3(o12,
|
|
28586
|
+
function k3(o12, f11, h6) {
|
|
28531
28587
|
let m6 = s3(h6), s11 = T5(function(e6, c12) {
|
|
28532
28588
|
if (e6.defaultPrevented) return;
|
|
28533
28589
|
let r14 = c12(e6);
|
|
28534
28590
|
if (r14 === null || !r14.getRootNode().contains(r14) || !r14.isConnected) return;
|
|
28535
|
-
let
|
|
28591
|
+
let M6 = (function u12(n12) {
|
|
28536
28592
|
return typeof n12 == "function" ? u12(n12()) : Array.isArray(n12) || n12 instanceof Set ? n12 : [n12];
|
|
28537
|
-
})(
|
|
28538
|
-
for (let u12 of
|
|
28593
|
+
})(f11);
|
|
28594
|
+
for (let u12 of M6) if (u12 !== null && (u12.contains(r14) || e6.composed && e6.composedPath().includes(u12))) return;
|
|
28539
28595
|
return !H3(r14, I4.Loose) && r14.tabIndex !== -1 && e6.preventDefault(), m6.current(e6, r14);
|
|
28540
|
-
}, [m6,
|
|
28596
|
+
}, [m6, f11]), i12 = E3(null);
|
|
28541
28597
|
i8(o12, "pointerdown", (t12) => {
|
|
28542
28598
|
var e6, c12;
|
|
28543
28599
|
n8() || (i12.current = ((c12 = (e6 = t12.composedPath) == null ? void 0 : e6.call(t12)) == null ? void 0 : c12[0]) || t12.target);
|
|
@@ -28624,8 +28680,8 @@ function w3() {
|
|
|
28624
28680
|
if (i3(t12.target)) try {
|
|
28625
28681
|
let e6 = t12.target.closest("a");
|
|
28626
28682
|
if (!e6) return;
|
|
28627
|
-
let { hash: n12 } = new URL(e6.href),
|
|
28628
|
-
i3(
|
|
28683
|
+
let { hash: n12 } = new URL(e6.href), f11 = o12.querySelector(n12);
|
|
28684
|
+
i3(f11) && !a15(f11) && (l10 = f11);
|
|
28629
28685
|
} catch {
|
|
28630
28686
|
}
|
|
28631
28687
|
}, true), r14.group((t12) => {
|
|
@@ -28695,7 +28751,7 @@ c4.subscribe(() => {
|
|
|
28695
28751
|
|
|
28696
28752
|
// ../../node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js
|
|
28697
28753
|
function a11(r14, e6, n12 = () => ({ containers: [] })) {
|
|
28698
|
-
let
|
|
28754
|
+
let f11 = o10(c4), o12 = e6 ? f11.get(e6) : void 0, i12 = o12 ? o12.count > 0 : false;
|
|
28699
28755
|
return n(() => {
|
|
28700
28756
|
if (!(!e6 || !r14)) return c4.dispatch("PUSH", e6, n12), () => c4.dispatch("POP", e6, n12);
|
|
28701
28757
|
}, [r14, e6]), i12;
|
|
@@ -28734,7 +28790,7 @@ function x4(e6) {
|
|
|
28734
28790
|
return r14;
|
|
28735
28791
|
}
|
|
28736
28792
|
function N(e6, r14, t12, n12) {
|
|
28737
|
-
let [i12, a15] = b4(t12), { hasFlag: s11, addFlag: o12, removeFlag: l10 } = c5(e6 && i12 ? 3 : 0), u12 = c6(false),
|
|
28793
|
+
let [i12, a15] = b4(t12), { hasFlag: s11, addFlag: o12, removeFlag: l10 } = c5(e6 && i12 ? 3 : 0), u12 = c6(false), f11 = c6(false), E6 = p();
|
|
28738
28794
|
return n(() => {
|
|
28739
28795
|
var d8;
|
|
28740
28796
|
if (e6) {
|
|
@@ -28743,12 +28799,12 @@ function N(e6, r14, t12, n12) {
|
|
|
28743
28799
|
return;
|
|
28744
28800
|
}
|
|
28745
28801
|
return (d8 = n12 == null ? void 0 : n12.start) == null || d8.call(n12, t12), C6(r14, { inFlight: u12, prepare() {
|
|
28746
|
-
|
|
28802
|
+
f11.current ? f11.current = false : f11.current = u12.current, u12.current = true, !f11.current && (t12 ? (o12(3), l10(4)) : (o12(4), l10(2)));
|
|
28747
28803
|
}, run() {
|
|
28748
|
-
|
|
28804
|
+
f11.current ? t12 ? (l10(3), o12(4)) : (l10(4), o12(3)) : t12 ? l10(1) : o12(1);
|
|
28749
28805
|
}, done() {
|
|
28750
28806
|
var p6;
|
|
28751
|
-
|
|
28807
|
+
f11.current && D3(r14) || (u12.current = false, l10(7), t12 || a15(false), (p6 = n12 == null ? void 0 : n12.end) == null || p6.call(n12, t12));
|
|
28752
28808
|
} });
|
|
28753
28809
|
}
|
|
28754
28810
|
}, [e6, t12, r14, E6]), e6 ? [i12, { closed: s11(1), enter: s11(2), leave: s11(4), transition: s11(2) || s11(4) }] : [t12, { closed: void 0, enter: void 0, leave: void 0, transition: void 0 }];
|
|
@@ -28835,8 +28891,8 @@ t9(() => {
|
|
|
28835
28891
|
});
|
|
28836
28892
|
|
|
28837
28893
|
// ../../node_modules/@headlessui/react/dist/components/portal/portal.js
|
|
28838
|
-
import i10, { Fragment as R, createContext as E5, useContext as
|
|
28839
|
-
import { createPortal as
|
|
28894
|
+
import i10, { Fragment as R, createContext as E5, useContext as f8, useEffect as A4, useMemo as G2, useRef as x5, useState as b5 } from "react";
|
|
28895
|
+
import { createPortal as H4 } from "react-dom";
|
|
28840
28896
|
|
|
28841
28897
|
// ../../node_modules/@headlessui/react/dist/hooks/use-on-unmount.js
|
|
28842
28898
|
import { useEffect as u10, useRef as n11 } from "react";
|
|
@@ -28849,19 +28905,33 @@ function c8(t12) {
|
|
|
28849
28905
|
}), [r14]);
|
|
28850
28906
|
}
|
|
28851
28907
|
|
|
28908
|
+
// ../../node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js
|
|
28909
|
+
import * as t10 from "react";
|
|
28910
|
+
function s9() {
|
|
28911
|
+
let r14 = typeof document == "undefined";
|
|
28912
|
+
return "useSyncExternalStore" in t10 ? ((o12) => o12.useSyncExternalStore)(t10)(() => () => {
|
|
28913
|
+
}, () => false, () => !r14) : false;
|
|
28914
|
+
}
|
|
28915
|
+
function l7() {
|
|
28916
|
+
let r14 = s9(), [e6, n12] = t10.useState(s.isHandoffComplete);
|
|
28917
|
+
return e6 && s.isHandoffComplete === false && n12(false), t10.useEffect(() => {
|
|
28918
|
+
e6 !== true && n12(true);
|
|
28919
|
+
}, [e6]), t10.useEffect(() => s.handoff(), []), r14 ? false : e6;
|
|
28920
|
+
}
|
|
28921
|
+
|
|
28852
28922
|
// ../../node_modules/@headlessui/react/dist/internal/portal-force-root.js
|
|
28853
|
-
import
|
|
28923
|
+
import t11, { createContext as r12, useContext as c9 } from "react";
|
|
28854
28924
|
var e5 = r12(false);
|
|
28855
28925
|
function a12() {
|
|
28856
28926
|
return c9(e5);
|
|
28857
28927
|
}
|
|
28858
|
-
function
|
|
28859
|
-
return
|
|
28928
|
+
function l8(o12) {
|
|
28929
|
+
return t11.createElement(e5.Provider, { value: o12.force }, o12.children);
|
|
28860
28930
|
}
|
|
28861
28931
|
|
|
28862
28932
|
// ../../node_modules/@headlessui/react/dist/components/portal/portal.js
|
|
28863
|
-
function
|
|
28864
|
-
let o12 = a12(), l10 =
|
|
28933
|
+
function j4(e6) {
|
|
28934
|
+
let o12 = a12(), l10 = f8(c10), [r14, p6] = b5(() => {
|
|
28865
28935
|
var s11;
|
|
28866
28936
|
if (!o12 && l10 !== null) return (s11 = l10.current) != null ? s11 : null;
|
|
28867
28937
|
if (s.isServer) return null;
|
|
@@ -28878,30 +28948,30 @@ function W(e6) {
|
|
|
28878
28948
|
}, [l10, p6, o12]), r14;
|
|
28879
28949
|
}
|
|
28880
28950
|
var _3 = R;
|
|
28881
|
-
var
|
|
28951
|
+
var I5 = Y(function(o12, l10) {
|
|
28882
28952
|
let { ownerDocument: r14 = null, ...p6 } = o12, t12 = x5(null), n12 = y(T((a15) => {
|
|
28883
28953
|
t12.current = a15;
|
|
28884
|
-
}), l10), s11 = u8(t12.current), C7 = r14 != null ? r14 : s11, u12 =
|
|
28954
|
+
}), l10), s11 = u8(t12.current), C7 = r14 != null ? r14 : s11, u12 = j4(C7), y4 = f8(m5), g2 = p(), v4 = l7(), M6 = K();
|
|
28885
28955
|
return c8(() => {
|
|
28886
28956
|
var a15;
|
|
28887
28957
|
u12 && u12.childNodes.length <= 0 && ((a15 = u12.parentElement) == null || a15.removeChild(u12));
|
|
28888
|
-
}), u12 ?
|
|
28958
|
+
}), !u12 || !v4 ? null : H4(i10.createElement("div", { "data-headlessui-portal": "", ref: (a15) => {
|
|
28889
28959
|
g2.dispose(), y4 && a15 && g2.add(y4.register(a15));
|
|
28890
|
-
} },
|
|
28960
|
+
} }, M6({ ourProps: { ref: n12 }, theirProps: p6, slot: {}, defaultTag: _3, name: "Portal" })), u12);
|
|
28891
28961
|
});
|
|
28892
|
-
function
|
|
28962
|
+
function D4(e6, o12) {
|
|
28893
28963
|
let l10 = y(o12), { enabled: r14 = true, ownerDocument: p6, ...t12 } = e6, n12 = K();
|
|
28894
|
-
return r14 ? i10.createElement(
|
|
28964
|
+
return r14 ? i10.createElement(I5, { ...t12, ownerDocument: p6, ref: l10 }) : n12({ ourProps: { ref: l10 }, theirProps: t12, slot: {}, defaultTag: _3, name: "Portal" });
|
|
28895
28965
|
}
|
|
28896
|
-
var
|
|
28966
|
+
var J = R;
|
|
28897
28967
|
var c10 = E5(null);
|
|
28898
|
-
function
|
|
28968
|
+
function X(e6, o12) {
|
|
28899
28969
|
let { target: l10, ...r14 } = e6, t12 = { ref: y(o12) }, n12 = K();
|
|
28900
|
-
return i10.createElement(c10.Provider, { value: l10 }, n12({ ourProps: t12, theirProps: r14, defaultTag:
|
|
28970
|
+
return i10.createElement(c10.Provider, { value: l10 }, n12({ ourProps: t12, theirProps: r14, defaultTag: J, name: "Popover.Group" }));
|
|
28901
28971
|
}
|
|
28902
28972
|
var m5 = E5(null);
|
|
28903
|
-
function
|
|
28904
|
-
let e6 =
|
|
28973
|
+
function oe() {
|
|
28974
|
+
let e6 = f8(m5), o12 = x5([]), l10 = o4((t12) => (o12.current.push(t12), e6 && e6.register(t12), () => r14(t12))), r14 = o4((t12) => {
|
|
28905
28975
|
let n12 = o12.current.indexOf(t12);
|
|
28906
28976
|
n12 !== -1 && o12.current.splice(n12, 1), e6 && e6.unregister(t12);
|
|
28907
28977
|
}), p6 = G2(() => ({ register: l10, unregister: r14, portals: o12 }), [l10, r14, o12]);
|
|
@@ -28909,12 +28979,12 @@ function ee() {
|
|
|
28909
28979
|
return i10.createElement(m5.Provider, { value: p6 }, n12);
|
|
28910
28980
|
}, [p6])];
|
|
28911
28981
|
}
|
|
28912
|
-
var
|
|
28913
|
-
var
|
|
28914
|
-
var
|
|
28982
|
+
var k4 = Y(D4);
|
|
28983
|
+
var B = Y(X);
|
|
28984
|
+
var le = Object.assign(k4, { Group: B });
|
|
28915
28985
|
|
|
28916
28986
|
// ../../node_modules/@headlessui/react/dist/components/dialog/dialog.js
|
|
28917
|
-
import l9, { Fragment as $
|
|
28987
|
+
import l9, { Fragment as $2, createContext as pe, createRef as se, useCallback as de2, useContext as ue2, useEffect as Te2, useMemo as fe2, useReducer as ge3, useRef as j6 } from "react";
|
|
28918
28988
|
|
|
28919
28989
|
// ../../node_modules/@headlessui/react/dist/hooks/use-escape.js
|
|
28920
28990
|
function a13(o12, r14 = typeof document != "undefined" ? document.defaultView : null, t12) {
|
|
@@ -28926,7 +28996,7 @@ function a13(o12, r14 = typeof document != "undefined" ? document.defaultView :
|
|
|
28926
28996
|
|
|
28927
28997
|
// ../../node_modules/@headlessui/react/dist/hooks/use-is-touch-device.js
|
|
28928
28998
|
import { useState as i11 } from "react";
|
|
28929
|
-
function
|
|
28999
|
+
function f9() {
|
|
28930
29000
|
var t12;
|
|
28931
29001
|
let [e6] = i11(() => typeof window != "undefined" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [o12, c12] = i11((t12 = e6 == null ? void 0 : e6.matches) != null ? t12 : false);
|
|
28932
29002
|
return n(() => {
|
|
@@ -28939,8 +29009,8 @@ function f8() {
|
|
|
28939
29009
|
}
|
|
28940
29010
|
|
|
28941
29011
|
// ../../node_modules/@headlessui/react/dist/hooks/use-root-containers.js
|
|
28942
|
-
import
|
|
28943
|
-
function
|
|
29012
|
+
import s10, { createContext as h5, useContext as b6, useState as p5 } from "react";
|
|
29013
|
+
function S7({ defaultContainers: l10 = [], portals: n12, mainTreeNode: o12 } = {}) {
|
|
28944
29014
|
let c12 = o4(() => {
|
|
28945
29015
|
var r14, u12;
|
|
28946
29016
|
let i12 = l(o12), t12 = [];
|
|
@@ -28954,7 +29024,7 @@ function S8({ defaultContainers: l10 = [], portals: n12, mainTreeNode: o12 } = {
|
|
|
28954
29024
|
var d7 = h5(null);
|
|
28955
29025
|
function j5({ children: l10, node: n12 }) {
|
|
28956
29026
|
let [o12, c12] = p5(null), i12 = x6(n12 != null ? n12 : o12);
|
|
28957
|
-
return
|
|
29027
|
+
return s10.createElement(d7.Provider, { value: i12 }, l10, i12 === null && s10.createElement(f2, { features: s4.Hidden, ref: (t12) => {
|
|
28958
29028
|
var r14, u12;
|
|
28959
29029
|
if (t12) {
|
|
28960
29030
|
for (let e6 of (u12 = (r14 = l(t12)) == null ? void 0 : r14.querySelectorAll("html > *, body > *")) != null ? u12 : []) if (e6 !== document.body && e6 !== document.head && t6(e6) && e6 != null && e6.contains(t12)) {
|
|
@@ -28969,26 +29039,12 @@ function x6(l10 = null) {
|
|
|
28969
29039
|
return (n12 = b6(d7)) != null ? n12 : l10;
|
|
28970
29040
|
}
|
|
28971
29041
|
|
|
28972
|
-
// ../../node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js
|
|
28973
|
-
import * as t11 from "react";
|
|
28974
|
-
function s10() {
|
|
28975
|
-
let r14 = typeof document == "undefined";
|
|
28976
|
-
return "useSyncExternalStore" in t11 ? ((o12) => o12.useSyncExternalStore)(t11)(() => () => {
|
|
28977
|
-
}, () => false, () => !r14) : false;
|
|
28978
|
-
}
|
|
28979
|
-
function l8() {
|
|
28980
|
-
let r14 = s10(), [e6, n12] = t11.useState(s.isHandoffComplete);
|
|
28981
|
-
return e6 && s.isHandoffComplete === false && n12(false), t11.useEffect(() => {
|
|
28982
|
-
e6 !== true && n12(true);
|
|
28983
|
-
}, [e6]), t11.useEffect(() => s.handoff(), []), r14 ? false : e6;
|
|
28984
|
-
}
|
|
28985
|
-
|
|
28986
29042
|
// ../../node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js
|
|
28987
|
-
import F2, { useRef as
|
|
29043
|
+
import F2, { useRef as M4 } from "react";
|
|
28988
29044
|
|
|
28989
29045
|
// ../../node_modules/@headlessui/react/dist/hooks/use-is-mounted.js
|
|
28990
29046
|
import { useRef as r13 } from "react";
|
|
28991
|
-
function
|
|
29047
|
+
function f10() {
|
|
28992
29048
|
let e6 = r13(false);
|
|
28993
29049
|
return n(() => (e6.current = true, () => {
|
|
28994
29050
|
e6.current = false;
|
|
@@ -29013,15 +29069,15 @@ function x7(o12) {
|
|
|
29013
29069
|
for (let e6 of o12.current) t6(e6.current) && t12.add(e6.current);
|
|
29014
29070
|
return t12;
|
|
29015
29071
|
}
|
|
29016
|
-
var $
|
|
29072
|
+
var $ = "div";
|
|
29017
29073
|
var G3 = ((n12) => (n12[n12.None = 0] = "None", n12[n12.InitialFocus = 1] = "InitialFocus", n12[n12.TabLock = 2] = "TabLock", n12[n12.FocusLock = 4] = "FocusLock", n12[n12.RestoreFocus = 8] = "RestoreFocus", n12[n12.AutoFocus = 16] = "AutoFocus", n12))(G3 || {});
|
|
29018
29074
|
function w4(o12, t12) {
|
|
29019
|
-
let e6 =
|
|
29020
|
-
|
|
29075
|
+
let e6 = M4(null), r14 = y(e6, t12), { initialFocus: u12, initialFocusFallback: a15, containers: n12, features: s11 = 15, ...f11 } = o12;
|
|
29076
|
+
l7() || (s11 = 0);
|
|
29021
29077
|
let l10 = u8(e6.current);
|
|
29022
29078
|
re(s11, { ownerDocument: l10 });
|
|
29023
29079
|
let T7 = ne(s11, { ownerDocument: l10, container: e6, initialFocus: u12, initialFocusFallback: a15 });
|
|
29024
|
-
|
|
29080
|
+
oe2(s11, { ownerDocument: l10, container: e6, containers: n12, previousActiveElement: T7 });
|
|
29025
29081
|
let g2 = u11(), A5 = o4((c12) => {
|
|
29026
29082
|
if (!n4(e6.current)) return;
|
|
29027
29083
|
let E6 = e6.current;
|
|
@@ -29032,7 +29088,7 @@ function w4(o12, t12) {
|
|
|
29032
29088
|
v3(E6, T4.Last, { skipElements: [c12.relatedTarget, a15] });
|
|
29033
29089
|
} });
|
|
29034
29090
|
});
|
|
29035
|
-
}), v4 = I3(!!(s11 & 2), "focus-trap#tab-lock"), N2 = p(), b8 =
|
|
29091
|
+
}), v4 = I3(!!(s11 & 2), "focus-trap#tab-lock"), N2 = p(), b8 = M4(false), k6 = { ref: r14, onKeyDown(c12) {
|
|
29036
29092
|
c12.key == "Tab" && (b8.current = true, N2.requestAnimationFrame(() => {
|
|
29037
29093
|
b8.current = false;
|
|
29038
29094
|
}));
|
|
@@ -29040,15 +29096,15 @@ function w4(o12, t12) {
|
|
|
29040
29096
|
if (!(s11 & 4)) return;
|
|
29041
29097
|
let E6 = x7(n12);
|
|
29042
29098
|
n4(e6.current) && E6.add(e6.current);
|
|
29043
|
-
let
|
|
29044
|
-
i3(
|
|
29045
|
-
} },
|
|
29046
|
-
return F2.createElement(F2.Fragment, null, v4 && F2.createElement(f2, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A5, features: s4.Focusable }),
|
|
29047
|
-
}
|
|
29048
|
-
var
|
|
29049
|
-
var ge = Object.assign(
|
|
29050
|
-
function
|
|
29051
|
-
let t12 =
|
|
29099
|
+
let L2 = c12.relatedTarget;
|
|
29100
|
+
i3(L2) && L2.dataset.headlessuiFocusGuard !== "true" && (I6(E6, L2) || (b8.current ? v3(e6.current, u(g2.current, { [a14.Forwards]: () => T4.Next, [a14.Backwards]: () => T4.Previous }) | T4.WrapAround, { relativeTo: c12.target }) : i3(c12.target) && w2(c12.target)));
|
|
29101
|
+
} }, B2 = K();
|
|
29102
|
+
return F2.createElement(F2.Fragment, null, v4 && F2.createElement(f2, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A5, features: s4.Focusable }), B2({ ourProps: k6, theirProps: f11, defaultTag: $, name: "FocusTrap" }), v4 && F2.createElement(f2, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A5, features: s4.Focusable }));
|
|
29103
|
+
}
|
|
29104
|
+
var ee = Y(w4);
|
|
29105
|
+
var ge = Object.assign(ee, { features: G3 });
|
|
29106
|
+
function te(o12 = true) {
|
|
29107
|
+
let t12 = M4(n10.slice());
|
|
29052
29108
|
return m4(([e6], [r14]) => {
|
|
29053
29109
|
r14 === true && e6 === false && t2(() => {
|
|
29054
29110
|
t12.current.splice(0);
|
|
@@ -29059,7 +29115,7 @@ function te2(o12 = true) {
|
|
|
29059
29115
|
});
|
|
29060
29116
|
}
|
|
29061
29117
|
function re(o12, { ownerDocument: t12 }) {
|
|
29062
|
-
let e6 = !!(o12 & 8), r14 =
|
|
29118
|
+
let e6 = !!(o12 & 8), r14 = te(e6);
|
|
29063
29119
|
m4(() => {
|
|
29064
29120
|
e6 || d2(t12 == null ? void 0 : t12.body) && w2(r14());
|
|
29065
29121
|
}, [e6]), c8(() => {
|
|
@@ -29067,15 +29123,15 @@ function re(o12, { ownerDocument: t12 }) {
|
|
|
29067
29123
|
});
|
|
29068
29124
|
}
|
|
29069
29125
|
function ne(o12, { ownerDocument: t12, container: e6, initialFocus: r14, initialFocusFallback: u12 }) {
|
|
29070
|
-
let a15 =
|
|
29126
|
+
let a15 = M4(null), n12 = I3(!!(o12 & 1), "focus-trap#initial-focus"), s11 = f10();
|
|
29071
29127
|
return m4(() => {
|
|
29072
29128
|
if (o12 === 0) return;
|
|
29073
29129
|
if (!n12) {
|
|
29074
29130
|
u12 != null && u12.current && w2(u12.current);
|
|
29075
29131
|
return;
|
|
29076
29132
|
}
|
|
29077
|
-
let
|
|
29078
|
-
|
|
29133
|
+
let f11 = e6.current;
|
|
29134
|
+
f11 && t2(() => {
|
|
29079
29135
|
if (!s11.current) return;
|
|
29080
29136
|
let l10 = t12 == null ? void 0 : t12.activeElement;
|
|
29081
29137
|
if (r14 != null && r14.current) {
|
|
@@ -29083,15 +29139,15 @@ function ne(o12, { ownerDocument: t12, container: e6, initialFocus: r14, initial
|
|
|
29083
29139
|
a15.current = l10;
|
|
29084
29140
|
return;
|
|
29085
29141
|
}
|
|
29086
|
-
} else if (
|
|
29142
|
+
} else if (f11.contains(l10)) {
|
|
29087
29143
|
a15.current = l10;
|
|
29088
29144
|
return;
|
|
29089
29145
|
}
|
|
29090
29146
|
if (r14 != null && r14.current) w2(r14.current);
|
|
29091
29147
|
else {
|
|
29092
29148
|
if (o12 & 16) {
|
|
29093
|
-
if (v3(
|
|
29094
|
-
} else if (v3(
|
|
29149
|
+
if (v3(f11, T4.First | T4.AutoFocus) !== A2.Error) return;
|
|
29150
|
+
} else if (v3(f11, T4.First) !== A2.Error) return;
|
|
29095
29151
|
if (u12 != null && u12.current && (w2(u12.current), (t12 == null ? void 0 : t12.activeElement) === u12.current)) return;
|
|
29096
29152
|
console.warn("There are no focusable elements inside the <FocusTrap />");
|
|
29097
29153
|
}
|
|
@@ -29099,16 +29155,16 @@ function ne(o12, { ownerDocument: t12, container: e6, initialFocus: r14, initial
|
|
|
29099
29155
|
});
|
|
29100
29156
|
}, [u12, n12, o12]), a15;
|
|
29101
29157
|
}
|
|
29102
|
-
function
|
|
29103
|
-
let a15 =
|
|
29158
|
+
function oe2(o12, { ownerDocument: t12, container: e6, containers: r14, previousActiveElement: u12 }) {
|
|
29159
|
+
let a15 = f10(), n12 = !!(o12 & 4);
|
|
29104
29160
|
E4(t12 == null ? void 0 : t12.defaultView, "focus", (s11) => {
|
|
29105
29161
|
if (!n12 || !a15.current) return;
|
|
29106
|
-
let
|
|
29107
|
-
n4(e6.current) &&
|
|
29162
|
+
let f11 = x7(r14);
|
|
29163
|
+
n4(e6.current) && f11.add(e6.current);
|
|
29108
29164
|
let l10 = u12.current;
|
|
29109
29165
|
if (!l10) return;
|
|
29110
29166
|
let T7 = s11.target;
|
|
29111
|
-
n4(T7) ? I6(
|
|
29167
|
+
n4(T7) ? I6(f11, T7) ? (u12.current = T7, w2(T7)) : (s11.preventDefault(), s11.stopPropagation(), w2(l10)) : w2(u12.current);
|
|
29112
29168
|
}, true);
|
|
29113
29169
|
}
|
|
29114
29170
|
function I6(o12, t12) {
|
|
@@ -29117,7 +29173,7 @@ function I6(o12, t12) {
|
|
|
29117
29173
|
}
|
|
29118
29174
|
|
|
29119
29175
|
// ../../node_modules/@headlessui/react/dist/components/transition/transition.js
|
|
29120
|
-
import c11, { Fragment as
|
|
29176
|
+
import c11, { Fragment as k5, createContext as ne2, useContext as q, useEffect as ge2, useMemo as ie3, useRef as b7, useState as O3 } from "react";
|
|
29121
29177
|
function ue(e6) {
|
|
29122
29178
|
var t12;
|
|
29123
29179
|
return !!(e6.enter || e6.enterFrom || e6.enterTo || e6.leave || e6.leaveFrom || e6.leaveTo) || !b((t12 = e6.as) != null ? t12 : de) || c11.Children.count(e6.children) === 1;
|
|
@@ -29137,11 +29193,11 @@ function Ae() {
|
|
|
29137
29193
|
}
|
|
29138
29194
|
var w5 = ne2(null);
|
|
29139
29195
|
w5.displayName = "NestingContext";
|
|
29140
|
-
function
|
|
29141
|
-
return "children" in e6 ?
|
|
29196
|
+
function M5(e6) {
|
|
29197
|
+
return "children" in e6 ? M5(e6.children) : e6.current.filter(({ el: t12 }) => t12.current !== null).filter(({ state: t12 }) => t12 === "visible").length > 0;
|
|
29142
29198
|
}
|
|
29143
29199
|
function Te(e6, t12) {
|
|
29144
|
-
let n12 = s3(e6), l10 = b7([]),
|
|
29200
|
+
let n12 = s3(e6), l10 = b7([]), S8 = f10(), R2 = p(), d8 = o4((o12, i12 = C2.Hidden) => {
|
|
29145
29201
|
let a15 = l10.current.findIndex(({ el: s11 }) => s11 === o12);
|
|
29146
29202
|
a15 !== -1 && (u(i12, { [C2.Unmount]() {
|
|
29147
29203
|
l10.current.splice(a15, 1);
|
|
@@ -29149,7 +29205,7 @@ function Te(e6, t12) {
|
|
|
29149
29205
|
l10.current[a15].state = "hidden";
|
|
29150
29206
|
} }), R2.microTask(() => {
|
|
29151
29207
|
var s11;
|
|
29152
|
-
!
|
|
29208
|
+
!M5(l10) && S8.current && ((s11 = n12.current) == null || s11.call(n12));
|
|
29153
29209
|
}));
|
|
29154
29210
|
}), y4 = o4((o12) => {
|
|
29155
29211
|
let i12 = l10.current.find(({ el: a15 }) => a15 === o12);
|
|
@@ -29158,7 +29214,7 @@ function Te(e6, t12) {
|
|
|
29158
29214
|
C7.current.splice(0), t12 && (t12.chains.current[i12] = t12.chains.current[i12].filter(([s11]) => s11 !== o12)), t12 == null || t12.chains.current[i12].push([o12, new Promise((s11) => {
|
|
29159
29215
|
C7.current.push(s11);
|
|
29160
29216
|
})]), t12 == null || t12.chains.current[i12].push([o12, new Promise((s11) => {
|
|
29161
|
-
Promise.all(h6.current[i12].map(([r14,
|
|
29217
|
+
Promise.all(h6.current[i12].map(([r14, f11]) => f11)).then(() => s11());
|
|
29162
29218
|
})]), i12 === "enter" ? p6.current = p6.current.then(() => t12 == null ? void 0 : t12.wait.current).then(() => a15(i12)) : a15(i12);
|
|
29163
29219
|
}), v4 = o4((o12, i12, a15) => {
|
|
29164
29220
|
Promise.all(h6.current[i12].splice(0).map(([s11, r14]) => r14)).then(() => {
|
|
@@ -29168,69 +29224,69 @@ function Te(e6, t12) {
|
|
|
29168
29224
|
});
|
|
29169
29225
|
return ie3(() => ({ children: l10, register: y4, unregister: d8, onStart: g2, onStop: v4, wait: p6, chains: h6 }), [y4, d8, l10, g2, v4, h6, p6]);
|
|
29170
29226
|
}
|
|
29171
|
-
var de =
|
|
29227
|
+
var de = k5;
|
|
29172
29228
|
var fe = A.RenderStrategy;
|
|
29173
29229
|
function Fe(e6, t12) {
|
|
29174
|
-
var
|
|
29175
|
-
let { transition: n12 = true, beforeEnter: l10, afterEnter:
|
|
29230
|
+
var ee2, te2;
|
|
29231
|
+
let { transition: n12 = true, beforeEnter: l10, afterEnter: S8, beforeLeave: R2, afterLeave: d8, enter: y4, enterFrom: C7, enterTo: p6, entered: h6, leave: g2, leaveFrom: v4, leaveTo: o12, ...i12 } = e6, [a15, s11] = O3(null), r14 = b7(null), f11 = ue(e6), U2 = y(...f11 ? [r14, t12, s11] : t12 === null ? [] : [t12]), H5 = (ee2 = i12.unmount) == null || ee2 ? C2.Unmount : C2.Hidden, { show: u12, appear: z2, initial: K2 } = He(), [m6, j7] = O3(u12 ? "visible" : "hidden"), Q = Ae(), { register: A5, unregister: F3 } = Q;
|
|
29176
29232
|
n(() => A5(r14), [A5, r14]), n(() => {
|
|
29177
|
-
if (
|
|
29233
|
+
if (H5 === C2.Hidden && r14.current) {
|
|
29178
29234
|
if (u12 && m6 !== "visible") {
|
|
29179
29235
|
j7("visible");
|
|
29180
29236
|
return;
|
|
29181
29237
|
}
|
|
29182
29238
|
return u(m6, { ["hidden"]: () => F3(r14), ["visible"]: () => A5(r14) });
|
|
29183
29239
|
}
|
|
29184
|
-
}, [m6, r14, A5, F3, u12,
|
|
29185
|
-
let G4 =
|
|
29240
|
+
}, [m6, r14, A5, F3, u12, H5]);
|
|
29241
|
+
let G4 = l7();
|
|
29186
29242
|
n(() => {
|
|
29187
|
-
if (
|
|
29188
|
-
}, [r14, m6, G4,
|
|
29189
|
-
let ce = K2 && !z2, Y2 = z2 && u12 && K2,
|
|
29190
|
-
|
|
29191
|
-
}, Q), Z = o4((
|
|
29192
|
-
|
|
29193
|
-
let
|
|
29194
|
-
I7.onStart(r14,
|
|
29243
|
+
if (f11 && G4 && m6 === "visible" && r14.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
29244
|
+
}, [r14, m6, G4, f11]);
|
|
29245
|
+
let ce = K2 && !z2, Y2 = z2 && u12 && K2, B2 = b7(false), I7 = Te(() => {
|
|
29246
|
+
B2.current || (j7("hidden"), F3(r14));
|
|
29247
|
+
}, Q), Z = o4((W) => {
|
|
29248
|
+
B2.current = true;
|
|
29249
|
+
let L2 = W ? "enter" : "leave";
|
|
29250
|
+
I7.onStart(r14, L2, (_4) => {
|
|
29195
29251
|
_4 === "enter" ? l10 == null || l10() : _4 === "leave" && (R2 == null || R2());
|
|
29196
29252
|
});
|
|
29197
|
-
}), $
|
|
29198
|
-
let
|
|
29199
|
-
|
|
29200
|
-
_4 === "enter" ?
|
|
29201
|
-
}),
|
|
29253
|
+
}), $3 = o4((W) => {
|
|
29254
|
+
let L2 = W ? "enter" : "leave";
|
|
29255
|
+
B2.current = false, I7.onStop(r14, L2, (_4) => {
|
|
29256
|
+
_4 === "enter" ? S8 == null || S8() : _4 === "leave" && (d8 == null || d8());
|
|
29257
|
+
}), L2 === "leave" && !M5(I7) && (j7("hidden"), F3(r14));
|
|
29202
29258
|
});
|
|
29203
29259
|
ge2(() => {
|
|
29204
|
-
|
|
29205
|
-
}, [u12,
|
|
29206
|
-
let pe2 = /* @__PURE__ */ (() => !(!n12 || !
|
|
29260
|
+
f11 && n12 || (Z(u12), $3(u12));
|
|
29261
|
+
}, [u12, f11, n12]);
|
|
29262
|
+
let pe2 = /* @__PURE__ */ (() => !(!n12 || !f11 || !G4 || ce))(), [, T7] = N(pe2, a15, u12, { start: Z, end: $3 }), Ce = m({ ref: U2, className: ((te2 = t5(i12.className, Y2 && y4, Y2 && C7, T7.enter && y4, T7.enter && T7.closed && C7, T7.enter && !T7.closed && p6, T7.leave && g2, T7.leave && !T7.closed && v4, T7.leave && T7.closed && o12, !T7.transition && u12 && h6)) == null ? void 0 : te2.trim()) || void 0, ...x4(T7) }), N2 = 0;
|
|
29207
29263
|
m6 === "visible" && (N2 |= i9.Open), m6 === "hidden" && (N2 |= i9.Closed), u12 && m6 === "hidden" && (N2 |= i9.Opening), !u12 && m6 === "visible" && (N2 |= i9.Closing);
|
|
29208
29264
|
let he = K();
|
|
29209
29265
|
return c11.createElement(w5.Provider, { value: I7 }, c11.createElement(c7, { value: N2 }, he({ ourProps: Ce, theirProps: i12, defaultTag: de, features: fe, visible: m6 === "visible", name: "Transition.Child" })));
|
|
29210
29266
|
}
|
|
29211
29267
|
function Ie(e6, t12) {
|
|
29212
|
-
let { show: n12, appear: l10 = false, unmount:
|
|
29213
|
-
|
|
29268
|
+
let { show: n12, appear: l10 = false, unmount: S8 = true, ...R2 } = e6, d8 = b7(null), y4 = ue(e6), C7 = y(...y4 ? [d8, t12] : t12 === null ? [] : [t12]);
|
|
29269
|
+
l7();
|
|
29214
29270
|
let p6 = u9();
|
|
29215
29271
|
if (n12 === void 0 && p6 !== null && (n12 = (p6 & i9.Open) === i9.Open), n12 === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
29216
|
-
let [h6, g2] =
|
|
29272
|
+
let [h6, g2] = O3(n12 ? "visible" : "hidden"), v4 = Te(() => {
|
|
29217
29273
|
n12 || g2("hidden");
|
|
29218
|
-
}), [o12, i12] =
|
|
29274
|
+
}), [o12, i12] = O3(true), a15 = b7([n12]);
|
|
29219
29275
|
n(() => {
|
|
29220
29276
|
o12 !== false && a15.current[a15.current.length - 1] !== n12 && (a15.current.push(n12), i12(false));
|
|
29221
29277
|
}, [a15, n12]);
|
|
29222
29278
|
let s11 = ie3(() => ({ show: n12, appear: l10, initial: o12 }), [n12, l10, o12]);
|
|
29223
29279
|
n(() => {
|
|
29224
|
-
n12 ? g2("visible") : !
|
|
29280
|
+
n12 ? g2("visible") : !M5(v4) && d8.current !== null && g2("hidden");
|
|
29225
29281
|
}, [n12, v4]);
|
|
29226
|
-
let r14 = { unmount:
|
|
29282
|
+
let r14 = { unmount: S8 }, f11 = o4(() => {
|
|
29227
29283
|
var u12;
|
|
29228
29284
|
o12 && i12(false), (u12 = e6.beforeEnter) == null || u12.call(e6);
|
|
29229
29285
|
}), U2 = o4(() => {
|
|
29230
29286
|
var u12;
|
|
29231
29287
|
o12 && i12(false), (u12 = e6.beforeLeave) == null || u12.call(e6);
|
|
29232
|
-
}),
|
|
29233
|
-
return c11.createElement(w5.Provider, { value: v4 }, c11.createElement(V.Provider, { value: s11 },
|
|
29288
|
+
}), H5 = K();
|
|
29289
|
+
return c11.createElement(w5.Provider, { value: v4 }, c11.createElement(V.Provider, { value: s11 }, H5({ ourProps: { ...r14, as: k5, children: c11.createElement(me, { ref: C7, ...r14, ...R2, beforeEnter: f11, beforeLeave: U2 }) }, theirProps: {}, defaultTag: k5, features: fe, visible: h6 === "visible", name: "Transition" })));
|
|
29234
29290
|
}
|
|
29235
29291
|
function Le(e6, t12) {
|
|
29236
29292
|
let n12 = q(V) !== null, l10 = u9() !== null;
|
|
@@ -29249,11 +29305,11 @@ var Ue = { [0](e6, t12) {
|
|
|
29249
29305
|
} };
|
|
29250
29306
|
var w6 = pe(null);
|
|
29251
29307
|
w6.displayName = "DialogContext";
|
|
29252
|
-
function
|
|
29308
|
+
function O4(e6) {
|
|
29253
29309
|
let t12 = ue2(w6);
|
|
29254
29310
|
if (t12 === null) {
|
|
29255
29311
|
let o12 = new Error(`<${e6} /> is missing a parent <Dialog /> component.`);
|
|
29256
|
-
throw Error.captureStackTrace && Error.captureStackTrace(o12,
|
|
29312
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o12, O4), o12;
|
|
29257
29313
|
}
|
|
29258
29314
|
return t12;
|
|
29259
29315
|
}
|
|
@@ -29261,37 +29317,37 @@ function He2(e6, t12) {
|
|
|
29261
29317
|
return u(t12.type, Ue, e6, t12);
|
|
29262
29318
|
}
|
|
29263
29319
|
var z = Y(function(t12, o12) {
|
|
29264
|
-
let a15 = r5(), { id: n12 = `headlessui-dialog-${a15}`, open: i12, onClose: p6, initialFocus: d8, role: s11 = "dialog", autoFocus:
|
|
29320
|
+
let a15 = r5(), { id: n12 = `headlessui-dialog-${a15}`, open: i12, onClose: p6, initialFocus: d8, role: s11 = "dialog", autoFocus: f11 = true, __demoMode: u12 = false, unmount: y4 = false, ...S8 } = t12, R2 = j6(false);
|
|
29265
29321
|
s11 = (function() {
|
|
29266
29322
|
return s11 === "dialog" || s11 === "alertdialog" ? s11 : (R2.current || (R2.current = true, console.warn(`Invalid role [${s11}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
|
|
29267
29323
|
})();
|
|
29268
29324
|
let g2 = u9();
|
|
29269
29325
|
i12 === void 0 && g2 !== null && (i12 = (g2 & i9.Open) === i9.Open);
|
|
29270
|
-
let T7 = j6(null), I7 = y(T7, o12), F3 = u8(T7.current), c12 = i12 ? 0 : 1, [b8, Q] = ge3(He2, { titleId: null, descriptionId: null, panelRef: se() }), m6 = o4(() => p6(false)),
|
|
29326
|
+
let T7 = j6(null), I7 = y(T7, o12), F3 = u8(T7.current), c12 = i12 ? 0 : 1, [b8, Q] = ge3(He2, { titleId: null, descriptionId: null, panelRef: se() }), m6 = o4(() => p6(false)), B2 = o4((r14) => Q({ type: 0, id: r14 })), D5 = l7() ? c12 === 0 : false, [Z, ee2] = oe(), te2 = { get current() {
|
|
29271
29327
|
var r14;
|
|
29272
29328
|
return (r14 = b8.panelRef.current) != null ? r14 : T7.current;
|
|
29273
|
-
} }, v4 = x6(), { resolveContainers:
|
|
29329
|
+
} }, v4 = x6(), { resolveContainers: M6 } = S7({ mainTreeNode: v4, portals: Z, defaultContainers: [te2] }), U2 = g2 !== null ? (g2 & i9.Closing) === i9.Closing : false;
|
|
29274
29330
|
y3(u12 || U2 ? false : D5, { allowed: o4(() => {
|
|
29275
|
-
var r14,
|
|
29276
|
-
return [(
|
|
29331
|
+
var r14, W;
|
|
29332
|
+
return [(W = (r14 = T7.current) == null ? void 0 : r14.closest("[data-headlessui-portal]")) != null ? W : null];
|
|
29277
29333
|
}), disallowed: o4(() => {
|
|
29278
29334
|
var r14;
|
|
29279
29335
|
return [(r14 = v4 == null ? void 0 : v4.closest("body > *:not(#headlessui-portal-root)")) != null ? r14 : null];
|
|
29280
29336
|
}) });
|
|
29281
|
-
let
|
|
29337
|
+
let P3 = x2.get(null);
|
|
29282
29338
|
n(() => {
|
|
29283
|
-
if (D5) return
|
|
29284
|
-
}, [
|
|
29285
|
-
let
|
|
29286
|
-
k3(
|
|
29339
|
+
if (D5) return P3.actions.push(n12), () => P3.actions.pop(n12);
|
|
29340
|
+
}, [P3, n12, D5]);
|
|
29341
|
+
let H5 = S4(P3, de2((r14) => P3.selectors.isTop(r14, n12), [P3, n12]));
|
|
29342
|
+
k3(H5, M6, (r14) => {
|
|
29287
29343
|
r14.preventDefault(), m6();
|
|
29288
|
-
}), a13(
|
|
29344
|
+
}), a13(H5, F3 == null ? void 0 : F3.defaultView, (r14) => {
|
|
29289
29345
|
r14.preventDefault(), r14.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), m6();
|
|
29290
|
-
}), f6(u12 || U2 ? false : D5, F3,
|
|
29291
|
-
let [
|
|
29292
|
-
D5 && !u12 && (E6 |= G3.RestoreFocus, E6 |= G3.TabLock,
|
|
29346
|
+
}), f6(u12 || U2 ? false : D5, F3, M6), p4(D5, T7, m6);
|
|
29347
|
+
let [oe3, ne3] = H2(), re3 = fe2(() => [{ dialogState: c12, close: m6, setTitleId: B2, unmount: y4 }, b8], [c12, m6, B2, y4, b8]), N2 = n2({ open: c12 === 0 }), le2 = { ref: I7, id: n12, role: s11, tabIndex: -1, "aria-modal": u12 ? void 0 : c12 === 0 ? true : void 0, "aria-labelledby": b8.titleId, "aria-describedby": oe3, unmount: y4 }, ae = !f9(), E6 = G3.None;
|
|
29348
|
+
D5 && !u12 && (E6 |= G3.RestoreFocus, E6 |= G3.TabLock, f11 && (E6 |= G3.AutoFocus), ae && (E6 |= G3.InitialFocus));
|
|
29293
29349
|
let ie4 = K();
|
|
29294
|
-
return l9.createElement(s8, null, l9.createElement(
|
|
29350
|
+
return l9.createElement(s8, null, l9.createElement(l8, { force: true }, l9.createElement(le, null, l9.createElement(w6.Provider, { value: re3 }, l9.createElement(B, { target: T7 }, l9.createElement(l8, { force: false }, l9.createElement(ne3, { slot: N2 }, l9.createElement(ee2, null, l9.createElement(ge, { initialFocus: d8, initialFocusFallback: T7, containers: M6, features: E6 }, l9.createElement(C4, { value: m6 }, ie4({ ourProps: le2, theirProps: S8, slot: N2, defaultTag: Ne, features: We, visible: c12 === 0, name: "Dialog" })))))))))));
|
|
29295
29351
|
});
|
|
29296
29352
|
var Ne = "div";
|
|
29297
29353
|
var We = A.RenderStrategy | A.Static;
|
|
@@ -29306,22 +29362,22 @@ function $e(e6, t12) {
|
|
|
29306
29362
|
}
|
|
29307
29363
|
var je = "div";
|
|
29308
29364
|
function Ye(e6, t12) {
|
|
29309
|
-
let o12 = r5(), { id: a15 = `headlessui-dialog-panel-${o12}`, transition: n12 = false, ...i12 } = e6, [{ dialogState: p6, unmount: d8 }, s11] =
|
|
29365
|
+
let o12 = r5(), { id: a15 = `headlessui-dialog-panel-${o12}`, transition: n12 = false, ...i12 } = e6, [{ dialogState: p6, unmount: d8 }, s11] = O4("Dialog.Panel"), f11 = y(t12, s11.panelRef), u12 = n2({ open: p6 === 0 }), y4 = o4((I7) => {
|
|
29310
29366
|
I7.stopPropagation();
|
|
29311
|
-
}),
|
|
29312
|
-
return l9.createElement(R2, { ...g2 }, T7({ ourProps:
|
|
29367
|
+
}), S8 = { ref: f11, id: a15, onClick: y4 }, R2 = n12 ? Oe : $2, g2 = n12 ? { unmount: d8 } : {}, T7 = K();
|
|
29368
|
+
return l9.createElement(R2, { ...g2 }, T7({ ourProps: S8, theirProps: i12, slot: u12, defaultTag: je, name: "Dialog.Panel" }));
|
|
29313
29369
|
}
|
|
29314
29370
|
var Je = "div";
|
|
29315
29371
|
function Ke2(e6, t12) {
|
|
29316
|
-
let { transition: o12 = false, ...a15 } = e6, [{ dialogState: n12, unmount: i12 }] =
|
|
29317
|
-
return l9.createElement(s11, { ...
|
|
29372
|
+
let { transition: o12 = false, ...a15 } = e6, [{ dialogState: n12, unmount: i12 }] = O4("Dialog.Backdrop"), p6 = n2({ open: n12 === 0 }), d8 = { ref: t12, "aria-hidden": true }, s11 = o12 ? Oe : $2, f11 = o12 ? { unmount: i12 } : {}, u12 = K();
|
|
29373
|
+
return l9.createElement(s11, { ...f11 }, u12({ ourProps: d8, theirProps: a15, slot: p6, defaultTag: Je, name: "Dialog.Backdrop" }));
|
|
29318
29374
|
}
|
|
29319
29375
|
var Xe = "h2";
|
|
29320
29376
|
function Ve(e6, t12) {
|
|
29321
|
-
let o12 = r5(), { id: a15 = `headlessui-dialog-title-${o12}`, ...n12 } = e6, [{ dialogState: i12, setTitleId: p6 }] =
|
|
29377
|
+
let o12 = r5(), { id: a15 = `headlessui-dialog-title-${o12}`, ...n12 } = e6, [{ dialogState: i12, setTitleId: p6 }] = O4("Dialog.Title"), d8 = y(t12);
|
|
29322
29378
|
Te2(() => (p6(a15), () => p6(null)), [a15, p6]);
|
|
29323
|
-
let s11 = n2({ open: i12 === 0 }),
|
|
29324
|
-
return K()({ ourProps:
|
|
29379
|
+
let s11 = n2({ open: i12 === 0 }), f11 = { ref: d8, id: a15 };
|
|
29380
|
+
return K()({ ourProps: f11, theirProps: n12, slot: s11, defaultTag: Xe, name: "Dialog.Title" });
|
|
29325
29381
|
}
|
|
29326
29382
|
var qe = Y($e);
|
|
29327
29383
|
var ze = Y(Ye);
|
|
@@ -30302,33 +30358,38 @@ import { getMimeCategory, isPdfMimeType as isPdfMimeType2 } from "@semiont/core"
|
|
|
30302
30358
|
|
|
30303
30359
|
// src/lib/text-segmentation.ts
|
|
30304
30360
|
import { getTextPositionSelector as getTextPositionSelector2, getTextQuoteSelector, getTargetSelector as getTargetSelector2 } from "@semiont/core";
|
|
30305
|
-
import {
|
|
30361
|
+
import { anchorAnnotation } from "@semiont/core";
|
|
30362
|
+
var warnedAnnotationIds = /* @__PURE__ */ new Set();
|
|
30306
30363
|
function segmentTextWithAnnotations(content4, annotations) {
|
|
30307
30364
|
if (!content4) {
|
|
30308
30365
|
return [{ exact: "", start: 0, end: 0 }];
|
|
30309
30366
|
}
|
|
30310
|
-
const cache2 = buildContentCache(content4);
|
|
30311
30367
|
const normalizedAnnotations = annotations.map((ann) => {
|
|
30312
30368
|
const targetSelector = getTargetSelector2(ann.target);
|
|
30313
30369
|
const posSelector = getTextPositionSelector2(targetSelector);
|
|
30314
30370
|
const quoteSelector = targetSelector ? getTextQuoteSelector(targetSelector) : null;
|
|
30315
|
-
|
|
30316
|
-
|
|
30317
|
-
|
|
30318
|
-
|
|
30319
|
-
quoteSelector
|
|
30320
|
-
|
|
30321
|
-
|
|
30322
|
-
|
|
30323
|
-
|
|
30324
|
-
|
|
30371
|
+
const anchor = anchorAnnotation(
|
|
30372
|
+
content4,
|
|
30373
|
+
{
|
|
30374
|
+
...posSelector ? { position: { start: posSelector.start, end: posSelector.end } } : {},
|
|
30375
|
+
...quoteSelector ? {
|
|
30376
|
+
quote: {
|
|
30377
|
+
exact: quoteSelector.exact,
|
|
30378
|
+
...quoteSelector.prefix !== void 0 ? { prefix: quoteSelector.prefix } : {},
|
|
30379
|
+
...quoteSelector.suffix !== void 0 ? { suffix: quoteSelector.suffix } : {}
|
|
30380
|
+
}
|
|
30381
|
+
} : {}
|
|
30382
|
+
}
|
|
30383
|
+
);
|
|
30384
|
+
if (anchor && anchor.confidence !== "high") {
|
|
30385
|
+
logDegradedAnchorOnce(ann.id, anchor.strategy, anchor.confidence);
|
|
30325
30386
|
}
|
|
30326
|
-
const start2 = position4?.start ?? posSelector?.start ?? 0;
|
|
30327
|
-
const end = position4?.end ?? posSelector?.end ?? 0;
|
|
30328
30387
|
return {
|
|
30329
30388
|
annotation: ann,
|
|
30330
|
-
start:
|
|
30331
|
-
end
|
|
30389
|
+
start: anchor?.start ?? 0,
|
|
30390
|
+
end: anchor?.end ?? 0,
|
|
30391
|
+
...anchor?.strategy ? { strategy: anchor.strategy } : {},
|
|
30392
|
+
...anchor?.confidence ? { confidence: anchor.confidence } : {}
|
|
30332
30393
|
};
|
|
30333
30394
|
}).filter((a15) => a15.start >= 0 && a15.end <= content4.length && a15.start < a15.end).sort((a15, b8) => a15.start - b8.start);
|
|
30334
30395
|
if (normalizedAnnotations.length === 0) {
|
|
@@ -30336,7 +30397,7 @@ function segmentTextWithAnnotations(content4, annotations) {
|
|
|
30336
30397
|
}
|
|
30337
30398
|
const segments = [];
|
|
30338
30399
|
let position3 = 0;
|
|
30339
|
-
for (const { annotation, start: start2, end } of normalizedAnnotations) {
|
|
30400
|
+
for (const { annotation, start: start2, end, strategy, confidence } of normalizedAnnotations) {
|
|
30340
30401
|
if (start2 < position3) continue;
|
|
30341
30402
|
if (start2 > position3) {
|
|
30342
30403
|
segments.push({
|
|
@@ -30349,7 +30410,9 @@ function segmentTextWithAnnotations(content4, annotations) {
|
|
|
30349
30410
|
exact: content4.slice(start2, end),
|
|
30350
30411
|
annotation,
|
|
30351
30412
|
start: start2,
|
|
30352
|
-
end
|
|
30413
|
+
end,
|
|
30414
|
+
...strategy ? { strategy } : {},
|
|
30415
|
+
...confidence ? { confidence } : {}
|
|
30353
30416
|
});
|
|
30354
30417
|
position3 = end;
|
|
30355
30418
|
}
|
|
@@ -30362,6 +30425,15 @@ function segmentTextWithAnnotations(content4, annotations) {
|
|
|
30362
30425
|
}
|
|
30363
30426
|
return segments;
|
|
30364
30427
|
}
|
|
30428
|
+
function logDegradedAnchorOnce(annotationId2, strategy, confidence) {
|
|
30429
|
+
if (warnedAnnotationIds.has(annotationId2)) return;
|
|
30430
|
+
warnedAnnotationIds.add(annotationId2);
|
|
30431
|
+
console.warn("[segmentTextWithAnnotations] annotation anchored via degraded strategy", {
|
|
30432
|
+
annotationId: annotationId2,
|
|
30433
|
+
strategy,
|
|
30434
|
+
confidence
|
|
30435
|
+
});
|
|
30436
|
+
}
|
|
30365
30437
|
|
|
30366
30438
|
// src/lib/text-selection-handler.ts
|
|
30367
30439
|
import { extractContext } from "@semiont/core";
|
|
@@ -30392,7 +30464,7 @@ function fallbackTextPosition(content4, selectedText) {
|
|
|
30392
30464
|
|
|
30393
30465
|
// src/components/resource/AnnotateView.tsx
|
|
30394
30466
|
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
30395
|
-
var PdfAnnotationCanvas = lazy(() => import("./PdfAnnotationCanvas.client-
|
|
30467
|
+
var PdfAnnotationCanvas = lazy(() => import("./PdfAnnotationCanvas.client-NIMALXNZ.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
|
|
30396
30468
|
function AnnotateView({
|
|
30397
30469
|
content: content4,
|
|
30398
30470
|
mimeType = "text/plain",
|
|
@@ -31304,6 +31376,7 @@ var html2 = create({
|
|
|
31304
31376
|
allowFullScreen: boolean,
|
|
31305
31377
|
allowPaymentRequest: boolean,
|
|
31306
31378
|
allowUserMedia: boolean,
|
|
31379
|
+
alpha: boolean,
|
|
31307
31380
|
alt: null,
|
|
31308
31381
|
as: null,
|
|
31309
31382
|
async: boolean,
|
|
@@ -31317,8 +31390,12 @@ var html2 = create({
|
|
|
31317
31390
|
checked: boolean,
|
|
31318
31391
|
cite: null,
|
|
31319
31392
|
className: spaceSeparated,
|
|
31393
|
+
closedBy: null,
|
|
31394
|
+
colorSpace: null,
|
|
31320
31395
|
cols: number2,
|
|
31321
|
-
colSpan:
|
|
31396
|
+
colSpan: number2,
|
|
31397
|
+
command: null,
|
|
31398
|
+
commandFor: null,
|
|
31322
31399
|
content: null,
|
|
31323
31400
|
contentEditable: booleanish,
|
|
31324
31401
|
controls: boolean,
|
|
@@ -31498,8 +31575,10 @@ var html2 = create({
|
|
|
31498
31575
|
seamless: boolean,
|
|
31499
31576
|
selected: boolean,
|
|
31500
31577
|
shadowRootClonable: boolean,
|
|
31578
|
+
shadowRootCustomElementRegistry: boolean,
|
|
31501
31579
|
shadowRootDelegatesFocus: boolean,
|
|
31502
31580
|
shadowRootMode: null,
|
|
31581
|
+
shadowRootSerializable: boolean,
|
|
31503
31582
|
shape: null,
|
|
31504
31583
|
size: number2,
|
|
31505
31584
|
sizes: null,
|
|
@@ -31636,8 +31715,11 @@ var html2 = create({
|
|
|
31636
31715
|
allowTransparency: null,
|
|
31637
31716
|
autoCorrect: null,
|
|
31638
31717
|
autoSave: null,
|
|
31718
|
+
credentialless: boolean,
|
|
31639
31719
|
disablePictureInPicture: boolean,
|
|
31640
31720
|
disableRemotePlayback: boolean,
|
|
31721
|
+
exportParts: commaSeparated,
|
|
31722
|
+
part: spaceSeparated,
|
|
31641
31723
|
prefix: null,
|
|
31642
31724
|
property: null,
|
|
31643
31725
|
results: number2,
|
|
@@ -31691,6 +31773,7 @@ var svg = create({
|
|
|
31691
31773
|
markerEnd: "marker-end",
|
|
31692
31774
|
markerMid: "marker-mid",
|
|
31693
31775
|
markerStart: "marker-start",
|
|
31776
|
+
maskType: "mask-type",
|
|
31694
31777
|
navDown: "nav-down",
|
|
31695
31778
|
navDownLeft: "nav-down-left",
|
|
31696
31779
|
navDownRight: "nav-down-right",
|
|
@@ -31961,6 +32044,7 @@ var svg = create({
|
|
|
31961
32044
|
markerWidth: null,
|
|
31962
32045
|
mask: null,
|
|
31963
32046
|
maskContentUnits: null,
|
|
32047
|
+
maskType: null,
|
|
31964
32048
|
maskUnits: null,
|
|
31965
32049
|
mathematical: null,
|
|
31966
32050
|
max: null,
|
|
@@ -40418,14 +40502,26 @@ var BIGINT = 8;
|
|
|
40418
40502
|
|
|
40419
40503
|
// ../../node_modules/@ungap/structured-clone/esm/deserialize.js
|
|
40420
40504
|
var env = typeof self === "object" ? self : globalThis;
|
|
40421
|
-
var
|
|
40505
|
+
var guard = (name3, init) => {
|
|
40506
|
+
switch (name3) {
|
|
40507
|
+
case "Function":
|
|
40508
|
+
case "SharedWorker":
|
|
40509
|
+
case "Worker":
|
|
40510
|
+
case "eval":
|
|
40511
|
+
case "setInterval":
|
|
40512
|
+
case "setTimeout":
|
|
40513
|
+
throw new TypeError("unable to deserialize " + name3);
|
|
40514
|
+
}
|
|
40515
|
+
return new env[name3](init);
|
|
40516
|
+
};
|
|
40517
|
+
var deserializer = ($3, _4) => {
|
|
40422
40518
|
const as = (out, index2) => {
|
|
40423
|
-
$
|
|
40519
|
+
$3.set(index2, out);
|
|
40424
40520
|
return out;
|
|
40425
40521
|
};
|
|
40426
40522
|
const unpair = (index2) => {
|
|
40427
|
-
if ($
|
|
40428
|
-
return $
|
|
40523
|
+
if ($3.has(index2))
|
|
40524
|
+
return $3.get(index2);
|
|
40429
40525
|
const [type, value] = _4[index2];
|
|
40430
40526
|
switch (type) {
|
|
40431
40527
|
case PRIMITIVE:
|
|
@@ -40463,7 +40559,7 @@ var deserializer = ($4, _4) => {
|
|
|
40463
40559
|
}
|
|
40464
40560
|
case ERROR: {
|
|
40465
40561
|
const { name: name3, message } = value;
|
|
40466
|
-
return as(
|
|
40562
|
+
return as(guard(name3, message), index2);
|
|
40467
40563
|
}
|
|
40468
40564
|
case BIGINT:
|
|
40469
40565
|
return as(BigInt(value), index2);
|
|
@@ -40476,7 +40572,7 @@ var deserializer = ($4, _4) => {
|
|
|
40476
40572
|
return as(new DataView(buffer), value);
|
|
40477
40573
|
}
|
|
40478
40574
|
}
|
|
40479
|
-
return as(
|
|
40575
|
+
return as(guard(type, value), index2);
|
|
40480
40576
|
};
|
|
40481
40577
|
return unpair;
|
|
40482
40578
|
};
|
|
@@ -40514,15 +40610,15 @@ var typeOf = (value) => {
|
|
|
40514
40610
|
return [OBJECT, asString];
|
|
40515
40611
|
};
|
|
40516
40612
|
var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
|
|
40517
|
-
var serializer = (strict, json2, $
|
|
40613
|
+
var serializer = (strict, json2, $3, _4) => {
|
|
40518
40614
|
const as = (out, value) => {
|
|
40519
40615
|
const index2 = _4.push(out) - 1;
|
|
40520
|
-
$
|
|
40616
|
+
$3.set(value, index2);
|
|
40521
40617
|
return index2;
|
|
40522
40618
|
};
|
|
40523
40619
|
const pair2 = (value) => {
|
|
40524
|
-
if ($
|
|
40525
|
-
return $
|
|
40620
|
+
if ($3.has(value))
|
|
40621
|
+
return $3.get(value);
|
|
40526
40622
|
let [TYPE, type] = typeOf(value);
|
|
40527
40623
|
switch (TYPE) {
|
|
40528
40624
|
case PRIMITIVE: {
|
|
@@ -45566,7 +45662,7 @@ function ImageViewer({ imageUrl, alt = "Resource image" }) {
|
|
|
45566
45662
|
|
|
45567
45663
|
// src/components/resource/BrowseView.tsx
|
|
45568
45664
|
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
45569
|
-
var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-
|
|
45665
|
+
var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-NIMALXNZ.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
|
|
45570
45666
|
var MemoizedMarkdown = memo(function MemoizedMarkdown2({
|
|
45571
45667
|
content: content4
|
|
45572
45668
|
}) {
|
|
@@ -47520,7 +47616,7 @@ function ReferencesPanel({
|
|
|
47520
47616
|
hasSavedLogRef.current = false;
|
|
47521
47617
|
return;
|
|
47522
47618
|
}
|
|
47523
|
-
if (!
|
|
47619
|
+
if (!hasSavedLogRef.current && progress?.completedEntityTypes) {
|
|
47524
47620
|
hasSavedLogRef.current = true;
|
|
47525
47621
|
setLastDetectionLog(progress.completedEntityTypes);
|
|
47526
47622
|
setSelectedEntityTypes([]);
|
|
@@ -55963,7 +56059,7 @@ function ImportCard({
|
|
|
55963
56059
|
] }),
|
|
55964
56060
|
Object.keys(preview.stats).length > 0 && /* @__PURE__ */ jsxs64("div", { className: "semiont-exchange__preview-row", children: [
|
|
55965
56061
|
/* @__PURE__ */ jsx74("span", { className: "semiont-exchange__preview-label", children: t12.statsPreview }),
|
|
55966
|
-
/* @__PURE__ */ jsx74("span", { className: "semiont-exchange__preview-value", children: Object.entries(preview.stats).map(([
|
|
56062
|
+
/* @__PURE__ */ jsx74("span", { className: "semiont-exchange__preview-value", children: Object.entries(preview.stats).map(([k6, v4]) => `${v4} ${k6}`).join(", ") })
|
|
55967
56063
|
] })
|
|
55968
56064
|
] }),
|
|
55969
56065
|
showConfirm && /* @__PURE__ */ jsxs64("div", { className: "semiont-exchange__confirm", children: [
|
|
@@ -57809,7 +57905,7 @@ function ResourceComposePage({
|
|
|
57809
57905
|
}
|
|
57810
57906
|
|
|
57811
57907
|
// src/features/resource-discovery/components/ResourceDiscoveryPage.tsx
|
|
57812
|
-
import {
|
|
57908
|
+
import { useCallback as useCallback33, useRef as useRef36 } from "react";
|
|
57813
57909
|
import { getResourceId as getResourceId3 } from "@semiont/core";
|
|
57814
57910
|
|
|
57815
57911
|
// src/features/resource-discovery/components/ResourceCard.tsx
|
|
@@ -57876,6 +57972,8 @@ function ResourceDiscoveryPage({
|
|
|
57876
57972
|
isSearching,
|
|
57877
57973
|
searchQuery,
|
|
57878
57974
|
onSearchQueryChange,
|
|
57975
|
+
selectedEntityType,
|
|
57976
|
+
onSelectedEntityTypeChange,
|
|
57879
57977
|
theme: theme2,
|
|
57880
57978
|
showLineNumbers,
|
|
57881
57979
|
activePanel,
|
|
@@ -57884,12 +57982,8 @@ function ResourceDiscoveryPage({
|
|
|
57884
57982
|
translations: t12,
|
|
57885
57983
|
ToolbarPanels
|
|
57886
57984
|
}) {
|
|
57887
|
-
const [selectedEntityType, setSelectedEntityType] = useState46("");
|
|
57888
57985
|
const hasSearchQuery = searchQuery.trim() !== "";
|
|
57889
|
-
const
|
|
57890
|
-
const filteredResources = !selectedEntityType ? baseDocuments : baseDocuments.filter(
|
|
57891
|
-
(resource) => resource.entityTypes && resource.entityTypes.includes(selectedEntityType)
|
|
57892
|
-
);
|
|
57986
|
+
const filteredResources = hasSearchQuery ? searchDocuments : recentDocuments;
|
|
57893
57987
|
const entityFilterRoving = useRovingTabIndex(
|
|
57894
57988
|
entityTypes.length + 1,
|
|
57895
57989
|
// +1 for "All" button
|
|
@@ -57903,8 +57997,8 @@ function ResourceDiscoveryPage({
|
|
|
57903
57997
|
const onNavigateToResourceRef = useRef36(onNavigateToResource);
|
|
57904
57998
|
onNavigateToResourceRef.current = onNavigateToResource;
|
|
57905
57999
|
const handleEntityTypeFilter = useCallback33((entityType) => {
|
|
57906
|
-
|
|
57907
|
-
}, []);
|
|
58000
|
+
onSelectedEntityTypeChange(entityType);
|
|
58001
|
+
}, [onSelectedEntityTypeChange]);
|
|
57908
58002
|
const openResource = useCallback33((resource) => {
|
|
57909
58003
|
const resourceId2 = getResourceId3(resource);
|
|
57910
58004
|
if (resourceId2) {
|
|
@@ -58032,17 +58126,17 @@ function ResourceDiscoveryPage({
|
|
|
58032
58126
|
}
|
|
58033
58127
|
|
|
58034
58128
|
// src/features/resource-viewer/components/ResourceViewerPage.tsx
|
|
58035
|
-
import { useState as
|
|
58129
|
+
import { useState as useState47, useEffect as useEffect50, useCallback as useCallback34 } from "react";
|
|
58036
58130
|
import { annotationId } from "@semiont/core";
|
|
58037
58131
|
import { getLanguage, getPrimaryRepresentation as getPrimaryRepresentation2, getPrimaryMediaType as getPrimaryMediaType2 } from "@semiont/core";
|
|
58038
58132
|
import { getMimeCategory as getMimeCategory3 } from "@semiont/core";
|
|
58039
58133
|
|
|
58040
58134
|
// src/hooks/useMediaToken.ts
|
|
58041
|
-
import { useEffect as useEffect49, useState as
|
|
58135
|
+
import { useEffect as useEffect49, useState as useState46 } from "react";
|
|
58042
58136
|
function useMediaToken(id2) {
|
|
58043
58137
|
const semiont = useObservable(useSemiont().activeSession$)?.client;
|
|
58044
|
-
const [token, setToken] =
|
|
58045
|
-
const [loading, setLoading] =
|
|
58138
|
+
const [token, setToken] = useState46(void 0);
|
|
58139
|
+
const [loading, setLoading] = useState46(true);
|
|
58046
58140
|
useEffect49(() => {
|
|
58047
58141
|
if (!semiont || !id2) {
|
|
58048
58142
|
setLoading(false);
|
|
@@ -58146,8 +58240,6 @@ function createResourceViewerPageStateUnit(client, resourceId2, locale, browse,
|
|
|
58146
58240
|
});
|
|
58147
58241
|
}
|
|
58148
58242
|
const wizard$ = new import_rxjs2.BehaviorSubject(WIZARD_CLOSED);
|
|
58149
|
-
const unsubscribeResource = client.subscribeToResource(resourceId2);
|
|
58150
|
-
disposer.add(unsubscribeResource);
|
|
58151
58243
|
const bindInitiateSub = client.bus.get("bind:initiate").subscribe((event) => {
|
|
58152
58244
|
wizard$.next({
|
|
58153
58245
|
open: true,
|
|
@@ -58433,7 +58525,7 @@ function ResourceViewerPage({
|
|
|
58433
58525
|
const primaryRep = getPrimaryRepresentation2(resource);
|
|
58434
58526
|
const primaryMediaType = primaryRep?.mediaType;
|
|
58435
58527
|
const primaryByteSize = primaryRep?.byteSize;
|
|
58436
|
-
const [annotateMode, setAnnotateMode] =
|
|
58528
|
+
const [annotateMode, setAnnotateMode] = useState47(() => {
|
|
58437
58529
|
if (typeof window !== "undefined") {
|
|
58438
58530
|
return localStorage.getItem("annotateMode") === "true";
|
|
58439
58531
|
}
|
|
@@ -58995,33 +59087,75 @@ function createWelcomeStateUnit(client) {
|
|
|
58995
59087
|
|
|
58996
59088
|
// src/features/resource-discovery/state/discover-state-unit.ts
|
|
58997
59089
|
var import_rxjs10 = __toESM(require_cjs(), 1);
|
|
59090
|
+
var import_operators4 = __toESM(require_operators(), 1);
|
|
58998
59091
|
import { createDisposer as createDisposer7 } from "@semiont/sdk";
|
|
58999
|
-
import { createSearchPipeline as createSearchPipeline3 } from "@semiont/sdk";
|
|
59000
59092
|
var RECENT_LIMIT = 10;
|
|
59001
59093
|
var SEARCH_LIMIT3 = 20;
|
|
59094
|
+
var DEBOUNCE_MS = 250;
|
|
59002
59095
|
function createDiscoverStateUnit(client, browse) {
|
|
59003
59096
|
const disposer = createDisposer7();
|
|
59004
|
-
const search2 = createSearchPipeline3(
|
|
59005
|
-
(q2) => client.browse.resources({ search: q2, limit: SEARCH_LIMIT3 })
|
|
59006
|
-
);
|
|
59007
|
-
disposer.add(search2);
|
|
59008
59097
|
disposer.add(browse);
|
|
59009
|
-
const
|
|
59098
|
+
const selectedEntityType$ = new import_rxjs10.BehaviorSubject("");
|
|
59099
|
+
disposer.add(() => selectedEntityType$.complete());
|
|
59100
|
+
const queryInput$ = new import_rxjs10.Subject();
|
|
59101
|
+
disposer.add(() => queryInput$.complete());
|
|
59102
|
+
const recent$ = selectedEntityType$.pipe(
|
|
59103
|
+
(0, import_operators4.switchMap)(
|
|
59104
|
+
(et) => client.browse.resources({
|
|
59105
|
+
limit: RECENT_LIMIT,
|
|
59106
|
+
archived: false,
|
|
59107
|
+
...et ? { entityType: et } : {}
|
|
59108
|
+
})
|
|
59109
|
+
),
|
|
59110
|
+
(0, import_operators4.shareReplay)({ bufferSize: 1, refCount: true })
|
|
59111
|
+
);
|
|
59010
59112
|
const recentResources$ = recent$.pipe(
|
|
59011
|
-
(0,
|
|
59113
|
+
(0, import_operators4.map)((r14) => r14 ?? [])
|
|
59012
59114
|
);
|
|
59013
59115
|
const isLoadingRecent$ = recent$.pipe(
|
|
59014
|
-
(0,
|
|
59116
|
+
(0, import_operators4.map)((r14) => r14 === void 0)
|
|
59015
59117
|
);
|
|
59016
59118
|
const entityTypes$ = client.browse.entityTypes().pipe(
|
|
59017
|
-
(0,
|
|
59119
|
+
(0, import_operators4.map)((e6) => e6 ?? [])
|
|
59120
|
+
);
|
|
59121
|
+
const debouncedQuery$ = queryInput$.pipe(
|
|
59122
|
+
(0, import_operators4.startWith)(""),
|
|
59123
|
+
(0, import_operators4.debounceTime)(DEBOUNCE_MS),
|
|
59124
|
+
(0, import_operators4.distinctUntilChanged)()
|
|
59018
59125
|
);
|
|
59126
|
+
const state$ = (0, import_rxjs10.combineLatest)([debouncedQuery$, selectedEntityType$]).pipe(
|
|
59127
|
+
(0, import_operators4.switchMap)(([q2, et]) => {
|
|
59128
|
+
const trimmed = q2.trim();
|
|
59129
|
+
if (!trimmed) {
|
|
59130
|
+
return (0, import_rxjs10.of)({ results: [], isSearching: false });
|
|
59131
|
+
}
|
|
59132
|
+
return client.browse.resources({
|
|
59133
|
+
search: trimmed,
|
|
59134
|
+
limit: SEARCH_LIMIT3,
|
|
59135
|
+
...et ? { entityType: et } : {}
|
|
59136
|
+
}).pipe(
|
|
59137
|
+
(0, import_operators4.map)((results) => ({
|
|
59138
|
+
results: results ?? [],
|
|
59139
|
+
isSearching: results === void 0
|
|
59140
|
+
})),
|
|
59141
|
+
(0, import_operators4.startWith)({ results: [], isSearching: true })
|
|
59142
|
+
);
|
|
59143
|
+
}),
|
|
59144
|
+
(0, import_operators4.shareReplay)({ bufferSize: 1, refCount: true })
|
|
59145
|
+
);
|
|
59146
|
+
const search2 = {
|
|
59147
|
+
query$: queryInput$.pipe((0, import_operators4.startWith)("")),
|
|
59148
|
+
state$,
|
|
59149
|
+
setQuery: (value) => queryInput$.next(value)
|
|
59150
|
+
};
|
|
59019
59151
|
return {
|
|
59020
59152
|
browse,
|
|
59021
59153
|
search: search2,
|
|
59022
59154
|
recentResources$,
|
|
59023
59155
|
entityTypes$,
|
|
59024
59156
|
isLoadingRecent$,
|
|
59157
|
+
selectedEntityType$: selectedEntityType$.asObservable(),
|
|
59158
|
+
setSelectedEntityType: (value) => selectedEntityType$.next(value),
|
|
59025
59159
|
dispose: () => disposer.dispose()
|
|
59026
59160
|
};
|
|
59027
59161
|
}
|
|
@@ -59192,7 +59326,7 @@ export {
|
|
|
59192
59326
|
createMatchStateUnit2 as createMatchStateUnit,
|
|
59193
59327
|
createResourceLoaderStateUnit,
|
|
59194
59328
|
createResourceViewerPageStateUnit,
|
|
59195
|
-
|
|
59329
|
+
createSearchPipeline3 as createSearchPipeline,
|
|
59196
59330
|
createSessionStateUnit,
|
|
59197
59331
|
createShellStateUnit,
|
|
59198
59332
|
createWelcomeStateUnit,
|