@unicom-cloud/utils 0.1.42 → 0.1.44

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 (976) hide show
  1. package/.virtual/_rolldown/runtime.js +1 -1
  2. package/.vite/manifest.json +343 -305
  3. package/array/index.js +5 -4
  4. package/assert/index.js +10 -10
  5. package/case-name/index.js +1 -1
  6. package/class-name/index.js +1 -1
  7. package/clipboard-copy/index.js +1 -1
  8. package/constant/address.js +1 -1
  9. package/constant/chineseCharacters.js +1 -1
  10. package/constant/constellations.js +1 -1
  11. package/constant/domain.js +1 -1
  12. package/constant/identity.js +1 -1
  13. package/constant/index.js +1 -1
  14. package/constant/keyboardCode.d.ts +1 -1
  15. package/constant/keyboardCode.js +39 -39
  16. package/constant/licensePlate.js +1 -1
  17. package/constant/name.js +1 -1
  18. package/constant/platform.d.ts +10 -3
  19. package/constant/platform.js +24 -18
  20. package/constant/protocol.js +1 -1
  21. package/constant/string.js +1 -1
  22. package/constant/ui.js +1 -1
  23. package/content-disposition/index.js +1 -1
  24. package/cookie/api.js +1 -1
  25. package/cookie/assign.js +1 -1
  26. package/cookie/converter.js +1 -1
  27. package/cookie/index.js +1 -1
  28. package/date/convertTime.js +1 -1
  29. package/date/convertToDuration.js +1 -1
  30. package/date/index.js +1 -1
  31. package/decimal/decimal.js +357 -356
  32. package/decimal/index.js +1 -1
  33. package/dom-helpers/activeElement.js +1 -1
  34. package/dom-helpers/addClass.js +1 -1
  35. package/dom-helpers/addEventListener.js +1 -1
  36. package/dom-helpers/animate.js +1 -1
  37. package/dom-helpers/animationFrame.js +1 -1
  38. package/dom-helpers/attribute.js +1 -1
  39. package/dom-helpers/camelize.js +1 -1
  40. package/dom-helpers/camelizeStyle.js +1 -1
  41. package/dom-helpers/canUseDOM.js +1 -1
  42. package/dom-helpers/childElements.js +1 -1
  43. package/dom-helpers/childNodes.js +1 -1
  44. package/dom-helpers/clear.js +1 -1
  45. package/dom-helpers/closest.js +1 -1
  46. package/dom-helpers/collectElements.js +1 -1
  47. package/dom-helpers/collectSiblings.js +1 -1
  48. package/dom-helpers/contains.js +1 -1
  49. package/dom-helpers/css.js +1 -1
  50. package/dom-helpers/filterEventHandler.js +1 -1
  51. package/dom-helpers/getComputedStyle.js +1 -1
  52. package/dom-helpers/getElementCoordinates.js +1 -1
  53. package/dom-helpers/getScrollAccessor.js +1 -1
  54. package/dom-helpers/hasClass.js +1 -1
  55. package/dom-helpers/height.js +1 -1
  56. package/dom-helpers/hyphenate.js +1 -1
  57. package/dom-helpers/hyphenateStyle.js +1 -1
  58. package/dom-helpers/index.js +1 -1
  59. package/dom-helpers/insertAfter.js +1 -1
  60. package/dom-helpers/isDocument.js +1 -1
  61. package/dom-helpers/isInput.js +1 -1
  62. package/dom-helpers/isTransform.js +1 -1
  63. package/dom-helpers/isVisible.js +1 -1
  64. package/dom-helpers/isWindow.js +1 -1
  65. package/dom-helpers/listen.js +1 -1
  66. package/dom-helpers/matches.js +1 -1
  67. package/dom-helpers/nextUntil.js +1 -1
  68. package/dom-helpers/offset.js +1 -1
  69. package/dom-helpers/offsetParent.js +1 -1
  70. package/dom-helpers/ownerDocument.js +1 -1
  71. package/dom-helpers/ownerWindow.js +1 -1
  72. package/dom-helpers/parents.js +1 -1
  73. package/dom-helpers/position.js +1 -1
  74. package/dom-helpers/prepend.js +1 -1
  75. package/dom-helpers/querySelectorAll.js +1 -1
  76. package/dom-helpers/reflow.js +1 -1
  77. package/dom-helpers/remove.js +1 -1
  78. package/dom-helpers/removeClass.js +1 -1
  79. package/dom-helpers/removeEventListener.js +1 -1
  80. package/dom-helpers/scrollLeft.js +1 -1
  81. package/dom-helpers/scrollParent.js +1 -1
  82. package/dom-helpers/scrollTo.js +1 -1
  83. package/dom-helpers/scrollTop.js +1 -1
  84. package/dom-helpers/scrollbarSize.js +1 -1
  85. package/dom-helpers/siblings.js +1 -1
  86. package/dom-helpers/text.js +1 -1
  87. package/dom-helpers/toggleClass.js +1 -1
  88. package/dom-helpers/transitionEnd.js +1 -1
  89. package/dom-helpers/triggerEvent.js +1 -1
  90. package/dom-helpers/types.js +1 -1
  91. package/dom-helpers/width.js +1 -1
  92. package/emitter/index.js +1 -1
  93. package/emoji/emoji.js +1 -1
  94. package/emoji/emojis.js +1 -1
  95. package/emoji/index.js +1 -1
  96. package/escape/index.js +1 -1
  97. package/file/fileRead.js +6 -6
  98. package/file/fileToDataURL.js +1 -1
  99. package/file/img.d.ts +4 -0
  100. package/file/img.js +18 -0
  101. package/file/index.d.ts +2 -1
  102. package/file/index.js +4 -3
  103. package/file/saveAs.js +11 -11
  104. package/filesize/index.d.ts +4 -2
  105. package/filesize/index.js +5 -3
  106. package/filesize/{constants.js → src/constants.js} +2 -2
  107. package/filesize/{filesize.d.ts → src/filesize.d.ts} +1 -1
  108. package/filesize/src/filesize.js +52 -0
  109. package/filesize/src/helpers.d.ts +119 -0
  110. package/filesize/src/helpers.js +118 -0
  111. package/function/index.js +1 -1
  112. package/idb/async-iterators.js +1 -1
  113. package/idb/database-extras.js +1 -1
  114. package/idb/entry.js +1 -1
  115. package/idb/index-.js +1 -1
  116. package/idb/index.js +1 -1
  117. package/idb/util.js +1 -1
  118. package/idb/wrap-idb-value.js +1 -1
  119. package/index.js +1 -1
  120. package/invariant/index.js +1 -1
  121. package/is/index.d.ts +32 -29
  122. package/is/index.js +97 -90
  123. package/is/lib/isAscii.js +1 -1
  124. package/is/lib/isBase64.js +1 -1
  125. package/is/lib/isChinese.js +1 -1
  126. package/is/lib/isDataURI.js +1 -1
  127. package/is/lib/isEmail.js +12 -12
  128. package/is/lib/isFQDN.js +1 -1
  129. package/is/lib/isFullWidth.js +1 -1
  130. package/is/lib/isHSL.js +1 -1
  131. package/is/lib/isHalfWidth.js +1 -1
  132. package/is/lib/isHash.js +1 -1
  133. package/is/lib/isHexColor.js +1 -1
  134. package/is/lib/isIMEI.js +1 -1
  135. package/is/lib/isIP.js +1 -1
  136. package/is/lib/isIPRange.js +6 -6
  137. package/is/lib/isIdentityCard.js +9 -8
  138. package/is/lib/isJWT.js +5 -5
  139. package/is/lib/isMACAddress.js +1 -1
  140. package/is/lib/isMD5.js +1 -1
  141. package/is/lib/isMimeType.js +1 -1
  142. package/is/lib/isMobilePhone.js +14 -13
  143. package/is/lib/isPort.js +1 -1
  144. package/is/lib/isRgbColor.js +1 -1
  145. package/is/lib/isSemVer.js +1 -1
  146. package/is/lib/isSlug.js +1 -1
  147. package/is/lib/isStrongPassword.js +1 -1
  148. package/is/lib/isURL.js +6 -6
  149. package/is/lib/isUUID.js +1 -1
  150. package/is/lib/isVariableWidth.js +5 -5
  151. package/lodash/_DataView.js +1 -1
  152. package/lodash/_Hash.js +1 -1
  153. package/lodash/_LazyWrapper.js +1 -1
  154. package/lodash/_ListCache.js +1 -1
  155. package/lodash/_LodashWrapper.js +1 -1
  156. package/lodash/_Map.js +1 -1
  157. package/lodash/_MapCache.js +1 -1
  158. package/lodash/_Promise.js +1 -1
  159. package/lodash/_Set.js +1 -1
  160. package/lodash/_SetCache.js +1 -1
  161. package/lodash/_Stack.js +1 -1
  162. package/lodash/_Symbol.js +1 -1
  163. package/lodash/_Uint8Array.js +1 -1
  164. package/lodash/_WeakMap.js +1 -1
  165. package/lodash/_addMapEntry.js +1 -1
  166. package/lodash/_addSetEntry.js +1 -1
  167. package/lodash/_apply.js +1 -1
  168. package/lodash/_arrayAggregator.js +1 -1
  169. package/lodash/_arrayEach.js +1 -1
  170. package/lodash/_arrayEachRight.js +1 -1
  171. package/lodash/_arrayEvery.js +1 -1
  172. package/lodash/_arrayFilter.js +1 -1
  173. package/lodash/_arrayIncludes.js +1 -1
  174. package/lodash/_arrayIncludesWith.js +1 -1
  175. package/lodash/_arrayLikeKeys.js +1 -1
  176. package/lodash/_arrayMap.js +1 -1
  177. package/lodash/_arrayPush.js +1 -1
  178. package/lodash/_arrayReduce.js +1 -1
  179. package/lodash/_arrayReduceRight.js +1 -1
  180. package/lodash/_arraySample.js +1 -1
  181. package/lodash/_arraySampleSize.js +1 -1
  182. package/lodash/_arrayShuffle.js +1 -1
  183. package/lodash/_arraySome.js +1 -1
  184. package/lodash/_asciiSize.js +1 -1
  185. package/lodash/_asciiToArray.js +1 -1
  186. package/lodash/_asciiWords.js +1 -1
  187. package/lodash/_assignMergeValue.js +1 -1
  188. package/lodash/_assignValue.js +1 -1
  189. package/lodash/_assocIndexOf.js +1 -1
  190. package/lodash/_baseAggregator.js +1 -1
  191. package/lodash/_baseAssign.js +1 -1
  192. package/lodash/_baseAssignIn.js +1 -1
  193. package/lodash/_baseAssignValue.js +1 -1
  194. package/lodash/_baseAt.js +1 -1
  195. package/lodash/_baseClamp.js +1 -1
  196. package/lodash/_baseClone.js +1 -1
  197. package/lodash/_baseConforms.js +1 -1
  198. package/lodash/_baseConformsTo.js +1 -1
  199. package/lodash/_baseCreate.js +1 -1
  200. package/lodash/_baseDelay.js +1 -1
  201. package/lodash/_baseDifference.js +1 -1
  202. package/lodash/_baseEach.js +1 -1
  203. package/lodash/_baseEachRight.js +1 -1
  204. package/lodash/_baseEvery.js +1 -1
  205. package/lodash/_baseExtremum.js +1 -1
  206. package/lodash/_baseFill.js +1 -1
  207. package/lodash/_baseFilter.js +1 -1
  208. package/lodash/_baseFindIndex.js +1 -1
  209. package/lodash/_baseFindKey.js +1 -1
  210. package/lodash/_baseFlatten.js +1 -1
  211. package/lodash/_baseFor.js +1 -1
  212. package/lodash/_baseForOwn.js +1 -1
  213. package/lodash/_baseForOwnRight.js +1 -1
  214. package/lodash/_baseForRight.js +1 -1
  215. package/lodash/_baseFunctions.js +1 -1
  216. package/lodash/_baseGet.js +1 -1
  217. package/lodash/_baseGetAllKeys.js +1 -1
  218. package/lodash/_baseGetTag.js +1 -1
  219. package/lodash/_baseGt.js +1 -1
  220. package/lodash/_baseHas.js +1 -1
  221. package/lodash/_baseHasIn.js +1 -1
  222. package/lodash/_baseInRange.js +1 -1
  223. package/lodash/_baseIndexOf.js +1 -1
  224. package/lodash/_baseIndexOfWith.js +1 -1
  225. package/lodash/_baseIntersection.js +1 -1
  226. package/lodash/_baseInverter.js +1 -1
  227. package/lodash/_baseInvoke.js +1 -1
  228. package/lodash/_baseIsArguments.js +1 -1
  229. package/lodash/_baseIsArrayBuffer.js +1 -1
  230. package/lodash/_baseIsDate.js +1 -1
  231. package/lodash/_baseIsEqual.js +1 -1
  232. package/lodash/_baseIsEqualDeep.js +1 -1
  233. package/lodash/_baseIsMap.js +1 -1
  234. package/lodash/_baseIsMatch.js +1 -1
  235. package/lodash/_baseIsNaN.js +1 -1
  236. package/lodash/_baseIsNative.js +1 -1
  237. package/lodash/_baseIsRegExp.js +1 -1
  238. package/lodash/_baseIsSet.js +1 -1
  239. package/lodash/_baseIsTypedArray.js +1 -1
  240. package/lodash/_baseIteratee.js +1 -1
  241. package/lodash/_baseKeys.js +1 -1
  242. package/lodash/_baseKeysIn.js +1 -1
  243. package/lodash/_baseLodash.js +1 -1
  244. package/lodash/_baseLt.js +1 -1
  245. package/lodash/_baseMap.js +1 -1
  246. package/lodash/_baseMatches.js +1 -1
  247. package/lodash/_baseMatchesProperty.js +1 -1
  248. package/lodash/_baseMean.js +1 -1
  249. package/lodash/_baseMerge.js +1 -1
  250. package/lodash/_baseMergeDeep.js +1 -1
  251. package/lodash/_baseNth.js +1 -1
  252. package/lodash/_baseOrderBy.js +1 -1
  253. package/lodash/_basePick.js +1 -1
  254. package/lodash/_basePickBy.js +1 -1
  255. package/lodash/_baseProperty.js +1 -1
  256. package/lodash/_basePropertyDeep.js +1 -1
  257. package/lodash/_basePropertyOf.js +1 -1
  258. package/lodash/_basePullAll.js +1 -1
  259. package/lodash/_basePullAt.js +1 -1
  260. package/lodash/_baseRandom.js +1 -1
  261. package/lodash/_baseRange.js +1 -1
  262. package/lodash/_baseReduce.js +1 -1
  263. package/lodash/_baseRepeat.js +1 -1
  264. package/lodash/_baseRest.js +1 -1
  265. package/lodash/_baseSample.js +1 -1
  266. package/lodash/_baseSampleSize.js +1 -1
  267. package/lodash/_baseSet.js +1 -1
  268. package/lodash/_baseSetData.js +1 -1
  269. package/lodash/_baseSetToString.js +1 -1
  270. package/lodash/_baseShuffle.js +1 -1
  271. package/lodash/_baseSlice.js +1 -1
  272. package/lodash/_baseSome.js +1 -1
  273. package/lodash/_baseSortBy.js +1 -1
  274. package/lodash/_baseSortedIndex.js +1 -1
  275. package/lodash/_baseSortedIndexBy.js +1 -1
  276. package/lodash/_baseSortedUniq.js +1 -1
  277. package/lodash/_baseSum.js +1 -1
  278. package/lodash/_baseTimes.js +1 -1
  279. package/lodash/_baseToNumber.js +1 -1
  280. package/lodash/_baseToPairs.js +1 -1
  281. package/lodash/_baseToString.js +1 -1
  282. package/lodash/_baseTrim.js +1 -1
  283. package/lodash/_baseUnary.js +1 -1
  284. package/lodash/_baseUniq.js +1 -1
  285. package/lodash/_baseUnset.js +1 -1
  286. package/lodash/_baseUpdate.js +1 -1
  287. package/lodash/_baseValues.js +1 -1
  288. package/lodash/_baseWhile.js +1 -1
  289. package/lodash/_baseWrapperValue.js +1 -1
  290. package/lodash/_baseXor.js +1 -1
  291. package/lodash/_baseZipObject.js +1 -1
  292. package/lodash/_cacheHas.js +1 -1
  293. package/lodash/_castArrayLikeObject.js +1 -1
  294. package/lodash/_castFunction.js +1 -1
  295. package/lodash/_castPath.js +1 -1
  296. package/lodash/_castRest.js +1 -1
  297. package/lodash/_castSlice.js +1 -1
  298. package/lodash/_charsEndIndex.js +1 -1
  299. package/lodash/_charsStartIndex.js +1 -1
  300. package/lodash/_cloneArrayBuffer.js +1 -1
  301. package/lodash/_cloneBuffer.js +1 -1
  302. package/lodash/_cloneDataView.js +1 -1
  303. package/lodash/_cloneMap.js +1 -1
  304. package/lodash/_cloneRegExp.js +1 -1
  305. package/lodash/_cloneSet.js +1 -1
  306. package/lodash/_cloneSymbol.js +1 -1
  307. package/lodash/_cloneTypedArray.js +1 -1
  308. package/lodash/_compareAscending.js +1 -1
  309. package/lodash/_compareMultiple.js +1 -1
  310. package/lodash/_composeArgs.js +1 -1
  311. package/lodash/_composeArgsRight.js +1 -1
  312. package/lodash/_copyArray.js +1 -1
  313. package/lodash/_copyObject.js +1 -1
  314. package/lodash/_copySymbols.js +1 -1
  315. package/lodash/_copySymbolsIn.js +1 -1
  316. package/lodash/_coreJsData.js +1 -1
  317. package/lodash/_countHolders.js +1 -1
  318. package/lodash/_createAggregator.js +1 -1
  319. package/lodash/_createAssigner.js +1 -1
  320. package/lodash/_createBaseEach.js +1 -1
  321. package/lodash/_createBaseFor.js +1 -1
  322. package/lodash/_createBind.js +1 -1
  323. package/lodash/_createCaseFirst.js +1 -1
  324. package/lodash/_createCompounder.js +1 -1
  325. package/lodash/_createCtor.js +1 -1
  326. package/lodash/_createCurry.js +1 -1
  327. package/lodash/_createFind.js +1 -1
  328. package/lodash/_createFlow.js +1 -1
  329. package/lodash/_createHybrid.js +1 -1
  330. package/lodash/_createInverter.js +1 -1
  331. package/lodash/_createMathOperation.js +1 -1
  332. package/lodash/_createOver.js +1 -1
  333. package/lodash/_createPadding.js +1 -1
  334. package/lodash/_createPartial.js +1 -1
  335. package/lodash/_createRange.js +1 -1
  336. package/lodash/_createRecurry.js +1 -1
  337. package/lodash/_createRelationalOperation.js +1 -1
  338. package/lodash/_createRound.js +1 -1
  339. package/lodash/_createSet.js +1 -1
  340. package/lodash/_createToPairs.js +1 -1
  341. package/lodash/_createWrap.js +1 -1
  342. package/lodash/_customDefaultsAssignIn.js +1 -1
  343. package/lodash/_customDefaultsMerge.js +1 -1
  344. package/lodash/_customOmitClone.js +1 -1
  345. package/lodash/_deburrLetter.js +1 -1
  346. package/lodash/_defineProperty.js +1 -1
  347. package/lodash/_equalArrays.js +1 -1
  348. package/lodash/_equalByTag.js +1 -1
  349. package/lodash/_equalObjects.js +1 -1
  350. package/lodash/_escapeHtmlChar.js +1 -1
  351. package/lodash/_escapeStringChar.js +1 -1
  352. package/lodash/_flatRest.js +1 -1
  353. package/lodash/_freeGlobal.js +1 -1
  354. package/lodash/_getAllKeys.js +1 -1
  355. package/lodash/_getAllKeysIn.js +1 -1
  356. package/lodash/_getData.js +1 -1
  357. package/lodash/_getFuncName.js +1 -1
  358. package/lodash/_getHolder.js +1 -1
  359. package/lodash/_getMapData.js +1 -1
  360. package/lodash/_getMatchData.js +1 -1
  361. package/lodash/_getNative.js +1 -1
  362. package/lodash/_getPrototype.js +1 -1
  363. package/lodash/_getRawTag.js +1 -1
  364. package/lodash/_getSymbols.js +1 -1
  365. package/lodash/_getSymbolsIn.js +1 -1
  366. package/lodash/_getTag.js +1 -1
  367. package/lodash/_getValue.js +1 -1
  368. package/lodash/_getView.js +1 -1
  369. package/lodash/_getWrapDetails.js +1 -1
  370. package/lodash/_hasPath.js +1 -1
  371. package/lodash/_hasUnicode.js +1 -1
  372. package/lodash/_hasUnicodeWord.js +1 -1
  373. package/lodash/_hashClear.js +1 -1
  374. package/lodash/_hashDelete.js +1 -1
  375. package/lodash/_hashGet.js +1 -1
  376. package/lodash/_hashHas.js +1 -1
  377. package/lodash/_hashSet.js +1 -1
  378. package/lodash/_initCloneArray.js +1 -1
  379. package/lodash/_initCloneByTag.js +1 -1
  380. package/lodash/_initCloneObject.js +1 -1
  381. package/lodash/_insertWrapDetails.js +1 -1
  382. package/lodash/_isFlattenable.js +1 -1
  383. package/lodash/_isIndex.js +1 -1
  384. package/lodash/_isIterateeCall.js +1 -1
  385. package/lodash/_isKey.js +1 -1
  386. package/lodash/_isKeyable.js +1 -1
  387. package/lodash/_isLaziable.js +1 -1
  388. package/lodash/_isMaskable.js +1 -1
  389. package/lodash/_isMasked.js +1 -1
  390. package/lodash/_isPrototype.js +1 -1
  391. package/lodash/_isStrictComparable.js +1 -1
  392. package/lodash/_iteratorToArray.js +1 -1
  393. package/lodash/_lazyClone.js +1 -1
  394. package/lodash/_lazyReverse.js +1 -1
  395. package/lodash/_lazyValue.js +1 -1
  396. package/lodash/_listCacheClear.js +1 -1
  397. package/lodash/_listCacheDelete.js +1 -1
  398. package/lodash/_listCacheGet.js +1 -1
  399. package/lodash/_listCacheHas.js +1 -1
  400. package/lodash/_listCacheSet.js +1 -1
  401. package/lodash/_mapCacheClear.js +1 -1
  402. package/lodash/_mapCacheDelete.js +1 -1
  403. package/lodash/_mapCacheGet.js +1 -1
  404. package/lodash/_mapCacheHas.js +1 -1
  405. package/lodash/_mapCacheSet.js +1 -1
  406. package/lodash/_mapToArray.js +1 -1
  407. package/lodash/_matchesStrictComparable.js +1 -1
  408. package/lodash/_memoizeCapped.js +1 -1
  409. package/lodash/_mergeData.js +1 -1
  410. package/lodash/_metaMap.js +1 -1
  411. package/lodash/_nativeCreate.js +1 -1
  412. package/lodash/_nativeKeys.js +1 -1
  413. package/lodash/_nativeKeysIn.js +1 -1
  414. package/lodash/_nodeUtil.js +1 -1
  415. package/lodash/_objectToString.js +1 -1
  416. package/lodash/_overArg.js +1 -1
  417. package/lodash/_overRest.js +1 -1
  418. package/lodash/_parent.js +1 -1
  419. package/lodash/_reEscape.js +1 -1
  420. package/lodash/_reEvaluate.js +1 -1
  421. package/lodash/_reInterpolate.js +1 -1
  422. package/lodash/_realNames.js +1 -1
  423. package/lodash/_reorder.js +1 -1
  424. package/lodash/_replaceHolders.js +1 -1
  425. package/lodash/_root.js +1 -1
  426. package/lodash/_safeGet.js +1 -1
  427. package/lodash/_setCacheAdd.js +1 -1
  428. package/lodash/_setCacheHas.js +1 -1
  429. package/lodash/_setData.js +1 -1
  430. package/lodash/_setToArray.js +1 -1
  431. package/lodash/_setToPairs.js +1 -1
  432. package/lodash/_setToString.js +1 -1
  433. package/lodash/_setWrapToString.js +1 -1
  434. package/lodash/_shortOut.js +1 -1
  435. package/lodash/_shuffleSelf.js +1 -1
  436. package/lodash/_stackClear.js +1 -1
  437. package/lodash/_stackDelete.js +1 -1
  438. package/lodash/_stackGet.js +1 -1
  439. package/lodash/_stackHas.js +1 -1
  440. package/lodash/_stackSet.js +1 -1
  441. package/lodash/_strictIndexOf.js +1 -1
  442. package/lodash/_strictLastIndexOf.js +1 -1
  443. package/lodash/_stringSize.js +1 -1
  444. package/lodash/_stringToArray.js +1 -1
  445. package/lodash/_stringToPath.js +1 -1
  446. package/lodash/_toKey.js +1 -1
  447. package/lodash/_toSource.js +1 -1
  448. package/lodash/_trimmedEndIndex.js +1 -1
  449. package/lodash/_unescapeHtmlChar.js +1 -1
  450. package/lodash/_unicodeSize.js +1 -1
  451. package/lodash/_unicodeToArray.js +1 -1
  452. package/lodash/_unicodeWords.js +1 -1
  453. package/lodash/_updateWrapDetails.js +1 -1
  454. package/lodash/_wrapperClone.js +1 -1
  455. package/lodash/add.js +1 -1
  456. package/lodash/after.js +1 -1
  457. package/lodash/array.default.js +1 -1
  458. package/lodash/array.js +1 -1
  459. package/lodash/ary.js +1 -1
  460. package/lodash/assign.js +1 -1
  461. package/lodash/assignIn.js +1 -1
  462. package/lodash/assignInWith.js +1 -1
  463. package/lodash/assignWith.js +1 -1
  464. package/lodash/at.js +1 -1
  465. package/lodash/attempt.js +1 -1
  466. package/lodash/before.js +1 -1
  467. package/lodash/bind.js +1 -1
  468. package/lodash/bindAll.js +1 -1
  469. package/lodash/bindKey.js +1 -1
  470. package/lodash/camelCase.js +1 -1
  471. package/lodash/capitalize.js +1 -1
  472. package/lodash/castArray.js +1 -1
  473. package/lodash/ceil.js +1 -1
  474. package/lodash/chain.js +1 -1
  475. package/lodash/chunk.js +1 -1
  476. package/lodash/clamp.js +1 -1
  477. package/lodash/clone.js +1 -1
  478. package/lodash/cloneDeep.js +1 -1
  479. package/lodash/cloneDeepWith.js +1 -1
  480. package/lodash/cloneWith.js +1 -1
  481. package/lodash/collection.default.js +1 -1
  482. package/lodash/collection.js +1 -1
  483. package/lodash/commit.js +1 -1
  484. package/lodash/compact.js +1 -1
  485. package/lodash/concat.js +1 -1
  486. package/lodash/cond.js +1 -1
  487. package/lodash/conforms.js +1 -1
  488. package/lodash/conformsTo.js +1 -1
  489. package/lodash/constant.js +1 -1
  490. package/lodash/countBy.js +1 -1
  491. package/lodash/create.js +1 -1
  492. package/lodash/curry.js +1 -1
  493. package/lodash/curryRight.js +1 -1
  494. package/lodash/date.default.js +1 -1
  495. package/lodash/date.js +1 -1
  496. package/lodash/debounce.js +1 -1
  497. package/lodash/deburr.js +1 -1
  498. package/lodash/defaultTo.js +1 -1
  499. package/lodash/defaults.js +1 -1
  500. package/lodash/defaultsDeep.js +1 -1
  501. package/lodash/defer.js +1 -1
  502. package/lodash/delay.js +1 -1
  503. package/lodash/difference.js +1 -1
  504. package/lodash/differenceBy.js +1 -1
  505. package/lodash/differenceWith.js +1 -1
  506. package/lodash/divide.js +1 -1
  507. package/lodash/drop.js +1 -1
  508. package/lodash/dropRight.js +1 -1
  509. package/lodash/dropRightWhile.js +1 -1
  510. package/lodash/dropWhile.js +1 -1
  511. package/lodash/each.js +1 -1
  512. package/lodash/eachRight.js +1 -1
  513. package/lodash/endsWith.js +1 -1
  514. package/lodash/entries.js +1 -1
  515. package/lodash/entriesIn.js +1 -1
  516. package/lodash/eq.js +1 -1
  517. package/lodash/escape.js +1 -1
  518. package/lodash/escapeRegExp.js +1 -1
  519. package/lodash/every.js +1 -1
  520. package/lodash/extend.js +1 -1
  521. package/lodash/extendWith.js +1 -1
  522. package/lodash/fill.js +1 -1
  523. package/lodash/filter.js +1 -1
  524. package/lodash/find.js +1 -1
  525. package/lodash/findIndex.js +1 -1
  526. package/lodash/findKey.js +1 -1
  527. package/lodash/findLast.js +1 -1
  528. package/lodash/findLastIndex.js +1 -1
  529. package/lodash/findLastKey.js +1 -1
  530. package/lodash/first.js +1 -1
  531. package/lodash/flatMap.js +1 -1
  532. package/lodash/flatMapDeep.js +1 -1
  533. package/lodash/flatMapDepth.js +1 -1
  534. package/lodash/flatten.js +1 -1
  535. package/lodash/flattenDeep.js +1 -1
  536. package/lodash/flattenDepth.js +1 -1
  537. package/lodash/flip.js +1 -1
  538. package/lodash/floor.js +1 -1
  539. package/lodash/flow.js +1 -1
  540. package/lodash/flowRight.js +1 -1
  541. package/lodash/forEach.js +1 -1
  542. package/lodash/forEachRight.js +1 -1
  543. package/lodash/forIn.js +1 -1
  544. package/lodash/forInRight.js +1 -1
  545. package/lodash/forOwn.js +1 -1
  546. package/lodash/forOwnRight.js +1 -1
  547. package/lodash/fromPairs.js +1 -1
  548. package/lodash/function.default.js +1 -1
  549. package/lodash/function.js +1 -1
  550. package/lodash/functions.js +1 -1
  551. package/lodash/functionsIn.js +1 -1
  552. package/lodash/get.js +1 -1
  553. package/lodash/groupBy.js +1 -1
  554. package/lodash/gt.js +1 -1
  555. package/lodash/gte.js +1 -1
  556. package/lodash/has.js +1 -1
  557. package/lodash/hasIn.js +1 -1
  558. package/lodash/head.js +1 -1
  559. package/lodash/identity.js +1 -1
  560. package/lodash/inRange.js +1 -1
  561. package/lodash/includes.js +1 -1
  562. package/lodash/index.js +1 -1
  563. package/lodash/indexOf.js +1 -1
  564. package/lodash/initial.js +1 -1
  565. package/lodash/intersection.js +1 -1
  566. package/lodash/intersectionBy.js +1 -1
  567. package/lodash/intersectionWith.js +1 -1
  568. package/lodash/invert.js +1 -1
  569. package/lodash/invertBy.js +1 -1
  570. package/lodash/invoke.js +1 -1
  571. package/lodash/invokeMap.js +1 -1
  572. package/lodash/isArguments.js +1 -1
  573. package/lodash/isArray.js +1 -1
  574. package/lodash/isArrayBuffer.js +1 -1
  575. package/lodash/isArrayLike.js +1 -1
  576. package/lodash/isArrayLikeObject.js +1 -1
  577. package/lodash/isBoolean.js +1 -1
  578. package/lodash/isBuffer.js +1 -1
  579. package/lodash/isDate.js +1 -1
  580. package/lodash/isElement.js +1 -1
  581. package/lodash/isEmpty.js +1 -1
  582. package/lodash/isEqual.js +1 -1
  583. package/lodash/isEqualWith.js +1 -1
  584. package/lodash/isError.js +1 -1
  585. package/lodash/isFinite.js +1 -1
  586. package/lodash/isFunction.js +1 -1
  587. package/lodash/isInteger.js +1 -1
  588. package/lodash/isLength.js +1 -1
  589. package/lodash/isMap.js +1 -1
  590. package/lodash/isMatch.js +1 -1
  591. package/lodash/isMatchWith.js +1 -1
  592. package/lodash/isNaN.js +1 -1
  593. package/lodash/isNative.js +1 -1
  594. package/lodash/isNil.js +1 -1
  595. package/lodash/isNull.js +1 -1
  596. package/lodash/isNumber.js +1 -1
  597. package/lodash/isObject.js +1 -1
  598. package/lodash/isObjectLike.js +1 -1
  599. package/lodash/isPlainObject.js +1 -1
  600. package/lodash/isPromise.js +2 -2
  601. package/lodash/isRegExp.js +1 -1
  602. package/lodash/isSafeInteger.js +1 -1
  603. package/lodash/isSet.js +1 -1
  604. package/lodash/isString.js +1 -1
  605. package/lodash/isSymbol.js +1 -1
  606. package/lodash/isTypedArray.js +1 -1
  607. package/lodash/isUndefined.js +1 -1
  608. package/lodash/isWeakMap.js +1 -1
  609. package/lodash/isWeakSet.js +1 -1
  610. package/lodash/iteratee.js +1 -1
  611. package/lodash/join.js +1 -1
  612. package/lodash/kebabCase.js +1 -1
  613. package/lodash/keyBy.js +1 -1
  614. package/lodash/keys.js +1 -1
  615. package/lodash/keysIn.js +1 -1
  616. package/lodash/lang.default.js +1 -1
  617. package/lodash/lang.js +1 -1
  618. package/lodash/last.js +1 -1
  619. package/lodash/lastIndexOf.js +1 -1
  620. package/lodash/lodash.default.js +1 -1
  621. package/lodash/lodash.js +1 -1
  622. package/lodash/lowerCase.js +1 -1
  623. package/lodash/lowerFirst.js +1 -1
  624. package/lodash/lt.js +1 -1
  625. package/lodash/lte.js +1 -1
  626. package/lodash/map.js +1 -1
  627. package/lodash/mapKeys.js +1 -1
  628. package/lodash/mapValues.js +1 -1
  629. package/lodash/matches.js +1 -1
  630. package/lodash/matchesProperty.js +1 -1
  631. package/lodash/math.default.js +1 -1
  632. package/lodash/math.js +1 -1
  633. package/lodash/max.js +1 -1
  634. package/lodash/maxBy.js +1 -1
  635. package/lodash/mean.js +1 -1
  636. package/lodash/meanBy.js +1 -1
  637. package/lodash/memoize.js +1 -1
  638. package/lodash/merge.js +1 -1
  639. package/lodash/mergeWith.js +1 -1
  640. package/lodash/method.js +1 -1
  641. package/lodash/methodOf.js +1 -1
  642. package/lodash/min.js +1 -1
  643. package/lodash/minBy.js +1 -1
  644. package/lodash/mixin.js +1 -1
  645. package/lodash/multiply.js +1 -1
  646. package/lodash/negate.js +1 -1
  647. package/lodash/next.js +1 -1
  648. package/lodash/noop.js +1 -1
  649. package/lodash/now.js +1 -1
  650. package/lodash/nth.js +1 -1
  651. package/lodash/nthArg.js +1 -1
  652. package/lodash/number.default.js +1 -1
  653. package/lodash/number.js +1 -1
  654. package/lodash/object.default.js +1 -1
  655. package/lodash/object.js +1 -1
  656. package/lodash/omit.js +1 -1
  657. package/lodash/omitBy.js +1 -1
  658. package/lodash/once.js +1 -1
  659. package/lodash/orderBy.js +1 -1
  660. package/lodash/over.js +1 -1
  661. package/lodash/overArgs.js +1 -1
  662. package/lodash/overEvery.js +1 -1
  663. package/lodash/overSome.js +1 -1
  664. package/lodash/pad.js +1 -1
  665. package/lodash/padEnd.js +1 -1
  666. package/lodash/padStart.js +1 -1
  667. package/lodash/parseInt.js +1 -1
  668. package/lodash/partial.js +1 -1
  669. package/lodash/partialRight.js +1 -1
  670. package/lodash/partition.js +1 -1
  671. package/lodash/pick.js +1 -1
  672. package/lodash/pickBy.js +1 -1
  673. package/lodash/plant.js +1 -1
  674. package/lodash/property.js +1 -1
  675. package/lodash/propertyOf.js +1 -1
  676. package/lodash/pull.js +1 -1
  677. package/lodash/pullAll.js +1 -1
  678. package/lodash/pullAllBy.js +1 -1
  679. package/lodash/pullAllWith.js +1 -1
  680. package/lodash/pullAt.js +1 -1
  681. package/lodash/random.js +1 -1
  682. package/lodash/range.js +1 -1
  683. package/lodash/rangeRight.js +1 -1
  684. package/lodash/rearg.js +1 -1
  685. package/lodash/reduce.js +1 -1
  686. package/lodash/reduceRight.js +1 -1
  687. package/lodash/reject.js +1 -1
  688. package/lodash/remove.js +1 -1
  689. package/lodash/repeat.js +1 -1
  690. package/lodash/replace.js +1 -1
  691. package/lodash/rest.js +1 -1
  692. package/lodash/result.js +1 -1
  693. package/lodash/reverse.js +1 -1
  694. package/lodash/round.js +1 -1
  695. package/lodash/sample.js +1 -1
  696. package/lodash/sampleSize.js +1 -1
  697. package/lodash/seq.default.js +1 -1
  698. package/lodash/seq.js +1 -1
  699. package/lodash/set.js +1 -1
  700. package/lodash/setWith.js +1 -1
  701. package/lodash/shuffle.js +1 -1
  702. package/lodash/size.js +1 -1
  703. package/lodash/slice.js +1 -1
  704. package/lodash/snakeCase.js +1 -1
  705. package/lodash/some.js +1 -1
  706. package/lodash/sortBy.js +1 -1
  707. package/lodash/sortedIndex.js +1 -1
  708. package/lodash/sortedIndexBy.js +1 -1
  709. package/lodash/sortedIndexOf.js +1 -1
  710. package/lodash/sortedLastIndex.js +1 -1
  711. package/lodash/sortedLastIndexBy.js +1 -1
  712. package/lodash/sortedLastIndexOf.js +1 -1
  713. package/lodash/sortedUniq.js +1 -1
  714. package/lodash/sortedUniqBy.js +1 -1
  715. package/lodash/split.js +1 -1
  716. package/lodash/spread.js +1 -1
  717. package/lodash/startCase.js +1 -1
  718. package/lodash/startsWith.js +1 -1
  719. package/lodash/string.default.js +1 -1
  720. package/lodash/string.js +1 -1
  721. package/lodash/stubArray.js +1 -1
  722. package/lodash/stubFalse.js +1 -1
  723. package/lodash/stubObject.js +1 -1
  724. package/lodash/stubString.js +1 -1
  725. package/lodash/stubTrue.js +1 -1
  726. package/lodash/subtract.js +1 -1
  727. package/lodash/sum.js +1 -1
  728. package/lodash/sumBy.js +1 -1
  729. package/lodash/tail.js +1 -1
  730. package/lodash/take.js +1 -1
  731. package/lodash/takeRight.js +1 -1
  732. package/lodash/takeRightWhile.js +1 -1
  733. package/lodash/takeWhile.js +1 -1
  734. package/lodash/tap.js +1 -1
  735. package/lodash/template.js +1 -1
  736. package/lodash/templateSettings.js +1 -1
  737. package/lodash/throttle.js +1 -1
  738. package/lodash/thru.js +1 -1
  739. package/lodash/times.js +1 -1
  740. package/lodash/toArray.js +1 -1
  741. package/lodash/toFinite.js +1 -1
  742. package/lodash/toInteger.js +1 -1
  743. package/lodash/toIterator.js +1 -1
  744. package/lodash/toJSON.js +1 -1
  745. package/lodash/toLength.js +1 -1
  746. package/lodash/toLower.js +1 -1
  747. package/lodash/toNumber.js +1 -1
  748. package/lodash/toPairs.js +1 -1
  749. package/lodash/toPairsIn.js +1 -1
  750. package/lodash/toPath.js +1 -1
  751. package/lodash/toPlainObject.js +1 -1
  752. package/lodash/toSafeInteger.js +1 -1
  753. package/lodash/toString.js +1 -1
  754. package/lodash/toUpper.js +1 -1
  755. package/lodash/transform.js +1 -1
  756. package/lodash/trim.js +1 -1
  757. package/lodash/trimEnd.js +1 -1
  758. package/lodash/trimStart.js +1 -1
  759. package/lodash/truncate.js +1 -1
  760. package/lodash/unary.js +1 -1
  761. package/lodash/unescape.js +1 -1
  762. package/lodash/union.js +1 -1
  763. package/lodash/unionBy.js +1 -1
  764. package/lodash/unionWith.js +1 -1
  765. package/lodash/uniq.js +1 -1
  766. package/lodash/uniqBy.js +1 -1
  767. package/lodash/uniqWith.js +1 -1
  768. package/lodash/uniqueId.js +1 -1
  769. package/lodash/unset.js +1 -1
  770. package/lodash/unzip.js +1 -1
  771. package/lodash/unzipWith.js +1 -1
  772. package/lodash/update.js +1 -1
  773. package/lodash/updateWith.js +1 -1
  774. package/lodash/upperCase.js +1 -1
  775. package/lodash/upperFirst.js +1 -1
  776. package/lodash/util.default.js +1 -1
  777. package/lodash/util.js +1 -1
  778. package/lodash/value.js +1 -1
  779. package/lodash/valueOf.js +1 -1
  780. package/lodash/values.js +1 -1
  781. package/lodash/valuesIn.js +1 -1
  782. package/lodash/without.js +1 -1
  783. package/lodash/words.js +1 -1
  784. package/lodash/wrap.js +1 -1
  785. package/lodash/wrapperAt.js +1 -1
  786. package/lodash/wrapperChain.js +1 -1
  787. package/lodash/wrapperLodash.js +1 -1
  788. package/lodash/wrapperReverse.js +1 -1
  789. package/lodash/wrapperValue.js +1 -1
  790. package/lodash/xor.js +1 -1
  791. package/lodash/xorBy.js +1 -1
  792. package/lodash/xorWith.js +1 -1
  793. package/lodash/zip.js +1 -1
  794. package/lodash/zipObject.js +1 -1
  795. package/lodash/zipObjectDeep.js +1 -1
  796. package/lodash/zipWith.js +1 -1
  797. package/math/index.js +1 -1
  798. package/md5/index.js +1 -1
  799. package/mock/MockWebSocket.js +1 -1
  800. package/mock/MockXMLHttpRequest.js +1 -1
  801. package/mock/index.js +1 -1
  802. package/normalize-wheel/ExecutionEnvironment.js +1 -1
  803. package/normalize-wheel/UserAgent_DEPRECATED.js +1 -1
  804. package/normalize-wheel/index.js +1 -1
  805. package/normalize-wheel/isEventSupported.js +1 -1
  806. package/number-to-chinese/index.js +1 -1
  807. package/nzh/cn.js +1 -1
  808. package/nzh/hk.js +1 -1
  809. package/nzh/index.js +1 -1
  810. package/nzh/nzh.js +1 -1
  811. package/nzh/src/autoGet.js +1 -1
  812. package/nzh/src/index.js +1 -1
  813. package/nzh/src/langs/cn_b.js +1 -1
  814. package/nzh/src/langs/cn_s.js +1 -1
  815. package/nzh/src/langs/hk_b.js +1 -1
  816. package/nzh/src/langs/hk_s.js +1 -1
  817. package/nzh/src/utils.js +21 -20
  818. package/object/index.d.ts +5 -1
  819. package/object/index.js +13 -7
  820. package/package.json +1 -1
  821. package/pinyin/core.js +1 -1
  822. package/pinyin/index.js +1 -1
  823. package/pinyin/simplified.js +1 -1
  824. package/pinyin/simplified_dict.js +1 -1
  825. package/pinyin/traditional.js +1 -1
  826. package/pinyin/traditional_dict.js +1 -1
  827. package/query-string/base.js +1 -1
  828. package/query-string/index.js +1 -1
  829. package/query-string/splitOnFirst.js +1 -1
  830. package/random/address.js +1 -1
  831. package/random/constellation.js +1 -1
  832. package/random/image.js +1 -1
  833. package/random/index.js +1 -1
  834. package/random/licensePlate.js +1 -1
  835. package/random/name.js +1 -1
  836. package/random/number.js +1 -1
  837. package/random/text.js +1 -1
  838. package/random/time.js +1 -1
  839. package/random/web.js +1 -1
  840. package/sanitize-url/index.js +1 -1
  841. package/screenfull/index.js +1 -1
  842. package/sleep/index.js +1 -1
  843. package/snapdom/index.browser.d.ts +1 -1
  844. package/snapdom/index.browser.js +2 -6
  845. package/snapdom/index.d.ts +1 -2
  846. package/snapdom/index.js +4 -3
  847. package/snapdom/{api → src/api}/preCache.js +2 -2
  848. package/snapdom/{api → src/api}/snapdom.js +3 -3
  849. package/snapdom/{core → src/core}/cache.js +2 -2
  850. package/snapdom/{core → src/core}/capture.js +3 -3
  851. package/snapdom/src/core/clone.js +266 -0
  852. package/snapdom/{core → src/core}/context.js +2 -2
  853. package/snapdom/{core → src/core}/plugins.js +2 -2
  854. package/snapdom/{core → src/core}/prepare.js +2 -2
  855. package/snapdom/{exporters → src/exporters}/download.js +2 -2
  856. package/snapdom/{exporters → src/exporters}/toBlob.js +2 -2
  857. package/snapdom/{exporters → src/exporters}/toCanvas.js +29 -20
  858. package/snapdom/{exporters → src/exporters}/toImg.js +2 -2
  859. package/snapdom/src/index.browser.d.ts +1 -0
  860. package/snapdom/src/index.browser.js +7 -0
  861. package/snapdom/src/index.d.ts +2 -0
  862. package/snapdom/src/index.js +4 -0
  863. package/snapdom/{modules → src/modules}/CSSVar.d.ts +1 -0
  864. package/snapdom/src/modules/CSSVar.js +101 -0
  865. package/snapdom/{modules → src/modules}/background.js +5 -2
  866. package/snapdom/{modules → src/modules}/changeCSS.js +2 -2
  867. package/snapdom/{modules → src/modules}/counter.d.ts +6 -2
  868. package/snapdom/{modules → src/modules}/counter.js +20 -23
  869. package/snapdom/{modules → src/modules}/fonts.js +2 -2
  870. package/snapdom/{modules → src/modules}/iconFonts.js +2 -2
  871. package/snapdom/{modules → src/modules}/images.js +6 -6
  872. package/snapdom/{modules → src/modules}/lineClamp.js +2 -2
  873. package/snapdom/{modules → src/modules}/pictureResolver.js +2 -2
  874. package/snapdom/{modules → src/modules}/pseudo.js +53 -47
  875. package/snapdom/{modules → src/modules}/rasterize.js +2 -2
  876. package/snapdom/{modules → src/modules}/snapFetch.js +2 -2
  877. package/snapdom/{modules → src/modules}/styles.js +9 -4
  878. package/snapdom/{modules → src/modules}/svgDefs.js +2 -2
  879. package/snapdom/{utils → src/utils}/browser.js +2 -2
  880. package/snapdom/{utils → src/utils}/capture.helpers.js +2 -2
  881. package/snapdom/{utils → src/utils}/clone.helpers.d.ts +14 -0
  882. package/snapdom/{utils → src/utils}/clone.helpers.js +8 -5
  883. package/snapdom/{utils → src/utils}/css.js +15 -5
  884. package/snapdom/{utils → src/utils}/debug.js +2 -2
  885. package/snapdom/{utils → src/utils}/helpers.js +2 -2
  886. package/snapdom/{utils → src/utils}/image.js +2 -2
  887. package/snapdom/{utils → src/utils}/index.js +1 -1
  888. package/snapdom/{utils → src/utils}/prepare.helpers.js +2 -2
  889. package/snapdom/{utils → src/utils}/transforms.helpers.js +2 -2
  890. package/string/chars.js +1 -1
  891. package/string/index.js +1 -1
  892. package/tinycolor/conversion.d.ts +1 -1
  893. package/tinycolor/conversion.js +1 -1
  894. package/tinycolor/css-color-names.js +1 -1
  895. package/tinycolor/format-input.js +54 -53
  896. package/tinycolor/from-ratio.js +1 -1
  897. package/tinycolor/index.js +1 -1
  898. package/tinycolor/interfaces.js +1 -1
  899. package/tinycolor/public_api.js +1 -1
  900. package/tinycolor/random.js +1 -1
  901. package/tinycolor/readability.js +1 -1
  902. package/tinycolor/to-ms-filter.js +1 -1
  903. package/tinycolor/umd_api.js +1 -1
  904. package/tinycolor/utils.d.ts +1 -1
  905. package/tinycolor/utils.js +1 -1
  906. package/tree/index.js +1 -1
  907. package/tree/searchTree.js +1 -1
  908. package/tween/easing.js +1 -1
  909. package/tween/index.js +1 -1
  910. package/tween/tween.js +1 -1
  911. package/ui-color/compareColorByRange.js +1 -1
  912. package/ui-color/index.js +1 -1
  913. package/url-toolkit/index.js +1 -1
  914. package/validate/index.js +1 -1
  915. package/validate/interface.js +1 -1
  916. package/validate/locale/en-US.js +1 -1
  917. package/validate/locale/index.js +1 -1
  918. package/validate/locale/zh-CN.js +1 -1
  919. package/validate/rules/array.js +1 -1
  920. package/validate/rules/base.js +1 -1
  921. package/validate/rules/boolean.js +1 -1
  922. package/validate/rules/custom.js +1 -1
  923. package/validate/rules/number.js +1 -1
  924. package/validate/rules/object.js +1 -1
  925. package/validate/rules/string.js +1 -1
  926. package/validate/rules/type.js +1 -1
  927. package/version/index.js +1 -1
  928. package/xlsx/crc32.js +1 -1
  929. package/xlsx/index.js +1 -1
  930. package/xlsx/xlsx.js +3868 -3867
  931. package/constant/isMobile.d.ts +0 -3
  932. package/constant/isMobile.js +0 -6
  933. package/filesize/filesize.js +0 -50
  934. package/filesize/helpers.d.ts +0 -58
  935. package/filesize/helpers.js +0 -70
  936. package/snapdom/core/clone.js +0 -266
  937. package/snapdom/modules/CSSVar.js +0 -82
  938. /package/filesize/{constants.d.ts → src/constants.d.ts} +0 -0
  939. /package/snapdom/{api → src/api}/preCache.d.ts +0 -0
  940. /package/snapdom/{api → src/api}/snapdom.d.ts +0 -0
  941. /package/snapdom/{core → src/core}/cache.d.ts +0 -0
  942. /package/snapdom/{core → src/core}/capture.d.ts +0 -0
  943. /package/snapdom/{core → src/core}/clone.d.ts +0 -0
  944. /package/snapdom/{core → src/core}/context.d.ts +0 -0
  945. /package/snapdom/{core → src/core}/exporters.d.ts +0 -0
  946. /package/snapdom/{core → src/core}/plugins.d.ts +0 -0
  947. /package/snapdom/{core → src/core}/prepare.d.ts +0 -0
  948. /package/snapdom/{exporters → src/exporters}/download.d.ts +0 -0
  949. /package/snapdom/{exporters → src/exporters}/toBlob.d.ts +0 -0
  950. /package/snapdom/{exporters → src/exporters}/toCanvas.d.ts +0 -0
  951. /package/snapdom/{exporters → src/exporters}/toImg.d.ts +0 -0
  952. /package/snapdom/{exporters → src/exporters}/toJpg.d.ts +0 -0
  953. /package/snapdom/{exporters → src/exporters}/toPng.d.ts +0 -0
  954. /package/snapdom/{exporters → src/exporters}/toSvg.d.ts +0 -0
  955. /package/snapdom/{exporters → src/exporters}/toWebp.d.ts +0 -0
  956. /package/snapdom/{modules → src/modules}/background.d.ts +0 -0
  957. /package/snapdom/{modules → src/modules}/changeCSS.d.ts +0 -0
  958. /package/snapdom/{modules → src/modules}/fonts.d.ts +0 -0
  959. /package/snapdom/{modules → src/modules}/iconFonts.d.ts +0 -0
  960. /package/snapdom/{modules → src/modules}/images.d.ts +0 -0
  961. /package/snapdom/{modules → src/modules}/lineClamp.d.ts +0 -0
  962. /package/snapdom/{modules → src/modules}/pictureResolver.d.ts +0 -0
  963. /package/snapdom/{modules → src/modules}/pseudo.d.ts +0 -0
  964. /package/snapdom/{modules → src/modules}/rasterize.d.ts +0 -0
  965. /package/snapdom/{modules → src/modules}/snapFetch.d.ts +0 -0
  966. /package/snapdom/{modules → src/modules}/styles.d.ts +0 -0
  967. /package/snapdom/{modules → src/modules}/svgDefs.d.ts +0 -0
  968. /package/snapdom/{utils → src/utils}/browser.d.ts +0 -0
  969. /package/snapdom/{utils → src/utils}/capture.helpers.d.ts +0 -0
  970. /package/snapdom/{utils → src/utils}/css.d.ts +0 -0
  971. /package/snapdom/{utils → src/utils}/debug.d.ts +0 -0
  972. /package/snapdom/{utils → src/utils}/helpers.d.ts +0 -0
  973. /package/snapdom/{utils → src/utils}/image.d.ts +0 -0
  974. /package/snapdom/{utils → src/utils}/index.d.ts +0 -0
  975. /package/snapdom/{utils → src/utils}/prepare.helpers.d.ts +0 -0
  976. /package/snapdom/{utils → src/utils}/transforms.helpers.d.ts +0 -0
@@ -0,0 +1,266 @@
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
+ import { isFirefox as e } from "../utils/browser.js";
3
+ import { NO_CAPTURE_TAGS as t } from "../utils/css.js";
4
+ import { debugWarn as n } from "../utils/debug.js";
5
+ import "../utils/index.js";
6
+ import { inlineAllStyles as r } from "../modules/styles.js";
7
+ import { buildSeedCustomPropsRule as i, collectCustomPropsFromCSS as a, createCheckboxRadioReplacement as o, extractShadowCSS as s, freezeImgSrcset as c, getUnscaledDimensions as l, idleCallback as u, injectScopedStyle as d, markSlottedSubtree as f, nextShadowScopeId as p, rasterizeIframe as m, rewriteShadowCSS as h } from "../utils/clone.helpers.js";
8
+ import { isInSvgTemplate as g, resolveCSSVars as _ } from "../modules/CSSVar.js";
9
+ //#region utils/snapdom/src/core/clone.js
10
+ async function v(y, b, x) {
11
+ if (!y) throw Error("Invalid node");
12
+ let S = /* @__PURE__ */ new Set(), C = null, w = null;
13
+ if (y.nodeType === Node.ELEMENT_NODE) {
14
+ let e = (y.localName || y.tagName || "").toLowerCase();
15
+ if (y.id === "snapdom-sandbox" || y.hasAttribute("data-snapdom-sandbox") || t.has(e)) return null;
16
+ if (e === "foreignobject" && y.parentElement?.closest?.("foreignObject")) return n(b, "Nested <foreignObject> skipped (SVG spec limitation — not rendered by browsers)"), null;
17
+ }
18
+ if (y.nodeType === Node.TEXT_NODE || y.nodeType !== Node.ELEMENT_NODE) return y.cloneNode(!0);
19
+ if (y.getAttribute("data-capture") === "exclude") {
20
+ if (x.excludeMode === "hide") {
21
+ let e = document.createElement("div"), { width: t, height: n } = l(y), r = t || y.getBoundingClientRect().width || 0, i = n || y.getBoundingClientRect().height || 0;
22
+ return e.style.cssText = `display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`, e;
23
+ } else if (x.excludeMode === "remove") return null;
24
+ }
25
+ if (x.exclude && Array.isArray(x.exclude)) for (let e of x.exclude) try {
26
+ if (y.matches?.(e)) {
27
+ if (x.excludeMode === "hide") {
28
+ let e = document.createElement("div"), { width: t, height: n } = l(y), r = t || y.getBoundingClientRect().width || 0, i = n || y.getBoundingClientRect().height || 0;
29
+ return e.style.cssText = `display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`, e;
30
+ } else if (x.excludeMode === "remove") return null;
31
+ }
32
+ } catch (t) {
33
+ console.warn(`Invalid selector in exclude option: ${e}`, t);
34
+ }
35
+ if (typeof x.filter == "function") try {
36
+ if (!x.filter(y)) {
37
+ if (x.filterMode === "hide") {
38
+ let e = document.createElement("div"), { width: t, height: n } = l(y), r = t || y.getBoundingClientRect().width || 0, i = n || y.getBoundingClientRect().height || 0;
39
+ return e.style.cssText = `display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`, e;
40
+ } else if (x.filterMode === "remove") return null;
41
+ }
42
+ } catch (e) {
43
+ console.warn("Error in filter function:", e);
44
+ }
45
+ if (y.tagName === "IFRAME") {
46
+ let e = !1;
47
+ try {
48
+ e = !!(y.contentDocument || y.contentWindow?.document);
49
+ } catch (e) {
50
+ n(b, "iframe same-origin probe failed", e);
51
+ }
52
+ if (e) try {
53
+ return await m(y, b, x);
54
+ } catch (e) {
55
+ console.warn("[SnapDOM] iframe rasterization failed, fallback:", e);
56
+ }
57
+ if (e || console.warn("[snapdom] cross-origin <iframe> skipped (cannot access content). Use options.placeholders to show a placeholder instead.", y), x.placeholders) {
58
+ let { width: e, height: t } = l(y), n = document.createElement("div");
59
+ return n.style.cssText = `width:${e}px;height:${t}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`, r(y, n, b, x), n;
60
+ } else {
61
+ let { width: e, height: t } = l(y), n = document.createElement("div");
62
+ return n.style.cssText = `display:inline-block;width:${e}px;height:${t}px;visibility:hidden;`, r(y, n, b, x), n;
63
+ }
64
+ }
65
+ if (y.getAttribute("data-capture") === "placeholder") {
66
+ let e = y.cloneNode(!1);
67
+ b.nodeMap.set(e, y), r(y, e, b, x);
68
+ let t = document.createElement("div");
69
+ return t.textContent = y.getAttribute("data-placeholder-text") || "", t.style.cssText = "color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;", e.appendChild(t), e;
70
+ }
71
+ if (y.tagName === "CANVAS") {
72
+ let e = "";
73
+ try {
74
+ let t = y.getContext("2d", { willReadFrequently: !0 });
75
+ try {
76
+ t && t.getImageData(0, 0, 1, 1);
77
+ } catch {}
78
+ if (await new Promise((e) => requestAnimationFrame(e)), e = y.toDataURL("image/png"), !e || e === "data:,") {
79
+ try {
80
+ t && t.getImageData(0, 0, 1, 1);
81
+ } catch {}
82
+ if (await new Promise((e) => requestAnimationFrame(e)), e = y.toDataURL("image/png"), !e || e === "data:,") {
83
+ let t = document.createElement("canvas");
84
+ t.width = y.width, t.height = y.height;
85
+ let n = t.getContext("2d");
86
+ n && (n.drawImage(y, 0, 0), e = t.toDataURL("image/png"));
87
+ }
88
+ }
89
+ } catch (e) {
90
+ n(b, "Canvas toDataURL failed, using empty/fallback", e);
91
+ }
92
+ let t = document.createElement("img");
93
+ try {
94
+ t.decoding = "sync", t.loading = "eager";
95
+ } catch (e) {
96
+ n(b, "img decoding/loading hints failed", e);
97
+ }
98
+ e && (t.src = e), t.width = y.width, t.height = y.height;
99
+ let { width: i, height: a } = l(y);
100
+ return i > 0 && (t.style.width = `${i}px`), a > 0 && (t.style.height = `${a}px`), b.nodeMap.set(t, y), r(y, t, b, x), t;
101
+ }
102
+ if (y.tagName === "VIDEO") {
103
+ let e = "";
104
+ try {
105
+ let t = document.createElement("canvas");
106
+ t.width = y.videoWidth || y.offsetWidth || 320, t.height = y.videoHeight || y.offsetHeight || 240;
107
+ let n = t.getContext("2d");
108
+ n && (n.drawImage(y, 0, 0, t.width, t.height), e = t.toDataURL("image/png"), (!e || e === "data:,") && (e = ""));
109
+ } catch (e) {
110
+ n(b, "Video frame capture failed, using poster fallback", e);
111
+ }
112
+ let t = document.createElement("img");
113
+ try {
114
+ t.decoding = "sync", t.loading = "eager";
115
+ } catch {}
116
+ e ? t.src = e : y.poster && (t.src = y.poster), t.width = y.videoWidth || y.offsetWidth || 0, t.height = y.videoHeight || y.offsetHeight || 0;
117
+ let { width: i, height: a } = l(y);
118
+ return i > 0 && (t.style.width = `${i}px`), a > 0 && (t.style.height = `${a}px`), t.style.objectFit = "contain", b.nodeMap.set(t, y), r(y, t, b, x), t;
119
+ }
120
+ let T;
121
+ try {
122
+ if (T = y.cloneNode(!1), T.attributes?.length) try {
123
+ for (let e of T.attributes) /[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(e.value) && T.setAttribute(e.name, e.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g, ""));
124
+ } catch {}
125
+ if (_(y, T), b.nodeMap.set(T, y), y.tagName === "IMG") {
126
+ c(y, T);
127
+ try {
128
+ let { width: e, height: t } = l(y), n = Math.round(e || 0), r = Math.round(t || 0);
129
+ n && (T.dataset.snapdomWidth = String(n)), r && (T.dataset.snapdomHeight = String(r));
130
+ } catch (e) {
131
+ n(b, "getUnscaledDimensions for IMG failed", e);
132
+ }
133
+ try {
134
+ let e = y.getAttribute("style") || "", t = window.getComputedStyle(y), n = (n) => {
135
+ let r = e.match(RegExp(`${n}\\s*:\\s*([^;]+)`, "i")), i = r ? r[1].trim() : t.getPropertyValue(n);
136
+ return /%|auto/i.test(String(i || ""));
137
+ }, r = parseInt(T.dataset.snapdomWidth || "0", 10), i = parseInt(T.dataset.snapdomHeight || "0", 10), a = n("width") || !r, o = n("height") || !i;
138
+ a && r && (T.style.width = `${r}px`), o && i && (T.style.height = `${i}px`);
139
+ let s = t.getPropertyValue("object-fit"), c = t.getPropertyValue("object-position");
140
+ s && s !== "fill" ? (T.style.objectFit = s, c && (T.style.objectPosition = c)) : (r && (T.style.minWidth = `${r}px`), i && (T.style.minHeight = `${i}px`));
141
+ } catch (e) {
142
+ n(b, "IMG dimension freeze failed", e);
143
+ }
144
+ }
145
+ } catch (e) {
146
+ throw console.error("[Snapdom] Failed to clone node:", y, e), e;
147
+ }
148
+ let E = null;
149
+ if (y instanceof HTMLTextAreaElement) {
150
+ let { width: e, height: t } = l(y), n = e || y.getBoundingClientRect().width || 0, r = t || y.getBoundingClientRect().height || 0;
151
+ n && (T.style.width = `${n}px`), r && (T.style.height = `${r}px`);
152
+ }
153
+ if (y instanceof HTMLInputElement) {
154
+ let t = (y.type || "text").toLowerCase();
155
+ if ((t === "checkbox" || t === "radio") && e()) {
156
+ let { el: e, applyVisual: t } = o(y);
157
+ b.nodeMap.set(e, y), E = t, T = e;
158
+ } else T.value = y.value, T.setAttribute("value", y.value), y.checked !== void 0 && (T.checked = y.checked, y.checked && T.setAttribute("checked", ""), y.indeterminate && (T.indeterminate = y.indeterminate));
159
+ }
160
+ if ((y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement) && !y.value && y.placeholder) try {
161
+ let e = window.getComputedStyle(y, "::placeholder"), t = e && e.color;
162
+ if (t && t !== "rgba(0, 0, 0, 0)") {
163
+ let n = "snapdom-ph-" + (Math.random() * 1e6 | 0);
164
+ T.classList.add(n);
165
+ let r = document.createElement("style");
166
+ r.textContent = `.${n}::placeholder{color:${t}!important;opacity:${e.opacity || "1"}!important;}`, T.prepend(r);
167
+ }
168
+ } catch {}
169
+ if (y instanceof HTMLSelectElement && (C = y.value), y instanceof HTMLTextAreaElement && (w = y.value), y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement || y instanceof HTMLSelectElement) {
170
+ y.disabled && T.setAttribute("disabled", ""), y.required && T.setAttribute("required", ""), y.readOnly && T.setAttribute("readonly", "");
171
+ let e = y;
172
+ e.min !== void 0 && e.min !== "" && T.setAttribute("min", e.min), e.max !== void 0 && e.max !== "" && T.setAttribute("max", e.max), e.pattern !== void 0 && e.pattern !== "" && T.setAttribute("pattern", e.pattern);
173
+ let t = y.getAttribute("aria-invalid");
174
+ t !== null && T.setAttribute("aria-invalid", t);
175
+ }
176
+ if (g(y) || r(y, T, b, x), E && E(), y instanceof SVGElement && !g(y)) {
177
+ let e = [
178
+ "fill",
179
+ "stroke",
180
+ "stroke-width",
181
+ "stroke-dasharray",
182
+ "stroke-dashoffset",
183
+ "stroke-linecap",
184
+ "stroke-linejoin",
185
+ "stroke-miterlimit",
186
+ "opacity",
187
+ "fill-opacity",
188
+ "stroke-opacity",
189
+ "fill-rule",
190
+ "clip-rule",
191
+ "marker",
192
+ "marker-start",
193
+ "marker-mid",
194
+ "marker-end",
195
+ "visibility",
196
+ "display"
197
+ ];
198
+ try {
199
+ let t = window.getComputedStyle(y);
200
+ for (let n of e) {
201
+ let e = t.getPropertyValue(n);
202
+ e && T.style.setProperty(n, e);
203
+ }
204
+ } catch {}
205
+ }
206
+ if (y.shadowRoot) {
207
+ try {
208
+ let e = y.shadowRoot.querySelectorAll("slot");
209
+ for (let t of e) {
210
+ let e = [];
211
+ try {
212
+ e = t.assignedNodes?.({ flatten: !0 }) || t.assignedNodes?.() || [];
213
+ } catch {
214
+ e = t.assignedNodes?.() || [];
215
+ }
216
+ for (let t of e) S.add(t);
217
+ }
218
+ } catch {}
219
+ let e = p(b), t = `[data-sd="${e}"]`;
220
+ try {
221
+ T.setAttribute("data-sd", e);
222
+ } catch {}
223
+ let n = s(y.shadowRoot), r = h(n, t), o = i(y, a(n), t);
224
+ d(T, o + r, e);
225
+ let c = document.createDocumentFragment();
226
+ function l(e, t) {
227
+ if (e.nodeType === Node.ELEMENT_NODE && e.tagName === "STYLE") return t(null);
228
+ v(e, b, x).then((e) => {
229
+ t(e || null);
230
+ }).catch(() => {
231
+ t(null);
232
+ });
233
+ }
234
+ let f = await u(Array.from(y.shadowRoot.childNodes), l, x.fast);
235
+ c.append(...f.filter((e) => !!e)), T.appendChild(c);
236
+ }
237
+ if (y.tagName === "SLOT") {
238
+ let e = y.assignedNodes?.({ flatten: !0 }) || [], t = e.length > 0 ? e : Array.from(y.childNodes), n = document.createDocumentFragment();
239
+ function r(e, t) {
240
+ v(e, b, x).then((e) => {
241
+ e && f(e), t(e || null);
242
+ }).catch(() => {
243
+ t(null);
244
+ });
245
+ }
246
+ let i = await u(Array.from(t), r, x.fast);
247
+ return n.append(...i.filter((e) => !!e)), n;
248
+ }
249
+ function D(e, t) {
250
+ if (S.has(e)) return t(null);
251
+ v(e, b, x).then((e) => {
252
+ t(e || null);
253
+ }).catch(() => {
254
+ t(null);
255
+ });
256
+ }
257
+ let O = await u(Array.from(y.childNodes), D, x.fast);
258
+ if (T.append(...O.filter((e) => !!e)), C !== null && T instanceof HTMLSelectElement) {
259
+ T.value = C;
260
+ for (let e of T.options) e.value === C ? e.setAttribute("selected", "") : e.removeAttribute("selected");
261
+ }
262
+ return w !== null && T instanceof HTMLTextAreaElement && (T.textContent = w), T;
263
+ }
264
+ //#endregion
265
+ export { v as deepClone };
266
+ /* 独立思考,明辨是非 */
@@ -1,6 +1,6 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { normalizeCachePolicy as e } from "./cache.js";
3
- //#region utils/snapdom/core/context.js
3
+ //#region utils/snapdom/src/core/context.js
4
4
  function t(t = {}) {
5
5
  let n = t.format ?? "png";
6
6
  n === "jpg" && (n = "jpeg");
@@ -1,5 +1,5 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
2
- //#region utils/snapdom/core/plugins.js
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
+ //#region utils/snapdom/src/core/plugins.js
3
3
  var e = [];
4
4
  function t(e) {
5
5
  if (!e) return null;
@@ -1,4 +1,4 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { cache as e } from "./cache.js";
3
3
  import { generateCSSClasses as t, getStyle as n } from "../utils/css.js";
4
4
  import { debugWarn as r } from "../utils/debug.js";
@@ -10,7 +10,7 @@ import { inlineExternalDefsAndSymbols as s } from "../modules/svgDefs.js";
10
10
  import { resolveBlobUrlsInTree as c } from "../utils/clone.helpers.js";
11
11
  import { forceContentVisibility as l, stabilizeLayout as u } from "../utils/prepare.helpers.js";
12
12
  import { deepClone as d } from "./clone.js";
13
- //#region utils/snapdom/core/prepare.js
13
+ //#region utils/snapdom/src/core/prepare.js
14
14
  async function f(f, p = {}) {
15
15
  let m = {
16
16
  styleMap: e.session.styleMap,
@@ -1,8 +1,8 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { isIOS as e } from "../utils/browser.js";
3
3
  import { toCanvas as t } from "./toCanvas.js";
4
4
  import { toBlob as n } from "./toBlob.js";
5
- //#region utils/snapdom/exporters/download.js
5
+ //#region utils/snapdom/src/exporters/download.js
6
6
  async function r(e, t) {
7
7
  let n = new File([e], t, { type: e.type });
8
8
  if (!navigator.canShare?.({ files: [n] })) return !1;
@@ -1,6 +1,6 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { toCanvas as e } from "./toCanvas.js";
3
- //#region utils/snapdom/exporters/toBlob.js
3
+ //#region utils/snapdom/src/exporters/toBlob.js
4
4
  async function t(t, n) {
5
5
  let r = n.type;
6
6
  if (r === "svg") {
@@ -1,6 +1,6 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { isSafari as e } from "../utils/browser.js";
3
- //#region utils/snapdom/exporters/toCanvas.js
3
+ //#region utils/snapdom/src/exporters/toCanvas.js
4
4
  function t(e) {
5
5
  return typeof e == "string" && /^data:image\/svg\+xml/i.test(e);
6
6
  }
@@ -63,25 +63,34 @@ function l(i) {
63
63
  return i;
64
64
  }
65
65
  }
66
- async function u(e, t) {
67
- let { width: n, height: r, scale: i = 1, dpr: a = 1, meta: o = {}, backgroundColor: s } = t;
68
- e = l(e);
69
- let c = new Image();
70
- c.loading = "eager", c.decoding = "sync", c.crossOrigin = "anonymous", c.src = e, await c.decode();
71
- let u = c.naturalWidth, d = c.naturalHeight, f = Number.isFinite(o.w0) ? o.w0 : u, p = Number.isFinite(o.h0) ? o.h0 : d, m, h, g = Number.isFinite(n), _ = Number.isFinite(r);
72
- if (g && _) m = Math.max(1, n), h = Math.max(1, r);
73
- else if (g) {
74
- let e = n / Math.max(1, f);
75
- m = n, h = p * e;
76
- } else if (_) {
66
+ async function u(t, n) {
67
+ let { width: r, height: i, scale: a = 1, dpr: o = 1, meta: s = {}, backgroundColor: c } = n;
68
+ t = l(t);
69
+ let u = new Image();
70
+ if (u.loading = "eager", u.decoding = "sync", u.crossOrigin = "anonymous", u.src = t, await u.decode(), e()) {
71
+ u.style.cssText = "position:fixed;left:-99999px;top:-99999px;pointer-events:none", document.body.appendChild(u);
72
+ try {
73
+ await new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(e)));
74
+ } finally {
75
+ try {
76
+ u.remove();
77
+ } catch {}
78
+ }
79
+ }
80
+ let d = u.naturalWidth, f = u.naturalHeight, p = Number.isFinite(s.w0) ? s.w0 : d, m = Number.isFinite(s.h0) ? s.h0 : f, h, g, _ = Number.isFinite(r), v = Number.isFinite(i);
81
+ if (_ && v) h = Math.max(1, r), g = Math.max(1, i);
82
+ else if (_) {
77
83
  let e = r / Math.max(1, p);
78
- h = r, m = f * e;
79
- } else m = u, h = d;
80
- m *= i, h *= i;
81
- let v = document.createElement("canvas");
82
- v.width = m * a, v.height = h * a, v.style.width = `${m}px`, v.style.height = `${h}px`;
83
- let y = v.getContext("2d");
84
- return a !== 1 && y.scale(a, a), s && (y.save(), y.fillStyle = s, y.fillRect(0, 0, m, h), y.restore()), y.drawImage(c, 0, 0, m, h), v;
84
+ h = r, g = m * e;
85
+ } else if (v) {
86
+ let e = i / Math.max(1, m);
87
+ g = i, h = p * e;
88
+ } else h = d, g = f;
89
+ h *= a, g *= a;
90
+ let y = document.createElement("canvas");
91
+ y.width = h * o, y.height = g * o, y.style.width = `${h}px`, y.style.height = `${g}px`;
92
+ let b = y.getContext("2d");
93
+ return o !== 1 && b.scale(o, o), c && (b.save(), b.fillStyle = c, b.fillRect(0, 0, h, g), b.restore()), b.drawImage(u, 0, 0, h, g), y;
85
94
  }
86
95
  //#endregion
87
96
  export { u as toCanvas };
@@ -1,9 +1,9 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { isSafari as e } from "../utils/browser.js";
3
3
  import { debugWarn as t } from "../utils/debug.js";
4
4
  import "../utils/index.js";
5
5
  import { rasterize as n } from "../modules/rasterize.js";
6
- //#region utils/snapdom/exporters/toImg.js
6
+ //#region utils/snapdom/src/exporters/toImg.js
7
7
  async function r(r, i) {
8
8
  let { scale: a = 1, width: o, height: s, meta: c = {} } = i, l = Number.isFinite(o), u = Number.isFinite(s), d = Number.isFinite(a) && a !== 1 || l || u;
9
9
  if (e() && d) return await n(r, {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
+ import { preCache as e } from "./api/preCache.js";
3
+ import t from "./api/snapdom.js";
4
+ //#region utils/snapdom/src/index.browser.js
5
+ typeof window < "u" && (window.snapdom = t, window.preCache = e);
6
+ //#endregion
7
+ /* 独立思考,明辨是非 */
@@ -0,0 +1,2 @@
1
+ export { preCache } from "./api/preCache.js";
2
+ export { snapdom } from "./api/snapdom.js";
@@ -0,0 +1,4 @@
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
+ import "./api/preCache.js";
3
+ import "./api/snapdom.js";
4
+ /* 独立思考,明辨是非 */
@@ -1,3 +1,4 @@
1
+ export function isInSvgTemplate(el: any): boolean;
1
2
  /**
2
3
  * General: resuelve var() en estilos inline/atributos. Además, si no hay var()
3
4
  * pero el valor computado de KEY_PROPS difiere del baseline, inlina ese valor.
@@ -0,0 +1,101 @@
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
+ //#region utils/snapdom/src/modules/CSSVar.js
3
+ var e = [
4
+ "fill",
5
+ "stroke",
6
+ "color",
7
+ "background-color",
8
+ "stop-color"
9
+ ], t = new Set([
10
+ "symbol",
11
+ "defs",
12
+ "pattern",
13
+ "mask",
14
+ "clipPath",
15
+ "marker",
16
+ "linearGradient",
17
+ "radialGradient",
18
+ "filter"
19
+ ]);
20
+ function n(e) {
21
+ let n = e;
22
+ for (; n && n.nodeType === 1;) {
23
+ if (n.namespaceURI === "http://www.w3.org/2000/svg" && t.has(n.localName)) return !0;
24
+ n = n.parentNode;
25
+ }
26
+ return !1;
27
+ }
28
+ var r = /* @__PURE__ */ new Map();
29
+ function i(t, n) {
30
+ let i = n + "::" + t.toLowerCase(), a = r.get(i);
31
+ if (a) return a;
32
+ let o = document, s = n === "http://www.w3.org/2000/svg" ? o.createElementNS(n, t) : o.createElement(t), c = o.createElement("div");
33
+ c.style.cssText = "position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;", c.appendChild(s), o.documentElement.appendChild(c);
34
+ let l = getComputedStyle(s), u = {};
35
+ for (let t of e) u[t] = l.getPropertyValue(t) || "";
36
+ return c.remove(), r.set(i, u), u;
37
+ }
38
+ function a(t, r) {
39
+ if (!(t instanceof Element) || !(r instanceof Element) || n(t)) return;
40
+ let a = t.getAttribute?.("style"), o = !!(a && a.includes("var("));
41
+ if (!o && t.attributes?.length) {
42
+ let e = t.attributes;
43
+ for (let t = 0; t < e.length; t++) {
44
+ let n = e[t];
45
+ if (n && typeof n.value == "string" && n.value.includes("var(")) {
46
+ o = !0;
47
+ break;
48
+ }
49
+ }
50
+ }
51
+ let s = null;
52
+ if (o) try {
53
+ s = getComputedStyle(t);
54
+ } catch {}
55
+ if (o) {
56
+ let e = t.style;
57
+ if (e && e.length) {
58
+ let t = /* @__PURE__ */ new Set();
59
+ for (let n = 0; n < e.length; n++) {
60
+ let i = e[n];
61
+ if (t.has(i)) continue;
62
+ t.add(i);
63
+ let a = e.getPropertyValue(i);
64
+ if (!a || !a.includes("var(")) continue;
65
+ let o = s && s.getPropertyValue(i);
66
+ if (o) try {
67
+ r.style.setProperty(i, o.trim(), e.getPropertyPriority(i));
68
+ } catch {}
69
+ }
70
+ }
71
+ }
72
+ if (o && t.attributes?.length) {
73
+ let e = t.attributes;
74
+ for (let t = 0; t < e.length; t++) {
75
+ let n = e[t];
76
+ if (!n || typeof n.value != "string" || !n.value.includes("var(")) continue;
77
+ let i = n.name, a = s && s.getPropertyValue(i);
78
+ if (a) try {
79
+ r.style.setProperty(i, a.trim());
80
+ } catch {}
81
+ }
82
+ }
83
+ if (!o) {
84
+ if (!s) try {
85
+ s = getComputedStyle(t);
86
+ } catch {
87
+ s = null;
88
+ }
89
+ if (!s) return;
90
+ let n = t.namespaceURI || "html", a = i(t.tagName, n);
91
+ for (let t of e) {
92
+ let e = s.getPropertyValue(t) || "", n = a[t] || "";
93
+ if (e && e !== n) try {
94
+ r.style.setProperty(t, e.trim());
95
+ } catch {}
96
+ }
97
+ }
98
+ }
99
+ //#endregion
100
+ export { n as isInSvgTemplate, a as resolveCSSVars };
101
+ /* 独立思考,明辨是非 */
@@ -1,8 +1,8 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
2
  import { getStyle as e, splitBackgroundImage as t } from "../utils/css.js";
3
3
  import { inlineSingleBackgroundEntry as n } from "../utils/image.js";
4
4
  import "../utils/index.js";
5
- //#region utils/snapdom/modules/background.js
5
+ //#region utils/snapdom/src/modules/background.js
6
6
  async function r(r, i, a, o = {}) {
7
7
  let s = [[r, i]], c = [
8
8
  "background-image",
@@ -20,9 +20,12 @@ async function r(r, i, a, o = {}) {
20
20
  "mask-position",
21
21
  "mask-size",
22
22
  "mask-repeat",
23
+ "mask-mode",
24
+ "mask-composite",
23
25
  "-webkit-mask-position",
24
26
  "-webkit-mask-size",
25
27
  "-webkit-mask-repeat",
28
+ "-webkit-mask-composite",
26
29
  "mask-origin",
27
30
  "mask-clip",
28
31
  "-webkit-mask-origin",
@@ -1,5 +1,5 @@
1
- /* 潘启宝 2026-04-23 09:23:17 星期四 */
2
- //#region utils/snapdom/modules/changeCSS.js
1
+ /* 潘启宝 2026-05-15 17:45:33 星期五 */
2
+ //#region utils/snapdom/src/modules/changeCSS.js
3
3
  function e(e, i) {
4
4
  if (!e || !i) return;
5
5
  let a = e.scrollTop || 0;
@@ -31,7 +31,11 @@ export function buildCounterContext(root: Document | Element): {
31
31
  };
32
32
  /**
33
33
  * Resolves counter()/counters() calls inside a content string for a specific node,
34
- * returning a plain string suitable for textContent. Also strips double-quote tokens.
34
+ * returning the content with counter() expanded but quoted-string tokens preserved.
35
+ * The caller is responsible for joining tokens (see pseudo.js collapseCssContent)
36
+ * or stripping quotes (see resolvePseudoContent below) — keeping quotes here lets
37
+ * collapseCssContent tokenize properly so source whitespace between adjacent
38
+ * tokens (e.g. `counter(x) ")"`) doesn't leak into the rendered text.
35
39
  *
36
40
  * @param {string} raw
37
41
  * @param {Element} node
@@ -40,7 +44,7 @@ export function buildCounterContext(root: Document | Element): {
40
44
  export function resolveCountersInContent(raw: string, node: Element, ctx: {
41
45
  get(node: Element, name: string): number;
42
46
  getStack(node: Element, name: string): number[];
43
- }): any;
47
+ }): string;
44
48
  /**
45
49
  * Create a derived counter context that applies a pseudo's counter-reset /
46
50
  * counter-increment *for this node only*, before resolving content.