@teselagen/ove 0.7.26 → 0.7.28

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 (304) hide show
  1. package/AASliver.js +187 -0
  2. package/AddLaddersDialog.js +82 -0
  3. package/AdditionalCutsiteInfoDialog.js +599 -0
  4. package/AlignmentView/Mismatches.d.ts +3 -3
  5. package/AlignmentVisibilityTool.js +105 -0
  6. package/AnnotationContainerHolder.js +20 -0
  7. package/AnnotationPositioner.js +27 -0
  8. package/AutoAnnotate.js +501 -0
  9. package/AutoAnnotateBpMatchingDialog.js +208 -0
  10. package/Axis.js +151 -0
  11. package/AxisNumbers.js +35 -0
  12. package/Browser.js +106 -0
  13. package/Caret.js +63 -0
  14. package/Chromatogram.js +293 -0
  15. package/CircularDnaSequence.js +73 -0
  16. package/CircularView/Labels/index.d.ts +1 -1
  17. package/CircularView/index.d.ts +0 -1
  18. package/CircularZoomMinimap.js +16 -0
  19. package/ColorPicker.js +30 -0
  20. package/CommandHotkeyHandler.js +44 -0
  21. package/CreateAnnotationsPage.d.ts +4 -4
  22. package/CreateAnnotationsPage.js +98 -0
  23. package/Cutsite.js +18 -0
  24. package/CutsiteProperties.js +176 -0
  25. package/CutsiteSelectionLayers.js +47 -0
  26. package/Cutsites.js +271 -0
  27. package/DeletionLayer.js +28 -0
  28. package/DigestTool/Ladder.d.ts +1 -1
  29. package/DropHandler.css +21 -0
  30. package/DropHandler.js +64 -0
  31. package/EditCaretPosition.js +234 -0
  32. package/EditTrackNameDialog.js +30 -0
  33. package/Feature.js +83 -0
  34. package/FeatureProperties.js +6 -0
  35. package/FillWindow.js +47 -0
  36. package/GenbankView.js +74 -0
  37. package/GeneralProperties.js +117 -0
  38. package/GenericAnnotationProperties.js +406 -0
  39. package/GlobalDialog.js +73 -0
  40. package/GlobalDialogUtils.js +110 -0
  41. package/GoToDialog.js +25 -0
  42. package/HorizontalPanelDragHandle.js +35 -0
  43. package/Keyboard.js +85 -0
  44. package/Labels.js +327 -0
  45. package/Ladder.css +20 -0
  46. package/Ladder.js +303 -0
  47. package/MeltingTemp.js +85 -0
  48. package/Menlo.ttf +0 -0
  49. package/Minimap.js +515 -0
  50. package/Mismatches.js +134 -0
  51. package/Monaco.ttf +0 -0
  52. package/MultipleSeqsDetectedOnImportDialog.js +74 -0
  53. package/Orf.js +109 -0
  54. package/OrfProperties.js +117 -0
  55. package/Orfs.js +35 -0
  56. package/PCRTool.js +179 -0
  57. package/PairwiseAlignmentView.js +68 -0
  58. package/Part.js +34 -0
  59. package/PartProperties.js +9 -0
  60. package/PassThrough.js +3 -0
  61. package/PerformantSelectionLayer.js +32 -0
  62. package/PinchHelper.js +24 -0
  63. package/PointedAnnotation.js +347 -0
  64. package/PositionAnnotationOnCircle.js +26 -0
  65. package/Primer.js +41 -0
  66. package/PrimerProperties.js +19 -0
  67. package/Reflex/index.d.ts +0 -1
  68. package/ReflexContainer.js +802 -0
  69. package/ReflexElement.js +160 -0
  70. package/ReflexEvents.js +77 -0
  71. package/ReflexSplitter.js +205 -0
  72. package/RenameSequenceDialog.js +7 -0
  73. package/RotateCircularViewSlider.js +93 -0
  74. package/RowView/index.d.ts +0 -1
  75. package/SelectDialog.js +150 -0
  76. package/SequenceName.js +15 -0
  77. package/SimpleCircularOrLinearView.js +381 -0
  78. package/SimpleOligoPreview.js +39 -0
  79. package/SingleEnzymeCutsiteInfo.js +139 -0
  80. package/ToolBar/ToolbarItem.d.ts +1 -3
  81. package/ToolbarItem.js +192 -0
  82. package/Translation.js +198 -0
  83. package/TranslationProperties.js +149 -0
  84. package/UncontrolledSliderWithPlusMinusBtns.css +5 -0
  85. package/UncontrolledSliderWithPlusMinusBtns.js +134 -0
  86. package/VeTopRightContainer.js +12 -0
  87. package/ZoomCircularViewSlider.js +62 -0
  88. package/ZoomLinearView.js +47 -0
  89. package/addAlignment.js +6 -0
  90. package/addMetaToActionCreators.js +12 -0
  91. package/addWrappedAddons.js +20 -0
  92. package/alignmentTool.js +503 -0
  93. package/alignments.js +379 -0
  94. package/annotationLabelVisibility.js +2 -0
  95. package/annotationSearchSelector.js +24 -0
  96. package/annotationTypes.js +35 -0
  97. package/annotationVisibility.js +196 -0
  98. package/annotationsToSupport.js +104 -0
  99. package/arrayToObjWithIds.js +17 -0
  100. package/arrayUtils.js +19 -0
  101. package/array_move.js +10 -0
  102. package/calculateTickMarkPositionsForGivenRange.js +47 -0
  103. package/caretPosition.js +27 -0
  104. package/cdsFeaturesSelector.js +9 -0
  105. package/charWidth.js +22 -0
  106. package/circular.js +19 -0
  107. package/circularSelector.js +4 -0
  108. package/clickAndDragUtils.js +576 -0
  109. package/coerceInitialValue.js +7 -0
  110. package/combineReducersDontIgnoreKeys.js +12 -0
  111. package/commandUtils.js +20 -0
  112. package/constants.js +2 -0
  113. package/copyOptions.js +34 -0
  114. package/createFragmentLines.js +120 -0
  115. package/createMergedDefaultStateReducer.js +30 -0
  116. package/createMetaAction.js +12 -0
  117. package/createSequenceInputPopup.js +290 -0
  118. package/createSequenceInputPopupStyle.css +87 -0
  119. package/createSimpleDialog.js +89 -0
  120. package/createYourOwnEnzyme.js +39 -0
  121. package/cutsiteLabelColorSelector.js +6 -0
  122. package/cutsiteTool.js +88 -0
  123. package/cutsitesByRangeSelector.js +5 -0
  124. package/cutsitesSelector.js +61 -0
  125. package/darkmode.css +98 -0
  126. package/defaultConfig.js +150 -0
  127. package/deletionLayers.js +36 -0
  128. package/description.js +21 -0
  129. package/digestTool.js +34 -0
  130. package/dnaToColor.js +17 -0
  131. package/downloadTool.js +39 -0
  132. package/draggableClassnames.js +5 -0
  133. package/drawAnnotations.js +440 -0
  134. package/drawDirectedPiePiece.js +142 -0
  135. package/editTool.js +49 -0
  136. package/editorSelector.js +2 -0
  137. package/editorUtils.js +205 -0
  138. package/estimateRowHeight.js +184 -0
  139. package/featureLengthsToHide.js +27 -0
  140. package/featureTool.js +34 -0
  141. package/features.js +19 -0
  142. package/featuresSelector.js +8 -0
  143. package/filteredCutsitesSelector.js +136 -0
  144. package/filteredFeaturesSelector.js +32 -0
  145. package/filteredPartsSelector.js +57 -0
  146. package/filteredPrimersSelector.js +27 -0
  147. package/filteredRestrictionEnzymesSelector.js +1 -0
  148. package/find.png +0 -0
  149. package/findTool.js +79 -0
  150. package/findToolConstants.js +1 -0
  151. package/frameTranslations.js +52 -0
  152. package/fullscreen.png +0 -0
  153. package/getAdditionalEnzymesSelector.js +46 -0
  154. package/getAngleForPositionMidpoint.js +3 -0
  155. package/getAnnotationClassnames.js +12 -0
  156. package/getAnnotationNameAndStartStopString.js +61 -0
  157. package/getBpsPerRow.js +19 -0
  158. package/getCutsiteLabelHeights.js +56 -0
  159. package/getGapMap.js +12 -0
  160. package/getGaps.js +27 -0
  161. package/getInternalLabel.js +40 -0
  162. package/getOveHotkeyDefs.js +12 -0
  163. package/getPairwiseOverviewLinearViewOptions.js +38 -0
  164. package/getRangeAnglesSpecial.js +12 -0
  165. package/getStructuredBases.js +97 -0
  166. package/getTrackFromEvent.js +25 -0
  167. package/getVisibleStartEnd.js +7 -0
  168. package/getXStartAndWidthFromNonCircularRange.js +12 -0
  169. package/getXStartAndWidthOfRangeWrtRow.js +27 -0
  170. package/getXStartAndWidthOfRowAnnotation.js +19 -0
  171. package/getYOffset.js +15 -0
  172. package/hoveredAnnotation.js +24 -0
  173. package/{html2canvas.esm--JN4fLQL.js → html2canvas.esm-DiGWN1gP.js} +187 -229
  174. package/{html2canvas.esm-B7d7VJmQ.cjs → html2canvas.esm-J1esNpMJ.cjs} +187 -229
  175. package/importTool.js +27 -0
  176. package/index.cjs.js +48165 -47142
  177. package/index.es.js +47699 -46676
  178. package/index.js +71 -0
  179. package/inlineFindTool.js +38 -0
  180. package/isElementInViewport.js +29 -0
  181. package/isEnzymeFilterAndSelector.js +1 -0
  182. package/isTargetWithinEl.js +6 -0
  183. package/labelLineIntensity.js +25 -0
  184. package/labelSize.js +23 -0
  185. package/ladderDefaults.js +25 -0
  186. package/lastSavedId.js +20 -0
  187. package/lineageLines.js +11 -0
  188. package/linear.png +0 -0
  189. package/makeStore.js +34 -0
  190. package/massageTickSpacing.js +19 -0
  191. package/materiallyAvailable.js +19 -0
  192. package/middleware.js +112 -0
  193. package/minimumOrfSize.js +24 -0
  194. package/minimumOrfSizeSelector.js +2 -0
  195. package/modalActions.js +3 -0
  196. package/moveCaret.js +58 -0
  197. package/name.js +19 -0
  198. package/normalizeAngle.js +3 -0
  199. package/normalizeAngleRange.js +9 -0
  200. package/oligoTool.js +30 -0
  201. package/onlyUpdateForKeysDeep.js +31 -0
  202. package/orfFrameToColorMap.js +10 -0
  203. package/orfTool.js +136 -0
  204. package/orfsSelector.js +15 -0
  205. package/ove.css +12107 -0
  206. package/package.json +8 -7
  207. package/panelsShown.js +294 -0
  208. package/partLengthsToHide.js +23 -0
  209. package/partOverhangs.js +6 -0
  210. package/partTagSearch.js +69 -0
  211. package/partTool.js +45 -0
  212. package/parts.js +19 -0
  213. package/partsSelector.js +8 -0
  214. package/pie.png +0 -0
  215. package/polarToSpecialCartesian.js +7 -0
  216. package/positionCutsites.js +6 -0
  217. package/prepareRowData.js +64 -0
  218. package/primerBases.js +221 -0
  219. package/primerLengthsToHide.js +27 -0
  220. package/primers.js +19 -0
  221. package/primersSelector.js +8 -0
  222. package/print.png +0 -0
  223. package/printTool.js +31 -0
  224. package/propertiesTool.js +40 -0
  225. package/proteinUtils.js +3 -0
  226. package/pureNoFunc.js +18 -0
  227. package/readOnly.js +25 -0
  228. package/redoTool.js +30 -0
  229. package/reflex-styles.css +128 -0
  230. package/reflex-styles.css.map +9 -0
  231. package/relaxLabelAngles.js +157 -0
  232. package/relaxLabels_DEPRECATED.js +105 -0
  233. package/replacementLayers.js +36 -0
  234. package/restrictionEnzymes.js +52 -0
  235. package/restrictionEnzymesSelector.js +34 -0
  236. package/rowviewContants.js +3 -0
  237. package/ruler.css +89 -0
  238. package/save.png +0 -0
  239. package/saveTool.js +44 -0
  240. package/searchLayersSelector.js +71 -0
  241. package/selectedAnnotations.js +89 -0
  242. package/selectedAnnotationsSelector.js +1 -0
  243. package/selectedCutsitesSelector.js +21 -0
  244. package/selectedPartTags.js +21 -0
  245. package/selectionLayer.js +25 -0
  246. package/selectors/annotationSearchSelector.d.ts +1 -1
  247. package/sequence.js +12 -0
  248. package/sequenceDataHistory.js +43 -0
  249. package/sequenceDataSelector.js +2 -0
  250. package/sequenceLengthSelector.js +5 -0
  251. package/sequenceSelector.js +4 -0
  252. package/sharedActionCreators.js +0 -0
  253. package/shouldFlipText.js +4 -0
  254. package/shouldRerender.js +27 -0
  255. package/showFileDialog.js +25 -0
  256. package/showGCContent.js +23 -0
  257. package/show_cut_sites.png +0 -0
  258. package/show_features.png +0 -0
  259. package/show_orfs.png +0 -0
  260. package/show_primers.png +0 -0
  261. package/simpleDialog.css +13 -0
  262. package/specialCutsiteFilterOptions.js +22 -0
  263. package/src/Editor/DropHandler.js +2 -1
  264. package/src/Editor/index.js +0 -2
  265. package/src/RowItem/StackedAnnotations/getStructuredBases.js +20 -6
  266. package/src/ToolBar/cutsiteTool.js +1 -1
  267. package/src/helperComponents/PropertiesDialog/TranslationProperties.js +2 -1
  268. package/style.css +3 -12100
  269. package/tagsToBoldSelector.js +2 -0
  270. package/toggle_views.svg +1 -0
  271. package/toolBar.js +23 -0
  272. package/translationSearchMatchesSelector.js +14 -0
  273. package/translations.js +20 -0
  274. package/translationsRawSelector.js +8 -0
  275. package/translationsSelector.js +137 -0
  276. package/typeField.js +24 -0
  277. package/undoTool.js +30 -0
  278. package/updateEditor.d.ts +1 -3
  279. package/updateEditor.js +200 -0
  280. package/updateLabelsForInViewFeatures.js +55 -0
  281. package/updateLabelsForInViewFeaturesCircView.js +41 -0
  282. package/updateTrackHelper.js +58 -0
  283. package/uppercaseSequenceMapFont.js +25 -0
  284. package/upsertDeleteActionGenerator.js +31 -0
  285. package/useAAColorType.js +8 -0
  286. package/useAdditionalOrfStartCodons.js +24 -0
  287. package/useAnnotationLimits.js +42 -0
  288. package/useChromatogramPrefs.js +31 -0
  289. package/useFormValue.js +7 -0
  290. package/useLadders.js +6 -0
  291. package/useMeltingTemp.js +7 -0
  292. package/useTmType.js +10 -0
  293. package/userDefinedHandlersAndOpts.js +61 -0
  294. package/utils/getAnnotationNameAndStartStopString.d.ts +1 -5
  295. package/utils/selectionLayer.d.ts +2 -2
  296. package/utils.js +37 -0
  297. package/versionHistory.js +26 -0
  298. package/versionHistoryTool.js +21 -0
  299. package/viewSubmenu.js +479 -0
  300. package/visibilityTool.js +39 -0
  301. package/withEditorInteractions/getBpsPerRow.d.ts +1 -3
  302. package/withHover.js +113 -0
  303. package/withRestrictionEnzymes.js +15 -0
  304. package/index.umd.js +0 -188322
@@ -25,9 +25,7 @@ var extendStatics = /* @__PURE__ */ __name(function(d, b) {
25
25
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
26
26
  d2.__proto__ = b2;
27
27
  } || function(d2, b2) {
28
- for (var p in b2)
29
- if (Object.prototype.hasOwnProperty.call(b2, p))
30
- d2[p] = b2[p];
28
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
31
29
  };
32
30
  return extendStatics(d, b);
33
31
  }, "extendStatics");
@@ -46,9 +44,7 @@ var __assign = /* @__PURE__ */ __name(function() {
46
44
  __assign = Object.assign || /* @__PURE__ */ __name(function __assign2(t) {
47
45
  for (var s, i = 1, n = arguments.length; i < n; i++) {
48
46
  s = arguments[i];
49
- for (var p in s)
50
- if (Object.prototype.hasOwnProperty.call(s, p))
51
- t[p] = s[p];
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
52
48
  }
53
49
  return t;
54
50
  }, "__assign");
@@ -87,11 +83,10 @@ function __awaiter(thisArg, _arguments, P, generator) {
87
83
  }
88
84
  __name(__awaiter, "__awaiter");
89
85
  function __generator(thisArg, body) {
90
- var _ = { label: 0, sent: function() {
91
- if (t[0] & 1)
92
- throw t[1];
86
+ var _ = { label: 0, sent: /* @__PURE__ */ __name(function() {
87
+ if (t[0] & 1) throw t[1];
93
88
  return t[1];
94
- }, trys: [], ops: [] }, f2, y, t, g;
89
+ }, "sent"), trys: [], ops: [] }, f2, y, t, g;
95
90
  return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
96
91
  return this;
97
92
  }), g;
@@ -102,78 +97,70 @@ function __generator(thisArg, body) {
102
97
  }
103
98
  __name(verb, "verb");
104
99
  function step(op) {
105
- if (f2)
106
- throw new TypeError("Generator is already executing.");
107
- while (_)
108
- try {
109
- if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
110
- return t;
111
- if (y = 0, t)
112
- op = [op[0] & 2, t.value];
113
- switch (op[0]) {
114
- case 0:
115
- case 1:
100
+ if (f2) throw new TypeError("Generator is already executing.");
101
+ while (_) try {
102
+ if (f2 = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
103
+ if (y = 0, t) op = [op[0] & 2, t.value];
104
+ switch (op[0]) {
105
+ case 0:
106
+ case 1:
107
+ t = op;
108
+ break;
109
+ case 4:
110
+ _.label++;
111
+ return { value: op[1], done: false };
112
+ case 5:
113
+ _.label++;
114
+ y = op[1];
115
+ op = [0];
116
+ continue;
117
+ case 7:
118
+ op = _.ops.pop();
119
+ _.trys.pop();
120
+ continue;
121
+ default:
122
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
123
+ _ = 0;
124
+ continue;
125
+ }
126
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
127
+ _.label = op[1];
128
+ break;
129
+ }
130
+ if (op[0] === 6 && _.label < t[1]) {
131
+ _.label = t[1];
116
132
  t = op;
117
133
  break;
118
- case 4:
119
- _.label++;
120
- return { value: op[1], done: false };
121
- case 5:
122
- _.label++;
123
- y = op[1];
124
- op = [0];
125
- continue;
126
- case 7:
127
- op = _.ops.pop();
128
- _.trys.pop();
129
- continue;
130
- default:
131
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
132
- _ = 0;
133
- continue;
134
- }
135
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
136
- _.label = op[1];
137
- break;
138
- }
139
- if (op[0] === 6 && _.label < t[1]) {
140
- _.label = t[1];
141
- t = op;
142
- break;
143
- }
144
- if (t && _.label < t[2]) {
145
- _.label = t[2];
146
- _.ops.push(op);
147
- break;
148
- }
149
- if (t[2])
150
- _.ops.pop();
151
- _.trys.pop();
152
- continue;
153
- }
154
- op = body.call(thisArg, _);
155
- } catch (e2) {
156
- op = [6, e2];
157
- y = 0;
158
- } finally {
159
- f2 = t = 0;
160
- }
161
- if (op[0] & 5)
162
- throw op[1];
134
+ }
135
+ if (t && _.label < t[2]) {
136
+ _.label = t[2];
137
+ _.ops.push(op);
138
+ break;
139
+ }
140
+ if (t[2]) _.ops.pop();
141
+ _.trys.pop();
142
+ continue;
143
+ }
144
+ op = body.call(thisArg, _);
145
+ } catch (e2) {
146
+ op = [6, e2];
147
+ y = 0;
148
+ } finally {
149
+ f2 = t = 0;
150
+ }
151
+ if (op[0] & 5) throw op[1];
163
152
  return { value: op[0] ? op[1] : void 0, done: true };
164
153
  }
165
154
  __name(step, "step");
166
155
  }
167
156
  __name(__generator, "__generator");
168
157
  function __spreadArray(to, from, pack2) {
169
- if (arguments.length === 2)
170
- for (var i = 0, l = from.length, ar; i < l; i++) {
171
- if (ar || !(i in from)) {
172
- if (!ar)
173
- ar = Array.prototype.slice.call(from, 0, i);
174
- ar[i] = from[i];
175
- }
158
+ if (arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
159
+ if (ar || !(i in from)) {
160
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
161
+ ar[i] = from[i];
176
162
  }
163
+ }
177
164
  return to.concat(ar || from);
178
165
  }
179
166
  __name(__spreadArray, "__spreadArray");
@@ -754,7 +741,7 @@ var LineBreaker = /* @__PURE__ */ __name(function(str, options) {
754
741
  var lastEnd = 0;
755
742
  var nextIndex = 0;
756
743
  return {
757
- next: function() {
744
+ next: /* @__PURE__ */ __name(function() {
758
745
  if (nextIndex >= length) {
759
746
  return { done: true, value: null };
760
747
  }
@@ -767,7 +754,7 @@ var LineBreaker = /* @__PURE__ */ __name(function(str, options) {
767
754
  return { value, done: false };
768
755
  }
769
756
  return { done: true, value: null };
770
- }
757
+ }, "next")
771
758
  };
772
759
  }, "LineBreaker");
773
760
  var FLAG_UNRESTRICTED = 1 << 0;
@@ -1629,6 +1616,7 @@ var getAbsoluteValue = /* @__PURE__ */ __name(function(token, parent) {
1629
1616
  case "rem":
1630
1617
  case "em":
1631
1618
  return 16 * token.number;
1619
+ // TODO use correct font-size
1632
1620
  case "px":
1633
1621
  default:
1634
1622
  return token.number;
@@ -1642,7 +1630,7 @@ var RAD = "rad";
1642
1630
  var TURN = "turn";
1643
1631
  var angle = {
1644
1632
  name: "angle",
1645
- parse: function(_context, value) {
1633
+ parse: /* @__PURE__ */ __name(function(_context, value) {
1646
1634
  if (value.type === 15) {
1647
1635
  switch (value.unit) {
1648
1636
  case DEG:
@@ -1656,7 +1644,7 @@ var angle = {
1656
1644
  }
1657
1645
  }
1658
1646
  throw new Error("Unsupported angle type");
1659
- }
1647
+ }, "parse")
1660
1648
  };
1661
1649
  var isAngle = /* @__PURE__ */ __name(function(value) {
1662
1650
  if (value.type === 15) {
@@ -1711,7 +1699,7 @@ var deg = /* @__PURE__ */ __name(function(deg2) {
1711
1699
  }, "deg");
1712
1700
  var color$1 = {
1713
1701
  name: "color",
1714
- parse: function(context, value) {
1702
+ parse: /* @__PURE__ */ __name(function(context, value) {
1715
1703
  if (value.type === 18) {
1716
1704
  var colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name];
1717
1705
  if (typeof colorFunction === "undefined") {
@@ -1754,7 +1742,7 @@ var color$1 = {
1754
1742
  }
1755
1743
  }
1756
1744
  return COLORS.TRANSPARENT;
1757
- }
1745
+ }, "parse")
1758
1746
  };
1759
1747
  var isTransparent = /* @__PURE__ */ __name(function(color2) {
1760
1748
  return (255 & color2) === 0;
@@ -1991,7 +1979,7 @@ var backgroundClip = {
1991
1979
  initialValue: "border-box",
1992
1980
  prefix: false,
1993
1981
  type: 1,
1994
- parse: function(_context, tokens) {
1982
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
1995
1983
  return tokens.map(function(token) {
1996
1984
  if (isIdentToken(token)) {
1997
1985
  switch (token.value) {
@@ -2003,7 +1991,7 @@ var backgroundClip = {
2003
1991
  }
2004
1992
  return 0;
2005
1993
  });
2006
- }
1994
+ }, "parse")
2007
1995
  };
2008
1996
  var backgroundColor = {
2009
1997
  name: "background-color",
@@ -2419,7 +2407,7 @@ var isRadialGradient = /* @__PURE__ */ __name(function(background) {
2419
2407
  }, "isRadialGradient");
2420
2408
  var image = {
2421
2409
  name: "image",
2422
- parse: function(context, value) {
2410
+ parse: /* @__PURE__ */ __name(function(context, value) {
2423
2411
  if (value.type === 22) {
2424
2412
  var image_1 = {
2425
2413
  url: value.value,
@@ -2437,7 +2425,7 @@ var image = {
2437
2425
  return imageFunction(context, value.values);
2438
2426
  }
2439
2427
  throw new Error("Unsupported image type " + value.type);
2440
- }
2428
+ }, "parse")
2441
2429
  };
2442
2430
  function isSupportedImage(value) {
2443
2431
  return !(value.type === 20 && value.value === "none") && (value.type !== 18 || !!SUPPORTED_IMAGE_FUNCTIONS[value.name]);
@@ -2461,7 +2449,7 @@ var backgroundImage = {
2461
2449
  initialValue: "none",
2462
2450
  type: 1,
2463
2451
  prefix: false,
2464
- parse: function(context, tokens) {
2452
+ parse: /* @__PURE__ */ __name(function(context, tokens) {
2465
2453
  if (tokens.length === 0) {
2466
2454
  return [];
2467
2455
  }
@@ -2474,14 +2462,14 @@ var backgroundImage = {
2474
2462
  }).map(function(value) {
2475
2463
  return image.parse(context, value);
2476
2464
  });
2477
- }
2465
+ }, "parse")
2478
2466
  };
2479
2467
  var backgroundOrigin = {
2480
2468
  name: "background-origin",
2481
2469
  initialValue: "border-box",
2482
2470
  prefix: false,
2483
2471
  type: 1,
2484
- parse: function(_context, tokens) {
2472
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2485
2473
  return tokens.map(function(token) {
2486
2474
  if (isIdentToken(token)) {
2487
2475
  switch (token.value) {
@@ -2493,31 +2481,31 @@ var backgroundOrigin = {
2493
2481
  }
2494
2482
  return 0;
2495
2483
  });
2496
- }
2484
+ }, "parse")
2497
2485
  };
2498
2486
  var backgroundPosition = {
2499
2487
  name: "background-position",
2500
2488
  initialValue: "0% 0%",
2501
2489
  type: 1,
2502
2490
  prefix: false,
2503
- parse: function(_context, tokens) {
2491
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2504
2492
  return parseFunctionArgs(tokens).map(function(values) {
2505
2493
  return values.filter(isLengthPercentage);
2506
2494
  }).map(parseLengthPercentageTuple);
2507
- }
2495
+ }, "parse")
2508
2496
  };
2509
2497
  var backgroundRepeat = {
2510
2498
  name: "background-repeat",
2511
2499
  initialValue: "repeat",
2512
2500
  prefix: false,
2513
2501
  type: 1,
2514
- parse: function(_context, tokens) {
2502
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2515
2503
  return parseFunctionArgs(tokens).map(function(values) {
2516
2504
  return values.filter(isIdentToken).map(function(token) {
2517
2505
  return token.value;
2518
2506
  }).join(" ");
2519
2507
  }).map(parseBackgroundRepeat);
2520
- }
2508
+ }, "parse")
2521
2509
  };
2522
2510
  var parseBackgroundRepeat = /* @__PURE__ */ __name(function(value) {
2523
2511
  switch (value) {
@@ -2545,11 +2533,11 @@ var backgroundSize = {
2545
2533
  initialValue: "0",
2546
2534
  prefix: false,
2547
2535
  type: 1,
2548
- parse: function(_context, tokens) {
2536
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2549
2537
  return parseFunctionArgs(tokens).map(function(values) {
2550
2538
  return values.filter(isBackgroundSizeInfoToken);
2551
2539
  });
2552
- }
2540
+ }, "parse")
2553
2541
  };
2554
2542
  var isBackgroundSizeInfoToken = /* @__PURE__ */ __name(function(value) {
2555
2543
  return isIdentToken(value) || isLengthPercentage(value);
@@ -2573,9 +2561,9 @@ var borderRadiusForSide = /* @__PURE__ */ __name(function(side) {
2573
2561
  initialValue: "0 0",
2574
2562
  prefix: false,
2575
2563
  type: 1,
2576
- parse: function(_context, tokens) {
2564
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2577
2565
  return parseLengthPercentageTuple(tokens.filter(isLengthPercentage));
2578
- }
2566
+ }, "parse")
2579
2567
  };
2580
2568
  }, "borderRadiusForSide");
2581
2569
  var borderTopLeftRadius = borderRadiusForSide("top-left");
@@ -2588,7 +2576,7 @@ var borderStyleForSide = /* @__PURE__ */ __name(function(side) {
2588
2576
  initialValue: "solid",
2589
2577
  prefix: false,
2590
2578
  type: 2,
2591
- parse: function(_context, style) {
2579
+ parse: /* @__PURE__ */ __name(function(_context, style) {
2592
2580
  switch (style) {
2593
2581
  case "none":
2594
2582
  return 0;
@@ -2600,7 +2588,7 @@ var borderStyleForSide = /* @__PURE__ */ __name(function(side) {
2600
2588
  return 4;
2601
2589
  }
2602
2590
  return 1;
2603
- }
2591
+ }, "parse")
2604
2592
  };
2605
2593
  }, "borderStyleForSide");
2606
2594
  var borderTopStyle = borderStyleForSide("top");
@@ -2613,12 +2601,12 @@ var borderWidthForSide = /* @__PURE__ */ __name(function(side) {
2613
2601
  initialValue: "0",
2614
2602
  type: 0,
2615
2603
  prefix: false,
2616
- parse: function(_context, token) {
2604
+ parse: /* @__PURE__ */ __name(function(_context, token) {
2617
2605
  if (isDimensionToken(token)) {
2618
2606
  return token.number;
2619
2607
  }
2620
2608
  return 0;
2621
- }
2609
+ }, "parse")
2622
2610
  };
2623
2611
  }, "borderWidthForSide");
2624
2612
  var borderTopWidth = borderWidthForSide("top");
@@ -2637,7 +2625,7 @@ var direction = {
2637
2625
  initialValue: "ltr",
2638
2626
  prefix: false,
2639
2627
  type: 2,
2640
- parse: function(_context, direction2) {
2628
+ parse: /* @__PURE__ */ __name(function(_context, direction2) {
2641
2629
  switch (direction2) {
2642
2630
  case "rtl":
2643
2631
  return 1;
@@ -2645,14 +2633,14 @@ var direction = {
2645
2633
  default:
2646
2634
  return 0;
2647
2635
  }
2648
- }
2636
+ }, "parse")
2649
2637
  };
2650
2638
  var display = {
2651
2639
  name: "display",
2652
2640
  initialValue: "inline-block",
2653
2641
  prefix: false,
2654
2642
  type: 1,
2655
- parse: function(_context, tokens) {
2643
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2656
2644
  return tokens.filter(isIdentToken).reduce(
2657
2645
  function(bit, token) {
2658
2646
  return bit | parseDisplayValue(token.value);
@@ -2660,7 +2648,7 @@ var display = {
2660
2648
  0
2661
2649
  /* NONE */
2662
2650
  );
2663
- }
2651
+ }, "parse")
2664
2652
  };
2665
2653
  var parseDisplayValue = /* @__PURE__ */ __name(function(display2) {
2666
2654
  switch (display2) {
@@ -2733,7 +2721,7 @@ var float = {
2733
2721
  initialValue: "none",
2734
2722
  prefix: false,
2735
2723
  type: 2,
2736
- parse: function(_context, float2) {
2724
+ parse: /* @__PURE__ */ __name(function(_context, float2) {
2737
2725
  switch (float2) {
2738
2726
  case "left":
2739
2727
  return 1;
@@ -2745,14 +2733,14 @@ var float = {
2745
2733
  return 4;
2746
2734
  }
2747
2735
  return 0;
2748
- }
2736
+ }, "parse")
2749
2737
  };
2750
2738
  var letterSpacing = {
2751
2739
  name: "letter-spacing",
2752
2740
  initialValue: "0",
2753
2741
  prefix: false,
2754
2742
  type: 0,
2755
- parse: function(_context, token) {
2743
+ parse: /* @__PURE__ */ __name(function(_context, token) {
2756
2744
  if (token.type === 20 && token.value === "normal") {
2757
2745
  return 0;
2758
2746
  }
@@ -2763,7 +2751,7 @@ var letterSpacing = {
2763
2751
  return token.number;
2764
2752
  }
2765
2753
  return 0;
2766
- }
2754
+ }, "parse")
2767
2755
  };
2768
2756
  var LINE_BREAK;
2769
2757
  (function(LINE_BREAK2) {
@@ -2775,7 +2763,7 @@ var lineBreak = {
2775
2763
  initialValue: "normal",
2776
2764
  prefix: false,
2777
2765
  type: 2,
2778
- parse: function(_context, lineBreak2) {
2766
+ parse: /* @__PURE__ */ __name(function(_context, lineBreak2) {
2779
2767
  switch (lineBreak2) {
2780
2768
  case "strict":
2781
2769
  return LINE_BREAK.STRICT;
@@ -2783,7 +2771,7 @@ var lineBreak = {
2783
2771
  default:
2784
2772
  return LINE_BREAK.NORMAL;
2785
2773
  }
2786
- }
2774
+ }, "parse")
2787
2775
  };
2788
2776
  var lineHeight = {
2789
2777
  name: "line-height",
@@ -2807,19 +2795,19 @@ var listStyleImage = {
2807
2795
  initialValue: "none",
2808
2796
  type: 0,
2809
2797
  prefix: false,
2810
- parse: function(context, token) {
2798
+ parse: /* @__PURE__ */ __name(function(context, token) {
2811
2799
  if (token.type === 20 && token.value === "none") {
2812
2800
  return null;
2813
2801
  }
2814
2802
  return image.parse(context, token);
2815
- }
2803
+ }, "parse")
2816
2804
  };
2817
2805
  var listStylePosition = {
2818
2806
  name: "list-style-position",
2819
2807
  initialValue: "outside",
2820
2808
  prefix: false,
2821
2809
  type: 2,
2822
- parse: function(_context, position2) {
2810
+ parse: /* @__PURE__ */ __name(function(_context, position2) {
2823
2811
  switch (position2) {
2824
2812
  case "inside":
2825
2813
  return 0;
@@ -2827,14 +2815,14 @@ var listStylePosition = {
2827
2815
  default:
2828
2816
  return 1;
2829
2817
  }
2830
- }
2818
+ }, "parse")
2831
2819
  };
2832
2820
  var listStyleType = {
2833
2821
  name: "list-style-type",
2834
2822
  initialValue: "none",
2835
2823
  prefix: false,
2836
2824
  type: 2,
2837
- parse: function(_context, type) {
2825
+ parse: /* @__PURE__ */ __name(function(_context, type) {
2838
2826
  switch (type) {
2839
2827
  case "disc":
2840
2828
  return 0;
@@ -2946,7 +2934,7 @@ var listStyleType = {
2946
2934
  default:
2947
2935
  return -1;
2948
2936
  }
2949
- }
2937
+ }, "parse")
2950
2938
  };
2951
2939
  var marginForSide = /* @__PURE__ */ __name(function(side) {
2952
2940
  return {
@@ -2966,7 +2954,7 @@ var overflow = {
2966
2954
  initialValue: "visible",
2967
2955
  prefix: false,
2968
2956
  type: 1,
2969
- parse: function(_context, tokens) {
2957
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
2970
2958
  return tokens.filter(isIdentToken).map(function(overflow2) {
2971
2959
  switch (overflow2.value) {
2972
2960
  case "hidden":
@@ -2982,14 +2970,14 @@ var overflow = {
2982
2970
  return 0;
2983
2971
  }
2984
2972
  });
2985
- }
2973
+ }, "parse")
2986
2974
  };
2987
2975
  var overflowWrap = {
2988
2976
  name: "overflow-wrap",
2989
2977
  initialValue: "normal",
2990
2978
  prefix: false,
2991
2979
  type: 2,
2992
- parse: function(_context, overflow2) {
2980
+ parse: /* @__PURE__ */ __name(function(_context, overflow2) {
2993
2981
  switch (overflow2) {
2994
2982
  case "break-word":
2995
2983
  return "break-word";
@@ -2997,7 +2985,7 @@ var overflowWrap = {
2997
2985
  default:
2998
2986
  return "normal";
2999
2987
  }
3000
- }
2988
+ }, "parse")
3001
2989
  };
3002
2990
  var paddingForSide = /* @__PURE__ */ __name(function(side) {
3003
2991
  return {
@@ -3017,7 +3005,7 @@ var textAlign = {
3017
3005
  initialValue: "left",
3018
3006
  prefix: false,
3019
3007
  type: 2,
3020
- parse: function(_context, textAlign2) {
3008
+ parse: /* @__PURE__ */ __name(function(_context, textAlign2) {
3021
3009
  switch (textAlign2) {
3022
3010
  case "right":
3023
3011
  return 2;
@@ -3028,14 +3016,14 @@ var textAlign = {
3028
3016
  default:
3029
3017
  return 0;
3030
3018
  }
3031
- }
3019
+ }, "parse")
3032
3020
  };
3033
3021
  var position = {
3034
3022
  name: "position",
3035
3023
  initialValue: "static",
3036
3024
  prefix: false,
3037
3025
  type: 2,
3038
- parse: function(_context, position2) {
3026
+ parse: /* @__PURE__ */ __name(function(_context, position2) {
3039
3027
  switch (position2) {
3040
3028
  case "relative":
3041
3029
  return 1;
@@ -3047,14 +3035,14 @@ var position = {
3047
3035
  return 4;
3048
3036
  }
3049
3037
  return 0;
3050
- }
3038
+ }, "parse")
3051
3039
  };
3052
3040
  var textShadow = {
3053
3041
  name: "text-shadow",
3054
3042
  initialValue: "none",
3055
3043
  type: 1,
3056
3044
  prefix: false,
3057
- parse: function(context, tokens) {
3045
+ parse: /* @__PURE__ */ __name(function(context, tokens) {
3058
3046
  if (tokens.length === 1 && isIdentWithValue(tokens[0], "none")) {
3059
3047
  return [];
3060
3048
  }
@@ -3083,14 +3071,14 @@ var textShadow = {
3083
3071
  }
3084
3072
  return shadow;
3085
3073
  });
3086
- }
3074
+ }, "parse")
3087
3075
  };
3088
3076
  var textTransform = {
3089
3077
  name: "text-transform",
3090
3078
  initialValue: "none",
3091
3079
  prefix: false,
3092
3080
  type: 2,
3093
- parse: function(_context, textTransform2) {
3081
+ parse: /* @__PURE__ */ __name(function(_context, textTransform2) {
3094
3082
  switch (textTransform2) {
3095
3083
  case "uppercase":
3096
3084
  return 2;
@@ -3100,14 +3088,14 @@ var textTransform = {
3100
3088
  return 3;
3101
3089
  }
3102
3090
  return 0;
3103
- }
3091
+ }, "parse")
3104
3092
  };
3105
3093
  var transform$1 = {
3106
3094
  name: "transform",
3107
3095
  initialValue: "none",
3108
3096
  prefix: true,
3109
3097
  type: 0,
3110
- parse: function(_context, token) {
3098
+ parse: /* @__PURE__ */ __name(function(_context, token) {
3111
3099
  if (token.type === 20 && token.value === "none") {
3112
3100
  return null;
3113
3101
  }
@@ -3119,7 +3107,7 @@ var transform$1 = {
3119
3107
  return transformFunction(token.values);
3120
3108
  }
3121
3109
  return null;
3122
- }
3110
+ }, "parse")
3123
3111
  };
3124
3112
  var matrix = /* @__PURE__ */ __name(function(args) {
3125
3113
  var values = args.filter(function(arg) {
@@ -3165,20 +3153,20 @@ var transformOrigin = {
3165
3153
  initialValue: "50% 50%",
3166
3154
  prefix: true,
3167
3155
  type: 1,
3168
- parse: function(_context, tokens) {
3156
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3169
3157
  var origins = tokens.filter(isLengthPercentage);
3170
3158
  if (origins.length !== 2) {
3171
3159
  return DEFAULT;
3172
3160
  }
3173
3161
  return [origins[0], origins[1]];
3174
- }
3162
+ }, "parse")
3175
3163
  };
3176
3164
  var visibility = {
3177
3165
  name: "visible",
3178
3166
  initialValue: "none",
3179
3167
  prefix: false,
3180
3168
  type: 2,
3181
- parse: function(_context, visibility2) {
3169
+ parse: /* @__PURE__ */ __name(function(_context, visibility2) {
3182
3170
  switch (visibility2) {
3183
3171
  case "hidden":
3184
3172
  return 1;
@@ -3188,7 +3176,7 @@ var visibility = {
3188
3176
  default:
3189
3177
  return 0;
3190
3178
  }
3191
- }
3179
+ }, "parse")
3192
3180
  };
3193
3181
  var WORD_BREAK;
3194
3182
  (function(WORD_BREAK2) {
@@ -3201,7 +3189,7 @@ var wordBreak = {
3201
3189
  initialValue: "normal",
3202
3190
  prefix: false,
3203
3191
  type: 2,
3204
- parse: function(_context, wordBreak2) {
3192
+ parse: /* @__PURE__ */ __name(function(_context, wordBreak2) {
3205
3193
  switch (wordBreak2) {
3206
3194
  case "break-all":
3207
3195
  return WORD_BREAK.BREAK_ALL;
@@ -3211,14 +3199,14 @@ var wordBreak = {
3211
3199
  default:
3212
3200
  return WORD_BREAK.NORMAL;
3213
3201
  }
3214
- }
3202
+ }, "parse")
3215
3203
  };
3216
3204
  var zIndex = {
3217
3205
  name: "z-index",
3218
3206
  initialValue: "auto",
3219
3207
  prefix: false,
3220
3208
  type: 0,
3221
- parse: function(_context, token) {
3209
+ parse: /* @__PURE__ */ __name(function(_context, token) {
3222
3210
  if (token.type === 20) {
3223
3211
  return { auto: true, order: 0 };
3224
3212
  }
@@ -3226,11 +3214,11 @@ var zIndex = {
3226
3214
  return { auto: false, order: token.number };
3227
3215
  }
3228
3216
  throw new Error("Invalid z-index number parsed");
3229
- }
3217
+ }, "parse")
3230
3218
  };
3231
3219
  var time = {
3232
3220
  name: "time",
3233
- parse: function(_context, value) {
3221
+ parse: /* @__PURE__ */ __name(function(_context, value) {
3234
3222
  if (value.type === 15) {
3235
3223
  switch (value.unit.toLowerCase()) {
3236
3224
  case "s":
@@ -3240,19 +3228,19 @@ var time = {
3240
3228
  }
3241
3229
  }
3242
3230
  throw new Error("Unsupported time type");
3243
- }
3231
+ }, "parse")
3244
3232
  };
3245
3233
  var opacity = {
3246
3234
  name: "opacity",
3247
3235
  initialValue: "1",
3248
3236
  type: 0,
3249
3237
  prefix: false,
3250
- parse: function(_context, token) {
3238
+ parse: /* @__PURE__ */ __name(function(_context, token) {
3251
3239
  if (isNumberToken(token)) {
3252
3240
  return token.number;
3253
3241
  }
3254
3242
  return 1;
3255
- }
3243
+ }, "parse")
3256
3244
  };
3257
3245
  var textDecorationColor = {
3258
3246
  name: "text-decoration-color",
@@ -3266,7 +3254,7 @@ var textDecorationLine = {
3266
3254
  initialValue: "none",
3267
3255
  prefix: false,
3268
3256
  type: 1,
3269
- parse: function(_context, tokens) {
3257
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3270
3258
  return tokens.filter(isIdentToken).map(function(token) {
3271
3259
  switch (token.value) {
3272
3260
  case "underline":
@@ -3282,14 +3270,14 @@ var textDecorationLine = {
3282
3270
  }).filter(function(line) {
3283
3271
  return line !== 0;
3284
3272
  });
3285
- }
3273
+ }, "parse")
3286
3274
  };
3287
3275
  var fontFamily = {
3288
3276
  name: "font-family",
3289
3277
  initialValue: "",
3290
3278
  prefix: false,
3291
3279
  type: 1,
3292
- parse: function(_context, tokens) {
3280
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3293
3281
  var accumulator = [];
3294
3282
  var results = [];
3295
3283
  tokens.forEach(function(token) {
@@ -3313,7 +3301,7 @@ var fontFamily = {
3313
3301
  return results.map(function(result) {
3314
3302
  return result.indexOf(" ") === -1 ? result : "'" + result + "'";
3315
3303
  });
3316
- }
3304
+ }, "parse")
3317
3305
  };
3318
3306
  var fontSize = {
3319
3307
  name: "font-size",
@@ -3327,7 +3315,7 @@ var fontWeight = {
3327
3315
  initialValue: "normal",
3328
3316
  type: 0,
3329
3317
  prefix: false,
3330
- parse: function(_context, token) {
3318
+ parse: /* @__PURE__ */ __name(function(_context, token) {
3331
3319
  if (isNumberToken(token)) {
3332
3320
  return token.number;
3333
3321
  }
@@ -3341,25 +3329,25 @@ var fontWeight = {
3341
3329
  }
3342
3330
  }
3343
3331
  return 400;
3344
- }
3332
+ }, "parse")
3345
3333
  };
3346
3334
  var fontVariant = {
3347
3335
  name: "font-variant",
3348
3336
  initialValue: "none",
3349
3337
  type: 1,
3350
3338
  prefix: false,
3351
- parse: function(_context, tokens) {
3339
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3352
3340
  return tokens.filter(isIdentToken).map(function(token) {
3353
3341
  return token.value;
3354
3342
  });
3355
- }
3343
+ }, "parse")
3356
3344
  };
3357
3345
  var fontStyle = {
3358
3346
  name: "font-style",
3359
3347
  initialValue: "normal",
3360
3348
  prefix: false,
3361
3349
  type: 2,
3362
- parse: function(_context, overflow2) {
3350
+ parse: /* @__PURE__ */ __name(function(_context, overflow2) {
3363
3351
  switch (overflow2) {
3364
3352
  case "oblique":
3365
3353
  return "oblique";
@@ -3369,7 +3357,7 @@ var fontStyle = {
3369
3357
  default:
3370
3358
  return "normal";
3371
3359
  }
3372
- }
3360
+ }, "parse")
3373
3361
  };
3374
3362
  var contains = /* @__PURE__ */ __name(function(bit, value) {
3375
3363
  return (bit & value) !== 0;
@@ -3379,7 +3367,7 @@ var content = {
3379
3367
  initialValue: "none",
3380
3368
  type: 1,
3381
3369
  prefix: false,
3382
- parse: function(_context, tokens) {
3370
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3383
3371
  if (tokens.length === 0) {
3384
3372
  return [];
3385
3373
  }
@@ -3388,14 +3376,14 @@ var content = {
3388
3376
  return [];
3389
3377
  }
3390
3378
  return tokens;
3391
- }
3379
+ }, "parse")
3392
3380
  };
3393
3381
  var counterIncrement = {
3394
3382
  name: "counter-increment",
3395
3383
  initialValue: "none",
3396
3384
  prefix: true,
3397
3385
  type: 1,
3398
- parse: function(_context, tokens) {
3386
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3399
3387
  if (tokens.length === 0) {
3400
3388
  return null;
3401
3389
  }
@@ -3414,14 +3402,14 @@ var counterIncrement = {
3414
3402
  }
3415
3403
  }
3416
3404
  return increments;
3417
- }
3405
+ }, "parse")
3418
3406
  };
3419
3407
  var counterReset = {
3420
3408
  name: "counter-reset",
3421
3409
  initialValue: "none",
3422
3410
  prefix: true,
3423
3411
  type: 1,
3424
- parse: function(_context, tokens) {
3412
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3425
3413
  if (tokens.length === 0) {
3426
3414
  return [];
3427
3415
  }
@@ -3436,25 +3424,25 @@ var counterReset = {
3436
3424
  }
3437
3425
  }
3438
3426
  return resets;
3439
- }
3427
+ }, "parse")
3440
3428
  };
3441
3429
  var duration = {
3442
3430
  name: "duration",
3443
3431
  initialValue: "0s",
3444
3432
  prefix: false,
3445
3433
  type: 1,
3446
- parse: function(context, tokens) {
3434
+ parse: /* @__PURE__ */ __name(function(context, tokens) {
3447
3435
  return tokens.filter(isDimensionToken).map(function(token) {
3448
3436
  return time.parse(context, token);
3449
3437
  });
3450
- }
3438
+ }, "parse")
3451
3439
  };
3452
3440
  var quotes = {
3453
3441
  name: "quotes",
3454
3442
  initialValue: "none",
3455
3443
  prefix: true,
3456
3444
  type: 1,
3457
- parse: function(_context, tokens) {
3445
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3458
3446
  if (tokens.length === 0) {
3459
3447
  return null;
3460
3448
  }
@@ -3473,7 +3461,7 @@ var quotes = {
3473
3461
  quotes2.push({ open: open_1, close: close_1 });
3474
3462
  }
3475
3463
  return quotes2;
3476
- }
3464
+ }, "parse")
3477
3465
  };
3478
3466
  var getQuote = /* @__PURE__ */ __name(function(quotes2, depth, open) {
3479
3467
  if (!quotes2) {
@@ -3490,7 +3478,7 @@ var boxShadow = {
3490
3478
  initialValue: "none",
3491
3479
  type: 1,
3492
3480
  prefix: false,
3493
- parse: function(context, tokens) {
3481
+ parse: /* @__PURE__ */ __name(function(context, tokens) {
3494
3482
  if (tokens.length === 1 && isIdentWithValue(tokens[0], "none")) {
3495
3483
  return [];
3496
3484
  }
@@ -3525,14 +3513,14 @@ var boxShadow = {
3525
3513
  }
3526
3514
  return shadow;
3527
3515
  });
3528
- }
3516
+ }, "parse")
3529
3517
  };
3530
3518
  var paintOrder = {
3531
3519
  name: "paint-order",
3532
3520
  initialValue: "normal",
3533
3521
  prefix: false,
3534
3522
  type: 1,
3535
- parse: function(_context, tokens) {
3523
+ parse: /* @__PURE__ */ __name(function(_context, tokens) {
3536
3524
  var DEFAULT_VALUE2 = [
3537
3525
  0,
3538
3526
  1,
@@ -3568,7 +3556,7 @@ var paintOrder = {
3568
3556
  }
3569
3557
  });
3570
3558
  return layers;
3571
- }
3559
+ }, "parse")
3572
3560
  };
3573
3561
  var webkitTextStrokeColor = {
3574
3562
  name: "-webkit-text-stroke-color",
@@ -3582,12 +3570,12 @@ var webkitTextStrokeWidth = {
3582
3570
  initialValue: "0",
3583
3571
  type: 0,
3584
3572
  prefix: false,
3585
- parse: function(_context, token) {
3573
+ parse: /* @__PURE__ */ __name(function(_context, token) {
3586
3574
  if (isDimensionToken(token)) {
3587
3575
  return token.number;
3588
3576
  }
3589
3577
  return 0;
3590
- }
3578
+ }, "parse")
3591
3579
  };
3592
3580
  var CSSParsedDeclaration = (
3593
3581
  /** @class */
@@ -4082,7 +4070,7 @@ var GraphemeBreaker = /* @__PURE__ */ __name(function(str) {
4082
4070
  var lastEnd = 0;
4083
4071
  var classTypes = codePoints.map(codePointToClass);
4084
4072
  return {
4085
- next: function() {
4073
+ next: /* @__PURE__ */ __name(function() {
4086
4074
  if (index >= length) {
4087
4075
  return { done: true, value: null };
4088
4076
  }
@@ -4095,7 +4083,7 @@ var GraphemeBreaker = /* @__PURE__ */ __name(function(str) {
4095
4083
  return { value, done: false };
4096
4084
  }
4097
4085
  return { done: true, value: null };
4098
- }
4086
+ }, "next")
4099
4087
  };
4100
4088
  }, "GraphemeBreaker");
4101
4089
  var splitGraphemes = /* @__PURE__ */ __name(function(str) {
@@ -5293,15 +5281,13 @@ var DocumentCloner = (
5293
5281
  if (typeof referenceElement === "undefined") {
5294
5282
  return [2, Promise.reject("Error finding the " + this.referenceElement.nodeName + " in the cloned document")];
5295
5283
  }
5296
- if (!(documentClone.fonts && documentClone.fonts.ready))
5297
- return [3, 2];
5284
+ if (!(documentClone.fonts && documentClone.fonts.ready)) return [3, 2];
5298
5285
  return [4, documentClone.fonts.ready];
5299
5286
  case 1:
5300
5287
  _a.sent();
5301
5288
  _a.label = 2;
5302
5289
  case 2:
5303
- if (!/(AppleWebKit)/g.test(navigator.userAgent))
5304
- return [3, 4];
5290
+ if (!/(AppleWebKit)/g.test(navigator.userAgent)) return [3, 4];
5305
5291
  return [4, imagesReady(documentClone)];
5306
5292
  case 3:
5307
5293
  _a.sent();
@@ -5560,8 +5546,7 @@ var DocumentCloner = (
5560
5546
  }).join(separator);
5561
5547
  anonymousReplacedElement.appendChild(document2.createTextNode(text));
5562
5548
  }
5563
- } else
5564
- ;
5549
+ } else ;
5565
5550
  } else if (token.type === 20) {
5566
5551
  switch (token.value) {
5567
5552
  case "open-quote":
@@ -5777,8 +5762,7 @@ var Cache = (
5777
5762
  ];
5778
5763
  }
5779
5764
  src = key;
5780
- if (!useProxy)
5781
- return [3, 2];
5765
+ if (!useProxy) return [3, 2];
5782
5766
  return [4, this.proxy(src)];
5783
5767
  case 1:
5784
5768
  src = _a.sent();
@@ -6691,8 +6675,7 @@ var CanvasRenderer = (
6691
6675
  switch (_a.label) {
6692
6676
  case 0:
6693
6677
  styles = stack.element.container.styles;
6694
- if (!styles.isVisible())
6695
- return [3, 2];
6678
+ if (!styles.isVisible()) return [3, 2];
6696
6679
  return [4, this.renderStackContent(stack)];
6697
6680
  case 1:
6698
6681
  _a.sent();
@@ -6718,8 +6701,7 @@ var CanvasRenderer = (
6718
6701
  )) {
6719
6702
  debugger;
6720
6703
  }
6721
- if (!paint.container.styles.isVisible())
6722
- return [3, 3];
6704
+ if (!paint.container.styles.isVisible()) return [3, 3];
6723
6705
  return [4, this.renderNodeBackgroundAndBorders(paint)];
6724
6706
  case 1:
6725
6707
  _a.sent();
@@ -6857,8 +6839,7 @@ var CanvasRenderer = (
6857
6839
  _i = 0, _a = container.textNodes;
6858
6840
  _c.label = 1;
6859
6841
  case 1:
6860
- if (!(_i < _a.length))
6861
- return [3, 4];
6842
+ if (!(_i < _a.length)) return [3, 4];
6862
6843
  child = _a[_i];
6863
6844
  return [4, this.renderTextNode(child, styles)];
6864
6845
  case 2:
@@ -6868,8 +6849,7 @@ var CanvasRenderer = (
6868
6849
  _i++;
6869
6850
  return [3, 1];
6870
6851
  case 4:
6871
- if (!(container instanceof ImageElementContainer))
6872
- return [3, 8];
6852
+ if (!(container instanceof ImageElementContainer)) return [3, 8];
6873
6853
  _c.label = 5;
6874
6854
  case 5:
6875
6855
  _c.trys.push([5, 7, , 8]);
@@ -6886,8 +6866,7 @@ var CanvasRenderer = (
6886
6866
  if (container instanceof CanvasElementContainer) {
6887
6867
  this.renderReplacedElement(container, curves, container.canvas);
6888
6868
  }
6889
- if (!(container instanceof SVGElementContainer))
6890
- return [3, 12];
6869
+ if (!(container instanceof SVGElementContainer)) return [3, 12];
6891
6870
  _c.label = 9;
6892
6871
  case 9:
6893
6872
  _c.trys.push([9, 11, , 12]);
@@ -6901,8 +6880,7 @@ var CanvasRenderer = (
6901
6880
  this.context.logger.error("Error loading svg " + container.svg.substring(0, 255));
6902
6881
  return [3, 12];
6903
6882
  case 12:
6904
- if (!(container instanceof IFrameElementContainer && container.tree))
6905
- return [3, 14];
6883
+ if (!(container instanceof IFrameElementContainer && container.tree)) return [3, 14];
6906
6884
  iframeRenderer = new CanvasRenderer2(this.context, {
6907
6885
  scale: this.options.scale,
6908
6886
  backgroundColor: container.backgroundColor,
@@ -6983,13 +6961,10 @@ var CanvasRenderer = (
6983
6961
  container.styles.display,
6984
6962
  2048
6985
6963
  /* LIST_ITEM */
6986
- ))
6987
- return [3, 20];
6988
- if (!(container.styles.listStyleImage !== null))
6989
- return [3, 19];
6964
+ )) return [3, 20];
6965
+ if (!(container.styles.listStyleImage !== null)) return [3, 19];
6990
6966
  img = container.styles.listStyleImage;
6991
- if (!(img.type === 0))
6992
- return [3, 18];
6967
+ if (!(img.type === 0)) return [3, 18];
6993
6968
  image2 = void 0;
6994
6969
  url = img.url;
6995
6970
  _c.label = 15;
@@ -7047,8 +7022,7 @@ var CanvasRenderer = (
7047
7022
  _i = 0, _a = stack.negativeZIndex;
7048
7023
  _p.label = 2;
7049
7024
  case 2:
7050
- if (!(_i < _a.length))
7051
- return [3, 5];
7025
+ if (!(_i < _a.length)) return [3, 5];
7052
7026
  child = _a[_i];
7053
7027
  return [4, this.renderStack(child)];
7054
7028
  case 3:
@@ -7064,8 +7038,7 @@ var CanvasRenderer = (
7064
7038
  _b = 0, _c = stack.nonInlineLevel;
7065
7039
  _p.label = 7;
7066
7040
  case 7:
7067
- if (!(_b < _c.length))
7068
- return [3, 10];
7041
+ if (!(_b < _c.length)) return [3, 10];
7069
7042
  child = _c[_b];
7070
7043
  return [4, this.renderNode(child)];
7071
7044
  case 8:
@@ -7078,8 +7051,7 @@ var CanvasRenderer = (
7078
7051
  _d = 0, _e = stack.nonPositionedFloats;
7079
7052
  _p.label = 11;
7080
7053
  case 11:
7081
- if (!(_d < _e.length))
7082
- return [3, 14];
7054
+ if (!(_d < _e.length)) return [3, 14];
7083
7055
  child = _e[_d];
7084
7056
  return [4, this.renderStack(child)];
7085
7057
  case 12:
@@ -7092,8 +7064,7 @@ var CanvasRenderer = (
7092
7064
  _f = 0, _g = stack.nonPositionedInlineLevel;
7093
7065
  _p.label = 15;
7094
7066
  case 15:
7095
- if (!(_f < _g.length))
7096
- return [3, 18];
7067
+ if (!(_f < _g.length)) return [3, 18];
7097
7068
  child = _g[_f];
7098
7069
  return [4, this.renderStack(child)];
7099
7070
  case 16:
@@ -7106,8 +7077,7 @@ var CanvasRenderer = (
7106
7077
  _h = 0, _j = stack.inlineLevel;
7107
7078
  _p.label = 19;
7108
7079
  case 19:
7109
- if (!(_h < _j.length))
7110
- return [3, 22];
7080
+ if (!(_h < _j.length)) return [3, 22];
7111
7081
  child = _j[_h];
7112
7082
  return [4, this.renderNode(child)];
7113
7083
  case 20:
@@ -7120,8 +7090,7 @@ var CanvasRenderer = (
7120
7090
  _k = 0, _l = stack.zeroOrAutoZIndexOrTransformedOrOpacity;
7121
7091
  _p.label = 23;
7122
7092
  case 23:
7123
- if (!(_k < _l.length))
7124
- return [3, 26];
7093
+ if (!(_k < _l.length)) return [3, 26];
7125
7094
  child = _l[_k];
7126
7095
  return [4, this.renderStack(child)];
7127
7096
  case 24:
@@ -7134,8 +7103,7 @@ var CanvasRenderer = (
7134
7103
  _m = 0, _o = stack.positiveZIndex;
7135
7104
  _p.label = 27;
7136
7105
  case 27:
7137
- if (!(_m < _o.length))
7138
- return [3, 30];
7106
+ if (!(_m < _o.length)) return [3, 30];
7139
7107
  child = _o[_m];
7140
7108
  return [4, this.renderStack(child)];
7141
7109
  case 28:
@@ -7214,8 +7182,7 @@ var CanvasRenderer = (
7214
7182
  return __generator(this, function(_h) {
7215
7183
  switch (_h.label) {
7216
7184
  case 0:
7217
- if (!(backgroundImage3.type === 0))
7218
- return [3, 5];
7185
+ if (!(backgroundImage3.type === 0)) return [3, 5];
7219
7186
  image2 = void 0;
7220
7187
  url = backgroundImage3.url;
7221
7188
  _h.label = 1;
@@ -7305,8 +7272,7 @@ var CanvasRenderer = (
7305
7272
  _i = 0, _a = container.styles.backgroundImage.slice(0).reverse();
7306
7273
  _b.label = 1;
7307
7274
  case 1:
7308
- if (!(_i < _a.length))
7309
- return [3, 4];
7275
+ if (!(_i < _a.length)) return [3, 4];
7310
7276
  backgroundImage2 = _a[_i];
7311
7277
  return [5, _loop_1(backgroundImage2)];
7312
7278
  case 2:
@@ -7343,8 +7309,7 @@ var CanvasRenderer = (
7343
7309
  return __generator(this, function(_a) {
7344
7310
  switch (_a.label) {
7345
7311
  case 0:
7346
- if (!(width < 3))
7347
- return [3, 2];
7312
+ if (!(width < 3)) return [3, 2];
7348
7313
  return [4, this.renderSolidBorder(color2, side, curvePoints)];
7349
7314
  case 1:
7350
7315
  _a.sent();
@@ -7388,8 +7353,7 @@ var CanvasRenderer = (
7388
7353
  { style: styles.borderLeftStyle, color: styles.borderLeftColor, width: styles.borderLeftWidth }
7389
7354
  ];
7390
7355
  backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(getBackgroundValueForIndex(styles.backgroundClip, 0), paint.curves);
7391
- if (!(hasBackground || styles.boxShadow.length))
7392
- return [3, 2];
7356
+ if (!(hasBackground || styles.boxShadow.length)) return [3, 2];
7393
7357
  this.ctx.save();
7394
7358
  this.path(backgroundPaintingArea);
7395
7359
  this.ctx.clip();
@@ -7429,13 +7393,10 @@ var CanvasRenderer = (
7429
7393
  _i = 0, borders_1 = borders;
7430
7394
  _a.label = 3;
7431
7395
  case 3:
7432
- if (!(_i < borders_1.length))
7433
- return [3, 13];
7396
+ if (!(_i < borders_1.length)) return [3, 13];
7434
7397
  border = borders_1[_i];
7435
- if (!(border.style !== 0 && !isTransparent(border.color) && border.width > 0))
7436
- return [3, 11];
7437
- if (!(border.style === 2))
7438
- return [3, 5];
7398
+ if (!(border.style !== 0 && !isTransparent(border.color) && border.width > 0)) return [3, 11];
7399
+ if (!(border.style === 2)) return [3, 5];
7439
7400
  return [4, this.renderDashedDottedBorder(
7440
7401
  border.color,
7441
7402
  border.width,
@@ -7448,8 +7409,7 @@ var CanvasRenderer = (
7448
7409
  _a.sent();
7449
7410
  return [3, 11];
7450
7411
  case 5:
7451
- if (!(border.style === 3))
7452
- return [3, 7];
7412
+ if (!(border.style === 3)) return [3, 7];
7453
7413
  return [4, this.renderDashedDottedBorder(
7454
7414
  border.color,
7455
7415
  border.width,
@@ -7462,8 +7422,7 @@ var CanvasRenderer = (
7462
7422
  _a.sent();
7463
7423
  return [3, 11];
7464
7424
  case 7:
7465
- if (!(border.style === 4))
7466
- return [3, 9];
7425
+ if (!(border.style === 4)) return [3, 9];
7467
7426
  return [4, this.renderDoubleBorder(border.color, border.width, side, paint.curves)];
7468
7427
  case 8:
7469
7428
  _a.sent();
@@ -7848,8 +7807,7 @@ var renderElement = /* @__PURE__ */ __name(function(element, opts) {
7848
7807
  width: (_r = opts.width) !== null && _r !== void 0 ? _r : Math.ceil(width),
7849
7808
  height: (_s = opts.height) !== null && _s !== void 0 ? _s : Math.ceil(height)
7850
7809
  };
7851
- if (!foreignObjectRendering)
7852
- return [3, 3];
7810
+ if (!foreignObjectRendering) return [3, 3];
7853
7811
  context.logger.debug("Document cloned, using foreign object rendering");
7854
7812
  renderer = new ForeignObjectRenderer(context, renderOptions);
7855
7813
  return [4, renderer.render(clonedElement)];