@semiont/react-ui 0.5.5 → 0.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +59 -55
  2. package/dist/{PdfAnnotationCanvas.client-CN3C3S55.js → PdfAnnotationCanvas.client-NIMALXNZ.js} +7 -27
  3. package/dist/PdfAnnotationCanvas.client-NIMALXNZ.js.map +1 -0
  4. package/dist/{ar-U2EXWUMQ.js → ar-SONK6MON.js} +3 -7
  5. package/dist/ar-SONK6MON.js.map +1 -0
  6. package/dist/{bn-DRJGV772.js → bn-ZKPRITNG.js} +3 -7
  7. package/dist/bn-ZKPRITNG.js.map +1 -0
  8. package/dist/{chunk-3Q3TUKWP.js → chunk-Y2EEAOMZ.js} +29 -29
  9. package/dist/{cs-PTWDM23V.js → cs-LPXQ7NHQ.js} +3 -7
  10. package/dist/cs-LPXQ7NHQ.js.map +1 -0
  11. package/dist/{da-KSNIKYSS.js → da-6TKY7MCY.js} +6 -10
  12. package/dist/da-6TKY7MCY.js.map +1 -0
  13. package/dist/{de-F2XBEWFY.js → de-C3GNII74.js} +3 -7
  14. package/dist/de-C3GNII74.js.map +1 -0
  15. package/dist/{el-DLD2GWAP.js → el-UBCXQDJ7.js} +3 -7
  16. package/dist/el-UBCXQDJ7.js.map +1 -0
  17. package/dist/{es-WLPYWGB5.js → es-BQ23TRI7.js} +11 -15
  18. package/dist/es-BQ23TRI7.js.map +1 -0
  19. package/dist/{fa-BAXHSDZG.js → fa-AFTBZB77.js} +3 -7
  20. package/dist/fa-AFTBZB77.js.map +1 -0
  21. package/dist/{fi-FCHSYVOT.js → fi-WOYNLZC2.js} +3 -7
  22. package/dist/fi-WOYNLZC2.js.map +1 -0
  23. package/dist/{fr-3UERBSL6.js → fr-NDSMIFJM.js} +3 -7
  24. package/dist/fr-NDSMIFJM.js.map +1 -0
  25. package/dist/{he-F6F3FV2K.js → he-VJXVRDOY.js} +3 -7
  26. package/dist/he-VJXVRDOY.js.map +1 -0
  27. package/dist/{hi-4BK6IK7Q.js → hi-BF6PHIE2.js} +3 -7
  28. package/dist/hi-BF6PHIE2.js.map +1 -0
  29. package/dist/{id-7ECCWP3J.js → id-GXG5QCZY.js} +3 -7
  30. package/dist/id-GXG5QCZY.js.map +1 -0
  31. package/dist/index.css +103 -0
  32. package/dist/index.css.map +1 -1
  33. package/dist/index.d.ts +271 -120
  34. package/dist/index.js +877 -698
  35. package/dist/index.js.map +1 -1
  36. package/dist/{it-234Z6XK6.js → it-XKHHCBAF.js} +3 -7
  37. package/dist/it-XKHHCBAF.js.map +1 -0
  38. package/dist/{ja-PJWQI4OQ.js → ja-TX7VM4XD.js} +3 -7
  39. package/dist/ja-TX7VM4XD.js.map +1 -0
  40. package/dist/{ko-APUEW2RS.js → ko-DNC7EQ7J.js} +3 -7
  41. package/dist/ko-DNC7EQ7J.js.map +1 -0
  42. package/dist/{ms-PJBZWZWD.js → ms-POZGBKPH.js} +3 -7
  43. package/dist/ms-POZGBKPH.js.map +1 -0
  44. package/dist/{nl-L4C3ZBCU.js → nl-IRMTKI7Z.js} +4 -11
  45. package/dist/nl-IRMTKI7Z.js.map +1 -0
  46. package/dist/{no-QE5N5KNG.js → no-ZUDJA4S6.js} +20 -24
  47. package/dist/no-ZUDJA4S6.js.map +1 -0
  48. package/dist/{pl-5Q2D23PD.js → pl-2NGAXL5U.js} +3 -7
  49. package/dist/pl-2NGAXL5U.js.map +1 -0
  50. package/dist/{pt-AIGUOIOC.js → pt-ABMCXZUM.js} +118 -122
  51. package/dist/pt-ABMCXZUM.js.map +1 -0
  52. package/dist/{ro-T56CSHTY.js → ro-VOJP6O5X.js} +3 -7
  53. package/dist/ro-VOJP6O5X.js.map +1 -0
  54. package/dist/{sv-L4TJQ2UH.js → sv-4HVFIIE5.js} +43 -47
  55. package/dist/sv-4HVFIIE5.js.map +1 -0
  56. package/dist/test-utils.js +2 -2
  57. package/dist/test-utils.js.map +1 -1
  58. package/dist/{th-6O7Y6O2Q.js → th-IFPZP3HQ.js} +3 -7
  59. package/dist/th-IFPZP3HQ.js.map +1 -0
  60. package/dist/{tr-D4CQCSNO.js → tr-2GYEAMJ4.js} +3 -7
  61. package/dist/tr-2GYEAMJ4.js.map +1 -0
  62. package/dist/{uk-2HMQG6ND.js → uk-XCJBVLLD.js} +3 -7
  63. package/dist/uk-XCJBVLLD.js.map +1 -0
  64. package/dist/{vi-XVJ4RUEJ.js → vi-4FR7CB2F.js} +3 -7
  65. package/dist/vi-4FR7CB2F.js.map +1 -0
  66. package/dist/{zh-K2KDPGHK.js → zh-NSKFOINB.js} +3 -7
  67. package/dist/zh-NSKFOINB.js.map +1 -0
  68. package/package.json +17 -13
  69. package/src/components/Button/__tests__/Button.test.tsx +0 -2
  70. package/src/components/CodeMirrorRenderer.tsx +2 -0
  71. package/src/components/ErrorBoundary.tsx +0 -9
  72. package/src/components/ProtectedErrorBoundary.css +119 -0
  73. package/src/components/ProtectedErrorBoundary.tsx +24 -15
  74. package/src/components/__tests__/AnnotateReferencesProgressWidget.test.tsx +0 -1
  75. package/src/components/__tests__/ErrorBoundary.test.tsx +20 -13
  76. package/src/components/__tests__/LiveRegion.hooks.test.tsx +1 -1
  77. package/src/components/__tests__/ProtectedErrorBoundary.test.tsx +2 -1
  78. package/src/components/__tests__/ResizeHandle.test.tsx +0 -1
  79. package/src/components/__tests__/SessionExpiryBanner.test.tsx +0 -1
  80. package/src/components/__tests__/StatusDisplay.test.tsx +0 -1
  81. package/src/components/__tests__/Toast.test.tsx +2 -3
  82. package/src/components/__tests__/Toolbar.test.tsx +0 -1
  83. package/src/components/annotation/annotations.css +14 -0
  84. package/src/components/annotation-popups/__tests__/JsonLdView.test.tsx +3 -5
  85. package/src/components/annotation-popups/__tests__/SharedPopupElements.test.tsx +0 -1
  86. package/src/components/branding/__tests__/SemiontBranding.test.tsx +1 -2
  87. package/src/components/layout/__tests__/LeftSidebar.test.tsx +5 -6
  88. package/src/components/layout/__tests__/PageLayout.test.tsx +1 -3
  89. package/src/components/layout/__tests__/SkipLinks.a11y.test.tsx +8 -8
  90. package/src/components/layout/__tests__/UnifiedHeader.test.tsx +12 -1
  91. package/src/components/modals/__tests__/KeyboardShortcutsHelpModal.test.tsx +0 -1
  92. package/src/components/modals/__tests__/PermissionDeniedModal.test.tsx +3 -4
  93. package/src/components/modals/__tests__/ResourceSearchModal.test.tsx +1 -2
  94. package/src/components/modals/__tests__/SearchModal.basic.test.tsx +1 -1
  95. package/src/components/modals/__tests__/SearchModal.keyboard.test.tsx +0 -5
  96. package/src/components/modals/__tests__/SearchModal.search-wiring.test.tsx +1 -2
  97. package/src/components/modals/__tests__/SearchModal.visual.test.tsx +2 -2
  98. package/src/components/modals/__tests__/SessionExpiredModal.test.tsx +0 -1
  99. package/src/components/navigation/NavigationMenu.tsx +1 -1
  100. package/src/components/navigation/__tests__/Footer.a11y.test.tsx +4 -0
  101. package/src/components/navigation/__tests__/Footer.test.tsx +3 -6
  102. package/src/components/navigation/__tests__/NavigationMenu.a11y.test.tsx +1 -1
  103. package/src/components/navigation/__tests__/NavigationMenu.test.tsx +7 -9
  104. package/src/components/navigation/__tests__/ObservableLink.test.tsx +0 -1
  105. package/src/components/navigation/__tests__/SimpleNavigation.test.tsx +1 -2
  106. package/src/components/navigation/__tests__/SortableResourceTab.test.tsx +0 -1
  107. package/src/components/pdf-annotation/PdfAnnotationCanvas.tsx +6 -4
  108. package/src/components/pdf-annotation/__tests__/PdfAnnotationCanvas.test.tsx +10 -19
  109. package/src/components/resource/AnnotateView.tsx +35 -37
  110. package/src/components/resource/BrowseView.tsx +31 -31
  111. package/src/components/resource/__tests__/AnnotationHistory.test.tsx +0 -1
  112. package/src/components/resource/__tests__/BrowseView.test.tsx +12 -14
  113. package/src/components/resource/__tests__/HistoryEvent.test.tsx +0 -5
  114. package/src/components/resource/__tests__/ResourceViewer.mode-switch.test.tsx +4 -6
  115. package/src/components/resource/__tests__/event-formatting.test.ts +1 -1
  116. package/src/components/resource/panels/CollaborationPanel.tsx +1 -1
  117. package/src/components/resource/panels/JsonLdPanel.tsx +33 -16
  118. package/src/components/resource/panels/ReferencesPanel.tsx +1 -1
  119. package/src/components/resource/panels/__tests__/AssessmentEntry.test.tsx +4 -5
  120. package/src/components/resource/panels/__tests__/AssessmentPanel.test.tsx +8 -7
  121. package/src/components/resource/panels/__tests__/AssistSection.test.tsx +14 -10
  122. package/src/components/resource/panels/__tests__/CollaborationPanel.test.tsx +0 -1
  123. package/src/components/resource/panels/__tests__/CommentEntry.test.tsx +31 -18
  124. package/src/components/resource/panels/__tests__/CommentsPanel.test.tsx +7 -6
  125. package/src/components/resource/panels/__tests__/HighlightEntry.test.tsx +5 -6
  126. package/src/components/resource/panels/__tests__/HighlightPanel.annotationProgress.test.tsx +19 -13
  127. package/src/components/resource/panels/__tests__/JsonLdPanel.test.tsx +95 -426
  128. package/src/components/resource/panels/__tests__/PanelHeader.test.tsx +0 -1
  129. package/src/components/resource/panels/__tests__/ReferenceEntry.test.tsx +5 -5
  130. package/src/components/resource/panels/__tests__/ReferencesPanel.test.tsx +40 -7
  131. package/src/components/resource/panels/__tests__/ResourceInfoPanel.test.tsx +4 -4
  132. package/src/components/resource/panels/__tests__/StatisticsPanel.test.tsx +30 -32
  133. package/src/components/resource/panels/__tests__/TagEntry.test.tsx +6 -6
  134. package/src/components/resource/panels/__tests__/TaggingPanel.test.tsx +7 -6
  135. package/src/components/settings/__tests__/SettingsPanel.test.tsx +0 -1
  136. package/src/components/viewers/__tests__/ImageViewer.test.tsx +0 -1
  137. package/src/features/admin-exchange/__tests__/AdminExchangePage.test.tsx +7 -10
  138. package/src/features/admin-exchange/__tests__/ImportProgress.test.tsx +38 -27
  139. package/src/features/admin-exchange/components/ImportProgress.tsx +28 -34
  140. package/src/features/auth/__tests__/SignInForm.a11y.test.tsx +2 -0
  141. package/src/features/auth/__tests__/SignUpForm.a11y.test.tsx +11 -12
  142. package/src/features/auth/__tests__/SignUpForm.test.tsx +3 -3
  143. package/src/features/moderate-tag-schemas/components/TagSchemasPage.tsx +1 -0
  144. package/src/features/moderation-linked-data/__tests__/LinkedDataPage.test.tsx +11 -9
  145. package/src/features/resource-compose/__tests__/ResourceComposePage.test.tsx +2 -1
  146. package/src/features/resource-compose/components/ResourceComposePage.tsx +36 -9
  147. package/src/features/resource-compose/state/compose-page-state-unit.ts +5 -8
  148. package/src/features/resource-discovery/__tests__/ResourceCard.test.tsx +0 -1
  149. package/src/features/resource-discovery/__tests__/ResourceDiscoveryPage.test.tsx +33 -35
  150. package/src/features/resource-discovery/components/ResourceDiscoveryPage.tsx +12 -11
  151. package/src/features/resource-discovery/state/__tests__/discover-state-unit.test.ts +204 -11
  152. package/src/features/resource-discovery/state/discover-state-unit.ts +70 -11
  153. package/src/features/resource-viewer/__tests__/ResourceViewerPage.test.tsx +2 -2
  154. package/src/features/resource-viewer/components/ResourceViewerPage.tsx +10 -7
  155. package/src/features/resource-viewer/state/__tests__/resource-viewer-page-state-unit.test.ts +37 -1
  156. package/src/features/resource-viewer/state/resource-viewer-page-state-unit.ts +14 -7
  157. package/src/integrations/__tests__/css-modules-helper.test.tsx +2 -3
  158. package/src/integrations/__tests__/styled-components-theme.test.ts +1 -3
  159. package/src/styles/features/exchange.css +0 -30
  160. package/src/styles/index.css +1 -0
  161. package/translations/ar.json +1 -3
  162. package/translations/bn.json +1 -3
  163. package/translations/cs.json +1 -3
  164. package/translations/da.json +4 -6
  165. package/translations/de.json +1 -3
  166. package/translations/el.json +1 -3
  167. package/translations/es.json +9 -11
  168. package/translations/fa.json +1 -3
  169. package/translations/fi.json +1 -3
  170. package/translations/fr.json +1 -3
  171. package/translations/he.json +1 -3
  172. package/translations/hi.json +1 -3
  173. package/translations/id.json +1 -3
  174. package/translations/it.json +1 -3
  175. package/translations/ja.json +1 -3
  176. package/translations/ko.json +1 -3
  177. package/translations/ms.json +1 -3
  178. package/translations/nl.json +2 -7
  179. package/translations/no.json +18 -20
  180. package/translations/pl.json +1 -3
  181. package/translations/pt.json +116 -118
  182. package/translations/ro.json +1 -3
  183. package/translations/sv.json +41 -43
  184. package/translations/th.json +1 -3
  185. package/translations/tr.json +1 -3
  186. package/translations/uk.json +1 -3
  187. package/translations/vi.json +1 -3
  188. package/translations/zh.json +1 -3
  189. package/dist/PdfAnnotationCanvas.client-CN3C3S55.js.map +0 -1
  190. package/dist/ar-U2EXWUMQ.js.map +0 -1
  191. package/dist/bn-DRJGV772.js.map +0 -1
  192. package/dist/cs-PTWDM23V.js.map +0 -1
  193. package/dist/da-KSNIKYSS.js.map +0 -1
  194. package/dist/de-F2XBEWFY.js.map +0 -1
  195. package/dist/el-DLD2GWAP.js.map +0 -1
  196. package/dist/es-WLPYWGB5.js.map +0 -1
  197. package/dist/fa-BAXHSDZG.js.map +0 -1
  198. package/dist/fi-FCHSYVOT.js.map +0 -1
  199. package/dist/fr-3UERBSL6.js.map +0 -1
  200. package/dist/he-F6F3FV2K.js.map +0 -1
  201. package/dist/hi-4BK6IK7Q.js.map +0 -1
  202. package/dist/id-7ECCWP3J.js.map +0 -1
  203. package/dist/it-234Z6XK6.js.map +0 -1
  204. package/dist/ja-PJWQI4OQ.js.map +0 -1
  205. package/dist/ko-APUEW2RS.js.map +0 -1
  206. package/dist/ms-PJBZWZWD.js.map +0 -1
  207. package/dist/nl-L4C3ZBCU.js.map +0 -1
  208. package/dist/no-QE5N5KNG.js.map +0 -1
  209. package/dist/pl-5Q2D23PD.js.map +0 -1
  210. package/dist/pt-AIGUOIOC.js.map +0 -1
  211. package/dist/ro-T56CSHTY.js.map +0 -1
  212. package/dist/sv-L4TJQ2UH.js.map +0 -1
  213. package/dist/th-6O7Y6O2Q.js.map +0 -1
  214. package/dist/tr-D4CQCSNO.js.map +0 -1
  215. package/dist/uk-2HMQG6ND.js.map +0 -1
  216. package/dist/vi-XVJ4RUEJ.js.map +0 -1
  217. package/dist/zh-K2KDPGHK.js.map +0 -1
  218. /package/dist/{chunk-3Q3TUKWP.js.map → chunk-Y2EEAOMZ.js.map} +0 -0
package/dist/index.js CHANGED
@@ -124,7 +124,7 @@ import {
124
124
  useSemiont,
125
125
  useToast,
126
126
  useTranslations
127
- } from "./chunk-3Q3TUKWP.js";
127
+ } from "./chunk-Y2EEAOMZ.js";
128
128
  import "./chunk-GERSK2DY.js";
129
129
  import {
130
130
  __commonJS,
@@ -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(f10) {
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
- f10(posA, posB, len);
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(f10, individual = false) {
1903
- iterChanges(this, f10, individual);
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(f10, individual = false) {
2079
- iterChanges(this, f10, individual);
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, f10, individual) {
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
- f10(posA, endA, posB, endB, text7);
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((f10) => f10(address));
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(f10) {
3545
+ changeByRange(f11) {
3546
3546
  let sel = this.selection;
3547
- let result1 = f10(sel.ranges[0]);
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 = f10(sel.ranges[i12]);
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((k5) => a15[k5] == b8[k5]);
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, f10) {
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 (f10(this.from[i12] + offset, this.to[i12] + offset, this.value[i12]) === false)
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, f10) {
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, f10) === false)
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, f10);
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 k5 = 0; k5 < mod.rules.length; k5++)
4707
- sheet.insertRule(mod.rules[k5], pos++);
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(of, sort = false) {
5098
- return RangeSet.of(of, sort);
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(of, sort = false) {
5204
- return RangeSet.of(of, sort);
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 = "nearest", x8 = "nearest", yMargin = 5, xMargin = 5, isSnapshot = false) {
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(f10) {
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 = f10(next, pos);
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 wrap3 = new OpenWrapper(cur.from, cur.to, cur.value, cur.rank), i12 = this.wrappers.length;
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((f10) => f10(view)), pos.from, oldPos.head > pos.from ? -1 : 1);
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((f10) => f10(view)), newSel);
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((f10) => f10(view)), pos, side);
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 f10 = handlers3[type];
9057
- if (f10)
9058
- record(type).handlers.push(bindHandler(plugin.value, f10));
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 f10 = observers2[type];
9063
- if (f10)
9064
- record(type).observers.push(bindHandler(plugin.value, f10));
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((f10) => f10(view));
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 || Math.abs(charWidth - this.charWidth) > 0.1;
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, f10) {
9936
+ forEachLine(from, to, oracle, top2, offset, f11) {
9923
9937
  if (from <= offset + this.length && to >= offset)
9924
- f10(this.lineAt(0, QueryType.ByPos, oracle, top2, offset));
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, f10) {
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
- f10(new BlockInfo(line.from, line.length, lineTop, lineHeight, 0));
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, f10) {
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, f10);
10153
+ this.left.forEachLine(from, to, oracle, top2, offset, f11);
10140
10154
  if (to >= rightOffset)
10141
- this.right.forEachLine(from, to, oracle, rightTop, rightOffset, f10);
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, f10);
10159
+ this.left.forEachLine(from, mid.from - 1, oracle, top2, offset, f11);
10146
10160
  if (mid.to >= from && mid.from <= to)
10147
- f10(mid);
10161
+ f11(mid);
10148
10162
  if (to > mid.to)
10149
- this.right.forEachLine(mid.to + 1, to, oracle, rightTop, rightOffset, f10);
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, f10) {
10945
+ function find(array, f11) {
10932
10946
  for (let val of array)
10933
- if (f10(val))
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
- // https://github.com/codemirror/dev/issues/456
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(f10) {
11520
+ ignore(f11) {
11507
11521
  if (!this.active)
11508
- return f10();
11522
+ return f11();
11509
11523
  try {
11510
11524
  this.stop();
11511
- return f10();
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
- scrollTarget = new ScrollTarget(main.empty ? main : EditorSelection.cursor(main.head, main.head > main.anchor ? -1 : 1));
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
- return scrollIntoView.of(new ScrollTarget(typeof pos == "number" ? EditorSelection.cursor(pos) : pos, options.y, options.x, options.yMargin, options.xMargin));
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://github.com/marijnh/style-mod#documentation)
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((k5) => normalizeKeyName(k5, platform));
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 f10 of fragments)
15212
- if (f10.to > tree.length)
15213
- result.push(f10);
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 (!cursor2.next(false))
15521
- this.done = true;
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(f10) {
16681
+ withContext(f11) {
16650
16682
  let prev = currentContext;
16651
16683
  currentContext = this;
16652
16684
  try {
16653
- return f10();
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);
@@ -17483,12 +17518,12 @@ function hideWidgetPreview(container) {
17483
17518
  }
17484
17519
 
17485
17520
  // src/lib/media-shapes.ts
17486
- import { isPdfMimeType } from "@semiont/core";
17521
+ import { capabilitiesOf } from "@semiont/core";
17487
17522
  function getSupportedShapes(mediaType) {
17488
17523
  if (!mediaType) {
17489
17524
  return ["rectangle", "circle", "polygon"];
17490
17525
  }
17491
- if (isPdfMimeType(mediaType)) {
17526
+ if (capabilitiesOf(mediaType)?.render === "pdf") {
17492
17527
  return ["rectangle"];
17493
17528
  }
17494
17529
  if (mediaType.startsWith("image/")) {
@@ -17503,7 +17538,7 @@ function getSelectorType(mediaType) {
17503
17538
  if (!mediaType) {
17504
17539
  return "text";
17505
17540
  }
17506
- if (isPdfMimeType(mediaType)) {
17541
+ if (capabilitiesOf(mediaType)?.render === "pdf") {
17507
17542
  return "fragment";
17508
17543
  }
17509
17544
  if (mediaType.startsWith("image/")) {
@@ -17533,7 +17568,7 @@ function saveSelectedShapeForSelectorType(selectorType, shape) {
17533
17568
  }
17534
17569
 
17535
17570
  // src/index.ts
17536
- import { createSearchPipeline as createSearchPipeline4 } from "@semiont/sdk";
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";
@@ -17686,27 +17721,23 @@ function toOverlayAnnotations(annotations) {
17686
17721
  }
17687
17722
 
17688
17723
  // src/lib/resource-utils.ts
17724
+ import { baseMediaType, capabilitiesOf as capabilitiesOf2 } from "@semiont/core";
17689
17725
  function getResourceIcon(mediaType) {
17690
17726
  if (!mediaType) return "\u{1F4C4}";
17691
- const baseType = mediaType.split(";")[0]?.trim().toLowerCase() || "";
17692
- if (baseType.startsWith("image/")) {
17693
- return "\u{1F5BC}\uFE0F";
17694
- }
17695
- switch (baseType) {
17727
+ const base2 = baseMediaType(mediaType);
17728
+ if (base2.startsWith("image/")) return "\u{1F5BC}\uFE0F";
17729
+ switch (base2) {
17696
17730
  case "text/markdown":
17697
17731
  return "\u{1F4DD}";
17698
17732
  case "text/html":
17699
17733
  return "\u{1F310}";
17700
- case "text/plain":
17701
- return "\u{1F4C4}";
17702
17734
  default:
17703
17735
  return "\u{1F4C4}";
17704
17736
  }
17705
17737
  }
17706
17738
  function supportsDetection(mediaType) {
17707
17739
  if (!mediaType) return false;
17708
- const baseType = mediaType.split(";")[0]?.trim().toLowerCase() || "";
17709
- return baseType.startsWith("text/");
17740
+ return capabilitiesOf2(mediaType)?.anchoring === "text-selector";
17710
17741
  }
17711
17742
 
17712
17743
  // src/lib/validation.ts
@@ -18462,11 +18493,9 @@ function useResourceContent(rUri, resource, enabled = true) {
18462
18493
  if (!semiont || !enabled || !mediaType) return;
18463
18494
  let cancelled = false;
18464
18495
  setLoading(true);
18465
- semiont.browse.resourceRepresentation(rUri, {
18466
- accept: mediaType
18467
- }).then(({ data: data2 }) => {
18496
+ semiont.browse.resourceRepresentation(rUri).then(({ data: data2, contentType }) => {
18468
18497
  if (cancelled) return;
18469
- setContent(decodeWithCharset(data2, mediaType));
18498
+ setContent(decodeWithCharset(data2, contentType));
18470
18499
  setLoading(false);
18471
18500
  }).catch((error) => {
18472
18501
  if (cancelled) return;
@@ -18947,7 +18976,8 @@ var baseTheme2 = /* @__PURE__ */ EditorView.baseTheme({
18947
18976
  content: '"\xB7\xB7\xB7"',
18948
18977
  opacity: 0.5,
18949
18978
  display: "block",
18950
- textAlign: "center"
18979
+ textAlign: "center",
18980
+ cursor: "pointer"
18951
18981
  },
18952
18982
  ".cm-tooltip.cm-completionInfo": {
18953
18983
  position: "absolute",
@@ -19070,6 +19100,8 @@ var Snippet = class _Snippet {
19070
19100
  for (let line of template.split(/\r\n?|\n/)) {
19071
19101
  while (m6 = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(line)) {
19072
19102
  let seq = m6[1] ? +m6[1] : null, rawName = m6[2] || m6[3] || "", found = -1;
19103
+ if (seq === 0)
19104
+ seq = 1e9;
19073
19105
  let name3 = rawName.replace(/\\[{}]/g, (m7) => m7[1]);
19074
19106
  for (let i12 = 0; i12 < fields.length; i12++) {
19075
19107
  if (seq != null ? fields[i12].seq == seq : name3 ? fields[i12].name == name3 : false)
@@ -19161,7 +19193,7 @@ var snippetState = /* @__PURE__ */ StateField.define({
19161
19193
  value = null;
19162
19194
  return value;
19163
19195
  },
19164
- provide: (f10) => EditorView.decorations.from(f10, (val) => val ? val.deco : Decoration.none)
19196
+ provide: (f11) => EditorView.decorations.from(f11, (val) => val ? val.deco : Decoration.none)
19165
19197
  });
19166
19198
  function fieldSelection(ranges, field) {
19167
19199
  return EditorSelection.create(ranges.filter((r14) => r14.field == field).map((r14) => EditorSelection.range(r14.from, r14.to)));
@@ -20795,10 +20827,10 @@ var InlineContext = class {
20795
20827
  }
20796
20828
  if (open.type.mark)
20797
20829
  content4.push(this.elt(open.type.mark, start2, open.to));
20798
- for (let k5 = j7 + 1; k5 < i12; k5++) {
20799
- if (this.parts[k5] instanceof Element2)
20800
- content4.push(this.parts[k5]);
20801
- this.parts[k5] = null;
20830
+ for (let k6 = j7 + 1; k6 < i12; k6++) {
20831
+ if (this.parts[k6] instanceof Element2)
20832
+ content4.push(this.parts[k6]);
20833
+ this.parts[k6] = null;
20802
20834
  }
20803
20835
  if (close.type.mark)
20804
20836
  content4.push(this.elt(close.type.mark, close.from, end));
@@ -21116,7 +21148,7 @@ var TableParser = class {
21116
21148
  let lineText;
21117
21149
  if ((line.next == 45 || line.next == 58 || line.next == 124) && delimiterLine.test(lineText = line.text.slice(line.pos))) {
21118
21150
  let firstRow = [], firstCount = parseRow(cx, leaf.content, 0, firstRow, leaf.start);
21119
- if (firstCount == parseRow(cx, lineText, line.pos))
21151
+ if (firstCount == parseRow(cx, lineText, 0))
21120
21152
  this.rows = [
21121
21153
  cx.elt("TableHeader", leaf.start, leaf.start + leaf.content.length, firstRow),
21122
21154
  cx.elt("TableDelimiter", cx.lineStart + line.pos, cx.lineStart + line.text.length)
@@ -21184,8 +21216,8 @@ var TaskList = {
21184
21216
  }]
21185
21217
  };
21186
21218
  var autolinkRE = /(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy;
21187
- var urlRE = /[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy;
21188
- var lastTwoDomainWords = /[\w-]+\.[\w-]+($|\/)/;
21219
+ var urlRE = /[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy;
21220
+ var lastTwoDomainWords = /[\w-]+\.[\w-]+($|[/:])/;
21189
21221
  var emailRE = /[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy;
21190
21222
  var xmppResourceRE = /\/[a-zA-Z\d@.]+/gy;
21191
21223
  function count(str, from, to, ch) {
@@ -21369,6 +21401,8 @@ var Stack = class _Stack {
21369
21401
  if (dPrec)
21370
21402
  this.score += dPrec;
21371
21403
  if (depth == 0) {
21404
+ if (type < parser6.minRepeatTerm && this.reducePos < this.pos)
21405
+ this.reducePos = this.pos;
21372
21406
  this.pushState(parser6.getGoto(this.state, type, true), this.reducePos);
21373
21407
  if (type < parser6.minRepeatTerm)
21374
21408
  this.storeNode(type, this.reducePos, this.reducePos, lookaheadRecord ? 8 : 4, true);
@@ -21376,7 +21410,10 @@ var Stack = class _Stack {
21376
21410
  return;
21377
21411
  }
21378
21412
  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, size = this.reducePos - start2;
21413
+ let start2 = base2 ? this.stack[base2 - 2] : this.p.ranges[0].from;
21414
+ if (type < parser6.minRepeatTerm && start2 == this.reducePos && this.reducePos < this.pos)
21415
+ this.reducePos = this.pos;
21416
+ let size = this.reducePos - start2;
21380
21417
  if (size >= 2e3 && !((_a2 = this.p.parser.nodeSet.types[type]) === null || _a2 === void 0 ? void 0 : _a2.isAnonymous)) {
21381
21418
  if (start2 == this.p.lastBigReductionStart) {
21382
21419
  this.p.bigReductionCount++;
@@ -21412,16 +21449,12 @@ var Stack = class _Stack {
21412
21449
  */
21413
21450
  storeNode(term, start2, end, size = 4, mustSink = false) {
21414
21451
  if (term == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
21415
- let cur = this, top2 = this.buffer.length;
21416
- if (top2 == 0 && cur.parent) {
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) {
21452
+ let top2 = this.buffer.length;
21453
+ if (top2 > 0 && this.buffer[top2 - 4] == 0 && this.buffer[top2 - 1] > -1) {
21421
21454
  if (start2 == end)
21422
21455
  return;
21423
- if (cur.buffer[top2 - 2] >= start2) {
21424
- cur.buffer[top2 - 2] = end;
21456
+ if (this.buffer[top2 - 2] >= start2) {
21457
+ this.buffer[top2 - 2] = end;
21425
21458
  return;
21426
21459
  }
21427
21460
  }
@@ -21525,6 +21558,8 @@ var Stack = class _Stack {
21525
21558
  split() {
21526
21559
  let parent = this;
21527
21560
  let off = parent.buffer.length;
21561
+ if (off && parent.buffer[off - 4] == 0)
21562
+ off -= 4;
21528
21563
  while (off > 0 && parent.buffer[off - 2] > parent.reducePos)
21529
21564
  off -= 4;
21530
21565
  let buffer = parent.buffer.slice(off), base2 = parent.bufferBase + off;
@@ -23410,12 +23445,12 @@ function configureNesting(tags3 = [], attributes = []) {
23410
23445
  }
23411
23446
 
23412
23447
  // ../../node_modules/@lezer/css/dist/index.js
23413
- var descendantOp = 122;
23448
+ var descendantOp = 135;
23414
23449
  var Unit = 1;
23415
- var identifier = 123;
23416
- var callee = 124;
23450
+ var identifier = 136;
23451
+ var callee = 137;
23417
23452
  var VariableName = 2;
23418
- var queryIdentifier = 125;
23453
+ var queryIdentifier = 138;
23419
23454
  var queryVariableName = 3;
23420
23455
  var QueryCallee = 4;
23421
23456
  var space2 = [
@@ -23493,10 +23528,12 @@ var identifierTokens = (id2, varName, callee2) => (input, stack) => {
23493
23528
  }
23494
23529
  };
23495
23530
  var identifiers = new ExternalTokenizer(
23496
- identifierTokens(identifier, VariableName, callee)
23531
+ identifierTokens(identifier, VariableName, callee),
23532
+ { contextual: true }
23497
23533
  );
23498
23534
  var queryIdentifiers = new ExternalTokenizer(
23499
- identifierTokens(queryIdentifier, queryVariableName, QueryCallee)
23535
+ identifierTokens(queryIdentifier, queryVariableName, QueryCallee),
23536
+ { contextual: true }
23500
23537
  );
23501
23538
  var descendant = new ExternalTokenizer((input) => {
23502
23539
  if (space2.includes(input.peek(-1))) {
@@ -23521,8 +23558,8 @@ var unitToken = new ExternalTokenizer((input) => {
23521
23558
  }
23522
23559
  });
23523
23560
  var cssHighlighting = styleTags({
23524
- "AtKeyword import charset namespace keyframes media supports": tags.definitionKeyword,
23525
- "from to selector": tags.keyword,
23561
+ "AtKeyword import charset namespace keyframes media supports font-feature-values": tags.definitionKeyword,
23562
+ "from to selector scope MatchFlag": tags.keyword,
23526
23563
  NamespaceName: tags.namespace,
23527
23564
  KeyframeName: tags.labelName,
23528
23565
  KeyframeRangeName: tags.operatorKeyword,
@@ -23535,7 +23572,7 @@ var cssHighlighting = styleTags({
23535
23572
  NumberLiteral: tags.number,
23536
23573
  KeywordQuery: tags.keyword,
23537
23574
  UnaryQueryOp: tags.operatorKeyword,
23538
- "CallTag ValueName": tags.atom,
23575
+ "CallTag ValueName FontName": tags.atom,
23539
23576
  VariableName: tags.variableName,
23540
23577
  Callee: tags.operatorKeyword,
23541
23578
  Unit: tags.unit,
@@ -23549,37 +23586,37 @@ var cssHighlighting = styleTags({
23549
23586
  "ParenthesizedContent StringLiteral": tags.string,
23550
23587
  ":": tags.punctuation,
23551
23588
  "PseudoOp #": tags.derefOperator,
23552
- "; ,": tags.separator,
23589
+ "; , |": tags.separator,
23553
23590
  "( )": tags.paren,
23554
23591
  "[ ]": tags.squareBracket,
23555
23592
  "{ }": tags.brace
23556
23593
  });
23557
- var spec_callee = { __proto__: null, lang: 38, "nth-child": 38, "nth-last-child": 38, "nth-of-type": 38, "nth-last-of-type": 38, dir: 38, "host-context": 38, if: 84, url: 124, "url-prefix": 124, domain: 124, regexp: 124 };
23558
- var spec_queryIdentifier = { __proto__: null, or: 98, and: 98, not: 106, only: 106, layer: 170 };
23559
- var spec_QueryCallee = { __proto__: null, selector: 112, layer: 166 };
23560
- var spec_AtKeyword = { __proto__: null, "@import": 162, "@media": 174, "@charset": 178, "@namespace": 182, "@keyframes": 188, "@supports": 200, "@scope": 204 };
23561
- var spec_identifier = { __proto__: null, to: 207 };
23594
+ 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 };
23595
+ var spec_queryIdentifier = { __proto__: null, or: 104, and: 104, not: 112, only: 112, layer: 186 };
23596
+ var spec_QueryCallee = { __proto__: null, selector: 118, layer: 182 };
23597
+ var spec_AtKeyword = { __proto__: null, "@import": 178, "@media": 190, "@charset": 194, "@namespace": 198, "@keyframes": 204, "@supports": 216, "@scope": 220, "@font-feature-values": 226 };
23598
+ var spec_identifier = { __proto__: null, to: 223 };
23562
23599
  var parser3 = LRParser.deserialize({
23563
23600
  version: 14,
23564
- states: "EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO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%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",
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: 143,
23601
+ 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+fQ`O'#ETO+kQ`O'#FnO+vQdO'#FnQOQ`OOP,QO&jO'#CaPOOO)CAR)CAROOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,]QdO,59YO'_QdO,5:`O'dQdO,5:bO'oQdO,5:iO'oQdO,5:kO'oQdO,5:lO'oQdO'#E}O,hQ`O,58}O,pQdO'#ESOOQS,58},58}OOQP'#Cq'#CqOOQO'#Dr'#DrOOQP,59Y,59YO,wQ`O,59YO,|Q`O,59YOOQP'#Du'#DuOOQP,5:`,5:`O-RQpO'#DwO-^QdO'#DxO-cQ`O'#DxO-hQpO,5:bO.RQa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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",
23604
+ 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",
23605
+ maxTerm: 159,
23569
23606
  nodeProps: [
23570
- ["isolate", -2, 5, 36, ""],
23571
- ["opened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<%lO%Q`I}P;=`<%l$q",
23578
- tokenizers: [descendant, unitToken, identifiers, queryIdentifiers, 1, 2, 3, 4, new LocalTokenGroup("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~", 28, 129)],
23579
- topRules: { "StyleSheet": [0, 6], "Styles": [1, 105] },
23580
- dynamicPrecedences: { "76": 1 },
23581
- specialized: [{ term: 124, get: (value) => spec_callee[value] || -1 }, { term: 125, get: (value) => spec_queryIdentifier[value] || -1 }, { term: 4, get: (value) => spec_QueryCallee[value] || -1 }, { term: 25, get: (value) => spec_AtKeyword[value] || -1 }, { term: 123, get: (value) => spec_identifier[value] || -1 }],
23582
- tokenPrec: 1963
23612
+ skippedNodes: [0, 5, 117],
23613
+ repeatNodeCount: 17,
23614
+ 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|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!e`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$Q~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW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{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",
23615
+ 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)],
23616
+ topRules: { "StyleSheet": [0, 6], "Styles": [1, 116] },
23617
+ dynamicPrecedences: { "84": 1 },
23618
+ 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 }],
23619
+ tokenPrec: 2256
23583
23620
  });
23584
23621
 
23585
23622
  // ../../node_modules/@codemirror/lang-css/dist/index.js
@@ -26200,9 +26237,10 @@ function getAnnotationTooltip(annotation) {
26200
26237
  }
26201
26238
  return "Annotation";
26202
26239
  }
26203
- function getAnnotationDecorationMeta(annotation, isNew) {
26240
+ function getAnnotationDecorationMeta(annotation, isNew, segment) {
26204
26241
  const baseClassName = Object.values(ANNOTATORS).find((a15) => a15.matchesAnnotation(annotation))?.className || "annotation-highlight";
26205
- const className = isNew ? `${baseClassName} annotation-sparkle` : baseClassName;
26242
+ const lowConfidenceClass = segment?.confidence && segment.confidence !== "high" ? " annotation-low-confidence" : "";
26243
+ const className = `${baseClassName}${isNew ? " annotation-sparkle" : ""}${lowConfidenceClass}`;
26206
26244
  const isHighlightAnn = isHighlight2(annotation);
26207
26245
  const isReferenceAnn = isReference2(annotation);
26208
26246
  const isCommentAnn = isComment2(annotation);
@@ -26214,11 +26252,15 @@ function getAnnotationDecorationMeta(annotation, isNew) {
26214
26252
  else if (isAssessmentAnn) annotationType = "assessment";
26215
26253
  else if (isTagAnn) annotationType = "tag";
26216
26254
  else if (isHighlightAnn) annotationType = "highlight";
26255
+ const baseTooltip = getAnnotationTooltip(annotation);
26256
+ const tooltip = segment?.strategy && segment.strategy !== "fast-path" && segment.strategy !== "unique-occurrence" ? `${baseTooltip} (anchored: ${segment.strategy})` : baseTooltip;
26217
26257
  return {
26218
26258
  className,
26219
26259
  annotationType,
26220
26260
  annotationId: annotation.id,
26221
- tooltip: getAnnotationTooltip(annotation)
26261
+ tooltip,
26262
+ ...segment?.strategy !== void 0 ? { strategy: segment.strategy } : {},
26263
+ ...segment?.confidence !== void 0 ? { confidence: segment.confidence } : {}
26222
26264
  };
26223
26265
  }
26224
26266
  function computeAnnotationDecorations(segments, newAnnotationIds) {
@@ -26228,7 +26270,10 @@ function computeAnnotationDecorations(segments, newAnnotationIds) {
26228
26270
  return {
26229
26271
  start: segment.start,
26230
26272
  end: segment.end,
26231
- meta: getAnnotationDecorationMeta(annotation, isNew)
26273
+ meta: getAnnotationDecorationMeta(annotation, isNew, {
26274
+ ...segment.strategy !== void 0 ? { strategy: segment.strategy } : {},
26275
+ ...segment.confidence !== void 0 ? { confidence: segment.confidence } : {}
26276
+ })
26232
26277
  };
26233
26278
  });
26234
26279
  }
@@ -26333,6 +26378,8 @@ function buildAnnotationDecorations(segments, newAnnotationIds) {
26333
26378
  attributes: {
26334
26379
  "data-annotation-id": meta2.annotationId,
26335
26380
  "data-annotation-type": meta2.annotationType,
26381
+ ...meta2.strategy ? { "data-anchor-strategy": meta2.strategy } : {},
26382
+ ...meta2.confidence ? { "data-anchor-confidence": meta2.confidence } : {},
26336
26383
  title: meta2.tooltip
26337
26384
  }
26338
26385
  });
@@ -26720,15 +26767,13 @@ var ErrorBoundary = class extends Component {
26720
26767
  super(props);
26721
26768
  this.state = {
26722
26769
  hasError: false,
26723
- error: null,
26724
- errorInfo: null
26770
+ error: null
26725
26771
  };
26726
26772
  }
26727
26773
  static getDerivedStateFromError(error) {
26728
26774
  return {
26729
26775
  hasError: true,
26730
- error,
26731
- errorInfo: null
26776
+ error
26732
26777
  };
26733
26778
  }
26734
26779
  componentDidCatch(error, errorInfo) {
@@ -26738,15 +26783,11 @@ var ErrorBoundary = class extends Component {
26738
26783
  if (this.props.onError) {
26739
26784
  this.props.onError(error, errorInfo);
26740
26785
  }
26741
- this.setState({
26742
- errorInfo
26743
- });
26744
26786
  }
26745
26787
  handleReset = () => {
26746
26788
  this.setState({
26747
26789
  hasError: false,
26748
- error: null,
26749
- errorInfo: null
26790
+ error: null
26750
26791
  });
26751
26792
  };
26752
26793
  render() {
@@ -26838,25 +26879,29 @@ function ProtectedErrorBoundary({
26838
26879
  );
26839
26880
  }
26840
26881
  function ProtectedErrorFallback({ error, resetErrorBoundary }) {
26841
- 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
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3 mb-4", children: [
26843
- /* @__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" }) }) }),
26844
- /* @__PURE__ */ jsx9("h2", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: "Something went wrong" })
26882
+ const message = error instanceof Error ? error.message : String(error);
26883
+ const stack = error instanceof Error ? error.stack : void 0;
26884
+ return /* @__PURE__ */ jsx9("div", { className: "semiont-protected-error-boundary-container", children: /* @__PURE__ */ jsxs4("div", { className: "semiont-protected-error-boundary-card", children: [
26885
+ /* @__PURE__ */ jsxs4("div", { className: "semiont-protected-error-boundary-header", children: [
26886
+ /* @__PURE__ */ jsx9("div", { className: "semiont-protected-error-boundary-icon-wrapper", children: /* @__PURE__ */ jsx9("svg", { className: "semiont-protected-error-boundary-icon", 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" }) }) }),
26887
+ /* @__PURE__ */ jsx9("h2", { className: "semiont-protected-error-boundary-title", children: "Something went wrong" })
26845
26888
  ] }),
26846
- /* @__PURE__ */ jsx9("p", { className: "text-gray-600 dark:text-gray-300 mb-6", children: "An unexpected error occurred. Try again, or refresh the page." }),
26847
- process.env.NODE_ENV === "development" && /* @__PURE__ */ jsxs4("details", { className: "mb-4", children: [
26848
- /* @__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
- /* @__PURE__ */ jsxs4("pre", { className: "mt-2 text-xs bg-gray-100 dark:bg-gray-900 p-2 rounded-sm overflow-auto", children: [
26850
- error.message,
26851
- error.stack
26889
+ /* @__PURE__ */ jsx9("p", { className: "semiont-protected-error-boundary-message", children: "An unexpected error occurred. Try again, or refresh the page." }),
26890
+ process.env.NODE_ENV === "development" && /* @__PURE__ */ jsxs4("details", { className: "semiont-protected-error-boundary-details", children: [
26891
+ /* @__PURE__ */ jsx9("summary", { className: "semiont-protected-error-boundary-summary", children: "Error details (development only)" }),
26892
+ /* @__PURE__ */ jsxs4("pre", { className: "semiont-protected-error-boundary-stack", children: [
26893
+ message,
26894
+ stack
26852
26895
  ] })
26853
26896
  ] }),
26854
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-3", children: [
26897
+ /* @__PURE__ */ jsxs4("div", { className: "semiont-protected-error-boundary-actions", children: [
26855
26898
  /* @__PURE__ */ jsx9(
26856
26899
  "button",
26857
26900
  {
26858
26901
  onClick: resetErrorBoundary,
26859
- className: "flex-1 px-4 py-2 text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",
26902
+ className: "semiont-button",
26903
+ "data-variant": "secondary",
26904
+ "data-size": "md",
26860
26905
  children: "Try Again"
26861
26906
  }
26862
26907
  ),
@@ -26864,7 +26909,9 @@ function ProtectedErrorFallback({ error, resetErrorBoundary }) {
26864
26909
  "button",
26865
26910
  {
26866
26911
  onClick: () => window.location.reload(),
26867
- className: "flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",
26912
+ className: "semiont-button",
26913
+ "data-variant": "primary",
26914
+ "data-size": "md",
26868
26915
  children: "Refresh Page"
26869
26916
  }
26870
26917
  )
@@ -27827,16 +27874,16 @@ function JsonLdView({ annotation, onBack }) {
27827
27874
 
27828
27875
  // ../../node_modules/clsx/dist/clsx.mjs
27829
27876
  function r(e6) {
27830
- var t12, f10, n12 = "";
27877
+ var t12, f11, n12 = "";
27831
27878
  if ("string" == typeof e6 || "number" == typeof e6) n12 += e6;
27832
27879
  else if ("object" == typeof e6) if (Array.isArray(e6)) {
27833
27880
  var o12 = e6.length;
27834
- for (t12 = 0; t12 < o12; t12++) e6[t12] && (f10 = r(e6[t12])) && (n12 && (n12 += " "), n12 += f10);
27835
- } else for (f10 in e6) e6[f10] && (n12 && (n12 += " "), n12 += f10);
27881
+ for (t12 = 0; t12 < o12; t12++) e6[t12] && (f11 = r(e6[t12])) && (n12 && (n12 += " "), n12 += f11);
27882
+ } else for (f11 in e6) e6[f11] && (n12 && (n12 += " "), n12 += f11);
27836
27883
  return n12;
27837
27884
  }
27838
27885
  function clsx() {
27839
- for (var e6, t12, f10 = 0, n12 = "", o12 = arguments.length; f10 < o12; f10++) (e6 = arguments[f10]) && (t12 = r(e6)) && (n12 && (n12 += " "), n12 += t12);
27886
+ for (var e6, t12, f11 = 0, n12 = "", o12 = arguments.length; f11 < o12; f11++) (e6 = arguments[f11]) && (t12 = r(e6)) && (n12 && (n12 += " "), n12 += t12);
27840
27887
  return n12;
27841
27888
  }
27842
27889
 
@@ -27988,7 +28035,7 @@ function a2() {
27988
28035
  }
27989
28036
 
27990
28037
  // ../../node_modules/@headlessui/react/dist/utils/render.js
27991
- import E, { Fragment as j, cloneElement as v, createElement as S2, forwardRef as w, isValidElement as k, useCallback as x, useRef as M } from "react";
28038
+ 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
28039
 
27993
28040
  // ../../node_modules/@headlessui/react/dist/utils/class-names.js
27994
28041
  function t5(...r14) {
@@ -28007,33 +28054,33 @@ function u(r14, n12, ...a15) {
28007
28054
 
28008
28055
  // ../../node_modules/@headlessui/react/dist/utils/render.js
28009
28056
  var A = ((a15) => (a15[a15.None = 0] = "None", a15[a15.RenderStrategy = 1] = "RenderStrategy", a15[a15.Static = 2] = "Static", a15))(A || {});
28010
- var C2 = ((e6) => (e6[e6.Unmount = 0] = "Unmount", e6[e6.Hidden = 1] = "Hidden", e6))(C2 || {});
28057
+ var C2 = ((t12) => (t12[t12.Unmount = 0] = "Unmount", t12[t12.Hidden = 1] = "Hidden", t12))(C2 || {});
28011
28058
  function K() {
28012
- let n12 = $();
28013
- return x((r14) => U({ mergeRefs: n12, ...r14 }), [n12]);
28014
- }
28015
- function U({ ourProps: n12, theirProps: r14, slot: e6, defaultTag: a15, features: s11, visible: t12 = true, name: l10, mergeRefs: i12 }) {
28016
- i12 = i12 != null ? i12 : I;
28017
- let o12 = P(r14, n12);
28018
- if (t12) return F(o12, e6, a15, l10, i12);
28019
- let y4 = s11 != null ? s11 : 0;
28059
+ let e6 = I();
28060
+ return x((r14) => U({ mergeRefs: e6, ...r14 }), [e6]);
28061
+ }
28062
+ function U({ ourProps: e6, theirProps: r14, slot: t12, defaultTag: a15, features: o12, visible: n12 = true, name: i12, mergeRefs: l10 }) {
28063
+ l10 = l10 != null ? l10 : H;
28064
+ let s11 = P(r14, e6);
28065
+ if (n12) return F(s11, t12, a15, i12, l10);
28066
+ let y4 = o12 != null ? o12 : 0;
28020
28067
  if (y4 & 2) {
28021
- let { static: f10 = false, ...u12 } = o12;
28022
- if (f10) return F(u12, e6, a15, l10, i12);
28068
+ let { static: f11 = false, ...u12 } = s11;
28069
+ if (f11) return F(u12, t12, a15, i12, l10);
28023
28070
  }
28024
28071
  if (y4 & 1) {
28025
- let { unmount: f10 = true, ...u12 } = o12;
28026
- return u(f10 ? 0 : 1, { [0]() {
28072
+ let { unmount: f11 = true, ...u12 } = s11;
28073
+ return u(f11 ? 0 : 1, { [0]() {
28027
28074
  return null;
28028
28075
  }, [1]() {
28029
- return F({ ...u12, hidden: true, style: { display: "none" } }, e6, a15, l10, i12);
28076
+ return F({ ...u12, hidden: true, style: { display: "none" } }, t12, a15, i12, l10);
28030
28077
  } });
28031
28078
  }
28032
- return F(o12, e6, a15, l10, i12);
28079
+ return F(s11, t12, a15, i12, l10);
28033
28080
  }
28034
- function F(n12, r14 = {}, e6, a15, s11) {
28035
- let { as: t12 = e6, children: l10, refName: i12 = "ref", ...o12 } = h(n12, ["unmount", "static"]), y4 = n12.ref !== void 0 ? { [i12]: n12.ref } : {}, f10 = typeof l10 == "function" ? l10(r14) : l10;
28036
- "className" in o12 && o12.className && typeof o12.className == "function" && (o12.className = o12.className(r14)), o12["aria-labelledby"] && o12["aria-labelledby"] === o12.id && (o12["aria-labelledby"] = void 0);
28081
+ function F(e6, r14 = {}, t12, a15, o12) {
28082
+ 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;
28083
+ 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
28084
  let u12 = {};
28038
28085
  if (r14) {
28039
28086
  let d8 = false, p6 = [];
@@ -28043,72 +28090,79 @@ function F(n12, r14 = {}, e6, a15, s11) {
28043
28090
  for (let c12 of p6) u12[`data-${c12}`] = "";
28044
28091
  }
28045
28092
  }
28046
- if (b(t12) && (Object.keys(m(o12)).length > 0 || Object.keys(m(u12)).length > 0)) if (!k(f10) || Array.isArray(f10) && f10.length > 1 || D(f10)) {
28047
- if (Object.keys(m(o12)).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(o12)).concat(Object.keys(m(u12))).map((d8) => ` - ${d8}`).join(`
28093
+ 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)) {
28094
+ 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
28095
  `), "", "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
28096
  `)].join(`
28050
28097
  `));
28051
28098
  } else {
28052
- let d8 = f10.props, p6 = d8 == null ? void 0 : d8.className, c12 = typeof p6 == "function" ? (...R2) => t5(p6(...R2), o12.className) : t5(p6, o12.className), T7 = c12 ? { className: c12 } : {}, g2 = P(f10.props, m(h(o12, ["ref"])));
28099
+ 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
28100
  for (let R2 in u12) R2 in g2 && delete u12[R2];
28054
- return v(f10, Object.assign({}, g2, u12, y4, { ref: s11(H(f10), y4.ref) }, T7));
28101
+ return j(f11, Object.assign({}, g2, u12, y4, { ref: o12(D(f11), y4.ref) }, T7));
28055
28102
  }
28056
- return S2(t12, Object.assign({}, h(o12, ["ref"]), !b(t12) && y4, !b(t12) && u12), f10);
28103
+ return w(n12, Object.assign({}, h(s11, ["ref"]), !b(n12) && y4, !b(n12) && u12), f11);
28057
28104
  }
28058
- function $() {
28059
- let n12 = M([]), r14 = x((e6) => {
28060
- for (let a15 of n12.current) a15 != null && (typeof a15 == "function" ? a15(e6) : a15.current = e6);
28105
+ function I() {
28106
+ let e6 = O([]), r14 = x((t12) => {
28107
+ for (let a15 of e6.current) a15 != null && (typeof a15 == "function" ? a15(t12) : a15.current = t12);
28061
28108
  }, []);
28062
- return (...e6) => {
28063
- if (!e6.every((a15) => a15 == null)) return n12.current = e6, r14;
28109
+ return (...t12) => {
28110
+ if (!t12.every((a15) => a15 == null)) return e6.current = t12, r14;
28064
28111
  };
28065
28112
  }
28066
- function I(...n12) {
28067
- return n12.every((r14) => r14 == null) ? void 0 : (r14) => {
28068
- for (let e6 of n12) e6 != null && (typeof e6 == "function" ? e6(r14) : e6.current = r14);
28113
+ function H(...e6) {
28114
+ return e6.every((r14) => r14 == null) ? void 0 : (r14) => {
28115
+ for (let t12 of e6) t12 != null && (typeof t12 == "function" ? t12(r14) : t12.current = r14);
28069
28116
  };
28070
28117
  }
28071
- function P(...n12) {
28118
+ function P(...e6) {
28072
28119
  var a15;
28073
- if (n12.length === 0) return {};
28074
- if (n12.length === 1) return n12[0];
28075
- let r14 = {}, e6 = {};
28076
- for (let s11 of n12) for (let t12 in s11) t12.startsWith("on") && typeof s11[t12] == "function" ? ((a15 = e6[t12]) != null || (e6[t12] = []), e6[t12].push(s11[t12])) : r14[t12] = s11[t12];
28077
- if (r14.disabled || r14["aria-disabled"]) for (let s11 in e6) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(s11) && (e6[s11] = [(t12) => {
28078
- var l10;
28079
- return (l10 = t12 == null ? void 0 : t12.preventDefault) == null ? void 0 : l10.call(t12);
28120
+ if (e6.length === 0) return {};
28121
+ if (e6.length === 1) return e6[0];
28122
+ let r14 = {}, t12 = {};
28123
+ 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];
28124
+ if (r14.disabled || r14["aria-disabled"]) for (let o12 in t12) /^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o12) && (t12[o12] = [(n12) => {
28125
+ var i12;
28126
+ return (i12 = n12 == null ? void 0 : n12.preventDefault) == null ? void 0 : i12.call(n12);
28080
28127
  }]);
28081
- for (let s11 in e6) Object.assign(r14, { [s11](t12, ...l10) {
28082
- let i12 = e6[s11];
28083
- for (let o12 of i12) {
28084
- if ((t12 instanceof Event || (t12 == null ? void 0 : t12.nativeEvent) instanceof Event) && t12.defaultPrevented) return;
28085
- o12(t12, ...l10);
28128
+ for (let o12 in t12) Object.assign(r14, { [o12](n12, ...i12) {
28129
+ let l10 = t12[o12];
28130
+ for (let s11 of l10) {
28131
+ if ((n12 instanceof Event || (n12 == null ? void 0 : n12.nativeEvent) instanceof Event) && n12.defaultPrevented) return;
28132
+ s11(n12, ...i12);
28086
28133
  }
28087
28134
  } });
28088
28135
  return r14;
28089
28136
  }
28090
- function Y(n12) {
28137
+ function Y(e6) {
28091
28138
  var r14;
28092
- return Object.assign(w(n12), { displayName: (r14 = n12.displayName) != null ? r14 : n12.name });
28139
+ return Object.assign(k(e6), { displayName: (r14 = e6.displayName) != null ? r14 : e6.name });
28093
28140
  }
28094
- function m(n12) {
28095
- let r14 = Object.assign({}, n12);
28096
- for (let e6 in r14) r14[e6] === void 0 && delete r14[e6];
28141
+ function m(e6) {
28142
+ let r14 = Object.assign({}, e6);
28143
+ for (let t12 in r14) r14[t12] === void 0 && delete r14[t12];
28097
28144
  return r14;
28098
28145
  }
28099
- function h(n12, r14 = []) {
28100
- let e6 = Object.assign({}, n12);
28101
- for (let a15 of r14) a15 in e6 && delete e6[a15];
28102
- return e6;
28146
+ function h(e6, r14 = []) {
28147
+ let t12 = Object.assign({}, e6);
28148
+ for (let a15 of r14) a15 in t12 && delete t12[a15];
28149
+ return t12;
28150
+ }
28151
+ function D(e6) {
28152
+ return v.version.split(".")[0] >= "19" ? e6.props.ref : e6.ref;
28103
28153
  }
28104
- function H(n12) {
28105
- return E.version.split(".")[0] >= "19" ? n12.props.ref : n12.ref;
28154
+ function E(e6) {
28155
+ if (e6 != null && e6.$$typeof === /* @__PURE__ */ Symbol.for("react.lazy")) {
28156
+ let r14 = e6._payload;
28157
+ if (r14 != null && r14.status === "fulfilled") return E(r14.value);
28158
+ }
28159
+ return e6;
28106
28160
  }
28107
- function b(n12) {
28108
- return n12 === j || n12 === /* @__PURE__ */ Symbol.for("react.fragment");
28161
+ function b(e6) {
28162
+ return e6 === S2 || e6 === /* @__PURE__ */ Symbol.for("react.fragment");
28109
28163
  }
28110
- function D(n12) {
28111
- return b(n12.type);
28164
+ function L(e6) {
28165
+ return b(e6.type);
28112
28166
  }
28113
28167
 
28114
28168
  // ../../node_modules/@headlessui/react/dist/hooks/use-id.js
@@ -28418,7 +28472,7 @@ var E2 = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "butt
28418
28472
  var S5 = ["[data-autofocus]"].map((e6) => `${e6}:not([tabindex='-1'])`).join(",");
28419
28473
  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
28474
  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 O = ((t12) => (t12[t12.Previous = -1] = "Previous", t12[t12.Next = 1] = "Next", t12))(O || {});
28475
+ var O2 = ((t12) => (t12[t12.Previous = -1] = "Previous", t12[t12.Next = 1] = "Next", t12))(O2 || {});
28422
28476
  function x3(e6 = document.body) {
28423
28477
  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
28478
  }
@@ -28468,7 +28522,7 @@ function v3(e6, r14, { sorted: t12 = true, relativeTo: l10 = null, skipElements:
28468
28522
  if (r14 & 5) return 1;
28469
28523
  if (r14 & 10) return -1;
28470
28524
  throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
28471
- })(), M7 = (() => {
28525
+ })(), M6 = (() => {
28472
28526
  if (r14 & 1) return 0;
28473
28527
  if (r14 & 2) return Math.max(0, u12.indexOf(l10)) - 1;
28474
28528
  if (r14 & 4) return Math.max(0, u12.indexOf(l10)) + 1;
@@ -28477,7 +28531,7 @@ function v3(e6, r14, { sorted: t12 = true, relativeTo: l10 = null, skipElements:
28477
28531
  })(), N2 = r14 & 32 ? { preventScroll: true } : {}, m6 = 0, c12 = u12.length, s11;
28478
28532
  do {
28479
28533
  if (m6 >= c12 || m6 + c12 <= 0) return 0;
28480
- let i12 = M7 + m6;
28534
+ let i12 = M6 + m6;
28481
28535
  if (r14 & 16) i12 = (i12 + c12) % c12;
28482
28536
  else {
28483
28537
  if (i12 < 0) return 3;
@@ -28527,17 +28581,17 @@ function s6(t12, e6, o12, n12) {
28527
28581
 
28528
28582
  // ../../node_modules/@headlessui/react/dist/hooks/use-outside-click.js
28529
28583
  var C5 = 30;
28530
- function k3(o12, f10, h6) {
28584
+ function k3(o12, f11, h6) {
28531
28585
  let m6 = s3(h6), s11 = T5(function(e6, c12) {
28532
28586
  if (e6.defaultPrevented) return;
28533
28587
  let r14 = c12(e6);
28534
28588
  if (r14 === null || !r14.getRootNode().contains(r14) || !r14.isConnected) return;
28535
- let M7 = (function u12(n12) {
28589
+ let M6 = (function u12(n12) {
28536
28590
  return typeof n12 == "function" ? u12(n12()) : Array.isArray(n12) || n12 instanceof Set ? n12 : [n12];
28537
- })(f10);
28538
- for (let u12 of M7) if (u12 !== null && (u12.contains(r14) || e6.composed && e6.composedPath().includes(u12))) return;
28591
+ })(f11);
28592
+ for (let u12 of M6) if (u12 !== null && (u12.contains(r14) || e6.composed && e6.composedPath().includes(u12))) return;
28539
28593
  return !H3(r14, I4.Loose) && r14.tabIndex !== -1 && e6.preventDefault(), m6.current(e6, r14);
28540
- }, [m6, f10]), i12 = E3(null);
28594
+ }, [m6, f11]), i12 = E3(null);
28541
28595
  i8(o12, "pointerdown", (t12) => {
28542
28596
  var e6, c12;
28543
28597
  n8() || (i12.current = ((c12 = (e6 = t12.composedPath) == null ? void 0 : e6.call(t12)) == null ? void 0 : c12[0]) || t12.target);
@@ -28624,8 +28678,8 @@ function w3() {
28624
28678
  if (i3(t12.target)) try {
28625
28679
  let e6 = t12.target.closest("a");
28626
28680
  if (!e6) return;
28627
- let { hash: n12 } = new URL(e6.href), f10 = o12.querySelector(n12);
28628
- i3(f10) && !a15(f10) && (l10 = f10);
28681
+ let { hash: n12 } = new URL(e6.href), f11 = o12.querySelector(n12);
28682
+ i3(f11) && !a15(f11) && (l10 = f11);
28629
28683
  } catch {
28630
28684
  }
28631
28685
  }, true), r14.group((t12) => {
@@ -28695,7 +28749,7 @@ c4.subscribe(() => {
28695
28749
 
28696
28750
  // ../../node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js
28697
28751
  function a11(r14, e6, n12 = () => ({ containers: [] })) {
28698
- let f10 = o10(c4), o12 = e6 ? f10.get(e6) : void 0, i12 = o12 ? o12.count > 0 : false;
28752
+ let f11 = o10(c4), o12 = e6 ? f11.get(e6) : void 0, i12 = o12 ? o12.count > 0 : false;
28699
28753
  return n(() => {
28700
28754
  if (!(!e6 || !r14)) return c4.dispatch("PUSH", e6, n12), () => c4.dispatch("POP", e6, n12);
28701
28755
  }, [r14, e6]), i12;
@@ -28734,7 +28788,7 @@ function x4(e6) {
28734
28788
  return r14;
28735
28789
  }
28736
28790
  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), f10 = c6(false), E6 = p();
28791
+ 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
28792
  return n(() => {
28739
28793
  var d8;
28740
28794
  if (e6) {
@@ -28743,12 +28797,12 @@ function N(e6, r14, t12, n12) {
28743
28797
  return;
28744
28798
  }
28745
28799
  return (d8 = n12 == null ? void 0 : n12.start) == null || d8.call(n12, t12), C6(r14, { inFlight: u12, prepare() {
28746
- f10.current ? f10.current = false : f10.current = u12.current, u12.current = true, !f10.current && (t12 ? (o12(3), l10(4)) : (o12(4), l10(2)));
28800
+ f11.current ? f11.current = false : f11.current = u12.current, u12.current = true, !f11.current && (t12 ? (o12(3), l10(4)) : (o12(4), l10(2)));
28747
28801
  }, run() {
28748
- f10.current ? t12 ? (l10(3), o12(4)) : (l10(4), o12(3)) : t12 ? l10(1) : o12(1);
28802
+ f11.current ? t12 ? (l10(3), o12(4)) : (l10(4), o12(3)) : t12 ? l10(1) : o12(1);
28749
28803
  }, done() {
28750
28804
  var p6;
28751
- f10.current && D3(r14) || (u12.current = false, l10(7), t12 || a15(false), (p6 = n12 == null ? void 0 : n12.end) == null || p6.call(n12, t12));
28805
+ 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
28806
  } });
28753
28807
  }
28754
28808
  }, [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 +28889,8 @@ t9(() => {
28835
28889
  });
28836
28890
 
28837
28891
  // ../../node_modules/@headlessui/react/dist/components/portal/portal.js
28838
- import i10, { Fragment as R, createContext as E5, useContext as P3, useEffect as A4, useMemo as G2, useRef as x5, useState as M4 } from "react";
28839
- import { createPortal as b5 } from "react-dom";
28892
+ 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";
28893
+ import { createPortal as H4 } from "react-dom";
28840
28894
 
28841
28895
  // ../../node_modules/@headlessui/react/dist/hooks/use-on-unmount.js
28842
28896
  import { useEffect as u10, useRef as n11 } from "react";
@@ -28849,19 +28903,33 @@ function c8(t12) {
28849
28903
  }), [r14]);
28850
28904
  }
28851
28905
 
28906
+ // ../../node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js
28907
+ import * as t10 from "react";
28908
+ function s9() {
28909
+ let r14 = typeof document == "undefined";
28910
+ return "useSyncExternalStore" in t10 ? ((o12) => o12.useSyncExternalStore)(t10)(() => () => {
28911
+ }, () => false, () => !r14) : false;
28912
+ }
28913
+ function l7() {
28914
+ let r14 = s9(), [e6, n12] = t10.useState(s.isHandoffComplete);
28915
+ return e6 && s.isHandoffComplete === false && n12(false), t10.useEffect(() => {
28916
+ e6 !== true && n12(true);
28917
+ }, [e6]), t10.useEffect(() => s.handoff(), []), r14 ? false : e6;
28918
+ }
28919
+
28852
28920
  // ../../node_modules/@headlessui/react/dist/internal/portal-force-root.js
28853
- import t10, { createContext as r12, useContext as c9 } from "react";
28921
+ import t11, { createContext as r12, useContext as c9 } from "react";
28854
28922
  var e5 = r12(false);
28855
28923
  function a12() {
28856
28924
  return c9(e5);
28857
28925
  }
28858
- function l7(o12) {
28859
- return t10.createElement(e5.Provider, { value: o12.force }, o12.children);
28926
+ function l8(o12) {
28927
+ return t11.createElement(e5.Provider, { value: o12.force }, o12.children);
28860
28928
  }
28861
28929
 
28862
28930
  // ../../node_modules/@headlessui/react/dist/components/portal/portal.js
28863
- function W(e6) {
28864
- let o12 = a12(), l10 = P3(c10), [r14, p6] = M4(() => {
28931
+ function j4(e6) {
28932
+ let o12 = a12(), l10 = f8(c10), [r14, p6] = b5(() => {
28865
28933
  var s11;
28866
28934
  if (!o12 && l10 !== null) return (s11 = l10.current) != null ? s11 : null;
28867
28935
  if (s.isServer) return null;
@@ -28878,30 +28946,30 @@ function W(e6) {
28878
28946
  }, [l10, p6, o12]), r14;
28879
28947
  }
28880
28948
  var _3 = R;
28881
- var j4 = Y(function(o12, l10) {
28949
+ var I5 = Y(function(o12, l10) {
28882
28950
  let { ownerDocument: r14 = null, ...p6 } = o12, t12 = x5(null), n12 = y(T((a15) => {
28883
28951
  t12.current = a15;
28884
- }), l10), s11 = u8(t12.current), C7 = r14 != null ? r14 : s11, u12 = W(C7), y4 = P3(m5), g2 = p(), v4 = K();
28952
+ }), l10), s11 = u8(t12.current), C7 = r14 != null ? r14 : s11, u12 = j4(C7), y4 = f8(m5), g2 = p(), v4 = l7(), M6 = K();
28885
28953
  return c8(() => {
28886
28954
  var a15;
28887
28955
  u12 && u12.childNodes.length <= 0 && ((a15 = u12.parentElement) == null || a15.removeChild(u12));
28888
- }), u12 ? b5(i10.createElement("div", { "data-headlessui-portal": "", ref: (a15) => {
28956
+ }), !u12 || !v4 ? null : H4(i10.createElement("div", { "data-headlessui-portal": "", ref: (a15) => {
28889
28957
  g2.dispose(), y4 && a15 && g2.add(y4.register(a15));
28890
- } }, v4({ ourProps: { ref: n12 }, theirProps: p6, slot: {}, defaultTag: _3, name: "Portal" })), u12) : null;
28958
+ } }, M6({ ourProps: { ref: n12 }, theirProps: p6, slot: {}, defaultTag: _3, name: "Portal" })), u12);
28891
28959
  });
28892
- function S7(e6, o12) {
28960
+ function D4(e6, o12) {
28893
28961
  let l10 = y(o12), { enabled: r14 = true, ownerDocument: p6, ...t12 } = e6, n12 = K();
28894
- return r14 ? i10.createElement(j4, { ...t12, ownerDocument: p6, ref: l10 }) : n12({ ourProps: { ref: l10 }, theirProps: t12, slot: {}, defaultTag: _3, name: "Portal" });
28962
+ return r14 ? i10.createElement(I5, { ...t12, ownerDocument: p6, ref: l10 }) : n12({ ourProps: { ref: l10 }, theirProps: t12, slot: {}, defaultTag: _3, name: "Portal" });
28895
28963
  }
28896
- var I5 = R;
28964
+ var J = R;
28897
28965
  var c10 = E5(null);
28898
- function D4(e6, o12) {
28966
+ function X(e6, o12) {
28899
28967
  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: I5, name: "Popover.Group" }));
28968
+ return i10.createElement(c10.Provider, { value: l10 }, n12({ ourProps: t12, theirProps: r14, defaultTag: J, name: "Popover.Group" }));
28901
28969
  }
28902
28970
  var m5 = E5(null);
28903
- function ee() {
28904
- let e6 = P3(m5), o12 = x5([]), l10 = o4((t12) => (o12.current.push(t12), e6 && e6.register(t12), () => r14(t12))), r14 = o4((t12) => {
28971
+ function oe() {
28972
+ let e6 = f8(m5), o12 = x5([]), l10 = o4((t12) => (o12.current.push(t12), e6 && e6.register(t12), () => r14(t12))), r14 = o4((t12) => {
28905
28973
  let n12 = o12.current.indexOf(t12);
28906
28974
  n12 !== -1 && o12.current.splice(n12, 1), e6 && e6.unregister(t12);
28907
28975
  }), p6 = G2(() => ({ register: l10, unregister: r14, portals: o12 }), [l10, r14, o12]);
@@ -28909,12 +28977,12 @@ function ee() {
28909
28977
  return i10.createElement(m5.Provider, { value: p6 }, n12);
28910
28978
  }, [p6])];
28911
28979
  }
28912
- var J = Y(S7);
28913
- var X = Y(D4);
28914
- var te = Object.assign(J, { Group: X });
28980
+ var k4 = Y(D4);
28981
+ var B = Y(X);
28982
+ var le = Object.assign(k4, { Group: B });
28915
28983
 
28916
28984
  // ../../node_modules/@headlessui/react/dist/components/dialog/dialog.js
28917
- import l9, { Fragment as $3, 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";
28985
+ 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
28986
 
28919
28987
  // ../../node_modules/@headlessui/react/dist/hooks/use-escape.js
28920
28988
  function a13(o12, r14 = typeof document != "undefined" ? document.defaultView : null, t12) {
@@ -28926,7 +28994,7 @@ function a13(o12, r14 = typeof document != "undefined" ? document.defaultView :
28926
28994
 
28927
28995
  // ../../node_modules/@headlessui/react/dist/hooks/use-is-touch-device.js
28928
28996
  import { useState as i11 } from "react";
28929
- function f8() {
28997
+ function f9() {
28930
28998
  var t12;
28931
28999
  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
29000
  return n(() => {
@@ -28939,8 +29007,8 @@ function f8() {
28939
29007
  }
28940
29008
 
28941
29009
  // ../../node_modules/@headlessui/react/dist/hooks/use-root-containers.js
28942
- import s9, { createContext as h5, useContext as b6, useState as p5 } from "react";
28943
- function S8({ defaultContainers: l10 = [], portals: n12, mainTreeNode: o12 } = {}) {
29010
+ import s10, { createContext as h5, useContext as b6, useState as p5 } from "react";
29011
+ function S7({ defaultContainers: l10 = [], portals: n12, mainTreeNode: o12 } = {}) {
28944
29012
  let c12 = o4(() => {
28945
29013
  var r14, u12;
28946
29014
  let i12 = l(o12), t12 = [];
@@ -28954,7 +29022,7 @@ function S8({ defaultContainers: l10 = [], portals: n12, mainTreeNode: o12 } = {
28954
29022
  var d7 = h5(null);
28955
29023
  function j5({ children: l10, node: n12 }) {
28956
29024
  let [o12, c12] = p5(null), i12 = x6(n12 != null ? n12 : o12);
28957
- return s9.createElement(d7.Provider, { value: i12 }, l10, i12 === null && s9.createElement(f2, { features: s4.Hidden, ref: (t12) => {
29025
+ return s10.createElement(d7.Provider, { value: i12 }, l10, i12 === null && s10.createElement(f2, { features: s4.Hidden, ref: (t12) => {
28958
29026
  var r14, u12;
28959
29027
  if (t12) {
28960
29028
  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 +29037,12 @@ function x6(l10 = null) {
28969
29037
  return (n12 = b6(d7)) != null ? n12 : l10;
28970
29038
  }
28971
29039
 
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
29040
  // ../../node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js
28987
- import F2, { useRef as M5 } from "react";
29041
+ import F2, { useRef as M4 } from "react";
28988
29042
 
28989
29043
  // ../../node_modules/@headlessui/react/dist/hooks/use-is-mounted.js
28990
29044
  import { useRef as r13 } from "react";
28991
- function f9() {
29045
+ function f10() {
28992
29046
  let e6 = r13(false);
28993
29047
  return n(() => (e6.current = true, () => {
28994
29048
  e6.current = false;
@@ -29013,15 +29067,15 @@ function x7(o12) {
29013
29067
  for (let e6 of o12.current) t6(e6.current) && t12.add(e6.current);
29014
29068
  return t12;
29015
29069
  }
29016
- var $2 = "div";
29070
+ var $ = "div";
29017
29071
  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
29072
  function w4(o12, t12) {
29019
- let e6 = M5(null), r14 = y(e6, t12), { initialFocus: u12, initialFocusFallback: a15, containers: n12, features: s11 = 15, ...f10 } = o12;
29020
- l8() || (s11 = 0);
29073
+ let e6 = M4(null), r14 = y(e6, t12), { initialFocus: u12, initialFocusFallback: a15, containers: n12, features: s11 = 15, ...f11 } = o12;
29074
+ l7() || (s11 = 0);
29021
29075
  let l10 = u8(e6.current);
29022
29076
  re(s11, { ownerDocument: l10 });
29023
29077
  let T7 = ne(s11, { ownerDocument: l10, container: e6, initialFocus: u12, initialFocusFallback: a15 });
29024
- oe(s11, { ownerDocument: l10, container: e6, containers: n12, previousActiveElement: T7 });
29078
+ oe2(s11, { ownerDocument: l10, container: e6, containers: n12, previousActiveElement: T7 });
29025
29079
  let g2 = u11(), A5 = o4((c12) => {
29026
29080
  if (!n4(e6.current)) return;
29027
29081
  let E6 = e6.current;
@@ -29032,7 +29086,7 @@ function w4(o12, t12) {
29032
29086
  v3(E6, T4.Last, { skipElements: [c12.relatedTarget, a15] });
29033
29087
  } });
29034
29088
  });
29035
- }), v4 = I3(!!(s11 & 2), "focus-trap#tab-lock"), N2 = p(), b8 = M5(false), k5 = { ref: r14, onKeyDown(c12) {
29089
+ }), v4 = I3(!!(s11 & 2), "focus-trap#tab-lock"), N2 = p(), b8 = M4(false), k6 = { ref: r14, onKeyDown(c12) {
29036
29090
  c12.key == "Tab" && (b8.current = true, N2.requestAnimationFrame(() => {
29037
29091
  b8.current = false;
29038
29092
  }));
@@ -29040,15 +29094,15 @@ function w4(o12, t12) {
29040
29094
  if (!(s11 & 4)) return;
29041
29095
  let E6 = x7(n12);
29042
29096
  n4(e6.current) && E6.add(e6.current);
29043
- let L = c12.relatedTarget;
29044
- i3(L) && L.dataset.headlessuiFocusGuard !== "true" && (I6(E6, L) || (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)));
29045
- } }, B = K();
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 }), B({ ourProps: k5, theirProps: f10, defaultTag: $2, name: "FocusTrap" }), v4 && F2.createElement(f2, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A5, features: s4.Focusable }));
29047
- }
29048
- var ee2 = Y(w4);
29049
- var ge = Object.assign(ee2, { features: G3 });
29050
- function te2(o12 = true) {
29051
- let t12 = M5(n10.slice());
29097
+ let L2 = c12.relatedTarget;
29098
+ 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)));
29099
+ } }, B2 = K();
29100
+ 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 }));
29101
+ }
29102
+ var ee = Y(w4);
29103
+ var ge = Object.assign(ee, { features: G3 });
29104
+ function te(o12 = true) {
29105
+ let t12 = M4(n10.slice());
29052
29106
  return m4(([e6], [r14]) => {
29053
29107
  r14 === true && e6 === false && t2(() => {
29054
29108
  t12.current.splice(0);
@@ -29059,7 +29113,7 @@ function te2(o12 = true) {
29059
29113
  });
29060
29114
  }
29061
29115
  function re(o12, { ownerDocument: t12 }) {
29062
- let e6 = !!(o12 & 8), r14 = te2(e6);
29116
+ let e6 = !!(o12 & 8), r14 = te(e6);
29063
29117
  m4(() => {
29064
29118
  e6 || d2(t12 == null ? void 0 : t12.body) && w2(r14());
29065
29119
  }, [e6]), c8(() => {
@@ -29067,15 +29121,15 @@ function re(o12, { ownerDocument: t12 }) {
29067
29121
  });
29068
29122
  }
29069
29123
  function ne(o12, { ownerDocument: t12, container: e6, initialFocus: r14, initialFocusFallback: u12 }) {
29070
- let a15 = M5(null), n12 = I3(!!(o12 & 1), "focus-trap#initial-focus"), s11 = f9();
29124
+ let a15 = M4(null), n12 = I3(!!(o12 & 1), "focus-trap#initial-focus"), s11 = f10();
29071
29125
  return m4(() => {
29072
29126
  if (o12 === 0) return;
29073
29127
  if (!n12) {
29074
29128
  u12 != null && u12.current && w2(u12.current);
29075
29129
  return;
29076
29130
  }
29077
- let f10 = e6.current;
29078
- f10 && t2(() => {
29131
+ let f11 = e6.current;
29132
+ f11 && t2(() => {
29079
29133
  if (!s11.current) return;
29080
29134
  let l10 = t12 == null ? void 0 : t12.activeElement;
29081
29135
  if (r14 != null && r14.current) {
@@ -29083,15 +29137,15 @@ function ne(o12, { ownerDocument: t12, container: e6, initialFocus: r14, initial
29083
29137
  a15.current = l10;
29084
29138
  return;
29085
29139
  }
29086
- } else if (f10.contains(l10)) {
29140
+ } else if (f11.contains(l10)) {
29087
29141
  a15.current = l10;
29088
29142
  return;
29089
29143
  }
29090
29144
  if (r14 != null && r14.current) w2(r14.current);
29091
29145
  else {
29092
29146
  if (o12 & 16) {
29093
- if (v3(f10, T4.First | T4.AutoFocus) !== A2.Error) return;
29094
- } else if (v3(f10, T4.First) !== A2.Error) return;
29147
+ if (v3(f11, T4.First | T4.AutoFocus) !== A2.Error) return;
29148
+ } else if (v3(f11, T4.First) !== A2.Error) return;
29095
29149
  if (u12 != null && u12.current && (w2(u12.current), (t12 == null ? void 0 : t12.activeElement) === u12.current)) return;
29096
29150
  console.warn("There are no focusable elements inside the <FocusTrap />");
29097
29151
  }
@@ -29099,16 +29153,16 @@ function ne(o12, { ownerDocument: t12, container: e6, initialFocus: r14, initial
29099
29153
  });
29100
29154
  }, [u12, n12, o12]), a15;
29101
29155
  }
29102
- function oe(o12, { ownerDocument: t12, container: e6, containers: r14, previousActiveElement: u12 }) {
29103
- let a15 = f9(), n12 = !!(o12 & 4);
29156
+ function oe2(o12, { ownerDocument: t12, container: e6, containers: r14, previousActiveElement: u12 }) {
29157
+ let a15 = f10(), n12 = !!(o12 & 4);
29104
29158
  E4(t12 == null ? void 0 : t12.defaultView, "focus", (s11) => {
29105
29159
  if (!n12 || !a15.current) return;
29106
- let f10 = x7(r14);
29107
- n4(e6.current) && f10.add(e6.current);
29160
+ let f11 = x7(r14);
29161
+ n4(e6.current) && f11.add(e6.current);
29108
29162
  let l10 = u12.current;
29109
29163
  if (!l10) return;
29110
29164
  let T7 = s11.target;
29111
- n4(T7) ? I6(f10, T7) ? (u12.current = T7, w2(T7)) : (s11.preventDefault(), s11.stopPropagation(), w2(l10)) : w2(u12.current);
29165
+ n4(T7) ? I6(f11, T7) ? (u12.current = T7, w2(T7)) : (s11.preventDefault(), s11.stopPropagation(), w2(l10)) : w2(u12.current);
29112
29166
  }, true);
29113
29167
  }
29114
29168
  function I6(o12, t12) {
@@ -29117,7 +29171,7 @@ function I6(o12, t12) {
29117
29171
  }
29118
29172
 
29119
29173
  // ../../node_modules/@headlessui/react/dist/components/transition/transition.js
29120
- import c11, { Fragment as k4, createContext as ne2, useContext as q, useEffect as ge2, useMemo as ie3, useRef as b7, useState as O2 } from "react";
29174
+ 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
29175
  function ue(e6) {
29122
29176
  var t12;
29123
29177
  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 +29191,11 @@ function Ae() {
29137
29191
  }
29138
29192
  var w5 = ne2(null);
29139
29193
  w5.displayName = "NestingContext";
29140
- function M6(e6) {
29141
- return "children" in e6 ? M6(e6.children) : e6.current.filter(({ el: t12 }) => t12.current !== null).filter(({ state: t12 }) => t12 === "visible").length > 0;
29194
+ function M5(e6) {
29195
+ return "children" in e6 ? M5(e6.children) : e6.current.filter(({ el: t12 }) => t12.current !== null).filter(({ state: t12 }) => t12 === "visible").length > 0;
29142
29196
  }
29143
29197
  function Te(e6, t12) {
29144
- let n12 = s3(e6), l10 = b7([]), S9 = f9(), R2 = p(), d8 = o4((o12, i12 = C2.Hidden) => {
29198
+ let n12 = s3(e6), l10 = b7([]), S8 = f10(), R2 = p(), d8 = o4((o12, i12 = C2.Hidden) => {
29145
29199
  let a15 = l10.current.findIndex(({ el: s11 }) => s11 === o12);
29146
29200
  a15 !== -1 && (u(i12, { [C2.Unmount]() {
29147
29201
  l10.current.splice(a15, 1);
@@ -29149,7 +29203,7 @@ function Te(e6, t12) {
29149
29203
  l10.current[a15].state = "hidden";
29150
29204
  } }), R2.microTask(() => {
29151
29205
  var s11;
29152
- !M6(l10) && S9.current && ((s11 = n12.current) == null || s11.call(n12));
29206
+ !M5(l10) && S8.current && ((s11 = n12.current) == null || s11.call(n12));
29153
29207
  }));
29154
29208
  }), y4 = o4((o12) => {
29155
29209
  let i12 = l10.current.find(({ el: a15 }) => a15 === o12);
@@ -29158,7 +29212,7 @@ function Te(e6, t12) {
29158
29212
  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
29213
  C7.current.push(s11);
29160
29214
  })]), t12 == null || t12.chains.current[i12].push([o12, new Promise((s11) => {
29161
- Promise.all(h6.current[i12].map(([r14, f10]) => f10)).then(() => s11());
29215
+ Promise.all(h6.current[i12].map(([r14, f11]) => f11)).then(() => s11());
29162
29216
  })]), i12 === "enter" ? p6.current = p6.current.then(() => t12 == null ? void 0 : t12.wait.current).then(() => a15(i12)) : a15(i12);
29163
29217
  }), v4 = o4((o12, i12, a15) => {
29164
29218
  Promise.all(h6.current[i12].splice(0).map(([s11, r14]) => r14)).then(() => {
@@ -29168,69 +29222,69 @@ function Te(e6, t12) {
29168
29222
  });
29169
29223
  return ie3(() => ({ children: l10, register: y4, unregister: d8, onStart: g2, onStop: v4, wait: p6, chains: h6 }), [y4, d8, l10, g2, v4, h6, p6]);
29170
29224
  }
29171
- var de = k4;
29225
+ var de = k5;
29172
29226
  var fe = A.RenderStrategy;
29173
29227
  function Fe(e6, t12) {
29174
- var ee3, te3;
29175
- let { transition: n12 = true, beforeEnter: l10, afterEnter: S9, beforeLeave: R2, afterLeave: d8, enter: y4, enterFrom: C7, enterTo: p6, entered: h6, leave: g2, leaveFrom: v4, leaveTo: o12, ...i12 } = e6, [a15, s11] = O2(null), r14 = b7(null), f10 = ue(e6), U2 = y(...f10 ? [r14, t12, s11] : t12 === null ? [] : [t12]), H4 = (ee3 = i12.unmount) == null || ee3 ? C2.Unmount : C2.Hidden, { show: u12, appear: z2, initial: K2 } = He(), [m6, j7] = O2(u12 ? "visible" : "hidden"), Q = Ae(), { register: A5, unregister: F3 } = Q;
29228
+ var ee2, te2;
29229
+ 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
29230
  n(() => A5(r14), [A5, r14]), n(() => {
29177
- if (H4 === C2.Hidden && r14.current) {
29231
+ if (H5 === C2.Hidden && r14.current) {
29178
29232
  if (u12 && m6 !== "visible") {
29179
29233
  j7("visible");
29180
29234
  return;
29181
29235
  }
29182
29236
  return u(m6, { ["hidden"]: () => F3(r14), ["visible"]: () => A5(r14) });
29183
29237
  }
29184
- }, [m6, r14, A5, F3, u12, H4]);
29185
- let G4 = l8();
29238
+ }, [m6, r14, A5, F3, u12, H5]);
29239
+ let G4 = l7();
29186
29240
  n(() => {
29187
- if (f10 && G4 && m6 === "visible" && r14.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
29188
- }, [r14, m6, G4, f10]);
29189
- let ce = K2 && !z2, Y2 = z2 && u12 && K2, B = b7(false), I7 = Te(() => {
29190
- B.current || (j7("hidden"), F3(r14));
29191
- }, Q), Z = o4((W2) => {
29192
- B.current = true;
29193
- let L = W2 ? "enter" : "leave";
29194
- I7.onStart(r14, L, (_4) => {
29241
+ if (f11 && G4 && m6 === "visible" && r14.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
29242
+ }, [r14, m6, G4, f11]);
29243
+ let ce = K2 && !z2, Y2 = z2 && u12 && K2, B2 = b7(false), I7 = Te(() => {
29244
+ B2.current || (j7("hidden"), F3(r14));
29245
+ }, Q), Z = o4((W) => {
29246
+ B2.current = true;
29247
+ let L2 = W ? "enter" : "leave";
29248
+ I7.onStart(r14, L2, (_4) => {
29195
29249
  _4 === "enter" ? l10 == null || l10() : _4 === "leave" && (R2 == null || R2());
29196
29250
  });
29197
- }), $4 = o4((W2) => {
29198
- let L = W2 ? "enter" : "leave";
29199
- B.current = false, I7.onStop(r14, L, (_4) => {
29200
- _4 === "enter" ? S9 == null || S9() : _4 === "leave" && (d8 == null || d8());
29201
- }), L === "leave" && !M6(I7) && (j7("hidden"), F3(r14));
29251
+ }), $3 = o4((W) => {
29252
+ let L2 = W ? "enter" : "leave";
29253
+ B2.current = false, I7.onStop(r14, L2, (_4) => {
29254
+ _4 === "enter" ? S8 == null || S8() : _4 === "leave" && (d8 == null || d8());
29255
+ }), L2 === "leave" && !M5(I7) && (j7("hidden"), F3(r14));
29202
29256
  });
29203
29257
  ge2(() => {
29204
- f10 && n12 || (Z(u12), $4(u12));
29205
- }, [u12, f10, n12]);
29206
- let pe2 = /* @__PURE__ */ (() => !(!n12 || !f10 || !G4 || ce))(), [, T7] = N(pe2, a15, u12, { start: Z, end: $4 }), Ce = m({ ref: U2, className: ((te3 = 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 : te3.trim()) || void 0, ...x4(T7) }), N2 = 0;
29258
+ f11 && n12 || (Z(u12), $3(u12));
29259
+ }, [u12, f11, n12]);
29260
+ 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
29261
  m6 === "visible" && (N2 |= i9.Open), m6 === "hidden" && (N2 |= i9.Closed), u12 && m6 === "hidden" && (N2 |= i9.Opening), !u12 && m6 === "visible" && (N2 |= i9.Closing);
29208
29262
  let he = K();
29209
29263
  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
29264
  }
29211
29265
  function Ie(e6, t12) {
29212
- let { show: n12, appear: l10 = false, unmount: S9 = true, ...R2 } = e6, d8 = b7(null), y4 = ue(e6), C7 = y(...y4 ? [d8, t12] : t12 === null ? [] : [t12]);
29213
- l8();
29266
+ 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]);
29267
+ l7();
29214
29268
  let p6 = u9();
29215
29269
  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] = O2(n12 ? "visible" : "hidden"), v4 = Te(() => {
29270
+ let [h6, g2] = O3(n12 ? "visible" : "hidden"), v4 = Te(() => {
29217
29271
  n12 || g2("hidden");
29218
- }), [o12, i12] = O2(true), a15 = b7([n12]);
29272
+ }), [o12, i12] = O3(true), a15 = b7([n12]);
29219
29273
  n(() => {
29220
29274
  o12 !== false && a15.current[a15.current.length - 1] !== n12 && (a15.current.push(n12), i12(false));
29221
29275
  }, [a15, n12]);
29222
29276
  let s11 = ie3(() => ({ show: n12, appear: l10, initial: o12 }), [n12, l10, o12]);
29223
29277
  n(() => {
29224
- n12 ? g2("visible") : !M6(v4) && d8.current !== null && g2("hidden");
29278
+ n12 ? g2("visible") : !M5(v4) && d8.current !== null && g2("hidden");
29225
29279
  }, [n12, v4]);
29226
- let r14 = { unmount: S9 }, f10 = o4(() => {
29280
+ let r14 = { unmount: S8 }, f11 = o4(() => {
29227
29281
  var u12;
29228
29282
  o12 && i12(false), (u12 = e6.beforeEnter) == null || u12.call(e6);
29229
29283
  }), U2 = o4(() => {
29230
29284
  var u12;
29231
29285
  o12 && i12(false), (u12 = e6.beforeLeave) == null || u12.call(e6);
29232
- }), H4 = K();
29233
- return c11.createElement(w5.Provider, { value: v4 }, c11.createElement(V.Provider, { value: s11 }, H4({ ourProps: { ...r14, as: k4, children: c11.createElement(me, { ref: C7, ...r14, ...R2, beforeEnter: f10, beforeLeave: U2 }) }, theirProps: {}, defaultTag: k4, features: fe, visible: h6 === "visible", name: "Transition" })));
29286
+ }), H5 = K();
29287
+ 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
29288
  }
29235
29289
  function Le(e6, t12) {
29236
29290
  let n12 = q(V) !== null, l10 = u9() !== null;
@@ -29249,11 +29303,11 @@ var Ue = { [0](e6, t12) {
29249
29303
  } };
29250
29304
  var w6 = pe(null);
29251
29305
  w6.displayName = "DialogContext";
29252
- function O3(e6) {
29306
+ function O4(e6) {
29253
29307
  let t12 = ue2(w6);
29254
29308
  if (t12 === null) {
29255
29309
  let o12 = new Error(`<${e6} /> is missing a parent <Dialog /> component.`);
29256
- throw Error.captureStackTrace && Error.captureStackTrace(o12, O3), o12;
29310
+ throw Error.captureStackTrace && Error.captureStackTrace(o12, O4), o12;
29257
29311
  }
29258
29312
  return t12;
29259
29313
  }
@@ -29261,37 +29315,37 @@ function He2(e6, t12) {
29261
29315
  return u(t12.type, Ue, e6, t12);
29262
29316
  }
29263
29317
  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: f10 = true, __demoMode: u12 = false, unmount: y4 = false, ...S9 } = t12, R2 = j6(false);
29318
+ 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
29319
  s11 = (function() {
29266
29320
  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
29321
  })();
29268
29322
  let g2 = u9();
29269
29323
  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)), B = o4((r14) => Q({ type: 0, id: r14 })), D5 = l8() ? c12 === 0 : false, [Z, ee3] = ee(), te3 = { get current() {
29324
+ 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
29325
  var r14;
29272
29326
  return (r14 = b8.panelRef.current) != null ? r14 : T7.current;
29273
- } }, v4 = x6(), { resolveContainers: M7 } = S8({ mainTreeNode: v4, portals: Z, defaultContainers: [te3] }), U2 = g2 !== null ? (g2 & i9.Closing) === i9.Closing : false;
29327
+ } }, v4 = x6(), { resolveContainers: M6 } = S7({ mainTreeNode: v4, portals: Z, defaultContainers: [te2] }), U2 = g2 !== null ? (g2 & i9.Closing) === i9.Closing : false;
29274
29328
  y3(u12 || U2 ? false : D5, { allowed: o4(() => {
29275
- var r14, W2;
29276
- return [(W2 = (r14 = T7.current) == null ? void 0 : r14.closest("[data-headlessui-portal]")) != null ? W2 : null];
29329
+ var r14, W;
29330
+ return [(W = (r14 = T7.current) == null ? void 0 : r14.closest("[data-headlessui-portal]")) != null ? W : null];
29277
29331
  }), disallowed: o4(() => {
29278
29332
  var r14;
29279
29333
  return [(r14 = v4 == null ? void 0 : v4.closest("body > *:not(#headlessui-portal-root)")) != null ? r14 : null];
29280
29334
  }) });
29281
- let P4 = x2.get(null);
29335
+ let P3 = x2.get(null);
29282
29336
  n(() => {
29283
- if (D5) return P4.actions.push(n12), () => P4.actions.pop(n12);
29284
- }, [P4, n12, D5]);
29285
- let H4 = S4(P4, de2((r14) => P4.selectors.isTop(r14, n12), [P4, n12]));
29286
- k3(H4, M7, (r14) => {
29337
+ if (D5) return P3.actions.push(n12), () => P3.actions.pop(n12);
29338
+ }, [P3, n12, D5]);
29339
+ let H5 = S4(P3, de2((r14) => P3.selectors.isTop(r14, n12), [P3, n12]));
29340
+ k3(H5, M6, (r14) => {
29287
29341
  r14.preventDefault(), m6();
29288
- }), a13(H4, F3 == null ? void 0 : F3.defaultView, (r14) => {
29342
+ }), a13(H5, F3 == null ? void 0 : F3.defaultView, (r14) => {
29289
29343
  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, M7), p4(D5, T7, m6);
29291
- let [oe2, ne3] = H2(), re3 = fe2(() => [{ dialogState: c12, close: m6, setTitleId: B, unmount: y4 }, b8], [c12, m6, B, y4, b8]), N2 = n2({ open: c12 === 0 }), le = { ref: I7, id: n12, role: s11, tabIndex: -1, "aria-modal": u12 ? void 0 : c12 === 0 ? true : void 0, "aria-labelledby": b8.titleId, "aria-describedby": oe2, unmount: y4 }, ae = !f8(), E6 = G3.None;
29292
- D5 && !u12 && (E6 |= G3.RestoreFocus, E6 |= G3.TabLock, f10 && (E6 |= G3.AutoFocus), ae && (E6 |= G3.InitialFocus));
29344
+ }), f6(u12 || U2 ? false : D5, F3, M6), p4(D5, T7, m6);
29345
+ 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;
29346
+ D5 && !u12 && (E6 |= G3.RestoreFocus, E6 |= G3.TabLock, f11 && (E6 |= G3.AutoFocus), ae && (E6 |= G3.InitialFocus));
29293
29347
  let ie4 = K();
29294
- return l9.createElement(s8, null, l9.createElement(l7, { force: true }, l9.createElement(te, null, l9.createElement(w6.Provider, { value: re3 }, l9.createElement(X, { target: T7 }, l9.createElement(l7, { force: false }, l9.createElement(ne3, { slot: N2 }, l9.createElement(ee3, null, l9.createElement(ge, { initialFocus: d8, initialFocusFallback: T7, containers: M7, features: E6 }, l9.createElement(C4, { value: m6 }, ie4({ ourProps: le, theirProps: S9, slot: N2, defaultTag: Ne, features: We, visible: c12 === 0, name: "Dialog" })))))))))));
29348
+ 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
29349
  });
29296
29350
  var Ne = "div";
29297
29351
  var We = A.RenderStrategy | A.Static;
@@ -29306,22 +29360,22 @@ function $e(e6, t12) {
29306
29360
  }
29307
29361
  var je = "div";
29308
29362
  function Ye(e6, t12) {
29309
- let o12 = r5(), { id: a15 = `headlessui-dialog-panel-${o12}`, transition: n12 = false, ...i12 } = e6, [{ dialogState: p6, unmount: d8 }, s11] = O3("Dialog.Panel"), f10 = y(t12, s11.panelRef), u12 = n2({ open: p6 === 0 }), y4 = o4((I7) => {
29363
+ 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
29364
  I7.stopPropagation();
29311
- }), S9 = { ref: f10, id: a15, onClick: y4 }, R2 = n12 ? Oe : $3, g2 = n12 ? { unmount: d8 } : {}, T7 = K();
29312
- return l9.createElement(R2, { ...g2 }, T7({ ourProps: S9, theirProps: i12, slot: u12, defaultTag: je, name: "Dialog.Panel" }));
29365
+ }), S8 = { ref: f11, id: a15, onClick: y4 }, R2 = n12 ? Oe : $2, g2 = n12 ? { unmount: d8 } : {}, T7 = K();
29366
+ return l9.createElement(R2, { ...g2 }, T7({ ourProps: S8, theirProps: i12, slot: u12, defaultTag: je, name: "Dialog.Panel" }));
29313
29367
  }
29314
29368
  var Je = "div";
29315
29369
  function Ke2(e6, t12) {
29316
- let { transition: o12 = false, ...a15 } = e6, [{ dialogState: n12, unmount: i12 }] = O3("Dialog.Backdrop"), p6 = n2({ open: n12 === 0 }), d8 = { ref: t12, "aria-hidden": true }, s11 = o12 ? Oe : $3, f10 = o12 ? { unmount: i12 } : {}, u12 = K();
29317
- return l9.createElement(s11, { ...f10 }, u12({ ourProps: d8, theirProps: a15, slot: p6, defaultTag: Je, name: "Dialog.Backdrop" }));
29370
+ 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();
29371
+ return l9.createElement(s11, { ...f11 }, u12({ ourProps: d8, theirProps: a15, slot: p6, defaultTag: Je, name: "Dialog.Backdrop" }));
29318
29372
  }
29319
29373
  var Xe = "h2";
29320
29374
  function Ve(e6, t12) {
29321
- let o12 = r5(), { id: a15 = `headlessui-dialog-title-${o12}`, ...n12 } = e6, [{ dialogState: i12, setTitleId: p6 }] = O3("Dialog.Title"), d8 = y(t12);
29375
+ let o12 = r5(), { id: a15 = `headlessui-dialog-title-${o12}`, ...n12 } = e6, [{ dialogState: i12, setTitleId: p6 }] = O4("Dialog.Title"), d8 = y(t12);
29322
29376
  Te2(() => (p6(a15), () => p6(null)), [a15, p6]);
29323
- let s11 = n2({ open: i12 === 0 }), f10 = { ref: d8, id: a15 };
29324
- return K()({ ourProps: f10, theirProps: n12, slot: s11, defaultTag: Xe, name: "Dialog.Title" });
29377
+ let s11 = n2({ open: i12 === 0 }), f11 = { ref: d8, id: a15 };
29378
+ return K()({ ourProps: f11, theirProps: n12, slot: s11, defaultTag: Xe, name: "Dialog.Title" });
29325
29379
  }
29326
29380
  var qe = Y($e);
29327
29381
  var ze = Y(Ye);
@@ -30298,37 +30352,42 @@ function SessionExpiredModal() {
30298
30352
 
30299
30353
  // src/components/resource/AnnotateView.tsx
30300
30354
  import { useRef as useRef13, useEffect as useEffect20, useCallback as useCallback13, lazy, Suspense } from "react";
30301
- import { getMimeCategory, isPdfMimeType as isPdfMimeType2 } from "@semiont/core";
30355
+ import { capabilitiesOf as capabilitiesOf3 } from "@semiont/core";
30302
30356
 
30303
30357
  // src/lib/text-segmentation.ts
30304
30358
  import { getTextPositionSelector as getTextPositionSelector2, getTextQuoteSelector, getTargetSelector as getTargetSelector2 } from "@semiont/core";
30305
- import { findTextWithContext, buildContentCache } from "@semiont/core";
30359
+ import { anchorAnnotation } from "@semiont/core";
30360
+ var warnedAnnotationIds = /* @__PURE__ */ new Set();
30306
30361
  function segmentTextWithAnnotations(content4, annotations) {
30307
30362
  if (!content4) {
30308
30363
  return [{ exact: "", start: 0, end: 0 }];
30309
30364
  }
30310
- const cache2 = buildContentCache(content4);
30311
30365
  const normalizedAnnotations = annotations.map((ann) => {
30312
30366
  const targetSelector = getTargetSelector2(ann.target);
30313
30367
  const posSelector = getTextPositionSelector2(targetSelector);
30314
30368
  const quoteSelector = targetSelector ? getTextQuoteSelector(targetSelector) : null;
30315
- let position4;
30316
- if (quoteSelector) {
30317
- position4 = findTextWithContext(
30318
- content4,
30319
- quoteSelector.exact,
30320
- quoteSelector.prefix,
30321
- quoteSelector.suffix,
30322
- posSelector?.start,
30323
- cache2
30324
- );
30369
+ const anchor = anchorAnnotation(
30370
+ content4,
30371
+ {
30372
+ ...posSelector ? { position: { start: posSelector.start, end: posSelector.end } } : {},
30373
+ ...quoteSelector ? {
30374
+ quote: {
30375
+ exact: quoteSelector.exact,
30376
+ ...quoteSelector.prefix !== void 0 ? { prefix: quoteSelector.prefix } : {},
30377
+ ...quoteSelector.suffix !== void 0 ? { suffix: quoteSelector.suffix } : {}
30378
+ }
30379
+ } : {}
30380
+ }
30381
+ );
30382
+ if (anchor && anchor.confidence !== "high") {
30383
+ logDegradedAnchorOnce(ann.id, anchor.strategy, anchor.confidence);
30325
30384
  }
30326
- const start2 = position4?.start ?? posSelector?.start ?? 0;
30327
- const end = position4?.end ?? posSelector?.end ?? 0;
30328
30385
  return {
30329
30386
  annotation: ann,
30330
- start: start2,
30331
- end
30387
+ start: anchor?.start ?? 0,
30388
+ end: anchor?.end ?? 0,
30389
+ ...anchor?.strategy ? { strategy: anchor.strategy } : {},
30390
+ ...anchor?.confidence ? { confidence: anchor.confidence } : {}
30332
30391
  };
30333
30392
  }).filter((a15) => a15.start >= 0 && a15.end <= content4.length && a15.start < a15.end).sort((a15, b8) => a15.start - b8.start);
30334
30393
  if (normalizedAnnotations.length === 0) {
@@ -30336,7 +30395,7 @@ function segmentTextWithAnnotations(content4, annotations) {
30336
30395
  }
30337
30396
  const segments = [];
30338
30397
  let position3 = 0;
30339
- for (const { annotation, start: start2, end } of normalizedAnnotations) {
30398
+ for (const { annotation, start: start2, end, strategy, confidence } of normalizedAnnotations) {
30340
30399
  if (start2 < position3) continue;
30341
30400
  if (start2 > position3) {
30342
30401
  segments.push({
@@ -30349,7 +30408,9 @@ function segmentTextWithAnnotations(content4, annotations) {
30349
30408
  exact: content4.slice(start2, end),
30350
30409
  annotation,
30351
30410
  start: start2,
30352
- end
30411
+ end,
30412
+ ...strategy ? { strategy } : {},
30413
+ ...confidence ? { confidence } : {}
30353
30414
  });
30354
30415
  position3 = end;
30355
30416
  }
@@ -30362,6 +30423,15 @@ function segmentTextWithAnnotations(content4, annotations) {
30362
30423
  }
30363
30424
  return segments;
30364
30425
  }
30426
+ function logDegradedAnchorOnce(annotationId2, strategy, confidence) {
30427
+ if (warnedAnnotationIds.has(annotationId2)) return;
30428
+ warnedAnnotationIds.add(annotationId2);
30429
+ console.warn("[segmentTextWithAnnotations] annotation anchored via degraded strategy", {
30430
+ annotationId: annotationId2,
30431
+ strategy,
30432
+ confidence
30433
+ });
30434
+ }
30365
30435
 
30366
30436
  // src/lib/text-selection-handler.ts
30367
30437
  import { extractContext } from "@semiont/core";
@@ -30392,7 +30462,7 @@ function fallbackTextPosition(content4, selectedText) {
30392
30462
 
30393
30463
  // src/components/resource/AnnotateView.tsx
30394
30464
  import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
30395
- var PdfAnnotationCanvas = lazy(() => import("./PdfAnnotationCanvas.client-CN3C3S55.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
30465
+ var PdfAnnotationCanvas = lazy(() => import("./PdfAnnotationCanvas.client-NIMALXNZ.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
30396
30466
  function AnnotateView({
30397
30467
  content: content4,
30398
30468
  mimeType = "text/plain",
@@ -30410,7 +30480,7 @@ function AnnotateView({
30410
30480
  const { newAnnotationIds } = useResourceAnnotations();
30411
30481
  const containerRef = useRef13(null);
30412
30482
  const session = useObservable(useSemiont().activeSession$);
30413
- const category = getMimeCategory(mimeType);
30483
+ const render = capabilitiesOf3(mimeType)?.render ?? "none";
30414
30484
  const { highlights, references, assessments, comments, tags: tags3 } = annotations;
30415
30485
  const allAnnotations = [...highlights, ...references, ...assessments, ...comments, ...tags3];
30416
30486
  const segments = segmentTextWithAnnotations(content4, allAnnotations);
@@ -30489,7 +30559,7 @@ function AnnotateView({
30489
30559
  container.removeEventListener("mousedown", handleMouseDown);
30490
30560
  };
30491
30561
  }, [selectedMotivation, content4]);
30492
- switch (category) {
30562
+ switch (render) {
30493
30563
  case "text":
30494
30564
  return /* @__PURE__ */ jsxs15("div", { className: "semiont-annotate-view", "data-mime-type": "text", ref: containerRef, children: [
30495
30565
  /* @__PURE__ */ jsx22(
@@ -30521,35 +30591,34 @@ function AnnotateView({
30521
30591
  }
30522
30592
  ) })
30523
30593
  ] });
30594
+ case "pdf":
30595
+ return /* @__PURE__ */ jsxs15("div", { className: "semiont-annotate-view", "data-mime-type": "pdf", ref: containerRef, children: [
30596
+ /* @__PURE__ */ jsx22(
30597
+ AnnotateToolbar,
30598
+ {
30599
+ selectedMotivation,
30600
+ selectedClick,
30601
+ showShapeGroup: true,
30602
+ selectedShape,
30603
+ mediaType: mimeType,
30604
+ annotateMode,
30605
+ annotators: ANNOTATORS
30606
+ }
30607
+ ),
30608
+ /* @__PURE__ */ jsx22("div", { className: "semiont-annotate-view__content", children: content4 && /* @__PURE__ */ jsx22(Suspense, { fallback: /* @__PURE__ */ jsx22("div", { className: "semiont-annotate-view__loading", children: "Loading PDF viewer..." }), children: /* @__PURE__ */ jsx22(
30609
+ PdfAnnotationCanvas,
30610
+ {
30611
+ pdfUrl: content4,
30612
+ existingAnnotations: allAnnotations,
30613
+ drawingMode: selectedMotivation ? selectedShape : null,
30614
+ selectedMotivation,
30615
+ session,
30616
+ hoveredAnnotationId: hoveredAnnotationId || null,
30617
+ hoverDelayMs
30618
+ }
30619
+ ) }) })
30620
+ ] });
30524
30621
  case "image":
30525
- if (isPdfMimeType2(mimeType)) {
30526
- return /* @__PURE__ */ jsxs15("div", { className: "semiont-annotate-view", "data-mime-type": "pdf", ref: containerRef, children: [
30527
- /* @__PURE__ */ jsx22(
30528
- AnnotateToolbar,
30529
- {
30530
- selectedMotivation,
30531
- selectedClick,
30532
- showShapeGroup: true,
30533
- selectedShape,
30534
- mediaType: mimeType,
30535
- annotateMode,
30536
- annotators: ANNOTATORS
30537
- }
30538
- ),
30539
- /* @__PURE__ */ jsx22("div", { className: "semiont-annotate-view__content", children: content4 && /* @__PURE__ */ jsx22(Suspense, { fallback: /* @__PURE__ */ jsx22("div", { className: "semiont-annotate-view__loading", children: "Loading PDF viewer..." }), children: /* @__PURE__ */ jsx22(
30540
- PdfAnnotationCanvas,
30541
- {
30542
- pdfUrl: content4,
30543
- existingAnnotations: allAnnotations,
30544
- drawingMode: selectedMotivation ? selectedShape : null,
30545
- selectedMotivation,
30546
- session,
30547
- hoveredAnnotationId: hoveredAnnotationId || null,
30548
- hoverDelayMs
30549
- }
30550
- ) }) })
30551
- ] });
30552
- }
30553
30622
  return /* @__PURE__ */ jsxs15("div", { className: "semiont-annotate-view", "data-mime-type": "image", ref: containerRef, children: [
30554
30623
  /* @__PURE__ */ jsx22(
30555
30624
  AnnotateToolbar,
@@ -30576,7 +30645,7 @@ function AnnotateView({
30576
30645
  }
30577
30646
  ) })
30578
30647
  ] });
30579
- case "unsupported":
30648
+ case "none":
30580
30649
  default:
30581
30650
  return /* @__PURE__ */ jsx22("div", { ref: containerRef, className: "semiont-annotate-view semiont-annotate-view--unsupported", "data-mime-type": "unsupported", children: /* @__PURE__ */ jsxs15("div", { className: "semiont-annotate-view__empty", children: [
30582
30651
  /* @__PURE__ */ jsxs15("p", { className: "semiont-annotate-view__empty-message", children: [
@@ -31304,6 +31373,7 @@ var html2 = create({
31304
31373
  allowFullScreen: boolean,
31305
31374
  allowPaymentRequest: boolean,
31306
31375
  allowUserMedia: boolean,
31376
+ alpha: boolean,
31307
31377
  alt: null,
31308
31378
  as: null,
31309
31379
  async: boolean,
@@ -31317,8 +31387,12 @@ var html2 = create({
31317
31387
  checked: boolean,
31318
31388
  cite: null,
31319
31389
  className: spaceSeparated,
31390
+ closedBy: null,
31391
+ colorSpace: null,
31320
31392
  cols: number2,
31321
- colSpan: null,
31393
+ colSpan: number2,
31394
+ command: null,
31395
+ commandFor: null,
31322
31396
  content: null,
31323
31397
  contentEditable: booleanish,
31324
31398
  controls: boolean,
@@ -31498,8 +31572,10 @@ var html2 = create({
31498
31572
  seamless: boolean,
31499
31573
  selected: boolean,
31500
31574
  shadowRootClonable: boolean,
31575
+ shadowRootCustomElementRegistry: boolean,
31501
31576
  shadowRootDelegatesFocus: boolean,
31502
31577
  shadowRootMode: null,
31578
+ shadowRootSerializable: boolean,
31503
31579
  shape: null,
31504
31580
  size: number2,
31505
31581
  sizes: null,
@@ -31636,8 +31712,11 @@ var html2 = create({
31636
31712
  allowTransparency: null,
31637
31713
  autoCorrect: null,
31638
31714
  autoSave: null,
31715
+ credentialless: boolean,
31639
31716
  disablePictureInPicture: boolean,
31640
31717
  disableRemotePlayback: boolean,
31718
+ exportParts: commaSeparated,
31719
+ part: spaceSeparated,
31641
31720
  prefix: null,
31642
31721
  property: null,
31643
31722
  results: number2,
@@ -31691,6 +31770,7 @@ var svg = create({
31691
31770
  markerEnd: "marker-end",
31692
31771
  markerMid: "marker-mid",
31693
31772
  markerStart: "marker-start",
31773
+ maskType: "mask-type",
31694
31774
  navDown: "nav-down",
31695
31775
  navDownLeft: "nav-down-left",
31696
31776
  navDownRight: "nav-down-right",
@@ -31961,6 +32041,7 @@ var svg = create({
31961
32041
  markerWidth: null,
31962
32042
  mask: null,
31963
32043
  maskContentUnits: null,
32044
+ maskType: null,
31964
32045
  maskUnits: null,
31965
32046
  mathematical: null,
31966
32047
  max: null,
@@ -40418,14 +40499,26 @@ var BIGINT = 8;
40418
40499
 
40419
40500
  // ../../node_modules/@ungap/structured-clone/esm/deserialize.js
40420
40501
  var env = typeof self === "object" ? self : globalThis;
40421
- var deserializer = ($4, _4) => {
40502
+ var guard = (name3, init) => {
40503
+ switch (name3) {
40504
+ case "Function":
40505
+ case "SharedWorker":
40506
+ case "Worker":
40507
+ case "eval":
40508
+ case "setInterval":
40509
+ case "setTimeout":
40510
+ throw new TypeError("unable to deserialize " + name3);
40511
+ }
40512
+ return new env[name3](init);
40513
+ };
40514
+ var deserializer = ($3, _4) => {
40422
40515
  const as = (out, index2) => {
40423
- $4.set(index2, out);
40516
+ $3.set(index2, out);
40424
40517
  return out;
40425
40518
  };
40426
40519
  const unpair = (index2) => {
40427
- if ($4.has(index2))
40428
- return $4.get(index2);
40520
+ if ($3.has(index2))
40521
+ return $3.get(index2);
40429
40522
  const [type, value] = _4[index2];
40430
40523
  switch (type) {
40431
40524
  case PRIMITIVE:
@@ -40463,7 +40556,7 @@ var deserializer = ($4, _4) => {
40463
40556
  }
40464
40557
  case ERROR: {
40465
40558
  const { name: name3, message } = value;
40466
- return as(new env[name3](message), index2);
40559
+ return as(guard(name3, message), index2);
40467
40560
  }
40468
40561
  case BIGINT:
40469
40562
  return as(BigInt(value), index2);
@@ -40476,7 +40569,7 @@ var deserializer = ($4, _4) => {
40476
40569
  return as(new DataView(buffer), value);
40477
40570
  }
40478
40571
  }
40479
- return as(new env[type](value), index2);
40572
+ return as(guard(type, value), index2);
40480
40573
  };
40481
40574
  return unpair;
40482
40575
  };
@@ -40514,15 +40607,15 @@ var typeOf = (value) => {
40514
40607
  return [OBJECT, asString];
40515
40608
  };
40516
40609
  var shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol");
40517
- var serializer = (strict, json2, $4, _4) => {
40610
+ var serializer = (strict, json2, $3, _4) => {
40518
40611
  const as = (out, value) => {
40519
40612
  const index2 = _4.push(out) - 1;
40520
- $4.set(value, index2);
40613
+ $3.set(value, index2);
40521
40614
  return index2;
40522
40615
  };
40523
40616
  const pair2 = (value) => {
40524
- if ($4.has(value))
40525
- return $4.get(value);
40617
+ if ($3.has(value))
40618
+ return $3.get(value);
40526
40619
  let [TYPE, type] = typeOf(value);
40527
40620
  switch (TYPE) {
40528
40621
  case PRIMITIVE: {
@@ -45547,7 +45640,7 @@ function remarkGfm(options) {
45547
45640
 
45548
45641
  // src/components/resource/BrowseView.tsx
45549
45642
  import { annotationId as toAnnotationId3 } from "@semiont/core";
45550
- import { getMimeCategory as getMimeCategory2, isPdfMimeType as isPdfMimeType3 } from "@semiont/core";
45643
+ import { capabilitiesOf as capabilitiesOf4 } from "@semiont/core";
45551
45644
  import { createHoverHandlers as createHoverHandlers3 } from "@semiont/sdk";
45552
45645
 
45553
45646
  // src/components/viewers/ImageViewer.tsx
@@ -45566,7 +45659,7 @@ function ImageViewer({ imageUrl, alt = "Resource image" }) {
45566
45659
 
45567
45660
  // src/components/resource/BrowseView.tsx
45568
45661
  import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
45569
- var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-CN3C3S55.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
45662
+ var PdfAnnotationCanvas2 = lazy2(() => import("./PdfAnnotationCanvas.client-NIMALXNZ.js").then((mod) => ({ default: mod.PdfAnnotationCanvas })));
45570
45663
  var MemoizedMarkdown = memo(function MemoizedMarkdown2({
45571
45664
  content: content4
45572
45665
  }) {
@@ -45590,7 +45683,7 @@ var BrowseView = memo(function BrowseView2({
45590
45683
  const { newAnnotationIds } = useResourceAnnotations();
45591
45684
  const session = useObservable(useSemiont().activeSession$);
45592
45685
  const containerRef = useRef16(null);
45593
- const category = getMimeCategory2(mimeType);
45686
+ const render = capabilitiesOf4(mimeType)?.render ?? "none";
45594
45687
  const { highlights, references, assessments, comments, tags: tags3 } = annotations;
45595
45688
  const allAnnotations = useMemo4(
45596
45689
  () => [...highlights, ...references, ...assessments, ...comments, ...tags3],
@@ -45678,7 +45771,7 @@ var BrowseView = memo(function BrowseView2({
45678
45771
  "beckon:hover": handleAnnotationHover,
45679
45772
  "beckon:focus": handleAnnotationFocus
45680
45773
  });
45681
- switch (category) {
45774
+ switch (render) {
45682
45775
  case "text":
45683
45776
  return /* @__PURE__ */ jsxs19("div", { className: "semiont-browse-view", "data-mime-type": "text", children: [
45684
45777
  /* @__PURE__ */ jsx27(
@@ -45694,31 +45787,30 @@ var BrowseView = memo(function BrowseView2({
45694
45787
  ),
45695
45788
  /* @__PURE__ */ jsx27("div", { ref: containerRef, className: "semiont-browse-view__content", children: /* @__PURE__ */ jsx27(MemoizedMarkdown, { content: content4 }) })
45696
45789
  ] });
45790
+ case "pdf":
45791
+ return /* @__PURE__ */ jsxs19("div", { className: "semiont-browse-view", "data-mime-type": "pdf", children: [
45792
+ /* @__PURE__ */ jsx27(
45793
+ AnnotateToolbar,
45794
+ {
45795
+ selectedMotivation: null,
45796
+ selectedClick,
45797
+ showSelectionGroup: false,
45798
+ showDeleteButton: false,
45799
+ annotateMode,
45800
+ annotators: ANNOTATORS
45801
+ }
45802
+ ),
45803
+ /* @__PURE__ */ jsx27("div", { ref: containerRef, className: "semiont-browse-view__content", children: /* @__PURE__ */ jsx27(Suspense2, { fallback: /* @__PURE__ */ jsx27("div", { className: "semiont-browse-view__loading", children: "Loading PDF viewer..." }), children: /* @__PURE__ */ jsx27(
45804
+ PdfAnnotationCanvas2,
45805
+ {
45806
+ pdfUrl: content4,
45807
+ existingAnnotations: allAnnotations,
45808
+ drawingMode: null,
45809
+ selectedMotivation: null
45810
+ }
45811
+ ) }) })
45812
+ ] });
45697
45813
  case "image":
45698
- if (isPdfMimeType3(mimeType)) {
45699
- return /* @__PURE__ */ jsxs19("div", { className: "semiont-browse-view", "data-mime-type": "pdf", children: [
45700
- /* @__PURE__ */ jsx27(
45701
- AnnotateToolbar,
45702
- {
45703
- selectedMotivation: null,
45704
- selectedClick,
45705
- showSelectionGroup: false,
45706
- showDeleteButton: false,
45707
- annotateMode,
45708
- annotators: ANNOTATORS
45709
- }
45710
- ),
45711
- /* @__PURE__ */ jsx27("div", { ref: containerRef, className: "semiont-browse-view__content", children: /* @__PURE__ */ jsx27(Suspense2, { fallback: /* @__PURE__ */ jsx27("div", { className: "semiont-browse-view__loading", children: "Loading PDF viewer..." }), children: /* @__PURE__ */ jsx27(
45712
- PdfAnnotationCanvas2,
45713
- {
45714
- pdfUrl: content4,
45715
- existingAnnotations: allAnnotations,
45716
- drawingMode: null,
45717
- selectedMotivation: null
45718
- }
45719
- ) }) })
45720
- ] });
45721
- }
45722
45814
  return /* @__PURE__ */ jsxs19("div", { className: "semiont-browse-view", "data-mime-type": "image", children: [
45723
45815
  /* @__PURE__ */ jsx27(
45724
45816
  AnnotateToolbar,
@@ -45740,7 +45832,7 @@ var BrowseView = memo(function BrowseView2({
45740
45832
  }
45741
45833
  ) })
45742
45834
  ] });
45743
- case "unsupported":
45835
+ case "none":
45744
45836
  return /* @__PURE__ */ jsx27("div", { ref: containerRef, className: "semiont-browse-view semiont-browse-view--unsupported", "data-mime-type": "unsupported", children: /* @__PURE__ */ jsxs19("div", { className: "semiont-browse-view__empty", children: [
45745
45837
  /* @__PURE__ */ jsxs19("p", { className: "semiont-browse-view__empty-message", children: [
45746
45838
  "Preview not available for ",
@@ -47144,16 +47236,50 @@ function HighlightPanel({
47144
47236
  }
47145
47237
 
47146
47238
  // src/components/resource/panels/JsonLdPanel.tsx
47147
- import { useEffect as useEffect31, useRef as useRef22 } from "react";
47239
+ import { useEffect as useEffect32, useRef as useRef22 } from "react";
47240
+
47241
+ // src/hooks/useResourceGraph.ts
47242
+ import { useEffect as useEffect31, useState as useState24 } from "react";
47243
+ function useResourceGraph(id2) {
47244
+ const semiont = useObservable(useSemiont().activeSession$)?.client;
47245
+ const [graph, setGraph] = useState24(null);
47246
+ const [loading, setLoading] = useState24(true);
47247
+ const [error, setError] = useState24(null);
47248
+ useEffect31(() => {
47249
+ if (!semiont || !id2) {
47250
+ setLoading(false);
47251
+ return;
47252
+ }
47253
+ let cancelled = false;
47254
+ setLoading(true);
47255
+ setError(null);
47256
+ semiont.browse.resourceGraph(id2).then((g2) => {
47257
+ if (cancelled) return;
47258
+ setGraph(g2);
47259
+ setLoading(false);
47260
+ }).catch((err) => {
47261
+ if (cancelled) return;
47262
+ setError(err instanceof Error ? err : new Error(String(err)));
47263
+ setLoading(false);
47264
+ });
47265
+ return () => {
47266
+ cancelled = true;
47267
+ };
47268
+ }, [semiont, id2]);
47269
+ return { graph, loading, error };
47270
+ }
47271
+
47272
+ // src/components/resource/panels/JsonLdPanel.tsx
47148
47273
  import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
47149
- function JsonLdPanel({ resource: semiontResource }) {
47274
+ function JsonLdPanel({ resourceId: resourceId2 }) {
47150
47275
  const editorRef = useRef22(null);
47151
47276
  const viewRef = useRef22(null);
47152
47277
  const { showLineNumbers } = useLineNumbers();
47153
- useEffect31(() => {
47154
- if (!editorRef.current) return;
47278
+ const { graph, loading, error } = useResourceGraph(resourceId2);
47279
+ const documentText = graph ? JSON.stringify(graph, null, 2) : "";
47280
+ useEffect32(() => {
47281
+ if (!editorRef.current || !documentText) return;
47155
47282
  const isDarkMode = document.documentElement?.classList.contains("dark") ?? false;
47156
- const jsonLdContent = JSON.stringify(semiontResource, null, 2);
47157
47283
  const extensions = [
47158
47284
  json(),
47159
47285
  EditorView.editable.of(false),
@@ -47169,7 +47295,7 @@ function JsonLdPanel({ resource: semiontResource }) {
47169
47295
  extensions.push(syntaxHighlighting(jsonLightHighlightStyle));
47170
47296
  }
47171
47297
  const state = EditorState.create({
47172
- doc: jsonLdContent,
47298
+ doc: documentText,
47173
47299
  extensions
47174
47300
  });
47175
47301
  const view = new EditorView({
@@ -47181,10 +47307,11 @@ function JsonLdPanel({ resource: semiontResource }) {
47181
47307
  view.destroy();
47182
47308
  viewRef.current = null;
47183
47309
  };
47184
- }, [semiontResource, showLineNumbers]);
47310
+ }, [documentText, showLineNumbers]);
47185
47311
  const handleCopyToClipboard = async () => {
47312
+ if (!documentText) return;
47186
47313
  try {
47187
- await navigator.clipboard.writeText(JSON.stringify(semiontResource, null, 2));
47314
+ await navigator.clipboard.writeText(documentText);
47188
47315
  } catch (err) {
47189
47316
  console.error("Failed to copy JSON-LD:", err);
47190
47317
  }
@@ -47198,10 +47325,13 @@ function JsonLdPanel({ resource: semiontResource }) {
47198
47325
  onClick: handleCopyToClipboard,
47199
47326
  className: "semiont-button semiont-button--icon",
47200
47327
  title: "Copy to clipboard",
47328
+ disabled: !graph,
47201
47329
  children: "\u{1F4CB} Copy"
47202
47330
  }
47203
47331
  )
47204
47332
  ] }),
47333
+ loading && /* @__PURE__ */ jsx37("p", { className: "semiont-jsonld-panel__status", role: "status", children: "Loading JSON-LD\u2026" }),
47334
+ error && !loading && /* @__PURE__ */ jsx37("p", { className: "semiont-jsonld-panel__status semiont-jsonld-panel__status--error", role: "alert", children: "Failed to load JSON-LD." }),
47205
47335
  /* @__PURE__ */ jsx37(
47206
47336
  "div",
47207
47337
  {
@@ -47394,7 +47524,7 @@ function ReferenceEntry({
47394
47524
  }
47395
47525
 
47396
47526
  // src/components/resource/panels/ReferencesPanel.tsx
47397
- import { useState as useState24, useRef as useRef23, useEffect as useEffect32, useCallback as useCallback21, useMemo as useMemo9 } from "react";
47527
+ import { useState as useState25, useRef as useRef23, useEffect as useEffect33, useCallback as useCallback21, useMemo as useMemo9 } from "react";
47398
47528
  import { getTextPositionSelector as getTextPositionSelector6, getTargetSelector as getTargetSelector9 } from "@semiont/core";
47399
47529
  import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
47400
47530
  function getSelectorDisplayText3(selector) {
@@ -47430,18 +47560,18 @@ function ReferencesPanel({
47430
47560
  }) {
47431
47561
  const t12 = useTranslations("ReferencesPanel");
47432
47562
  const session = useObservable(useSemiont().activeSession$);
47433
- const [selectedEntityTypes, setSelectedEntityTypes] = useState24([]);
47434
- const [lastAnnotationLog, setLastDetectionLog] = useState24(null);
47435
- const [pendingEntityTypes, setPendingEntityTypes] = useState24([]);
47436
- const [includeDescriptiveReferences, setIncludeDescriptiveReferences] = useState24(false);
47437
- const [focusedAnnotationId, setFocusedAnnotationId] = useState24(null);
47563
+ const [selectedEntityTypes, setSelectedEntityTypes] = useState25([]);
47564
+ const [lastAnnotationLog, setLastDetectionLog] = useState25(null);
47565
+ const [pendingEntityTypes, setPendingEntityTypes] = useState25([]);
47566
+ const [includeDescriptiveReferences, setIncludeDescriptiveReferences] = useState25(false);
47567
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState25(null);
47438
47568
  const containerRef = useRef23(null);
47439
- const [isAssistExpanded, setIsDetectExpanded] = useState24(() => {
47569
+ const [isAssistExpanded, setIsDetectExpanded] = useState25(() => {
47440
47570
  if (typeof window === "undefined") return true;
47441
47571
  const stored = localStorage.getItem("assist-section-expanded-reference");
47442
47572
  return stored ? stored === "true" : true;
47443
47573
  });
47444
- useEffect32(() => {
47574
+ useEffect33(() => {
47445
47575
  if (typeof window === "undefined") return;
47446
47576
  localStorage.setItem("assist-section-expanded-reference", String(isAssistExpanded));
47447
47577
  }, [isAssistExpanded]);
@@ -47461,7 +47591,7 @@ function ReferencesPanel({
47461
47591
  entryRefs.current.delete(id2);
47462
47592
  }
47463
47593
  }, []);
47464
- useEffect32(() => {
47594
+ useEffect33(() => {
47465
47595
  if (!scrollToAnnotationId) return;
47466
47596
  const element2 = entryRefs.current.get(scrollToAnnotationId);
47467
47597
  if (element2 && containerRef.current) {
@@ -47480,7 +47610,7 @@ function ReferencesPanel({
47480
47610
  console.warn("[ReferencesPanel] Element not found for scrollToAnnotationId:", scrollToAnnotationId);
47481
47611
  }
47482
47612
  }, [scrollToAnnotationId]);
47483
- useEffect32(() => {
47613
+ useEffect33(() => {
47484
47614
  if (!hoveredAnnotationId) return;
47485
47615
  const element2 = entryRefs.current.get(hoveredAnnotationId);
47486
47616
  if (!element2 || !containerRef.current) return;
@@ -47515,12 +47645,12 @@ function ReferencesPanel({
47515
47645
  });
47516
47646
  };
47517
47647
  const hasSavedLogRef = useRef23(false);
47518
- useEffect32(() => {
47648
+ useEffect33(() => {
47519
47649
  if (isAssisting) {
47520
47650
  hasSavedLogRef.current = false;
47521
47651
  return;
47522
47652
  }
47523
- if (!isAssisting && !hasSavedLogRef.current && progress?.completedEntityTypes) {
47653
+ if (!hasSavedLogRef.current && progress?.completedEntityTypes) {
47524
47654
  hasSavedLogRef.current = true;
47525
47655
  setLastDetectionLog(progress.completedEntityTypes);
47526
47656
  setSelectedEntityTypes([]);
@@ -47542,7 +47672,7 @@ function ReferencesPanel({
47542
47672
  setPendingEntityTypes([]);
47543
47673
  }
47544
47674
  };
47545
- useEffect32(() => {
47675
+ useEffect33(() => {
47546
47676
  if (!pendingAnnotation) return;
47547
47677
  const handleEscape = (e6) => {
47548
47678
  if (e6.key === "Escape") {
@@ -48008,7 +48138,7 @@ function TagEntry({
48008
48138
  }
48009
48139
 
48010
48140
  // src/components/resource/panels/TaggingPanel.tsx
48011
- import { useState as useState25, useEffect as useEffect33, useRef as useRef24, useCallback as useCallback22, useMemo as useMemo11 } from "react";
48141
+ import { useState as useState26, useEffect as useEffect34, useRef as useRef24, useCallback as useCallback22, useMemo as useMemo11 } from "react";
48012
48142
  import { getTextPositionSelector as getTextPositionSelector7, getTargetSelector as getTargetSelector10 } from "@semiont/core";
48013
48143
  import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs36 } from "react/jsx-runtime";
48014
48144
  function getSelectorDisplayText4(selector) {
@@ -48045,21 +48175,21 @@ function TaggingPanel({
48045
48175
  const schemasObserved = useObservable(tagSchemas$);
48046
48176
  const schemas = schemasObserved ?? [];
48047
48177
  const noSchemasRegistered = schemasObserved !== void 0 && schemasObserved.length === 0;
48048
- const [selectedSchemaId, setSelectedSchemaId] = useState25("");
48049
- const [selectedCategories, setSelectedCategories] = useState25(/* @__PURE__ */ new Set());
48050
- useEffect33(() => {
48178
+ const [selectedSchemaId, setSelectedSchemaId] = useState26("");
48179
+ const [selectedCategories, setSelectedCategories] = useState26(/* @__PURE__ */ new Set());
48180
+ useEffect34(() => {
48051
48181
  if (!selectedSchemaId && schemas.length > 0) {
48052
48182
  setSelectedSchemaId(schemas[0].id);
48053
48183
  }
48054
48184
  }, [schemas, selectedSchemaId]);
48055
- const [focusedAnnotationId, setFocusedAnnotationId] = useState25(null);
48185
+ const [focusedAnnotationId, setFocusedAnnotationId] = useState26(null);
48056
48186
  const containerRef = useRef24(null);
48057
- const [isAssistExpanded, setIsDetectExpanded] = useState25(() => {
48187
+ const [isAssistExpanded, setIsDetectExpanded] = useState26(() => {
48058
48188
  if (typeof window === "undefined") return true;
48059
48189
  const stored = localStorage.getItem("assist-section-expanded-tag");
48060
48190
  return stored ? stored === "true" : true;
48061
48191
  });
48062
- useEffect33(() => {
48192
+ useEffect34(() => {
48063
48193
  if (typeof window === "undefined") return;
48064
48194
  localStorage.setItem("assist-section-expanded-tag", String(isAssistExpanded));
48065
48195
  }, [isAssistExpanded]);
@@ -48086,7 +48216,7 @@ function TaggingPanel({
48086
48216
  entryRefs.current.delete(id2);
48087
48217
  }
48088
48218
  }, []);
48089
- useEffect33(() => {
48219
+ useEffect34(() => {
48090
48220
  if (!scrollToAnnotationId) return;
48091
48221
  const element2 = entryRefs.current.get(scrollToAnnotationId);
48092
48222
  if (element2 && containerRef.current) {
@@ -48101,7 +48231,7 @@ function TaggingPanel({
48101
48231
  if (onScrollCompleted) onScrollCompleted();
48102
48232
  }
48103
48233
  }, [scrollToAnnotationId]);
48104
- useEffect33(() => {
48234
+ useEffect34(() => {
48105
48235
  if (!hoveredAnnotationId) return;
48106
48236
  const element2 = entryRefs.current.get(hoveredAnnotationId);
48107
48237
  if (!element2 || !containerRef.current) return;
@@ -48152,7 +48282,7 @@ function TaggingPanel({
48152
48282
  setSelectedCategories(/* @__PURE__ */ new Set());
48153
48283
  }
48154
48284
  };
48155
- useEffect33(() => {
48285
+ useEffect34(() => {
48156
48286
  if (!pendingAnnotation) return;
48157
48287
  const handleEscape = (e6) => {
48158
48288
  if (e6.key === "Escape") {
@@ -48381,7 +48511,7 @@ function TaggingPanel({
48381
48511
  }
48382
48512
 
48383
48513
  // src/components/resource/panels/UnifiedAnnotationsPanel.tsx
48384
- import { useState as useState26, useEffect as useEffect34 } from "react";
48514
+ import { useState as useState27, useEffect as useEffect35 } from "react";
48385
48515
  import { jsx as jsx44, jsxs as jsxs37 } from "react/jsx-runtime";
48386
48516
  var TAB_ORDER = ["statistics", "reference", "highlight", "assessment", "comment", "tag"];
48387
48517
  function UnifiedAnnotationsPanel(props) {
@@ -48403,7 +48533,7 @@ function UnifiedAnnotationsPanel(props) {
48403
48533
  }
48404
48534
  }
48405
48535
  const grouped = groups;
48406
- const [activeTab, setActiveTab] = useState26(() => {
48536
+ const [activeTab, setActiveTab] = useState27(() => {
48407
48537
  if (typeof window === "undefined") return props.initialTab || "statistics";
48408
48538
  const storageKey = props.resourceId ? `annotations-tab-${props.resourceId}` : "annotations-tab-global";
48409
48539
  const stored = localStorage.getItem(storageKey);
@@ -48412,17 +48542,17 @@ function UnifiedAnnotationsPanel(props) {
48412
48542
  }
48413
48543
  return props.initialTab || "statistics";
48414
48544
  });
48415
- useEffect34(() => {
48545
+ useEffect35(() => {
48416
48546
  if (typeof window === "undefined") return;
48417
48547
  const storageKey = props.resourceId ? `annotations-tab-${props.resourceId}` : "annotations-tab-global";
48418
48548
  localStorage.setItem(storageKey, activeTab);
48419
48549
  }, [activeTab, props.resourceId]);
48420
- useEffect34(() => {
48550
+ useEffect35(() => {
48421
48551
  if (props.initialTab && props.initialTabGeneration !== void 0) {
48422
48552
  setActiveTab(props.initialTab);
48423
48553
  }
48424
48554
  }, [props.initialTabGeneration]);
48425
- useEffect34(() => {
48555
+ useEffect35(() => {
48426
48556
  if (props.pendingAnnotation) {
48427
48557
  const motivationToTab = {
48428
48558
  "linking": "reference",
@@ -48565,7 +48695,7 @@ function UnifiedAnnotationsPanel(props) {
48565
48695
  }
48566
48696
 
48567
48697
  // src/components/navigation/Footer.tsx
48568
- import { useState as useState27 } from "react";
48698
+ import { useState as useState28 } from "react";
48569
48699
  import { Fragment as Fragment9, jsx as jsx45, jsxs as jsxs38 } from "react/jsx-runtime";
48570
48700
  function Footer({
48571
48701
  Link,
@@ -48576,7 +48706,7 @@ function Footer({
48576
48706
  sourceCodeUrl = "https://github.com/The-AI-Alliance/semiont",
48577
48707
  showPolicyLinks = true
48578
48708
  }) {
48579
- const [showCookiePreferences, setShowCookiePreferences] = useState27(false);
48709
+ const [showCookiePreferences, setShowCookiePreferences] = useState28(false);
48580
48710
  return /* @__PURE__ */ jsxs38(Fragment9, { children: [
48581
48711
  /* @__PURE__ */ jsx45("footer", { role: "contentinfo", className: "semiont-footer", children: /* @__PURE__ */ jsx45("div", { className: "semiont-footer__container", children: /* @__PURE__ */ jsxs38("div", { className: "semiont-footer__content", children: [
48582
48712
  /* @__PURE__ */ jsx45("div", { className: "semiont-footer__copyright", children: t12("copyright", { year: (/* @__PURE__ */ new Date()).getFullYear() }) }),
@@ -48706,7 +48836,7 @@ function NavigationMenu({
48706
48836
  }
48707
48837
 
48708
48838
  // src/components/navigation/ObservableLink.tsx
48709
- import { useCallback as useCallback23, useRef as useRef25, useEffect as useEffect35 } from "react";
48839
+ import { useCallback as useCallback23, useRef as useRef25, useEffect as useEffect36 } from "react";
48710
48840
  import { jsx as jsx47 } from "react/jsx-runtime";
48711
48841
  function ObservableLink({
48712
48842
  href,
@@ -48717,7 +48847,7 @@ function ObservableLink({
48717
48847
  }) {
48718
48848
  const semiont = useSemiont();
48719
48849
  const onClickRef = useRef25(onClick);
48720
- useEffect35(() => {
48850
+ useEffect36(() => {
48721
48851
  onClickRef.current = onClick;
48722
48852
  });
48723
48853
  const handleClick = useCallback23((e6) => {
@@ -48739,7 +48869,7 @@ function ObservableLink({
48739
48869
  }
48740
48870
 
48741
48871
  // src/components/navigation/SimpleNavigation.tsx
48742
- import { useState as useState28, useRef as useRef26, useEffect as useEffect36 } from "react";
48872
+ import { useState as useState29, useRef as useRef26, useEffect as useEffect37 } from "react";
48743
48873
  import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
48744
48874
  function SimpleNavigation({
48745
48875
  title,
@@ -48754,12 +48884,12 @@ function SimpleNavigation({
48754
48884
  }) {
48755
48885
  const ChevronLeftIcon = icons.chevronLeft;
48756
48886
  const BarsIcon = icons.bars;
48757
- const [isDropdownOpen, setIsDropdownOpen] = useState28(false);
48887
+ const [isDropdownOpen, setIsDropdownOpen] = useState29(false);
48758
48888
  const dropdownRef = useRef26(null);
48759
48889
  const semiont = useSemiont();
48760
48890
  const toggleDropdown = () => setIsDropdownOpen(!isDropdownOpen);
48761
48891
  const closeDropdown = () => setIsDropdownOpen(false);
48762
- useEffect36(() => {
48892
+ useEffect37(() => {
48763
48893
  const handleClickOutside = (event) => {
48764
48894
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
48765
48895
  closeDropdown();
@@ -48835,14 +48965,14 @@ function SimpleNavigation({
48835
48965
  }
48836
48966
 
48837
48967
  // src/components/navigation/CollapsibleResourceNavigation.tsx
48838
- import { useCallback as useCallback29, useState as useState32, useRef as useRef31, useEffect as useEffect41 } from "react";
48968
+ import { useCallback as useCallback29, useState as useState33, useRef as useRef31, useEffect as useEffect42 } from "react";
48839
48969
 
48840
48970
  // ../../node_modules/@dnd-kit/core/dist/core.esm.js
48841
- import React18, { createContext as createContext5, useContext as useContext5, useEffect as useEffect38, useState as useState30, useCallback as useCallback26, useMemo as useMemo13, useRef as useRef28, memo as memo2, useReducer, cloneElement, forwardRef } from "react";
48971
+ import React18, { createContext as createContext5, useContext as useContext5, useEffect as useEffect39, useState as useState31, useCallback as useCallback26, useMemo as useMemo13, useRef as useRef28, memo as memo2, useReducer, cloneElement, forwardRef } from "react";
48842
48972
  import { createPortal, unstable_batchedUpdates } from "react-dom";
48843
48973
 
48844
48974
  // ../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js
48845
- import { useMemo as useMemo12, useLayoutEffect, useEffect as useEffect37, useRef as useRef27, useCallback as useCallback24 } from "react";
48975
+ import { useMemo as useMemo12, useLayoutEffect, useEffect as useEffect38, useRef as useRef27, useCallback as useCallback24 } from "react";
48846
48976
  function useCombinedRefs() {
48847
48977
  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
48848
48978
  refs[_key] = arguments[_key];
@@ -48910,7 +49040,7 @@ function getOwnerDocument(target) {
48910
49040
  }
48911
49041
  return document;
48912
49042
  }
48913
- var useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect37;
49043
+ var useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect38;
48914
49044
  function useEvent(handler) {
48915
49045
  const handlerRef = useRef27(handler);
48916
49046
  useIsomorphicLayoutEffect(() => {
@@ -48977,7 +49107,7 @@ function useNodeRef(onChange) {
48977
49107
  }
48978
49108
  function usePrevious(value) {
48979
49109
  const ref = useRef27();
48980
- useEffect37(() => {
49110
+ useEffect38(() => {
48981
49111
  ref.current = value;
48982
49112
  }, [value]);
48983
49113
  return ref.current;
@@ -49118,7 +49248,7 @@ function findFirstFocusableNode(element2) {
49118
49248
  }
49119
49249
 
49120
49250
  // ../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
49121
- import React17, { useState as useState29, useCallback as useCallback25 } from "react";
49251
+ import React17, { useState as useState30, useCallback as useCallback25 } from "react";
49122
49252
  var hiddenStyles = {
49123
49253
  display: "none"
49124
49254
  };
@@ -49161,7 +49291,7 @@ function LiveRegion(_ref) {
49161
49291
  }, announcement);
49162
49292
  }
49163
49293
  function useAnnouncement() {
49164
- const [announcement, setAnnouncement] = useState29("");
49294
+ const [announcement, setAnnouncement] = useState30("");
49165
49295
  const announce = useCallback25((value) => {
49166
49296
  if (value != null) {
49167
49297
  setAnnouncement(value);
@@ -49177,7 +49307,7 @@ function useAnnouncement() {
49177
49307
  var DndMonitorContext = /* @__PURE__ */ createContext5(null);
49178
49308
  function useDndMonitor(listener) {
49179
49309
  const registerListener = useContext5(DndMonitorContext);
49180
- useEffect38(() => {
49310
+ useEffect39(() => {
49181
49311
  if (!registerListener) {
49182
49312
  throw new Error("useDndMonitor must be used within a children of <DndContext>");
49183
49313
  }
@@ -49186,7 +49316,7 @@ function useDndMonitor(listener) {
49186
49316
  }, [listener, registerListener]);
49187
49317
  }
49188
49318
  function useDndMonitorProvider() {
49189
- const [listeners] = useState30(() => /* @__PURE__ */ new Set());
49319
+ const [listeners] = useState31(() => /* @__PURE__ */ new Set());
49190
49320
  const registerListener = useCallback26((listener) => {
49191
49321
  listeners.add(listener);
49192
49322
  return () => listeners.delete(listener);
@@ -49252,8 +49382,8 @@ function Accessibility(_ref) {
49252
49382
  announcement
49253
49383
  } = useAnnouncement();
49254
49384
  const liveRegionId = useUniqueId("DndLiveRegion");
49255
- const [mounted, setMounted] = useState30(false);
49256
- useEffect38(() => {
49385
+ const [mounted, setMounted] = useState31(false);
49386
+ useEffect39(() => {
49257
49387
  setMounted(true);
49258
49388
  }, []);
49259
49389
  useDndMonitor(useMemo13(() => ({
@@ -50621,7 +50751,7 @@ function useAutoScroller(_ref) {
50621
50751
  scrollContainer.scrollBy(scrollLeft, scrollTop);
50622
50752
  }, []);
50623
50753
  const sortedScrollableAncestors = useMemo13(() => order2 === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order2, scrollableAncestors]);
50624
- useEffect38(
50754
+ useEffect39(
50625
50755
  () => {
50626
50756
  if (!enabled || !scrollableAncestors.length || !rect) {
50627
50757
  clearAutoScrollInterval();
@@ -50762,7 +50892,7 @@ function useDroppableMeasuring(containers, _ref) {
50762
50892
  dependencies,
50763
50893
  config
50764
50894
  } = _ref;
50765
- const [queue, setQueue] = useState30(null);
50895
+ const [queue, setQueue] = useState31(null);
50766
50896
  const {
50767
50897
  frequency,
50768
50898
  measure,
@@ -50811,10 +50941,10 @@ function useDroppableMeasuring(containers, _ref) {
50811
50941
  }
50812
50942
  return previousValue;
50813
50943
  }, [containers, queue, dragging, disabled, measure]);
50814
- useEffect38(() => {
50944
+ useEffect39(() => {
50815
50945
  containersRef.current = containers;
50816
50946
  }, [containers]);
50817
- useEffect38(
50947
+ useEffect39(
50818
50948
  () => {
50819
50949
  if (disabled) {
50820
50950
  return;
@@ -50824,7 +50954,7 @@ function useDroppableMeasuring(containers, _ref) {
50824
50954
  // eslint-disable-next-line react-hooks/exhaustive-deps
50825
50955
  [dragging, disabled]
50826
50956
  );
50827
- useEffect38(
50957
+ useEffect39(
50828
50958
  () => {
50829
50959
  if (queue && queue.length > 0) {
50830
50960
  setQueue(null);
@@ -50833,7 +50963,7 @@ function useDroppableMeasuring(containers, _ref) {
50833
50963
  //eslint-disable-next-line react-hooks/exhaustive-deps
50834
50964
  [JSON.stringify(queue)]
50835
50965
  );
50836
- useEffect38(
50966
+ useEffect39(
50837
50967
  () => {
50838
50968
  if (disabled || typeof frequency !== "number" || timeoutId.current !== null) {
50839
50969
  return;
@@ -50891,7 +51021,7 @@ function useMutationObserver(_ref) {
50891
51021
  } = window;
50892
51022
  return new MutationObserver2(handleMutations);
50893
51023
  }, [handleMutations, disabled]);
50894
- useEffect38(() => {
51024
+ useEffect39(() => {
50895
51025
  return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();
50896
51026
  }, [mutationObserver]);
50897
51027
  return mutationObserver;
@@ -50915,7 +51045,7 @@ function useResizeObserver(_ref) {
50915
51045
  // eslint-disable-next-line react-hooks/exhaustive-deps
50916
51046
  [disabled]
50917
51047
  );
50918
- useEffect38(() => {
51048
+ useEffect39(() => {
50919
51049
  return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();
50920
51050
  }, [resizeObserver]);
50921
51051
  return resizeObserver;
@@ -50927,7 +51057,7 @@ function useRect(element2, measure, fallbackRect2) {
50927
51057
  if (measure === void 0) {
50928
51058
  measure = defaultMeasure;
50929
51059
  }
50930
- const [rect, setRect] = useState30(null);
51060
+ const [rect, setRect] = useState31(null);
50931
51061
  function measureRect() {
50932
51062
  setRect((currentRect) => {
50933
51063
  if (!element2) {
@@ -50995,13 +51125,13 @@ function useScrollableAncestors(node2) {
50995
51125
  }
50996
51126
  return getScrollableAncestors(node2);
50997
51127
  }, [node2]);
50998
- useEffect38(() => {
51128
+ useEffect39(() => {
50999
51129
  previousNode.current = node2;
51000
51130
  }, [node2]);
51001
51131
  return ancestors;
51002
51132
  }
51003
51133
  function useScrollOffsets(elements) {
51004
- const [scrollCoordinates, setScrollCoordinates] = useState30(null);
51134
+ const [scrollCoordinates, setScrollCoordinates] = useState31(null);
51005
51135
  const prevElements = useRef28(elements);
51006
51136
  const handleScroll = useCallback26((event) => {
51007
51137
  const scrollingElement = getScrollableElement(event.target);
@@ -51016,7 +51146,7 @@ function useScrollOffsets(elements) {
51016
51146
  return new Map(scrollCoordinates2);
51017
51147
  });
51018
51148
  }, []);
51019
- useEffect38(() => {
51149
+ useEffect39(() => {
51020
51150
  const previousElements = prevElements.current;
51021
51151
  if (elements !== previousElements) {
51022
51152
  cleanup(previousElements);
@@ -51056,14 +51186,14 @@ function useScrollOffsetsDelta(scrollOffsets, dependencies) {
51056
51186
  dependencies = [];
51057
51187
  }
51058
51188
  const initialScrollOffsets = useRef28(null);
51059
- useEffect38(
51189
+ useEffect39(
51060
51190
  () => {
51061
51191
  initialScrollOffsets.current = null;
51062
51192
  },
51063
51193
  // eslint-disable-next-line react-hooks/exhaustive-deps
51064
51194
  dependencies
51065
51195
  );
51066
- useEffect38(() => {
51196
+ useEffect39(() => {
51067
51197
  const hasScrollOffsets = scrollOffsets !== defaultCoordinates;
51068
51198
  if (hasScrollOffsets && !initialScrollOffsets.current) {
51069
51199
  initialScrollOffsets.current = scrollOffsets;
@@ -51075,7 +51205,7 @@ function useScrollOffsetsDelta(scrollOffsets, dependencies) {
51075
51205
  return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;
51076
51206
  }
51077
51207
  function useSensorSetup(sensors) {
51078
- useEffect38(
51208
+ useEffect39(
51079
51209
  () => {
51080
51210
  if (!canUseDOM) {
51081
51211
  return;
@@ -51126,7 +51256,7 @@ function useRects(elements, measure) {
51126
51256
  }
51127
51257
  const [firstElement] = elements;
51128
51258
  const windowRect2 = useWindowRect(firstElement ? getWindow(firstElement) : null);
51129
- const [rects, setRects] = useState30(defaultValue$2);
51259
+ const [rects, setRects] = useState31(defaultValue$2);
51130
51260
  function measureRects() {
51131
51261
  setRects(() => {
51132
51262
  if (!elements.length) {
@@ -51159,7 +51289,7 @@ function useDragOverlayMeasuring(_ref) {
51159
51289
  let {
51160
51290
  measure
51161
51291
  } = _ref;
51162
- const [rect, setRect] = useState30(null);
51292
+ const [rect, setRect] = useState31(null);
51163
51293
  const handleResize = useCallback26((entries) => {
51164
51294
  for (const {
51165
51295
  target
@@ -51415,7 +51545,7 @@ function RestoreFocus(_ref) {
51415
51545
  } = useContext5(InternalContext);
51416
51546
  const previousActivatorEvent = usePrevious(activatorEvent);
51417
51547
  const previousActiveId = usePrevious(active == null ? void 0 : active.id);
51418
- useEffect38(() => {
51548
+ useEffect39(() => {
51419
51549
  if (disabled) {
51420
51550
  return;
51421
51551
  }
@@ -51560,7 +51690,7 @@ var DndContext = /* @__PURE__ */ memo2(function DndContext2(_ref) {
51560
51690
  const store = useReducer(reducer, void 0, getInitialState);
51561
51691
  const [state, dispatch] = store;
51562
51692
  const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();
51563
- const [status, setStatus] = useState30(Status.Uninitialized);
51693
+ const [status, setStatus] = useState31(Status.Uninitialized);
51564
51694
  const isInitialized = status === Status.Initialized;
51565
51695
  const {
51566
51696
  draggable: {
@@ -51587,8 +51717,8 @@ var DndContext = /* @__PURE__ */ memo2(function DndContext2(_ref) {
51587
51717
  } : null;
51588
51718
  }, [activeId, node2]);
51589
51719
  const activeRef = useRef28(null);
51590
- const [activeSensor, setActiveSensor] = useState30(null);
51591
- const [activatorEvent, setActivatorEvent] = useState30(null);
51720
+ const [activeSensor, setActiveSensor] = useState31(null);
51721
+ const [activatorEvent, setActivatorEvent] = useState31(null);
51592
51722
  const latestProps = useLatestValue(props, Object.values(props));
51593
51723
  const draggableDescribedById = useUniqueId("DndDescribedBy", id2);
51594
51724
  const enabledDroppableContainers = useMemo13(() => droppableContainers.getEnabled(), [droppableContainers]);
@@ -51672,7 +51802,7 @@ var DndContext = /* @__PURE__ */ memo2(function DndContext2(_ref) {
51672
51802
  pointerCoordinates
51673
51803
  }) : null;
51674
51804
  const overId = getFirstCollision(collisions, "id");
51675
- const [over, setOver] = useState30(null);
51805
+ const [over, setOver] = useState31(null);
51676
51806
  const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);
51677
51807
  const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);
51678
51808
  const activeSensorRef = useRef28(null);
@@ -51866,7 +51996,7 @@ var DndContext = /* @__PURE__ */ memo2(function DndContext2(_ref) {
51866
51996
  setStatus(Status.Initialized);
51867
51997
  }
51868
51998
  }, [activeNodeRect, status]);
51869
- useEffect38(
51999
+ useEffect39(
51870
52000
  () => {
51871
52001
  const {
51872
52002
  onDragMove
@@ -51901,7 +52031,7 @@ var DndContext = /* @__PURE__ */ memo2(function DndContext2(_ref) {
51901
52031
  // eslint-disable-next-line react-hooks/exhaustive-deps
51902
52032
  [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]
51903
52033
  );
51904
- useEffect38(
52034
+ useEffect39(
51905
52035
  () => {
51906
52036
  const {
51907
52037
  active: active2,
@@ -52184,7 +52314,7 @@ function useDroppable(_ref) {
52184
52314
  }, [resizeObserver]);
52185
52315
  const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);
52186
52316
  const dataRef = useLatestValue(data2);
52187
- useEffect38(() => {
52317
+ useEffect39(() => {
52188
52318
  if (!resizeObserver || !nodeRef.current) {
52189
52319
  return;
52190
52320
  }
@@ -52192,7 +52322,7 @@ function useDroppable(_ref) {
52192
52322
  resizeObserverConnected.current = false;
52193
52323
  resizeObserver.observe(nodeRef.current);
52194
52324
  }, [nodeRef, resizeObserver]);
52195
- useEffect38(
52325
+ useEffect39(
52196
52326
  () => {
52197
52327
  dispatch({
52198
52328
  type: Action.RegisterDroppable,
@@ -52214,7 +52344,7 @@ function useDroppable(_ref) {
52214
52344
  // eslint-disable-next-line react-hooks/exhaustive-deps
52215
52345
  [id2]
52216
52346
  );
52217
- useEffect38(() => {
52347
+ useEffect39(() => {
52218
52348
  if (disabled !== previous3.current.disabled) {
52219
52349
  dispatch({
52220
52350
  type: Action.SetDroppableDisabled,
@@ -52236,7 +52366,7 @@ function useDroppable(_ref) {
52236
52366
  }
52237
52367
 
52238
52368
  // ../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js
52239
- import React19, { useMemo as useMemo14, useRef as useRef29, useEffect as useEffect39, useState as useState31, useContext as useContext6 } from "react";
52369
+ import React19, { useMemo as useMemo14, useRef as useRef29, useEffect as useEffect40, useState as useState32, useContext as useContext6 } from "react";
52240
52370
  function arrayMove(array, from, to) {
52241
52371
  const newArray = array.slice();
52242
52372
  newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
@@ -52403,7 +52533,7 @@ function SortableContext(_ref) {
52403
52533
  measureDroppableContainers(items);
52404
52534
  }
52405
52535
  }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);
52406
- useEffect39(() => {
52536
+ useEffect40(() => {
52407
52537
  previousItemsRef.current = items;
52408
52538
  }, [items]);
52409
52539
  const contextValue = useMemo14(
@@ -52477,7 +52607,7 @@ function useDerivedTransform(_ref) {
52477
52607
  node: node2,
52478
52608
  rect
52479
52609
  } = _ref;
52480
- const [derivedTransform, setDerivedtransform] = useState31(null);
52610
+ const [derivedTransform, setDerivedtransform] = useState32(null);
52481
52611
  const previousIndex = useRef29(index2);
52482
52612
  useIsomorphicLayoutEffect(() => {
52483
52613
  if (!disabled && index2 !== previousIndex.current && node2.current) {
@@ -52501,7 +52631,7 @@ function useDerivedTransform(_ref) {
52501
52631
  previousIndex.current = index2;
52502
52632
  }
52503
52633
  }, [disabled, index2, node2, rect]);
52504
- useEffect39(() => {
52634
+ useEffect40(() => {
52505
52635
  if (derivedTransform) {
52506
52636
  setDerivedtransform(null);
52507
52637
  }
@@ -52623,7 +52753,7 @@ function useSortable(_ref) {
52623
52753
  node: node2,
52624
52754
  rect
52625
52755
  });
52626
- useEffect39(() => {
52756
+ useEffect40(() => {
52627
52757
  if (isSorting && previous3.current.newIndex !== newIndex) {
52628
52758
  previous3.current.newIndex = newIndex;
52629
52759
  }
@@ -52634,7 +52764,7 @@ function useSortable(_ref) {
52634
52764
  previous3.current.items = items;
52635
52765
  }
52636
52766
  }, [isSorting, newIndex, containerId, items]);
52637
- useEffect39(() => {
52767
+ useEffect40(() => {
52638
52768
  if (activeId === previous3.current.activeId) {
52639
52769
  return;
52640
52770
  }
@@ -52819,7 +52949,7 @@ function isAfter(a15, b8) {
52819
52949
  }
52820
52950
 
52821
52951
  // src/components/navigation/SortableResourceTab.tsx
52822
- import { useCallback as useCallback27, useRef as useRef30, useEffect as useEffect40 } from "react";
52952
+ import { useCallback as useCallback27, useRef as useRef30, useEffect as useEffect41 } from "react";
52823
52953
  import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
52824
52954
  function SortableResourceTab({
52825
52955
  resource,
@@ -52843,7 +52973,7 @@ function SortableResourceTab({
52843
52973
  isDragging: isSortableDragging
52844
52974
  } = useSortable({ id: resource.id });
52845
52975
  const onReorderRef = useRef30(onReorder);
52846
- useEffect40(() => {
52976
+ useEffect41(() => {
52847
52977
  onReorderRef.current = onReorder;
52848
52978
  });
52849
52979
  const style = {
@@ -52970,7 +53100,7 @@ function CollapsibleResourceNavigation({
52970
53100
  }) {
52971
53101
  const ChevronLeftIcon = icons.chevronLeft;
52972
53102
  const BarsIcon = icons.bars;
52973
- const [isDropdownOpen, setIsDropdownOpen] = useState32(false);
53103
+ const [isDropdownOpen, setIsDropdownOpen] = useState33(false);
52974
53104
  const dropdownRef = useRef31(null);
52975
53105
  const { announcePickup, announceDrop, announceKeyboardReorder, announceCannotMove } = useDragAnnouncements();
52976
53106
  const t12 = useTranslations("CollapsibleResourceNavigation");
@@ -52986,7 +53116,7 @@ function CollapsibleResourceNavigation({
52986
53116
  };
52987
53117
  const toggleDropdown = () => setIsDropdownOpen(!isDropdownOpen);
52988
53118
  const closeDropdown = () => setIsDropdownOpen(false);
52989
- useEffect41(() => {
53119
+ useEffect42(() => {
52990
53120
  const handleClickOutside = (event) => {
52991
53121
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
52992
53122
  closeDropdown();
@@ -53184,10 +53314,10 @@ function CollapsibleResourceNavigation({
53184
53314
  }
53185
53315
 
53186
53316
  // src/components/modals/ReferenceWizardModal.tsx
53187
- import { useState as useState36, useEffect as useEffect43, useCallback as useCallback30 } from "react";
53317
+ import { useState as useState37, useEffect as useEffect44, useCallback as useCallback30 } from "react";
53188
53318
 
53189
53319
  // src/components/modals/GatherContextStep.tsx
53190
- import { useState as useState33, useEffect as useEffect42, useRef as useRef32 } from "react";
53320
+ import { useState as useState34, useEffect as useEffect43, useRef as useRef32 } from "react";
53191
53321
 
53192
53322
  // src/components/modals/ContextSummary.tsx
53193
53323
  import { Fragment as Fragment11, jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
@@ -53250,11 +53380,11 @@ function GatherContextStep({
53250
53380
  onCompose,
53251
53381
  translations: t12
53252
53382
  }) {
53253
- const [sourceExpanded, setSourceExpanded] = useState33(false);
53383
+ const [sourceExpanded, setSourceExpanded] = useState34(false);
53254
53384
  const contextReady = !contextLoading && !contextError && !!context;
53255
53385
  const sourceContext = context?.sourceContext;
53256
53386
  const highlightRef = useRef32(null);
53257
- useEffect42(() => {
53387
+ useEffect43(() => {
53258
53388
  if (highlightRef.current) {
53259
53389
  highlightRef.current.scrollIntoView({ block: "center", behavior: "instant" });
53260
53390
  }
@@ -53373,7 +53503,7 @@ function GatherContextStep({
53373
53503
  }
53374
53504
 
53375
53505
  // src/components/modals/ConfigureGenerationStep.tsx
53376
- import { useState as useState34 } from "react";
53506
+ import { useState as useState35 } from "react";
53377
53507
  import { LOCALES as LOCALES2 } from "@semiont/core";
53378
53508
  import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
53379
53509
  function ConfigureGenerationStep({
@@ -53385,12 +53515,12 @@ function ConfigureGenerationStep({
53385
53515
  onGenerate,
53386
53516
  translations: t12
53387
53517
  }) {
53388
- const [title, setTitle] = useState34(defaultTitle);
53389
- const [storagePath, setStoragePath] = useState34("");
53390
- const [prompt, setPrompt] = useState34("");
53391
- const [language2, setLanguage] = useState34(locale);
53392
- const [temperature, setTemperature] = useState34(0.7);
53393
- const [maxTokens, setMaxTokens] = useState34(500);
53518
+ const [title, setTitle] = useState35(defaultTitle);
53519
+ const [storagePath, setStoragePath] = useState35("");
53520
+ const [prompt, setPrompt] = useState35("");
53521
+ const [language2, setLanguage] = useState35(locale);
53522
+ const [temperature, setTemperature] = useState35(0.7);
53523
+ const [maxTokens, setMaxTokens] = useState35(500);
53394
53524
  const handleSubmit = (e6) => {
53395
53525
  e6.preventDefault();
53396
53526
  const trimmedPrompt = prompt.trim();
@@ -53549,7 +53679,7 @@ function ConfigureGenerationStep({
53549
53679
  }
53550
53680
 
53551
53681
  // src/components/modals/ConfigureSearchStep.tsx
53552
- import { useState as useState35 } from "react";
53682
+ import { useState as useState36 } from "react";
53553
53683
  import { jsx as jsx54, jsxs as jsxs46 } from "react/jsx-runtime";
53554
53684
  function ConfigureSearchStep({
53555
53685
  isSearching = false,
@@ -53558,8 +53688,8 @@ function ConfigureSearchStep({
53558
53688
  onSearch,
53559
53689
  translations: t12
53560
53690
  }) {
53561
- const [limit, setLimit] = useState35(10);
53562
- const [useSemanticScoring, setUseSemanticScoring] = useState35(true);
53691
+ const [limit, setLimit] = useState36(10);
53692
+ const [useSemanticScoring, setUseSemanticScoring] = useState36(true);
53563
53693
  const handleSubmit = (e6) => {
53564
53694
  e6.preventDefault();
53565
53695
  onSearch({ limit, useSemanticScoring });
@@ -53751,10 +53881,10 @@ function ReferenceWizardModal({
53751
53881
  translations: t12
53752
53882
  }) {
53753
53883
  const session = useObservable(useSemiont().activeSession$);
53754
- const [wizardStep, setWizardStep] = useState36({ step: "gather" });
53755
- const [isSearching, setIsSearching] = useState36(false);
53756
- const [userHint, setUserHint] = useState36("");
53757
- useEffect43(() => {
53884
+ const [wizardStep, setWizardStep] = useState37({ step: "gather" });
53885
+ const [isSearching, setIsSearching] = useState37(false);
53886
+ const [userHint, setUserHint] = useState37("");
53887
+ useEffect44(() => {
53758
53888
  if (isOpen) {
53759
53889
  setWizardStep({ step: "gather" });
53760
53890
  setIsSearching(false);
@@ -53943,7 +54073,7 @@ function ReferenceWizardModal({
53943
54073
  }
53944
54074
 
53945
54075
  // src/components/modals/SearchModal.tsx
53946
- import { useState as useState37, useEffect as useEffect44, useRef as useRef33 } from "react";
54076
+ import { useState as useState38, useEffect as useEffect45, useRef as useRef33 } from "react";
53947
54077
  var import_operators = __toESM(require_operators(), 1);
53948
54078
  import { getResourceId } from "@semiont/core";
53949
54079
  import { createSearchPipeline } from "@semiont/sdk";
@@ -53992,7 +54122,7 @@ function SearchModal({
53992
54122
  const semiont = useObservable(useSemiont().activeSession$)?.client;
53993
54123
  const semiontRef = useRef33(semiont);
53994
54124
  semiontRef.current = semiont;
53995
- const [selectedIndex, setSelectedIndex] = useState37(0);
54125
+ const [selectedIndex, setSelectedIndex] = useState38(0);
53996
54126
  const t12 = {
53997
54127
  placeholder: translations.placeholder || "Search resources, entities...",
53998
54128
  searching: translations.searching || "Searching...",
@@ -54004,7 +54134,7 @@ function SearchModal({
54004
54134
  enter: translations.enter || "Enter",
54005
54135
  esc: translations.esc || "ESC"
54006
54136
  };
54007
- const [pipeline] = useState37(
54137
+ const [pipeline] = useState38(
54008
54138
  () => createSearchPipeline(
54009
54139
  (q2) => semiontRef.current.browse.resources({ search: q2, limit: SEARCH_LIMIT }).pipe(
54010
54140
  (0, import_operators.map)((resources) => {
@@ -54024,21 +54154,21 @@ function SearchModal({
54024
54154
  { debounceMs: SEARCH_DEBOUNCE_MS }
54025
54155
  )
54026
54156
  );
54027
- useEffect44(() => () => pipeline.dispose(), [pipeline]);
54157
+ useEffect45(() => () => pipeline.dispose(), [pipeline]);
54028
54158
  const query = useObservable(pipeline.query$) ?? "";
54029
54159
  const searchState = useObservable(pipeline.state$);
54030
54160
  const results = searchState?.results ?? [];
54031
54161
  const loading = searchState?.isSearching ?? false;
54032
- useEffect44(() => {
54162
+ useEffect45(() => {
54033
54163
  if (isOpen) {
54034
54164
  pipeline.setQuery("");
54035
54165
  setSelectedIndex(0);
54036
54166
  }
54037
54167
  }, [isOpen, pipeline]);
54038
- useEffect44(() => {
54168
+ useEffect45(() => {
54039
54169
  setSelectedIndex(0);
54040
54170
  }, [results.length]);
54041
- useEffect44(() => {
54171
+ useEffect45(() => {
54042
54172
  if (!query.trim()) return;
54043
54173
  if (loading) {
54044
54174
  announceSearching();
@@ -54154,7 +54284,7 @@ function SearchModal({
54154
54284
  }
54155
54285
 
54156
54286
  // src/components/modals/ResourceSearchModal.tsx
54157
- import { useState as useState38, useEffect as useEffect45, useRef as useRef34 } from "react";
54287
+ import { useState as useState39, useEffect as useEffect46, useRef as useRef34 } from "react";
54158
54288
  var import_operators2 = __toESM(require_operators(), 1);
54159
54289
  import { getResourceId as getResourceId2, getPrimaryRepresentation } from "@semiont/core";
54160
54290
  import { createSearchPipeline as createSearchPipeline2 } from "@semiont/sdk";
@@ -54190,7 +54320,7 @@ function ResourceSearchModal({
54190
54320
  noResults: translations.noResults || "No documents found",
54191
54321
  close: translations.close || "\u2715"
54192
54322
  };
54193
- const [pipeline] = useState38(
54323
+ const [pipeline] = useState39(
54194
54324
  () => createSearchPipeline2(
54195
54325
  (q2) => semiontRef.current.browse.resources({ search: q2, limit: SEARCH_LIMIT2 }).pipe(
54196
54326
  (0, import_operators2.map)((resources) => {
@@ -54201,17 +54331,17 @@ function ResourceSearchModal({
54201
54331
  { debounceMs: SEARCH_DEBOUNCE_MS2, initialQuery: searchTerm }
54202
54332
  )
54203
54333
  );
54204
- useEffect45(() => () => pipeline.dispose(), [pipeline]);
54334
+ useEffect46(() => () => pipeline.dispose(), [pipeline]);
54205
54335
  const search2 = useObservable(pipeline.query$) ?? "";
54206
54336
  const searchState = useObservable(pipeline.state$);
54207
54337
  const results = searchState?.results ?? [];
54208
54338
  const loading = searchState?.isSearching ?? false;
54209
- useEffect45(() => {
54339
+ useEffect46(() => {
54210
54340
  if (isOpen && searchTerm) {
54211
54341
  pipeline.setQuery(searchTerm);
54212
54342
  }
54213
54343
  }, [isOpen, searchTerm, pipeline]);
54214
- useEffect45(() => {
54344
+ useEffect46(() => {
54215
54345
  if (!search2.trim()) return;
54216
54346
  if (loading) {
54217
54347
  announceSearching();
@@ -54331,7 +54461,7 @@ function SkipLinks() {
54331
54461
  }
54332
54462
 
54333
54463
  // src/components/StatusDisplay.tsx
54334
- import { useEffect as useEffect46, useState as useState39 } from "react";
54464
+ import { useEffect as useEffect47, useState as useState40 } from "react";
54335
54465
  import { jsx as jsx60, jsxs as jsxs52 } from "react/jsx-runtime";
54336
54466
  function StatusDisplay({
54337
54467
  isFullyAuthenticated = false,
@@ -54339,10 +54469,10 @@ function StatusDisplay({
54339
54469
  hasValidBackendToken = false
54340
54470
  }) {
54341
54471
  const semiont = useObservable(useSemiont().activeSession$)?.client;
54342
- const [data2, setData] = useState39(null);
54343
- const [loading, setLoading] = useState39(true);
54344
- const [error, setError] = useState39(null);
54345
- useEffect46(() => {
54472
+ const [data2, setData] = useState40(null);
54473
+ const [loading, setLoading] = useState40(true);
54474
+ const [error, setError] = useState40(null);
54475
+ useEffect47(() => {
54346
54476
  if (!semiont) {
54347
54477
  setLoading(false);
54348
54478
  return;
@@ -54434,11 +54564,11 @@ function SessionTimer() {
54434
54564
  }
54435
54565
 
54436
54566
  // src/components/SessionExpiryBanner.tsx
54437
- import { useState as useState40 } from "react";
54567
+ import { useState as useState41 } from "react";
54438
54568
  import { jsx as jsx61, jsxs as jsxs54 } from "react/jsx-runtime";
54439
54569
  function SessionExpiryBanner() {
54440
54570
  const { timeRemaining, isExpiringSoon } = useSessionExpiry();
54441
- const [dismissed, setDismissed] = useState40(false);
54571
+ const [dismissed, setDismissed] = useState41(false);
54442
54572
  const formattedTime = formatTime(timeRemaining);
54443
54573
  if (!isExpiringSoon || dismissed || !formattedTime) {
54444
54574
  return null;
@@ -54659,7 +54789,7 @@ function UnifiedHeader({
54659
54789
  }
54660
54790
 
54661
54791
  // src/components/layout/LeftSidebar.tsx
54662
- import { useState as useState41, useEffect as useEffect47 } from "react";
54792
+ import { useState as useState42, useEffect as useEffect48 } from "react";
54663
54793
  import { jsx as jsx65, jsxs as jsxs57 } from "react/jsx-runtime";
54664
54794
  function LeftSidebar({
54665
54795
  Link,
@@ -54674,7 +54804,7 @@ function LeftSidebar({
54674
54804
  isModerator = false,
54675
54805
  currentPath
54676
54806
  }) {
54677
- const [isCollapsed, setIsCollapsed] = useState41(false);
54807
+ const [isCollapsed, setIsCollapsed] = useState42(false);
54678
54808
  const { width, setWidth, minWidth, maxWidth } = usePanelWidth({
54679
54809
  defaultWidth: 256,
54680
54810
  // 16rem
@@ -54684,7 +54814,7 @@ function LeftSidebar({
54684
54814
  // 25rem
54685
54815
  storageKey: "semiont-left-sidebar-width"
54686
54816
  });
54687
- useEffect47(() => {
54817
+ useEffect48(() => {
54688
54818
  if (collapsible) {
54689
54819
  const saved = localStorage.getItem(storageKey);
54690
54820
  if (saved === "true") {
@@ -55873,7 +56003,7 @@ function ExportCard({ onExport, isExporting, translations: t12 }) {
55873
56003
  }
55874
56004
 
55875
56005
  // src/features/admin-exchange/components/ImportCard.tsx
55876
- import { useRef as useRef35, useState as useState42, useCallback as useCallback32 } from "react";
56006
+ import { useRef as useRef35, useState as useState43, useCallback as useCallback32 } from "react";
55877
56007
  import { jsx as jsx74, jsxs as jsxs64 } from "react/jsx-runtime";
55878
56008
  function ImportCard({
55879
56009
  onFileSelected,
@@ -55885,8 +56015,8 @@ function ImportCard({
55885
56015
  translations: t12
55886
56016
  }) {
55887
56017
  const fileInputRef = useRef35(null);
55888
- const [isDragActive, setIsDragActive] = useState42(false);
55889
- const [showConfirm, setShowConfirm] = useState42(false);
56018
+ const [isDragActive, setIsDragActive] = useState43(false);
56019
+ const [showConfirm, setShowConfirm] = useState43(false);
55890
56020
  const handleDragOver = useCallback32((e6) => {
55891
56021
  e6.preventDefault();
55892
56022
  setIsDragActive(true);
@@ -55963,7 +56093,7 @@ function ImportCard({
55963
56093
  ] }),
55964
56094
  Object.keys(preview.stats).length > 0 && /* @__PURE__ */ jsxs64("div", { className: "semiont-exchange__preview-row", children: [
55965
56095
  /* @__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(([k5, v4]) => `${v4} ${k5}`).join(", ") })
56096
+ /* @__PURE__ */ jsx74("span", { className: "semiont-exchange__preview-value", children: Object.entries(preview.stats).map(([k6, v4]) => `${v4} ${k6}`).join(", ") })
55967
56097
  ] })
55968
56098
  ] }),
55969
56099
  showConfirm && /* @__PURE__ */ jsxs64("div", { className: "semiont-exchange__confirm", children: [
@@ -56012,33 +56142,35 @@ function ImportCard({
56012
56142
  }
56013
56143
 
56014
56144
  // src/features/admin-exchange/components/ImportProgress.tsx
56015
- import { Fragment as Fragment14, jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
56145
+ import { jsx as jsx75, jsxs as jsxs65 } from "react/jsx-runtime";
56016
56146
  var PHASE_LABELS = {
56017
56147
  started: "phaseStarted",
56018
- "entity-types": "phaseEntityTypes",
56019
- resources: "phaseResources",
56020
- annotations: "phaseAnnotations",
56021
56148
  complete: "phaseComplete",
56022
56149
  error: "phaseError"
56023
56150
  };
56151
+ var STAT_LABELS = {
56152
+ eventsReplayed: "statsEventsReplayed",
56153
+ resourcesCreated: "statsResourcesCreated",
56154
+ annotationsCreated: "statsAnnotationsCreated",
56155
+ entityTypesAdded: "statsEntityTypesAdded"
56156
+ };
56024
56157
  function ImportProgress({ phase, message, result, translations: t12 }) {
56025
56158
  const labelKey = PHASE_LABELS[phase];
56026
56159
  const phaseLabel = labelKey ? t12[labelKey] : phase;
56027
56160
  const isComplete = phase === "complete";
56028
56161
  const isError = phase === "error";
56162
+ const stats = result?.stats != null && typeof result.stats === "object" ? result.stats : void 0;
56163
+ const statEntries = stats ? Object.entries(stats).filter((entry) => typeof entry[1] === "number") : [];
56029
56164
  return /* @__PURE__ */ jsxs65("div", { className: "semiont-exchange__progress", children: [
56030
56165
  /* @__PURE__ */ jsx75("div", { className: `semiont-exchange__phase-label${isError ? " semiont-exchange__phase-label--error" : isComplete ? " semiont-exchange__phase-label--complete" : ""}`, children: phaseLabel }),
56031
56166
  message && !isComplete && !isError && /* @__PURE__ */ jsx75("p", { className: "semiont-exchange__progress-message", children: message }),
56032
- isComplete && result && /* @__PURE__ */ jsxs65("div", { className: "semiont-exchange__result", children: [
56033
- result.stats != null && typeof result.stats === "object" && /* @__PURE__ */ jsx75(Fragment14, { children: Object.entries(result.stats).map(([key, value]) => {
56034
- const label = key === "streams" ? t12.streams : key === "events" ? t12.events : key === "blobs" ? t12.blobs : key;
56035
- return /* @__PURE__ */ jsxs65("div", { className: "semiont-exchange__result-stat", children: [
56036
- /* @__PURE__ */ jsx75("span", { className: "semiont-exchange__result-value", children: value }),
56037
- /* @__PURE__ */ jsx75("span", { className: "semiont-exchange__result-label", children: label })
56038
- ] }, key);
56039
- }) }),
56040
- result.hashChainValid !== void 0 && /* @__PURE__ */ jsx75("div", { className: `semiont-exchange__hash-badge${result.hashChainValid ? " semiont-exchange__hash-badge--valid" : " semiont-exchange__hash-badge--invalid"}`, children: result.hashChainValid ? t12.hashChainValid : t12.hashChainInvalid })
56041
- ] }),
56167
+ isComplete && statEntries.length > 0 && /* @__PURE__ */ jsx75("div", { className: "semiont-exchange__result", children: statEntries.map(([key, value]) => {
56168
+ const statKey = STAT_LABELS[key];
56169
+ return /* @__PURE__ */ jsxs65("div", { className: "semiont-exchange__result-stat", children: [
56170
+ /* @__PURE__ */ jsx75("span", { className: "semiont-exchange__result-value", children: value }),
56171
+ /* @__PURE__ */ jsx75("span", { className: "semiont-exchange__result-label", children: statKey ? t12[statKey] : key })
56172
+ ] }, key);
56173
+ }) }),
56042
56174
  isError && message && /* @__PURE__ */ jsx75("p", { className: "semiont-exchange__error-message", children: message })
56043
56175
  ] });
56044
56176
  }
@@ -56297,8 +56429,8 @@ function LinkedDataPage({
56297
56429
  }
56298
56430
 
56299
56431
  // src/features/admin-users/components/AdminUsersPage.tsx
56300
- import { useState as useState43 } from "react";
56301
- import { Fragment as Fragment15, jsx as jsx79, jsxs as jsxs69 } from "react/jsx-runtime";
56432
+ import { useState as useState44 } from "react";
56433
+ import { Fragment as Fragment14, jsx as jsx79, jsxs as jsxs69 } from "react/jsx-runtime";
56302
56434
  function UserTableRow({
56303
56435
  user,
56304
56436
  onUpdate,
@@ -56379,9 +56511,9 @@ function AdminUsersPage({
56379
56511
  Toolbar: Toolbar2,
56380
56512
  buttonStyles: buttonStyles2
56381
56513
  }) {
56382
- const [searchTerm, setSearchTerm] = useState43("");
56383
- const [selectedRole, setSelectedRole] = useState43("all");
56384
- const [selectedStatus, setSelectedStatus] = useState43("all");
56514
+ const [searchTerm, setSearchTerm] = useState44("");
56515
+ const [selectedRole, setSelectedRole] = useState44("all");
56516
+ const [selectedStatus, setSelectedStatus] = useState44("all");
56385
56517
  const filteredUsers = users.filter((user) => {
56386
56518
  const matchesSearch = (user.name || "").toLowerCase().includes(searchTerm.toLowerCase()) || user.email.toLowerCase().includes(searchTerm.toLowerCase());
56387
56519
  const userRole = user.isAdmin ? "admin" : "user";
@@ -56408,7 +56540,7 @@ function AdminUsersPage({
56408
56540
  /* @__PURE__ */ jsx79("div", { className: "semiont-skeleton semiont-skeleton--text" }),
56409
56541
  /* @__PURE__ */ jsx79("div", { className: "semiont-skeleton semiont-skeleton--number" })
56410
56542
  ] })
56411
- ] }) }, i12)) : /* @__PURE__ */ jsxs69(Fragment15, { children: [
56543
+ ] }) }, i12)) : /* @__PURE__ */ jsxs69(Fragment14, { children: [
56412
56544
  /* @__PURE__ */ jsx79("div", { className: "semiont-stat-card", children: /* @__PURE__ */ jsxs69("div", { className: "semiont-stat-card__content", children: [
56413
56545
  /* @__PURE__ */ jsx79("div", { className: "semiont-stat-card__icon-wrapper", children: /* @__PURE__ */ jsx79(UserCircleIcon_default, { className: "semiont-stat-card__icon semiont-stat-card__icon--primary" }) }),
56414
56546
  /* @__PURE__ */ jsxs69("div", { className: "semiont-stat-card__text", children: [
@@ -56546,7 +56678,7 @@ function AdminUsersPage({
56546
56678
 
56547
56679
  // src/features/auth/components/SignInForm.tsx
56548
56680
  import React45 from "react";
56549
- import { Fragment as Fragment16, jsx as jsx80, jsxs as jsxs70 } from "react/jsx-runtime";
56681
+ import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs70 } from "react/jsx-runtime";
56550
56682
  function GoogleIcon() {
56551
56683
  return /* @__PURE__ */ jsxs70("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
56552
56684
  /* @__PURE__ */ jsx80(
@@ -56645,7 +56777,7 @@ function CredentialsAuthForm({
56645
56777
  ]
56646
56778
  }
56647
56779
  ) : null;
56648
- return /* @__PURE__ */ jsxs70(Fragment16, { children: [
56780
+ return /* @__PURE__ */ jsxs70(Fragment15, { children: [
56649
56781
  validationError && /* @__PURE__ */ jsx80("div", { className: "semiont-auth__error", role: "alert", "aria-live": "polite", children: /* @__PURE__ */ jsx80("div", { className: "semiont-auth__error-text", children: validationError }) }),
56650
56782
  /* @__PURE__ */ jsxs70("form", { onSubmit: handleSubmit, className: "semiont-auth__form", noValidate: true, children: [
56651
56783
  /* @__PURE__ */ jsxs70("div", { className: "semiont-form__field", children: [
@@ -56750,7 +56882,7 @@ function SignInForm({
56750
56882
  /* @__PURE__ */ jsx80("p", { className: "semiont-auth__subtitle", children: t12.signInPrompt })
56751
56883
  ] }),
56752
56884
  error && /* @__PURE__ */ jsx80("div", { className: "semiont-auth__error-container", children: /* @__PURE__ */ jsx80("div", { className: "semiont-auth__error", children: /* @__PURE__ */ jsx80("div", { className: "semiont-auth__error-text", children: error }) }) }),
56753
- /* @__PURE__ */ jsx80("div", { className: "semiont-auth__forms", children: !isLoading ? /* @__PURE__ */ jsxs70(Fragment16, { children: [
56885
+ /* @__PURE__ */ jsx80("div", { className: "semiont-auth__forms", children: !isLoading ? /* @__PURE__ */ jsxs70(Fragment15, { children: [
56754
56886
  showCredentialsAuth && onCredentialsSignIn && /* @__PURE__ */ jsx80(
56755
56887
  CredentialsAuthForm,
56756
56888
  {
@@ -56769,7 +56901,7 @@ function SignInForm({
56769
56901
  }
56770
56902
 
56771
56903
  // src/features/auth/components/SignUpForm.tsx
56772
- import { useState as useState44 } from "react";
56904
+ import { useState as useState45 } from "react";
56773
56905
  import { jsx as jsx81, jsxs as jsxs71 } from "react/jsx-runtime";
56774
56906
  function GoogleIcon2() {
56775
56907
  return /* @__PURE__ */ jsxs71("svg", { className: "semiont-icon semiont-icon--small semiont-icon--inline", viewBox: "0 0 24 24", children: [
@@ -56804,7 +56936,7 @@ function GoogleIcon2() {
56804
56936
  ] });
56805
56937
  }
56806
56938
  function SignUpForm({ onSignUp, Link, translations: t12 }) {
56807
- const [isLoading, setIsLoading] = useState44(false);
56939
+ const [isLoading, setIsLoading] = useState45(false);
56808
56940
  const handleSignUp = async () => {
56809
56941
  setIsLoading(true);
56810
56942
  try {
@@ -57009,7 +57141,7 @@ function WelcomePage({
57009
57141
  }
57010
57142
 
57011
57143
  // src/features/moderate-entity-tags/components/EntityTagsPage.tsx
57012
- import { Fragment as Fragment17, jsx as jsx84, jsxs as jsxs74 } from "react/jsx-runtime";
57144
+ import { Fragment as Fragment16, jsx as jsx84, jsxs as jsxs74 } from "react/jsx-runtime";
57013
57145
  function EntityTagsPage({
57014
57146
  entityTypes,
57015
57147
  error,
@@ -57070,7 +57202,7 @@ function EntityTagsPage({
57070
57202
  onClick: onAddTag,
57071
57203
  disabled: isAddingTag || !newTag.trim(),
57072
57204
  className: "semiont-button semiont-button--primary",
57073
- children: isAddingTag ? t12.adding : /* @__PURE__ */ jsxs74(Fragment17, { children: [
57205
+ children: isAddingTag ? t12.adding : /* @__PURE__ */ jsxs74(Fragment16, { children: [
57074
57206
  /* @__PURE__ */ jsx84(PlusIcon_default, { className: "semiont-icon semiont-icon--small semiont-icon--inline" }),
57075
57207
  t12.addTag
57076
57208
  ] })
@@ -57261,11 +57393,11 @@ function TagSchemasPage({
57261
57393
  }
57262
57394
 
57263
57395
  // src/features/resource-compose/components/ResourceComposePage.tsx
57264
- import { useState as useState45, useEffect as useEffect48 } from "react";
57265
- import { isImageMimeType, isPdfMimeType as isPdfMimeType4, LOCALES as LOCALES3 } from "@semiont/core";
57396
+ import { useState as useState46, useEffect as useEffect49 } from "react";
57397
+ import { capabilitiesOf as capabilitiesOf5, AUTHORABLE_MEDIA_TYPES, MEDIA_TYPES, mediaTypeForExtension, isSupportedMediaType, LOCALES as LOCALES3 } from "@semiont/core";
57266
57398
 
57267
57399
  // src/features/resource-compose/components/UploadProgressBar.tsx
57268
- import { Fragment as Fragment18, jsx as jsx87, jsxs as jsxs77 } from "react/jsx-runtime";
57400
+ import { Fragment as Fragment17, jsx as jsx87, jsxs as jsxs77 } from "react/jsx-runtime";
57269
57401
  function formatBytes(bytes) {
57270
57402
  if (bytes < 1024) return `${bytes} B`;
57271
57403
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
@@ -57292,7 +57424,7 @@ function UploadProgressBar({ progress, label = "Upload" }) {
57292
57424
  ": ",
57293
57425
  formatBytes(progress.bytesUploaded),
57294
57426
  "\u2026"
57295
- ] }) : /* @__PURE__ */ jsxs77(Fragment18, { children: [
57427
+ ] }) : /* @__PURE__ */ jsxs77(Fragment17, { children: [
57296
57428
  /* @__PURE__ */ jsxs77("span", { children: [
57297
57429
  label,
57298
57430
  ": ",
@@ -57335,6 +57467,15 @@ function UploadProgressBar({ progress, label = "Upload" }) {
57335
57467
 
57336
57468
  // src/features/resource-compose/components/ResourceComposePage.tsx
57337
57469
  import { jsx as jsx88, jsxs as jsxs78 } from "react/jsx-runtime";
57470
+ var UPLOAD_ACCEPT = Object.values(MEDIA_TYPES).map((c12) => c12.extension).join(",");
57471
+ function detectUploadMediaType(file) {
57472
+ if (file.type && isSupportedMediaType(file.type)) return file.type;
57473
+ if (file.name.includes(".")) {
57474
+ const byExt = mediaTypeForExtension(file.name.slice(file.name.lastIndexOf(".")));
57475
+ if (byExt) return byExt;
57476
+ }
57477
+ return "application/octet-stream";
57478
+ }
57338
57479
  function ResourceComposePage({
57339
57480
  mode,
57340
57481
  cloneData,
@@ -57354,20 +57495,20 @@ function ResourceComposePage({
57354
57495
  Toolbar: Toolbar2
57355
57496
  }) {
57356
57497
  const { announceFormSubmitting, announceFormSuccess, announceFormError } = useFormAnnouncements();
57357
- const [newResourceName, setNewResourceName] = useState45("");
57358
- const [newResourceContent, setNewResourceContent] = useState45("");
57359
- const [selectedEntityTypes, setSelectedEntityTypes] = useState45([]);
57360
- const [isCreating, setIsCreating] = useState45(false);
57361
- const [inputMethod, setInputMethod] = useState45("write");
57362
- const [uploadedFile, setUploadedFile] = useState45(null);
57363
- const [fileMimeType, setFileMimeType] = useState45("text/markdown");
57364
- const [filePreviewUrl, setFilePreviewUrl] = useState45(null);
57365
- const [selectedFormat, setSelectedFormat] = useState45("text/markdown");
57366
- const [selectedLanguage, setSelectedLanguage] = useState45(initialLocale);
57367
- const [selectedCharset, setSelectedCharset] = useState45("");
57368
- const [storagePath, setStoragePath] = useState45("");
57369
- const [archiveOriginal, setArchiveOriginal] = useState45(true);
57370
- useEffect48(() => {
57498
+ const [newResourceName, setNewResourceName] = useState46("");
57499
+ const [newResourceContent, setNewResourceContent] = useState46("");
57500
+ const [selectedEntityTypes, setSelectedEntityTypes] = useState46([]);
57501
+ const [isCreating, setIsCreating] = useState46(false);
57502
+ const [inputMethod, setInputMethod] = useState46("write");
57503
+ const [uploadedFile, setUploadedFile] = useState46(null);
57504
+ const [fileMimeType, setFileMimeType] = useState46("text/markdown");
57505
+ const [filePreviewUrl, setFilePreviewUrl] = useState46(null);
57506
+ const [selectedFormat, setSelectedFormat] = useState46("text/markdown");
57507
+ const [selectedLanguage, setSelectedLanguage] = useState46(initialLocale);
57508
+ const [selectedCharset, setSelectedCharset] = useState46("");
57509
+ const [storagePath, setStoragePath] = useState46("");
57510
+ const [archiveOriginal, setArchiveOriginal] = useState46(true);
57511
+ useEffect49(() => {
57371
57512
  if (mode === "clone" && cloneData) {
57372
57513
  setNewResourceName(cloneData.sourceResource.name);
57373
57514
  setNewResourceContent(cloneData.sourceContent);
@@ -57381,14 +57522,16 @@ function ResourceComposePage({
57381
57522
  const handleFileUpload = (e6) => {
57382
57523
  const file = e6.target.files?.[0];
57383
57524
  if (!file) return;
57525
+ const detectedMediaType = detectUploadMediaType(file);
57384
57526
  setUploadedFile(file);
57385
- setFileMimeType(file.type);
57527
+ setFileMimeType(detectedMediaType);
57386
57528
  setInputMethod("upload");
57387
57529
  if (!newResourceName) {
57388
57530
  const nameWithoutExt = file.name.replace(/\.[^/.]+$/, "");
57389
57531
  setNewResourceName(nameWithoutExt);
57390
57532
  }
57391
- if (isImageMimeType(file.type) || isPdfMimeType4(file.type)) {
57533
+ const detectedRender = capabilitiesOf5(detectedMediaType)?.render;
57534
+ if (detectedRender === "image" || detectedRender === "pdf") {
57392
57535
  const previewUrl = URL.createObjectURL(file);
57393
57536
  setFilePreviewUrl(previewUrl);
57394
57537
  } else {
@@ -57400,7 +57543,7 @@ function ResourceComposePage({
57400
57543
  reader.readAsText(file);
57401
57544
  }
57402
57545
  };
57403
- useEffect48(() => {
57546
+ useEffect49(() => {
57404
57547
  return () => {
57405
57548
  if (filePreviewUrl) {
57406
57549
  URL.revokeObjectURL(filePreviewUrl);
@@ -57651,7 +57794,7 @@ function ResourceComposePage({
57651
57794
  "input",
57652
57795
  {
57653
57796
  type: "file",
57654
- accept: "text/plain,text/markdown,image/png,image/jpeg,application/pdf",
57797
+ accept: UPLOAD_ACCEPT,
57655
57798
  onChange: handleFileUpload,
57656
57799
  className: "semiont-form__upload-input",
57657
57800
  disabled: isCreating
@@ -57683,7 +57826,7 @@ function ResourceComposePage({
57683
57826
  /* @__PURE__ */ jsx88("code", { className: "semiont-form__media-type-value", children: fileMimeType }),
57684
57827
  /* @__PURE__ */ jsx88("span", { className: "semiont-form__media-type-lock", title: t12.autoDetected, children: "\u{1F512}" })
57685
57828
  ] }),
57686
- uploadedFile && filePreviewUrl && isImageMimeType(fileMimeType) && /* @__PURE__ */ jsxs78("div", { className: "semiont-form__image-preview", children: [
57829
+ uploadedFile && filePreviewUrl && capabilitiesOf5(fileMimeType)?.render === "image" && /* @__PURE__ */ jsxs78("div", { className: "semiont-form__image-preview", children: [
57687
57830
  /* @__PURE__ */ jsx88("p", { className: "semiont-form__image-preview-label", children: "Preview:" }),
57688
57831
  /* @__PURE__ */ jsx88("div", { className: "semiont-form__image-preview-container", children: /* @__PURE__ */ jsx88(
57689
57832
  "img",
@@ -57698,7 +57841,7 @@ function ResourceComposePage({
57698
57841
  (isClone || isReferenceCompletion || inputMethod === "write") && /* @__PURE__ */ jsxs78("div", { className: "semiont-form__write-section", children: [
57699
57842
  !isClone && !isReferenceCompletion && /* @__PURE__ */ jsxs78("div", { className: "semiont-form__field", children: [
57700
57843
  /* @__PURE__ */ jsx88("label", { htmlFor: "format-select", className: "semiont-form__label", children: t12.format }),
57701
- /* @__PURE__ */ jsxs78(
57844
+ /* @__PURE__ */ jsx88(
57702
57845
  "select",
57703
57846
  {
57704
57847
  id: "format-select",
@@ -57706,11 +57849,12 @@ function ResourceComposePage({
57706
57849
  onChange: (e6) => setSelectedFormat(e6.target.value),
57707
57850
  disabled: isCreating,
57708
57851
  className: "semiont-select",
57709
- children: [
57710
- /* @__PURE__ */ jsx88("option", { value: "text/markdown", children: "Markdown (text/markdown)" }),
57711
- /* @__PURE__ */ jsx88("option", { value: "text/plain", children: "Plain Text (text/plain)" }),
57712
- /* @__PURE__ */ jsx88("option", { value: "text/html", children: "HTML (text/html)" })
57713
- ]
57852
+ children: AUTHORABLE_MEDIA_TYPES.map((mt) => /* @__PURE__ */ jsxs78("option", { value: mt, children: [
57853
+ capabilitiesOf5(mt)?.label ?? mt,
57854
+ " (",
57855
+ mt,
57856
+ ")"
57857
+ ] }, mt))
57714
57858
  }
57715
57859
  )
57716
57860
  ] }),
@@ -57809,7 +57953,7 @@ function ResourceComposePage({
57809
57953
  }
57810
57954
 
57811
57955
  // src/features/resource-discovery/components/ResourceDiscoveryPage.tsx
57812
- import { useState as useState46, useCallback as useCallback33, useRef as useRef36 } from "react";
57956
+ import { useCallback as useCallback33, useRef as useRef36 } from "react";
57813
57957
  import { getResourceId as getResourceId3 } from "@semiont/core";
57814
57958
 
57815
57959
  // src/features/resource-discovery/components/ResourceCard.tsx
@@ -57876,6 +58020,8 @@ function ResourceDiscoveryPage({
57876
58020
  isSearching,
57877
58021
  searchQuery,
57878
58022
  onSearchQueryChange,
58023
+ selectedEntityType,
58024
+ onSelectedEntityTypeChange,
57879
58025
  theme: theme2,
57880
58026
  showLineNumbers,
57881
58027
  activePanel,
@@ -57884,12 +58030,8 @@ function ResourceDiscoveryPage({
57884
58030
  translations: t12,
57885
58031
  ToolbarPanels
57886
58032
  }) {
57887
- const [selectedEntityType, setSelectedEntityType] = useState46("");
57888
58033
  const hasSearchQuery = searchQuery.trim() !== "";
57889
- const baseDocuments = hasSearchQuery ? searchDocuments : recentDocuments;
57890
- const filteredResources = !selectedEntityType ? baseDocuments : baseDocuments.filter(
57891
- (resource) => resource.entityTypes && resource.entityTypes.includes(selectedEntityType)
57892
- );
58034
+ const filteredResources = hasSearchQuery ? searchDocuments : recentDocuments;
57893
58035
  const entityFilterRoving = useRovingTabIndex(
57894
58036
  entityTypes.length + 1,
57895
58037
  // +1 for "All" button
@@ -57903,8 +58045,8 @@ function ResourceDiscoveryPage({
57903
58045
  const onNavigateToResourceRef = useRef36(onNavigateToResource);
57904
58046
  onNavigateToResourceRef.current = onNavigateToResource;
57905
58047
  const handleEntityTypeFilter = useCallback33((entityType) => {
57906
- setSelectedEntityType(entityType);
57907
- }, []);
58048
+ onSelectedEntityTypeChange(entityType);
58049
+ }, [onSelectedEntityTypeChange]);
57908
58050
  const openResource = useCallback33((resource) => {
57909
58051
  const resourceId2 = getResourceId3(resource);
57910
58052
  if (resourceId2) {
@@ -58032,18 +58174,17 @@ function ResourceDiscoveryPage({
58032
58174
  }
58033
58175
 
58034
58176
  // src/features/resource-viewer/components/ResourceViewerPage.tsx
58035
- import { useState as useState48, useEffect as useEffect50, useCallback as useCallback34 } from "react";
58177
+ import { useState as useState48, useEffect as useEffect51, useCallback as useCallback34 } from "react";
58036
58178
  import { annotationId } from "@semiont/core";
58037
- import { getLanguage, getPrimaryRepresentation as getPrimaryRepresentation2, getPrimaryMediaType as getPrimaryMediaType2 } from "@semiont/core";
58038
- import { getMimeCategory as getMimeCategory3 } from "@semiont/core";
58179
+ import { getLanguage, getPrimaryRepresentation as getPrimaryRepresentation2, getPrimaryMediaType as getPrimaryMediaType2, capabilitiesOf as capabilitiesOf6 } from "@semiont/core";
58039
58180
 
58040
58181
  // src/hooks/useMediaToken.ts
58041
- import { useEffect as useEffect49, useState as useState47 } from "react";
58182
+ import { useEffect as useEffect50, useState as useState47 } from "react";
58042
58183
  function useMediaToken(id2) {
58043
58184
  const semiont = useObservable(useSemiont().activeSession$)?.client;
58044
58185
  const [token, setToken] = useState47(void 0);
58045
58186
  const [loading, setLoading] = useState47(true);
58046
- useEffect49(() => {
58187
+ useEffect50(() => {
58047
58188
  if (!semiont || !id2) {
58048
58189
  setLoading(false);
58049
58190
  return;
@@ -58080,7 +58221,7 @@ import { createMarkStateUnit } from "@semiont/sdk";
58080
58221
  import { createGatherStateUnit } from "@semiont/sdk";
58081
58222
  import { createMatchStateUnit } from "@semiont/sdk";
58082
58223
  import { createYieldStateUnit } from "@semiont/sdk";
58083
- import { decodeWithCharset as decodeWithCharset2 } from "@semiont/core";
58224
+ import { decodeWithCharset as decodeWithCharset2, textExtractionOf } from "@semiont/core";
58084
58225
  import { isHighlight as isHighlight5, isComment as isComment5, isAssessment as isAssessment4, isReference as isReference6, isTag as isTag6 } from "@semiont/core";
58085
58226
  var WIZARD_CLOSED = {
58086
58227
  open: false,
@@ -58131,11 +58272,11 @@ function createResourceViewerPageStateUnit(client, resourceId2, locale, browse,
58131
58272
  const contentLoading$ = new import_rxjs2.BehaviorSubject(false);
58132
58273
  const mediaToken$ = new import_rxjs2.BehaviorSubject(null);
58133
58274
  const mediaType = options?.mediaType || "text/plain";
58134
- const isBinaryType = mediaType.startsWith("image/") || mediaType === "application/pdf";
58275
+ const isBinaryType = textExtractionOf(mediaType) !== "decode";
58135
58276
  if (!isBinaryType && mediaType) {
58136
58277
  contentLoading$.next(true);
58137
- client.browse.resourceRepresentation(resourceId2, { accept: mediaType }).then(({ data: data2 }) => {
58138
- content$.next(decodeWithCharset2(data2, mediaType));
58278
+ client.browse.resourceRepresentation(resourceId2).then(({ data: data2, contentType }) => {
58279
+ content$.next(decodeWithCharset2(data2, contentType));
58139
58280
  contentLoading$.next(false);
58140
58281
  }).catch(() => {
58141
58282
  contentLoading$.next(false);
@@ -58146,8 +58287,6 @@ function createResourceViewerPageStateUnit(client, resourceId2, locale, browse,
58146
58287
  });
58147
58288
  }
58148
58289
  const wizard$ = new import_rxjs2.BehaviorSubject(WIZARD_CLOSED);
58149
- const unsubscribeResource = client.subscribeToResource(resourceId2);
58150
- disposer.add(unsubscribeResource);
58151
58290
  const bindInitiateSub = client.bus.get("bind:initiate").subscribe((event) => {
58152
58291
  wizard$.next({
58153
58292
  open: true,
@@ -58232,7 +58371,8 @@ function ResourceViewerPage({
58232
58371
  const { hoverDelayMs } = useHoverDelay();
58233
58372
  const { triggerSparkleAnimation, clearNewAnnotationId } = useResourceAnnotations();
58234
58373
  const resourceMediaType = getPrimaryMediaType2(resource) || "text/plain";
58235
- const isBinary = getMimeCategory3(resourceMediaType) === "image";
58374
+ const renderMode = capabilitiesOf6(resourceMediaType)?.render;
58375
+ const isBinary = renderMode === "image" || renderMode === "pdf";
58236
58376
  const { content: textContent, loading: textLoading } = useResourceContent(rUri, resource, !isBinary);
58237
58377
  const { token: mediaToken, loading: mediaTokenLoading } = useMediaToken(rUri);
58238
58378
  const binaryContent = isBinary && mediaToken && semiont ? `${semiont.baseUrl}/api/resources/${rUri}?token=${mediaToken}` : "";
@@ -58309,7 +58449,7 @@ function ResourceViewerPage({
58309
58449
  reason: "compose-from-wizard"
58310
58450
  });
58311
58451
  }, [session]);
58312
- useEffect50(() => {
58452
+ useEffect51(() => {
58313
58453
  if (resource && rUri) {
58314
58454
  const mediaType = getPrimaryMediaType2(resource);
58315
58455
  browser2.addOpenResource(rUri, resource.name, mediaType || void 0, resource.storageUri);
@@ -58318,7 +58458,7 @@ function ResourceViewerPage({
58318
58458
  }
58319
58459
  }
58320
58460
  }, [resource, rUri, browser2]);
58321
- useEffect50(() => {
58461
+ useEffect51(() => {
58322
58462
  if (pendingAnnotation) {
58323
58463
  browser2.emit("panel:open", { panel: "annotations" });
58324
58464
  }
@@ -58422,7 +58562,7 @@ function ResourceViewerPage({
58422
58562
  announceResourceLoading,
58423
58563
  announceResourceLoaded
58424
58564
  } = useResourceLoadingAnnouncements();
58425
- useEffect50(() => {
58565
+ useEffect51(() => {
58426
58566
  if (contentLoading) {
58427
58567
  announceResourceLoading(resource.name);
58428
58568
  } else if (content4) {
@@ -58551,7 +58691,7 @@ function ResourceViewerPage({
58551
58691
  knowledgeBaseName
58552
58692
  }
58553
58693
  ),
58554
- activePanel === "jsonld" && /* @__PURE__ */ jsx91(JsonLdPanel, { resource })
58694
+ activePanel === "jsonld" && /* @__PURE__ */ jsx91(JsonLdPanel, { resourceId: rUri })
58555
58695
  ]
58556
58696
  }
58557
58697
  ),
@@ -58656,7 +58796,7 @@ function createSessionStateUnit(client) {
58656
58796
  var import_rxjs4 = __toESM(require_cjs(), 1);
58657
58797
  import { resourceId as makeResourceId2, annotationId as makeAnnotationId } from "@semiont/core";
58658
58798
  import { createDisposer as createDisposer2 } from "@semiont/sdk";
58659
- import { getPrimaryMediaType as getPrimaryMediaType3, decodeWithCharset as decodeWithCharset3 } from "@semiont/core";
58799
+ import { decodeWithCharset as decodeWithCharset3, extensionForMediaType } from "@semiont/core";
58660
58800
  function createComposePageStateUnit(client, browse, params, auth) {
58661
58801
  const disposer = createDisposer2();
58662
58802
  disposer.add(browse);
@@ -58693,11 +58833,8 @@ function createComposePageStateUnit(client, browse, params, auth) {
58693
58833
  const tokenResult = await client.yield.fromToken(params.token);
58694
58834
  if (tokenResult && auth) {
58695
58835
  const rId = makeResourceId2(tokenResult["@id"]);
58696
- const mediaType = getPrimaryMediaType3(tokenResult) || "text/plain";
58697
- const { data: data2 } = await client.browse.resourceRepresentation(rId, {
58698
- accept: mediaType
58699
- });
58700
- const content4 = decodeWithCharset3(data2, mediaType);
58836
+ const { data: data2, contentType } = await client.browse.resourceRepresentation(rId);
58837
+ const content4 = decodeWithCharset3(data2, contentType);
58701
58838
  cloneData$.next({ sourceResource: tokenResult, sourceContent: content4 });
58702
58839
  }
58703
58840
  } catch {
@@ -58724,7 +58861,7 @@ function createComposePageStateUnit(client, browse, params, auth) {
58724
58861
  mimeType = saveParams.format ?? "application/octet-stream";
58725
58862
  } else {
58726
58863
  const blob = new Blob([saveParams.content || ""], { type: saveParams.format ?? "application/octet-stream" });
58727
- const extension2 = saveParams.format === "text/plain" ? ".txt" : saveParams.format === "text/html" ? ".html" : ".md";
58864
+ const extension2 = extensionForMediaType(saveParams.format ?? "application/octet-stream");
58728
58865
  fileToUpload = new File([blob], saveParams.name + extension2, { type: saveParams.format ?? "application/octet-stream" });
58729
58866
  mimeType = saveParams.format ?? "application/octet-stream";
58730
58867
  }
@@ -58995,33 +59132,75 @@ function createWelcomeStateUnit(client) {
58995
59132
 
58996
59133
  // src/features/resource-discovery/state/discover-state-unit.ts
58997
59134
  var import_rxjs10 = __toESM(require_cjs(), 1);
59135
+ var import_operators4 = __toESM(require_operators(), 1);
58998
59136
  import { createDisposer as createDisposer7 } from "@semiont/sdk";
58999
- import { createSearchPipeline as createSearchPipeline3 } from "@semiont/sdk";
59000
59137
  var RECENT_LIMIT = 10;
59001
59138
  var SEARCH_LIMIT3 = 20;
59139
+ var DEBOUNCE_MS = 250;
59002
59140
  function createDiscoverStateUnit(client, browse) {
59003
59141
  const disposer = createDisposer7();
59004
- const search2 = createSearchPipeline3(
59005
- (q2) => client.browse.resources({ search: q2, limit: SEARCH_LIMIT3 })
59006
- );
59007
- disposer.add(search2);
59008
59142
  disposer.add(browse);
59009
- const recent$ = client.browse.resources({ limit: RECENT_LIMIT, archived: false });
59143
+ const selectedEntityType$ = new import_rxjs10.BehaviorSubject("");
59144
+ disposer.add(() => selectedEntityType$.complete());
59145
+ const queryInput$ = new import_rxjs10.Subject();
59146
+ disposer.add(() => queryInput$.complete());
59147
+ const recent$ = selectedEntityType$.pipe(
59148
+ (0, import_operators4.switchMap)(
59149
+ (et) => client.browse.resources({
59150
+ limit: RECENT_LIMIT,
59151
+ archived: false,
59152
+ ...et ? { entityType: et } : {}
59153
+ })
59154
+ ),
59155
+ (0, import_operators4.shareReplay)({ bufferSize: 1, refCount: true })
59156
+ );
59010
59157
  const recentResources$ = recent$.pipe(
59011
- (0, import_rxjs10.map)((r14) => r14 ?? [])
59158
+ (0, import_operators4.map)((r14) => r14 ?? [])
59012
59159
  );
59013
59160
  const isLoadingRecent$ = recent$.pipe(
59014
- (0, import_rxjs10.map)((r14) => r14 === void 0)
59161
+ (0, import_operators4.map)((r14) => r14 === void 0)
59015
59162
  );
59016
59163
  const entityTypes$ = client.browse.entityTypes().pipe(
59017
- (0, import_rxjs10.map)((e6) => e6 ?? [])
59164
+ (0, import_operators4.map)((e6) => e6 ?? [])
59165
+ );
59166
+ const debouncedQuery$ = queryInput$.pipe(
59167
+ (0, import_operators4.startWith)(""),
59168
+ (0, import_operators4.debounceTime)(DEBOUNCE_MS),
59169
+ (0, import_operators4.distinctUntilChanged)()
59018
59170
  );
59171
+ const state$ = (0, import_rxjs10.combineLatest)([debouncedQuery$, selectedEntityType$]).pipe(
59172
+ (0, import_operators4.switchMap)(([q2, et]) => {
59173
+ const trimmed = q2.trim();
59174
+ if (!trimmed) {
59175
+ return (0, import_rxjs10.of)({ results: [], isSearching: false });
59176
+ }
59177
+ return client.browse.resources({
59178
+ search: trimmed,
59179
+ limit: SEARCH_LIMIT3,
59180
+ ...et ? { entityType: et } : {}
59181
+ }).pipe(
59182
+ (0, import_operators4.map)((results) => ({
59183
+ results: results ?? [],
59184
+ isSearching: results === void 0
59185
+ })),
59186
+ (0, import_operators4.startWith)({ results: [], isSearching: true })
59187
+ );
59188
+ }),
59189
+ (0, import_operators4.shareReplay)({ bufferSize: 1, refCount: true })
59190
+ );
59191
+ const search2 = {
59192
+ query$: queryInput$.pipe((0, import_operators4.startWith)("")),
59193
+ state$,
59194
+ setQuery: (value) => queryInput$.next(value)
59195
+ };
59019
59196
  return {
59020
59197
  browse,
59021
59198
  search: search2,
59022
59199
  recentResources$,
59023
59200
  entityTypes$,
59024
59201
  isLoadingRecent$,
59202
+ selectedEntityType$: selectedEntityType$.asObservable(),
59203
+ setSelectedEntityType: (value) => selectedEntityType$.next(value),
59025
59204
  dispose: () => disposer.dispose()
59026
59205
  };
59027
59206
  }
@@ -59192,7 +59371,7 @@ export {
59192
59371
  createMatchStateUnit2 as createMatchStateUnit,
59193
59372
  createResourceLoaderStateUnit,
59194
59373
  createResourceViewerPageStateUnit,
59195
- createSearchPipeline4 as createSearchPipeline,
59374
+ createSearchPipeline3 as createSearchPipeline,
59196
59375
  createSessionStateUnit,
59197
59376
  createShellStateUnit,
59198
59377
  createWelcomeStateUnit,