@unicom-cloud/utils 0.1.41 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.virtual/_rolldown/runtime.js +1 -1
- package/.vite/manifest.json +355 -312
- package/array/index.js +5 -4
- package/assert/index.js +10 -10
- package/case-name/index.js +1 -1
- package/class-name/index.js +1 -1
- package/clipboard-copy/index.js +1 -1
- package/constant/address.js +1 -1
- package/constant/chineseCharacters.js +1 -1
- package/constant/constellations.js +1 -1
- package/constant/domain.js +1 -1
- package/constant/identity.js +1 -1
- package/constant/index.js +1 -1
- package/constant/keyboardCode.js +1 -1
- package/constant/licensePlate.js +1 -1
- package/constant/name.js +1 -1
- package/constant/platform.d.ts +10 -3
- package/constant/platform.js +24 -18
- package/constant/protocol.js +1 -1
- package/constant/string.js +1 -1
- package/constant/ui.js +1 -1
- package/content-disposition/index.js +23 -23
- package/cookie/api.js +24 -23
- package/cookie/assign.js +1 -1
- package/cookie/converter.js +1 -1
- package/cookie/index.js +1 -1
- package/date/convertTime.js +10 -9
- package/date/convertToDuration.js +1 -1
- package/date/index.js +1 -1
- package/decimal/decimal.js +410 -408
- package/decimal/index.js +1 -1
- package/dom-helpers/activeElement.js +1 -1
- package/dom-helpers/addClass.js +2 -2
- package/dom-helpers/addEventListener.js +1 -1
- package/dom-helpers/animate.js +1 -1
- package/dom-helpers/animationFrame.js +1 -1
- package/dom-helpers/attribute.js +7 -6
- package/dom-helpers/camelize.js +1 -1
- package/dom-helpers/camelizeStyle.js +1 -1
- package/dom-helpers/canUseDOM.js +4 -3
- package/dom-helpers/childElements.js +1 -1
- package/dom-helpers/childNodes.js +1 -1
- package/dom-helpers/clear.js +1 -1
- package/dom-helpers/closest.js +1 -1
- package/dom-helpers/collectElements.js +1 -1
- package/dom-helpers/collectSiblings.js +1 -1
- package/dom-helpers/contains.js +1 -1
- package/dom-helpers/css.js +1 -1
- package/dom-helpers/filterEventHandler.js +1 -1
- package/dom-helpers/getComputedStyle.js +1 -1
- package/dom-helpers/getElementCoordinates.js +1 -1
- package/dom-helpers/getScrollAccessor.js +1 -1
- package/dom-helpers/hasClass.js +1 -1
- package/dom-helpers/height.js +1 -1
- package/dom-helpers/hyphenate.js +1 -1
- package/dom-helpers/hyphenateStyle.js +1 -1
- package/dom-helpers/index.js +1 -1
- package/dom-helpers/insertAfter.js +2 -2
- package/dom-helpers/isDocument.js +1 -1
- package/dom-helpers/isInput.js +1 -1
- package/dom-helpers/isTransform.js +1 -1
- package/dom-helpers/isVisible.js +1 -1
- package/dom-helpers/isWindow.js +1 -1
- package/dom-helpers/listen.js +1 -1
- package/dom-helpers/matches.js +1 -1
- package/dom-helpers/nextUntil.js +1 -1
- package/dom-helpers/offset.js +16 -15
- package/dom-helpers/offsetParent.js +2 -2
- package/dom-helpers/ownerDocument.js +2 -2
- package/dom-helpers/ownerWindow.js +2 -3
- package/dom-helpers/parents.js +1 -1
- package/dom-helpers/position.js +2 -2
- package/dom-helpers/prepend.js +1 -1
- package/dom-helpers/querySelectorAll.js +1 -1
- package/dom-helpers/reflow.js +1 -1
- package/dom-helpers/remove.js +2 -2
- package/dom-helpers/removeClass.js +2 -2
- package/dom-helpers/removeEventListener.js +1 -1
- package/dom-helpers/scrollLeft.js +1 -1
- package/dom-helpers/scrollParent.js +1 -1
- package/dom-helpers/scrollTo.js +1 -1
- package/dom-helpers/scrollTop.js +1 -1
- package/dom-helpers/scrollbarSize.js +1 -1
- package/dom-helpers/siblings.js +2 -2
- package/dom-helpers/text.js +1 -1
- package/dom-helpers/toggleClass.js +1 -1
- package/dom-helpers/transitionEnd.js +1 -1
- package/dom-helpers/triggerEvent.js +1 -1
- package/dom-helpers/types.js +1 -1
- package/dom-helpers/width.js +1 -1
- package/emitter/index.js +1 -1
- package/emoji/emoji.js +2 -2
- package/emoji/emojis.js +1 -1
- package/emoji/index.js +1 -1
- package/escape/index.js +1 -1
- package/file/fileRead.js +6 -6
- package/file/fileToDataURL.js +1 -1
- package/file/index.js +1 -1
- package/file/saveAs.js +11 -11
- package/filesize/index.d.ts +4 -2
- package/filesize/index.js +5 -3
- package/filesize/{constants.js → src/constants.js} +2 -2
- package/filesize/{filesize.d.ts → src/filesize.d.ts} +1 -1
- package/filesize/src/filesize.js +52 -0
- package/filesize/src/helpers.d.ts +119 -0
- package/filesize/src/helpers.js +118 -0
- package/function/index.js +1 -1
- package/idb/async-iterators.js +1 -1
- package/idb/database-extras.js +1 -1
- package/idb/entry.js +1 -1
- package/idb/index-.js +1 -1
- package/idb/index.js +1 -1
- package/idb/util.js +1 -1
- package/idb/wrap-idb-value.js +1 -1
- package/index.js +1 -1
- package/invariant/index.js +1 -1
- package/is/index.d.ts +9 -2
- package/is/index.js +116 -97
- package/is/lib/isAscii.js +1 -1
- package/is/lib/isBase64.js +1 -1
- package/is/lib/isChinese.js +1 -1
- package/is/lib/isDataURI.js +1 -1
- package/is/lib/isEmail.js +12 -12
- package/is/lib/isFQDN.js +1 -1
- package/is/lib/isFullWidth.js +1 -1
- package/is/lib/isHSL.js +1 -1
- package/is/lib/isHalfWidth.js +1 -1
- package/is/lib/isHash.js +1 -1
- package/is/lib/isHexColor.js +1 -1
- package/is/lib/isIMEI.js +1 -1
- package/is/lib/isIP.js +1 -1
- package/is/lib/isIPRange.js +6 -6
- package/is/lib/isIdentityCard.js +9 -8
- package/is/lib/isJWT.js +5 -5
- package/is/lib/isMACAddress.js +1 -1
- package/is/lib/isMD5.js +1 -1
- package/is/lib/isMimeType.js +1 -1
- package/is/lib/isMobilePhone.js +14 -13
- package/is/lib/isPort.js +1 -1
- package/is/lib/isRgbColor.js +1 -1
- package/is/lib/isSemVer.js +1 -1
- package/is/lib/isSlug.js +1 -1
- package/is/lib/isStrongPassword.js +1 -1
- package/is/lib/isURL.js +36 -35
- package/is/lib/isUUID.js +1 -1
- package/is/lib/isVariableWidth.js +5 -5
- package/lodash/_DataView.js +1 -1
- package/lodash/_Hash.js +1 -1
- package/lodash/_LazyWrapper.js +1 -1
- package/lodash/_ListCache.js +1 -1
- package/lodash/_LodashWrapper.js +1 -1
- package/lodash/_Map.js +1 -1
- package/lodash/_MapCache.js +1 -1
- package/lodash/_Promise.js +1 -1
- package/lodash/_Set.js +1 -1
- package/lodash/_SetCache.js +1 -1
- package/lodash/_Stack.js +3 -2
- package/lodash/_Symbol.js +1 -1
- package/lodash/_Uint8Array.js +1 -1
- package/lodash/_WeakMap.js +1 -1
- package/lodash/_addMapEntry.js +1 -1
- package/lodash/_addSetEntry.js +1 -1
- package/lodash/_apply.js +1 -1
- package/lodash/_arrayAggregator.js +1 -1
- package/lodash/_arrayEach.js +1 -1
- package/lodash/_arrayEachRight.js +1 -1
- package/lodash/_arrayEvery.js +1 -1
- package/lodash/_arrayFilter.js +1 -1
- package/lodash/_arrayIncludes.js +1 -1
- package/lodash/_arrayIncludesWith.js +1 -1
- package/lodash/_arrayLikeKeys.js +1 -1
- package/lodash/_arrayMap.js +1 -1
- package/lodash/_arrayPush.js +1 -1
- package/lodash/_arrayReduce.js +1 -1
- package/lodash/_arrayReduceRight.js +1 -1
- package/lodash/_arraySample.js +1 -1
- package/lodash/_arraySampleSize.js +1 -1
- package/lodash/_arrayShuffle.js +1 -1
- package/lodash/_arraySome.js +1 -1
- package/lodash/_asciiSize.js +1 -1
- package/lodash/_asciiToArray.js +1 -1
- package/lodash/_asciiWords.js +1 -1
- package/lodash/_assignMergeValue.js +1 -1
- package/lodash/_assignValue.js +1 -1
- package/lodash/_assocIndexOf.js +1 -1
- package/lodash/_baseAggregator.js +1 -1
- package/lodash/_baseAssign.js +1 -1
- package/lodash/_baseAssignIn.js +1 -1
- package/lodash/_baseAssignValue.js +1 -1
- package/lodash/_baseAt.js +1 -1
- package/lodash/_baseClamp.js +1 -1
- package/lodash/_baseClone.js +1 -1
- package/lodash/_baseConforms.js +1 -1
- package/lodash/_baseConformsTo.js +1 -1
- package/lodash/_baseCreate.js +1 -1
- package/lodash/_baseDelay.js +1 -1
- package/lodash/_baseDifference.js +1 -1
- package/lodash/_baseEach.js +1 -1
- package/lodash/_baseEachRight.js +1 -1
- package/lodash/_baseEvery.js +1 -1
- package/lodash/_baseExtremum.js +1 -1
- package/lodash/_baseFill.js +1 -1
- package/lodash/_baseFilter.js +1 -1
- package/lodash/_baseFindIndex.js +1 -1
- package/lodash/_baseFindKey.js +1 -1
- package/lodash/_baseFlatten.js +1 -1
- package/lodash/_baseFor.js +1 -1
- package/lodash/_baseForOwn.js +1 -1
- package/lodash/_baseForOwnRight.js +1 -1
- package/lodash/_baseForRight.js +1 -1
- package/lodash/_baseFunctions.js +1 -1
- package/lodash/_baseGet.js +1 -1
- package/lodash/_baseGetAllKeys.js +1 -1
- package/lodash/_baseGetTag.js +1 -1
- package/lodash/_baseGt.js +1 -1
- package/lodash/_baseHas.js +1 -1
- package/lodash/_baseHasIn.js +1 -1
- package/lodash/_baseInRange.js +1 -1
- package/lodash/_baseIndexOf.js +1 -1
- package/lodash/_baseIndexOfWith.js +1 -1
- package/lodash/_baseIntersection.js +1 -1
- package/lodash/_baseInverter.js +1 -1
- package/lodash/_baseInvoke.js +1 -1
- package/lodash/_baseIsArguments.js +1 -1
- package/lodash/_baseIsArrayBuffer.js +1 -1
- package/lodash/_baseIsDate.js +1 -1
- package/lodash/_baseIsEqual.js +1 -1
- package/lodash/_baseIsEqualDeep.js +1 -1
- package/lodash/_baseIsMap.js +1 -1
- package/lodash/_baseIsMatch.js +1 -1
- package/lodash/_baseIsNaN.js +1 -1
- package/lodash/_baseIsNative.js +1 -1
- package/lodash/_baseIsRegExp.js +1 -1
- package/lodash/_baseIsSet.js +1 -1
- package/lodash/_baseIsTypedArray.js +1 -1
- package/lodash/_baseIteratee.js +1 -1
- package/lodash/_baseKeys.js +1 -1
- package/lodash/_baseKeysIn.js +1 -1
- package/lodash/_baseLodash.js +1 -1
- package/lodash/_baseLt.js +1 -1
- package/lodash/_baseMap.js +1 -1
- package/lodash/_baseMatches.js +1 -1
- package/lodash/_baseMatchesProperty.js +1 -1
- package/lodash/_baseMean.js +1 -1
- package/lodash/_baseMerge.js +1 -1
- package/lodash/_baseMergeDeep.js +1 -1
- package/lodash/_baseNth.js +1 -1
- package/lodash/_baseOrderBy.js +1 -1
- package/lodash/_basePick.js +1 -1
- package/lodash/_basePickBy.js +1 -1
- package/lodash/_baseProperty.js +1 -1
- package/lodash/_basePropertyDeep.js +1 -1
- package/lodash/_basePropertyOf.js +1 -1
- package/lodash/_basePullAll.js +1 -1
- package/lodash/_basePullAt.js +1 -1
- package/lodash/_baseRandom.js +1 -1
- package/lodash/_baseRange.js +1 -1
- package/lodash/_baseReduce.js +1 -1
- package/lodash/_baseRepeat.js +1 -1
- package/lodash/_baseRest.js +1 -1
- package/lodash/_baseSample.js +1 -1
- package/lodash/_baseSampleSize.js +1 -1
- package/lodash/_baseSet.js +1 -1
- package/lodash/_baseSetData.js +1 -1
- package/lodash/_baseSetToString.js +1 -1
- package/lodash/_baseShuffle.js +1 -1
- package/lodash/_baseSlice.js +1 -1
- package/lodash/_baseSome.js +1 -1
- package/lodash/_baseSortBy.js +1 -1
- package/lodash/_baseSortedIndex.js +1 -1
- package/lodash/_baseSortedIndexBy.js +1 -1
- package/lodash/_baseSortedUniq.js +1 -1
- package/lodash/_baseSum.js +1 -1
- package/lodash/_baseTimes.js +1 -1
- package/lodash/_baseToNumber.js +1 -1
- package/lodash/_baseToPairs.js +1 -1
- package/lodash/_baseToString.js +1 -1
- package/lodash/_baseTrim.js +1 -1
- package/lodash/_baseUnary.js +1 -1
- package/lodash/_baseUniq.js +1 -1
- package/lodash/_baseUnset.js +1 -1
- package/lodash/_baseUpdate.js +1 -1
- package/lodash/_baseValues.js +1 -1
- package/lodash/_baseWhile.js +1 -1
- package/lodash/_baseWrapperValue.js +1 -1
- package/lodash/_baseXor.js +1 -1
- package/lodash/_baseZipObject.js +1 -1
- package/lodash/_cacheHas.js +1 -1
- package/lodash/_castArrayLikeObject.js +1 -1
- package/lodash/_castFunction.js +1 -1
- package/lodash/_castPath.js +1 -1
- package/lodash/_castRest.js +1 -1
- package/lodash/_castSlice.js +1 -1
- package/lodash/_charsEndIndex.js +1 -1
- package/lodash/_charsStartIndex.js +1 -1
- package/lodash/_cloneArrayBuffer.js +1 -1
- package/lodash/_cloneBuffer.js +1 -1
- package/lodash/_cloneDataView.js +1 -1
- package/lodash/_cloneMap.js +1 -1
- package/lodash/_cloneRegExp.js +1 -1
- package/lodash/_cloneSet.js +1 -1
- package/lodash/_cloneSymbol.js +1 -1
- package/lodash/_cloneTypedArray.js +1 -1
- package/lodash/_compareAscending.js +1 -1
- package/lodash/_compareMultiple.js +1 -1
- package/lodash/_composeArgs.js +1 -1
- package/lodash/_composeArgsRight.js +1 -1
- package/lodash/_copyArray.js +1 -1
- package/lodash/_copyObject.js +1 -1
- package/lodash/_copySymbols.js +1 -1
- package/lodash/_copySymbolsIn.js +1 -1
- package/lodash/_coreJsData.js +1 -1
- package/lodash/_countHolders.js +1 -1
- package/lodash/_createAggregator.js +1 -1
- package/lodash/_createAssigner.js +1 -1
- package/lodash/_createBaseEach.js +1 -1
- package/lodash/_createBaseFor.js +1 -1
- package/lodash/_createBind.js +1 -1
- package/lodash/_createCaseFirst.js +1 -1
- package/lodash/_createCompounder.js +1 -1
- package/lodash/_createCtor.js +1 -1
- package/lodash/_createCurry.js +1 -1
- package/lodash/_createFind.js +1 -1
- package/lodash/_createFlow.js +1 -1
- package/lodash/_createHybrid.js +1 -1
- package/lodash/_createInverter.js +1 -1
- package/lodash/_createMathOperation.js +1 -1
- package/lodash/_createOver.js +1 -1
- package/lodash/_createPadding.js +1 -1
- package/lodash/_createPartial.js +1 -1
- package/lodash/_createRange.js +1 -1
- package/lodash/_createRecurry.js +1 -1
- package/lodash/_createRelationalOperation.js +1 -1
- package/lodash/_createRound.js +1 -1
- package/lodash/_createSet.js +1 -1
- package/lodash/_createToPairs.js +1 -1
- package/lodash/_createWrap.js +1 -1
- package/lodash/_customDefaultsAssignIn.js +1 -1
- package/lodash/_customDefaultsMerge.js +1 -1
- package/lodash/_customOmitClone.js +1 -1
- package/lodash/_deburrLetter.js +1 -1
- package/lodash/_defineProperty.js +1 -1
- package/lodash/_equalArrays.js +1 -1
- package/lodash/_equalByTag.js +1 -1
- package/lodash/_equalObjects.js +1 -1
- package/lodash/_escapeHtmlChar.js +1 -1
- package/lodash/_escapeStringChar.js +1 -1
- package/lodash/_flatRest.js +1 -1
- package/lodash/_freeGlobal.js +1 -1
- package/lodash/_getAllKeys.js +1 -1
- package/lodash/_getAllKeysIn.js +1 -1
- package/lodash/_getData.js +1 -1
- package/lodash/_getFuncName.js +1 -1
- package/lodash/_getHolder.js +1 -1
- package/lodash/_getMapData.js +1 -1
- package/lodash/_getMatchData.js +1 -1
- package/lodash/_getNative.js +1 -1
- package/lodash/_getPrototype.js +1 -1
- package/lodash/_getRawTag.js +1 -1
- package/lodash/_getSymbols.js +1 -1
- package/lodash/_getSymbolsIn.js +1 -1
- package/lodash/_getTag.js +1 -1
- package/lodash/_getValue.js +1 -1
- package/lodash/_getView.js +1 -1
- package/lodash/_getWrapDetails.js +1 -1
- package/lodash/_hasPath.js +1 -1
- package/lodash/_hasUnicode.js +1 -1
- package/lodash/_hasUnicodeWord.js +1 -1
- package/lodash/_hashClear.js +1 -1
- package/lodash/_hashDelete.js +1 -1
- package/lodash/_hashGet.js +1 -1
- package/lodash/_hashHas.js +1 -1
- package/lodash/_hashSet.js +1 -1
- package/lodash/_initCloneArray.js +1 -1
- package/lodash/_initCloneByTag.js +1 -1
- package/lodash/_initCloneObject.js +1 -1
- package/lodash/_insertWrapDetails.js +1 -1
- package/lodash/_isFlattenable.js +1 -1
- package/lodash/_isIndex.js +1 -1
- package/lodash/_isIterateeCall.js +1 -1
- package/lodash/_isKey.js +1 -1
- package/lodash/_isKeyable.js +1 -1
- package/lodash/_isLaziable.js +1 -1
- package/lodash/_isMaskable.js +1 -1
- package/lodash/_isMasked.js +1 -1
- package/lodash/_isPrototype.js +1 -1
- package/lodash/_isStrictComparable.js +1 -1
- package/lodash/_iteratorToArray.js +1 -1
- package/lodash/_lazyClone.js +1 -1
- package/lodash/_lazyReverse.js +1 -1
- package/lodash/_lazyValue.js +1 -1
- package/lodash/_listCacheClear.js +1 -1
- package/lodash/_listCacheDelete.js +1 -1
- package/lodash/_listCacheGet.js +1 -1
- package/lodash/_listCacheHas.js +1 -1
- package/lodash/_listCacheSet.js +1 -1
- package/lodash/_mapCacheClear.js +1 -1
- package/lodash/_mapCacheDelete.js +1 -1
- package/lodash/_mapCacheGet.js +1 -1
- package/lodash/_mapCacheHas.js +1 -1
- package/lodash/_mapCacheSet.js +1 -1
- package/lodash/_mapToArray.js +1 -1
- package/lodash/_matchesStrictComparable.js +1 -1
- package/lodash/_memoizeCapped.js +1 -1
- package/lodash/_mergeData.js +1 -1
- package/lodash/_metaMap.js +1 -1
- package/lodash/_nativeCreate.js +1 -1
- package/lodash/_nativeKeys.js +1 -1
- package/lodash/_nativeKeysIn.js +1 -1
- package/lodash/_nodeUtil.js +1 -1
- package/lodash/_objectToString.js +1 -1
- package/lodash/_overArg.js +1 -1
- package/lodash/_overRest.js +1 -1
- package/lodash/_parent.js +1 -1
- package/lodash/_reEscape.js +1 -1
- package/lodash/_reEvaluate.js +1 -1
- package/lodash/_reInterpolate.js +1 -1
- package/lodash/_realNames.js +1 -1
- package/lodash/_reorder.js +1 -1
- package/lodash/_replaceHolders.js +1 -1
- package/lodash/_root.js +1 -1
- package/lodash/_safeGet.js +1 -1
- package/lodash/_setCacheAdd.js +1 -1
- package/lodash/_setCacheHas.js +1 -1
- package/lodash/_setData.js +1 -1
- package/lodash/_setToArray.js +1 -1
- package/lodash/_setToPairs.js +1 -1
- package/lodash/_setToString.js +1 -1
- package/lodash/_setWrapToString.js +1 -1
- package/lodash/_shortOut.js +1 -1
- package/lodash/_shuffleSelf.js +1 -1
- package/lodash/_stackClear.js +1 -1
- package/lodash/_stackDelete.js +1 -1
- package/lodash/_stackGet.js +1 -1
- package/lodash/_stackHas.js +1 -1
- package/lodash/_stackSet.js +1 -1
- package/lodash/_strictIndexOf.js +1 -1
- package/lodash/_strictLastIndexOf.js +1 -1
- package/lodash/_stringSize.js +1 -1
- package/lodash/_stringToArray.js +1 -1
- package/lodash/_stringToPath.js +1 -1
- package/lodash/_toKey.js +1 -1
- package/lodash/_toSource.js +1 -1
- package/lodash/_trimmedEndIndex.js +1 -1
- package/lodash/_unescapeHtmlChar.js +1 -1
- package/lodash/_unicodeSize.js +1 -1
- package/lodash/_unicodeToArray.js +1 -1
- package/lodash/_unicodeWords.js +1 -1
- package/lodash/_updateWrapDetails.js +1 -1
- package/lodash/_wrapperClone.js +1 -1
- package/lodash/add.js +1 -1
- package/lodash/after.js +1 -1
- package/lodash/array.default.js +1 -1
- package/lodash/array.js +1 -1
- package/lodash/ary.js +1 -1
- package/lodash/assign.js +1 -1
- package/lodash/assignIn.js +1 -1
- package/lodash/assignInWith.js +1 -1
- package/lodash/assignWith.js +1 -1
- package/lodash/at.js +1 -1
- package/lodash/attempt.js +1 -1
- package/lodash/before.js +1 -1
- package/lodash/bind.js +1 -1
- package/lodash/bindAll.js +1 -1
- package/lodash/bindKey.js +1 -1
- package/lodash/camelCase.js +1 -1
- package/lodash/capitalize.js +1 -1
- package/lodash/castArray.js +1 -1
- package/lodash/ceil.js +1 -1
- package/lodash/chain.js +1 -1
- package/lodash/chunk.js +1 -1
- package/lodash/clamp.js +1 -1
- package/lodash/clone.js +1 -1
- package/lodash/cloneDeep.js +1 -1
- package/lodash/cloneDeepWith.js +1 -1
- package/lodash/cloneWith.js +1 -1
- package/lodash/collection.default.js +1 -1
- package/lodash/collection.js +1 -1
- package/lodash/commit.js +1 -1
- package/lodash/compact.js +1 -1
- package/lodash/concat.js +1 -1
- package/lodash/cond.js +1 -1
- package/lodash/conforms.js +1 -1
- package/lodash/conformsTo.js +1 -1
- package/lodash/constant.js +1 -1
- package/lodash/countBy.js +1 -1
- package/lodash/create.js +1 -1
- package/lodash/curry.js +1 -1
- package/lodash/curryRight.js +1 -1
- package/lodash/date.default.js +1 -1
- package/lodash/date.js +1 -1
- package/lodash/debounce.js +1 -1
- package/lodash/deburr.js +1 -1
- package/lodash/defaultTo.js +1 -1
- package/lodash/defaults.js +1 -1
- package/lodash/defaultsDeep.js +1 -1
- package/lodash/defer.js +1 -1
- package/lodash/delay.js +1 -1
- package/lodash/difference.js +1 -1
- package/lodash/differenceBy.js +1 -1
- package/lodash/differenceWith.js +1 -1
- package/lodash/divide.js +1 -1
- package/lodash/drop.js +1 -1
- package/lodash/dropRight.js +1 -1
- package/lodash/dropRightWhile.js +1 -1
- package/lodash/dropWhile.js +1 -1
- package/lodash/each.js +1 -1
- package/lodash/eachRight.js +1 -1
- package/lodash/endsWith.js +1 -1
- package/lodash/entries.js +1 -1
- package/lodash/entriesIn.js +1 -1
- package/lodash/eq.js +1 -1
- package/lodash/escape.js +1 -1
- package/lodash/escapeRegExp.js +1 -1
- package/lodash/every.js +1 -1
- package/lodash/extend.js +1 -1
- package/lodash/extendWith.js +1 -1
- package/lodash/fill.js +1 -1
- package/lodash/filter.js +1 -1
- package/lodash/find.js +1 -1
- package/lodash/findIndex.js +1 -1
- package/lodash/findKey.js +1 -1
- package/lodash/findLast.js +1 -1
- package/lodash/findLastIndex.js +1 -1
- package/lodash/findLastKey.js +1 -1
- package/lodash/first.js +1 -1
- package/lodash/flatMap.js +1 -1
- package/lodash/flatMapDeep.js +1 -1
- package/lodash/flatMapDepth.js +1 -1
- package/lodash/flatten.js +1 -1
- package/lodash/flattenDeep.js +1 -1
- package/lodash/flattenDepth.js +1 -1
- package/lodash/flip.js +1 -1
- package/lodash/floor.js +1 -1
- package/lodash/flow.js +1 -1
- package/lodash/flowRight.js +1 -1
- package/lodash/forEach.js +1 -1
- package/lodash/forEachRight.js +1 -1
- package/lodash/forIn.js +1 -1
- package/lodash/forInRight.js +1 -1
- package/lodash/forOwn.js +1 -1
- package/lodash/forOwnRight.js +1 -1
- package/lodash/fromPairs.js +1 -1
- package/lodash/function.default.js +1 -1
- package/lodash/function.js +1 -1
- package/lodash/functions.js +1 -1
- package/lodash/functionsIn.js +1 -1
- package/lodash/get.js +1 -1
- package/lodash/groupBy.js +1 -1
- package/lodash/gt.js +1 -1
- package/lodash/gte.js +1 -1
- package/lodash/has.js +1 -1
- package/lodash/hasIn.js +1 -1
- package/lodash/head.js +1 -1
- package/lodash/identity.js +1 -1
- package/lodash/inRange.js +1 -1
- package/lodash/includes.js +1 -1
- package/lodash/index.js +1 -1
- package/lodash/indexOf.js +1 -1
- package/lodash/initial.js +1 -1
- package/lodash/intersection.js +1 -1
- package/lodash/intersectionBy.js +1 -1
- package/lodash/intersectionWith.js +1 -1
- package/lodash/invert.js +1 -1
- package/lodash/invertBy.js +1 -1
- package/lodash/invoke.js +1 -1
- package/lodash/invokeMap.js +1 -1
- package/lodash/isArguments.js +1 -1
- package/lodash/isArray.js +1 -1
- package/lodash/isArrayBuffer.js +1 -1
- package/lodash/isArrayLike.js +1 -1
- package/lodash/isArrayLikeObject.js +1 -1
- package/lodash/isBoolean.js +1 -1
- package/lodash/isBuffer.js +1 -1
- package/lodash/isDate.js +1 -1
- package/lodash/isElement.js +1 -1
- package/lodash/isEmpty.js +1 -1
- package/lodash/isEqual.js +1 -1
- package/lodash/isEqualWith.js +1 -1
- package/lodash/isError.js +1 -1
- package/lodash/isFinite.js +1 -1
- package/lodash/isFunction.js +1 -1
- package/lodash/isInteger.js +1 -1
- package/lodash/isLength.js +1 -1
- package/lodash/isMap.js +1 -1
- package/lodash/isMatch.js +1 -1
- package/lodash/isMatchWith.js +1 -1
- package/lodash/isNaN.js +1 -1
- package/lodash/isNative.js +1 -1
- package/lodash/isNil.js +1 -1
- package/lodash/isNull.js +1 -1
- package/lodash/isNumber.js +1 -1
- package/lodash/isObject.js +1 -1
- package/lodash/isObjectLike.js +1 -1
- package/lodash/isPlainObject.js +1 -1
- package/lodash/isPromise.js +2 -2
- package/lodash/isRegExp.js +1 -1
- package/lodash/isSafeInteger.js +1 -1
- package/lodash/isSet.js +1 -1
- package/lodash/isString.js +1 -1
- package/lodash/isSymbol.js +1 -1
- package/lodash/isTypedArray.js +1 -1
- package/lodash/isUndefined.js +1 -1
- package/lodash/isWeakMap.js +1 -1
- package/lodash/isWeakSet.js +1 -1
- package/lodash/iteratee.js +1 -1
- package/lodash/join.js +1 -1
- package/lodash/kebabCase.js +1 -1
- package/lodash/keyBy.js +1 -1
- package/lodash/keys.js +1 -1
- package/lodash/keysIn.js +1 -1
- package/lodash/lang.default.js +1 -1
- package/lodash/lang.js +1 -1
- package/lodash/last.js +1 -1
- package/lodash/lastIndexOf.js +1 -1
- package/lodash/lodash.default.js +1 -1
- package/lodash/lodash.js +1 -1
- package/lodash/lowerCase.js +1 -1
- package/lodash/lowerFirst.js +1 -1
- package/lodash/lt.js +1 -1
- package/lodash/lte.js +1 -1
- package/lodash/map.js +1 -1
- package/lodash/mapKeys.js +1 -1
- package/lodash/mapValues.js +1 -1
- package/lodash/matches.js +1 -1
- package/lodash/matchesProperty.js +1 -1
- package/lodash/math.default.js +1 -1
- package/lodash/math.js +1 -1
- package/lodash/max.js +1 -1
- package/lodash/maxBy.js +1 -1
- package/lodash/mean.js +1 -1
- package/lodash/meanBy.js +1 -1
- package/lodash/memoize.js +1 -1
- package/lodash/merge.js +1 -1
- package/lodash/mergeWith.js +1 -1
- package/lodash/method.js +1 -1
- package/lodash/methodOf.js +1 -1
- package/lodash/min.js +1 -1
- package/lodash/minBy.js +1 -1
- package/lodash/mixin.js +1 -1
- package/lodash/multiply.js +1 -1
- package/lodash/negate.js +1 -1
- package/lodash/next.js +1 -1
- package/lodash/noop.js +1 -1
- package/lodash/now.js +1 -1
- package/lodash/nth.js +1 -1
- package/lodash/nthArg.js +1 -1
- package/lodash/number.default.js +1 -1
- package/lodash/number.js +1 -1
- package/lodash/object.default.js +1 -1
- package/lodash/object.js +1 -1
- package/lodash/omit.js +1 -1
- package/lodash/omitBy.js +1 -1
- package/lodash/once.js +1 -1
- package/lodash/orderBy.js +1 -1
- package/lodash/over.js +1 -1
- package/lodash/overArgs.js +1 -1
- package/lodash/overEvery.js +1 -1
- package/lodash/overSome.js +1 -1
- package/lodash/pad.js +1 -1
- package/lodash/padEnd.js +1 -1
- package/lodash/padStart.js +1 -1
- package/lodash/parseInt.js +1 -1
- package/lodash/partial.js +1 -1
- package/lodash/partialRight.js +1 -1
- package/lodash/partition.js +1 -1
- package/lodash/pick.js +1 -1
- package/lodash/pickBy.js +1 -1
- package/lodash/plant.js +1 -1
- package/lodash/property.js +1 -1
- package/lodash/propertyOf.js +1 -1
- package/lodash/pull.js +1 -1
- package/lodash/pullAll.js +1 -1
- package/lodash/pullAllBy.js +1 -1
- package/lodash/pullAllWith.js +1 -1
- package/lodash/pullAt.js +1 -1
- package/lodash/random.js +1 -1
- package/lodash/range.js +1 -1
- package/lodash/rangeRight.js +1 -1
- package/lodash/rearg.js +1 -1
- package/lodash/reduce.js +1 -1
- package/lodash/reduceRight.js +1 -1
- package/lodash/reject.js +1 -1
- package/lodash/remove.js +1 -1
- package/lodash/repeat.js +1 -1
- package/lodash/replace.js +1 -1
- package/lodash/rest.js +1 -1
- package/lodash/result.js +1 -1
- package/lodash/reverse.js +1 -1
- package/lodash/round.js +1 -1
- package/lodash/sample.js +1 -1
- package/lodash/sampleSize.js +1 -1
- package/lodash/seq.default.js +1 -1
- package/lodash/seq.js +1 -1
- package/lodash/set.js +1 -1
- package/lodash/setWith.js +1 -1
- package/lodash/shuffle.js +1 -1
- package/lodash/size.js +1 -1
- package/lodash/slice.js +1 -1
- package/lodash/snakeCase.js +1 -1
- package/lodash/some.js +1 -1
- package/lodash/sortBy.js +1 -1
- package/lodash/sortedIndex.js +1 -1
- package/lodash/sortedIndexBy.js +1 -1
- package/lodash/sortedIndexOf.js +1 -1
- package/lodash/sortedLastIndex.js +1 -1
- package/lodash/sortedLastIndexBy.js +1 -1
- package/lodash/sortedLastIndexOf.js +1 -1
- package/lodash/sortedUniq.js +1 -1
- package/lodash/sortedUniqBy.js +1 -1
- package/lodash/split.js +1 -1
- package/lodash/spread.js +1 -1
- package/lodash/startCase.js +1 -1
- package/lodash/startsWith.js +1 -1
- package/lodash/string.default.js +1 -1
- package/lodash/string.js +1 -1
- package/lodash/stubArray.js +1 -1
- package/lodash/stubFalse.js +1 -1
- package/lodash/stubObject.js +1 -1
- package/lodash/stubString.js +1 -1
- package/lodash/stubTrue.js +1 -1
- package/lodash/subtract.js +1 -1
- package/lodash/sum.js +1 -1
- package/lodash/sumBy.js +1 -1
- package/lodash/tail.js +1 -1
- package/lodash/take.js +1 -1
- package/lodash/takeRight.js +1 -1
- package/lodash/takeRightWhile.js +1 -1
- package/lodash/takeWhile.js +1 -1
- package/lodash/tap.js +1 -1
- package/lodash/template.js +1 -1
- package/lodash/templateSettings.js +1 -1
- package/lodash/throttle.js +1 -1
- package/lodash/thru.js +1 -1
- package/lodash/times.js +1 -1
- package/lodash/toArray.js +1 -1
- package/lodash/toFinite.js +1 -1
- package/lodash/toInteger.js +1 -1
- package/lodash/toIterator.js +1 -1
- package/lodash/toJSON.js +1 -1
- package/lodash/toLength.js +1 -1
- package/lodash/toLower.js +1 -1
- package/lodash/toNumber.js +1 -1
- package/lodash/toPairs.js +1 -1
- package/lodash/toPairsIn.js +1 -1
- package/lodash/toPath.js +1 -1
- package/lodash/toPlainObject.js +1 -1
- package/lodash/toSafeInteger.js +1 -1
- package/lodash/toString.js +1 -1
- package/lodash/toUpper.js +1 -1
- package/lodash/transform.js +1 -1
- package/lodash/trim.js +1 -1
- package/lodash/trimEnd.js +1 -1
- package/lodash/trimStart.js +1 -1
- package/lodash/truncate.js +1 -1
- package/lodash/unary.js +1 -1
- package/lodash/unescape.js +1 -1
- package/lodash/union.js +1 -1
- package/lodash/unionBy.js +1 -1
- package/lodash/unionWith.js +1 -1
- package/lodash/uniq.js +1 -1
- package/lodash/uniqBy.js +1 -1
- package/lodash/uniqWith.js +1 -1
- package/lodash/uniqueId.js +1 -1
- package/lodash/unset.js +1 -1
- package/lodash/unzip.js +1 -1
- package/lodash/unzipWith.js +1 -1
- package/lodash/update.js +1 -1
- package/lodash/updateWith.js +1 -1
- package/lodash/upperCase.js +1 -1
- package/lodash/upperFirst.js +1 -1
- package/lodash/util.default.js +1 -1
- package/lodash/util.js +1 -1
- package/lodash/value.js +1 -1
- package/lodash/valueOf.js +1 -1
- package/lodash/values.js +1 -1
- package/lodash/valuesIn.js +1 -1
- package/lodash/without.js +1 -1
- package/lodash/words.js +1 -1
- package/lodash/wrap.js +1 -1
- package/lodash/wrapperAt.js +1 -1
- package/lodash/wrapperChain.js +1 -1
- package/lodash/wrapperLodash.js +1 -1
- package/lodash/wrapperReverse.js +1 -1
- package/lodash/wrapperValue.js +1 -1
- package/lodash/xor.js +1 -1
- package/lodash/xorBy.js +1 -1
- package/lodash/xorWith.js +1 -1
- package/lodash/zip.js +1 -1
- package/lodash/zipObject.js +1 -1
- package/lodash/zipObjectDeep.js +1 -1
- package/lodash/zipWith.js +1 -1
- package/math/index.js +1 -1
- package/md5/index.js +1 -1
- package/mock/MockWebSocket.js +1 -1
- package/mock/MockXMLHttpRequest.js +1 -1
- package/mock/index.js +1 -1
- package/normalize-wheel/ExecutionEnvironment.js +9 -8
- package/normalize-wheel/UserAgent_DEPRECATED.js +2 -2
- package/normalize-wheel/index.js +1 -1
- package/normalize-wheel/isEventSupported.js +1 -1
- package/number-to-chinese/index.js +1 -1
- package/nzh/cn.js +1 -1
- package/nzh/hk.js +1 -1
- package/nzh/index.js +1 -1
- package/nzh/nzh.js +1 -1
- package/nzh/src/autoGet.js +1 -1
- package/nzh/src/index.js +2 -2
- package/nzh/src/langs/cn_b.js +1 -1
- package/nzh/src/langs/cn_s.js +1 -1
- package/nzh/src/langs/hk_b.js +1 -1
- package/nzh/src/langs/hk_s.js +1 -1
- package/nzh/src/utils.js +21 -20
- package/object/index.d.ts +5 -1
- package/object/index.js +13 -7
- package/package.json +1 -1
- package/pinyin/core.js +1 -1
- package/pinyin/index.js +1 -1
- package/pinyin/simplified.js +1 -1
- package/pinyin/simplified_dict.js +1 -1
- package/pinyin/traditional.js +1 -1
- package/pinyin/traditional_dict.js +1 -1
- package/query-string/base.js +121 -121
- package/query-string/index.js +1 -1
- package/query-string/splitOnFirst.js +1 -1
- package/random/address.js +1 -1
- package/random/constellation.js +1 -1
- package/random/image.js +1 -1
- package/random/index.js +1 -1
- package/random/licensePlate.js +1 -1
- package/random/name.js +1 -1
- package/random/number.js +1 -1
- package/random/text.js +1 -1
- package/random/time.js +1 -1
- package/random/web.js +1 -1
- package/sanitize-url/index.js +1 -1
- package/screenfull/index.js +1 -1
- package/sleep/index.js +1 -1
- package/snapdom/index.browser.d.ts +1 -1
- package/snapdom/index.browser.js +2 -6
- package/snapdom/index.d.ts +1 -2
- package/snapdom/index.js +4 -3
- package/snapdom/{api → src/api}/preCache.js +2 -2
- package/snapdom/{api → src/api}/snapdom.js +3 -3
- package/snapdom/{core → src/core}/cache.js +2 -2
- package/snapdom/{core → src/core}/capture.js +3 -3
- package/snapdom/src/core/clone.js +266 -0
- package/snapdom/{core → src/core}/context.js +2 -2
- package/snapdom/{core → src/core}/plugins.js +2 -2
- package/snapdom/{core → src/core}/prepare.js +2 -2
- package/snapdom/{exporters → src/exporters}/download.js +2 -2
- package/snapdom/{exporters → src/exporters}/toBlob.js +2 -2
- package/snapdom/{exporters → src/exporters}/toCanvas.js +29 -20
- package/snapdom/{exporters → src/exporters}/toImg.js +2 -2
- package/snapdom/src/index.browser.d.ts +1 -0
- package/snapdom/src/index.browser.js +7 -0
- package/snapdom/src/index.d.ts +2 -0
- package/snapdom/src/index.js +4 -0
- package/snapdom/{modules → src/modules}/CSSVar.d.ts +1 -0
- package/snapdom/src/modules/CSSVar.js +101 -0
- package/snapdom/{modules → src/modules}/background.js +5 -2
- package/snapdom/{modules → src/modules}/changeCSS.js +2 -2
- package/snapdom/{modules → src/modules}/counter.d.ts +6 -2
- package/snapdom/{modules → src/modules}/counter.js +20 -23
- package/snapdom/{modules → src/modules}/fonts.js +2 -2
- package/snapdom/{modules → src/modules}/iconFonts.js +2 -2
- package/snapdom/{modules → src/modules}/images.js +6 -6
- package/snapdom/{modules → src/modules}/lineClamp.js +2 -2
- package/snapdom/{modules → src/modules}/pictureResolver.js +2 -2
- package/snapdom/{modules → src/modules}/pseudo.js +53 -47
- package/snapdom/{modules → src/modules}/rasterize.js +2 -2
- package/snapdom/{modules → src/modules}/snapFetch.js +2 -2
- package/snapdom/{modules → src/modules}/styles.js +9 -4
- package/snapdom/{modules → src/modules}/svgDefs.js +2 -2
- package/snapdom/{utils → src/utils}/browser.js +2 -2
- package/snapdom/{utils → src/utils}/capture.helpers.js +2 -2
- package/snapdom/{utils → src/utils}/clone.helpers.d.ts +14 -0
- package/snapdom/{utils → src/utils}/clone.helpers.js +8 -5
- package/snapdom/{utils → src/utils}/css.js +15 -5
- package/snapdom/{utils → src/utils}/debug.js +2 -2
- package/snapdom/{utils → src/utils}/helpers.js +2 -2
- package/snapdom/{utils → src/utils}/image.js +2 -2
- package/snapdom/{utils → src/utils}/index.js +1 -1
- package/snapdom/{utils → src/utils}/prepare.helpers.js +2 -2
- package/snapdom/{utils → src/utils}/transforms.helpers.js +2 -2
- package/string/chars.js +1 -1
- package/string/index.js +1 -1
- package/tinycolor/conversion.d.ts +1 -1
- package/tinycolor/conversion.js +1 -1
- package/tinycolor/css-color-names.js +1 -1
- package/tinycolor/format-input.js +54 -53
- package/tinycolor/from-ratio.js +1 -1
- package/tinycolor/index.js +1 -1
- package/tinycolor/interfaces.js +1 -1
- package/tinycolor/public_api.js +1 -1
- package/tinycolor/random.js +40 -40
- package/tinycolor/readability.js +1 -1
- package/tinycolor/to-ms-filter.js +1 -1
- package/tinycolor/umd_api.js +1 -1
- package/tinycolor/utils.d.ts +1 -1
- package/tinycolor/utils.js +1 -1
- package/tree/index.js +1 -1
- package/tree/searchTree.js +1 -1
- package/tween/easing.js +1 -1
- package/tween/index.js +1 -1
- package/tween/tween.js +1 -1
- package/ui-color/compareColorByRange.js +1 -1
- package/ui-color/index.js +1 -1
- package/url-toolkit/index.js +1 -1
- package/validate/index.js +1 -1
- package/validate/interface.js +1 -1
- package/validate/locale/en-US.js +1 -1
- package/validate/locale/index.js +1 -1
- package/validate/locale/zh-CN.js +1 -1
- package/validate/rules/array.js +2 -2
- package/validate/rules/base.js +1 -1
- package/validate/rules/boolean.js +1 -1
- package/validate/rules/custom.js +2 -2
- package/validate/rules/number.js +2 -2
- package/validate/rules/object.js +2 -2
- package/validate/rules/string.js +2 -2
- package/validate/rules/type.js +1 -1
- package/version/index.js +1 -1
- package/xlsx/crc32.js +1 -1
- package/xlsx/index.js +1 -1
- package/xlsx/xlsx.js +3868 -3867
- package/constant/isMobile.d.ts +0 -3
- package/constant/isMobile.js +0 -6
- package/filesize/filesize.js +0 -50
- package/filesize/helpers.d.ts +0 -58
- package/filesize/helpers.js +0 -70
- package/snapdom/core/clone.js +0 -266
- package/snapdom/modules/CSSVar.js +0 -82
- /package/filesize/{constants.d.ts → src/constants.d.ts} +0 -0
- /package/snapdom/{api → src/api}/preCache.d.ts +0 -0
- /package/snapdom/{api → src/api}/snapdom.d.ts +0 -0
- /package/snapdom/{core → src/core}/cache.d.ts +0 -0
- /package/snapdom/{core → src/core}/capture.d.ts +0 -0
- /package/snapdom/{core → src/core}/clone.d.ts +0 -0
- /package/snapdom/{core → src/core}/context.d.ts +0 -0
- /package/snapdom/{core → src/core}/exporters.d.ts +0 -0
- /package/snapdom/{core → src/core}/plugins.d.ts +0 -0
- /package/snapdom/{core → src/core}/prepare.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/download.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toBlob.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toCanvas.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toImg.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toJpg.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toPng.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toSvg.d.ts +0 -0
- /package/snapdom/{exporters → src/exporters}/toWebp.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/background.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/changeCSS.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/fonts.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/iconFonts.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/images.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/lineClamp.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/pictureResolver.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/pseudo.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/rasterize.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/snapFetch.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/styles.d.ts +0 -0
- /package/snapdom/{modules → src/modules}/svgDefs.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/browser.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/capture.helpers.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/css.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/debug.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/helpers.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/image.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/index.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/prepare.helpers.d.ts +0 -0
- /package/snapdom/{utils → src/utils}/transforms.helpers.d.ts +0 -0
package/constant/isMobile.d.ts
DELETED
package/constant/isMobile.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* 潘启宝 2026-04-14 16:53:57 星期二 */
|
|
2
|
-
//#region utils/constant/isMobile.js
|
|
3
|
-
var e = navigator.userAgent, t = /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i, n = /CrOS/, r = /android|ipad|playbook|silk/i, i = t.test(e) && !n.test(e), a = r.test(e);
|
|
4
|
-
//#endregion
|
|
5
|
-
export { i as default, i as isMobile, a as isTablet };
|
|
6
|
-
/* 独立思考,明辨是非 */
|
package/filesize/filesize.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* 潘启宝 2026-04-14 16:53:57 星期二 */
|
|
2
|
-
import { BITS as e, BYTES as t, INVALID_NUMBER as n, INVALID_ROUND as r, LOG_10_1000 as i, LOG_2_1024 as a, ROUND as o, SI_KBIT as s, STRING as c, STRINGS as l } from "./constants.js";
|
|
3
|
-
import { applyNumberFormatting as u, applyPrecisionHandling as d, calculateOptimizedValue as f, getBaseConfiguration as p, handleZeroValue as m } from "./helpers.js";
|
|
4
|
-
//#region utils/filesize/filesize.js
|
|
5
|
-
function h(h, { bits: g = !1, pad: _ = !1, base: v = -1, round: y = 2, locale: b = "", localeOptions: x = {}, separator: S = "", spacer: C = " ", symbols: w = {}, standard: T = "", output: E = c, fullform: D = !1, fullforms: O = [], exponent: k = -1, roundingMethod: A = o, precision: j = 0 } = {}) {
|
|
6
|
-
let M = k, N = Number(h), P = [], F = 0, I = "", { isDecimal: L, ceil: R, actualStandard: z } = p(T, v), B = D === !0, V = N < 0, H = Math[A];
|
|
7
|
-
if (typeof h != "bigint" && isNaN(h)) throw TypeError(n);
|
|
8
|
-
if (typeof H != "function") throw TypeError(r);
|
|
9
|
-
if (V && (N = -N), N === 0) return m(j, z, g, w, B, O, E, C);
|
|
10
|
-
(M === -1 || isNaN(M)) && (M = Math.floor(L ? Math.log(N) / i : Math.log(N) / a), M < 0 && (M = 0)), M > 8 && (j > 0 && (j += 8 - M), M = 8);
|
|
11
|
-
let U = k === -1 || isNaN(k);
|
|
12
|
-
if (E === "exponent") return M;
|
|
13
|
-
let { result: W, e: G } = f(N, M, L, g, R, U);
|
|
14
|
-
F = W, M = G;
|
|
15
|
-
let K = M > 0 && y > 0 ? 10 ** y : 1;
|
|
16
|
-
if (P[0] = K === 1 ? H(F) : H(F * K) / K, P[0] === R && M < 8 && U && (P[0] = 1, M++), j > 0) {
|
|
17
|
-
let e = d(P[0], j, M, N, L, g, R, H, y, k);
|
|
18
|
-
P[0] = e.value, M = e.e;
|
|
19
|
-
}
|
|
20
|
-
let q = l.symbol[z][g ? e : t];
|
|
21
|
-
return I = P[1] = L && M === 1 ? g ? s : "kB" : q[M], V && (P[0] = -P[0]), w[P[1]] && (P[1] = w[P[1]]), P[0] = u(P[0], b, x, S, _, y), B && (P[1] = O[M] || l.fullform[z][M] + (g ? "bit" : "byte") + (P[0] === 1 ? "" : "s")), E === "array" ? P : E === "object" ? {
|
|
22
|
-
value: P[0],
|
|
23
|
-
symbol: P[1],
|
|
24
|
-
exponent: M,
|
|
25
|
-
unit: I
|
|
26
|
-
} : C === " " ? `${P[0]} ${P[1]}` : P.join(C);
|
|
27
|
-
}
|
|
28
|
-
function g({ bits: e = !1, pad: t = !1, base: n = -1, round: r = 2, locale: i = "", localeOptions: a = {}, separator: s = "", spacer: l = " ", symbols: u = {}, standard: d = "", output: f = c, fullform: p = !1, fullforms: m = [], exponent: g = -1, roundingMethod: _ = o, precision: v = 0 } = {}) {
|
|
29
|
-
return (o) => h(o, {
|
|
30
|
-
bits: e,
|
|
31
|
-
pad: t,
|
|
32
|
-
base: n,
|
|
33
|
-
round: r,
|
|
34
|
-
locale: i,
|
|
35
|
-
localeOptions: a,
|
|
36
|
-
separator: s,
|
|
37
|
-
spacer: l,
|
|
38
|
-
symbols: u,
|
|
39
|
-
standard: d,
|
|
40
|
-
output: f,
|
|
41
|
-
fullform: p,
|
|
42
|
-
fullforms: m,
|
|
43
|
-
exponent: g,
|
|
44
|
-
roundingMethod: _,
|
|
45
|
-
precision: v
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
|
-
export { h as filesize, g as partial };
|
|
50
|
-
/* 独立思考,明辨是非 */
|
package/filesize/helpers.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Optimized base configuration lookup
|
|
3
|
-
* @param {string} standard - Standard type
|
|
4
|
-
* @param {number} base - Base number
|
|
5
|
-
* @returns {Object} Configuration object
|
|
6
|
-
*/
|
|
7
|
-
export function getBaseConfiguration(standard: string, base: number): Object;
|
|
8
|
-
/**
|
|
9
|
-
* Optimized zero value handling
|
|
10
|
-
* @param {number} precision - Precision value
|
|
11
|
-
* @param {string} actualStandard - Standard to use
|
|
12
|
-
* @param {boolean} bits - Whether to use bits
|
|
13
|
-
* @param {Object} symbols - Custom symbols
|
|
14
|
-
* @param {boolean} full - Whether to use full form
|
|
15
|
-
* @param {Array} fullforms - Custom full forms
|
|
16
|
-
* @param {string} output - Output format
|
|
17
|
-
* @param {string} spacer - Spacer character
|
|
18
|
-
* @param {string} [symbol] - Symbol to use (defaults based on bits/standard)
|
|
19
|
-
* @returns {string|Array|Object|number} Formatted result
|
|
20
|
-
*/
|
|
21
|
-
export function handleZeroValue(precision: number, actualStandard: string, bits: boolean, symbols: Object, full: boolean, fullforms: any[], output: string, spacer: string, symbol?: string): string | any[] | Object | number;
|
|
22
|
-
/**
|
|
23
|
-
* Optimized value calculation with bits handling
|
|
24
|
-
* @param {number} num - Input number
|
|
25
|
-
* @param {number} e - Exponent
|
|
26
|
-
* @param {boolean} isDecimal - Whether to use decimal powers
|
|
27
|
-
* @param {boolean} bits - Whether to calculate bits
|
|
28
|
-
* @param {number} ceil - Ceiling value for auto-increment
|
|
29
|
-
* @param {boolean} autoExponent - Whether exponent is auto (-1 or NaN)
|
|
30
|
-
* @returns {Object} Object with result and e properties
|
|
31
|
-
*/
|
|
32
|
-
export function calculateOptimizedValue(num: number, e: number, isDecimal: boolean, bits: boolean, ceil: number, autoExponent?: boolean): Object;
|
|
33
|
-
/**
|
|
34
|
-
* Optimized precision handling with scientific notation correction
|
|
35
|
-
* @param {number} value - Current value
|
|
36
|
-
* @param {number} precision - Precision to apply
|
|
37
|
-
* @param {number} e - Current exponent
|
|
38
|
-
* @param {number} num - Original number
|
|
39
|
-
* @param {boolean} isDecimal - Whether using decimal base
|
|
40
|
-
* @param {boolean} bits - Whether calculating bits
|
|
41
|
-
* @param {number} ceil - Ceiling value
|
|
42
|
-
* @param {Function} roundingFunc - Rounding function
|
|
43
|
-
* @param {number} round - Round value
|
|
44
|
-
* @param {number} exponent - Forced exponent (-1 for auto)
|
|
45
|
-
* @returns {Object} Object with value and e properties
|
|
46
|
-
*/
|
|
47
|
-
export function applyPrecisionHandling(value: number, precision: number, e: number, num: number, isDecimal: boolean, bits: boolean, ceil: number, roundingFunc: Function, round: number, exponent: number): Object;
|
|
48
|
-
/**
|
|
49
|
-
* Optimized number formatting with locale, separator, and padding
|
|
50
|
-
* @param {number|string} value - Value to format
|
|
51
|
-
* @param {string|boolean} locale - Locale setting
|
|
52
|
-
* @param {Object} localeOptions - Locale options
|
|
53
|
-
* @param {string} separator - Custom separator
|
|
54
|
-
* @param {boolean} pad - Whether to pad
|
|
55
|
-
* @param {number} round - Round value
|
|
56
|
-
* @returns {string|number} Formatted value
|
|
57
|
-
*/
|
|
58
|
-
export function applyNumberFormatting(value: number | string, locale: string | boolean, localeOptions: Object, separator: string, pad: boolean, round: number): string | number;
|
package/filesize/helpers.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/* 潘启宝 2026-04-14 16:53:57 星期二 */
|
|
2
|
-
import { BINARY_POWERS as e, DECIMAL_POWERS as t, JEDEC as n, STRINGS as r } from "./constants.js";
|
|
3
|
-
//#region utils/filesize/helpers.js
|
|
4
|
-
var i = {
|
|
5
|
-
si: {
|
|
6
|
-
isDecimal: !0,
|
|
7
|
-
ceil: 1e3,
|
|
8
|
-
actualStandard: n
|
|
9
|
-
},
|
|
10
|
-
iec: {
|
|
11
|
-
isDecimal: !1,
|
|
12
|
-
ceil: 1024,
|
|
13
|
-
actualStandard: "iec"
|
|
14
|
-
},
|
|
15
|
-
[n]: {
|
|
16
|
-
isDecimal: !1,
|
|
17
|
-
ceil: 1024,
|
|
18
|
-
actualStandard: n
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
function a(e, t) {
|
|
22
|
-
return i[e] ? i[e] : t === 2 ? {
|
|
23
|
-
isDecimal: !1,
|
|
24
|
-
ceil: 1024,
|
|
25
|
-
actualStandard: "iec"
|
|
26
|
-
} : {
|
|
27
|
-
isDecimal: !0,
|
|
28
|
-
ceil: 1e3,
|
|
29
|
-
actualStandard: n
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function o(e, t, n, i, a, o, s, c, l) {
|
|
33
|
-
let u = e > 0 ? 0 .toPrecision(e) : 0;
|
|
34
|
-
return s === "exponent" ? 0 : (l ||= n ? r.symbol[t].bits[0] : r.symbol[t].bytes[0], i[l] && (l = i[l]), a && (l = o[0] || r.fullform[t][0] + (n ? "bit" : "byte")), s === "array" ? [u, l] : s === "object" ? {
|
|
35
|
-
value: u,
|
|
36
|
-
symbol: l,
|
|
37
|
-
exponent: 0,
|
|
38
|
-
unit: l
|
|
39
|
-
} : u + c + l);
|
|
40
|
-
}
|
|
41
|
-
function s(n, r, i, a, o, s = !0) {
|
|
42
|
-
let c = n / (i ? t[r] : e[r]);
|
|
43
|
-
return a && (c *= 8, s && c >= o && r < 8 && (c /= o, r++)), {
|
|
44
|
-
result: c,
|
|
45
|
-
e: r
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function c(e, t, n, r, i, a, o, c, l, u) {
|
|
49
|
-
let d = e.toPrecision(t), f = u === -1 || isNaN(u);
|
|
50
|
-
if (d.includes("e") && n < 8 && f) {
|
|
51
|
-
n++;
|
|
52
|
-
let { result: e } = s(r, n, i, a, o), u = l > 0 ? 10 ** l : 1;
|
|
53
|
-
d = (u === 1 ? c(e) : c(e * u) / u).toPrecision(t);
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
value: d,
|
|
57
|
-
e: n
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
function l(e, t, n, r, i, a) {
|
|
61
|
-
let o = e;
|
|
62
|
-
if (t === !0 ? o = o.toLocaleString() : t.length > 0 ? o = o.toLocaleString(t, n) : r.length > 0 && (o = o.toString().replace(".", r)), i && a > 0) {
|
|
63
|
-
let e = o.toString(), t = r || (e.slice(1).match(/[.,]/g) || []).pop() || ".", n = e.split(t), i = n[1] || "", s = i.length, c = a - s;
|
|
64
|
-
o = `${n[0]}${t}${i.padEnd(s + c, "0")}`;
|
|
65
|
-
}
|
|
66
|
-
return o;
|
|
67
|
-
}
|
|
68
|
-
//#endregion
|
|
69
|
-
export { l as applyNumberFormatting, c as applyPrecisionHandling, s as calculateOptimizedValue, a as getBaseConfiguration, o as handleZeroValue };
|
|
70
|
-
/* 独立思考,明辨是非 */
|
package/snapdom/core/clone.js
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
/* 潘启宝 2026-04-14 16:53:57 星期二 */
|
|
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 { resolveCSSVars as g } from "../modules/CSSVar.js";
|
|
9
|
-
//#region utils/snapdom/core/clone.js
|
|
10
|
-
async function _(v, y, b) {
|
|
11
|
-
if (!v) throw Error("Invalid node");
|
|
12
|
-
let x = /* @__PURE__ */ new Set(), S = null, C = null;
|
|
13
|
-
if (v.nodeType === Node.ELEMENT_NODE) {
|
|
14
|
-
let e = (v.localName || v.tagName || "").toLowerCase();
|
|
15
|
-
if (v.id === "snapdom-sandbox" || v.hasAttribute("data-snapdom-sandbox") || t.has(e)) return null;
|
|
16
|
-
if (e === "foreignobject" && v.parentElement?.closest?.("foreignObject")) return n(y, "Nested <foreignObject> skipped (SVG spec limitation — not rendered by browsers)"), null;
|
|
17
|
-
}
|
|
18
|
-
if (v.nodeType === Node.TEXT_NODE || v.nodeType !== Node.ELEMENT_NODE) return v.cloneNode(!0);
|
|
19
|
-
if (v.getAttribute("data-capture") === "exclude") {
|
|
20
|
-
if (b.excludeMode === "hide") {
|
|
21
|
-
let e = document.createElement("div"), { width: t, height: n } = l(v), r = t || v.getBoundingClientRect().width || 0, i = n || v.getBoundingClientRect().height || 0;
|
|
22
|
-
return e.style.cssText = `display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`, e;
|
|
23
|
-
} else if (b.excludeMode === "remove") return null;
|
|
24
|
-
}
|
|
25
|
-
if (b.exclude && Array.isArray(b.exclude)) for (let e of b.exclude) try {
|
|
26
|
-
if (v.matches?.(e)) {
|
|
27
|
-
if (b.excludeMode === "hide") {
|
|
28
|
-
let e = document.createElement("div"), { width: t, height: n } = l(v), r = t || v.getBoundingClientRect().width || 0, i = n || v.getBoundingClientRect().height || 0;
|
|
29
|
-
return e.style.cssText = `display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`, e;
|
|
30
|
-
} else if (b.excludeMode === "remove") return null;
|
|
31
|
-
}
|
|
32
|
-
} catch (t) {
|
|
33
|
-
console.warn(`Invalid selector in exclude option: ${e}`, t);
|
|
34
|
-
}
|
|
35
|
-
if (typeof b.filter == "function") try {
|
|
36
|
-
if (!b.filter(v)) {
|
|
37
|
-
if (b.filterMode === "hide") {
|
|
38
|
-
let e = document.createElement("div"), { width: t, height: n } = l(v), r = t || v.getBoundingClientRect().width || 0, i = n || v.getBoundingClientRect().height || 0;
|
|
39
|
-
return e.style.cssText = `display:inline-block;width:${r}px;height:${i}px;visibility:hidden;`, e;
|
|
40
|
-
} else if (b.filterMode === "remove") return null;
|
|
41
|
-
}
|
|
42
|
-
} catch (e) {
|
|
43
|
-
console.warn("Error in filter function:", e);
|
|
44
|
-
}
|
|
45
|
-
if (v.tagName === "IFRAME") {
|
|
46
|
-
let e = !1;
|
|
47
|
-
try {
|
|
48
|
-
e = !!(v.contentDocument || v.contentWindow?.document);
|
|
49
|
-
} catch (e) {
|
|
50
|
-
n(y, "iframe same-origin probe failed", e);
|
|
51
|
-
}
|
|
52
|
-
if (e) try {
|
|
53
|
-
return await m(v, y, b);
|
|
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.", v), b.placeholders) {
|
|
58
|
-
let { width: e, height: t } = l(v), 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(v, n, y, b), n;
|
|
60
|
-
} else {
|
|
61
|
-
let { width: e, height: t } = l(v), n = document.createElement("div");
|
|
62
|
-
return n.style.cssText = `display:inline-block;width:${e}px;height:${t}px;visibility:hidden;`, r(v, n, y, b), n;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (v.getAttribute("data-capture") === "placeholder") {
|
|
66
|
-
let e = v.cloneNode(!1);
|
|
67
|
-
y.nodeMap.set(e, v), r(v, e, y, b);
|
|
68
|
-
let t = document.createElement("div");
|
|
69
|
-
return t.textContent = v.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 (v.tagName === "CANVAS") {
|
|
72
|
-
let e = "";
|
|
73
|
-
try {
|
|
74
|
-
let t = v.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 = v.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 = v.toDataURL("image/png"), !e || e === "data:,") {
|
|
83
|
-
let t = document.createElement("canvas");
|
|
84
|
-
t.width = v.width, t.height = v.height;
|
|
85
|
-
let n = t.getContext("2d");
|
|
86
|
-
n && (n.drawImage(v, 0, 0), e = t.toDataURL("image/png"));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
} catch (e) {
|
|
90
|
-
n(y, "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(y, "img decoding/loading hints failed", e);
|
|
97
|
-
}
|
|
98
|
-
e && (t.src = e), t.width = v.width, t.height = v.height;
|
|
99
|
-
let { width: i, height: a } = l(v);
|
|
100
|
-
return i > 0 && (t.style.width = `${i}px`), a > 0 && (t.style.height = `${a}px`), y.nodeMap.set(t, v), r(v, t, y, b), t;
|
|
101
|
-
}
|
|
102
|
-
if (v.tagName === "VIDEO") {
|
|
103
|
-
let e = "";
|
|
104
|
-
try {
|
|
105
|
-
let t = document.createElement("canvas");
|
|
106
|
-
t.width = v.videoWidth || v.offsetWidth || 320, t.height = v.videoHeight || v.offsetHeight || 240;
|
|
107
|
-
let n = t.getContext("2d");
|
|
108
|
-
n && (n.drawImage(v, 0, 0, t.width, t.height), e = t.toDataURL("image/png"), (!e || e === "data:,") && (e = ""));
|
|
109
|
-
} catch (e) {
|
|
110
|
-
n(y, "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 : v.poster && (t.src = v.poster), t.width = v.videoWidth || v.offsetWidth || 0, t.height = v.videoHeight || v.offsetHeight || 0;
|
|
117
|
-
let { width: i, height: a } = l(v);
|
|
118
|
-
return i > 0 && (t.style.width = `${i}px`), a > 0 && (t.style.height = `${a}px`), t.style.objectFit = "contain", y.nodeMap.set(t, v), r(v, t, y, b), t;
|
|
119
|
-
}
|
|
120
|
-
let w;
|
|
121
|
-
try {
|
|
122
|
-
if (w = v.cloneNode(!1), w.attributes?.length) try {
|
|
123
|
-
for (let e of w.attributes) /[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(e.value) && w.setAttribute(e.name, e.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g, ""));
|
|
124
|
-
} catch {}
|
|
125
|
-
if (g(v, w), y.nodeMap.set(w, v), v.tagName === "IMG") {
|
|
126
|
-
c(v, w);
|
|
127
|
-
try {
|
|
128
|
-
let { width: e, height: t } = l(v), n = Math.round(e || 0), r = Math.round(t || 0);
|
|
129
|
-
n && (w.dataset.snapdomWidth = String(n)), r && (w.dataset.snapdomHeight = String(r));
|
|
130
|
-
} catch (e) {
|
|
131
|
-
n(y, "getUnscaledDimensions for IMG failed", e);
|
|
132
|
-
}
|
|
133
|
-
try {
|
|
134
|
-
let e = v.getAttribute("style") || "", t = window.getComputedStyle(v), 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(w.dataset.snapdomWidth || "0", 10), i = parseInt(w.dataset.snapdomHeight || "0", 10), a = n("width") || !r, o = n("height") || !i;
|
|
138
|
-
a && r && (w.style.width = `${r}px`), o && i && (w.style.height = `${i}px`);
|
|
139
|
-
let s = t.getPropertyValue("object-fit"), c = t.getPropertyValue("object-position");
|
|
140
|
-
s && s !== "fill" ? (w.style.objectFit = s, c && (w.style.objectPosition = c)) : (r && (w.style.minWidth = `${r}px`), i && (w.style.minHeight = `${i}px`));
|
|
141
|
-
} catch (e) {
|
|
142
|
-
n(y, "IMG dimension freeze failed", e);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
} catch (e) {
|
|
146
|
-
throw console.error("[Snapdom] Failed to clone node:", v, e), e;
|
|
147
|
-
}
|
|
148
|
-
let T = null;
|
|
149
|
-
if (v instanceof HTMLTextAreaElement) {
|
|
150
|
-
let { width: e, height: t } = l(v), n = e || v.getBoundingClientRect().width || 0, r = t || v.getBoundingClientRect().height || 0;
|
|
151
|
-
n && (w.style.width = `${n}px`), r && (w.style.height = `${r}px`);
|
|
152
|
-
}
|
|
153
|
-
if (v instanceof HTMLInputElement) {
|
|
154
|
-
let t = (v.type || "text").toLowerCase();
|
|
155
|
-
if ((t === "checkbox" || t === "radio") && e()) {
|
|
156
|
-
let { el: e, applyVisual: t } = o(v);
|
|
157
|
-
y.nodeMap.set(e, v), T = t, w = e;
|
|
158
|
-
} else w.value = v.value, w.setAttribute("value", v.value), v.checked !== void 0 && (w.checked = v.checked, v.checked && w.setAttribute("checked", ""), v.indeterminate && (w.indeterminate = v.indeterminate));
|
|
159
|
-
}
|
|
160
|
-
if ((v instanceof HTMLInputElement || v instanceof HTMLTextAreaElement) && !v.value && v.placeholder) try {
|
|
161
|
-
let e = window.getComputedStyle(v, "::placeholder"), t = e && e.color;
|
|
162
|
-
if (t && t !== "rgba(0, 0, 0, 0)") {
|
|
163
|
-
let n = "snapdom-ph-" + (Math.random() * 1e6 | 0);
|
|
164
|
-
w.classList.add(n);
|
|
165
|
-
let r = document.createElement("style");
|
|
166
|
-
r.textContent = `.${n}::placeholder{color:${t}!important;opacity:${e.opacity || "1"}!important;}`, w.prepend(r);
|
|
167
|
-
}
|
|
168
|
-
} catch {}
|
|
169
|
-
if (v instanceof HTMLSelectElement && (S = v.value), v instanceof HTMLTextAreaElement && (C = v.value), v instanceof HTMLInputElement || v instanceof HTMLTextAreaElement || v instanceof HTMLSelectElement) {
|
|
170
|
-
v.disabled && w.setAttribute("disabled", ""), v.required && w.setAttribute("required", ""), v.readOnly && w.setAttribute("readonly", "");
|
|
171
|
-
let e = v;
|
|
172
|
-
e.min !== void 0 && e.min !== "" && w.setAttribute("min", e.min), e.max !== void 0 && e.max !== "" && w.setAttribute("max", e.max), e.pattern !== void 0 && e.pattern !== "" && w.setAttribute("pattern", e.pattern);
|
|
173
|
-
let t = v.getAttribute("aria-invalid");
|
|
174
|
-
t !== null && w.setAttribute("aria-invalid", t);
|
|
175
|
-
}
|
|
176
|
-
if (r(v, w, y, b), T && T(), v instanceof SVGElement) {
|
|
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(v);
|
|
200
|
-
for (let n of e) {
|
|
201
|
-
let e = t.getPropertyValue(n);
|
|
202
|
-
e && w.style.setProperty(n, e);
|
|
203
|
-
}
|
|
204
|
-
} catch {}
|
|
205
|
-
}
|
|
206
|
-
if (v.shadowRoot) {
|
|
207
|
-
try {
|
|
208
|
-
let e = v.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) x.add(t);
|
|
217
|
-
}
|
|
218
|
-
} catch {}
|
|
219
|
-
let e = p(y), t = `[data-sd="${e}"]`;
|
|
220
|
-
try {
|
|
221
|
-
w.setAttribute("data-sd", e);
|
|
222
|
-
} catch {}
|
|
223
|
-
let n = s(v.shadowRoot), r = h(n, t), o = i(v, a(n), t);
|
|
224
|
-
d(w, 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
|
-
_(e, y, b).then((e) => {
|
|
229
|
-
t(e || null);
|
|
230
|
-
}).catch(() => {
|
|
231
|
-
t(null);
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
let f = await u(Array.from(v.shadowRoot.childNodes), l, b.fast);
|
|
235
|
-
c.append(...f.filter((e) => !!e)), w.appendChild(c);
|
|
236
|
-
}
|
|
237
|
-
if (v.tagName === "SLOT") {
|
|
238
|
-
let e = v.assignedNodes?.({ flatten: !0 }) || [], t = e.length > 0 ? e : Array.from(v.childNodes), n = document.createDocumentFragment();
|
|
239
|
-
function r(e, t) {
|
|
240
|
-
_(e, y, b).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, b.fast);
|
|
247
|
-
return n.append(...i.filter((e) => !!e)), n;
|
|
248
|
-
}
|
|
249
|
-
function E(e, t) {
|
|
250
|
-
if (x.has(e)) return t(null);
|
|
251
|
-
_(e, y, b).then((e) => {
|
|
252
|
-
t(e || null);
|
|
253
|
-
}).catch(() => {
|
|
254
|
-
t(null);
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
let D = await u(Array.from(v.childNodes), E, b.fast);
|
|
258
|
-
if (w.append(...D.filter((e) => !!e)), S !== null && w instanceof HTMLSelectElement) {
|
|
259
|
-
w.value = S;
|
|
260
|
-
for (let e of w.options) e.value === S ? e.setAttribute("selected", "") : e.removeAttribute("selected");
|
|
261
|
-
}
|
|
262
|
-
return C !== null && w instanceof HTMLTextAreaElement && (w.textContent = C), w;
|
|
263
|
-
}
|
|
264
|
-
//#endregion
|
|
265
|
-
export { _ as deepClone };
|
|
266
|
-
/* 独立思考,明辨是非 */
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/* 潘启宝 2026-04-14 16:53:57 星期二 */
|
|
2
|
-
//#region utils/snapdom/modules/CSSVar.js
|
|
3
|
-
var e = [
|
|
4
|
-
"fill",
|
|
5
|
-
"stroke",
|
|
6
|
-
"color",
|
|
7
|
-
"background-color",
|
|
8
|
-
"stop-color"
|
|
9
|
-
], t = /* @__PURE__ */ new Map();
|
|
10
|
-
function n(n, r) {
|
|
11
|
-
let i = r + "::" + n.toLowerCase(), a = t.get(i);
|
|
12
|
-
if (a) return a;
|
|
13
|
-
let o = document, s = r === "http://www.w3.org/2000/svg" ? o.createElementNS(r, n) : o.createElement(n), c = o.createElement("div");
|
|
14
|
-
c.style.cssText = "position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;", c.appendChild(s), o.documentElement.appendChild(c);
|
|
15
|
-
let l = getComputedStyle(s), u = {};
|
|
16
|
-
for (let t of e) u[t] = l.getPropertyValue(t) || "";
|
|
17
|
-
return c.remove(), t.set(i, u), u;
|
|
18
|
-
}
|
|
19
|
-
function r(t, r) {
|
|
20
|
-
if (!(t instanceof Element) || !(r instanceof Element)) return;
|
|
21
|
-
let i = t.getAttribute?.("style"), a = !!(i && i.includes("var("));
|
|
22
|
-
if (!a && t.attributes?.length) {
|
|
23
|
-
let e = t.attributes;
|
|
24
|
-
for (let t = 0; t < e.length; t++) {
|
|
25
|
-
let n = e[t];
|
|
26
|
-
if (n && typeof n.value == "string" && n.value.includes("var(")) {
|
|
27
|
-
a = !0;
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
let o = null;
|
|
33
|
-
if (a) try {
|
|
34
|
-
o = getComputedStyle(t);
|
|
35
|
-
} catch {}
|
|
36
|
-
if (a) {
|
|
37
|
-
let e = t.style;
|
|
38
|
-
if (e && e.length) {
|
|
39
|
-
let t = /* @__PURE__ */ new Set();
|
|
40
|
-
for (let n = 0; n < e.length; n++) {
|
|
41
|
-
let i = e[n];
|
|
42
|
-
if (t.has(i)) continue;
|
|
43
|
-
t.add(i);
|
|
44
|
-
let a = e.getPropertyValue(i);
|
|
45
|
-
if (!a || !a.includes("var(")) continue;
|
|
46
|
-
let s = o && o.getPropertyValue(i);
|
|
47
|
-
if (s) try {
|
|
48
|
-
r.style.setProperty(i, s.trim(), e.getPropertyPriority(i));
|
|
49
|
-
} catch {}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (a && t.attributes?.length) {
|
|
54
|
-
let e = t.attributes;
|
|
55
|
-
for (let t = 0; t < e.length; t++) {
|
|
56
|
-
let n = e[t];
|
|
57
|
-
if (!n || typeof n.value != "string" || !n.value.includes("var(")) continue;
|
|
58
|
-
let i = n.name, a = o && o.getPropertyValue(i);
|
|
59
|
-
if (a) try {
|
|
60
|
-
r.style.setProperty(i, a.trim());
|
|
61
|
-
} catch {}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (!a) {
|
|
65
|
-
if (!o) try {
|
|
66
|
-
o = getComputedStyle(t);
|
|
67
|
-
} catch {
|
|
68
|
-
o = null;
|
|
69
|
-
}
|
|
70
|
-
if (!o) return;
|
|
71
|
-
let i = t.namespaceURI || "html", a = n(t.tagName, i);
|
|
72
|
-
for (let t of e) {
|
|
73
|
-
let e = o.getPropertyValue(t) || "", n = a[t] || "";
|
|
74
|
-
if (e && e !== n) try {
|
|
75
|
-
r.style.setProperty(t, e.trim());
|
|
76
|
-
} catch {}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
//#endregion
|
|
81
|
-
export { r as resolveCSSVars };
|
|
82
|
-
/* 独立思考,明辨是非 */
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|