2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
+496
View File
@@ -0,0 +1,496 @@
import {
debugWarn,
isEmptyVariableInDefault,
isNumber
} from "./chunk-7X6NDDPW.js";
import "./chunk-Y2F7D3TJ.js";
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-namespace/index.ts
import { computed, inject, ref, unref } from "vue";
var defaultNamespace = "tn";
var _bem = (namespace, block, blockSuffix, element, modifier) => {
let cls = `${namespace}-${block}`;
if (blockSuffix) {
cls += `-${blockSuffix}`;
}
if (element) {
cls += `__${element}`;
}
if (modifier) {
cls += `--${modifier}`;
}
return cls;
};
var namespaceContextKey = Symbol("localContextKey");
var useGetDerivedNamespace = () => {
const derivedNamespace = inject(namespaceContextKey, ref(defaultNamespace));
const namespace = computed(() => {
return unref(derivedNamespace) || defaultNamespace;
});
return namespace;
};
var useNamespace = (block) => {
const namespace = useGetDerivedNamespace();
const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
const is = (name, ...args) => {
const state = args.length >= 1 ? args[0] : true;
return name && state ? `is-${name}` : "";
};
const cssVar = (object) => {
const styles = {};
for (const key in object) {
if (object[key]) {
styles[`--${namespace.value}-${key}`] = object[key];
}
}
return styles;
};
const cssVarBlock = (object) => {
const styles = {};
for (const key in object) {
if (object[key]) {
styles[`--${namespace.value}-${block}-${key}`] = object[key];
}
}
return styles;
};
const cssVarName = (name) => `--${namespace.value}-${name}`;
const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
return {
namespace,
b,
e,
m,
be,
em,
bm,
bem,
is,
// css
cssVar,
cssVarName,
cssVarBlock,
cssVarBlockName
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-component-color/index.ts
import { ref as ref2, watch } from "vue";
var useComponentColor = (prop, type = "") => {
const classColor = ref2("");
const styleColor = ref2("");
const innerColorReg = /^(tn-|gradient)/;
const styleColorReg = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{3})$|^rgb\(\d{1,3}(,\s?\d{1,3}){2}\)$|^rgba\(\d{1,3}(,\s?\d{1,3}){2},\s?0?\.?\d{1,}\)|transparent/i;
const handleColorValue = (value) => {
classColor.value = "";
styleColor.value = "";
if (value === void 0)
return;
if (innerColorReg.test(value)) {
if (type === "bg" && /.*gradient.*/.test(value)) {
const gradientValue = value.split("__")[1];
classColor.value = `tn-gradient-bg__${gradientValue}`;
return;
}
classColor.value = `${value}_${type}`;
}
if (styleColorReg.test(value)) {
styleColor.value = value;
}
};
handleColorValue(prop.value);
watch(
() => prop.value,
(val) => {
handleColorValue(val);
}
);
const updateColor = (value) => {
handleColorValue(value);
};
return [classColor, styleColor, updateColor];
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-component-size/index.ts
import { computed as computed2 } from "vue";
// node_modules/@tuniao/tnui-vue3-uniapp/constants/size.ts
var componentSizes = ["", "sm", "lg", "xl"];
// node_modules/@tuniao/tnui-vue3-uniapp/constants/key.ts
var INSTALLED_KEY = Symbol("INSTALLED_KEY");
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-component-size/index.ts
var componentSizeTypes = ["none", "inner", "custom"];
var useComponentSize = (size) => {
const sizeType = computed2(() => {
if (!size)
return "none";
return componentSizes.includes(size) ? "inner" : "custom";
});
return {
sizeType
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-prop/index.ts
import { computed as computed3, getCurrentInstance } from "vue";
var useProp = (name) => {
const vm = getCurrentInstance();
return computed3(
() => {
var _a;
return isEmptyVariableInDefault((_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props)[name];
}
);
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-selector-query/index.ts
import { getCurrentInstance as getCurrentInstance2 } from "vue";
var useSelectorQuery = (instance) => {
let query = null;
if (!instance) {
instance = getCurrentInstance2();
}
if (!instance) {
debugWarn("useSelectorQuery", "useSelectorQuery必须在setup函数中使用");
}
query = uni.createSelectorQuery().in(instance);
const getSelectorNodeInfo = (selector) => {
return new Promise((resolve, reject) => {
if (query) {
query.select(selector).boundingClientRect((res) => {
const selectRes = res;
if (selectRes) {
resolve(selectRes);
} else {
reject(new Error(`未找到对应节点: ${selector}`));
}
}).exec();
} else {
reject(new Error("未找到对应的SelectorQuery实例"));
}
});
};
const getSelectorNodeInfos = (selector) => {
return new Promise((resolve, reject) => {
if (query) {
query.selectAll(selector).boundingClientRect((res) => {
const selectRes = res;
if (selectRes && selectRes.length > 0) {
resolve(selectRes);
} else {
reject(new Error(`未找到对应节点: ${selector}`));
}
}).exec();
} else {
reject(new Error("未找到对应的SelectorQuery实例"));
}
});
};
return {
query,
getSelectorNodeInfo,
getSelectorNodeInfos
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-toggle/index.ts
import { ref as ref3 } from "vue";
var useToggle = (initState) => {
const state = ref3(initState);
const toggle = () => {
state.value = !state.value;
};
return [state, toggle];
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-touch/index.ts
import { ref as ref4 } from "vue";
var useTouch = () => {
const options = {
disabled: false,
left: 0,
right: 0,
top: 0,
bottom: 0,
faultTolerance: 10
};
const startX = ref4(0);
const startY = ref4(0);
const currentX = ref4(0);
const currentY = ref4(0);
const deltaX = ref4(0);
const deltaY = ref4(0);
const distanceX = ref4(0);
const distanceY = ref4(0);
const isVertical = ref4(false);
const isHorizontal = ref4(false);
const isClick = ref4(false);
let touchFlag;
const updateOptions = (newOptions) => {
Object.assign(options, newOptions);
};
const onTouchStart = (event) => {
if (options.disabled || !event.changedTouches[0])
return;
startX.value = _edgeProcessing(event.changedTouches[0].pageX, "x");
startY.value = _edgeProcessing(event.changedTouches[0].pageY, "y");
touchFlag = "touch";
};
const onTouchMove = (event) => {
if (options.disabled || !event.changedTouches[0])
return;
currentX.value = _edgeProcessing(event.changedTouches[0].pageX, "x");
currentY.value = _edgeProcessing(event.changedTouches[0].pageY, "y");
updateDistanceInfo();
touchFlag = "moving";
};
const onTouchEnd = (event) => {
if (options.disabled || !event.changedTouches[0] || touchFlag === "end")
return;
currentX.value = _edgeProcessing(event.changedTouches[0].pageX, "x");
currentY.value = _edgeProcessing(event.changedTouches[0].pageY, "y");
updateDistanceInfo();
isVertical.value = distanceX.value < options.faultTolerance && distanceY.value >= options.faultTolerance;
isHorizontal.value = distanceX.value >= options.faultTolerance && distanceY.value < options.faultTolerance;
isClick.value = !isHorizontal.value && !isVertical.value;
touchFlag = "end";
};
const updateDistanceInfo = () => {
deltaX.value = currentX.value - startX.value;
deltaY.value = currentY.value - startY.value;
distanceX.value = Math.abs(deltaX.value);
distanceY.value = Math.abs(deltaY.value);
};
const _edgeProcessing = (touchPosition, direction) => {
const { left, right, top, bottom } = options;
if (direction === "x") {
if (touchPosition < left)
return 0;
if (touchPosition > right)
return right - left;
return touchPosition - left;
} else {
if (touchPosition < top)
return 0;
if (touchPosition > bottom)
return bottom - top;
return touchPosition - top;
}
};
return {
startX,
startY,
currentX,
currentY,
deltaX,
deltaY,
distanceX,
distanceY,
isVertical,
isHorizontal,
isClick,
updateOptions,
onTouchStart,
onTouchMove,
onTouchEnd
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-uniapp-system-rect-info/index.ts
import { reactive } from "vue";
var DEFAULT_STATUS_BAR_HEIGHT = 45;
var DEFAULT_NAVBAR_BOUNDING_WIDTH = 87;
var DEFAULT_NAVBAR_BOUNDING_HEIGHT = 32;
var DEFAULT_NAVBAR_BOUNDING_RIGHT = 7;
var DEFAULT_NAVBAR_BOUNDING_TOP = 4;
var useUniAppSystemRectInfo = () => {
const navBarInfo = reactive({
height: 0,
statusHeight: DEFAULT_STATUS_BAR_HEIGHT
});
const navBarBoundingInfo = reactive({
width: 0,
height: 32,
top: 0,
right: 0,
bottom: 0,
left: 0,
marginRight: 0
});
const systemScreenInfo = reactive({
width: 0,
height: 0,
operationHeight: 0
});
const getSystemRectInfo = () => {
try {
const uniSystemInfo = uni.getSystemInfoSync();
const { statusBarHeight, windowWidth, windowHeight, titleBarHeight } = uniSystemInfo;
let height = 0;
height = (statusBarHeight || 0) + DEFAULT_STATUS_BAR_HEIGHT;
navBarBoundingInfo.width = DEFAULT_NAVBAR_BOUNDING_WIDTH;
navBarBoundingInfo.height = DEFAULT_NAVBAR_BOUNDING_HEIGHT;
navBarBoundingInfo.right = windowWidth - DEFAULT_NAVBAR_BOUNDING_RIGHT;
navBarBoundingInfo.left = windowWidth - DEFAULT_NAVBAR_BOUNDING_RIGHT - DEFAULT_NAVBAR_BOUNDING_WIDTH;
navBarBoundingInfo.top = DEFAULT_NAVBAR_BOUNDING_TOP;
navBarBoundingInfo.bottom = DEFAULT_NAVBAR_BOUNDING_TOP + DEFAULT_NAVBAR_BOUNDING_HEIGHT;
navBarBoundingInfo.marginRight = DEFAULT_NAVBAR_BOUNDING_RIGHT;
navBarInfo.height = height;
navBarInfo.statusHeight = statusBarHeight;
systemScreenInfo.width = windowWidth;
systemScreenInfo.height = windowHeight;
systemScreenInfo.operationHeight = windowHeight - height;
} catch (err) {
debugWarn(
"useUniAppSystemRectInfo",
`[TnGetSystemRectInfo]获取系统容器信息失败: ${err}`
);
}
};
getSystemRectInfo();
return {
navBarInfo,
navBarBoundingInfo,
systemScreenInfo,
getSystemRectInfo
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-z-index/index.ts
import { computed as computed4, inject as inject2, ref as ref5, unref as unref2 } from "vue";
var zIndex = ref5(0);
var defaultInitialZIndex = 2e3;
var zIndexContextKey = Symbol("zIndexContextKey");
var useZIndex = () => {
const zIndexInjection = inject2(zIndexContextKey, void 0);
const initialZIndex = computed4(() => {
const zIndexFromInjection = unref2(zIndexInjection);
return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
});
const currentZIndex = computed4(() => initialZIndex.value + zIndex.value);
const nextZIndex = () => {
zIndex.value++;
return currentZIndex.value;
};
const prevZIndex = () => {
zIndex.value--;
return currentZIndex.value;
};
return {
initialZIndex,
currentZIndex,
nextZIndex,
prevZIndex
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-ordered-children/index.ts
import { shallowRef } from "vue";
var useOrderedChildren = () => {
const children = {};
const orderedChildren = shallowRef([]);
const addChild = (child) => {
children[child.uid] = child;
orderedChildren.value.push(child);
};
const removeChild = (uid) => {
delete children[uid];
orderedChildren.value = orderedChildren.value.filter(
(child) => child.uid !== uid
);
};
return {
children: orderedChildren,
addChild,
removeChild
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-observer/index.ts
import { getCurrentInstance as getCurrentInstance3 } from "vue";
var useObserver = (instance) => {
var _a;
if (!instance) {
instance = getCurrentInstance3();
}
instance = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$parent;
if (!instance) {
debugWarn("useObserver", "请在 setup 中使用 useObserver");
}
let observerInstance = null;
const connectObserver = (selector, fn, fnOptions, options) => {
disconnectObserver();
observerInstance = uni.createIntersectionObserver(instance, options);
if (fnOptions.type === "relativeTo")
observerInstance.relativeTo((fnOptions == null ? void 0 : fnOptions.selector) || "", fnOptions.margins);
else if (fnOptions.type === "relativeToViewport")
observerInstance.relativeToViewport(fnOptions.margins);
observerInstance.observe(selector, (res) => {
fn && fn(res);
});
};
const disconnectObserver = () => {
if (observerInstance) {
observerInstance.disconnect();
observerInstance = null;
}
};
return {
connectObserver,
disconnectObserver
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/hooks/use-long-press/index.ts
var useLongPress = (event, enabled, longPressIntervel = 250) => {
let longPressTimer = null;
const clearLongPressTimer = () => {
if (longPressTimer) {
clearInterval(longPressTimer);
longPressTimer = null;
}
};
const handleLongPressEvent = (...args) => {
if (enabled.value) {
event(...args);
clearLongPressTimer();
longPressTimer = setInterval(() => {
event(...args);
}, longPressIntervel);
} else {
event(...args);
}
};
return {
handleLongPressEvent,
clearLongPressTimer
};
};
export {
componentSizeTypes,
defaultNamespace,
namespaceContextKey,
useComponentColor,
useComponentSize,
useGetDerivedNamespace,
useLongPress,
useNamespace,
useObserver,
useOrderedChildren,
useProp,
useSelectorQuery,
useToggle,
useTouch,
useUniAppSystemRectInfo,
useZIndex,
zIndexContextKey
};
//# sourceMappingURL=@tuniao_tnui-vue3-uniapp_hooks.js.map
File diff suppressed because one or more lines are too long
+96
View File
@@ -0,0 +1,96 @@
import {
FormValidateIconsMap,
buildProp,
buildProps,
cloneDeep,
createSelectorQuery,
debounce,
debugWarn,
definePropType,
entriesOf,
formatDomSizeValue,
formatNumber,
generateId,
getProp,
getRandomInt,
getSelectorNodeInfo,
hasOwn,
iconPropType,
isArray,
isBoolean,
isDate,
isElement,
isEmpty,
isEmptyDoubleVariableInDefault,
isEmptyVariableInDefault,
isFunction,
isNumber,
isObject,
isPromise,
isPropAbsent,
isString,
isStringNumber,
isSymbol,
isTnProp,
isUndefined,
keysOf,
mutable,
throttle,
throwError,
tnNavBack,
tnNavPage,
tnPropKey,
withInstall,
withInstallDirective,
withInstallFunction,
withNoopInstall
} from "./chunk-7X6NDDPW.js";
import "./chunk-Y2F7D3TJ.js";
export {
FormValidateIconsMap,
buildProp,
buildProps,
cloneDeep,
createSelectorQuery,
debounce,
debugWarn,
definePropType,
entriesOf,
formatDomSizeValue,
formatNumber,
generateId,
getProp,
getRandomInt,
getSelectorNodeInfo,
hasOwn,
iconPropType,
isArray,
isBoolean,
isDate,
isElement,
isEmpty,
isEmptyDoubleVariableInDefault,
isEmptyVariableInDefault,
isFunction,
isNumber,
isObject,
isPromise,
isPropAbsent,
isString,
isStringNumber,
isSymbol,
isTnProp,
isUndefined,
keysOf,
mutable,
throttle,
throwError,
tnNavBack,
tnNavPage,
tnPropKey,
withInstall,
withInstallDirective,
withInstallFunction,
withNoopInstall
};
//# sourceMappingURL=@tuniao_tnui-vue3-uniapp_utils.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}
+40
View File
@@ -0,0 +1,40 @@
{
"hash": "393f995c",
"configHash": "c08067fb",
"lockfileHash": "ef0c316d",
"browserHash": "46c75202",
"optimized": {
"uview-plus": {
"src": "../../uview-plus/index.js",
"file": "uview-plus.js",
"fileHash": "012aa980",
"needsInterop": false
},
"dayjs": {
"src": "../../dayjs/dayjs.min.js",
"file": "dayjs.js",
"fileHash": "f13549ae",
"needsInterop": true
},
"@tuniao/tnui-vue3-uniapp/utils": {
"src": "../../@tuniao/tnui-vue3-uniapp/utils/index.ts",
"file": "@tuniao_tnui-vue3-uniapp_utils.js",
"fileHash": "c66ff193",
"needsInterop": false
},
"@tuniao/tnui-vue3-uniapp/hooks": {
"src": "../../@tuniao/tnui-vue3-uniapp/hooks/index.ts",
"file": "@tuniao_tnui-vue3-uniapp_hooks.js",
"fileHash": "bd262b07",
"needsInterop": false
}
},
"chunks": {
"chunk-7X6NDDPW": {
"file": "chunk-7X6NDDPW.js"
},
"chunk-Y2F7D3TJ": {
"file": "chunk-Y2F7D3TJ.js"
}
}
}
+677
View File
@@ -0,0 +1,677 @@
// node_modules/@tuniao/tnui-vue3-uniapp/utils/is-empty.ts
var isEmptyVariableInDefault = (variable, defaultValue = void 0) => {
return variable === void 0 || variable === null ? defaultValue : variable;
};
var isEmptyDoubleVariableInDefault = (variable1, variable2, defaultValue = void 0) => {
return isEmptyVariableInDefault(
variable1,
isEmptyVariableInDefault(variable2, defaultValue)
);
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/vue/install.ts
var withInstall = (main, extra) => {
;
main.install = (app) => {
for (const comp of [
main,
...Object.values(isEmptyVariableInDefault(extra, {}))
]) {
app.component(comp.name, comp);
}
};
if (extra) {
for (const [key, comp] of Object.entries(extra)) {
;
main[key] = comp;
}
}
return main;
};
var withInstallFunction = (fn, name) => {
;
fn.install = (app) => {
;
fn._content = app._context;
app.config.globalProperties[name] = fn;
};
return fn;
};
var withInstallDirective = (directive, name) => {
;
directive.install = (app) => {
app.directive(name, directive);
};
};
var withNoopInstall = (component) => {
;
component.install = () => {
};
return component;
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/vue/props/runtime.ts
import { warn } from "vue";
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/from-pairs.ts
function fromPairs(pairs) {
const result = {};
if (pairs == null) {
return result;
}
for (const pair of pairs) {
result[pair[0]] = pair[1];
}
return result;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/is-nil.ts
function isNil(value) {
return value == null;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/is-object-like.ts
function isObjectLike(value) {
return value != null && typeof value == "object";
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_objectToString.ts
var objectProto = Object.prototype;
var objectToString = objectProto.toString;
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/is-boolean.ts
var boolTag = "[object Boolean]";
function isBoolean(value) {
return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/is-number.ts
var numberTag = "[object Number]";
function isNumber(value) {
return typeof value == "number" || isObjectLike(value) && objectToString.call(value) == numberTag;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_isKey.ts
import { isSymbol } from "@vue/shared";
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_common.ts
var reIsPlainProp = /^\w*$/;
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reEscapeChar = /\\(\\)?/g;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var INFINITY = 1 / 0;
var MAX_SAFE_INTEGER = 9007199254740991;
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_isKey.ts
function isKey(value, object) {
if (Array.isArray(value)) {
return false;
}
const type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || // eslint-disable-next-line unicorn/new-for-builtins
object != null && value in Object(object);
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_baseToString.ts
import { isSymbol as isSymbol2 } from "@vue/shared";
var symbolProto = Symbol ? Symbol.prototype : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isSymbol2(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
const result = `${value}`;
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_toString.ts
function toString(value) {
return value == null ? "" : baseToString(value);
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_stringToPath.ts
var stringToPath = function(string) {
string = toString(string);
const result = [];
if (reLeadingDot.test(string)) {
result.push("");
}
string.replace(
rePropName,
(match, number, quote, string2) => {
result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
return "";
}
);
return result;
};
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_castPath.ts
function castPath(value) {
return Array.isArray(value) ? value : stringToPath(value);
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_toKey.ts
import { isSymbol as isSymbol3 } from "@vue/shared";
function toKey(value) {
if (typeof value == "string" || isSymbol3(value)) {
return value;
}
const result = `${value}`;
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/get.ts
function baseGet(object, path) {
path = isKey(path, object) ? [path] : castPath(path);
let index = 0;
const length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : void 0;
}
function get(object, path, defaultValue) {
const result = object == null ? void 0 : baseGet(object, path);
return result === void 0 ? defaultValue : result;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/set.ts
import { isObject } from "@vue/shared";
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_isIndex.ts
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == "number" || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_eq.ts
function eq(value, other) {
return value === other || value !== value && other !== other;
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_assignValue.ts
var objectProto2 = Object.prototype;
var hasOwnProperty = objectProto2.hasOwnProperty;
function assignValue(object, key, value) {
const objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
object[key] = value;
}
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/set.ts
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = isKey(path, object) ? [path] : castPath(path);
let index = -1;
const length = path.length;
const lastIndex = length - 1;
let nested = object;
while (nested != null && ++index < length) {
const key = toKey(path[index]);
let newValue = value;
if (index != lastIndex) {
const objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : void 0;
if (newValue === void 0) {
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
function set(object, path, value) {
return object == null ? object : baseSet(object, path, value);
}
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/debounce.ts
import { isObject as isObject3 } from "@vue/shared";
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_toNumber.ts
import { isObject as isObject2, isSymbol as isSymbol4 } from "@vue/shared";
var NAN = 0 / 0;
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/throttle.ts
import { isObject as isObject4 } from "@vue/shared";
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_hasUnicode.ts
var rsAstralRange = "\\ud800-\\udfff";
var rsComboMarksRange = "\\u0300-\\u036f";
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
var rsComboSymbolsRange = "\\u20d0-\\u20ff";
var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
var rsVarRange = "\\ufe0e\\ufe0f";
var rsZWJ = "\\u200d";
var reHasUnicode = new RegExp(
`[${rsZWJ}${rsAstralRange}${rsComboRange}${rsVarRange}]`
);
// node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_unicodeToArray.ts
var rsAstralRange2 = "\\ud800-\\udfff";
var rsComboMarksRange2 = "\\u0300-\\u036f";
var reComboHalfMarksRange2 = "\\ufe20-\\ufe2f";
var rsComboSymbolsRange2 = "\\u20d0-\\u20ff";
var rsComboRange2 = rsComboMarksRange2 + reComboHalfMarksRange2 + rsComboSymbolsRange2;
var rsVarRange2 = "\\ufe0e\\ufe0f";
var rsAstral = `[${rsAstralRange2}]`;
var rsCombo = `[${rsComboRange2}]`;
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
var rsModifier = `(?:${rsCombo}|${rsFitz})`;
var rsNonAstral = `[^${rsAstralRange2}]`;
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
var rsZWJ2 = "\\u200d";
var reOptMod = `${rsModifier}?`;
var rsOptVar = `[${rsVarRange2}]?`;
var rsOptJoin = `(?:${rsZWJ2}(?:${[rsNonAstral, rsRegional, rsSurrPair].join(
"|"
)})${rsOptVar}${reOptMod})*`;
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
var rsSymbol = `(?:${[
`${rsNonAstral + rsCombo}?`,
rsCombo,
rsRegional,
rsSurrPair,
rsAstral
].join("|")})`;
var reUnicode = new RegExp(`${rsFitz}(?=${rsFitz})|${rsSymbol}${rsSeq}`, "g");
// node_modules/@tuniao/tnui-vue3-uniapp/utils/types.ts
import { isArray, isObject as isObject5, isString } from "@vue/shared";
import {
isArray as isArray2,
isFunction,
isObject as isObject6,
isString as isString2,
isDate,
isPromise,
isSymbol as isSymbol5
} from "@vue/shared";
var isUndefined = (val) => val === void 0;
var isEmpty = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject5(val) && !Object.keys(val).length;
var isElement = (e) => {
if (typeof Element === "undefined")
return false;
return e instanceof Element;
};
var isPropAbsent = (prop) => {
return isNil(prop);
};
var isStringNumber = (val) => {
if (!isString(val))
return false;
return !Number.isNaN(Number(val));
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/objects.ts
import { hasOwn } from "@vue/shared";
var keysOf = (arr) => Object.keys(arr);
var entriesOf = (arr) => Object.entries(arr);
var getProp = (obj, path, defaultValue) => {
return {
get value() {
return get(obj, path, defaultValue);
},
set value(val) {
set(obj, path, val);
}
};
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/vue/props/runtime.ts
var tnPropKey = "__tnPropKey";
var definePropType = (val) => val;
var isTnProp = (val) => isObject6(val) && !!val[tnPropKey];
var buildProp = (prop, key) => {
if (!isObject6(prop) || isTnProp(prop))
return prop;
const { values, required, default: defaultValue, type, validator } = prop;
const _validator = values || validator ? (val) => {
let valid = false;
let allowedValues = [];
if (values) {
allowedValues = Array.from(values);
if (hasOwn(prop, "default")) {
allowedValues.push(defaultValue);
}
valid || (valid = allowedValues.includes(val));
}
if (validator)
valid || (valid = validator(val));
if (!valid && allowedValues.length > 0) {
const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
warn(
`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(
val
)}.`
);
}
return valid;
} : void 0;
const tnProp = {
type,
required: !!required,
validator: _validator,
[tnPropKey]: true
};
if (hasOwn(prop, "default"))
tnProp.default = defaultValue;
return tnProp;
};
var buildProps = (props) => fromPairs(
Object.entries(props).map(([key, option]) => [
key,
buildProp(option, key)
])
);
// node_modules/@tuniao/tnui-vue3-uniapp/utils/vue/icon.ts
var iconPropType = definePropType([String]);
var FormValidateIconsMap = {
validating: "loading",
success: "success-circle",
error: "close-circle"
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/debounce.ts
var debounce2 = (fn, delay, immediate = false) => {
let timer = null;
let isInvoke = false;
const _debounce = function(thisArg, ...args) {
if (timer)
clearTimeout(timer);
if (immediate && !isInvoke) {
fn.apply(thisArg, args);
isInvoke = true;
} else {
timer = setTimeout(() => {
fn.apply(thisArg, args);
isInvoke = false;
}, delay);
}
};
_debounce.cancel = function() {
if (timer)
clearTimeout(timer);
timer = null;
isInvoke = false;
};
return _debounce;
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/throttle.ts
var throttle2 = (fn, interval, option) => {
const { leading, trailing } = option;
let lastTime = 0;
let timer = null;
const _throttle = function(thisArg, ...args) {
const nowTime = Date.now();
if (!lastTime && !leading)
lastTime = nowTime;
const remainTime = interval - (nowTime - lastTime);
if (remainTime <= 0) {
if (timer) {
clearTimeout(timer);
timer = null;
}
fn.apply(thisArg, args);
lastTime = nowTime;
return;
}
if (trailing && !timer) {
timer = setTimeout(() => {
fn.apply(thisArg, args);
timer = null;
lastTime = leading ? Date.now() : 0;
}, remainTime);
}
};
_throttle.cancel = function() {
if (timer)
clearTimeout(timer);
timer = null;
lastTime = 0;
};
return _throttle;
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/typescript.ts
var mutable = (val) => val;
// node_modules/@tuniao/tnui-vue3-uniapp/utils/dom/unit.ts
var formatDomSizeValue = (value, unit = "rpx", empty = true) => {
if (!value)
return empty ? "" : `0${unit}`;
if (isString2(value) && /(^calc)|(%|vw|vh|px|rpx|auto)$/.test(value))
return value;
return `${value}${unit}`;
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/dom/select-query.ts
var createSelectorQuery = (instance) => {
let query = null;
query = uni.createSelectorQuery().in(instance);
return query;
};
var getSelectorNodeInfo = (query, selector) => {
return new Promise((resolve, reject) => {
query.select(selector).boundingClientRect((res) => {
const selectRes = res;
if (selectRes) {
resolve(selectRes);
} else {
reject(new Error(`未找到对应节点: ${selector}`));
}
}).exec();
});
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/rand.ts
var generateId = () => Math.floor(Math.random() * 1e4);
var getRandomInt = (max) => Math.floor(Math.random() * Math.floor(max));
// node_modules/@tuniao/tnui-vue3-uniapp/utils/error.ts
import { isString as isString3 } from "@vue/shared";
var TuniaoUIError = class extends Error {
constructor(message) {
super(message);
this.name = "TuniaoUIError";
}
};
function throwError(scope, msg) {
throw new TuniaoUIError(`[${scope}] ${msg}`);
}
function debugWarn(scope, message) {
if (true) {
const error = isString3(scope) ? new TuniaoUIError(`[${scope}] ${message}`) : scope;
console.warn(error);
}
}
// node_modules/@tuniao/tnui-vue3-uniapp/utils/uniapp/router.ts
function tnNavBack(indexUrl, delta = 1) {
const indexPageUrl = isEmptyVariableInDefault(indexUrl, "/pages/index/index");
const pages = getCurrentPages();
if (pages == null ? void 0 : pages.length) {
const firstPage = pages[0];
if (pages.length === 1 && (!firstPage.route || (firstPage == null ? void 0 : firstPage.route) != indexPageUrl)) {
return tnNavPage(indexPageUrl, "reLaunch");
} else {
uni.navigateBack({
delta
});
return Promise.resolve();
}
} else {
return tnNavPage(indexPageUrl, "reLaunch");
}
}
function tnNavPage(url, type = "navigateTo") {
function handelNavFail(err) {
debugWarn("tnNavPage", `跳转页面失败: ${err}`);
}
return new Promise((resolve, reject) => {
switch (type) {
case "navigateTo":
uni.navigateTo({
url,
success: () => {
resolve();
},
fail: (err) => {
handelNavFail(err);
reject(err);
}
});
break;
case "redirectTo":
uni.redirectTo({
url,
success: () => {
resolve();
},
fail: (err) => {
handelNavFail(err);
reject(err);
}
});
break;
case "reLaunch":
uni.reLaunch({
url,
success: () => {
resolve();
},
fail: (err) => {
handelNavFail(err);
reject(err);
}
});
break;
case "switchTab":
uni.switchTab({
url,
success: () => {
resolve();
},
fail: (err) => {
handelNavFail(err);
reject(err);
}
});
}
});
}
// node_modules/@tuniao/tnui-vue3-uniapp/utils/format.ts
var formatNumber = (value, len = 2, prefixZero = true) => {
let number = 0;
if (typeof value === "string") {
if (value === "")
return value;
number = Number(value);
} else if (typeof value === "number") {
number = value;
}
if (Number.isNaN(number) || number === 0)
return prefixZero ? "00" : "0";
const maxNumber = Math.pow(10, len) - 1;
if (number > maxNumber)
return `${maxNumber}+`;
number = String(number);
return prefixZero ? `00${number}`.slice(Math.max(0, number.length > 2 ? 2 : number.length)) : number;
};
// node_modules/@tuniao/tnui-vue3-uniapp/utils/clone-deep.ts
var cloneDeep = (value, visited = /* @__PURE__ */ new WeakMap()) => {
if (value === null || typeof value !== "object") {
return value;
}
if (visited.has(value)) {
return visited.get(value);
}
if (Array.isArray(value)) {
const clonedArray = value.map((item) => cloneDeep(item, visited));
visited.set(value, clonedArray);
return clonedArray;
}
if (value instanceof Date) {
return new Date(value.getTime());
}
if (value instanceof RegExp) {
const flags = value.flags;
return new RegExp(value.source, flags);
}
const clonedObject = {};
visited.set(value, clonedObject);
for (const key in value) {
if (Object.prototype.hasOwnProperty.call(value, key)) {
clonedObject[key] = cloneDeep(value[key], visited);
}
}
const prototype = Object.getPrototypeOf(value);
Object.setPrototypeOf(clonedObject, cloneDeep(prototype, visited));
return clonedObject;
};
export {
isEmptyVariableInDefault,
isEmptyDoubleVariableInDefault,
withInstall,
withInstallFunction,
withInstallDirective,
withNoopInstall,
isBoolean,
isNumber,
isUndefined,
isEmpty,
isElement,
isPropAbsent,
isStringNumber,
isArray2 as isArray,
isFunction,
isObject6 as isObject,
isString2 as isString,
isDate,
isPromise,
isSymbol5 as isSymbol,
keysOf,
entriesOf,
getProp,
hasOwn,
tnPropKey,
definePropType,
isTnProp,
buildProp,
buildProps,
iconPropType,
FormValidateIconsMap,
debounce2 as debounce,
throttle2 as throttle,
mutable,
formatDomSizeValue,
createSelectorQuery,
getSelectorNodeInfo,
generateId,
getRandomInt,
throwError,
debugWarn,
tnNavBack,
tnNavPage,
formatNumber,
cloneDeep
};
//# sourceMappingURL=chunk-7X6NDDPW.js.map
File diff suppressed because one or more lines are too long
+9
View File
@@ -0,0 +1,9 @@
var __getOwnPropNames = Object.getOwnPropertyNames;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
export {
__commonJS
};
//# sourceMappingURL=chunk-Y2F7D3TJ.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}
+299
View File
@@ -0,0 +1,299 @@
import {
__commonJS
} from "./chunk-Y2F7D3TJ.js";
// node_modules/dayjs/dayjs.min.js
var require_dayjs_min = __commonJS({
"node_modules/dayjs/dayjs.min.js"(exports, module) {
!function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
}(exports, function() {
"use strict";
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
} }, m = function(t2, e2, n2) {
var r2 = String(t2);
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
}, v = { s: m, z: function(t2) {
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
}, m: function t2(e2, n2) {
if (e2.date() < n2.date())
return -t2(n2, e2);
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
}, a: function(t2) {
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
}, p: function(t2) {
return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
}, u: function(t2) {
return void 0 === t2;
} }, g = "en", D = {};
D[g] = M;
var p = "$isDayjsObject", S = function(t2) {
return t2 instanceof _ || !(!t2 || !t2[p]);
}, w = function t2(e2, n2, r2) {
var i2;
if (!e2)
return g;
if ("string" == typeof e2) {
var s2 = e2.toLowerCase();
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
var u2 = e2.split("-");
if (!i2 && u2.length > 1)
return t2(u2[0]);
} else {
var a2 = e2.name;
D[a2] = e2, i2 = a2;
}
return !r2 && i2 && (g = i2), i2 || !r2 && g;
}, O = function(t2, e2) {
if (S(t2))
return t2.clone();
var n2 = "object" == typeof e2 ? e2 : {};
return n2.date = t2, n2.args = arguments, new _(n2);
}, b = v;
b.l = w, b.i = S, b.w = function(t2, e2) {
return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
};
var _ = function() {
function M2(t2) {
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
}
var m2 = M2.prototype;
return m2.parse = function(t2) {
this.$d = function(t3) {
var e2 = t3.date, n2 = t3.utc;
if (null === e2)
return /* @__PURE__ */ new Date(NaN);
if (b.u(e2))
return /* @__PURE__ */ new Date();
if (e2 instanceof Date)
return new Date(e2);
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
var r2 = e2.match($);
if (r2) {
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
}
}
return new Date(e2);
}(t2), this.init();
}, m2.init = function() {
var t2 = this.$d;
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
}, m2.$utils = function() {
return b;
}, m2.isValid = function() {
return !(this.$d.toString() === l);
}, m2.isSame = function(t2, e2) {
var n2 = O(t2);
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
}, m2.isAfter = function(t2, e2) {
return O(t2) < this.startOf(e2);
}, m2.isBefore = function(t2, e2) {
return this.endOf(e2) < O(t2);
}, m2.$g = function(t2, e2, n2) {
return b.u(t2) ? this[e2] : this.set(n2, t2);
}, m2.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, m2.valueOf = function() {
return this.$d.getTime();
}, m2.startOf = function(t2, e2) {
var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
return r2 ? i2 : i2.endOf(a);
}, $2 = function(t3, e3) {
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
switch (f2) {
case h:
return r2 ? l2(1, 0) : l2(31, 11);
case c:
return r2 ? l2(1, M3) : l2(0, M3 + 1);
case o:
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
case a:
case d:
return $2(v2 + "Hours", 0);
case u:
return $2(v2 + "Minutes", 1);
case s:
return $2(v2 + "Seconds", 2);
case i:
return $2(v2 + "Milliseconds", 3);
default:
return this.clone();
}
}, m2.endOf = function(t2) {
return this.startOf(t2, false);
}, m2.$set = function(t2, e2) {
var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
if (o2 === c || o2 === h) {
var y2 = this.clone().set(d, 1);
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
} else
l2 && this.$d[l2]($2);
return this.init(), this;
}, m2.set = function(t2, e2) {
return this.clone().$set(t2, e2);
}, m2.get = function(t2) {
return this[b.p(t2)]();
}, m2.add = function(r2, f2) {
var d2, l2 = this;
r2 = Number(r2);
var $2 = b.p(f2), y2 = function(t2) {
var e2 = O(l2);
return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
};
if ($2 === c)
return this.set(c, this.$M + r2);
if ($2 === h)
return this.set(h, this.$y + r2);
if ($2 === a)
return y2(1);
if ($2 === o)
return y2(7);
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
return b.w(m3, this);
}, m2.subtract = function(t2, e2) {
return this.add(-1 * t2, e2);
}, m2.format = function(t2) {
var e2 = this, n2 = this.$locale();
if (!this.isValid())
return n2.invalidDate || l;
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
}, d2 = function(t3) {
return b.s(s2 % 12 || 12, t3, "0");
}, $2 = f2 || function(t3, e3, n3) {
var r3 = t3 < 12 ? "AM" : "PM";
return n3 ? r3.toLowerCase() : r3;
};
return r2.replace(y, function(t3, r3) {
return r3 || function(t4) {
switch (t4) {
case "YY":
return String(e2.$y).slice(-2);
case "YYYY":
return b.s(e2.$y, 4, "0");
case "M":
return a2 + 1;
case "MM":
return b.s(a2 + 1, 2, "0");
case "MMM":
return h2(n2.monthsShort, a2, c2, 3);
case "MMMM":
return h2(c2, a2);
case "D":
return e2.$D;
case "DD":
return b.s(e2.$D, 2, "0");
case "d":
return String(e2.$W);
case "dd":
return h2(n2.weekdaysMin, e2.$W, o2, 2);
case "ddd":
return h2(n2.weekdaysShort, e2.$W, o2, 3);
case "dddd":
return o2[e2.$W];
case "H":
return String(s2);
case "HH":
return b.s(s2, 2, "0");
case "h":
return d2(1);
case "hh":
return d2(2);
case "a":
return $2(s2, u2, true);
case "A":
return $2(s2, u2, false);
case "m":
return String(u2);
case "mm":
return b.s(u2, 2, "0");
case "s":
return String(e2.$s);
case "ss":
return b.s(e2.$s, 2, "0");
case "SSS":
return b.s(e2.$ms, 3, "0");
case "Z":
return i2;
}
return null;
}(t3) || i2.replace(":", "");
});
}, m2.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, m2.diff = function(r2, d2, l2) {
var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
return b.m(y2, m3);
};
switch (M3) {
case h:
$2 = D2() / 12;
break;
case c:
$2 = D2();
break;
case f:
$2 = D2() / 3;
break;
case o:
$2 = (g2 - v2) / 6048e5;
break;
case a:
$2 = (g2 - v2) / 864e5;
break;
case u:
$2 = g2 / n;
break;
case s:
$2 = g2 / e;
break;
case i:
$2 = g2 / t;
break;
default:
$2 = g2;
}
return l2 ? $2 : b.a($2);
}, m2.daysInMonth = function() {
return this.endOf(c).$D;
}, m2.$locale = function() {
return D[this.$L];
}, m2.locale = function(t2, e2) {
if (!t2)
return this.$L;
var n2 = this.clone(), r2 = w(t2, e2, true);
return r2 && (n2.$L = r2), n2;
}, m2.clone = function() {
return b.w(this.$d, this);
}, m2.toDate = function() {
return new Date(this.valueOf());
}, m2.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, m2.toISOString = function() {
return this.$d.toISOString();
}, m2.toString = function() {
return this.$d.toUTCString();
}, M2;
}(), k = _.prototype;
return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
k[t2[1]] = function(e2) {
return this.$g(e2, t2[0], t2[1]);
};
}), O.extend = function(t2, e2) {
return t2.$i || (t2(e2, _, O), t2.$i = true), O;
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
return O(1e3 * t2);
}, O.en = D[g], O.Ls = D, O.p = {}, O;
});
}
});
export default require_dayjs_min();
//# sourceMappingURL=dayjs.js.map
+7
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
{
"type": "module"
}
+3676
View File
File diff suppressed because one or more lines are too long
+7
View File
File diff suppressed because one or more lines are too long