@sheetxl/react 0.7.27 → 0.7.28-beta.1

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 (257) hide show
  1. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
  2. package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +156 -0
  3. package/browser/cjs/index.cjs +24 -24
  4. package/browser/esm/D_suN0U6XvrHxTak.mjs +6286 -0
  5. package/browser/esm/index.mjs +19258 -4911
  6. package/licenses/dependencies.txt +42 -214
  7. package/node/esm/CH084kteEgVy0a8H.mjs +9 -0
  8. package/node/esm/index.mjs +17035 -3691
  9. package/package.json +10 -11
  10. package/resources/contents.json +60 -0
  11. package/resources/locales/contents.json +114 -0
  12. package/resources/locales/de/clipboard.cmd.json +36 -0
  13. package/resources/locales/de/editor.cmd.json +128 -0
  14. package/resources/locales/de/movable.cmd.json +123 -0
  15. package/resources/locales/de/selection.cmd.json +373 -0
  16. package/resources/locales/de/sheet.cmd.json +1563 -0
  17. package/resources/locales/de/table.cmd.json +83 -0
  18. package/resources/locales/de/ui.msg.json +166 -0
  19. package/resources/locales/de/workbook.cmd.json +282 -0
  20. package/resources/locales/en/clipboard.cmd.json +36 -0
  21. package/resources/locales/en/editor.cmd.json +128 -0
  22. package/resources/locales/en/movable.cmd.json +123 -0
  23. package/resources/locales/en/selection.cmd.json +373 -0
  24. package/resources/locales/en/sheet.cmd.json +1563 -0
  25. package/resources/locales/en/table.cmd.json +83 -0
  26. package/resources/locales/en/ui.msg.json +166 -0
  27. package/resources/locales/en/workbook.cmd.json +282 -0
  28. package/types/index.d.ts +2 -1767
  29. package/types/src/border/StaticBorderRenderer.d.ts +32 -0
  30. package/types/src/border/StyledStrokePath.d.ts +14 -0
  31. package/types/src/border/index.d.ts +4 -0
  32. package/types/src/border/useBorders.d.ts +87 -0
  33. package/types/src/cell/ColumnButton.d.ts +45 -0
  34. package/types/src/cell/CornerTriangle.d.ts +27 -0
  35. package/types/src/cell/FormulaCellRenderer.d.ts +34 -0
  36. package/types/src/cell/SheetCellRenderer.d.ts +52 -0
  37. package/types/src/cell/SheetHeaderRenderer.d.ts +37 -0
  38. package/types/src/cell/index.d.ts +7 -0
  39. package/types/src/cell/useFormulaViewAnchor.d.ts +42 -0
  40. package/types/src/chart/ChartEditor.d.ts +17 -0
  41. package/types/src/chart/PresetChartTypeDescriptors.d.ts +35 -0
  42. package/types/src/chart/index.d.ts +3 -0
  43. package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +10 -0
  44. package/types/src/chart/templates/area-stacked-template.json.d.ts +10 -0
  45. package/types/src/chart/templates/area-template.json.d.ts +9 -0
  46. package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +10 -0
  47. package/types/src/chart/templates/bar-stacked-template.json.d.ts +10 -0
  48. package/types/src/chart/templates/bar-template.json.d.ts +9 -0
  49. package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +10 -0
  50. package/types/src/chart/templates/column-stacked-template.json.d.ts +10 -0
  51. package/types/src/chart/templates/column-template.json.d.ts +9 -0
  52. package/types/src/chart/templates/line-markers-template.json.d.ts +10 -0
  53. package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +11 -0
  54. package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +11 -0
  55. package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +10 -0
  56. package/types/src/chart/templates/line-stacked-template.json.d.ts +10 -0
  57. package/types/src/chart/templates/line-template.json.d.ts +9 -0
  58. package/types/src/chart/templates/pie-doughnut-template.json.d.ts +10 -0
  59. package/types/src/chart/templates/pie-template.json.d.ts +9 -0
  60. package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +10 -0
  61. package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +10 -0
  62. package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +10 -0
  63. package/types/src/chart/templates/scatter-lines-template.json.d.ts +10 -0
  64. package/types/src/chart/templates/scatter-markers-template.json.d.ts +10 -0
  65. package/types/src/clipboard/ClipboardCommands.d.ts +68 -0
  66. package/types/src/clipboard/SheetClipboardLayer.d.ts +22 -0
  67. package/types/src/clipboard/index.d.ts +3 -0
  68. package/types/src/commands/Catalog.d.ts +8 -0
  69. package/types/src/commands/CommandRootProvider.d.ts +36 -0
  70. package/types/src/commands/InputClipboardCommands.d.ts +41 -0
  71. package/types/src/commands/InputClipboardInjector.d.ts +16 -0
  72. package/types/src/commands/MainFocusContext.d.ts +13 -0
  73. package/types/src/commands/PaneScopeProvider.d.ts +40 -0
  74. package/types/src/commands/createTransactionalMiddleware.d.ts +49 -0
  75. package/types/src/commands/index.d.ts +7 -0
  76. package/types/src/context/SheetContext.d.ts +18 -0
  77. package/types/src/context/WorkbookContext.d.ts +20 -0
  78. package/types/src/context/index.d.ts +3 -0
  79. package/types/src/editableLabel/EditableLabel.d.ts +28 -0
  80. package/types/src/editableLabel/index.d.ts +2 -0
  81. package/types/src/editor/EditorCommands.d.ts +98 -0
  82. package/types/src/editor/FunctionPreviewPanel.d.ts +166 -0
  83. package/types/src/editor/NamedHintPanel.d.ts +38 -0
  84. package/types/src/editor/NamedItemsPanel.d.ts +59 -0
  85. package/types/src/editor/SheetCellEditorLayer.d.ts +40 -0
  86. package/types/src/editor/SheetCellInput.d.ts +99 -0
  87. package/types/src/editor/SheetEditable.d.ts +53 -0
  88. package/types/src/editor/SheetReferenceHeaderLayer.d.ts +46 -0
  89. package/types/src/editor/SheetReferenceLayer.d.ts +55 -0
  90. package/types/src/editor/formulaCaret.d.ts +84 -0
  91. package/types/src/editor/formulaEval.d.ts +202 -0
  92. package/types/src/editor/formulaPresentation.d.ts +136 -0
  93. package/types/src/editor/formulaText.d.ts +80 -0
  94. package/types/src/editor/functionArgs.d.ts +111 -0
  95. package/types/src/editor/functionHint.d.ts +37 -0
  96. package/types/src/editor/index.d.ts +18 -0
  97. package/types/src/editor/referencePointNav.d.ts +39 -0
  98. package/types/src/editor/useFormulaHints.d.ts +126 -0
  99. package/types/src/editor/useFormulaInput.d.ts +326 -0
  100. package/types/src/editor/useProtectedEditNotice.d.ts +14 -0
  101. package/types/src/editor/useReferenceMode.d.ts +177 -0
  102. package/types/src/form/FormulaInput.d.ts +86 -0
  103. package/types/src/form/FormulaInputParts.d.ts +94 -0
  104. package/types/src/form/index.d.ts +5 -0
  105. package/types/src/form/useEditCommit.d.ts +174 -0
  106. package/types/src/form/useInputField.d.ts +86 -0
  107. package/types/src/frame/CommandContext.d.ts +179 -0
  108. package/types/src/frame/IFrame.d.ts +17 -0
  109. package/types/src/frame/index.d.ts +3 -0
  110. package/types/src/icons/LogoNoPaddingIcon.d.ts +3 -0
  111. package/types/src/icons/LogoTextNoPaddingIcon.d.ts +4 -0
  112. package/types/src/icons/WaterMark.d.ts +12 -0
  113. package/types/src/icons/chart/ChartAreaIcon.d.ts +5 -0
  114. package/types/src/icons/chart/ChartAreaStackedIcon.d.ts +5 -0
  115. package/types/src/icons/chart/ChartAreaStackedPercentIcon.d.ts +5 -0
  116. package/types/src/icons/chart/ChartBarIcon.d.ts +5 -0
  117. package/types/src/icons/chart/ChartBarStackedIcon.d.ts +5 -0
  118. package/types/src/icons/chart/ChartBarStackedPercentIcon.d.ts +5 -0
  119. package/types/src/icons/chart/ChartBubble3DIcon.d.ts +5 -0
  120. package/types/src/icons/chart/ChartBubbleIcon.d.ts +5 -0
  121. package/types/src/icons/chart/ChartColumnIcon.d.ts +5 -0
  122. package/types/src/icons/chart/ChartColumnStackedIcon.d.ts +5 -0
  123. package/types/src/icons/chart/ChartColumnStackedPercentIcon.d.ts +5 -0
  124. package/types/src/icons/chart/ChartLineIcon.d.ts +5 -0
  125. package/types/src/icons/chart/ChartLineMarkersIcon.d.ts +5 -0
  126. package/types/src/icons/chart/ChartLineStackedIcon.d.ts +5 -0
  127. package/types/src/icons/chart/ChartLineStackedMarkersIcon.d.ts +5 -0
  128. package/types/src/icons/chart/ChartLineStackedPercentIcon.d.ts +5 -0
  129. package/types/src/icons/chart/ChartLineStackedPercentMarkersIcon.d.ts +5 -0
  130. package/types/src/icons/chart/ChartPieDoughnutIcon.d.ts +5 -0
  131. package/types/src/icons/chart/ChartPieIcon.d.ts +5 -0
  132. package/types/src/icons/chart/ChartScatterLinesIcon.d.ts +5 -0
  133. package/types/src/icons/chart/ChartScatterLinesMarkersIcon.d.ts +5 -0
  134. package/types/src/icons/chart/ChartScatterLinesMarkersSmoothIcon.d.ts +5 -0
  135. package/types/src/icons/chart/ChartScatterLinesSmoothIcon.d.ts +5 -0
  136. package/types/src/icons/chart/ChartScatterMarkersIcon.d.ts +5 -0
  137. package/types/src/icons/chart/ChartWaterfallIcon.d.ts +5 -0
  138. package/types/src/icons/chart/ThemedChartIcon.d.ts +20 -0
  139. package/types/src/icons/chart/index.d.ts +50 -0
  140. package/types/src/icons/index.d.ts +4 -0
  141. package/types/src/index.d.ts +27 -0
  142. package/types/src/io/WorkbookIO.d.ts +50 -0
  143. package/types/src/io/index.d.ts +2 -0
  144. package/types/src/layer/BorderLayer.d.ts +14 -0
  145. package/types/src/layer/CellErrorLayer.d.ts +49 -0
  146. package/types/src/layer/CellFillLayer.d.ts +15 -0
  147. package/types/src/layer/ConditionalBarLayer.d.ts +41 -0
  148. package/types/src/layer/ConditionalIcons.d.ts +34 -0
  149. package/types/src/layer/ConditionalIconsLayer.d.ts +31 -0
  150. package/types/src/layer/ContextMenuLayer.d.ts +27 -0
  151. package/types/src/layer/HeaderResizerLayer.d.ts +28 -0
  152. package/types/src/layer/HeaderSelectionLayer.d.ts +89 -0
  153. package/types/src/layer/ResizeIndicator.d.ts +19 -0
  154. package/types/src/layer/SheetBackgroundLayer.d.ts +22 -0
  155. package/types/src/layer/SheetCellLayer.d.ts +49 -0
  156. package/types/src/layer/SheetColumnButtonLayer.d.ts +23 -0
  157. package/types/src/layer/SheetGridLineLayer.d.ts +22 -0
  158. package/types/src/layer/SheetHeaderCellLayer.d.ts +30 -0
  159. package/types/src/layer/SheetMovableLayer.d.ts +26 -0
  160. package/types/src/layer/SheetTableCommandLayer.d.ts +16 -0
  161. package/types/src/layer/SpillLayer.d.ts +22 -0
  162. package/types/src/layer/TableLayer.d.ts +22 -0
  163. package/types/src/layer/ValidationIndicatorLayer.d.ts +41 -0
  164. package/types/src/layer/index.d.ts +25 -0
  165. package/types/src/layer/resizeIndicatorState.d.ts +26 -0
  166. package/types/src/layer/useSheetFeatureRegions.d.ts +21 -0
  167. package/types/src/layer/useSheetVisibleCells.d.ts +60 -0
  168. package/types/src/layer/useSheetVisibleDecorations.d.ts +42 -0
  169. package/types/src/layer/useTableHeaderCells.d.ts +22 -0
  170. package/types/src/layer/useVisibleTables.d.ts +27 -0
  171. package/types/src/listener/index.d.ts +3 -0
  172. package/types/src/listener/useModelListener.d.ts +67 -0
  173. package/types/src/listener/useRangeListener.d.ts +15 -0
  174. package/types/src/movable/EmptyFrame.d.ts +16 -0
  175. package/types/src/movable/IMovableArea.d.ts +34 -0
  176. package/types/src/movable/MovableCommands.d.ts +22 -0
  177. package/types/src/movable/MovableFrame.d.ts +48 -0
  178. package/types/src/movable/MovableLayer.d.ts +77 -0
  179. package/types/src/movable/MoveableBundle.d.ts +4 -0
  180. package/types/src/movable/index.d.ts +4 -0
  181. package/types/src/picture/IPictureEditor.d.ts +39 -0
  182. package/types/src/picture/PictureEditor.d.ts +4 -0
  183. package/types/src/picture/index.d.ts +3 -0
  184. package/types/src/selection/SelectionCommands.d.ts +23 -0
  185. package/types/src/selection/SheetSelection.d.ts +53 -0
  186. package/types/src/selection/SheetSelectionLayer.d.ts +30 -0
  187. package/types/src/selection/index.d.ts +4 -0
  188. package/types/src/shape/ShapeEditor.d.ts +16 -0
  189. package/types/src/shape/index.d.ts +2 -0
  190. package/types/src/sheet/ConditionalFormatPresets.d.ts +56 -0
  191. package/types/src/sheet/ISheetElement.d.ts +233 -0
  192. package/types/src/sheet/ISheetHeaderElement.d.ts +138 -0
  193. package/types/src/sheet/NotImplemented.d.ts +3 -0
  194. package/types/src/sheet/SheetCommandProvider.d.ts +57 -0
  195. package/types/src/sheet/SheetCommands.d.ts +75 -0
  196. package/types/src/sheet/SheetElement.d.ts +15 -0
  197. package/types/src/sheet/SheetHeaderElement.d.ts +4 -0
  198. package/types/src/sheet/SheetScrollbar.d.ts +28 -0
  199. package/types/src/sheet/TopLeftCorner.d.ts +17 -0
  200. package/types/src/sheet/index.d.ts +7 -0
  201. package/types/src/slicer/SlicerEditor.d.ts +16 -0
  202. package/types/src/slicer/index.d.ts +2 -0
  203. package/types/src/tabStrip/SheetTab.d.ts +41 -0
  204. package/types/src/tabStrip/Sortable.d.ts +66 -0
  205. package/types/src/tabStrip/Tab.d.ts +19 -0
  206. package/types/src/tabStrip/TabStrip.d.ts +41 -0
  207. package/types/src/tabStrip/TabStripItem.d.ts +36 -0
  208. package/types/src/tabStrip/TabStripRow.d.ts +9 -0
  209. package/types/src/tabStrip/index.d.ts +7 -0
  210. package/types/src/table/TableCommands.d.ts +16 -0
  211. package/types/src/taskPane/ITaskPane.d.ts +72 -0
  212. package/types/src/taskPane/TaskPaneArea.d.ts +144 -0
  213. package/types/src/taskPane/TaskPaneFrame.d.ts +48 -0
  214. package/types/src/taskPane/TaskPaneRegistry.d.ts +108 -0
  215. package/types/src/taskPane/TaskPaneStrip.d.ts +33 -0
  216. package/types/src/taskPane/TaskPaneTitle.d.ts +24 -0
  217. package/types/src/taskPane/index.d.ts +7 -0
  218. package/types/src/taskPane/useTaskPane.d.ts +29 -0
  219. package/types/src/theme/DocThemesContext.d.ts +3 -0
  220. package/types/src/theme/DocThemesProvider.d.ts +15 -0
  221. package/types/src/theme/ThemeState.d.ts +19 -0
  222. package/types/src/theme/buildDocThemeCSS.d.ts +16 -0
  223. package/types/src/theme/buildOOXMLThemeCSS.d.ts +13 -0
  224. package/types/src/theme/createCSSSystemLookup.d.ts +51 -0
  225. package/types/src/theme/index.d.ts +11 -0
  226. package/types/src/theme/useAppColorScheme.d.ts +15 -0
  227. package/types/src/theme/useDocThemes.d.ts +3 -0
  228. package/types/src/theme/useGridColorScheme.d.ts +20 -0
  229. package/types/src/theme/useSystemColors.d.ts +44 -0
  230. package/types/src/undo/UndoCommands.d.ts +28 -0
  231. package/types/src/undo/UndoManagerContext.d.ts +14 -0
  232. package/types/src/undo/index.d.ts +3 -0
  233. package/types/src/workbook/DefaultRenderers.d.ts +14 -0
  234. package/types/src/workbook/GlobalWorkbookElement.d.ts +10 -0
  235. package/types/src/workbook/IWorkbookElement.d.ts +178 -0
  236. package/types/src/workbook/WindowChrome.d.ts +61 -0
  237. package/types/src/workbook/WorkbookCommandContributor.d.ts +24 -0
  238. package/types/src/workbook/WorkbookCommands.d.ts +97 -0
  239. package/types/src/workbook/WorkbookElement.d.ts +9 -0
  240. package/types/src/workbook/WorkbookStrip.d.ts +73 -0
  241. package/types/src/workbook/index.d.ts +17 -0
  242. package/types/src/workbook/resolveWorkbookInput.d.ts +27 -0
  243. package/types/src/workbook/useResolvedWorkbook.d.ts +31 -0
  244. package/types/src/workbook/useWindowChrome.d.ts +24 -0
  245. package/types/src/workbook/useWorkbookApp.d.ts +47 -0
  246. package/types/src/workbook/useWorkbookEncrypted.d.ts +15 -0
  247. package/types/src/workbook/useWorkbookFormat.d.ts +18 -0
  248. package/types/src/workbook/useWorkbookName.d.ts +13 -0
  249. package/types/src/workbook/useWorkbookSaveState.d.ts +29 -0
  250. package/browser/cjs/DNki9dGbSn_gUfd3.cjs +0 -7
  251. package/browser/cjs/Da611GSWMp5ncOGO.cjs +0 -16
  252. package/browser/cjs/F8ZECny0CwW2OV5X.cjs +0 -161
  253. package/browser/esm/BYGSBjns_83FWXAx.mjs +0 -3905
  254. package/browser/esm/CmObbQiLq9AAM7-q.mjs +0 -394
  255. package/browser/esm/Daa2g2QALCIHFgqP.mjs +0 -1377
  256. package/node/assets/style.css +0 -1
  257. package/node/esm/Bu9xI_rgkuupQ2AO.mjs +0 -11
@@ -1,1377 +0,0 @@
1
- /**
2
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.27
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- function _e(g, j) {
8
- for (var O = 0; O < j.length; O++) {
9
- const o = j[O];
10
- if (typeof o != "string" && !Array.isArray(o)) {
11
- for (const a in o) if (a !== "default" && !(a in g)) {
12
- const s = Object.getOwnPropertyDescriptor(o, a);
13
- s && Object.defineProperty(g, a, s.get ? s : { enumerable: !0, get: () => o[a] });
14
- }
15
- }
16
- }
17
- return Object.freeze(Object.defineProperty(g, Symbol.toStringTag, { value: "Module" }));
18
- }
19
- var K, W = {}, G = {}, A = {}, X = {}, $, U = {};
20
- function me() {
21
- if ($) return U;
22
- $ = 1;
23
- var g = U && U.__awaiter || function(o, a, s, n) {
24
- return new (s || (s = Promise))(function(e, u) {
25
- function h(_) {
26
- try {
27
- P(n.next(_));
28
- } catch (f) {
29
- u(f);
30
- }
31
- }
32
- function d(_) {
33
- try {
34
- P(n.throw(_));
35
- } catch (f) {
36
- u(f);
37
- }
38
- }
39
- function P(_) {
40
- var f;
41
- _.done ? e(_.value) : (f = _.value, f instanceof s ? f : new s(function(r) {
42
- r(f);
43
- })).then(h, d);
44
- }
45
- P((n = n.apply(o, a || [])).next());
46
- });
47
- }, j = U && U.__generator || function(o, a) {
48
- var s, n, e, u, h = { label: 0, sent: function() {
49
- if (1 & e[0]) throw e[1];
50
- return e[1];
51
- }, trys: [], ops: [] };
52
- return u = { next: d(0), throw: d(1), return: d(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
53
- return this;
54
- }), u;
55
- function d(P) {
56
- return function(_) {
57
- return (function(f) {
58
- if (s) throw new TypeError("Generator is already executing.");
59
- for (; h; ) try {
60
- if (s = 1, n && (e = 2 & f[0] ? n.return : f[0] ? n.throw || ((e = n.return) && e.call(n), 0) : n.next) && !(e = e.call(n, f[1])).done) return e;
61
- switch (n = 0, e && (f = [2 & f[0], e.value]), f[0]) {
62
- case 0:
63
- case 1:
64
- e = f;
65
- break;
66
- case 4:
67
- return h.label++, { value: f[1], done: !1 };
68
- case 5:
69
- h.label++, n = f[1], f = [0];
70
- continue;
71
- case 7:
72
- f = h.ops.pop(), h.trys.pop();
73
- continue;
74
- default:
75
- if (e = h.trys, !((e = e.length > 0 && e[e.length - 1]) || f[0] !== 6 && f[0] !== 2)) {
76
- h = 0;
77
- continue;
78
- }
79
- if (f[0] === 3 && (!e || f[1] > e[0] && f[1] < e[3])) {
80
- h.label = f[1];
81
- break;
82
- }
83
- if (f[0] === 6 && h.label < e[1]) {
84
- h.label = e[1], e = f;
85
- break;
86
- }
87
- if (e && h.label < e[2]) {
88
- h.label = e[2], h.ops.push(f);
89
- break;
90
- }
91
- e[2] && h.ops.pop(), h.trys.pop();
92
- continue;
93
- }
94
- f = a.call(o, h);
95
- } catch (r) {
96
- f = [6, r], n = 0;
97
- } finally {
98
- s = e = 0;
99
- }
100
- if (5 & f[0]) throw f[1];
101
- return { value: f[0] ? f[1] : void 0, done: !0 };
102
- })([P, _]);
103
- };
104
- }
105
- };
106
- Object.defineProperty(U, "__esModule", { value: !0 }), U.JsDelivrSourceResolver = void 0;
107
- var O = (function() {
108
- function o() {
109
- }
110
- return o.prototype.resolvePackageJson = function(a, s, n) {
111
- return g(this, void 0, void 0, function() {
112
- return j(this, function(e) {
113
- switch (e.label) {
114
- case 0:
115
- return [4, this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(a).concat(s ? "@".concat(s) : "").concat(n ? "/".concat(n) : "", "/package.json"))];
116
- case 1:
117
- return [2, e.sent()];
118
- }
119
- });
120
- });
121
- }, o.prototype.resolveSourceFile = function(a, s, n) {
122
- return g(this, void 0, void 0, function() {
123
- return j(this, function(e) {
124
- switch (e.label) {
125
- case 0:
126
- return [4, this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(a).concat(s ? "@".concat(s) : "", "/").concat(n))];
127
- case 1:
128
- return [2, e.sent()];
129
- }
130
- });
131
- });
132
- }, o.prototype.resolveFile = function(a) {
133
- return g(this, void 0, void 0, function() {
134
- var s;
135
- return j(this, function(n) {
136
- switch (n.label) {
137
- case 0:
138
- return [4, fetch(a, { method: "GET" })];
139
- case 1:
140
- return (s = n.sent()).ok ? [4, s.text()] : [3, 3];
141
- case 2:
142
- return [2, n.sent()];
143
- case 3:
144
- if (s.status === 404) return [2, ""];
145
- throw Error("Error other than 404 while fetching from Unpkg at ".concat(a));
146
- case 4:
147
- return [2];
148
- }
149
- });
150
- });
151
- }, o;
152
- })();
153
- return U.JsDelivrSourceResolver = O, U;
154
- }
155
- var H, Q, Y, C = {}, F = {};
156
- function q() {
157
- if (Q) return H;
158
- function g(o) {
159
- if (typeof o != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(o));
160
- }
161
- function j(o, a) {
162
- for (var s, n = "", e = 0, u = -1, h = 0, d = 0; d <= o.length; ++d) {
163
- if (d < o.length) s = o.charCodeAt(d);
164
- else {
165
- if (s === 47) break;
166
- s = 47;
167
- }
168
- if (s === 47) {
169
- if (!(u === d - 1 || h === 1)) if (u !== d - 1 && h === 2) {
170
- if (n.length < 2 || e !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) {
171
- if (n.length > 2) {
172
- var P = n.lastIndexOf("/");
173
- if (P !== n.length - 1) {
174
- P === -1 ? (n = "", e = 0) : e = (n = n.slice(0, P)).length - 1 - n.lastIndexOf("/"), u = d, h = 0;
175
- continue;
176
- }
177
- } else if (n.length === 2 || n.length === 1) {
178
- n = "", e = 0, u = d, h = 0;
179
- continue;
180
- }
181
- }
182
- a && (n.length > 0 ? n += "/.." : n = "..", e = 2);
183
- } else n.length > 0 ? n += "/" + o.slice(u + 1, d) : n = o.slice(u + 1, d), e = d - u - 1;
184
- u = d, h = 0;
185
- } else s === 46 && h !== -1 ? ++h : h = -1;
186
- }
187
- return n;
188
- }
189
- Q = 1;
190
- var O = { resolve: function() {
191
- for (var o, a = "", s = !1, n = arguments.length - 1; n >= -1 && !s; n--) {
192
- var e;
193
- n >= 0 ? e = arguments[n] : (o === void 0 && (o = process.cwd()), e = o), g(e), e.length !== 0 && (a = e + "/" + a, s = e.charCodeAt(0) === 47);
194
- }
195
- return a = j(a, !s), s ? a.length > 0 ? "/" + a : "/" : a.length > 0 ? a : ".";
196
- }, normalize: function(o) {
197
- if (g(o), o.length === 0) return ".";
198
- var a = o.charCodeAt(0) === 47, s = o.charCodeAt(o.length - 1) === 47;
199
- return (o = j(o, !a)).length !== 0 || a || (o = "."), o.length > 0 && s && (o += "/"), a ? "/" + o : o;
200
- }, isAbsolute: function(o) {
201
- return g(o), o.length > 0 && o.charCodeAt(0) === 47;
202
- }, join: function() {
203
- if (arguments.length === 0) return ".";
204
- for (var o, a = 0; a < arguments.length; ++a) {
205
- var s = arguments[a];
206
- g(s), s.length > 0 && (o === void 0 ? o = s : o += "/" + s);
207
- }
208
- return o === void 0 ? "." : O.normalize(o);
209
- }, relative: function(o, a) {
210
- if (g(o), g(a), o === a || (o = O.resolve(o)) === (a = O.resolve(a))) return "";
211
- for (var s = 1; s < o.length && o.charCodeAt(s) === 47; ++s) ;
212
- for (var n = o.length, e = n - s, u = 1; u < a.length && a.charCodeAt(u) === 47; ++u) ;
213
- for (var h = a.length - u, d = e < h ? e : h, P = -1, _ = 0; _ <= d; ++_) {
214
- if (_ === d) {
215
- if (h > d) {
216
- if (a.charCodeAt(u + _) === 47) return a.slice(u + _ + 1);
217
- if (_ === 0) return a.slice(u + _);
218
- } else e > d && (o.charCodeAt(s + _) === 47 ? P = _ : _ === 0 && (P = 0));
219
- break;
220
- }
221
- var f = o.charCodeAt(s + _);
222
- if (f !== a.charCodeAt(u + _)) break;
223
- f === 47 && (P = _);
224
- }
225
- var r = "";
226
- for (_ = s + P + 1; _ <= n; ++_) _ !== n && o.charCodeAt(_) !== 47 || (r.length === 0 ? r += ".." : r += "/..");
227
- return r.length > 0 ? r + a.slice(u + P) : (u += P, a.charCodeAt(u) === 47 && ++u, a.slice(u));
228
- }, _makeLong: function(o) {
229
- return o;
230
- }, dirname: function(o) {
231
- if (g(o), o.length === 0) return ".";
232
- for (var a = o.charCodeAt(0), s = a === 47, n = -1, e = !0, u = o.length - 1; u >= 1; --u) if ((a = o.charCodeAt(u)) === 47) {
233
- if (!e) {
234
- n = u;
235
- break;
236
- }
237
- } else e = !1;
238
- return n === -1 ? s ? "/" : "." : s && n === 1 ? "//" : o.slice(0, n);
239
- }, basename: function(o, a) {
240
- if (a !== void 0 && typeof a != "string") throw new TypeError('"ext" argument must be a string');
241
- g(o);
242
- var s, n = 0, e = -1, u = !0;
243
- if (a !== void 0 && a.length > 0 && a.length <= o.length) {
244
- if (a.length === o.length && a === o) return "";
245
- var h = a.length - 1, d = -1;
246
- for (s = o.length - 1; s >= 0; --s) {
247
- var P = o.charCodeAt(s);
248
- if (P === 47) {
249
- if (!u) {
250
- n = s + 1;
251
- break;
252
- }
253
- } else d === -1 && (u = !1, d = s + 1), h >= 0 && (P === a.charCodeAt(h) ? --h === -1 && (e = s) : (h = -1, e = d));
254
- }
255
- return n === e ? e = d : e === -1 && (e = o.length), o.slice(n, e);
256
- }
257
- for (s = o.length - 1; s >= 0; --s) if (o.charCodeAt(s) === 47) {
258
- if (!u) {
259
- n = s + 1;
260
- break;
261
- }
262
- } else e === -1 && (u = !1, e = s + 1);
263
- return e === -1 ? "" : o.slice(n, e);
264
- }, extname: function(o) {
265
- g(o);
266
- for (var a = -1, s = 0, n = -1, e = !0, u = 0, h = o.length - 1; h >= 0; --h) {
267
- var d = o.charCodeAt(h);
268
- if (d !== 47) n === -1 && (e = !1, n = h + 1), d === 46 ? a === -1 ? a = h : u !== 1 && (u = 1) : a !== -1 && (u = -1);
269
- else if (!e) {
270
- s = h + 1;
271
- break;
272
- }
273
- }
274
- return a === -1 || n === -1 || u === 0 || u === 1 && a === n - 1 && a === s + 1 ? "" : o.slice(a, n);
275
- }, format: function(o) {
276
- if (o === null || typeof o != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof o);
277
- return (function(a, s) {
278
- var n = s.dir || s.root, e = s.base || (s.name || "") + (s.ext || "");
279
- return n ? n === s.root ? n + e : n + a + e : e;
280
- })("/", o);
281
- }, parse: function(o) {
282
- g(o);
283
- var a = { root: "", dir: "", base: "", ext: "", name: "" };
284
- if (o.length === 0) return a;
285
- var s, n = o.charCodeAt(0), e = n === 47;
286
- e ? (a.root = "/", s = 1) : s = 0;
287
- for (var u = -1, h = 0, d = -1, P = !0, _ = o.length - 1, f = 0; _ >= s; --_) if ((n = o.charCodeAt(_)) !== 47) d === -1 && (P = !1, d = _ + 1), n === 46 ? u === -1 ? u = _ : f !== 1 && (f = 1) : u !== -1 && (f = -1);
288
- else if (!P) {
289
- h = _ + 1;
290
- break;
291
- }
292
- return u === -1 || d === -1 || f === 0 || f === 1 && u === d - 1 && u === h + 1 ? d !== -1 && (a.base = a.name = h === 0 && e ? o.slice(1, d) : o.slice(h, d)) : (h === 0 && e ? (a.name = o.slice(1, u), a.base = o.slice(1, d)) : (a.name = o.slice(h, u), a.base = o.slice(h, d)), a.ext = o.slice(u, d)), h > 0 ? a.dir = o.slice(0, h - 1) : e && (a.dir = "/"), a;
293
- }, sep: "/", delimiter: ":", win32: null, posix: null };
294
- return O.posix = O, H = O;
295
- }
296
- var Z, J = {};
297
- function be() {
298
- if (Z) return J;
299
- Z = 1;
300
- var g = J && J.__importDefault || function(O) {
301
- return O && O.__esModule ? O : { default: O };
302
- };
303
- Object.defineProperty(J, "__esModule", { value: !0 }), J.importResourcePathToString = void 0;
304
- var j = g(q());
305
- return J.importResourcePathToString = function(O) {
306
- var o;
307
- switch (O.kind) {
308
- case "package":
309
- return j.default.join(O.packageName, (o = O.importPath) !== null && o !== void 0 ? o : "", "package.json");
310
- case "relative":
311
- return j.default.join(O.sourcePath, O.importPath);
312
- case "relative-in-package":
313
- return j.default.join(O.packageName, O.sourcePath, O.importPath);
314
- }
315
- }, J;
316
- }
317
- var ee, B = {};
318
- function ke() {
319
- return ee ? B : (ee = 1, Object.defineProperty(B, "__esModule", { value: !0 }), B.invokeUpdate = void 0, B.invokeUpdate = function(g, j) {
320
- var O, o = "".concat(g.type, ": ");
321
- switch (g.type) {
322
- case "CodeChanged":
323
- case "ResolveNewImports":
324
- o += "";
325
- break;
326
- case "LookedUpTypeFile":
327
- o += '"'.concat(g.path, '" was ').concat(g.success ? "sucessfully" : "not sucessfully", " looked up");
328
- break;
329
- case "AttemptedLookUpFile":
330
- o += '"'.concat(g.path, '" was ').concat(g.success ? "sucessfully" : "not sucessfully", " attempted to looked up");
331
- break;
332
- case "LookedUpPackage":
333
- o += 'package.json for package "'.concat(g.package, '" was ').concat(g.success ? "sucessfully" : "not sucessfully", " looked up").concat(g.definitelyTyped ? " (found in definitely typed repo)" : "");
334
- break;
335
- case "LoadedFromCache":
336
- o += '"'.concat(g.importPath, '" was loaded from cache');
337
- break;
338
- case "StoredToCache":
339
- o += '"'.concat(g.importPath, '" was stored to cache');
340
- }
341
- o.endsWith(": ") && (o = o.slice(void 0, -2)), (O = j.onUpdate) === null || O === void 0 || O.call(j, g, o);
342
- }, B);
343
- }
344
- var te, re, ne, oe, z = {};
345
- function we() {
346
- if (te) return z;
347
- te = 1, Object.defineProperty(z, "__esModule", { value: !0 }), z.RecursionDepth = void 0;
348
- var g = (function() {
349
- function j(O, o, a) {
350
- o === void 0 && (o = 0), a === void 0 && (a = 0), this.options = O, this.fileRecursionDepth = o, this.packageRecursionDepth = a;
351
- }
352
- return j.prototype.nextPackage = function() {
353
- return new j(this.options, this.fileRecursionDepth, this.packageRecursionDepth + 1);
354
- }, j.prototype.nextFile = function() {
355
- return new j(this.options, this.fileRecursionDepth + 1, this.packageRecursionDepth);
356
- }, j.prototype.same = function() {
357
- return new j(this.options, this.fileRecursionDepth, this.packageRecursionDepth);
358
- }, j.prototype.shouldStop = function() {
359
- return this.options.fileRecursionDepth > 0 && this.fileRecursionDepth >= this.options.fileRecursionDepth || this.options.packageRecursionDepth > 0 && this.packageRecursionDepth >= this.options.packageRecursionDepth;
360
- }, j;
361
- })();
362
- return z.RecursionDepth = g, z;
363
- }
364
- function Pe() {
365
- if (re) return C;
366
- re = 1;
367
- var g = C && C.__assign || function() {
368
- return g = Object.assign || function(r) {
369
- for (var t, c = 1, l = arguments.length; c < l; c++) for (var i in t = arguments[c]) Object.prototype.hasOwnProperty.call(t, i) && (r[i] = t[i]);
370
- return r;
371
- }, g.apply(this, arguments);
372
- }, j = C && C.__createBinding || (Object.create ? function(r, t, c, l) {
373
- l === void 0 && (l = c);
374
- var i = Object.getOwnPropertyDescriptor(t, c);
375
- i && !("get" in i ? !t.__esModule : i.writable || i.configurable) || (i = { enumerable: !0, get: function() {
376
- return t[c];
377
- } }), Object.defineProperty(r, l, i);
378
- } : function(r, t, c, l) {
379
- l === void 0 && (l = c), r[l] = t[c];
380
- }), O = C && C.__setModuleDefault || (Object.create ? function(r, t) {
381
- Object.defineProperty(r, "default", { enumerable: !0, value: t });
382
- } : function(r, t) {
383
- r.default = t;
384
- }), o = C && C.__importStar || function(r) {
385
- if (r && r.__esModule) return r;
386
- var t = {};
387
- if (r != null) for (var c in r) c !== "default" && Object.prototype.hasOwnProperty.call(r, c) && j(t, r, c);
388
- return O(t, r), t;
389
- }, a = C && C.__awaiter || function(r, t, c, l) {
390
- return new (c || (c = Promise))(function(i, m) {
391
- function v(k) {
392
- try {
393
- y(l.next(k));
394
- } catch (p) {
395
- m(p);
396
- }
397
- }
398
- function b(k) {
399
- try {
400
- y(l.throw(k));
401
- } catch (p) {
402
- m(p);
403
- }
404
- }
405
- function y(k) {
406
- var p;
407
- k.done ? i(k.value) : (p = k.value, p instanceof c ? p : new c(function(w) {
408
- w(p);
409
- })).then(v, b);
410
- }
411
- y((l = l.apply(r, t || [])).next());
412
- });
413
- }, s = C && C.__generator || function(r, t) {
414
- var c, l, i, m, v = { label: 0, sent: function() {
415
- if (1 & i[0]) throw i[1];
416
- return i[1];
417
- }, trys: [], ops: [] };
418
- return m = { next: b(0), throw: b(1), return: b(2) }, typeof Symbol == "function" && (m[Symbol.iterator] = function() {
419
- return this;
420
- }), m;
421
- function b(y) {
422
- return function(k) {
423
- return (function(p) {
424
- if (c) throw new TypeError("Generator is already executing.");
425
- for (; v; ) try {
426
- if (c = 1, l && (i = 2 & p[0] ? l.return : p[0] ? l.throw || ((i = l.return) && i.call(l), 0) : l.next) && !(i = i.call(l, p[1])).done) return i;
427
- switch (l = 0, i && (p = [2 & p[0], i.value]), p[0]) {
428
- case 0:
429
- case 1:
430
- i = p;
431
- break;
432
- case 4:
433
- return v.label++, { value: p[1], done: !1 };
434
- case 5:
435
- v.label++, l = p[1], p = [0];
436
- continue;
437
- case 7:
438
- p = v.ops.pop(), v.trys.pop();
439
- continue;
440
- default:
441
- if (i = v.trys, !((i = i.length > 0 && i[i.length - 1]) || p[0] !== 6 && p[0] !== 2)) {
442
- v = 0;
443
- continue;
444
- }
445
- if (p[0] === 3 && (!i || p[1] > i[0] && p[1] < i[3])) {
446
- v.label = p[1];
447
- break;
448
- }
449
- if (p[0] === 6 && v.label < i[1]) {
450
- v.label = i[1], i = p;
451
- break;
452
- }
453
- if (i && v.label < i[2]) {
454
- v.label = i[2], v.ops.push(p);
455
- break;
456
- }
457
- i[2] && v.ops.pop(), v.trys.pop();
458
- continue;
459
- }
460
- p = t.call(r, v);
461
- } catch (w) {
462
- p = [6, w], l = 0;
463
- } finally {
464
- c = i = 0;
465
- }
466
- if (5 & p[0]) throw p[1];
467
- return { value: p[0] ? p[1] : void 0, done: !0 };
468
- })([y, k]);
469
- };
470
- }
471
- }, n = C && C.__values || function(r) {
472
- var t = typeof Symbol == "function" && Symbol.iterator, c = t && r[t], l = 0;
473
- if (c) return c.call(r);
474
- if (r && typeof r.length == "number") return { next: function() {
475
- return r && l >= r.length && (r = void 0), { value: r && r[l++], done: !r };
476
- } };
477
- throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
478
- }, e = C && C.__read || function(r, t) {
479
- var c = typeof Symbol == "function" && r[Symbol.iterator];
480
- if (!c) return r;
481
- var l, i, m = c.call(r), v = [];
482
- try {
483
- for (; (t === void 0 || t-- > 0) && !(l = m.next()).done; ) v.push(l.value);
484
- } catch (b) {
485
- i = { error: b };
486
- } finally {
487
- try {
488
- l && !l.done && (c = m.return) && c.call(m);
489
- } finally {
490
- if (i) throw i.error;
491
- }
492
- }
493
- return v;
494
- };
495
- Object.defineProperty(C, "__esModule", { value: !0 }), C.ImportResolver = void 0;
496
- var u = (function() {
497
- if (Y) return F;
498
- Y = 1;
499
- var r = F && F.__createBinding || (Object.create ? function(b, y, k, p) {
500
- p === void 0 && (p = k);
501
- var w = Object.getOwnPropertyDescriptor(y, k);
502
- w && !("get" in w ? !y.__esModule : w.writable || w.configurable) || (w = { enumerable: !0, get: function() {
503
- return y[k];
504
- } }), Object.defineProperty(b, p, w);
505
- } : function(b, y, k, p) {
506
- p === void 0 && (p = k), b[p] = y[k];
507
- }), t = F && F.__setModuleDefault || (Object.create ? function(b, y) {
508
- Object.defineProperty(b, "default", { enumerable: !0, value: y });
509
- } : function(b, y) {
510
- b.default = y;
511
- }), c = F && F.__importStar || function(b) {
512
- if (b && b.__esModule) return b;
513
- var y = {};
514
- if (b != null) for (var k in b) k !== "default" && Object.prototype.hasOwnProperty.call(b, k) && r(y, b, k);
515
- return t(y, b), y;
516
- }, l = F && F.__read || function(b, y) {
517
- var k = typeof Symbol == "function" && b[Symbol.iterator];
518
- if (!k) return b;
519
- var p, w, S = k.call(b), D = [];
520
- try {
521
- for (; (y === void 0 || y-- > 0) && !(p = S.next()).done; ) D.push(p.value);
522
- } catch (x) {
523
- w = { error: x };
524
- } finally {
525
- try {
526
- p && !p.done && (k = S.return) && k.call(S);
527
- } finally {
528
- if (w) throw w.error;
529
- }
530
- }
531
- return D;
532
- }, i = F && F.__spreadArray || function(b, y, k) {
533
- if (k || arguments.length === 2) for (var p, w = 0, S = y.length; w < S; w++) !p && w in y || (p || (p = Array.prototype.slice.call(y, 0, w)), p[w] = y[w]);
534
- return b.concat(p || Array.prototype.slice.call(y));
535
- };
536
- Object.defineProperty(F, "__esModule", { value: !0 }), F.DependencyParser = void 0;
537
- var m = c(q()), v = (function() {
538
- function b() {
539
- this.REGEX_CLEAN = /[\n|\r]/g, this.REGEX_DETECT_IMPORT = /(?:(?:(?:import)|(?:export))(?:.)*?from\s+["']([^"']+)["'])|(?:((?:require|import))(?:\s+)?\(["']([^"']+)["']\))|(?:\/+\s+<reference\s+path=["']([^"']+)["']\s+\/>)/g, this.REGEX_NODE_MODULE = /^node:([\w\W\/]+)$/;
540
- }
541
- return b.prototype.parseDependencies = function(y, k) {
542
- var p = this;
543
- return i([], l(y.matchAll(this.REGEX_DETECT_IMPORT)), !1).map(function(w) {
544
- var S, D;
545
- return (D = (S = w[1]) !== null && S !== void 0 ? S : w[2]) !== null && D !== void 0 ? D : w[3];
546
- }).filter(function(w) {
547
- return !!w;
548
- }).map(function(w) {
549
- return p.resolvePath(w, k);
550
- });
551
- }, b.prototype.resolvePath = function(y, k) {
552
- var p = y.match(this.REGEX_NODE_MODULE);
553
- if (p) return { kind: "relative-in-package", packageName: "@types/node", importPath: "".concat(p[1], ".d.ts"), sourcePath: "" };
554
- if (typeof k == "string") {
555
- if (y.startsWith(".")) return { kind: "relative", importPath: y, sourcePath: k };
556
- if (y.startsWith("@")) {
557
- var w = y.split("/");
558
- return { kind: "package", packageName: "".concat(w[0], "/").concat(w[1]), importPath: w.slice(2).join("/") };
559
- }
560
- return { kind: "package", packageName: (w = y.split("/"))[0], importPath: w.slice(1).join("/") };
561
- }
562
- switch (k.kind) {
563
- case "package":
564
- throw Error("TODO?");
565
- case "relative":
566
- throw Error("TODO2?");
567
- case "relative-in-package":
568
- return y.startsWith(".") ? { kind: "relative-in-package", packageName: k.packageName, sourcePath: m.join(k.sourcePath, k.importPath), importPath: y } : y.startsWith("@") ? (w = y.split("/"), { kind: "package", packageName: "".concat(w[0], "/").concat(w[1]), importPath: w.slice(2).join("/") }) : { kind: "package", packageName: (w = y.split("/"))[0], importPath: w.slice(1).join("/") };
569
- }
570
- }, b;
571
- })();
572
- return F.DependencyParser = v, F;
573
- })(), h = be(), d = o(q()), P = ke(), _ = we(), f = (function() {
574
- function r(t) {
575
- var c, l;
576
- if (this.options = t, this.loadedFiles = [], this.dependencyParser = new u.DependencyParser(), this.cache = t.sourceCache, this.sourceResolver = t.sourceResolver, this.newImportsResolved = !1, this.monaco = t.monaco, t.preloadPackages && t.versions) {
577
- this.versions = t.versions;
578
- try {
579
- for (var i = n(Object.entries(t.versions)), m = i.next(); !m.done; m = i.next()) {
580
- var v = e(m.value, 2), b = v[0];
581
- v[1], this.resolveImport({ kind: "package", packageName: b, importPath: "" }, new _.RecursionDepth(this.options)).catch(function(y) {
582
- console.error(y);
583
- });
584
- }
585
- } catch (y) {
586
- c = { error: y };
587
- } finally {
588
- try {
589
- m && !m.done && (l = i.return) && l.call(i);
590
- } finally {
591
- if (c) throw c.error;
592
- }
593
- }
594
- }
595
- }
596
- return r.prototype.wereNewImportsResolved = function() {
597
- return this.newImportsResolved;
598
- }, r.prototype.resetNewImportsResolved = function() {
599
- this.newImportsResolved = !1;
600
- }, r.prototype.resolveImportsInFile = function(t, c, l) {
601
- var i, m, v;
602
- return a(this, void 0, void 0, function() {
603
- var b, y, k, p, w, S, D, x;
604
- return s(this, function(R) {
605
- switch (R.label) {
606
- case 0:
607
- if (l.shouldStop()) return [2];
608
- b = this.dependencyParser.parseDependencies(t, c), R.label = 1;
609
- case 1:
610
- R.trys.push([1, 8, 9, 10]), y = n(b), k = y.next(), R.label = 2;
611
- case 2:
612
- if (k.done) return [3, 7];
613
- p = k.value, R.label = 3;
614
- case 3:
615
- return R.trys.push([3, 5, , 6]), [4, this.resolveImport(p, l)];
616
- case 4:
617
- return R.sent(), [3, 6];
618
- case 5:
619
- return w = R.sent(), this.options.onError ? (m = (i = this.options).onError) === null || m === void 0 || m.call(i, (v = w.message) !== null && v !== void 0 ? v : w) : console.error(w), [3, 6];
620
- case 6:
621
- return k = y.next(), [3, 2];
622
- case 7:
623
- return [3, 10];
624
- case 8:
625
- return S = R.sent(), D = { error: S }, [3, 10];
626
- case 9:
627
- try {
628
- k && !k.done && (x = y.return) && x.call(y);
629
- } finally {
630
- if (D) throw D.error;
631
- }
632
- return [7];
633
- case 10:
634
- return [2];
635
- }
636
- });
637
- });
638
- }, r.prototype.resolveImport = function(t, c) {
639
- return a(this, void 0, void 0, function() {
640
- var l, i;
641
- return s(this, function(m) {
642
- switch (m.label) {
643
- case 0:
644
- if (l = this.hashImportResourcePath(t), this.loadedFiles.includes(l)) return [2];
645
- switch (this.loadedFiles.push(l), t.kind) {
646
- case "package":
647
- return [3, 1];
648
- case "relative":
649
- return [3, 5];
650
- case "relative-in-package":
651
- return [3, 6];
652
- }
653
- return [3, 8];
654
- case 1:
655
- return [4, this.resolveImportFromPackageRoot(t)];
656
- case 2:
657
- return (i = m.sent()) ? [4, this.resolveImportInPackage(i, c.nextPackage().nextFile())] : [3, 4];
658
- case 3:
659
- case 7:
660
- return [2, m.sent()];
661
- case 4:
662
- return [3, 8];
663
- case 5:
664
- throw Error("Not implemented yet");
665
- case 6:
666
- return [4, this.resolveImportInPackage(t, c.nextFile())];
667
- case 8:
668
- return [2];
669
- }
670
- });
671
- });
672
- }, r.prototype.resolveImportInPackage = function(t, c) {
673
- return a(this, void 0, void 0, function() {
674
- var l, i, m;
675
- return s(this, function(v) {
676
- switch (v.label) {
677
- case 0:
678
- return [4, this.loadSourceFileContents(t)];
679
- case 1:
680
- return (l = v.sent()) ? (i = l.source, m = l.at, this.createModel(i, this.monaco.Uri.parse(this.options.fileRootPath + d.join("node_modules/".concat(t.packageName), m))), [4, this.resolveImportsInFile(i, { kind: "relative-in-package", packageName: t.packageName, sourcePath: d.dirname(m), importPath: "" }, c)]) : [3, 3];
681
- case 2:
682
- v.sent(), v.label = 3;
683
- case 3:
684
- return [2];
685
- }
686
- });
687
- });
688
- }, r.prototype.resolveImportFromPackageRoot = function(t) {
689
- var c, l, i, m, v, b, y, k, p;
690
- return a(this, void 0, void 0, function() {
691
- var w, S, D, x, R, N, V, E, T;
692
- return s(this, function(M) {
693
- switch (M.label) {
694
- case 0:
695
- return w = { type: "LookedUpPackage", package: t.packageName, definitelyTyped: !1, success: !1 }, !this.options.onlySpecifiedPackages || !((c = this.versions) === null || c === void 0) && c[t.packageName] || !((l = this.versions) === null || l === void 0) && l["@types/" + t.packageName] ? (S = (m = (i = t.importPath) === null || i === void 0 ? void 0 : i.length) !== null && m !== void 0 && m, D = S ? "/".concat(t.importPath) : "", [4, this.resolvePackageJson(t.packageName, (v = this.versions) === null || v === void 0 ? void 0 : v[t.packageName], S ? t.importPath : void 0)]) : ((0, P.invokeUpdate)(w, this.options), [2]);
696
- case 1:
697
- return (x = M.sent()) || !S ? [3, 3] : [4, this.resolvePackageJson(t.packageName, (b = this.versions) === null || b === void 0 ? void 0 : b[t.packageName])];
698
- case 2:
699
- x = M.sent(), D = "", M.label = 3;
700
- case 3:
701
- return x ? (R = JSON.parse(x)).typings || R.types ? (T = R.typings || R.types, this.createModel(x, this.monaco.Uri.parse("".concat(this.options.fileRootPath, "node_modules/").concat(t.packageName).concat(D, "/package.json"))), (0, P.invokeUpdate)({ type: "LookedUpPackage", package: t.packageName, definitelyTyped: !1, success: !0 }, this.options), this.setVersion(t.packageName, R.version), [2, { kind: "relative-in-package", packageName: t.packageName, sourcePath: "", importPath: d.join((y = t.importPath) !== null && y !== void 0 ? y : "", T.startsWith("./") ? T.slice(2) : T) }]) : [3, 4] : [3, 7];
702
- case 4:
703
- return N = "@types/".concat(t.packageName.startsWith("@") ? t.packageName.slice(1).replace(/\//, "__") : t.packageName), [4, this.resolvePackageJson(N, (k = this.versions) === null || k === void 0 ? void 0 : k[N])];
704
- case 5:
705
- if (V = M.sent()) {
706
- if ((E = JSON.parse(V)).typings || E.types) return T = E.typings || E.types, this.createModel(V, this.monaco.Uri.parse("".concat(this.options.fileRootPath, "node_modules/").concat(N, "/package.json"))), (0, P.invokeUpdate)({ type: "LookedUpPackage", package: N, definitelyTyped: !0, success: !0 }, this.options), this.setVersion(N, E.version), [2, { kind: "relative-in-package", packageName: N, sourcePath: "", importPath: d.join((p = t.importPath) !== null && p !== void 0 ? p : "", T.startsWith("./") ? T.slice(2) : T) }];
707
- (0, P.invokeUpdate)(w, this.options);
708
- } else (0, P.invokeUpdate)(w, this.options);
709
- M.label = 6;
710
- case 6:
711
- return [3, 8];
712
- case 7:
713
- (0, P.invokeUpdate)(w, this.options), M.label = 8;
714
- case 8:
715
- return [2];
716
- }
717
- });
718
- });
719
- }, r.prototype.loadSourceFileContents = function(t) {
720
- return a(this, void 0, void 0, function() {
721
- var c, l, i, m, v, b, y, k, p, w, S, D, x, R, N, V;
722
- return s(this, function(E) {
723
- switch (E.label) {
724
- case 0:
725
- return c = d.join(t.packageName, t.sourcePath, t.importPath), l = { type: "LookedUpTypeFile", path: c, definitelyTyped: !1, success: !1 }, i = t.packageName, m = this.getVersion(t.packageName), (v = [".d.ts", "/index.d.ts", ".ts", ".tsx", "/index.ts", "/index.tsx"]).map(function(T) {
726
- return t.importPath.endsWith(T);
727
- }).reduce(function(T, M) {
728
- return T || M;
729
- }, !1) ? [4, this.resolveSourceFile(i, m, d.join(t.sourcePath, t.importPath))] : [3, 2];
730
- case 1:
731
- return (R = E.sent()) ? [2, { source: R, at: d.join(t.sourcePath, t.importPath) }] : [3, 9];
732
- case 2:
733
- E.trys.push([2, 7, 8, 9]), b = n(v), y = b.next(), E.label = 3;
734
- case 3:
735
- return y.done ? [3, 6] : (k = y.value, p = d.join(t.sourcePath, t.importPath), x = (k === ".d.ts" && p.endsWith(".js") ? p.slice(0, -3) : p) + k, [4, this.resolveSourceFile(i, m, x)]);
736
- case 4:
737
- if (R = E.sent(), (0, P.invokeUpdate)({ type: "AttemptedLookUpFile", path: d.join(i, x), success: !!R }, this.options), R) return (0, P.invokeUpdate)({ type: "LookedUpTypeFile", path: d.join(i, x), success: !0 }, this.options), [2, { source: R, at: x }];
738
- E.label = 5;
739
- case 5:
740
- return y = b.next(), [3, 3];
741
- case 6:
742
- return [3, 9];
743
- case 7:
744
- return w = E.sent(), N = { error: w }, [3, 9];
745
- case 8:
746
- try {
747
- y && !y.done && (V = b.return) && V.call(b);
748
- } finally {
749
- if (N) throw N.error;
750
- }
751
- return [7];
752
- case 9:
753
- return [4, this.resolvePackageJson(i, m, d.join(t.sourcePath, t.importPath))];
754
- case 10:
755
- return (S = E.sent()) && (D = JSON.parse(S).types) ? (x = d.join(t.sourcePath, t.importPath, D), [4, this.resolveSourceFile(i, m, x)]) : [3, 12];
756
- case 11:
757
- if (R = E.sent()) return (0, P.invokeUpdate)({ type: "LookedUpTypeFile", path: d.join(i, x), success: !0 }, this.options), [2, { source: R, at: x }];
758
- E.label = 12;
759
- case 12:
760
- return (0, P.invokeUpdate)(l, this.options), [2, null];
761
- }
762
- });
763
- });
764
- }, r.prototype.getVersion = function(t) {
765
- var c;
766
- return (c = this.versions) === null || c === void 0 ? void 0 : c[t];
767
- }, r.prototype.setVersions = function(t) {
768
- var c, l;
769
- this.versions = t, (l = (c = this.options).onUpdateVersions) === null || l === void 0 || l.call(c, t);
770
- }, r.prototype.setVersion = function(t, c) {
771
- var l;
772
- this.setVersions(g(g({}, this.versions), ((l = {})[t] = c, l)));
773
- }, r.prototype.createModel = function(t, c) {
774
- c = c.with({ path: c.path.replace("@types/", "") }), this.monaco.editor.getModel(c) || (this.monaco.editor.createModel(t, "typescript", c), this.newImportsResolved = !0);
775
- }, r.prototype.hashImportResourcePath = function(t) {
776
- return (0, h.importResourcePathToString)(t);
777
- }, r.prototype.resolvePackageJson = function(t, c, l) {
778
- return a(this, void 0, void 0, function() {
779
- var i, m, v, b;
780
- return s(this, function(y) {
781
- switch (y.label) {
782
- case 0:
783
- return i = d.join(t + (c ? "@".concat(c) : ""), l ?? "", "package.json"), m = !1, v = void 0, this.cache.isFileAvailable ? [4, this.cache.isFileAvailable(i)] : [3, 2];
784
- case 1:
785
- return m = y.sent(), [3, 4];
786
- case 2:
787
- return [4, this.cache.getFile(i)];
788
- case 3:
789
- v = y.sent(), m = v !== void 0, y.label = 4;
790
- case 4:
791
- return m ? v == null ? [3, 5] : (b = v, [3, 7]) : [3, 8];
792
- case 5:
793
- return [4, this.cache.getFile(i)];
794
- case 6:
795
- b = y.sent(), y.label = 7;
796
- case 7:
797
- return [2, b];
798
- case 8:
799
- return [4, this.sourceResolver.resolvePackageJson(t, c, l)];
800
- case 9:
801
- return (v = y.sent()) && this.cache.storeFile(i, v), [2, v];
802
- }
803
- });
804
- });
805
- }, r.prototype.resolveSourceFile = function(t, c, l) {
806
- return a(this, void 0, void 0, function() {
807
- var i, m, v, b;
808
- return s(this, function(y) {
809
- switch (y.label) {
810
- case 0:
811
- return i = d.join(t + (c ? "@".concat(c) : ""), l), m = !1, v = void 0, this.cache.isFileAvailable ? [4, this.cache.isFileAvailable(i)] : [3, 2];
812
- case 1:
813
- return m = y.sent(), [3, 4];
814
- case 2:
815
- return [4, this.cache.getFile(i)];
816
- case 3:
817
- v = y.sent(), m = v !== void 0, y.label = 4;
818
- case 4:
819
- return m ? ((0, P.invokeUpdate)({ type: "LoadedFromCache", importPath: i }, this.options), v == null ? [3, 5] : (b = v, [3, 7])) : [3, 8];
820
- case 5:
821
- return [4, this.cache.getFile(i)];
822
- case 6:
823
- b = y.sent(), y.label = 7;
824
- case 7:
825
- return [2, b];
826
- case 8:
827
- return [4, this.sourceResolver.resolveSourceFile(t, c, l)];
828
- case 9:
829
- return (v = y.sent()) && ((0, P.invokeUpdate)({ type: "StoredToCache", importPath: i }, this.options), this.cache.storeFile(i, v)), [2, v];
830
- }
831
- });
832
- });
833
- }, r;
834
- })();
835
- return C.ImportResolver = f, C;
836
- }
837
- function Oe() {
838
- if (ne) return A;
839
- ne = 1;
840
- var g = A && A.__assign || function() {
841
- return g = Object.assign || function(r) {
842
- for (var t, c = 1, l = arguments.length; c < l; c++) for (var i in t = arguments[c]) Object.prototype.hasOwnProperty.call(t, i) && (r[i] = t[i]);
843
- return r;
844
- }, g.apply(this, arguments);
845
- }, j = A && A.__createBinding || (Object.create ? function(r, t, c, l) {
846
- l === void 0 && (l = c);
847
- var i = Object.getOwnPropertyDescriptor(t, c);
848
- i && !("get" in i ? !t.__esModule : i.writable || i.configurable) || (i = { enumerable: !0, get: function() {
849
- return t[c];
850
- } }), Object.defineProperty(r, l, i);
851
- } : function(r, t, c, l) {
852
- l === void 0 && (l = c), r[l] = t[c];
853
- }), O = A && A.__setModuleDefault || (Object.create ? function(r, t) {
854
- Object.defineProperty(r, "default", { enumerable: !0, value: t });
855
- } : function(r, t) {
856
- r.default = t;
857
- }), o = A && A.__importStar || function(r) {
858
- if (r && r.__esModule) return r;
859
- var t = {};
860
- if (r != null) for (var c in r) c !== "default" && Object.prototype.hasOwnProperty.call(r, c) && j(t, r, c);
861
- return O(t, r), t;
862
- }, a = A && A.__awaiter || function(r, t, c, l) {
863
- return new (c || (c = Promise))(function(i, m) {
864
- function v(k) {
865
- try {
866
- y(l.next(k));
867
- } catch (p) {
868
- m(p);
869
- }
870
- }
871
- function b(k) {
872
- try {
873
- y(l.throw(k));
874
- } catch (p) {
875
- m(p);
876
- }
877
- }
878
- function y(k) {
879
- var p;
880
- k.done ? i(k.value) : (p = k.value, p instanceof c ? p : new c(function(w) {
881
- w(p);
882
- })).then(v, b);
883
- }
884
- y((l = l.apply(r, t || [])).next());
885
- });
886
- }, s = A && A.__generator || function(r, t) {
887
- var c, l, i, m, v = { label: 0, sent: function() {
888
- if (1 & i[0]) throw i[1];
889
- return i[1];
890
- }, trys: [], ops: [] };
891
- return m = { next: b(0), throw: b(1), return: b(2) }, typeof Symbol == "function" && (m[Symbol.iterator] = function() {
892
- return this;
893
- }), m;
894
- function b(y) {
895
- return function(k) {
896
- return (function(p) {
897
- if (c) throw new TypeError("Generator is already executing.");
898
- for (; v; ) try {
899
- if (c = 1, l && (i = 2 & p[0] ? l.return : p[0] ? l.throw || ((i = l.return) && i.call(l), 0) : l.next) && !(i = i.call(l, p[1])).done) return i;
900
- switch (l = 0, i && (p = [2 & p[0], i.value]), p[0]) {
901
- case 0:
902
- case 1:
903
- i = p;
904
- break;
905
- case 4:
906
- return v.label++, { value: p[1], done: !1 };
907
- case 5:
908
- v.label++, l = p[1], p = [0];
909
- continue;
910
- case 7:
911
- p = v.ops.pop(), v.trys.pop();
912
- continue;
913
- default:
914
- if (i = v.trys, !((i = i.length > 0 && i[i.length - 1]) || p[0] !== 6 && p[0] !== 2)) {
915
- v = 0;
916
- continue;
917
- }
918
- if (p[0] === 3 && (!i || p[1] > i[0] && p[1] < i[3])) {
919
- v.label = p[1];
920
- break;
921
- }
922
- if (p[0] === 6 && v.label < i[1]) {
923
- v.label = i[1], i = p;
924
- break;
925
- }
926
- if (i && v.label < i[2]) {
927
- v.label = i[2], v.ops.push(p);
928
- break;
929
- }
930
- i[2] && v.ops.pop(), v.trys.pop();
931
- continue;
932
- }
933
- p = t.call(r, v);
934
- } catch (w) {
935
- p = [6, w], l = 0;
936
- } finally {
937
- c = i = 0;
938
- }
939
- if (5 & p[0]) throw p[1];
940
- return { value: p[0] ? p[1] : void 0, done: !0 };
941
- })([y, k]);
942
- };
943
- }
944
- }, n = A && A.__values || function(r) {
945
- var t = typeof Symbol == "function" && Symbol.iterator, c = t && r[t], l = 0;
946
- if (c) return c.call(r);
947
- if (r && typeof r.length == "number") return { next: function() {
948
- return r && l >= r.length && (r = void 0), { value: r && r[l++], done: !r };
949
- } };
950
- throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
951
- };
952
- Object.defineProperty(A, "__esModule", { value: !0 }), A.AutoTypingsCore = void 0;
953
- var e = (function() {
954
- if (K) return X;
955
- K = 1, Object.defineProperty(X, "__esModule", { value: !0 }), X.DummySourceCache = void 0;
956
- var r = (function() {
957
- function t() {
958
- }
959
- return t.prototype.getFile = function(c) {
960
- return Promise.resolve(void 0);
961
- }, t.prototype.isFileAvailable = function(c) {
962
- return Promise.resolve(!1);
963
- }, t.prototype.storeFile = function(c, l) {
964
- return Promise.resolve(void 0);
965
- }, t.prototype.clear = function() {
966
- return Promise.resolve(void 0);
967
- }, t;
968
- })();
969
- return X.DummySourceCache = r, X;
970
- })(), u = me(), h = Pe(), d = o(q()), P = ke(), _ = we(), f = (function() {
971
- function r(t, c) {
972
- var l = this;
973
- this.editor = t, this.options = c, this.disposables = [], this.importResolver = new h.ImportResolver(c);
974
- var i = t.onDidChangeModelContent(function(m) {
975
- l.debouncedResolveContents();
976
- });
977
- this.disposables.push(i), this.resolveContents(), c.dontAdaptEditorOptions || c.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(g(g({}, c.monaco.languages.typescript.typescriptDefaults.getCompilerOptions()), { moduleResolution: c.monaco.languages.typescript.ModuleResolutionKind.NodeJs, allowSyntheticDefaultImports: !0, rootDir: c.fileRootPath }));
978
- }
979
- return r.create = function(t, c) {
980
- var l, i;
981
- return a(this, void 0, void 0, function() {
982
- var m;
983
- return s(this, function(v) {
984
- if (c?.shareCache && c.sourceCache && !r.sharedCache && (r.sharedCache = c.sourceCache), !(m = c?.monaco)) throw new Error("monacoInstance not found, you can specify the monaco instance via options.monaco");
985
- return [2, new r(t, g(g({ fileRootPath: "inmemory://model/", onlySpecifiedPackages: !1, preloadPackages: !1, shareCache: !1, dontAdaptEditorOptions: !1, dontRefreshModelValueAfterResolvement: !1, sourceCache: (l = r.sharedCache) !== null && l !== void 0 ? l : new e.DummySourceCache(), sourceResolver: (i = c?.sourceResolver) !== null && i !== void 0 ? i : new u.JsDelivrSourceResolver(), debounceDuration: 4e3, fileRecursionDepth: 10, packageRecursionDepth: 3 }, c), { monaco: m }))];
986
- });
987
- });
988
- }, r.prototype.dispose = function() {
989
- var t, c;
990
- try {
991
- for (var l = n(this.disposables), i = l.next(); !i.done; i = l.next())
992
- i.value.dispose();
993
- } catch (m) {
994
- t = { error: m };
995
- } finally {
996
- try {
997
- i && !i.done && (c = l.return) && c.call(l);
998
- } finally {
999
- if (t) throw t.error;
1000
- }
1001
- }
1002
- }, r.prototype.setVersions = function(t) {
1003
- this.importResolver.setVersions(t), this.options.versions = t;
1004
- }, r.prototype.clearCache = function() {
1005
- return a(this, void 0, void 0, function() {
1006
- return s(this, function(t) {
1007
- switch (t.label) {
1008
- case 0:
1009
- return [4, this.options.sourceCache.clear()];
1010
- case 1:
1011
- return t.sent(), [2];
1012
- }
1013
- });
1014
- });
1015
- }, r.prototype.debouncedResolveContents = function() {
1016
- var t = this;
1017
- this.isResolving || ((0, P.invokeUpdate)({ type: "CodeChanged" }, this.options), this.options.debounceDuration <= 0 ? this.resolveContents() : (this.debounceTimer !== void 0 && clearTimeout(this.debounceTimer), this.debounceTimer = setTimeout(function() {
1018
- return a(t, void 0, void 0, function() {
1019
- return s(this, function(c) {
1020
- switch (c.label) {
1021
- case 0:
1022
- return [4, this.resolveContents()];
1023
- case 1:
1024
- return c.sent(), this.debounceTimer = void 0, [2];
1025
- }
1026
- });
1027
- });
1028
- }, this.options.debounceDuration)));
1029
- }, r.prototype.resolveContents = function() {
1030
- var t;
1031
- return a(this, void 0, void 0, function() {
1032
- var c, l, i, m;
1033
- return s(this, function(v) {
1034
- switch (v.label) {
1035
- case 0:
1036
- if (this.isResolving = !0, (0, P.invokeUpdate)({ type: "ResolveNewImports" }, this.options), !(c = this.editor.getModel())) throw Error("No model");
1037
- l = c.getLinesContent(), v.label = 1;
1038
- case 1:
1039
- return v.trys.push([1, 3, , 4]), [4, this.importResolver.resolveImportsInFile(l.join(`
1040
- `), d.dirname(c.uri.toString()), new _.RecursionDepth(this.options))];
1041
- case 2:
1042
- return v.sent(), [3, 4];
1043
- case 3:
1044
- if (i = v.sent(), !this.options.onError) throw i;
1045
- return this.options.onError((t = i.message) !== null && t !== void 0 ? t : i), [3, 4];
1046
- case 4:
1047
- return this.importResolver.wereNewImportsResolved() && (this.options.dontRefreshModelValueAfterResolvement || (m = this.editor.getPosition(), c.setValue(c.getValue()), m && this.editor.setPosition(m)), this.importResolver.resetNewImportsResolved()), this.isResolving = !1, [2];
1048
- }
1049
- });
1050
- });
1051
- }, r;
1052
- })();
1053
- return A.AutoTypingsCore = f, A;
1054
- }
1055
- var ae, I = {};
1056
- function je() {
1057
- if (ae) return I;
1058
- ae = 1;
1059
- var g = I && I.__awaiter || function(a, s, n, e) {
1060
- return new (n || (n = Promise))(function(u, h) {
1061
- function d(f) {
1062
- try {
1063
- _(e.next(f));
1064
- } catch (r) {
1065
- h(r);
1066
- }
1067
- }
1068
- function P(f) {
1069
- try {
1070
- _(e.throw(f));
1071
- } catch (r) {
1072
- h(r);
1073
- }
1074
- }
1075
- function _(f) {
1076
- var r;
1077
- f.done ? u(f.value) : (r = f.value, r instanceof n ? r : new n(function(t) {
1078
- t(r);
1079
- })).then(d, P);
1080
- }
1081
- _((e = e.apply(a, s || [])).next());
1082
- });
1083
- }, j = I && I.__generator || function(a, s) {
1084
- var n, e, u, h, d = { label: 0, sent: function() {
1085
- if (1 & u[0]) throw u[1];
1086
- return u[1];
1087
- }, trys: [], ops: [] };
1088
- return h = { next: P(0), throw: P(1), return: P(2) }, typeof Symbol == "function" && (h[Symbol.iterator] = function() {
1089
- return this;
1090
- }), h;
1091
- function P(_) {
1092
- return function(f) {
1093
- return (function(r) {
1094
- if (n) throw new TypeError("Generator is already executing.");
1095
- for (; d; ) try {
1096
- if (n = 1, e && (u = 2 & r[0] ? e.return : r[0] ? e.throw || ((u = e.return) && u.call(e), 0) : e.next) && !(u = u.call(e, r[1])).done) return u;
1097
- switch (e = 0, u && (r = [2 & r[0], u.value]), r[0]) {
1098
- case 0:
1099
- case 1:
1100
- u = r;
1101
- break;
1102
- case 4:
1103
- return d.label++, { value: r[1], done: !1 };
1104
- case 5:
1105
- d.label++, e = r[1], r = [0];
1106
- continue;
1107
- case 7:
1108
- r = d.ops.pop(), d.trys.pop();
1109
- continue;
1110
- default:
1111
- if (u = d.trys, !((u = u.length > 0 && u[u.length - 1]) || r[0] !== 6 && r[0] !== 2)) {
1112
- d = 0;
1113
- continue;
1114
- }
1115
- if (r[0] === 3 && (!u || r[1] > u[0] && r[1] < u[3])) {
1116
- d.label = r[1];
1117
- break;
1118
- }
1119
- if (r[0] === 6 && d.label < u[1]) {
1120
- d.label = u[1], u = r;
1121
- break;
1122
- }
1123
- if (u && d.label < u[2]) {
1124
- d.label = u[2], d.ops.push(r);
1125
- break;
1126
- }
1127
- u[2] && d.ops.pop(), d.trys.pop();
1128
- continue;
1129
- }
1130
- r = s.call(a, d);
1131
- } catch (t) {
1132
- r = [6, t], e = 0;
1133
- } finally {
1134
- n = u = 0;
1135
- }
1136
- if (5 & r[0]) throw r[1];
1137
- return { value: r[0] ? r[1] : void 0, done: !0 };
1138
- })([_, f]);
1139
- };
1140
- }
1141
- }, O = I && I.__values || function(a) {
1142
- var s = typeof Symbol == "function" && Symbol.iterator, n = s && a[s], e = 0;
1143
- if (n) return n.call(a);
1144
- if (a && typeof a.length == "number") return { next: function() {
1145
- return a && e >= a.length && (a = void 0), { value: a && a[e++], done: !a };
1146
- } };
1147
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1148
- };
1149
- Object.defineProperty(I, "__esModule", { value: !0 }), I.LocalStorageCache = void 0;
1150
- var o = (function() {
1151
- function a() {
1152
- this.localCache = {};
1153
- }
1154
- return a.prototype.getFile = function(s) {
1155
- var n;
1156
- return g(this, void 0, void 0, function() {
1157
- return j(this, function(e) {
1158
- try {
1159
- return [2, (n = localStorage.getItem(a.LOCALSTORAGE_PREFIX + s)) !== null && n !== void 0 ? n : void 0];
1160
- } catch {
1161
- return [2, this.localCache[s]];
1162
- }
1163
- return [2];
1164
- });
1165
- });
1166
- }, a.prototype.storeFile = function(s, n) {
1167
- return g(this, void 0, void 0, function() {
1168
- return j(this, function(e) {
1169
- this.localCache[s] = n;
1170
- try {
1171
- localStorage.setItem(a.LOCALSTORAGE_PREFIX + s, n);
1172
- } catch {
1173
- }
1174
- return [2];
1175
- });
1176
- });
1177
- }, a.prototype.clear = function() {
1178
- return g(this, void 0, void 0, function() {
1179
- var s, n, e, u, h, d, P;
1180
- return j(this, function(_) {
1181
- for (this.localCache = {}, s = [], n = 0; n < localStorage.length; n++) (h = localStorage.key(n)) != null && h.startsWith(a.LOCALSTORAGE_PREFIX) && s.push(h);
1182
- try {
1183
- for (e = O(s), u = e.next(); !u.done; u = e.next()) h = u.value, localStorage.removeItem(h);
1184
- } catch (f) {
1185
- d = { error: f };
1186
- } finally {
1187
- try {
1188
- u && !u.done && (P = e.return) && P.call(e);
1189
- } finally {
1190
- if (d) throw d.error;
1191
- }
1192
- }
1193
- return [2];
1194
- });
1195
- });
1196
- }, a.LOCALSTORAGE_PREFIX = "__autotyper_cache_", a;
1197
- })();
1198
- return I.LocalStorageCache = o, I;
1199
- }
1200
- var ie, se = {}, ce, ue = {}, le, pe = {}, he, fe = {}, de, ve, ye, ge, L = {};
1201
- function Re() {
1202
- if (de) return L;
1203
- de = 1;
1204
- var g = L && L.__awaiter || function(o, a, s, n) {
1205
- return new (s || (s = Promise))(function(e, u) {
1206
- function h(_) {
1207
- try {
1208
- P(n.next(_));
1209
- } catch (f) {
1210
- u(f);
1211
- }
1212
- }
1213
- function d(_) {
1214
- try {
1215
- P(n.throw(_));
1216
- } catch (f) {
1217
- u(f);
1218
- }
1219
- }
1220
- function P(_) {
1221
- var f;
1222
- _.done ? e(_.value) : (f = _.value, f instanceof s ? f : new s(function(r) {
1223
- r(f);
1224
- })).then(h, d);
1225
- }
1226
- P((n = n.apply(o, a || [])).next());
1227
- });
1228
- }, j = L && L.__generator || function(o, a) {
1229
- var s, n, e, u, h = { label: 0, sent: function() {
1230
- if (1 & e[0]) throw e[1];
1231
- return e[1];
1232
- }, trys: [], ops: [] };
1233
- return u = { next: d(0), throw: d(1), return: d(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
1234
- return this;
1235
- }), u;
1236
- function d(P) {
1237
- return function(_) {
1238
- return (function(f) {
1239
- if (s) throw new TypeError("Generator is already executing.");
1240
- for (; h; ) try {
1241
- if (s = 1, n && (e = 2 & f[0] ? n.return : f[0] ? n.throw || ((e = n.return) && e.call(n), 0) : n.next) && !(e = e.call(n, f[1])).done) return e;
1242
- switch (n = 0, e && (f = [2 & f[0], e.value]), f[0]) {
1243
- case 0:
1244
- case 1:
1245
- e = f;
1246
- break;
1247
- case 4:
1248
- return h.label++, { value: f[1], done: !1 };
1249
- case 5:
1250
- h.label++, n = f[1], f = [0];
1251
- continue;
1252
- case 7:
1253
- f = h.ops.pop(), h.trys.pop();
1254
- continue;
1255
- default:
1256
- if (e = h.trys, !((e = e.length > 0 && e[e.length - 1]) || f[0] !== 6 && f[0] !== 2)) {
1257
- h = 0;
1258
- continue;
1259
- }
1260
- if (f[0] === 3 && (!e || f[1] > e[0] && f[1] < e[3])) {
1261
- h.label = f[1];
1262
- break;
1263
- }
1264
- if (f[0] === 6 && h.label < e[1]) {
1265
- h.label = e[1], e = f;
1266
- break;
1267
- }
1268
- if (e && h.label < e[2]) {
1269
- h.label = e[2], h.ops.push(f);
1270
- break;
1271
- }
1272
- e[2] && h.ops.pop(), h.trys.pop();
1273
- continue;
1274
- }
1275
- f = a.call(o, h);
1276
- } catch (r) {
1277
- f = [6, r], n = 0;
1278
- } finally {
1279
- s = e = 0;
1280
- }
1281
- if (5 & f[0]) throw f[1];
1282
- return { value: f[0] ? f[1] : void 0, done: !0 };
1283
- })([P, _]);
1284
- };
1285
- }
1286
- };
1287
- Object.defineProperty(L, "__esModule", { value: !0 }), L.UnpkgSourceResolver = void 0;
1288
- var O = (function() {
1289
- function o() {
1290
- }
1291
- return o.prototype.resolvePackageJson = function(a, s, n) {
1292
- return g(this, void 0, void 0, function() {
1293
- return j(this, function(e) {
1294
- switch (e.label) {
1295
- case 0:
1296
- return [4, this.resolveFile("https://unpkg.com/".concat(a).concat(s ? "@".concat(s) : "").concat(n ? "/".concat(n) : "", "/package.json"))];
1297
- case 1:
1298
- return [2, e.sent()];
1299
- }
1300
- });
1301
- });
1302
- }, o.prototype.resolveSourceFile = function(a, s, n) {
1303
- return g(this, void 0, void 0, function() {
1304
- return j(this, function(e) {
1305
- switch (e.label) {
1306
- case 0:
1307
- return [4, this.resolveFile("https://unpkg.com/".concat(a).concat(s ? "@".concat(s) : "", "/").concat(n))];
1308
- case 1:
1309
- return [2, e.sent()];
1310
- }
1311
- });
1312
- });
1313
- }, o.prototype.resolveFile = function(a) {
1314
- return g(this, void 0, void 0, function() {
1315
- var s;
1316
- return j(this, function(n) {
1317
- switch (n.label) {
1318
- case 0:
1319
- return [4, fetch(a, { method: "GET" })];
1320
- case 1:
1321
- return (s = n.sent()).ok ? [4, s.text()] : [3, 3];
1322
- case 2:
1323
- return [2, n.sent()];
1324
- case 3:
1325
- if (s.status === 404) return [2, ""];
1326
- throw Error("Error other than 404 while fetching from Unpkg at ".concat(a));
1327
- case 4:
1328
- return [2];
1329
- }
1330
- });
1331
- });
1332
- }, o;
1333
- })();
1334
- return L.UnpkgSourceResolver = O, L;
1335
- }
1336
- function Ce() {
1337
- return ve || (ve = 1, g = W, j = W && W.__createBinding || (Object.create ? function(o, a, s, n) {
1338
- n === void 0 && (n = s);
1339
- var e = Object.getOwnPropertyDescriptor(a, s);
1340
- e && !("get" in e ? !a.__esModule : e.writable || e.configurable) || (e = { enumerable: !0, get: function() {
1341
- return a[s];
1342
- } }), Object.defineProperty(o, n, e);
1343
- } : function(o, a, s, n) {
1344
- n === void 0 && (n = s), o[n] = a[s];
1345
- }), O = W && W.__exportStar || function(o, a) {
1346
- for (var s in o) s === "default" || Object.prototype.hasOwnProperty.call(a, s) || j(a, o, s);
1347
- }, Object.defineProperty(g, "__esModule", { value: !0 }), O((function() {
1348
- if (oe) return G;
1349
- oe = 1;
1350
- var o, a = G && G.__extends || (o = function(n, e) {
1351
- return o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, h) {
1352
- u.__proto__ = h;
1353
- } || function(u, h) {
1354
- for (var d in h) Object.prototype.hasOwnProperty.call(h, d) && (u[d] = h[d]);
1355
- }, o(n, e);
1356
- }, function(n, e) {
1357
- if (typeof e != "function" && e !== null) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
1358
- function u() {
1359
- this.constructor = n;
1360
- }
1361
- o(n, e), n.prototype = e === null ? Object.create(e) : (u.prototype = e.prototype, new u());
1362
- });
1363
- Object.defineProperty(G, "__esModule", { value: !0 }), G.AutoTypings = void 0;
1364
- var s = (function(n) {
1365
- function e(u, h) {
1366
- return n.call(this, u, h) || this;
1367
- }
1368
- return a(e, n), e;
1369
- })(Oe().AutoTypingsCore);
1370
- return G.AutoTypings = s, G;
1371
- })(), g), O(be(), g), O(je(), g), O((ie || (ie = 1, Object.defineProperty(se, "__esModule", { value: !0 })), se), g), O((ce || (ce = 1, Object.defineProperty(ue, "__esModule", { value: !0 })), ue), g), O((le || (le = 1, Object.defineProperty(pe, "__esModule", { value: !0 })), pe), g), O((he || (he = 1, Object.defineProperty(fe, "__esModule", { value: !0 })), fe), g), O(Re(), g), O(me(), g)), W;
1372
- var g, j, O;
1373
- }
1374
- const Se = _e({ __proto__: null }, [ge ? ye : (ge = 1, ye = Ce())]);
1375
- export {
1376
- Se as c
1377
- };