UNPKG

choo-taro-ui-vue3

Version:

Taro UI Rewritten in Vue 3.0

10,916 lines 372 kB
import { computed, defineComponent, warn, ref, reactive, watch, toRefs, normalizeClass, normalizeStyle, openBlock, createElementBlock, createCommentVNode, toDisplayString, createElementVNode, renderSlot, mergeProps, createTextVNode, resolveComponent, withCtx, createBlock, createVNode, renderList, Fragment, toRef, onMounted, nextTick, onUnmounted, onBeforeMount, h, Transition } from 'vue';
import Taro from '@tarojs/taro';

function propsFactory(props) {
  return (defaults) => {
    if (!defaults) {
      return props;
    } else {
      return Object.keys(props).reduce((obj, prop) => {
        const definition = props[prop];
        if (prop in defaults) {
          if (typeof definition === "object" && definition != null && !Array.isArray(definition)) {
            obj[prop] = {
              ...definition,
              default: defaults[prop]
            };
          } else {
            obj[prop] = { type: props[prop], default: defaults[prop] };
          }
        } else {
          obj[prop] = definition;
        }
        return obj;
      }, {});
    }
  };
}

const { getEnv, ENV_TYPE } = Taro;
const ENV$2 = Taro.getEnv();
const getEnvs = () => {
  const env = getEnv();
  return {
    isWEAPP: env === ENV_TYPE.WEAPP,
    isALIPAY: env === ENV_TYPE.ALIPAY,
    isWEB: env === ENV_TYPE.WEB
  };
};
function pxTransform(size, designWidth) {
  if (!size)
    return "";
  if (!designWidth) {
    designWidth = 750;
  }
  return Taro.pxTransform(size, designWidth);
}
function delay(delayTime = 500) {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve();
    }, delayTime);
  });
}
function delayQuerySelector(_, selectorStr, delayTime = 500) {
  const selector = Taro.createSelectorQuery();
  return new Promise((resolve) => {
    delay(delayTime).then(() => {
      selector.select(selectorStr).boundingClientRect().exec((res) => {
        resolve(res);
      });
    });
  });
}
function cssStringToObject(css) {
  const o = {};
  const r = /(?<=^|;)\s*([^:]+)\s*:\s*([^;]+)\s*/g;
  css.replace(r, (m, p, v) => o[p.replace(/-(.)/g, (m2, p2) => p2.toUpperCase())] = v);
  return o;
}
let scrollTop = 0;
function handleTouchScroll(flag) {
  if (ENV$2 !== Taro.ENV_TYPE.WEB) {
    return;
  }
  if (flag) {
    scrollTop = document.documentElement.scrollTop;
    document.body.classList.add("at-frozen");
    document.body.style.top = `${-scrollTop}px`;
  } else {
    document.body.style.top = "";
    document.body.classList.remove("at-frozen");
    document.documentElement.scrollTop = scrollTop;
  }
}
function uuid(len = 8, radix = 16) {
  const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
  const value = [];
  let i = 0;
  radix = radix || chars.length;
  if (len) {
    for (i = 0; i < len; i++)
      value[i] = chars[0 | Math.random() * radix];
  } else {
    let r;
    value[8] = value[13] = value[18] = value[23] = "-";
    value[14] = "4";
    for (i = 0; i < 36; i++) {
      if (!value[i]) {
        r = 0 | Math.random() * 16;
        value[i] = chars[i === 19 ? r & 3 | 8 : r];
      }
    }
  }
  return value.join("");
}
function getEventDetail(event) {
  let detail;
  switch (ENV$2) {
    case Taro.ENV_TYPE.WEB:
      detail = {
        pageX: event.pageX,
        pageY: event.pageY,
        clientX: event.clientX,
        clientY: event.clientY,
        offsetX: event.offsetX,
        offsetY: event.offsetY,
        x: event.x,
        y: event.y
      };
      break;
    case Taro.ENV_TYPE.WEAPP:
      detail = {
        pageX: event.touches[0].pageX,
        pageY: event.touches[0].pageY,
        clientX: event.touches[0].clientX,
        clientY: event.touches[0].clientY,
        offsetX: event.target.offsetLeft,
        offsetY: event.target.offsetTop,
        x: event.target.x,
        y: event.target.y
      };
      break;
    case Taro.ENV_TYPE.ALIPAY:
      detail = {
        pageX: event.target.pageX,
        pageY: event.target.pageY,
        clientX: event.target.clientX,
        clientY: event.target.clientY,
        offsetX: event.target.offsetLeft,
        offsetY: event.target.offsetTop,
        x: event.target.x,
        y: event.target.y
      };
      break;
    case Taro.ENV_TYPE.SWAN:
      detail = {
        pageX: event.changedTouches[0].pageX,
        pageY: event.changedTouches[0].pageY,
        clientX: event.target.clientX,
        clientY: event.target.clientY,
        offsetX: event.target.offsetLeft,
        offsetY: event.target.offsetTop,
        x: event.detail.x,
        y: event.detail.y
      };
      break;
    default:
      detail = {
        pageX: 0,
        pageY: 0,
        clientX: 0,
        clientY: 0,
        offsetX: 0,
        offsetY: 0,
        x: 0,
        y: 0
      };
      console.warn("getEventDetail\u6682\u672A\u652F\u6301\u8BE5\u73AF\u5883");
      break;
  }
  return detail;
}
function delayGetScrollOffset({ delayTime = 500 }) {
  return new Promise((resolve) => {
    delay(delayTime).then(() => {
      Taro.createSelectorQuery().selectViewport().scrollOffset().exec((res) => {
        resolve(res);
      });
    });
  });
}
function delayGetClientRect({ selectorStr, delayTime = 500 }) {
  const selector = Taro.createSelectorQuery();
  return new Promise((resolve) => {
    delay(delayTime).then(() => {
      selector.select(selectorStr).boundingClientRect().exec((res) => {
        resolve(res);
      });
    });
  });
}
function convertToUnit(str, unit = "px") {
  if (str == null || str === "") {
    return void 0;
  } else if (isNaN(+str)) {
    return String(str);
  } else {
    return `${Number(str)}${unit}`;
  }
}

const allDimensionsProps = {
  height: {
    type: [Number, String]
  },
  maxHeight: {
    type: [Number, String]
  },
  maxWidth: {
    type: [Number, String]
  },
  minHeight: {
    type: [Number, String]
  },
  minWidth: {
    type: [Number, String]
  },
  width: {
    type: [Number, String]
  }
};
function dimensionsFactory(...possibleProps) {
  const selectedProps = possibleProps.length ? possibleProps : Object.keys(allDimensionsProps);
  const makeDimensionsProps = propsFactory(selectedProps.reduce((obj, prop) => {
    obj[prop] = allDimensionsProps[prop];
    return obj;
  }, {}));
  const useDimensions = (props) => {
    const dimensions = computed(() => {
      return selectedProps.reduce((obj, key) => {
        const value = props[key];
        if (value) {
          obj.style[key] = convertToUnit(value);
        }
        return obj;
      }, { style: {} });
    });
    return { dimensions };
  };
  return {
    makeDimensionsProps,
    useDimensions
  };
}

const makeElevationProps = propsFactory({
  elevation: {
    type: [Number, String],
    validator(v) {
      const value = parseInt(v);
      return !isNaN(value) && value >= 0 && value <= 24;
    }
  },
  flat: Boolean
});
function useElevationClasses(props) {
  const elevationClasses = computed(() => {
    const { elevation = props.flat ? 0 : void 0 } = props;
    return elevation != null && elevation !== "" ? { [`elevation-${elevation}`]: true } : {};
  });
  return { elevationClasses };
}

function useIconClasses(icon, allowPrefixClass) {
  const iconClasses = computed(() => {
    if (allowPrefixClass) {
      return {
        [`${icon?.prefixClass || "at-icon"}`]: Boolean(icon),
        [`${icon?.prefixClass || "at-icon"}-${icon?.value}`]: Boolean(icon && icon.value),
        [`${icon?.class}`]: Boolean(icon?.class)
      };
    }
    return {
      "at-icon": Boolean(icon),
      [`at-icon-${icon?.value}`]: Boolean(icon && icon.value),
      [`${icon?.class}`]: Boolean(icon?.class)
    };
  });
  return {
    iconClasses
  };
}
function useIconStyle(icon, defaultColor = "", defaultSize, pxTransform) {
  const iconStyle = computed(() => {
    let size;
    if (Boolean(icon && icon.size)) {
      size = pxTransform ? pxTransform(icon.size) : `${icon.size}px`;
    } else {
      size = Boolean(defaultSize) ? `${defaultSize}px` : "";
    }
    const style = Boolean(icon?.style) ? typeof icon.style === "string" ? cssStringToObject(icon.style) : icon.style : {};
    return {
      color: Boolean(icon && icon.color) ? icon.color : defaultColor,
      fontSize: size,
      ...style
    };
  });
  return {
    iconStyle
  };
}

function useModelValue(props, emit, name = "modelValue") {
  return computed({
    get: () => props[name],
    set: (value) => emit(`update:${name}`, value)
  });
}

const AtAccordion = defineComponent({
  name: "AtAccordion",
  emits: {
    click: (open) => {
      if (typeof open === "boolean") {
        return true;
      } else {
        warn("click payload should be type boolean");
        return false;
      }
    }
  },
  props: {
    open: Boolean,
    title: {
      type: String,
      default: ""
    },
    icon: {
      type: Object,
      default: () => ({ value: "" })
    },
    hasBorder: {
      type: Boolean,
      default: true
    },
    isAnimation: {
      type: Boolean,
      default: true
    },
    note: {
      type: String,
      default: ""
    }
  },
  setup(props, { emit }) {
    const startOpen = ref(false);
    const isCompleted = ref(true);
    const contentID = ref("content");
    const state = reactive({
      wrapperHeight: "unset"
    });
    const { iconStyle } = useIconStyle(props.icon);
    const { iconClasses } = useIconClasses(props.icon, true);
    const contentStyle = computed(() => ({
      height: isCompleted.value ? "" : state.wrapperHeight === "unset" ? state.wrapperHeight : `${state.wrapperHeight}px`
    }));
    watch(() => props.open, (open) => {
      startOpen.value = !!open && !!props.isAnimation;
      toggleWithAnimation();
    });
    function handleClick() {
      if (!isCompleted.value)
        return;
      contentID.value = "content_" + uuid();
      emit("click", !props.open);
    }
    function toggleWithAnimation() {
      if (!isCompleted.value || !props.isAnimation)
        return;
      isCompleted.value = false;
      delayQuerySelector(this, `#${contentID.value}.at-accordion__body`, 30).then((rect) => {
        const height = parseInt(rect[0].height.toString());
        const startHeight = props.open ? 0 : height;
        const endHeight = props.open ? height : 0;
        startOpen.value = false;
        state.wrapperHeight = startHeight;
        setTimeout(() => {
          state.wrapperHeight = endHeight;
        }, 100);
        setTimeout(() => {
          isCompleted.value = true;
        }, 700);
      });
    }
    return {
      ...toRefs(props),
      contentID,
      startOpen,
      isCompleted,
      iconClasses,
      iconStyle,
      contentStyle,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeClass$o = normalizeClass, _normalizeStyle$o = normalizeStyle, _openBlock$$ = openBlock, _createElementBlock$$ = createElementBlock, _createCommentVNode$w = createCommentVNode, _toDisplayString$A = toDisplayString, _createElementVNode$F = createElementVNode, _renderSlot$v = renderSlot, _mergeProps$S = mergeProps;

const _hoisted_1$L = { class: "at-accordion__info" };
const _hoisted_2$B = { class: "at-accordion__info__title" };
const _hoisted_3$v = { class: "at-accordion__info__note" };
const _hoisted_4$p = /*#__PURE__*/_createElementVNode$F("text", { class: "at-icon at-icon-chevron-down" }, null, -1 /* HOISTED */);
const _hoisted_5$l = [
  _hoisted_4$p
];
const _hoisted_6$d = ["id"];

function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$$(), _createElementBlock$$("view", _mergeProps$S(_ctx.$attrs, { class: "at-accordion" }), [
    _createElementVNode$F("view", {
      class: _normalizeClass$o(['at-accordion__header', {
        'at-accordion__header--noborder': !_ctx.hasBorder
      }]),
      onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
    }, [
      (Boolean(_ctx.icon && _ctx.icon.value))
        ? (_openBlock$$(), _createElementBlock$$("text", {
            key: 0,
            class: _normalizeClass$o(['at-accordion__icon', _ctx.iconClasses]),
            style: _normalizeStyle$o(_ctx.iconStyle)
          }, null, 6 /* CLASS, STYLE */))
        : _createCommentVNode$w("v-if", true),
      _createElementVNode$F("view", _hoisted_1$L, [
        _createElementVNode$F("view", _hoisted_2$B, _toDisplayString$A(_ctx.title), 1 /* TEXT */),
        _createElementVNode$F("view", _hoisted_3$v, _toDisplayString$A(_ctx.note), 1 /* TEXT */)
      ]),
      _createElementVNode$F("view", {
        class: _normalizeClass$o(['at-accordion__arrow', {
        'at-accordion__arrow--folded': !!_ctx.open
      }])
      }, _hoisted_5$l, 2 /* CLASS */)
    ], 34 /* CLASS, HYDRATE_EVENTS */),
    _createElementVNode$F("view", {
      class: _normalizeClass$o([
        'at-accordion__content',
        {
          'at-accordion__content--inactive': (!_ctx.open && _ctx.isCompleted) || _ctx.startOpen
        }
      ]),
      style: _normalizeStyle$o(_ctx.contentStyle)
    }, [
      _createElementVNode$F("view", {
        id: _ctx.contentID,
        class: "at-accordion__body"
      }, [
        _renderSlot$v(_ctx.$slots, "default")
      ], 8 /* PROPS */, _hoisted_6$d)
    ], 6 /* CLASS, STYLE */)
  ], 16 /* FULL_PROPS */))
}


AtAccordion.render = _sfc_render$$;

const AtActionSheetHeader = defineComponent({
  name: "AtActionSheetHeader"
});

// Binding optimization for webpack code-split
const _renderSlot$u = renderSlot, _openBlock$_ = openBlock, _createElementBlock$_ = createElementBlock;

const _hoisted_1$K = { class: "at-action-sheet__header" };

function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$_(), _createElementBlock$_("view", _hoisted_1$K, [
    _renderSlot$u(_ctx.$slots, "default")
  ]))
}


AtActionSheetHeader.render = _sfc_render$_;

const AtActionSheetBody = defineComponent({
  name: "AtActionSheetBody"
});

// Binding optimization for webpack code-split
const _renderSlot$t = renderSlot, _openBlock$Z = openBlock, _createElementBlock$Z = createElementBlock;

const _hoisted_1$J = { class: "at-action-sheet__body" };

function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$Z(), _createElementBlock$Z("view", _hoisted_1$J, [
    _renderSlot$t(_ctx.$slots, "default")
  ]))
}


AtActionSheetBody.render = _sfc_render$Z;

const AtActionSheetFooter = defineComponent({
  name: "AtActionSheetFooter",
  emits: ["click"],
  setup(_, { emit }) {
    function handleClick(...args) {
      emit("click", ...args);
    }
    return {
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$s = renderSlot, _openBlock$Y = openBlock, _createElementBlock$Y = createElementBlock;

function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$Y(), _createElementBlock$Y("view", {
    class: "at-action-sheet__footer",
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }, [
    _renderSlot$s(_ctx.$slots, "default")
  ], 32 /* HYDRATE_EVENTS */))
}


AtActionSheetFooter.render = _sfc_render$Y;

const AtActionSheet = defineComponent({
  name: "AtActionSheet",
  components: {
    AtActionSheetHeader,
    AtActionSheetBody,
    AtActionSheetFooter
  },
  emits: ["close", "cancel"],
  props: {
    isOpened: Boolean,
    title: {
      type: String,
      default: ""
    },
    cancelText: {
      type: String,
      default: ""
    }
  },
  setup(props, { emit }) {
    const opened = ref(props.isOpened);
    watch(() => props.isOpened, (isOpened) => {
      if (isOpened !== opened.value) {
        opened.value = isOpened;
      }
      !isOpened && handleClose();
    });
    function handleClose() {
      emit("close");
    }
    function handleCancel() {
      emit("cancel");
      close();
    }
    function close() {
      opened.value = false;
      handleClose();
    }
    function handleTouchmove(e) {
      e.stopPropagation();
      e.preventDefault();
    }
    return {
      ...toRefs(props),
      opened,
      close,
      handleCancel,
      handleTouchmove
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$E = createElementVNode, _toDisplayString$z = toDisplayString, _createTextVNode$2 = createTextVNode, _resolveComponent$d = resolveComponent, _withCtx$7 = withCtx, _openBlock$X = openBlock, _createBlock$9 = createBlock, _createCommentVNode$v = createCommentVNode, _renderSlot$r = renderSlot, _createVNode$8 = createVNode, _mergeProps$R = mergeProps, _createElementBlock$X = createElementBlock;

const _hoisted_1$I = { class: "at-action-sheet__container" };

function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_action_sheet_header = _resolveComponent$d("at-action-sheet-header");
  const _component_at_action_sheet_body = _resolveComponent$d("at-action-sheet-body");
  const _component_at_action_sheet_footer = _resolveComponent$d("at-action-sheet-footer");

  return (_openBlock$X(), _createElementBlock$X("view", _mergeProps$R(_ctx.$attrs, {
    class: ['at-action-sheet', {
      'at-action-sheet--active': _ctx.opened,
    }],
    catchMove: true,
    onTouchmove: _cache[1] || (_cache[1] = (...args) => (_ctx.handleTouchmove && _ctx.handleTouchmove(...args)))
  }), [
    _createElementVNode$E("view", {
      class: "at-action-sheet__overlay",
      onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.close && _ctx.close(...args)))
    }, null, 32 /* HYDRATE_EVENTS */),
    _createElementVNode$E("view", _hoisted_1$I, [
      (_ctx.title)
        ? (_openBlock$X(), _createBlock$9(_component_at_action_sheet_header, { key: 0 }, {
            default: _withCtx$7(() => [
              _createTextVNode$2(_toDisplayString$z(_ctx.title), 1 /* TEXT */)
            ]),
            _: 1 /* STABLE */
          }))
        : _createCommentVNode$v("v-if", true),
      _createVNode$8(_component_at_action_sheet_body, null, {
        default: _withCtx$7(() => [
          _renderSlot$r(_ctx.$slots, "default")
        ]),
        _: 3 /* FORWARDED */
      }),
      (_ctx.cancelText)
        ? (_openBlock$X(), _createBlock$9(_component_at_action_sheet_footer, {
            key: 1,
            onClick: _ctx.handleCancel
          }, {
            default: _withCtx$7(() => [
              _createTextVNode$2(_toDisplayString$z(_ctx.cancelText), 1 /* TEXT */)
            ]),
            _: 1 /* STABLE */
          }, 8 /* PROPS */, ["onClick"]))
        : _createCommentVNode$v("v-if", true)
    ])
  ], 16 /* FULL_PROPS */))
}


AtActionSheet.render = _sfc_render$X;

const AtActionSheetItem = defineComponent({
  name: "AtActionSheetItem",
  emits: ["click"],
  setup(_, { emit }) {
    function handleClick(e) {
      emit("click", e);
    }
    return {
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$q = renderSlot, _mergeProps$Q = mergeProps, _openBlock$W = openBlock, _createElementBlock$W = createElementBlock;

function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$W(), _createElementBlock$W("view", _mergeProps$Q(_ctx.$attrs, {
    class: "at-action-sheet__item",
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    _renderSlot$q(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtActionSheetItem.render = _sfc_render$W;

const AtLoading = defineComponent({
  name: "AtLoading",
  props: {
    size: { type: [String, Number], default: 0 },
    color: [String, Number]
  },
  setup(props) {
    const loadingSize = computed(() => {
      return pxTransform(parseInt(`${props.size}`));
    });
    const sizeStyle = computed(() => ({
      width: loadingSize.value,
      height: loadingSize.value
    }));
    const ringStyle = computed(() => ({
      ...sizeStyle.value,
      border: props.color ? `1px solid ${props.color}` : "",
      "border-color": props.color ? `${props.color} transparent transparent transparent` : ""
    }));
    return {
      sizeStyle,
      ringStyle
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$i = renderList, _Fragment$i = Fragment, _openBlock$V = openBlock, _createElementBlock$V = createElementBlock, _normalizeStyle$n = normalizeStyle, _createElementVNode$D = createElementVNode, _mergeProps$P = mergeProps;

function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$V(), _createElementBlock$V("view", _mergeProps$P(_ctx.$attrs, {
    class: "at-loading",
    style: _ctx.sizeStyle
  }), [
    (_openBlock$V(), _createElementBlock$V(_Fragment$i, null, _renderList$i(3, (n) => {
      return _createElementVNode$D("view", {
        key: n,
        style: _normalizeStyle$n(_ctx.ringStyle),
        class: "at-loading__ring"
      }, null, 4 /* STYLE */)
    }), 64 /* STABLE_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtLoading.render = _sfc_render$V;

const AtActivityIndicator = defineComponent({
  name: "AtActivityIndicator",
  components: {
    AtLoading
  },
  props: {
    size: {
      type: Number,
      default: 48
    },
    mode: {
      type: String,
      default: "normal"
    },
    color: {
      type: String,
      default: "#6190E8"
    },
    content: {
      type: String,
      default: ""
    },
    isOpened: {
      type: Boolean,
      default: true
    }
  },
  setup(props) {
    return { ...toRefs(props) };
  }
});

// Binding optimization for webpack code-split
const _resolveComponent$c = resolveComponent, _createVNode$7 = createVNode, _createElementVNode$C = createElementVNode, _toDisplayString$y = toDisplayString, _openBlock$U = openBlock, _createElementBlock$U = createElementBlock, _createCommentVNode$u = createCommentVNode, _mergeProps$O = mergeProps;

const _hoisted_1$H = { class: "at-activity-indicator__body" };
const _hoisted_2$A = {
  key: 0,
  class: "at-activity-indicator__content"
};

function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_loading = _resolveComponent$c("at-loading");

  return (_openBlock$U(), _createElementBlock$U("view", _mergeProps$O(_ctx.$attrs, {
    class: ['at-activity-indicator', {
      'at-activity-indicator--center': _ctx.mode === 'center',
      'at-activity-indicator--isopened': _ctx.isOpened
    }]
  }), [
    _createElementVNode$C("view", _hoisted_1$H, [
      _createVNode$7(_component_at_loading, {
        size: _ctx.size,
        color: _ctx.color
      }, null, 8 /* PROPS */, ["size", "color"])
    ]),
    (_ctx.content)
      ? (_openBlock$U(), _createElementBlock$U("text", _hoisted_2$A, _toDisplayString$y(_ctx.content), 1 /* TEXT */))
      : _createCommentVNode$u("v-if", true)
  ], 16 /* FULL_PROPS */))
}


AtActivityIndicator.render = _sfc_render$U;

const SIZE_CLASS$2 = {
  large: "large",
  normal: "normal",
  small: "small"
};
const AtAvatar = defineComponent({
  name: "AtAvatar",
  props: {
    size: {
      type: String,
      default: "normal",
      validator: (prop) => ["large", "normal", "small"].includes(prop)
    },
    circle: Boolean,
    text: String,
    image: String,
    openData: Object
  },
  setup(props) {
    const { isWEAPP } = getEnvs();
    const letter = computed(() => {
      return Boolean(props.text) ? String(props.text)[0] : "";
    });
    const iconSize = computed(() => {
      let size = SIZE_CLASS$2[props.size];
      if (!size) {
        warn("Prop `size` must be one of <'large' | 'normal' | 'small'>", "\nActual: '", props.size, "', now use 'normal' instead!");
        size = "normal";
      }
      return size;
    });
    return {
      ...toRefs(props),
      isWEAPP,
      letter,
      iconSize
    };
  }
});

// Binding optimization for webpack code-split
const _openBlock$T = openBlock, _createElementBlock$T = createElementBlock, _toDisplayString$x = toDisplayString, _mergeProps$N = mergeProps;

const _hoisted_1$G = ["type"];
const _hoisted_2$z = ["src"];
const _hoisted_3$u = {
  key: 2,
  class: "at-avatar__text"
};

function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$T(), _createElementBlock$T("view", _mergeProps$N(_ctx.$attrs, {
    class: ['at-avatar', {
			'at-avatar--circle': _ctx.circle,
			[`at-avatar--${_ctx.iconSize}`]: _ctx.iconSize,
    }]
  }), [
    (_ctx.isWEAPP && _ctx.openData && _ctx.openData.type === 'userAvatarUrl')
      ? (_openBlock$T(), _createElementBlock$T("open-data", {
          key: 0,
          type: _ctx.openData.type
        }, null, 8 /* PROPS */, _hoisted_1$G))
      : (_ctx.image)
        ? (_openBlock$T(), _createElementBlock$T("image", {
            key: 1,
            class: "at-avatar__img",
            src: _ctx.image
          }, null, 8 /* PROPS */, _hoisted_2$z))
        : (_openBlock$T(), _createElementBlock$T("text", _hoisted_3$u, _toDisplayString$x(_ctx.letter), 1 /* TEXT */))
  ], 16 /* FULL_PROPS */))
}


AtAvatar.render = _sfc_render$T;

const AtBadge = defineComponent({
  name: "AtBadge",
  props: {
    dot: Boolean,
    value: {
      type: [String, Number],
      default: ""
    },
    maxValue: {
      type: Number,
      default: 99
    }
  },
  setup(props) {
    const formatedValue = computed(() => formatValue(props.value, props.maxValue));
    function formatValue(value, maxValue) {
      if (!Boolean(value))
        return "";
      const numValue = +value;
      if (Number.isNaN(numValue)) {
        return value;
      }
      return numValue > maxValue ? `${maxValue}+` : numValue;
    }
    return {
      dot: toRef(props, "dot"),
      formatedValue
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$p = renderSlot, _openBlock$S = openBlock, _createElementBlock$S = createElementBlock, _createCommentVNode$t = createCommentVNode, _toDisplayString$w = toDisplayString, _mergeProps$M = mergeProps;

const _hoisted_1$F = {
  key: 0,
  class: "at-badge__dot"
};
const _hoisted_2$y = {
  key: 1,
  class: "at-badge__num"
};

function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$S(), _createElementBlock$S("view", _mergeProps$M(_ctx.$attrs, { class: "at-badge" }), [
    _renderSlot$p(_ctx.$slots, "default"),
    (_ctx.dot)
      ? (_openBlock$S(), _createElementBlock$S("view", _hoisted_1$F))
      : (_ctx.formatedValue !== '')
        ? (_openBlock$S(), _createElementBlock$S("view", _hoisted_2$y, _toDisplayString$w(_ctx.formatedValue), 1 /* TEXT */))
        : _createCommentVNode$t("v-if", true)
  ], 16 /* FULL_PROPS */))
}


AtBadge.render = _sfc_render$S;

const SIZE_CLASS$1 = {
  normal: "normal",
  small: "small"
};
const TYPE_CLASS$1 = {
  primary: "primary",
  secondary: "secondary"
};
const AtButton = defineComponent({
  name: "AtButton",
  components: {
    AtLoading
  },
  emits: [
    "click",
    "getUserInfo",
    "getAuthorize",
    "contact",
    "getPhoneNumber",
    "error",
    "openSetting",
    "launchapp"
  ],
  props: {
    size: {
      type: String,
      default: "normal",
      validator: (prop) => ["normal", "small"].includes(prop)
    },
    type: {
      type: String,
      default: "",
      validator: (prop) => ["primary", "secondary", ""].includes(prop)
    },
    circle: Boolean,
    full: Boolean,
    loading: Boolean,
    disabled: Boolean,
    formType: {
      type: String,
      default: "",
      validator: (prop) => ["submit", "reset", ""].includes(prop)
    },
    openType: {
      type: String,
      validator: (prop) => [
        "contact",
        "contactShare",
        "share",
        "getAuthorize",
        "getPhoneNumber",
        "getUserInfo",
        "lifestyle",
        "launchApp",
        "openSetting",
        "feedback"
      ].includes(prop)
    },
    lang: {
      type: String,
      default: "en"
    },
    sessionFrom: String,
    sendMessageTitle: String,
    sendMessagePath: String,
    sendMessageImg: String,
    showMessageCard: Boolean,
    appParameter: String,
    scope: String
  },
  setup(props, { attrs, emit }) {
    const { isWEAPP, isALIPAY, isWEB } = getEnvs();
    const rootClasses = computed(() => ["at-button", {
      [`at-button--${Object.keys(SIZE_CLASS$1).includes(props.size) ? props.size : "normal"}`]: Boolean(props.size),
      [`at-button--${Object.keys(TYPE_CLASS$1).includes(props.type) ? props.type : "primary"}`]: Boolean(props.type),
      "at-button--circle": props.circle,
      "at-button--disabled": props.disabled,
      "at-button--full": props.full,
      "at-button--icon": props.loading
    }]);
    const loadingColor = computed(() => props.type === "primary" ? "#fff" : "");
    const loadingSize = computed(() => props.size === "small" ? "30" : "0");
    function handleClick(event) {
      if (Boolean(attrs["onTap"])) {
        warn("AtButton \u7ED1\u5B9A\u7684\u70B9\u51FB\u4E8B\u4EF6\u5E94\u4E3A `click`\uFF0C \u800C\u975E `tap`\u3002", '\u6B63\u786E\u793A\u4F8B\uFF1A`<at-button @click="eventHandler"/>`');
      }
      if (!props.disabled) {
        emit("click", event);
      }
    }
    function handleGetUserInfo(event) {
      warn("2021 \u5E74 4 \u6708 13 \u65E5\u540E\u53D1\u5E03\u7684\u65B0\u7248\u672C\u5C0F\u7A0B\u5E8F\uFF0C", '\u5F00\u53D1\u8005\u8C03\u7528 `wx.getUserInfo` \u6216 `<button open-type="getUserInfo"/>` \u5C06\u4E0D\u518D\u5F39\u51FA\u5F39\u7A97\uFF0C', "\u76F4\u63A5\u8FD4\u56DE\u533F\u540D\u7684\u7528\u6237\u4E2A\u4EBA\u4FE1\u606F\u3002", "\u8BE6\u60C5\u89C1\uFF1Ahttps://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801?idescene=6&page=10,", "\u8BF7\u4F7F\u7528 `getUserProfile` \u8FDB\u884C\u9002\u914D\u3002");
      emit("getUserInfo", event);
    }
    function handleGetPhoneNumber(event) {
      emit("getPhoneNumber", event);
    }
    function handleOpenSetting(event) {
      emit("openSetting", event);
    }
    function handleError(event) {
      if (isWEAPP && props.openType !== "launchApp")
        return;
      emit("error", event);
    }
    function handleContact(event) {
      emit("contact", event);
    }
    function handleLaunchapp(event) {
      emit("launchapp", event);
    }
    function handleGetAuthorize(event) {
      emit("getAuthorize", event);
    }
    function handleSubmit(event) {
      if (isWEAPP || isWEB) {
        Taro.eventCenter.trigger("submit", event.detail, {
          bubbles: true,
          composed: true
        });
      }
    }
    function handleReset(event) {
      if (isWEAPP || isWEB) {
        Taro.eventCenter.trigger("reset", event.detail, {
          bubbles: true,
          composed: true
        });
      }
    }
    function genMiniAppButtonEvents() {
      if (!props.openType)
        return {};
      const miniAppButtonEvents = {
        onError: handleError
      };
      switch (props.openType) {
        case "contact":
          miniAppButtonEvents.onContact = handleContact;
          break;
        case "openSetting":
          miniAppButtonEvents.onOpensetting = handleOpenSetting;
          break;
        case "getPhoneNumber":
          miniAppButtonEvents.onGetphonenumber = handleGetPhoneNumber;
          break;
        case "getUserInfo":
          miniAppButtonEvents.onGetuserinfo = handleGetUserInfo;
          break;
        case "getAuthorize":
          if (isALIPAY) {
            miniAppButtonEvents.onGetauthorize = handleGetAuthorize;
          }
          break;
        case "launchApp":
          miniAppButtonEvents.onLaunchapp = handleLaunchapp;
          break;
      }
      return miniAppButtonEvents;
    }
    return {
      ...toRefs(props),
      isWEB,
      isWEAPP,
      isALIPAY,
      rootClasses,
      loadingSize,
      loadingColor,
      handleClick,
      handleReset,
      handleSubmit,
      genMiniAppButtonEvents
    };
  }
});

// Binding optimization for webpack code-split
const _openBlock$R = openBlock, _createElementBlock$R = createElementBlock, _createCommentVNode$s = createCommentVNode, _mergeProps$L = mergeProps, _createElementVNode$B = createElementVNode, _resolveComponent$b = resolveComponent, _createVNode$6 = createVNode, _renderSlot$o = renderSlot;

const _hoisted_1$E = ["formType"];
const _hoisted_2$x = ["lang", "formType", "openType", "sessionFrom", "appParameter", "sendMessageImg", "showMessageCard", "sendMessagePath", "sendMessageTitle"];
const _hoisted_3$t = ["lang", "scope", "formType", "openType"];
const _hoisted_4$o = {
  key: 3,
  class: "at-button__icon"
};
const _hoisted_5$k = { class: "at-button__text" };

function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_loading = _resolveComponent$b("at-loading");

  return (_openBlock$R(), _createElementBlock$R("view", _mergeProps$L(_ctx.$attrs, {
    class: _ctx.rootClasses,
    onTap: _cache[2] || (_cache[2] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    (_ctx.isWEB && !_ctx.disabled)
      ? (_openBlock$R(), _createElementBlock$R("button", {
          key: 0,
          class: "at-button__wxbutton",
          lang: "lang",
          formType: _ctx.formType === 'submit' || _ctx.formType === 'reset' ? _ctx.formType : undefined
        }, null, 8 /* PROPS */, _hoisted_1$E))
      : _createCommentVNode$s("v-if", true),
    (_ctx.isWEAPP && !_ctx.disabled)
      ? (_openBlock$R(), _createElementBlock$R("form", {
          key: 1,
          onSubmit: _cache[0] || (_cache[0] = (...args) => (_ctx.handleSubmit && _ctx.handleSubmit(...args))),
          onReset: _cache[1] || (_cache[1] = (...args) => (_ctx.handleReset && _ctx.handleReset(...args)))
        }, [
          _createElementVNode$B("button", _mergeProps$L({
            class: "at-button__wxbutton",
            lang: _ctx.lang,
            formType: _ctx.formType,
            openType: _ctx.openType,
            sessionFrom: _ctx.sessionFrom,
            appParameter: _ctx.appParameter,
            sendMessageImg: _ctx.sendMessageImg,
            showMessageCard: _ctx.showMessageCard,
            sendMessagePath: _ctx.sendMessagePath,
            sendMessageTitle: _ctx.sendMessageTitle
          }, _ctx.genMiniAppButtonEvents()), null, 16 /* FULL_PROPS */, _hoisted_2$x)
        ], 32 /* HYDRATE_EVENTS */))
      : _createCommentVNode$s("v-if", true),
    (_ctx.isALIPAY && !_ctx.disabled)
      ? (_openBlock$R(), _createElementBlock$R("button", _mergeProps$L({
          key: 2,
          class: "at-button__wxbutton",
          lang: _ctx.lang,
          scope: _ctx.scope,
          formType: _ctx.formType,
          openType: _ctx.openType
        }, _ctx.genMiniAppButtonEvents()), null, 16 /* FULL_PROPS */, _hoisted_3$t))
      : _createCommentVNode$s("v-if", true),
    (_ctx.loading)
      ? (_openBlock$R(), _createElementBlock$R("view", _hoisted_4$o, [
          _createVNode$6(_component_at_loading, {
            size: _ctx.loadingSize,
            color: _ctx.loadingColor
          }, null, 8 /* PROPS */, ["size", "color"])
        ]))
      : _createCommentVNode$s("v-if", true),
    _createElementVNode$B("view", _hoisted_5$k, [
      _renderSlot$o(_ctx.$slots, "default")
    ])
  ], 16 /* FULL_PROPS */))
}


AtButton.render = _sfc_render$R;

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

var dayjs_min = {exports: {}};

(function (module, exports) {
!function(t,e){module.exports=e();}(commonjsGlobal,function(){var t="millisecond",e="second",n="minute",r="hour",i="day",s="week",u="month",a="quarter",o="year",f="date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,c=/\[([^\]]+)]|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,d={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("_")},$=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},l={s:$,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+$(r,2,"0")+":"+$(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),s=n-i<0,a=e.clone().add(r+(s?-1:1),u);return +(-(r+(n-i)/(s?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(h){return {M:u,y:o,w:s,d:i,D:f,h:r,m:n,s:e,ms:t,Q:a}[h]||String(h||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",M={};M[y]=d;var m=function(t){return t instanceof S},D=function(t,e,n){var r;if(!t)return y;if("string"==typeof t)M[t]&&(r=t),e&&(M[t]=e,r=t);else {var i=t.name;M[i]=t,r=i;}return !n&&r&&(y=r),r||!n&&y},v=function(t,e){if(m(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new S(n)},g=l;g.l=D,g.i=m,g.w=function(t,e){return v(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function d(t){this.$L=D(t.locale,null,!0),this.parse(t);}var $=d.prototype;return $.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(g.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},$.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},$.$utils=function(){return g},$.isValid=function(){return !("Invalid Date"===this.$d.toString())},$.isSame=function(t,e){var n=v(t);return this.startOf(e)<=n&&n<=this.endOf(e)},$.isAfter=function(t,e){return v(t)<this.startOf(e)},$.isBefore=function(t,e){return this.endOf(e)<v(t)},$.$g=function(t,e,n){return g.u(t)?this[e]:this.set(n,t)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(t,a){var h=this,c=!!g.u(a)||a,d=g.p(t),$=function(t,e){var n=g.w(h.$u?Date.UTC(h.$y,e,t):new Date(h.$y,e,t),h);return c?n:n.endOf(i)},l=function(t,e){return g.w(h.toDate()[t].apply(h.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),h)},y=this.$W,M=this.$M,m=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case o:return c?$(1,0):$(31,11);case u:return c?$(1,M):$(0,M+1);case s:var v=this.$locale().weekStart||0,S=(y<v?y+7:y)-v;return $(c?m-S:m+(6-S),M);case i:case f:return l(D+"Hours",0);case r:return l(D+"Minutes",1);case n:return l(D+"Seconds",2);case e:return l(D+"Milliseconds",3);default:return this.clone()}},$.endOf=function(t){return this.startOf(t,!1)},$.$set=function(s,a){var h,c=g.p(s),d="set"+(this.$u?"UTC":""),$=(h={},h[i]=d+"Date",h[f]=d+"Date",h[u]=d+"Month",h[o]=d+"FullYear",h[r]=d+"Hours",h[n]=d+"Minutes",h[e]=d+"Seconds",h[t]=d+"Milliseconds",h)[c],l=c===i?this.$D+(a-this.$W):a;if(c===u||c===o){var y=this.clone().set(f,1);y.$d[$](l),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},$.set=function(t,e){return this.clone().$set(t,e)},$.get=function(t){return this[g.p(t)]()},$.add=function(t,a){var f,h=this;t=Number(t);var c=g.p(a),d=function(e){var n=v(h);return g.w(n.date(n.date()+Math.round(e*t)),h)};if(c===u)return this.set(u,this.$M+t);if(c===o)return this.set(o,this.$y+t);if(c===i)return d(1);if(c===s)return d(7);var $=(f={},f[n]=6e4,f[r]=36e5,f[e]=1e3,f)[c]||1,l=this.$d.getTime()+t*$;return g.w(l,this)},$.subtract=function(t,e){return this.add(-1*t,e)},$.format=function(t){var e=this;if(!this.isValid())return "Invalid Date";var n=t||"YYYY-MM-DDTHH:mm:ssZ",r=g.z(this),i=this.$locale(),s=this.$H,u=this.$m,a=this.$M,o=i.weekdays,f=i.months,h=function(t,r,i,s){return t&&(t[r]||t(e,n))||i[r].substr(0,s)},d=function(t){return g.s(s%12||12,t,"0")},$=i.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:g.s(a+1,2,"0"),MMM:h(i.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:g.s(this.$D,2,"0"),d:String(this.$W),dd:h(i.weekdaysMin,this.$W,o,2),ddd:h(i.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:g.s(s,2,"0"),h:d(1),hh:d(2),a:$(s,u,!0),A:$(s,u,!1),m:String(u),mm:g.s(u,2,"0"),s:String(this.$s),ss:g.s(this.$s,2,"0"),SSS:g.s(this.$ms,3,"0"),Z:r};return n.replace(c,function(t,e){return e||l[t]||r.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(t,f,h){var c,d=g.p(f),$=v(t),l=6e4*($.utcOffset()-this.utcOffset()),y=this-$,M=g.m(this,$);return M=(c={},c[o]=M/12,c[u]=M,c[a]=M/3,c[s]=(y-l)/6048e5,c[i]=(y-l)/864e5,c[r]=y/36e5,c[n]=y/6e4,c[e]=y/1e3,c)[d]||y,h?M:g.a(M)},$.daysInMonth=function(){return this.endOf(u).$D},$.$locale=function(){return M[this.$L]},$.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=D(t,e,!0);return r&&(n.$L=r),n},$.clone=function(){return g.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},d}(),p=S.prototype;return v.prototype=p,[["$ms",t],["$s",e],["$m",n],["$H",r],["$W",i],["$M",u],["$y",o],["$D",f]].forEach(function(t){p[t[1]]=function(e){return this.$g(e,t[0],t[1])};}),v.extend=function(t,e){return t.$i||(t(e,S,v),t.$i=!0),v},v.locale=D,v.isDayjs=m,v.unix=function(t){return v(1e3*t)},v.en=M[y],v.Ls=M,v.p={},v});
}(dayjs_min));

var dayjs$1 = dayjs_min.exports;

var SECONDS_A_MINUTE = 60;
var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60;
var SECONDS_A_DAY = SECONDS_A_HOUR * 24;
var SECONDS_A_WEEK = SECONDS_A_DAY * 7;
var MILLISECONDS_A_SECOND = 1e3;
var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND;
var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND;
var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND;
var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND; // English locales

var MS = 'millisecond';
var S = 'second';
var MIN = 'minute';
var H = 'hour';
var D = 'day';
var W = 'week';
var M = 'month';
var Q = 'quarter';
var Y = 'year';
var DATE = 'date';
var FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ssZ';
var INVALID_DATE_STRING = 'Invalid Date'; // regex

var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
var REGEX_FORMAT = /\[([^\]]+)]|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;

// English [en]
// We don't need weekdaysShort, weekdaysMin, monthsShort in en.js locale
var en = {
  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('_')
};

var padStart = function padStart(string, length, pad) {
  var s = String(string);
  if (!s || s.length >= length) return string;
  return "" + Array(length + 1 - s.length).join(pad) + string;
};

var padZoneStr = function padZoneStr(instance) {
  var negMinutes = -instance.utcOffset();
  var minutes = Math.abs(negMinutes);
  var hourOffset = Math.floor(minutes / 60);
  var minuteOffset = minutes % 60;
  return "" + (negMinutes <= 0 ? '+' : '-') + padStart(hourOffset, 2, '0') + ":" + padStart(minuteOffset, 2, '0');
};

var monthDiff = function monthDiff(a, b) {
  // function from moment.js in order to keep the same result
  if (a.date() < b.date()) return -monthDiff(b, a);
  var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month());
  var anchor = a.clone().add(wholeMonthDiff, M);
  var c = b - anchor < 0;
  var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), M);
  return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0);
};

var absFloor = function absFloor(n) {
  return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
};

var prettyUnit = function prettyUnit(u) {
  var special = {
    M: M,
    y: Y,
    w: W,
    d: D,
    D: DATE,
    h: H,
    m: MIN,
    s: S,
    ms: MS,
    Q: Q
  };
  return special[u] || String(u || '').toLowerCase().replace(/s$/, '');
};

var isUndefined = function isUndefined(s) {
  return s === undefined;
};

var U = {
  s: padStart,
  z: padZoneStr,
  m: monthDiff,
  a: absFloor,
  p: prettyUnit,
  u: isUndefined
};

var L = 'en'; // global locale

var Ls = {}; // global loaded locale

Ls[L] = en;

var isDayjs = function isDayjs(d) {
  return d instanceof Dayjs;
}; // eslint-disable-line no-use-before-define


var parseLocale = function parseLocale(preset, object, isLocal) {
  var l;
  if (!preset) return L;

  if (typeof preset === 'string') {
    if (Ls[preset]) {
      l = preset;
    }

    if (object) {
      Ls[preset] = object;
      l = preset;
    }
  } else {
    var name = preset.name;
    Ls[name] = preset;
    l = name;
  }

  if (!isLocal && l) L = l;
  return l || !isLocal && L;
};

var dayjs = function dayjs(date, c) {
  if (isDayjs(date)) {
    return date.clone();
  } // eslint-disable-next-line no-nested-ternary


  var cfg = typeof c === 'object' ? c : {};
  cfg.date = date;
  cfg.args = arguments; // eslint-disable-line prefer-rest-params

  return new Dayjs(cfg); // eslint-disable-line no-use-before-define
};

var wrapper = function wrapper(date, instance) {
  return dayjs(date, {
    locale: instance.$L,
    utc: instance.$u,
    x: instance.$x,
    $offset: instance.$offset // todo: refactor; do not use this.$offset in you code

  });
};

var Utils = U; // for plugin use

Utils.l = parseLocale;
Utils.i = isDayjs;
Utils.w = wrapper;

var parseDate = function parseDate(cfg) {
  var date = cfg.date,
      utc = cfg.utc;
  if (date === null) return new Date(NaN); // null is invalid

  if (Utils.u(date)) return new Date(); // today

  if (date instanceof Date) return new Date(date);

  if (typeof date === 'string' && !/Z$/i.test(date)) {
    var d = date.match(REGEX_PARSE);

    if (d) {
      var m = d[2] - 1 || 0;
      var ms = (d[7] || '0').substring(0, 3);

      if (utc) {
        return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms));
      }

      return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
    }
  }

  return new Date(date); // everything else
};

var Dayjs = /*#__PURE__*/function () {
  function Dayjs(cfg) {
    this.$L = parseLocale(cfg.locale, null, true);
    this.parse(cfg); // for plugin
  }

  var _proto = Dayjs.prototype;

  _proto.parse = function parse(cfg) {
    this.$d = parseDate(cfg);
    this.$x = cfg.x || {};
    this.init();
  };

  _proto.init = function init() {
    var $d = this.$d;
    this.$y = $d.getFullYear();
    this.$M = $d.getMonth();
    this.$D = $d.getDate();
    this.$W = $d.getDay();
    this.$H = $d.getHours();
    this.$m = $d.getMinutes();
    this.$s = $d.getSeconds();
    this.$ms = $d.getMilliseconds();
  } // eslint-disable-next-line class-methods-use-this
  ;

  _proto.$utils = function $utils() {
    return Utils;
  };

  _proto.isValid = function isValid() {
    return !(this.$d.toString() === INVALID_DATE_STRING);
  };

  _proto.isSame = function isSame(that, units) {
    var other = dayjs(that);
    return this.startOf(units) <= other && other <= this.endOf(units);
  };

  _proto.isAfter = function isAfter(that, units) {
    return dayjs(that) < this.startOf(units);
  };

  _proto.isBefore = function isBefore(that, units) {
    return this.endOf(units) < dayjs(that);
  };

  _proto.$g = function $g(input, get, set) {
    if (Utils.u(input)) return this[get];
    return this.set(set, input);
  };

  _proto.unix = function unix() {
    return Math.floor(this.valueOf() / 1000);
  };

  _proto.valueOf = function valueOf() {
    // timezone(hour) * 60 * 60 * 1000 => ms
    return this.$d.getTime();
  };

  _proto.startOf = function startOf(units, _startOf) {
    var _this = this;

    // startOf -> endOf
    var isStartOf = !Utils.u(_startOf) ? _startOf : true;
    var unit = Utils.p(units);

    var instanceFactory = function instanceFactory(d, m) {
      var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this);
      return isStartOf ? ins : ins.endOf(D);
    };

    var instanceFactorySet = function instanceFactorySet(method, slice) {
      var argumentStart = [0, 0, 0, 0];
      var argumentEnd = [23, 59, 59, 999];
      return Utils.w(_this.toDate()[method].apply( // eslint-disable-line prefer-spread
      _this.toDate('s'), (isStartOf ? argumentStart : argumentEnd).slice(slice)), _this);
    };

    var $W = this.$W,
        $M = this.$M,
        $D = this.$D;
    var utcPad = "set" + (this.$u ? 'UTC' : '');

    switch (unit) {
      case Y:
        return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11);

      case M:
        return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1);

      case W:
        {
          var weekStart = this.$locale().weekStart || 0;
          var gap = ($W < weekStart ? $W + 7 : $W) - weekStart;
          return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M);
        }

      case D:
      case DATE:
        return instanceFactorySet(utcPad + "Hours", 0);

      case H:
        return instanceFactorySet(utcPad + "Minutes", 1);

      case MIN:
        return instanceFactorySet(utcPad + "Seconds", 2);

      case S:
        return instanceFactorySet(utcPad + "Milliseconds", 3);

      default:
        return this.clone();
    }
  };

  _proto.endOf = function endOf(arg) {
    return this.startOf(arg, false);
  };

  _proto.$set = function $set(units, _int) {
    var _C$D$C$DATE$C$M$C$Y$C;

    // private set
    var unit = Utils.p(units);
    var utcPad = "set" + (this.$u ? 'UTC' : '');
    var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit];
    var arg = unit === D ? this.$D + (_int - this.$W) : _int;

    if (unit === M || unit === Y) {
      // clone is for badMutable plugin
      var date = this.clone().set(DATE, 1);
      date.$d[name](arg);
      date.init();
      this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d;
    } else if (name) this.$d[name](arg);

    this.init();
    return this;
  };

  _proto.set = function set(string, _int2) {
    return this.clone().$set(string, _int2);
  };

  _proto.get = function get(unit) {
    return this[Utils.p(unit)]();
  };

  _proto.add = function add(number, units) {
    var _this2 = this,
        _C$MIN$C$H$C$S$unit;

    number = Number(number); // eslint-disable-line no-param-reassign

    var unit = Utils.p(units);

    var instanceFactorySet = function instanceFactorySet(n) {
      var d = dayjs(_this2);
      return Utils.w(d.date(d.date() + Math.round(n * number)), _this2);
    };

    if (unit === M) {
      return this.set(M, this.$M + number);
    }

    if (unit === Y) {
      return this.set(Y, this.$y + number);
    }

    if (unit === D) {
      return instanceFactorySet(1);
    }

    if (unit === W) {
      return instanceFactorySet(7);
    }

    var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; // ms

    var nextTimeStamp = this.$d.getTime() + number * step;
    return Utils.w(nextTimeStamp, this);
  };

  _proto.subtract = function subtract(number, string) {
    return this.add(number * -1, string);
  };

  _proto.format = function format(formatStr) {
    var _this3 = this;

    if (!this.isValid()) return INVALID_DATE_STRING;
    var str = formatStr || FORMAT_DEFAULT;
    var zoneStr = Utils.z(this);
    var locale = this.$locale();
    var $H = this.$H,
        $m = this.$m,
        $M = this.$M;
    var weekdays = locale.weekdays,
        months = locale.months,
        meridiem = locale.meridiem;

    var getShort = function getShort(arr, index, full, length) {
      return arr && (arr[index] || arr(_this3, str)) || full[index].substr(0, length);
    };

    var get$H = function get$H(num) {
      return Utils.s($H % 12 || 12, num, '0');
    };

    var meridiemFunc = meridiem || function (hour, minute, isLowercase) {
      var m = hour < 12 ? 'AM' : 'PM';
      return isLowercase ? m.toLowerCase() : m;
    };

    var matches = {
      YY: String(this.$y).slice(-2),
      YYYY: this.$y,
      M: $M + 1,
      MM: Utils.s($M + 1, 2, '0'),
      MMM: getShort(locale.monthsShort, $M, months, 3),
      MMMM: getShort(months, $M),
      D: this.$D,
      DD: Utils.s(this.$D, 2, '0'),
      d: String(this.$W),
      dd: getShort(locale.weekdaysMin, this.$W, weekdays, 2),
      ddd: getShort(locale.weekdaysShort, this.$W, weekdays, 3),
      dddd: weekdays[this.$W],
      H: String($H),
      HH: Utils.s($H, 2, '0'),
      h: get$H(1),
      hh: get$H(2),
      a: meridiemFunc($H, $m, true),
      A: meridiemFunc($H, $m, false),
      m: String($m),
      mm: Utils.s($m, 2, '0'),
      s: String(this.$s),
      ss: Utils.s(this.$s, 2, '0'),
      SSS: Utils.s(this.$ms, 3, '0'),
      Z: zoneStr // 'ZZ' logic below

    };
    return str.replace(REGEX_FORMAT, function (match, $1) {
      return $1 || matches[match] || zoneStr.replace(':', '');
    }); // 'ZZ'
  };

  _proto.utcOffset = function utcOffset() {
    // Because a bug at FF24, we're rounding the timezone offset around 15 minutes
    // https://github.com/moment/moment/pull/1871
    return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
  };

  _proto.diff = function diff(input, units, _float) {
    var _C$Y$C$M$C$Q$C$W$C$D$;

    var unit = Utils.p(units);
    var that = dayjs(input);
    var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
    var diff = this - that;
    var result = Utils.m(this, that);
    result = (_C$Y$C$M$C$Q$C$W$C$D$ = {}, _C$Y$C$M$C$Q$C$W$C$D$[Y] = result / 12, _C$Y$C$M$C$Q$C$W$C$D$[M] = result, _C$Y$C$M$C$Q$C$W$C$D$[Q] = result / 3, _C$Y$C$M$C$Q$C$W$C$D$[W] = (diff - zoneDelta) / MILLISECONDS_A_WEEK, _C$Y$C$M$C$Q$C$W$C$D$[D] = (diff - zoneDelta) / MILLISECONDS_A_DAY, _C$Y$C$M$C$Q$C$W$C$D$[H] = diff / MILLISECONDS_A_HOUR, _C$Y$C$M$C$Q$C$W$C$D$[MIN] = diff / MILLISECONDS_A_MINUTE, _C$Y$C$M$C$Q$C$W$C$D$[S] = diff / MILLISECONDS_A_SECOND, _C$Y$C$M$C$Q$C$W$C$D$)[unit] || diff; // milliseconds

    return _float ? result : Utils.a(result);
  };

  _proto.daysInMonth = function daysInMonth() {
    return this.endOf(M).$D;
  };

  _proto.$locale = function $locale() {
    // get locale object
    return Ls[this.$L];
  };

  _proto.locale = function locale(preset, object) {
    if (!preset) return this.$L;
    var that = this.clone();
    var nextLocaleName = parseLocale(preset, object, true);
    if (nextLocaleName) that.$L = nextLocaleName;
    return that;
  };

  _proto.clone = function clone() {
    return Utils.w(this.$d, this);
  };

  _proto.toDate = function toDate() {
    return new Date(this.valueOf());
  };

  _proto.toJSON = function toJSON() {
    return this.isValid() ? this.toISOString() : null;
  };

  _proto.toISOString = function toISOString() {
    // ie 8 return
    // new Dayjs(this.valueOf() + this.$d.getTimezoneOffset() * 60000)
    // .format('YYYY-MM-DDTHH:mm:ss.SSS[Z]')
    return this.$d.toISOString();
  };

  _proto.toString = function toString() {
    return this.$d.toUTCString();
  };

  return Dayjs;
}();

var proto = Dayjs.prototype;
dayjs.prototype = proto;
[['$ms', MS], ['$s', S], ['$m', MIN], ['$H', H], ['$W', D], ['$M', M], ['$y', Y], ['$D', DATE]].forEach(function (g) {
  proto[g[1]] = function (input) {
    return this.$g(input, g[0], g[1]);
  };
});

dayjs.extend = function (plugin, option) {
  if (!plugin.$i) {
    // install plugin only once
    plugin(option, Dayjs, dayjs);
    plugin.$i = true;
  }

  return dayjs;
};

dayjs.locale = parseLocale;
dayjs.isDayjs = isDayjs;

dayjs.unix = function (timestamp) {
  return dayjs(timestamp * 1e3);
};

dayjs.en = Ls[L];
dayjs.Ls = Ls;
dayjs.p = {};

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject$4(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

/** Built-in value references. */
var objectCreate = Object.create;

/**
 * The base implementation of `_.create` without support for assigning
 * properties to the created object.
 *
 * @private
 * @param {Object} proto The object to inherit from.
 * @returns {Object} Returns the new object.
 */
var baseCreate = (function() {
  function object() {}
  return function(proto) {
    if (!isObject$4(proto)) {
      return {};
    }
    if (objectCreate) {
      return objectCreate(proto);
    }
    object.prototype = proto;
    var result = new object;
    object.prototype = undefined;
    return result;
  };
}());

/**
 * The function whose prototype chain sequence wrappers inherit from.
 *
 * @private
 */
function baseLodash() {
  // No operation performed.
}

/**
 * The base constructor for creating `lodash` wrapper objects.
 *
 * @private
 * @param {*} value The value to wrap.
 * @param {boolean} [chainAll] Enable explicit method chain sequences.
 */
function LodashWrapper(value, chainAll) {
  this.__wrapped__ = value;
  this.__actions__ = [];
  this.__chain__ = !!chainAll;
  this.__index__ = 0;
  this.__values__ = undefined;
}

LodashWrapper.prototype = baseCreate(baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;

/**
 * Appends the elements of `values` to `array`.
 *
 * @private
 * @param {Array} array The array to modify.
 * @param {Array} values The values to append.
 * @returns {Array} Returns `array`.
 */
function arrayPush(array, values) {
  var index = -1,
      length = values.length,
      offset = array.length;

  while (++index < length) {
    array[offset + index] = values[index];
  }
  return array;
}

/** Detect free variable `global` from Node.js. */
var freeGlobal$2 = typeof global == 'object' && global && global.Object === Object && global;

/** Detect free variable `self`. */
var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root$2 = freeGlobal$2 || freeSelf$1 || Function('return this')();

/** Built-in value references. */
var Symbol$4 = root$2.Symbol;

/** Used for built-in method references. */
var objectProto$a = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$7 = objectProto$a.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$3 = objectProto$a.toString;

/** Built-in value references. */
var symToStringTag$3 = Symbol$4 ? Symbol$4.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag$2(value) {
  var isOwn = hasOwnProperty$7.call(value, symToStringTag$3),
      tag = value[symToStringTag$3];

  try {
    value[symToStringTag$3] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString$3.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$3] = tag;
    } else {
      delete value[symToStringTag$3];
    }
  }
  return result;
}

/** Used for built-in method references. */
var objectProto$9 = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$2 = objectProto$9.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString$2(value) {
  return nativeObjectToString$2.call(value);
}

/** `Object#toString` result references. */
var nullTag$1 = '[object Null]',
    undefinedTag$1 = '[object Undefined]';

/** Built-in value references. */
var symToStringTag$2 = Symbol$4 ? Symbol$4.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag$3(value) {
  if (value == null) {
    return value === undefined ? undefinedTag$1 : nullTag$1;
  }
  return (symToStringTag$2 && symToStringTag$2 in Object(value))
    ? getRawTag$2(value)
    : objectToString$2(value);
}

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike$2(value) {
  return value != null && typeof value == 'object';
}

/** `Object#toString` result references. */
var argsTag$1 = '[object Arguments]';

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike$2(value) && baseGetTag$3(value) == argsTag$1;
}

/** Used for built-in method references. */
var objectProto$8 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;

/** Built-in value references. */
var propertyIsEnumerable = objectProto$8.propertyIsEnumerable;

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike$2(value) && hasOwnProperty$6.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

/** Built-in value references. */
var spreadableSymbol = Symbol$4 ? Symbol$4.isConcatSpreadable : undefined;

/**
 * Checks if `value` is a flattenable `arguments` object or array.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
 */
function isFlattenable(value) {
  return isArray(value) || isArguments(value) ||
    !!(spreadableSymbol && value && value[spreadableSymbol]);
}

/**
 * The base implementation of `_.flatten` with support for restricting flattening.
 *
 * @private
 * @param {Array} array The array to flatten.
 * @param {number} depth The maximum recursion depth.
 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
 * @param {Array} [result=[]] The initial result value.
 * @returns {Array} Returns the new flattened array.
 */
function baseFlatten(array, depth, predicate, isStrict, result) {
  var index = -1,
      length = array.length;

  predicate || (predicate = isFlattenable);
  result || (result = []);

  while (++index < length) {
    var value = array[index];
    if (depth > 0 && predicate(value)) {
      if (depth > 1) {
        // Recursively flatten arrays (susceptible to call stack limits).
        baseFlatten(value, depth - 1, predicate, isStrict, result);
      } else {
        arrayPush(result, value);
      }
    } else if (!isStrict) {
      result[result.length] = value;
    }
  }
  return result;
}

/**
 * Flattens `array` a single level deep.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Array
 * @param {Array} array The array to flatten.
 * @returns {Array} Returns the new flattened array.
 * @example
 *
 * _.flatten([1, [2, [3, [4]], 5]]);
 * // => [1, 2, [3, [4]], 5]
 */
function flatten(array) {
  var length = array == null ? 0 : array.length;
  return length ? baseFlatten(array, 1) : [];
}

/**
 * A faster alternative to `Function#apply`, this function invokes `func`
 * with the `this` binding of `thisArg` and the arguments of `args`.
 *
 * @private
 * @param {Function} func The function to invoke.
 * @param {*} thisArg The `this` binding of `func`.
 * @param {Array} args The arguments to invoke `func` with.
 * @returns {*} Returns the result of `func`.
 */
function apply(func, thisArg, args) {
  switch (args.length) {
    case 0: return func.call(thisArg);
    case 1: return func.call(thisArg, args[0]);
    case 2: return func.call(thisArg, args[0], args[1]);
    case 3: return func.call(thisArg, args[0], args[1], args[2]);
  }
  return func.apply(thisArg, args);
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax$2 = Math.max;

/**
 * A specialized version of `baseRest` which transforms the rest array.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @param {number} [start=func.length-1] The start position of the rest parameter.
 * @param {Function} transform The rest array transform.
 * @returns {Function} Returns the new function.
 */
function overRest(func, start, transform) {
  start = nativeMax$2(start === undefined ? (func.length - 1) : start, 0);
  return function() {
    var args = arguments,
        index = -1,
        length = nativeMax$2(args.length - start, 0),
        array = Array(length);

    while (++index < length) {
      array[index] = args[start + index];
    }
    index = -1;
    var otherArgs = Array(start + 1);
    while (++index < start) {
      otherArgs[index] = args[index];
    }
    otherArgs[start] = transform(array);
    return apply(func, this, otherArgs);
  };
}

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant(value) {
  return function() {
    return value;
  };
}

/** `Object#toString` result references. */
var asyncTag$1 = '[object AsyncFunction]',
    funcTag$2 = '[object Function]',
    genTag$1 = '[object GeneratorFunction]',
    proxyTag$1 = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction$2(value) {
  if (!isObject$4(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag$3(value);
  return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag$1 || tag == proxyTag$1;
}

/** Used to detect overreaching core-js shims. */
var coreJsData = root$2['__core-js_shared__'];

/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? ('Symbol(src)_1.' + uid) : '';
}());

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && (maskSrcKey in func);
}

/** Used for built-in method references. */
var funcProto$1 = Function.prototype;

/** Used to resolve the decompiled source of functions. */
var funcToString$1 = funcProto$1.toString;

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to convert.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString$1.call(func);
    } catch (e) {}
    try {
      return (func + '');
    } catch (e) {}
  }
  return '';
}

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used for built-in method references. */
var funcProto = Function.prototype,
    objectProto$7 = Object.prototype;

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
  funcToString.call(hasOwnProperty$5).replace(reRegExpChar, '\\$&')
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject$4(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction$2(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

var defineProperty = (function() {
  try {
    var func = getNative(Object, 'defineProperty');
    func({}, '', {});
    return func;
  } catch (e) {}
}());

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

/**
 * The base implementation of `setToString` without support for hot loop shorting.
 *
 * @private
 * @param {Function} func The function to modify.
 * @param {Function} string The `toString` result.
 * @returns {Function} Returns `func`.
 */
var baseSetToString = !defineProperty ? identity : function(func, string) {
  return defineProperty(func, 'toString', {
    'configurable': true,
    'enumerable': false,
    'value': constant(string),
    'writable': true
  });
};

/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
    HOT_SPAN = 16;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;

/**
 * Creates a function that'll short out and invoke `identity` instead
 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
 * milliseconds.
 *
 * @private
 * @param {Function} func The function to restrict.
 * @returns {Function} Returns the new shortable function.
 */
function shortOut(func) {
  var count = 0,
      lastCalled = 0;

  return function() {
    var stamp = nativeNow(),
        remaining = HOT_SPAN - (stamp - lastCalled);

    lastCalled = stamp;
    if (remaining > 0) {
      if (++count >= HOT_COUNT) {
        return arguments[0];
      }
    } else {
      count = 0;
    }
    return func.apply(undefined, arguments);
  };
}

/**
 * Sets the `toString` method of `func` to return `string`.
 *
 * @private
 * @param {Function} func The function to modify.
 * @param {Function} string The `toString` result.
 * @returns {Function} Returns `func`.
 */
var setToString = shortOut(baseSetToString);

/**
 * A specialized version of `baseRest` which flattens the rest array.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @returns {Function} Returns the new function.
 */
function flatRest(func) {
  return setToString(overRest(func, undefined, flatten), func + '');
}

/* Built-in method references that are verified to be native. */
var WeakMap = getNative(root$2, 'WeakMap');

/** Used to store function metadata. */
var metaMap = WeakMap && new WeakMap;

/**
 * This method returns `undefined`.
 *
 * @static
 * @memberOf _
 * @since 2.3.0
 * @category Util
 * @example
 *
 * _.times(2, _.noop);
 * // => [undefined, undefined]
 */
function noop() {
  // No operation performed.
}

/**
 * Gets metadata for `func`.
 *
 * @private
 * @param {Function} func The function to query.
 * @returns {*} Returns the metadata for `func`.
 */
var getData = !metaMap ? noop : function(func) {
  return metaMap.get(func);
};

/** Used to lookup unminified function names. */
var realNames = {};

/** Used for built-in method references. */
var objectProto$6 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;

/**
 * Gets the name of `func`.
 *
 * @private
 * @param {Function} func The function to query.
 * @returns {string} Returns the function name.
 */
function getFuncName(func) {
  var result = (func.name + ''),
      array = realNames[result],
      length = hasOwnProperty$4.call(realNames, result) ? array.length : 0;

  while (length--) {
    var data = array[length],
        otherFunc = data.func;
    if (otherFunc == null || otherFunc == func) {
      return data.name;
    }
  }
  return result;
}

/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295;

/**
 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
 *
 * @private
 * @constructor
 * @param {*} value The value to wrap.
 */
function LazyWrapper(value) {
  this.__wrapped__ = value;
  this.__actions__ = [];
  this.__dir__ = 1;
  this.__filtered__ = false;
  this.__iteratees__ = [];
  this.__takeCount__ = MAX_ARRAY_LENGTH;
  this.__views__ = [];
}

// Ensure `LazyWrapper` is an instance of `baseLodash`.
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;

/**
 * Copies the values of `source` to `array`.
 *
 * @private
 * @param {Array} source The array to copy values from.
 * @param {Array} [array=[]] The array to copy values to.
 * @returns {Array} Returns `array`.
 */
function copyArray(source, array) {
  var index = -1,
      length = source.length;

  array || (array = Array(length));
  while (++index < length) {
    array[index] = source[index];
  }
  return array;
}

/**
 * Creates a clone of `wrapper`.
 *
 * @private
 * @param {Object} wrapper The wrapper to clone.
 * @returns {Object} Returns the cloned wrapper.
 */
function wrapperClone(wrapper) {
  if (wrapper instanceof LazyWrapper) {
    return wrapper.clone();
  }
  var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  result.__actions__ = copyArray(wrapper.__actions__);
  result.__index__  = wrapper.__index__;
  result.__values__ = wrapper.__values__;
  return result;
}

/** Used for built-in method references. */
var objectProto$5 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$3 = objectProto$5.hasOwnProperty;

/**
 * Creates a `lodash` object which wraps `value` to enable implicit method
 * chain sequences. Methods that operate on and return arrays, collections,
 * and functions can be chained together. Methods that retrieve a single value
 * or may return a primitive value will automatically end the chain sequence
 * and return the unwrapped value. Otherwise, the value must be unwrapped
 * with `_#value`.
 *
 * Explicit chain sequences, which must be unwrapped with `_#value`, may be
 * enabled using `_.chain`.
 *
 * The execution of chained methods is lazy, that is, it's deferred until
 * `_#value` is implicitly or explicitly called.
 *
 * Lazy evaluation allows several methods to support shortcut fusion.
 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
 * the creation of intermediate arrays and can greatly reduce the number of
 * iteratee executions. Sections of a chain sequence qualify for shortcut
 * fusion if the section is applied to an array and iteratees accept only
 * one argument. The heuristic for whether a section qualifies for shortcut
 * fusion is subject to change.
 *
 * Chaining is supported in custom builds as long as the `_#value` method is
 * directly or indirectly included in the build.
 *
 * In addition to lodash methods, wrappers have `Array` and `String` methods.
 *
 * The wrapper `Array` methods are:
 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
 *
 * The wrapper `String` methods are:
 * `replace` and `split`
 *
 * The wrapper methods that support shortcut fusion are:
 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
 *
 * The chainable wrapper methods are:
 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
 * `zipObject`, `zipObjectDeep`, and `zipWith`
 *
 * The wrapper methods that are **not** chainable by default are:
 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
 * `upperFirst`, `value`, and `words`
 *
 * @name _
 * @constructor
 * @category Seq
 * @param {*} value The value to wrap in a `lodash` instance.
 * @returns {Object} Returns the new `lodash` wrapper instance.
 * @example
 *
 * function square(n) {
 *   return n * n;
 * }
 *
 * var wrapped = _([1, 2, 3]);
 *
 * // Returns an unwrapped value.
 * wrapped.reduce(_.add);
 * // => 6
 *
 * // Returns a wrapped value.
 * var squares = wrapped.map(square);
 *
 * _.isArray(squares);
 * // => false
 *
 * _.isArray(squares.value());
 * // => true
 */
function lodash(value) {
  if (isObjectLike$2(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
    if (value instanceof LodashWrapper) {
      return value;
    }
    if (hasOwnProperty$3.call(value, '__wrapped__')) {
      return wrapperClone(value);
    }
  }
  return new LodashWrapper(value);
}

// Ensure wrappers are instances of `baseLodash`.
lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;

/**
 * Checks if `func` has a lazy counterpart.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
 *  else `false`.
 */
function isLaziable(func) {
  var funcName = getFuncName(func),
      other = lodash[funcName];

  if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
    return false;
  }
  if (func === other) {
    return true;
  }
  var data = getData(other);
  return !!data && func === data[0];
}

/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';

/** Used to compose bitmasks for function metadata. */
var WRAP_CURRY_FLAG = 8,
    WRAP_PARTIAL_FLAG = 32,
    WRAP_ARY_FLAG = 128,
    WRAP_REARG_FLAG = 256;

/**
 * Creates a `_.flow` or `_.flowRight` function.
 *
 * @private
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Function} Returns the new flow function.
 */
function createFlow(fromRight) {
  return flatRest(function(funcs) {
    var length = funcs.length,
        index = length,
        prereq = LodashWrapper.prototype.thru;

    if (fromRight) {
      funcs.reverse();
    }
    while (index--) {
      var func = funcs[index];
      if (typeof func != 'function') {
        throw new TypeError(FUNC_ERROR_TEXT);
      }
      if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
        var wrapper = new LodashWrapper([], true);
      }
    }
    index = wrapper ? index : length;
    while (++index < length) {
      func = funcs[index];

      var funcName = getFuncName(func),
          data = funcName == 'wrapper' ? getData(func) : undefined;

      if (data && isLaziable(data[0]) &&
            data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
            !data[4].length && data[9] == 1
          ) {
        wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
      } else {
        wrapper = (func.length == 1 && isLaziable(func))
          ? wrapper[funcName]()
          : wrapper.thru(func);
      }
    }
    return function() {
      var args = arguments,
          value = args[0];

      if (wrapper && args.length == 1 && isArray(value)) {
        return wrapper.plant(value).value();
      }
      var index = 0,
          result = length ? funcs[index].apply(this, args) : value;

      while (++index < length) {
        result = funcs[index].call(this, result);
      }
      return result;
    };
  });
}

/**
 * Creates a function that returns the result of invoking the given functions
 * with the `this` binding of the created function, where each successive
 * invocation is supplied the return value of the previous.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Util
 * @param {...(Function|Function[])} [funcs] The functions to invoke.
 * @returns {Function} Returns the new composite function.
 * @see _.flowRight
 * @example
 *
 * function square(n) {
 *   return n * n;
 * }
 *
 * var addSquare = _.flow([_.add, square]);
 * addSquare(1, 2);
 * // => 9
 */
var flow = createFlow();

const TYPE_PRE_MONTH = -1;
const TYPE_NOW_MONTH = 0;
const TYPE_NEXT_MONTH = 1;

/** Used for built-in method references. */
var objectProto$4 = Object.prototype;

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;

  return value === proto;
}

/**
 * Creates a unary function that invokes `func` with its argument transformed.
 *
 * @private
 * @param {Function} func The function to wrap.
 * @param {Function} transform The argument transform.
 * @returns {Function} Returns the new function.
 */
function overArg(func, transform) {
  return function(arg) {
    return func(transform(arg));
  };
}

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeKeys = overArg(Object.keys, Object);

/** Used for built-in method references. */
var objectProto$3 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;

/**
 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeys(object) {
  if (!isPrototype(object)) {
    return nativeKeys(object);
  }
  var result = [];
  for (var key in Object(object)) {
    if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
      result.push(key);
    }
  }
  return result;
}

/* Built-in method references that are verified to be native. */
var DataView = getNative(root$2, 'DataView');

/* Built-in method references that are verified to be native. */
var Map = getNative(root$2, 'Map');

/* Built-in method references that are verified to be native. */
var Promise$1 = getNative(root$2, 'Promise');

/* Built-in method references that are verified to be native. */
var Set$1 = getNative(root$2, 'Set');

/** `Object#toString` result references. */
var mapTag$2 = '[object Map]',
    objectTag$1 = '[object Object]',
    promiseTag = '[object Promise]',
    setTag$2 = '[object Set]',
    weakMapTag$1 = '[object WeakMap]';

var dataViewTag$1 = '[object DataView]';

/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
    mapCtorString = toSource(Map),
    promiseCtorString = toSource(Promise$1),
    setCtorString = toSource(Set$1),
    weakMapCtorString = toSource(WeakMap);

/**
 * Gets the `toStringTag` of `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
var getTag = baseGetTag$3;

// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$1) ||
    (Map && getTag(new Map) != mapTag$2) ||
    (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
    (Set$1 && getTag(new Set$1) != setTag$2) ||
    (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
  getTag = function(value) {
    var result = baseGetTag$3(value),
        Ctor = result == objectTag$1 ? value.constructor : undefined,
        ctorString = Ctor ? toSource(Ctor) : '';

    if (ctorString) {
      switch (ctorString) {
        case dataViewCtorString: return dataViewTag$1;
        case mapCtorString: return mapTag$2;
        case promiseCtorString: return promiseTag;
        case setCtorString: return setTag$2;
        case weakMapCtorString: return weakMapTag$1;
      }
    }
    return result;
  };
}

var getTag$1 = getTag;

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER$2 = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength$2(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$2;
}

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike$2(value) {
  return value != null && isLength$2(value.length) && !isFunction$2(value);
}

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

/** Detect free variable `exports`. */
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;

/** Built-in value references. */
var Buffer = moduleExports$1 ? root$2.Buffer : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    arrayTag = '[object Array]',
    boolTag = '[object Boolean]',
    dateTag = '[object Date]',
    errorTag = '[object Error]',
    funcTag$1 = '[object Function]',
    mapTag$1 = '[object Map]',
    numberTag = '[object Number]',
    objectTag = '[object Object]',
    regexpTag = '[object RegExp]',
    setTag$1 = '[object Set]',
    stringTag = '[object String]',
    weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]',
    dataViewTag = '[object DataView]',
    float32Tag = '[object Float32Array]',
    float64Tag = '[object Float64Array]',
    int8Tag = '[object Int8Array]',
    int16Tag = '[object Int16Array]',
    int32Tag = '[object Int32Array]',
    uint8Tag = '[object Uint8Array]',
    uint8ClampedTag = '[object Uint8ClampedArray]',
    uint16Tag = '[object Uint16Array]',
    uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag$1] =
typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike$2(value) &&
    isLength$2(value.length) && !!typedArrayTags[baseGetTag$3(value)];
}

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal$2.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule && freeModule.require && freeModule.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

/** `Object#toString` result references. */
var mapTag = '[object Map]',
    setTag = '[object Set]';

/** Used for built-in method references. */
var objectProto$2 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty$1 = objectProto$2.hasOwnProperty;

/**
 * Checks if `value` is an empty object, collection, map, or set.
 *
 * Objects are considered empty if they have no own enumerable string keyed
 * properties.
 *
 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
 * jQuery-like collections are considered empty if they have a `length` of `0`.
 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
 * @example
 *
 * _.isEmpty(null);
 * // => true
 *
 * _.isEmpty(true);
 * // => true
 *
 * _.isEmpty(1);
 * // => true
 *
 * _.isEmpty([1, 2, 3]);
 * // => false
 *
 * _.isEmpty({ 'a': 1 });
 * // => false
 */
function isEmpty(value) {
  if (value == null) {
    return true;
  }
  if (isArrayLike$2(value) &&
      (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
        isBuffer(value) || isTypedArray(value) || isArguments(value))) {
    return !value.length;
  }
  var tag = getTag$1(value);
  if (tag == mapTag || tag == setTag) {
    return !value.size;
  }
  if (isPrototype(value)) {
    return !baseKeys(value).length;
  }
  for (var key in value) {
    if (hasOwnProperty$1.call(value, key)) {
      return false;
    }
  }
  return true;
}

function handleActive(args, item) {
  const { selectedDate } = args;
  const { _value } = item;
  const { start, end } = selectedDate;
  const dayjsEnd = dayjs(end);
  const dayjsStart = start ? dayjs(start) : dayjsEnd;
  item.isSelected = _value.isSame(dayjsEnd) || _value.isSame(dayjsStart) || _value.isAfter(dayjsStart) && _value.isBefore(dayjsEnd);
  item.isSelectedHead = _value.isSame(dayjsStart);
  item.isSelectedTail = _value.isSame(dayjsEnd);
  item.isToday = _value.diff(dayjs(Date.now()).startOf("day"), "day") === 0;
  return item;
}
function handleMarks(args, item) {
  const { options } = args;
  const { _value } = item;
  const { marks } = options;
  const markList = marks.filter((mark) => dayjs(mark.value).startOf("day").isSame(_value));
  item.marks = markList.slice(0, 1);
  return item;
}
function handleDisabled(args, item) {
  const { options } = args;
  const { _value } = item;
  const { minDate, maxDate } = options;
  const dayjsMinDate = dayjs(minDate);
  const dayjsMaxDate = dayjs(maxDate);
  item.isDisabled = !!(minDate && _value.isBefore(dayjsMinDate)) || !!(maxDate && _value.isAfter(dayjsMaxDate));
  return item;
}
function handleValid(args, item) {
  const { options } = args;
  const { _value } = item;
  const { validDates } = options;
  if (!isEmpty(validDates)) {
    const isInclude = validDates.some((date) => dayjs(date.value).startOf("day").isSame(_value));
    item.isDisabled = !isInclude;
  }
  delete item._value;
  return item;
}
var plugins = [handleActive, handleMarks, handleDisabled, handleValid];

const TOTAL = 7 * 6;
function getFullItem(item, options, selectedDate, isShowStatus) {
  if (options.marks.find((x) => x.value === item.value)) {
    item.marks = [{
      value: item.value
    }];
  }
  if (!isShowStatus)
    return item;
  const bindedPlugins = plugins.map((fn) => fn.bind(null, {
    options,
    selectedDate
  }));
  return flow(bindedPlugins)(item);
}
function generateCalendarGroup(options) {
  return function(generateDate, selectedDate, isShowStatus) {
    const date = dayjs(generateDate);
    const { format } = options;
    const firstDate = date.startOf("month");
    const lastDate = date.endOf("month");
    const preMonthDate = date.subtract(1, "month");
    const list = [];
    const nowMonthDays = date.daysInMonth();
    const preMonthLastDay = preMonthDate.endOf("month").day();
    for (let i2 = 1; i2 <= preMonthLastDay + 1; i2++) {
      const thisDate = firstDate.subtract(i2, "day").startOf("day");
      let item = {
        marks: [],
        _value: thisDate,
        text: thisDate.date(),
        type: TYPE_PRE_MONTH,
        value: thisDate.format(format)
      };
      item = getFullItem(item, options, selectedDate, isShowStatus);
      list.push(item);
    }
    list.reverse();
    for (let i2 = 0; i2 < nowMonthDays; i2++) {
      const thisDate = firstDate.add(i2, "day").startOf("day");
      let item = {
        marks: [],
        _value: thisDate,
        text: thisDate.date(),
        type: TYPE_NOW_MONTH,
        value: thisDate.format(format)
      };
      item = getFullItem(item, options, selectedDate, isShowStatus);
      list.push(item);
    }
    let i = 1;
    while (list.length < TOTAL) {
      const thisDate = lastDate.add(i++, "day").startOf("day");
      let item = {
        marks: [],
        _value: thisDate,
        text: thisDate.date(),
        type: TYPE_NEXT_MONTH,
        value: thisDate.format(format)
      };
      item = getFullItem(item, options, selectedDate, isShowStatus);
      list.push(item);
    }
    return {
      list,
      value: generateDate
    };
  };
}

const MAP = {
  [TYPE_PRE_MONTH]: "pre",
  [TYPE_NOW_MONTH]: "now",
  [TYPE_NEXT_MONTH]: "next"
};
const AtCalendarList = defineComponent({
  name: "AtCalendarList",
  data: () => ({ addGlobalClass: true }),
  emits: {
    "click"(item) {
      return !!(item && typeof item === "object");
    },
    "long-click"(item) {
      return !!(item && typeof item === "object");
    }
  },
  props: {
    list: Array
  },
  setup(props, { emit }) {
    const genFlexItemClasses = computed(() => (item) => [
      "flex__item",
      {
        [`flex__item--${MAP[item.type]}`]: Boolean(MAP[item.type]),
        "flex__item--today": item.isToday,
        "flex__item--active": item.isActive,
        "flex__item--selected": item.isSelected,
        "flex__item--selected-head": item.isSelectedHead,
        "flex__item--selected-tail": item.isSelectedTail,
        "flex__item--blur": item.isDisabled || item.type === TYPE_PRE_MONTH || item.type === TYPE_NEXT_MONTH
      }
    ]);
    function handleClick(item) {
      emit("click", item);
    }
    function handleLongClick(item) {
      emit("long-click", item);
    }
    return {
      ...toRefs(props),
      handleClick,
      handleLongClick,
      genFlexItemClasses
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$h = renderList, _Fragment$h = Fragment, _openBlock$Q = openBlock, _createElementBlock$Q = createElementBlock, _toDisplayString$v = toDisplayString, _createElementVNode$A = createElementVNode, _createCommentVNode$r = createCommentVNode, _normalizeClass$n = normalizeClass;

const _hoisted_1$D = {
  key: 0,
  class: "at-calendar__list flex"
};
const _hoisted_2$w = ["onTap", "onLongpress"];
const _hoisted_3$s = { class: "flex__item-container" };
const _hoisted_4$n = { class: "container-text" };
const _hoisted_5$j = { class: "flex__item-extra extra" };
const _hoisted_6$c = {
  key: 0,
  class: "extra-marks"
};

function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
  return (_ctx.list && _ctx.list.length > 0)
    ? (_openBlock$Q(), _createElementBlock$Q("view", _hoisted_1$D, [
        (_openBlock$Q(true), _createElementBlock$Q(_Fragment$h, null, _renderList$h(_ctx.list, (item, index) => {
          return (_openBlock$Q(), _createElementBlock$Q("view", {
            key: `list-item-${item.value}-${index}`,
            class: _normalizeClass$n(_ctx.genFlexItemClasses(item)),
            onTap: $event => (_ctx.handleClick(item)),
            onLongpress: $event => (_ctx.handleLongClick(item))
          }, [
            _createElementVNode$A("view", _hoisted_3$s, [
              _createElementVNode$A("view", _hoisted_4$n, _toDisplayString$v(item.text), 1 /* TEXT */)
            ]),
            _createElementVNode$A("view", _hoisted_5$j, [
              (item.marks && item.marks.length > 0)
                ? (_openBlock$Q(), _createElementBlock$Q("view", _hoisted_6$c, [
                    (_openBlock$Q(true), _createElementBlock$Q(_Fragment$h, null, _renderList$h(item.marks, (mark, key) => {
                      return (_openBlock$Q(), _createElementBlock$Q("text", {
                        key: key,
                        class: "mark"
                      }, _toDisplayString$v(mark.value), 1 /* TEXT */))
                    }), 128 /* KEYED_FRAGMENT */))
                  ]))
                : _createCommentVNode$r("v-if", true)
            ])
          ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_2$w))
        }), 128 /* KEYED_FRAGMENT */))
      ]))
    : _createCommentVNode$r("v-if", true)
}


AtCalendarList.render = _sfc_render$Q;

const AtCalendarHeader = defineComponent({
  name: "AtCalendarHeader",
  data: () => ({
    addGlobalClass: true,
    days: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"]
  })
});

// Binding optimization for webpack code-split
const _renderList$g = renderList, _Fragment$g = Fragment, _openBlock$P = openBlock, _createElementBlock$P = createElementBlock, _toDisplayString$u = toDisplayString, _createElementVNode$z = createElementVNode;

const _hoisted_1$C = { class: "header at-calendar__header" };
const _hoisted_2$v = { class: "header__flex" };

function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$P(), _createElementBlock$P("view", _hoisted_1$C, [
    _createElementVNode$z("view", _hoisted_2$v, [
      (_openBlock$P(true), _createElementBlock$P(_Fragment$g, null, _renderList$g(_ctx.days, (day, index) => {
        return (_openBlock$P(), _createElementBlock$P("view", {
          key: index,
          class: "header__flex-item"
        }, _toDisplayString$u(day), 1 /* TEXT */))
      }), 128 /* KEYED_FRAGMENT */))
    ])
  ]))
}


AtCalendarHeader.render = _sfc_render$P;

const ANIMATE_DURATION = 300;
const AtCalendarBody = defineComponent({
  name: "AtCalendarBody",
  components: {
    AtCalendarDayList: AtCalendarHeader,
    AtCalendarDateList: AtCalendarList
  },
  emits: {
    "day-click"(item) {
      return !!(item && typeof item === "object");
    },
    "long-click"(item) {
      return !!(item && typeof item === "object");
    },
    "swipe-month"(vectorCount) {
      return !!(vectorCount && typeof vectorCount === "number");
    }
  },
  data: () => ({ addGlobalClass: true }),
  props: {
    format: {
      type: String,
      default: "YYYY-MM-DD"
    },
    validDates: {
      type: Array,
      default: () => []
    },
    marks: {
      type: Array,
      default: () => []
    },
    minDate: [String, Number, Date],
    maxDate: [String, Number, Date],
    isSwiper: {
      type: Boolean,
      default: true
    },
    isVertical: Boolean,
    generateDate: {
      type: [Number, String],
      default: Date.now()
    },
    selectedDate: {
      type: Object,
      default: () => ({ end: Date.now(), start: Date.now() })
    },
    selectedDates: {
      type: Array,
      default: () => []
    }
  },
  setup(props, { emit }) {
    const startX = ref(0);
    const maxWidth = ref(0);
    const changeCount = ref(0);
    const swipeStartPoint = ref(0);
    const currentSwiperIndex = ref(1);
    const isPreMonth = ref(false);
    const isWeb = ref(Taro.getEnv() === Taro.ENV_TYPE.WEB);
    let generateFunc = generateCalendarGroup({
      validDates: props.validDates,
      format: props.format,
      minDate: props.minDate,
      maxDate: props.maxDate,
      marks: props.marks,
      selectedDates: props.selectedDates
    });
    const state = reactive({
      listGroup: getGroups(props.generateDate, props.selectedDate),
      offsetSize: 0,
      isAnimate: false
    });
    const h5MainBodyStyle = computed(() => {
      let style = {};
      const transformStyle = props.isVertical ? `translateY(-100%) translate3d(0,${state.offsetSize}px,0)` : `translateX(-100%) translate3d(${state.offsetSize}px,0,0)`;
      if (props.isSwiper) {
        style.transform = transformStyle;
        style.WebkitTransform = transformStyle;
        if (props.isVertical) {
          style.flexDirection = "column";
        }
      }
      return style;
    });
    watch(() => [
      props.validDates,
      props.marks,
      props.format,
      props.minDate,
      props.maxDate,
      props.selectedDates,
      props.generateDate,
      props.selectedDate
    ], ([
      validDates,
      marks,
      format,
      minDate,
      maxDate,
      selectedDates,
      generateDate,
      selectedDate
    ]) => {
      const options = {
        validDates,
        marks,
        format,
        selectedDates,
        minDate,
        maxDate
      };
      generateFunc = generateCalendarGroup(options);
      state.offsetSize = 0;
      state.listGroup = getGroups(generateDate, selectedDate);
    });
    function getGroups(generateDate, selectedDate) {
      const dayjsDate = dayjs(generateDate);
      const arr = [];
      const preList = generateFunc(dayjsDate.subtract(1, "month").valueOf(), selectedDate);
      const nowList = generateFunc(generateDate, selectedDate, true);
      const nextList = generateFunc(dayjsDate.add(1, "month").valueOf(), selectedDate);
      const preListIndex = currentSwiperIndex.value === 0 ? 2 : currentSwiperIndex.value - 1;
      const nextListIndex = currentSwiperIndex.value === 2 ? 0 : currentSwiperIndex.value + 1;
      arr[preListIndex] = preList;
      arr[nextListIndex] = nextList;
      arr[currentSwiperIndex.value] = nowList;
      return arr;
    }
    function handleTouchStart(e) {
      startX.value = props.isVertical ? e.touches[0].clientY : e.touches[0].clientX;
    }
    function handleTouchMove(e) {
      const clientXorY = props.isVertical ? e.touches[0].clientY : e.touches[0].clientX;
      state.offsetSize = clientXorY - startX.value;
      e.preventDefault();
      e.stopPropagation();
    }
    function animateMoveSlide(offset, callback) {
      state.isAnimate = true;
      nextTick(() => {
        state.offsetSize = offset;
        setTimeout(() => {
          state.isAnimate = false;
          nextTick(() => {
            callback && callback();
          });
        }, ANIMATE_DURATION);
      });
    }
    function handleTouchEnd() {
      const isRight = state.offsetSize > 0;
      const breakpoint = maxWidth.value / 2;
      const absOffsetSize = Math.abs(state.offsetSize);
      if (absOffsetSize > breakpoint) {
        const res = isRight ? maxWidth.value : -maxWidth.value;
        return animateMoveSlide(res, () => {
          emit("swipe-month", isRight ? -1 : 1);
        });
      }
      animateMoveSlide(0);
    }
    function handleChange(e) {
      const { current, source } = e.detail;
      if (source === "touch") {
        currentSwiperIndex.value = current;
        changeCount.value += 1;
      }
    }
    function handleAnimationFinish() {
      if (changeCount.value > 0) {
        emit("swipe-month", isPreMonth.value ? -changeCount.value : changeCount.value);
        changeCount.value = 0;
      }
    }
    function handleSwipeTouchStart(e) {
      const { clientX, clientY } = e.changedTouches[0];
      swipeStartPoint.value = props.isVertical ? clientY : clientX;
    }
    function handleSwipeTouchEnd(e) {
      const { clientX, clientY } = e.changedTouches[0];
      isPreMonth.value = props.isVertical ? clientY - swipeStartPoint.value > 0 : clientX - swipeStartPoint.value > 0;
    }
    function handleSwipeTouchMove(e) {
      e.preventDefault();
      e.stopPropagation();
      return;
    }
    onMounted(() => {
      delayQuerySelector(this, ".at-calendar-slider__main", 100).then((res) => {
        maxWidth.value = props.isVertical ? res[0].height : res[0].width;
      });
    });
    return {
      ...toRefs(state),
      isSwiper: toRef(props, "isSwiper"),
      isWeb,
      h5MainBodyStyle,
      currentSwiperIndex,
      handleChange,
      handleTouchEnd,
      handleTouchMove,
      handleTouchStart,
      handleAnimationFinish,
      handleSwipeTouchEnd,
      handleSwipeTouchMove,
      handleSwipeTouchStart
    };
  }
});

// Binding optimization for webpack code-split
const _resolveComponent$a = resolveComponent, _createVNode$5 = createVNode, _createElementVNode$y = createElementVNode, _openBlock$O = openBlock, _createElementBlock$O = createElementBlock, _createCommentVNode$q = createCommentVNode, _normalizeClass$m = normalizeClass, _normalizeStyle$m = normalizeStyle, _renderList$f = renderList, _Fragment$f = Fragment;

const _hoisted_1$B = {
  key: 0,
  class: "main at-calendar-slider__main"
};
const _hoisted_2$u = { class: "main__body body" };
const _hoisted_3$r = { class: "body__slider body__slider--now" };
const _hoisted_4$m = { class: "body__slider body__slider--pre" };
const _hoisted_5$i = { class: "body__slider body__slider--now" };
const _hoisted_6$b = { class: "body__slider body__slider--next" };
const _hoisted_7$8 = {
  key: 2,
  class: "main at-calendar-slider__main"
};
const _hoisted_8$5 = ["vertical", "current"];
const _hoisted_9$1 = ["itemId"];

function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_calendar_day_list = _resolveComponent$a("at-calendar-day-list");
  const _component_at_calendar_date_list = _resolveComponent$a("at-calendar-date-list");

  return (!_ctx.isSwiper)
    ? (_openBlock$O(), _createElementBlock$O("view", _hoisted_1$B, [
        _createVNode$5(_component_at_calendar_day_list),
        _createElementVNode$y("view", _hoisted_2$u, [
          _createElementVNode$y("view", _hoisted_3$r, [
            _createVNode$5(_component_at_calendar_date_list, {
              list: _ctx.listGroup[1].list,
              onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('day-click', $event))),
              onLongClick: _cache[1] || (_cache[1] = $event => (_ctx.$emit('long-click', $event)))
            }, null, 8 /* PROPS */, ["list"])
          ])
        ])
      ]))
    : (_ctx.isWeb)
      ? (_openBlock$O(), _createElementBlock$O("view", {
          key: 1,
          class: "main at-calendar-slider__main",
          onTouchend: _cache[4] || (_cache[4] = (...args) => (_ctx.handleTouchEnd && _ctx.handleTouchEnd(...args))),
          onTouchmove: _cache[5] || (_cache[5] = (...args) => (_ctx.handleTouchMove && _ctx.handleTouchMove(...args))),
          onTouchstart: _cache[6] || (_cache[6] = (...args) => (_ctx.handleTouchStart && _ctx.handleTouchStart(...args)))
        }, [
          _createVNode$5(_component_at_calendar_day_list),
          _createElementVNode$y("view", {
            class: _normalizeClass$m(['body', 'main__body', {
        'main__body--slider': _ctx.isSwiper,
        'main__body--animate': _ctx.isAnimate
      }]),
            style: _normalizeStyle$m(_ctx.h5MainBodyStyle)
          }, [
            _createElementVNode$y("view", _hoisted_4$m, [
              _createVNode$5(_component_at_calendar_date_list, {
                list: _ctx.listGroup[0].list
              }, null, 8 /* PROPS */, ["list"])
            ]),
            _createElementVNode$y("view", _hoisted_5$i, [
              _createVNode$5(_component_at_calendar_date_list, {
                list: _ctx.listGroup[1].list,
                onClick: _cache[2] || (_cache[2] = $event => (_ctx.$emit('day-click', $event))),
                onLongClick: _cache[3] || (_cache[3] = $event => (_ctx.$emit('long-click', $event)))
              }, null, 8 /* PROPS */, ["list"])
            ]),
            _createElementVNode$y("view", _hoisted_6$b, [
              _createVNode$5(_component_at_calendar_date_list, {
                list: _ctx.listGroup[2].list
              }, null, 8 /* PROPS */, ["list"])
            ])
          ], 6 /* CLASS, STYLE */)
        ], 32 /* HYDRATE_EVENTS */))
      : (_ctx.isSwiper && !_ctx.isWeb)
        ? (_openBlock$O(), _createElementBlock$O("view", _hoisted_7$8, [
            _createVNode$5(_component_at_calendar_day_list),
            _createElementVNode$y("swiper", {
              class: "main__body",
              circular: true,
              skipHiddenItemLayout: true,
              catchMove: true,
              vertical: _ctx.isVertical,
              current: _ctx.currentSwiperIndex,
              onChange: _cache[9] || (_cache[9] = (...args) => (_ctx.handleChange && _ctx.handleChange(...args))),
              onTouchend: _cache[10] || (_cache[10] = (...args) => (_ctx.handleSwipeTouchEnd && _ctx.handleSwipeTouchEnd(...args))),
              onTouchmove: _cache[11] || (_cache[11] = (...args) => (_ctx.handleSwipeTouchMove && _ctx.handleSwipeTouchMove(...args))),
              onTouchstart: _cache[12] || (_cache[12] = (...args) => (_ctx.handleSwipeTouchStart && _ctx.handleSwipeTouchStart(...args))),
              onAnimationfinish: _cache[13] || (_cache[13] = (...args) => (_ctx.handleAnimationFinish && _ctx.handleAnimationFinish(...args)))
            }, [
              (_openBlock$O(true), _createElementBlock$O(_Fragment$f, null, _renderList$f(_ctx.listGroup, (item, key) => {
                return (_openBlock$O(), _createElementBlock$O("swiper-item", {
                  key: key.toString(),
                  itemId: key.toString()
                }, [
                  _createVNode$5(_component_at_calendar_date_list, {
                    list: item.list,
                    onClick: _cache[7] || (_cache[7] = $event => (_ctx.$emit('day-click', $event))),
                    onLongClick: _cache[8] || (_cache[8] = $event => (_ctx.$emit('long-click', $event)))
                  }, null, 8 /* PROPS */, ["list"])
                ], 8 /* PROPS */, _hoisted_9$1))
              }), 128 /* KEYED_FRAGMENT */))
            ], 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_8$5)
          ]))
        : _createCommentVNode$q("v-if", true)
}


AtCalendarBody.render = _sfc_render$O;

const AtCalendarController = defineComponent({
  name: "AtCalendarController",
  data: () => ({ addGlobalClass: true }),
  emits: [
    "pre-month",
    "next-month",
    "select-date"
  ],
  props: {
    generateDate: {
      type: [String, Number, Date],
      default: Date.now()
    },
    minDate: [String, Number, Date],
    maxDate: [String, Number, Date],
    hideArrow: Boolean,
    monthFormat: {
      type: String,
      default: "YYYY \u5E74 MM \u6708"
    }
  },
  setup(props) {
    const dayjsDate = computed(() => dayjs(props.generateDate));
    const dayjsMinDate = computed(() => !!props.minDate && dayjs(props.minDate));
    const dayjsMaxDate = computed(() => !!props.maxDate && dayjs(props.maxDate));
    const isMinMonth = computed(() => {
      return dayjsMinDate.value && dayjsMinDate.value.startOf("month").isSame(dayjsDate.value);
    });
    const isMaxMonth = computed(() => {
      return dayjsMaxDate.value && dayjsMaxDate.value.startOf("month").isSame(dayjsDate.value);
    });
    const minDateValue = computed(() => dayjsMinDate.value ? dayjsMinDate.value.format("YYYY-MM") : "");
    const maxDateValue = computed(() => dayjsMaxDate.value ? dayjsMaxDate.value.format("YYYY-MM") : "");
    const genArrowClasses = (direction, disabled) => ["controller__arrow", {
      [`controller__arrow--${direction}`]: true,
      "controller__arrow--disabled": disabled
    }];
    return {
      ...toRefs(props),
      dayjsDate,
      isMinMonth,
      isMaxMonth,
      minDateValue,
      maxDateValue,
      genArrowClasses
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeClass$l = normalizeClass, _openBlock$N = openBlock, _createElementBlock$N = createElementBlock, _createCommentVNode$p = createCommentVNode, _toDisplayString$t = toDisplayString, _createElementVNode$x = createElementVNode;

const _hoisted_1$A = { class: "at-calendar__controller controller" };
const _hoisted_2$t = ["end", "start", "value"];
const _hoisted_3$q = { class: "controller__info" };

function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$N(), _createElementBlock$N("view", _hoisted_1$A, [
    (!_ctx.hideArrow)
      ? (_openBlock$N(), _createElementBlock$N("view", {
          key: 0,
          class: _normalizeClass$l(_ctx.genArrowClasses('left', _ctx.isMinMonth)),
          onTap: _cache[0] || (_cache[0] = $event => (_ctx.$emit('pre-month', _ctx.isMinMonth)))
        }, null, 34 /* CLASS, HYDRATE_EVENTS */))
      : _createCommentVNode$p("v-if", true),
    _createElementVNode$x("picker", {
      mode: "date",
      fields: "month",
      end: _ctx.maxDateValue,
      start: _ctx.minDateValue,
      value: _ctx.dayjsDate.format('YYYY-MM'),
      onChange: _cache[1] || (_cache[1] = $event => (_ctx.$emit('select-date', $event)))
    }, [
      _createElementVNode$x("text", _hoisted_3$q, _toDisplayString$t(_ctx.dayjsDate.format(_ctx.monthFormat)), 1 /* TEXT */)
    ], 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2$t),
    (!_ctx.hideArrow)
      ? (_openBlock$N(), _createElementBlock$N("view", {
          key: 1,
          class: _normalizeClass$l(_ctx.genArrowClasses('right', _ctx.isMaxMonth)),
          onTap: _cache[2] || (_cache[2] = $event => (_ctx.$emit('next-month', _ctx.isMaxMonth)))
        }, null, 34 /* CLASS, HYDRATE_EVENTS */))
      : _createCommentVNode$p("v-if", true)
  ]))
}


AtCalendarController.render = _sfc_render$N;

const AtCalendar = defineComponent({
  name: "AtCalendar",
  components: {
    AtCalendarBody,
    AtCalendarController
  },
  emits: {
    "click-pre-month": null,
    "click-next-month": null,
    "select-date"(item) {
      return !!(item && item.value);
    },
    "day-click"(item) {
      return !!(item && item.value);
    },
    "day-long-click"(item) {
      return !!(item && item.value);
    },
    "month-change"(value) {
      return !!(value && typeof value === "string");
    }
  },
  data: () => ({ addGlobalClass: true }),
  props: {
    currentDate: {
      type: [Number, String, Date, Object],
      default: Date.now()
    },
    minDate: {
      type: [String, Number, Date],
      default: () => ""
    },
    maxDate: {
      type: [String, Number, Date],
      default: () => ""
    },
    isSwiper: {
      type: Boolean,
      default: true
    },
    marks: {
      type: Array,
      default: () => []
    },
    validDates: {
      type: Array,
      default: () => []
    },
    format: {
      type: String,
      default: "YYYY-MM-DD"
    },
    monthFormat: {
      type: String,
      default: "YYYY \u5E74 MM \u6708"
    },
    hideArrow: Boolean,
    isVertical: Boolean,
    isMultiSelect: Boolean,
    selectedDates: {
      type: Array,
      default: () => []
    }
  },
  setup(props, { emit }) {
    const { currentDate, isMultiSelect } = toRefs(props);
    let { generateDate, selectedDate } = getInitializedState(currentDate.value, isMultiSelect.value);
    const state = reactive({
      generateDate,
      selectedDate
    });
    watch(() => [
      props.currentDate,
      props.isMultiSelect
    ], ([currentDate2, isMultiSelect2], [preCurrentDate, preIsMultiSelect]) => {
      if (!currentDate2 || currentDate2 === preCurrentDate)
        return;
      if (isMultiSelect2 && preIsMultiSelect) {
        const { start, end } = currentDate2;
        const { start: preStart, end: preEnd } = preCurrentDate;
        if (start === preStart && preEnd === end) {
          return;
        }
      }
      const stateValue = getInitializedState(currentDate2, isMultiSelect2);
      Object.assign(state, stateValue);
    });
    function getSingleSelectedState(value) {
      const stateValue = {
        selectedDate: getSelectedDate(value.valueOf())
      };
      const dayjsGenerateDate = value.startOf("month");
      const generateDateValue = dayjsGenerateDate.valueOf();
      if (generateDateValue !== state.generateDate) {
        triggerChangeDate(dayjsGenerateDate);
        stateValue.generateDate = generateDateValue;
      }
      return stateValue;
    }
    function getMultiSelectedState(value) {
      const { end, start } = state.selectedDate;
      const valueUnix = value.valueOf();
      const stateValue = {
        selectedDate: state.selectedDate
      };
      if (end) {
        stateValue.selectedDate = getSelectedDate(valueUnix, 0);
      } else {
        stateValue.selectedDate.end = Math.max(valueUnix, +start);
        stateValue.selectedDate.start = Math.min(valueUnix, +start);
      }
      return stateValue;
    }
    function getInitializedState(currentDate2, isMultiSelect2) {
      let end;
      let start;
      let generateDateValue;
      if (!currentDate2) {
        const dayjsStart = dayjs$1();
        start = dayjsStart.startOf("day").valueOf();
        generateDateValue = dayjsStart.startOf("month").valueOf();
        return {
          generateDate: generateDateValue,
          selectedDate: {
            start: ""
          }
        };
      }
      if (isMultiSelect2) {
        const { start: cStart, end: cEnd } = currentDate2;
        const dayjsStart = dayjs$1(cStart);
        start = dayjsStart.startOf("day").valueOf();
        generateDateValue = dayjsStart.startOf("month").valueOf();
        end = cEnd ? dayjs$1(cEnd).startOf("day").valueOf() : start;
      } else {
        const dayjsStart = dayjs$1(currentDate2);
        start = dayjsStart.startOf("day").valueOf();
        generateDateValue = dayjsStart.startOf("month").valueOf();
        end = start;
      }
      return {
        generateDate: generateDateValue,
        selectedDate: getSelectedDate(start, end)
      };
    }
    function getSelectedDate(start, end) {
      const stateValue = {
        start,
        end: start
      };
      if (typeof end !== "undefined") {
        stateValue.end = end;
      }
      return stateValue;
    }
    function triggerChangeDate(value) {
      emit("month-change", value.format(props.format));
    }
    function setMonth(vectorCount) {
      const _generateDate = dayjs$1(state.generateDate).add(vectorCount, "month");
      state.generateDate = _generateDate.valueOf();
      if (vectorCount) {
        emit("month-change", _generateDate.format(props.format));
      }
    }
    function handleClickPreMonth(isMinMonth) {
      if (isMinMonth === true)
        return;
      setMonth(-1);
      emit("click-pre-month");
    }
    function handleClickNextMonth(isMaxMonth) {
      if (isMaxMonth === true)
        return;
      setMonth(1);
      emit("click-next-month");
    }
    function handleSelectDate(e) {
      const { value } = e.detail;
      const _generateDate = dayjs$1(value);
      const _generateDateValue = _generateDate.valueOf();
      if (state.generateDate === _generateDateValue)
        return;
      triggerChangeDate(_generateDate);
      state.generateDate = _generateDateValue;
    }
    function handleDayClick(item) {
      const { isDisabled, value } = item;
      if (isDisabled)
        return;
      const dayjsDate = dayjs$1(value);
      let stateValue = {};
      stateValue = props.isMultiSelect ? getMultiSelectedState(dayjsDate) : getSingleSelectedState(dayjsDate);
      Object.assign(state, stateValue);
      nextTick(() => {
        handleSelectedDate();
      });
      emit("day-click", { value: item.value });
    }
    function handleSelectedDate() {
      const info = {
        start: dayjs$1(state.selectedDate.start).format(props.format)
      };
      if (state.selectedDate.end) {
        info.end = dayjs$1(state.selectedDate.end).format(props.format);
      }
      emit("select-date", { value: info });
    }
    function handleDayLongClick(item) {
      emit("day-long-click", { value: item.value });
    }
    return {
      ...toRefs(state),
      ...toRefs(props),
      setMonth,
      handleDayClick,
      handleSelectDate,
      handleDayLongClick,
      handleSelectedDate,
      handleClickPreMonth,
      handleClickNextMonth
    };
  }
});

// Binding optimization for webpack code-split
const _resolveComponent$9 = resolveComponent, _createVNode$4 = createVNode, _mergeProps$K = mergeProps, _openBlock$M = openBlock, _createElementBlock$M = createElementBlock;

function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_calendar_controller = _resolveComponent$9("at-calendar-controller");
  const _component_at_calendar_body = _resolveComponent$9("at-calendar-body");

  return (_openBlock$M(), _createElementBlock$M("view", _mergeProps$K(_ctx.$attrs, { class: "at-calendar" }), [
    _createVNode$4(_component_at_calendar_controller, {
      minDate: _ctx.minDate,
      maxDate: _ctx.maxDate,
      hideArrow: _ctx.hideArrow,
      monthFormat: _ctx.monthFormat,
      generateDate: _ctx.generateDate,
      onSelectDate: _ctx.handleSelectDate,
      onPreMonth: _ctx.handleClickPreMonth,
      onNextMonth: _ctx.handleClickNextMonth
    }, null, 8 /* PROPS */, ["minDate", "maxDate", "hideArrow", "monthFormat", "generateDate", "onSelectDate", "onPreMonth", "onNextMonth"]),
    _createVNode$4(_component_at_calendar_body, {
      marks: _ctx.marks,
      format: _ctx.format,
      minDate: _ctx.minDate,
      maxDate: _ctx.maxDate,
      isSwiper: _ctx.isSwiper,
      isVertical: _ctx.isVertical,
      validDates: _ctx.validDates,
      selectedDate: _ctx.selectedDate,
      selectedDates: _ctx.selectedDates,
      generateDate: _ctx.generateDate,
      onSwipeMonth: _ctx.setMonth,
      onDayClick: _ctx.handleDayClick,
      onLongClick: _ctx.handleDayLongClick
    }, null, 8 /* PROPS */, ["marks", "format", "minDate", "maxDate", "isSwiper", "isVertical", "validDates", "selectedDate", "selectedDates", "generateDate", "onSwipeMonth", "onDayClick", "onLongClick"])
  ], 16 /* FULL_PROPS */))
}


AtCalendar.render = _sfc_render$M;

const AtCard = defineComponent({
  name: "AtCard",
  emits: ["click"],
  props: {
    isFull: Boolean,
    note: String,
    thumb: String,
    title: String,
    extra: String,
    extraStyle: Object,
    icon: Object
  },
  setup(props, { emit }) {
    const { iconClasses } = useIconClasses(props.icon);
    const { iconStyle } = useIconStyle(props.icon);
    function handleClick(args) {
      emit("click", args);
    }
    return {
      ...toRefs(props),
      iconClasses,
      iconStyle,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$w = createElementVNode, _openBlock$L = openBlock, _createElementBlock$L = createElementBlock, _createCommentVNode$o = createCommentVNode, _renderSlot$n = renderSlot, _normalizeClass$k = normalizeClass, _normalizeStyle$l = normalizeStyle, _toDisplayString$s = toDisplayString, _mergeProps$J = mergeProps;

const _hoisted_1$z = { class: "at-card__header" };
const _hoisted_2$s = {
  key: 0,
  class: "at-card__header-thumb"
};
const _hoisted_3$p = ["src"];
const _hoisted_4$l = {
  key: 3,
  class: "at-card__header-title"
};
const _hoisted_5$h = { class: "at-card__content" };
const _hoisted_6$a = { class: "at-card__content-info" };
const _hoisted_7$7 = {
  key: 0,
  class: "at-card__content-note"
};

function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$L(), _createElementBlock$L("view", _mergeProps$J(_ctx.$attrs, {
    class: ['at-card', { 'at-card--full': _ctx.isFull }],
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    _createElementVNode$w("view", _hoisted_1$z, [
      (_ctx.thumb)
        ? (_openBlock$L(), _createElementBlock$L("view", _hoisted_2$s, [
            _createElementVNode$w("image", {
              class: "at-card__header-thumb-info",
              mode: "scaleToFill",
              src: _ctx.thumb
            }, null, 8 /* PROPS */, _hoisted_3$p)
          ]))
        : (_ctx.$slots.renderIcon)
          ? _renderSlot$n(_ctx.$slots, "renderIcon", { key: 1 })
          : (_ctx.icon && _ctx.icon.value)
            ? (_openBlock$L(), _createElementBlock$L("text", {
                key: 2,
                class: _normalizeClass$k(['at-card__header-icon', _ctx.iconClasses ]),
                style: _normalizeStyle$l(_ctx.iconStyle)
              }, null, 6 /* CLASS, STYLE */))
            : _createCommentVNode$o("v-if", true),
      (_ctx.title)
        ? (_openBlock$L(), _createElementBlock$L("text", _hoisted_4$l, _toDisplayString$s(_ctx.title), 1 /* TEXT */))
        : _createCommentVNode$o("v-if", true),
      (_ctx.extra)
        ? (_openBlock$L(), _createElementBlock$L("text", {
            key: 4,
            class: "at-card__header-extra",
            style: _normalizeStyle$l({ ...(_ctx.extraStyle || {}) })
          }, _toDisplayString$s(_ctx.extra), 5 /* TEXT, STYLE */))
        : _createCommentVNode$o("v-if", true)
    ]),
    _createElementVNode$w("view", _hoisted_5$h, [
      _createElementVNode$w("view", _hoisted_6$a, [
        _renderSlot$n(_ctx.$slots, "default")
      ]),
      (_ctx.note)
        ? (_openBlock$L(), _createElementBlock$L("view", _hoisted_7$7, _toDisplayString$s(_ctx.note), 1 /* TEXT */))
        : _createCommentVNode$o("v-if", true)
    ])
  ], 16 /* FULL_PROPS */))
}


AtCard.render = _sfc_render$L;

const AtCheckbox = defineComponent({
  name: "AtCheckbox",
  emits: {
    "update:selectedList"(selectedList) {
      return !!(selectedList && Array.isArray(selectedList));
    }
  },
  props: {
    options: {
      type: Array,
      required: true
    },
    selectedList: {
      type: Array,
      default: () => []
    }
  },
  setup(props, { emit }) {
    const selectedList = useModelValue(props, emit, "selectedList");
    const genOptionClasses = (option) => ({
      "at-checkbox__option": true,
      "at-checkbox__option--disabled": option.disabled,
      "at-checkbox__option--selected": props.selectedList.includes(option.value)
    });
    function handleClick(idx) {
      const option = props.options[idx];
      const { disabled, value } = option;
      if (disabled)
        return;
      const selectedSet = new Set(props.selectedList);
      if (!selectedSet.has(value)) {
        selectedSet.add(value);
      } else {
        selectedSet.delete(value);
      }
      selectedList.value = Array.from(selectedSet);
    }
    return {
      options: toRef(props, "options"),
      genOptionClasses,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$e = renderList, _Fragment$e = Fragment, _openBlock$K = openBlock, _createElementBlock$K = createElementBlock, _createElementVNode$v = createElementVNode, _toDisplayString$r = toDisplayString, _createCommentVNode$n = createCommentVNode, _normalizeClass$j = normalizeClass, _mergeProps$I = mergeProps;

const _hoisted_1$y = ["onTap"];
const _hoisted_2$r = { class: "at-checkbox__option-wrap" };
const _hoisted_3$o = { class: "at-checkbox__option-cnt" };
const _hoisted_4$k = /*#__PURE__*/_createElementVNode$v("view", { class: "at-checkbox__icon-cnt" }, [
  /*#__PURE__*/_createElementVNode$v("text", { class: "at-icon at-icon-check" })
], -1 /* HOISTED */);
const _hoisted_5$g = { class: "at-checkbox__title" };
const _hoisted_6$9 = {
  key: 0,
  class: "at-checkbox__desc"
};

function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$K(), _createElementBlock$K("view", _mergeProps$I(_ctx.$attrs, { class: "at-checkbox" }), [
    (_openBlock$K(true), _createElementBlock$K(_Fragment$e, null, _renderList$e(_ctx.options, (option, idx) => {
      return (_openBlock$K(), _createElementBlock$K("view", {
        key: option.value,
        class: _normalizeClass$j(_ctx.genOptionClasses(option)),
        onTap: $event => (_ctx.handleClick(idx))
      }, [
        _createElementVNode$v("view", _hoisted_2$r, [
          _createElementVNode$v("view", _hoisted_3$o, [
            _hoisted_4$k,
            _createElementVNode$v("view", _hoisted_5$g, _toDisplayString$r(option.label), 1 /* TEXT */)
          ]),
          (option.desc)
            ? (_openBlock$K(), _createElementBlock$K("view", _hoisted_6$9, _toDisplayString$r(option.desc), 1 /* TEXT */))
            : _createCommentVNode$n("v-if", true)
        ])
      ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1$y))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtCheckbox.render = _sfc_render$K;

const AtCountdownItem = defineComponent({
  name: "AtCountdownItem",
  props: {
    num: {
      type: Number,
      default: 0
    },
    separator: {
      type: String,
      default: ":"
    }
  },
  setup(props) {
    function formatNum(num) {
      return num <= 9 ? `0${num}` : `${num}`;
    }
    return {
      ...toRefs(props),
      formatNum
    };
  }
});

// Binding optimization for webpack code-split
const _toDisplayString$q = toDisplayString, _createElementVNode$u = createElementVNode, _openBlock$J = openBlock, _createElementBlock$J = createElementBlock;

const _hoisted_1$x = { class: "at-countdown__item" };
const _hoisted_2$q = { class: "at-countdown__time-box" };
const _hoisted_3$n = { class: "at-countdown__time" };
const _hoisted_4$j = { class: "at-countdown__separator" };

function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$J(), _createElementBlock$J("view", _hoisted_1$x, [
    _createElementVNode$u("view", _hoisted_2$q, [
      _createElementVNode$u("text", _hoisted_3$n, _toDisplayString$q(_ctx.formatNum(_ctx.num)), 1 /* TEXT */)
    ]),
    _createElementVNode$u("text", _hoisted_4$j, _toDisplayString$q(_ctx.separator), 1 /* TEXT */)
  ]))
}


AtCountdownItem.render = _sfc_render$J;

const toSeconds = (day, hours, minutes, seconds) => day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds;
const AtCountdown = defineComponent({
  name: "AtCountdown",
  components: {
    AtCountdownItem
  },
  emits: ["time-up"],
  props: {
    isCard: Boolean,
    isShowDay: Boolean,
    isShowHour: { type: Boolean, default: true },
    format: {
      type: Object,
      default: () => ({
        day: "\u5929",
        hours: "\u65F6",
        minutes: "\u5206",
        seconds: "\u79D2"
      })
    },
    day: {
      type: Number,
      default: 0
    },
    hours: {
      type: Number,
      default: 0
    },
    minutes: {
      type: Number,
      default: 0
    },
    seconds: {
      type: Number,
      default: 0
    }
  },
  onShow() {
    this.setTimer();
  },
  onHide() {
    this.clearTimer();
  },
  setup(props, { emit }) {
    const { format, isCard, isShowDay, isShowHour } = toRefs(props);
    const timer = ref(null);
    const secondsRef = ref(toSeconds(props.day, props.hours, props.minutes, props.seconds));
    const state = reactive(calculateTime());
    watch(() => [
      props.day,
      props.hours,
      props.minutes,
      props.seconds
    ], ([
      day,
      hours,
      minutes,
      seconds
    ]) => {
      secondsRef.value = toSeconds(day, hours, minutes, seconds);
      clearTimer();
      setTimer();
    });
    function setTimer() {
      if (!timer.value)
        countdown();
    }
    function clearTimer() {
      if (timer.value) {
        clearTimeout(timer.value);
      }
    }
    function calculateTime() {
      let [day_, hours_, minutes_, seconds_] = [0, 0, 0, 0];
      if (secondsRef.value > 0) {
        day_ = props.isShowDay ? Math.floor(secondsRef.value / (60 * 60 * 24)) : 0;
        hours_ = Math.floor(secondsRef.value / (60 * 60)) - day_ * 24;
        minutes_ = Math.floor(secondsRef.value / 60) - day_ * 24 * 60 - hours_ * 60;
        seconds_ = Math.floor(secondsRef.value) - day_ * 24 * 60 * 60 - hours_ * 60 * 60 - minutes_ * 60;
      }
      return {
        day_,
        hours_,
        minutes_,
        seconds_
      };
    }
    function countdown() {
      Object.assign(state, calculateTime());
      secondsRef.value--;
      if (secondsRef.value < 0) {
        clearTimer();
        emit("time-up");
        return;
      }
      timer.value = setTimeout(() => {
        countdown();
      }, 1e3);
    }
    onMounted(() => {
      setTimer();
    });
    onUnmounted(() => {
      clearTimer();
    });
    return {
      ...toRefs(state),
      format,
      isCard,
      isShowDay,
      isShowHour
    };
  }
});

// Binding optimization for webpack code-split
const _resolveComponent$8 = resolveComponent, _openBlock$I = openBlock, _createBlock$8 = createBlock, _createCommentVNode$m = createCommentVNode, _createVNode$3 = createVNode, _mergeProps$H = mergeProps, _createElementBlock$I = createElementBlock;

function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_countdown_item = _resolveComponent$8("at-countdown-item");

  return (_openBlock$I(), _createElementBlock$I("view", _mergeProps$H(_ctx.$attrs, {
    class: ['at-countdown', {'at-countdown--card': _ctx.isCard }]
  }), [
    (_ctx.isShowDay)
      ? (_openBlock$I(), _createBlock$8(_component_at_countdown_item, {
          key: 0,
          num: _ctx.day_,
          separator: _ctx.format?.day
        }, null, 8 /* PROPS */, ["num", "separator"]))
      : _createCommentVNode$m("v-if", true),
    (_ctx.isShowHour)
      ? (_openBlock$I(), _createBlock$8(_component_at_countdown_item, {
          key: 1,
          num: _ctx.hours_,
          separator: _ctx.format?.hours
        }, null, 8 /* PROPS */, ["num", "separator"]))
      : _createCommentVNode$m("v-if", true),
    _createVNode$3(_component_at_countdown_item, {
      num: _ctx.minutes_,
      separator: _ctx.format?.minutes
    }, null, 8 /* PROPS */, ["num", "separator"]),
    _createVNode$3(_component_at_countdown_item, {
      num: _ctx.seconds_,
      separator: _ctx.format?.seconds
    }, null, 8 /* PROPS */, ["num", "separator"])
  ], 16 /* FULL_PROPS */))
}


AtCountdown.render = _sfc_render$I;

const AtCurtain = defineComponent({
  name: "AtCurtain",
  emits: ["close"],
  props: {
    isOpened: Boolean,
    closeBtnPosition: {
      type: String,
      default: "bottom",
      validator: (pos) => [
        "top",
        "top-left",
        "top-right",
        "bottom",
        "bottom-left",
        "bottom-right"
      ].includes(pos)
    }
  },
  setup(props, { emit }) {
    const closeBtnClasses = computed(() => {
      const pos = [
        "top",
        "top-left",
        "top-right",
        "bottom",
        "bottom-left",
        "bottom-right"
      ].includes(props.closeBtnPosition) ? props.closeBtnPosition : "top-right";
      return {
        [`at-curtain__btn-close--${pos}`]: Boolean(props.closeBtnPosition)
      };
    });
    function handleClose(e) {
      e.stopPropagation();
      emit("close", e);
    }
    return {
      isOpened: toRef(props, "isOpened"),
      handleClose,
      closeBtnClasses
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$m = renderSlot, _normalizeClass$i = normalizeClass, _createElementVNode$t = createElementVNode, _mergeProps$G = mergeProps, _openBlock$H = openBlock, _createElementBlock$H = createElementBlock;

const _hoisted_1$w = { class: "at-curtain__container" };
const _hoisted_2$p = { class: "at-curtain__body" };

function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$H(), _createElementBlock$H("view", _mergeProps$G(_ctx.$attrs, {
    class: ['at-curtain', { 'at-curtain--closed': !_ctx.isOpened }],
    onTap: _cache[1] || (_cache[1] = (e) => { e.stopPropagation(); })
  }), [
    _createElementVNode$t("view", _hoisted_1$w, [
      _createElementVNode$t("view", _hoisted_2$p, [
        _renderSlot$m(_ctx.$slots, "default"),
        _createElementVNode$t("view", {
          class: _normalizeClass$i(['at-curtain__btn-close', _ctx.closeBtnClasses]),
          onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClose && _ctx.handleClose(...args)))
        }, null, 34 /* CLASS, HYDRATE_EVENTS */)
      ])
    ])
  ], 16 /* FULL_PROPS */))
}


AtCurtain.render = _sfc_render$H;

const AtDivider = defineComponent({
  name: "AtDivider",
  props: {
    content: String,
    height: {
      type: [Number, String],
      default: 0
    },
    fontColor: {
      type: String,
      default: ""
    },
    fontSize: {
      type: [Number, String],
      default: 0
    },
    lineColor: {
      type: String,
      default: ""
    }
  },
  setup(props) {
    const rootStyle = computed(() => ({
      height: props.height ? `${pxTransform(Number(props.height))}` : ""
    }));
    const fontStyle = computed(() => ({
      color: props.fontColor,
      fontSize: props.fontSize ? `${pxTransform(Number(props.fontSize))}` : ""
    }));
    const lineStyle = computed(() => ({
      backgroundColor: props.lineColor
    }));
    return {
      content: toRef(props, "content"),
      rootStyle,
      fontStyle,
      lineStyle
    };
  }
});

// Binding optimization for webpack code-split
const _toDisplayString$p = toDisplayString, _openBlock$G = openBlock, _createElementBlock$G = createElementBlock, _renderSlot$l = renderSlot, _normalizeStyle$k = normalizeStyle, _createElementVNode$s = createElementVNode, _mergeProps$F = mergeProps;

const _hoisted_1$v = { key: 0 };

function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$G(), _createElementBlock$G("view", _mergeProps$F(_ctx.$attrs, {
    class: "at-divider",
    style: _ctx.rootStyle
  }), [
    _createElementVNode$s("view", {
      class: "at-divider__content",
      style: _normalizeStyle$k(_ctx.fontStyle)
    }, [
      (_ctx.content)
        ? (_openBlock$G(), _createElementBlock$G("view", _hoisted_1$v, _toDisplayString$p(_ctx.content), 1 /* TEXT */))
        : _renderSlot$l(_ctx.$slots, "default", { key: 1 })
    ], 4 /* STYLE */),
    _createElementVNode$s("view", {
      class: "at-divider__line",
      style: _normalizeStyle$k(_ctx.lineStyle)
    }, null, 4 /* STYLE */)
  ], 16 /* FULL_PROPS */))
}


AtDivider.render = _sfc_render$G;

const AtList = defineComponent({
  name: "AtList",
  props: {
    hasBorder: { type: Boolean, default: true }
  },
  setup(props) {
    return {
      ...toRefs(props)
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$k = renderSlot, _mergeProps$E = mergeProps, _openBlock$F = openBlock, _createElementBlock$F = createElementBlock;

function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$F(), _createElementBlock$F("view", _mergeProps$E(_ctx.$attrs, {
    class: ['at-list', {
      'at-list--no-border': !_ctx.hasBorder
    }]
  }), [
    _renderSlot$k(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtList.render = _sfc_render$F;

const AtListItem = defineComponent({
  name: "AtListItem",
  emits: ["click", "switch-change"],
  props: {
    note: String,
    title: { type: String, default: "" },
    thumb: String,
    extraText: String,
    extraThumb: String,
    switchColor: { type: String, default: "#6190E8" },
    disabled: Boolean,
    isSwitch: Boolean,
    switchChecked: Boolean,
    hasBorder: Boolean,
    iconInfo: Object,
    arrow: {
      type: String,
      validator: (prop) => ["up", "down", "right"].includes(prop)
    }
  },
  setup(props, { emit }) {
    const rootClasses = computed(() => ["at-list__item", {
      "at-list__item--thumb": props.thumb,
      "at-list__item--multiple": props.note,
      "at-list__item--disabled": props.disabled,
      "at-list__item--no-border": !props.hasBorder
    }]);
    const { iconStyle } = useIconStyle(props.iconInfo, "", 24);
    const { iconClasses } = useIconClasses(props.iconInfo, true);
    const arrowClasses = computed(() => {
      if (!props.arrow)
        return {};
      let arrow = "right";
      if (["up", "down"].includes(props.arrow)) {
        arrow = props.arrow;
      }
      return {
        [`at-icon-chevron-${arrow}`]: Boolean(props.arrow)
      };
    });
    function handleClick(e) {
      if (!props.disabled) {
        emit("click", e);
      }
    }
    function handleSwitchClick(e) {
      e.stopPropagation();
    }
    function handleSwitchChange(e) {
      if (!props.disabled) {
        emit("switch-change", e);
      }
    }
    return {
      ...toRefs(props),
      rootClasses,
      iconStyle,
      iconClasses,
      arrowClasses,
      handleClick,
      handleSwitchClick,
      handleSwitchChange
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$r = createElementVNode, _openBlock$E = openBlock, _createElementBlock$E = createElementBlock, _createCommentVNode$l = createCommentVNode, _normalizeClass$h = normalizeClass, _normalizeStyle$j = normalizeStyle, _toDisplayString$o = toDisplayString, _mergeProps$D = mergeProps;

const _hoisted_1$u = { class: "at-list__item-container" };
const _hoisted_2$o = {
  key: 0,
  class: "item-thumb at-list__item-thumb"
};
const _hoisted_3$m = ["src"];
const _hoisted_4$i = {
  key: 1,
  class: "item-icon at-list__item-icon"
};
const _hoisted_5$f = { class: "item-content at-list__item-content" };
const _hoisted_6$8 = { class: "item-content__info" };
const _hoisted_7$6 = { class: "item-content__info-title" };
const _hoisted_8$4 = {
  key: 0,
  class: "item-content__info-note"
};
const _hoisted_9 = { class: "item-extra at-list__item-extra" };
const _hoisted_10 = {
  key: 0,
  class: "item-extra__info"
};
const _hoisted_11 = {
  key: 1,
  class: "item-extra__image"
};
const _hoisted_12 = ["src"];
const _hoisted_13 = ["color", "disabled", "checked"];
const _hoisted_14 = {
  key: 3,
  class: "item-extra__icon"
};

function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$E(), _createElementBlock$E("view", _mergeProps$D(_ctx.$attrs, {
    class: _ctx.rootClasses,
    onTap: _cache[2] || (_cache[2] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    _createElementVNode$r("view", _hoisted_1$u, [
      (_ctx.thumb)
        ? (_openBlock$E(), _createElementBlock$E("view", _hoisted_2$o, [
            _createElementVNode$r("image", {
              class: "item-thumb__info",
              mode: "scaleToFill",
              src: _ctx.thumb
            }, null, 8 /* PROPS */, _hoisted_3$m)
          ]))
        : _createCommentVNode$l("v-if", true),
      (_ctx.iconInfo && _ctx.iconInfo.value)
        ? (_openBlock$E(), _createElementBlock$E("view", _hoisted_4$i, [
            _createElementVNode$r("view", {
              class: _normalizeClass$h(_ctx.iconClasses),
              style: _normalizeStyle$j(_ctx.iconStyle)
            }, null, 6 /* CLASS, STYLE */)
          ]))
        : _createCommentVNode$l("v-if", true),
      _createElementVNode$r("view", _hoisted_5$f, [
        _createElementVNode$r("view", _hoisted_6$8, [
          _createElementVNode$r("view", _hoisted_7$6, _toDisplayString$o(_ctx.title), 1 /* TEXT */),
          (_ctx.note)
            ? (_openBlock$E(), _createElementBlock$E("view", _hoisted_8$4, _toDisplayString$o(_ctx.note), 1 /* TEXT */))
            : _createCommentVNode$l("v-if", true)
        ])
      ]),
      _createElementVNode$r("view", _hoisted_9, [
        (_ctx.extraText)
          ? (_openBlock$E(), _createElementBlock$E("view", _hoisted_10, _toDisplayString$o(_ctx.extraText), 1 /* TEXT */))
          : _createCommentVNode$l("v-if", true),
        (_ctx.extraThumb && !_ctx.extraText)
          ? (_openBlock$E(), _createElementBlock$E("view", _hoisted_11, [
              _createElementVNode$r("image", {
                class: "item-extra__image-info",
                mode: "aspectFit",
                src: _ctx.extraThumb
              }, null, 8 /* PROPS */, _hoisted_12)
            ]))
          : _createCommentVNode$l("v-if", true),
        (_ctx.isSwitch && !_ctx.extraThumb && !_ctx.extraText)
          ? (_openBlock$E(), _createElementBlock$E("view", {
              key: 2,
              class: "item-extra__switch",
              onTap: _cache[1] || (_cache[1] = e => _ctx.handleSwitchClick(e))
            }, [
              _createElementVNode$r("switch", {
                color: _ctx.switchColor,
                disabled: _ctx.disabled,
                checked: _ctx.switchChecked,
                onChange: _cache[0] || (_cache[0] = (...args) => (_ctx.handleSwitchChange && _ctx.handleSwitchChange(...args)))
              }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_13)
            ], 32 /* HYDRATE_EVENTS */))
          : _createCommentVNode$l("v-if", true),
        (_ctx.arrow)
          ? (_openBlock$E(), _createElementBlock$E("view", _hoisted_14, [
              _createElementVNode$r("view", {
                class: _normalizeClass$h(['at-icon', 'item-extra__icon-arrow', _ctx.arrowClasses])
              }, null, 2 /* CLASS */)
            ]))
          : _createCommentVNode$l("v-if", true)
      ])
    ])
  ], 16 /* FULL_PROPS */))
}


AtListItem.render = _sfc_render$E;

const AtDrawer = defineComponent({
  name: "AtDrawer",
  components: {
    AtList,
    AtListItem
  },
  emits: {
    "close": null,
    "item-click"(index) {
      return !!(typeof index === "number");
    }
  },
  props: {
    show: Boolean,
    right: Boolean,
    mask: {
      type: Boolean,
      default: true
    },
    width: {
      type: String,
      default: "230px"
    },
    items: Array
  },
  setup(props, { emit }) {
    const state = reactive({
      animShow: false,
      _show: props.show
    });
    const rootClasses = computed(() => ({
      "at-drawer--show": state.animShow,
      "at-drawer--right": props.right,
      "at-drawer--left": !props.right
    }));
    const maskStyle = computed(() => ({
      display: props.mask ? "block" : "none",
      opacity: state.animShow ? 1 : 0
    }));
    const listStyle = computed(() => ({
      width: props.width,
      transition: state.animShow ? "all 225ms cubic-bezier(0, 0, 0.2, 1)" : "all 195ms cubic-bezier(0.4, 0, 0.6, 1)"
    }));
    watch(() => props.show, (val) => {
      if (val !== state._show) {
        val ? showAnimation() : hideAnimation();
      }
    });
    onMounted(() => {
      if (state._show) {
        showAnimation();
      }
    });
    function handleItemClick(index) {
      emit("item-click", index);
      hideAnimation();
    }
    function onHide() {
      state._show = false;
      nextTick(() => {
        emit("close");
      });
    }
    function hideAnimation() {
      state.animShow = false;
      setTimeout(() => {
        onHide();
      }, 300);
    }
    function showAnimation() {
      state._show = true;
      setTimeout(() => {
        state.animShow = true;
      }, 200);
    }
    function handleMaskClick() {
      hideAnimation();
    }
    return {
      show: toRef(state, "_show"),
      items: toRef(props, "items"),
      rootClasses,
      maskStyle,
      listStyle,
      handleMaskClick,
      handleItemClick
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeStyle$i = normalizeStyle, _createElementVNode$q = createElementVNode, _renderList$d = renderList, _Fragment$d = Fragment, _openBlock$D = openBlock, _createElementBlock$D = createElementBlock, _resolveComponent$7 = resolveComponent, _createBlock$7 = createBlock, _withCtx$6 = withCtx, _createCommentVNode$k = createCommentVNode, _renderSlot$j = renderSlot, _mergeProps$C = mergeProps;

function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_list_item = _resolveComponent$7("at-list-item");
  const _component_at_list = _resolveComponent$7("at-list");

  return (_ctx.show)
    ? (_openBlock$D(), _createElementBlock$D("view", _mergeProps$C({ key: 0 }, _ctx.$attrs, {
        class: ['at-drawer', _ctx.rootClasses]
      }), [
        _createElementVNode$q("view", {
          class: "at-drawer__mask",
          style: _normalizeStyle$i(_ctx.maskStyle),
          onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleMaskClick && _ctx.handleMaskClick(...args)))
        }, null, 36 /* STYLE, HYDRATE_EVENTS */),
        _createElementVNode$q("view", {
          class: "at-drawer__content",
          style: _normalizeStyle$i(_ctx.listStyle)
        }, [
          (!!_ctx.items && _ctx.items.length)
            ? (_openBlock$D(), _createBlock$7(_component_at_list, { key: 0 }, {
                default: _withCtx$6(() => [
                  (_openBlock$D(true), _createElementBlock$D(_Fragment$d, null, _renderList$d(_ctx.items, (name, index) => {
                    return (_openBlock$D(), _createBlock$7(_component_at_list_item, {
                      key: `${name}-${index}`,
                      dataIndex: index,
                      title: name,
                      arrow: "right",
                      onClick: $event => (_ctx.handleItemClick(index))
                    }, null, 8 /* PROPS */, ["dataIndex", "title", "onClick"]))
                  }), 128 /* KEYED_FRAGMENT */))
                ]),
                _: 1 /* STABLE */
              }))
            : _renderSlot$j(_ctx.$slots, "default", { key: 1 })
        ], 4 /* STYLE */)
      ], 16 /* FULL_PROPS */))
    : _createCommentVNode$k("v-if", true)
}


AtDrawer.render = _sfc_render$D;

const AtFab = defineComponent({
  name: "AtFab",
  emits: ["click"],
  props: {
    size: {
      type: String,
      default: "normal",
      validator: (prop) => ["normal", "small"].includes(prop)
    }
  },
  setup(props, { emit }) {
    function handleClick(e) {
      emit("click", e);
    }
    return {
      ...toRefs(props),
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$i = renderSlot, _mergeProps$B = mergeProps, _openBlock$C = openBlock, _createElementBlock$C = createElementBlock;

function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$C(), _createElementBlock$C("view", _mergeProps$B(_ctx.$attrs, {
    class: ['at-fab', { [`at-fab--${_ctx.size}`]: _ctx.size } ],
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    _renderSlot$i(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtFab.render = _sfc_render$C;

const AtFlex = defineComponent({
  name: "AtFlex",
  props: {
    wrap: {
      type: String
    },
    align: {
      type: String
    },
    justify: {
      type: String
    },
    direction: {
      type: String
    },
    alignContent: {
      type: String
    }
  },
  setup(props) {
    const rootClasses = computed(() => ({
      "at-row": true,
      [`at-row--${props.wrap}`]: Boolean(props.wrap),
      [`at-row__align--${props.align}`]: Boolean(props.align),
      [`at-row__justify--${props.justify}`]: Boolean(props.justify),
      [`at-row__direction--${props.direction}`]: Boolean(props.direction),
      [`at-row__align-content--${props.alignContent}`]: Boolean(props.alignContent)
    }));
    return {
      rootClasses
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$h = renderSlot, _mergeProps$A = mergeProps, _openBlock$B = openBlock, _createElementBlock$B = createElementBlock;

function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$B(), _createElementBlock$B("view", _mergeProps$A(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _renderSlot$h(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtFlex.render = _sfc_render$B;

const AtFlexItem = defineComponent({
  name: "AtFlexItem",
  props: {
    isAuto: Boolean,
    isWrap: Boolean,
    align: {
      type: String
    },
    size: {
      type: Number,
      default: 0
    },
    offset: {
      type: Number,
      default: 0
    }
  },
  setup(props) {
    const rootClasses = computed(() => ({
      [`at-col-${props.size}`]: Boolean(props.size),
      [`at-col__align--${props.align}`]: Boolean(props.align),
      [`at-col__offset-${props.offset}`]: Boolean(props.offset),
      "at-col--auto": Boolean(props.isAuto),
      "at-col--wrap": Boolean(props.isWrap),
      "at-col": true
    }));
    return {
      rootClasses
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$g = renderSlot, _mergeProps$z = mergeProps, _openBlock$A = openBlock, _createElementBlock$A = createElementBlock;

function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$A(), _createElementBlock$A("view", _mergeProps$z(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _renderSlot$g(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtFlexItem.render = _sfc_render$A;

const AtFloatLayout = defineComponent({
  name: "AtFloatLayout",
  emits: {
    "close": null,
    "scroll"(e) {
      return !!(e && typeof e === "object");
    },
    "scroll-to-upper"(e) {
      return !!(e && typeof e === "object");
    },
    "scroll-to-lower"(e) {
      return !!(e && typeof e === "object");
    }
  },
  props: {
    title: String,
    scrollWithAnimation: Boolean,
    isOpened: Boolean,
    scrollX: Boolean,
    scrollY: {
      type: Boolean,
      default: true
    },
    scrollTop: Number,
    scrollLeft: Number,
    upperThreshold: Number,
    lowerThreshold: Number
  },
  setup(props, { emit }) {
    const _isOpened = ref(props.isOpened);
    const rootClasses = computed(() => ["at-float-layout", {
      "at-float-layout--active": _isOpened.value
    }]);
    const disableScroll = {};
    const trapScroll = {};
    watch(() => props.isOpened, (val, oldVal) => {
      if (val === oldVal) {
        handleTouchScroll(val);
      }
      if (val !== _isOpened.value) {
        _isOpened.value = val;
      }
    });
    function handleClose() {
      _isOpened.value = false;
      nextTick(() => {
        emit("close");
      });
    }
    function handleTouchMove(e) {
      e.stopPropagation();
    }
    return {
      ...toRefs(props),
      rootClasses,
      trapScroll,
      disableScroll,
      handleClose,
      handleTouchMove
    };
  }
});

// Binding optimization for webpack code-split
const _mergeProps$y = mergeProps, _createElementVNode$p = createElementVNode, _toDisplayString$n = toDisplayString, _openBlock$z = openBlock, _createElementBlock$z = createElementBlock, _createCommentVNode$j = createCommentVNode, _renderSlot$f = renderSlot;

const _hoisted_1$t = { class: "at-float-layout__container layout" };
const _hoisted_2$n = {
  key: 0,
  class: "layout-header"
};
const _hoisted_3$l = { class: "layout-header__title" };
const _hoisted_4$h = { class: "layout-body" };
const _hoisted_5$e = ["scrollX", "scrollY", "scrollTop", "scrollLeft", "upperThreshold", "lowerThreshold", "scrollWithAnimation"];

function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$z(), _createElementBlock$z("view", _mergeProps$y(_ctx.$attrs, {
    class: _ctx.rootClasses,
    catchMove: true,
    onTouchmove: _cache[5] || (_cache[5] = (...args) => (_ctx.handleTouchMove && _ctx.handleTouchMove(...args)))
  }), [
    _createElementVNode$p("view", _mergeProps$y({ class: "at-float-layout__overlay" }, _ctx.disableScroll, {
      onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClose && _ctx.handleClose(...args)))
    }), null, 16 /* FULL_PROPS */),
    _createElementVNode$p("view", _hoisted_1$t, [
      (_ctx.title)
        ? (_openBlock$z(), _createElementBlock$z("view", _hoisted_2$n, [
            _createElementVNode$p("text", _hoisted_3$l, _toDisplayString$n(_ctx.title), 1 /* TEXT */),
            _createElementVNode$p("view", {
              class: "layout-header__btn-close",
              onTap: _cache[1] || (_cache[1] = (...args) => (_ctx.handleClose && _ctx.handleClose(...args)))
            }, null, 32 /* HYDRATE_EVENTS */)
          ]))
        : _createCommentVNode$j("v-if", true),
      _createElementVNode$p("view", _hoisted_4$h, [
        _createElementVNode$p("scroll-view", _mergeProps$y({ class: "layout-body__content" }, _ctx.trapScroll, {
          scrollX: _ctx.scrollX,
          scrollY: _ctx.scrollY,
          scrollTop: _ctx.scrollTop,
          scrollLeft: _ctx.scrollLeft,
          upperThreshold: _ctx.upperThreshold,
          lowerThreshold: _ctx.lowerThreshold,
          scrollWithAnimation: _ctx.scrollWithAnimation,
          onScroll: _cache[2] || (_cache[2] = (e) => _ctx.$emit('scroll', e)),
          onScrolltolower: _cache[3] || (_cache[3] = (e) => _ctx.$emit('scroll-to-lower', e)),
          onScrolltoupper: _cache[4] || (_cache[4] = (e) => _ctx.$emit('scroll-to-upper', e))
        }), [
          _renderSlot$f(_ctx.$slots, "default")
        ], 16 /* FULL_PROPS */, _hoisted_5$e)
      ])
    ])
  ], 16 /* FULL_PROPS */))
}


AtFloatLayout.render = _sfc_render$z;

const AtForm = defineComponent({
  name: "AtForm",
  emits: {
    "submit"(e) {
      return !!(e && typeof e === "object");
    },
    "reset"(e) {
      return !!(e && typeof e === "object");
    }
  },
  props: {
    reportSubmit: Boolean
  }
});

// Binding optimization for webpack code-split
const _renderSlot$e = renderSlot, _mergeProps$x = mergeProps, _openBlock$y = openBlock, _createElementBlock$y = createElementBlock;

const _hoisted_1$s = ["reportSubmit"];

function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$y(), _createElementBlock$y("form", _mergeProps$x(_ctx.$attrs, {
    class: "at-form",
    reportSubmit: this.reportSubmit,
    onSubmit: _cache[0] || (_cache[0] = (e) => _ctx.$emit('submit', e)),
    onReset: _cache[1] || (_cache[1] = (e) => _ctx.$emit('reset', e))
  }), [
    _renderSlot$e(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */, _hoisted_1$s))
}


AtForm.render = _sfc_render$y;

/**
 * The base implementation of `_.slice` without an iteratee call guard.
 *
 * @private
 * @param {Array} array The array to slice.
 * @param {number} [start=0] The start position.
 * @param {number} [end=array.length] The end position.
 * @returns {Array} Returns the slice of `array`.
 */

function baseSlice$1(array, start, end) {
  var index = -1,
      length = array.length;

  if (start < 0) {
    start = -start > length ? 0 : (length + start);
  }
  end = end > length ? length : end;
  if (end < 0) {
    end += length;
  }
  length = start > end ? 0 : ((end - start) >>> 0);
  start >>>= 0;

  var result = Array(length);
  while (++index < length) {
    result[index] = array[index + start];
  }
  return result;
}

var _baseSlice = baseSlice$1;

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */

function eq$1(value, other) {
  return value === other || (value !== value && other !== other);
}

var eq_1 = eq$1;

/** Detect free variable `global` from Node.js. */

var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;

var _freeGlobal = freeGlobal$1;

var freeGlobal = _freeGlobal;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root$1 = freeGlobal || freeSelf || Function('return this')();

var _root = root$1;

var root = _root;

/** Built-in value references. */
var Symbol$3 = root.Symbol;

var _Symbol = Symbol$3;

var Symbol$2 = _Symbol;

/** Used for built-in method references. */
var objectProto$1 = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto$1.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString$1 = objectProto$1.toString;

/** Built-in value references. */
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag$1(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag$1),
      tag = value[symToStringTag$1];

  try {
    value[symToStringTag$1] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString$1.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag$1] = tag;
    } else {
      delete value[symToStringTag$1];
    }
  }
  return result;
}

var _getRawTag = getRawTag$1;

/** Used for built-in method references. */

var objectProto = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString$1(value) {
  return nativeObjectToString.call(value);
}

var _objectToString = objectToString$1;

var Symbol$1 = _Symbol,
    getRawTag = _getRawTag,
    objectToString = _objectToString;

/** `Object#toString` result references. */
var nullTag = '[object Null]',
    undefinedTag = '[object Undefined]';

/** Built-in value references. */
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag$2(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

var _baseGetTag = baseGetTag$2;

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */

function isObject$3(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

var isObject_1 = isObject$3;

var baseGetTag$1 = _baseGetTag,
    isObject$2 = isObject_1;

/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
    funcTag = '[object Function]',
    genTag = '[object GeneratorFunction]',
    proxyTag = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction$1(value) {
  if (!isObject$2(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag$1(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

var isFunction_1 = isFunction$1;

/** Used as references for various `Number` constants. */

var MAX_SAFE_INTEGER$1 = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength$1(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
}

var isLength_1 = isLength$1;

var isFunction = isFunction_1,
    isLength = isLength_1;

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike$1(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

var isArrayLike_1 = isArrayLike$1;

/** Used as references for various `Number` constants. */

var MAX_SAFE_INTEGER = 9007199254740991;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex$1(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

var _isIndex = isIndex$1;

var eq = eq_1,
    isArrayLike = isArrayLike_1,
    isIndex = _isIndex,
    isObject$1 = isObject_1;

/**
 * Checks if the given arguments are from an iteratee call.
 *
 * @private
 * @param {*} value The potential iteratee value argument.
 * @param {*} index The potential iteratee index or key argument.
 * @param {*} object The potential iteratee object argument.
 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
 *  else `false`.
 */
function isIterateeCall$1(value, index, object) {
  if (!isObject$1(object)) {
    return false;
  }
  var type = typeof index;
  if (type == 'number'
        ? (isArrayLike(object) && isIndex(index, object.length))
        : (type == 'string' && index in object)
      ) {
    return eq(object[index], value);
  }
  return false;
}

var _isIterateeCall = isIterateeCall$1;

/** Used to match a single whitespace character. */

var reWhitespace$1 = /\s/;

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
 * character of `string`.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {number} Returns the index of the last non-whitespace character.
 */
function trimmedEndIndex$2(string) {
  var index = string.length;

  while (index-- && reWhitespace$1.test(string.charAt(index))) {}
  return index;
}

var _trimmedEndIndex = trimmedEndIndex$2;

var trimmedEndIndex$1 = _trimmedEndIndex;

/** Used to match leading whitespace. */
var reTrimStart$1 = /^\s+/;

/**
 * The base implementation of `_.trim`.
 *
 * @private
 * @param {string} string The string to trim.
 * @returns {string} Returns the trimmed string.
 */
function baseTrim$2(string) {
  return string
    ? string.slice(0, trimmedEndIndex$1(string) + 1).replace(reTrimStart$1, '')
    : string;
}

var _baseTrim = baseTrim$2;

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */

function isObjectLike$1(value) {
  return value != null && typeof value == 'object';
}

var isObjectLike_1 = isObjectLike$1;

var baseGetTag = _baseGetTag,
    isObjectLike = isObjectLike_1;

/** `Object#toString` result references. */
var symbolTag$1 = '[object Symbol]';

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol$2(value) {
  return typeof value == 'symbol' ||
    (isObjectLike(value) && baseGetTag(value) == symbolTag$1);
}

var isSymbol_1 = isSymbol$2;

var baseTrim$1 = _baseTrim,
    isObject = isObject_1,
    isSymbol$1 = isSymbol_1;

/** Used as references for various `Number` constants. */
var NAN$1 = 0 / 0;

/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;

/** Used to detect binary string values. */
var reIsBinary$1 = /^0b[01]+$/i;

/** Used to detect octal string values. */
var reIsOctal$1 = /^0o[0-7]+$/i;

/** Built-in method references without a dependency on `root`. */
var freeParseInt$1 = parseInt;

/**
 * Converts `value` to a number.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to process.
 * @returns {number} Returns the number.
 * @example
 *
 * _.toNumber(3.2);
 * // => 3.2
 *
 * _.toNumber(Number.MIN_VALUE);
 * // => 5e-324
 *
 * _.toNumber(Infinity);
 * // => Infinity
 *
 * _.toNumber('3.2');
 * // => 3.2
 */
function toNumber$2(value) {
  if (typeof value == 'number') {
    return value;
  }
  if (isSymbol$1(value)) {
    return NAN$1;
  }
  if (isObject(value)) {
    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
    value = isObject(other) ? (other + '') : other;
  }
  if (typeof value != 'string') {
    return value === 0 ? value : +value;
  }
  value = baseTrim$1(value);
  var isBinary = reIsBinary$1.test(value);
  return (isBinary || reIsOctal$1.test(value))
    ? freeParseInt$1(value.slice(2), isBinary ? 2 : 8)
    : (reIsBadHex$1.test(value) ? NAN$1 : +value);
}

var toNumber_1 = toNumber$2;

var toNumber$1 = toNumber_1;

/** Used as references for various `Number` constants. */
var INFINITY$2 = 1 / 0,
    MAX_INTEGER$1 = 1.7976931348623157e+308;

/**
 * Converts `value` to a finite number.
 *
 * @static
 * @memberOf _
 * @since 4.12.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {number} Returns the converted number.
 * @example
 *
 * _.toFinite(3.2);
 * // => 3.2
 *
 * _.toFinite(Number.MIN_VALUE);
 * // => 5e-324
 *
 * _.toFinite(Infinity);
 * // => 1.7976931348623157e+308
 *
 * _.toFinite('3.2');
 * // => 3.2
 */
function toFinite$2(value) {
  if (!value) {
    return value === 0 ? value : 0;
  }
  value = toNumber$1(value);
  if (value === INFINITY$2 || value === -INFINITY$2) {
    var sign = (value < 0 ? -1 : 1);
    return sign * MAX_INTEGER$1;
  }
  return value === value ? value : 0;
}

var toFinite_1 = toFinite$2;

var toFinite$1 = toFinite_1;

/**
 * Converts `value` to an integer.
 *
 * **Note:** This method is loosely based on
 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {number} Returns the converted integer.
 * @example
 *
 * _.toInteger(3.2);
 * // => 3
 *
 * _.toInteger(Number.MIN_VALUE);
 * // => 0
 *
 * _.toInteger(Infinity);
 * // => 1.7976931348623157e+308
 *
 * _.toInteger('3.2');
 * // => 3
 */
function toInteger$1(value) {
  var result = toFinite$1(value),
      remainder = result % 1;

  return result === result ? (remainder ? result - remainder : result) : 0;
}

var toInteger_1 = toInteger$1;

var baseSlice = _baseSlice,
    isIterateeCall = _isIterateeCall,
    toInteger = toInteger_1;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
    nativeMax$1 = Math.max;

/**
 * Creates an array of elements split into groups the length of `size`.
 * If `array` can't be split evenly, the final chunk will be the remaining
 * elements.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Array
 * @param {Array} array The array to process.
 * @param {number} [size=1] The length of each chunk
 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
 * @returns {Array} Returns the new array of chunks.
 * @example
 *
 * _.chunk(['a', 'b', 'c', 'd'], 2);
 * // => [['a', 'b'], ['c', 'd']]
 *
 * _.chunk(['a', 'b', 'c', 'd'], 3);
 * // => [['a', 'b', 'c'], ['d']]
 */
function chunk(array, size, guard) {
  if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
    size = 1;
  } else {
    size = nativeMax$1(toInteger(size), 0);
  }
  var length = array == null ? 0 : array.length;
  if (!length || size < 1) {
    return [];
  }
  var index = 0,
      resIndex = 0,
      result = Array(nativeCeil(length / size));

  while (index < length) {
    result[resIndex++] = baseSlice(array, index, (index += size));
  }
  return result;
}

var chunk_1 = chunk;

const AtGrid = defineComponent({
  name: "AtGrid",
  emits: {
    "click"(item, clickedIndex) {
      return !!(item && typeof item === "object" && typeof clickedIndex === "number");
    }
  },
  props: {
    data: {
      type: Array,
      required: true
    },
    columnNum: {
      type: Number,
      default: 3
    },
    hasBorder: {
      type: Boolean,
      default: true
    },
    mode: {
      type: String,
      default: "square",
      validator: (m) => ["square", "rect"].includes(m)
    }
  },
  setup(props, { emit }) {
    const gridGroup = computed(() => chunk_1(props.data, props.columnNum));
    const bodyClasses = computed(() => {
      let mode = props.mode;
      if (mode && !["square", "rect"].includes(mode)) {
        mode = "square";
      }
      return [
        "at-grid-item",
        "at-grid__flex-item",
        {
          [`at-grid-item--${mode}`]: Boolean(mode),
          "at-grid-item--no-border": !props.hasBorder
        }
      ];
    });
    const genGridItemClasses = computed(() => (index) => [
      ...bodyClasses.value,
      {
        "at-grid-item--last": index === props.columnNum - 1
      }
    ]);
    const flexStyle = computed(() => ({
      flex: `0 0 ${100 / props.columnNum}%`
    }));
    const genIconClasses = (item) => {
      const { iconClasses } = useIconClasses(item.iconInfo, true);
      return iconClasses.value;
    };
    const genIconStyle = (item) => {
      const { iconStyle } = useIconStyle(item.iconInfo, "", 24);
      return iconStyle.value;
    };
    function handleClick(item, index, row) {
      const clickedIndex = row * props.columnNum + index;
      emit("click", item, clickedIndex);
    }
    return {
      ...toRefs(props),
      gridGroup,
      flexStyle,
      genIconStyle,
      genIconClasses,
      genGridItemClasses,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$c = renderList, _Fragment$c = Fragment, _openBlock$x = openBlock, _createElementBlock$x = createElementBlock, _createCommentVNode$i = createCommentVNode, _normalizeClass$g = normalizeClass, _normalizeStyle$h = normalizeStyle, _createElementVNode$o = createElementVNode, _toDisplayString$m = toDisplayString, _mergeProps$w = mergeProps;

const _hoisted_1$r = ["onTap"];
const _hoisted_2$m = { class: "at-grid-item__content" };
const _hoisted_3$k = { class: "at-grid-item__content-inner" };
const _hoisted_4$g = { class: "content-inner__icon" };
const _hoisted_5$d = ["src"];
const _hoisted_6$7 = { class: "content-inner__text" };

function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
  return (Array.isArray(_ctx.data) && _ctx.data.length > 0)
    ? (_openBlock$x(), _createElementBlock$x("view", _mergeProps$w({ key: 0 }, _ctx.$attrs, { class: "at-grid" }), [
        (_openBlock$x(true), _createElementBlock$x(_Fragment$c, null, _renderList$c(_ctx.gridGroup, (items, row) => {
          return (_openBlock$x(), _createElementBlock$x("view", {
            key: `at-grid-group-${row}`,
            class: "at-grid__flex"
          }, [
            (_openBlock$x(true), _createElementBlock$x(_Fragment$c, null, _renderList$c(items, (item, index) => {
              return (_openBlock$x(), _createElementBlock$x("view", {
                key: `at-grid-item-${index}`,
                class: _normalizeClass$g(_ctx.genGridItemClasses(index)),
                style: _normalizeStyle$h(_ctx.flexStyle),
                onTap: $event => (_ctx.handleClick(item, index, row))
              }, [
                _createElementVNode$o("view", _hoisted_2$m, [
                  _createElementVNode$o("view", _hoisted_3$k, [
                    _createElementVNode$o("view", _hoisted_4$g, [
                      (item.image)
                        ? (_openBlock$x(), _createElementBlock$x("image", {
                            key: 0,
                            class: "content-inner__img",
                            mode: "scaleToFill",
                            src: item.image
                          }, null, 8 /* PROPS */, _hoisted_5$d))
                        : (item.iconInfo && item.iconInfo.value)
                          ? (_openBlock$x(), _createElementBlock$x("text", {
                              key: 1,
                              class: _normalizeClass$g(_ctx.genIconClasses(item)),
                              style: _normalizeStyle$h(_ctx.genIconStyle(item))
                            }, null, 6 /* CLASS, STYLE */))
                          : _createCommentVNode$i("v-if", true)
                    ]),
                    _createElementVNode$o("text", _hoisted_6$7, _toDisplayString$m(item.value), 1 /* TEXT */)
                  ])
                ])
              ], 46 /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_1$r))
            }), 128 /* KEYED_FRAGMENT */))
          ]))
        }), 128 /* KEYED_FRAGMENT */))
      ], 16 /* FULL_PROPS */))
    : _createCommentVNode$i("v-if", true)
}


AtGrid.render = _sfc_render$x;

const AtIcon = defineComponent({
  name: "AtIcon",
  emits: {
    "click"(e) {
      return !!(e && typeof e === "object");
    }
  },
  props: {
    prefixClass: {
      type: String,
      default: "at-icon"
    },
    value: {
      type: String,
      required: true
    },
    color: {
      type: String,
      default: ""
    },
    size: {
      type: [String, Number],
      default: 24
    }
  },
  setup(props, { emit }) {
    const rootStyle = computed(() => ({
      color: props.color,
      fontSize: `${pxTransform(parseInt(String(props.size)) * 2)}`
    }));
    const rootClasses = computed(() => ({
      [`${props.prefixClass}`]: true,
      [`${props.prefixClass}-${props.value}`]: Boolean(props.value)
    }));
    function handleClick(e) {
      emit("click", e);
    }
    return {
      rootClasses,
      rootStyle,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _mergeProps$v = mergeProps, _openBlock$w = openBlock, _createElementBlock$w = createElementBlock;

function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$w(), _createElementBlock$w("text", _mergeProps$v(_ctx.$attrs, {
    class: _ctx.rootClasses,
    style: _ctx.rootStyle,
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), null, 16 /* FULL_PROPS */))
}


AtIcon.render = _sfc_render$w;

const generateMatrix = (files, col, showAddBtn) => {
  const matrix = [];
  const length = showAddBtn ? files.length + 1 : files.length;
  const row = Math.ceil(length / col);
  for (let i = 0; i < row; i++) {
    if (i === row - 1) {
      const lastArr = files.slice(i * col);
      if (lastArr.length < col) {
        if (showAddBtn) {
          lastArr.push({ type: "btn", uuid: uuid() });
        }
        for (let j = lastArr.length; j < col; j++) {
          lastArr.push({ type: "blank", uuid: uuid() });
        }
      }
      matrix.push(lastArr);
    } else {
      matrix.push(files.slice(i * col, (i + 1) * col));
    }
  }
  return matrix;
};
const ENV$1 = Taro.getEnv();
const modeOptions = [
  "scaleToFill",
  "aspectFit",
  "aspectFill",
  "widthFix",
  "top",
  "bottom",
  "center",
  "left",
  "right",
  "top left",
  "top right",
  "bottom left",
  "bottom right"
];
const AtImagePicker = defineComponent({
  name: "AtImagePicker",
  components: { AtLoading },
  emits: {
    "change"(args) {
      return !!(args.files && Array.isArray(args.files) && args.operationType && ["add", "remove"].includes(args.operationType) && ["undefined", "number"].includes(typeof args.index));
    },
    "image-click"(index, file) {
      return !!(typeof index === "number" && file && typeof file === "object");
    },
    "fail"(message) {
      return !!(message && typeof message === "string");
    }
  },
  props: {
    files: {
      type: Array,
      default: () => []
    },
    mode: {
      type: String,
      default: "aspectFill",
      validator: (value) => modeOptions.includes(value)
    },
    showAddBtn: {
      type: Boolean,
      default: true
    },
    multiple: Boolean,
    length: {
      type: Number,
      default: 4
    },
    count: Number,
    sizeType: {
      type: Array,
      default: () => ["original", "compressed"]
    },
    sourceType: {
      type: Array,
      default: () => ["album", "camera"]
    }
  },
  setup(props, { emit }) {
    const rowLength = computed(() => props.length <= 0 ? 1 : props.length);
    const genKey = computed(() => (item, row, col) => {
      return item.url ? `preview-${row * props.length + col}` : `add-bar-${row * props.length + col}`;
    });
    const matrix = computed(() => generateMatrix(props.files, rowLength.value, props.showAddBtn));
    function chooseFile() {
      const params = {};
      const filePathName = ENV$1 === Taro.ENV_TYPE.ALIPAY ? "apFilePaths" : "tempFiles";
      if (props.multiple) {
        params.count = 99;
      }
      if (props.count) {
        params.count = props.count;
      }
      if (props.sizeType) {
        params.sizeType = props.sizeType;
      }
      if (props.sourceType) {
        params.sourceType = props.sourceType;
      }
      Taro.chooseImage(params).then((res) => {
        const targetFiles = res.tempFilePaths.map((path, i) => ({
          url: path,
          file: res[filePathName][i]
        }));
        const newFiles = props.files.concat(targetFiles);
        emit("change", { files: newFiles, operationType: "add" });
      }).catch((err) => {
        emit("fail", err.errMsg);
      });
    }
    function handleImageClick(idx) {
      emit("image-click", idx, props.files[idx]);
    }
    function handleRemoveImg(idx) {
      if (ENV$1 === Taro.ENV_TYPE.WEB) {
        window.URL.revokeObjectURL(props.files[idx].url);
      }
      const newFiles = props.files.filter((_, i) => i !== idx);
      emit("change", { files: newFiles, operationType: "remove", index: idx });
    }
    return {
      length: toRef(props, "length"),
      mode: toRef(props, "mode"),
      matrix,
      genKey,
      chooseFile,
      handleRemoveImg,
      handleImageClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$b = renderList, _Fragment$b = Fragment, _openBlock$v = openBlock, _createElementBlock$v = createElementBlock, _createElementVNode$n = createElementVNode, _resolveComponent$6 = resolveComponent, _createBlock$6 = createBlock, _createCommentVNode$h = createCommentVNode, _toDisplayString$l = toDisplayString, _normalizeClass$f = normalizeClass, _mergeProps$u = mergeProps;

const _hoisted_1$q = {
  key: 0,
  class: "at-image-picker__item"
};
const _hoisted_2$l = ["onTap"];
const _hoisted_3$j = ["mode", "src", "onTap"];
const _hoisted_4$f = {
  key: 0,
  class: "at-image-picker__upload-status"
};
const _hoisted_5$c = {
  key: 1,
  class: "at-image-picker__status-icon at-image-picker__status-icon--failed"
};

function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_loading = _resolveComponent$6("at-loading");

  return (_openBlock$v(), _createElementBlock$v("view", _mergeProps$u(_ctx.$attrs, { class: "at-image-picker" }), [
    (_openBlock$v(true), _createElementBlock$v(_Fragment$b, null, _renderList$b(_ctx.matrix, (row, i) => {
      return (_openBlock$v(), _createElementBlock$v("view", {
        key: i+1,
        class: "at-image-picker__flex-box"
      }, [
        (_openBlock$v(true), _createElementBlock$v(_Fragment$b, null, _renderList$b(row, (item, j) => {
          return (_openBlock$v(), _createElementBlock$v("view", {
            key: _ctx.genKey(item, i, j),
            class: "at-image-picker__flex-item"
          }, [
            (item.url)
              ? (_openBlock$v(), _createElementBlock$v("view", _hoisted_1$q, [
                  _createElementVNode$n("view", {
                    class: "at-image-picker__remove-btn",
                    onTap: $event => (_ctx.handleRemoveImg(i * _ctx.length + j))
                  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2$l),
                  _createElementVNode$n("image", {
                    class: "at-image-picker__preview-img",
                    mode: _ctx.mode,
                    src: item.url,
                    onTap: $event => (_ctx.handleImageClick(i * _ctx.length + j))
                  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_3$j),
                  (item.status && item.status !== 'done')
                    ? (_openBlock$v(), _createElementBlock$v("view", _hoisted_4$f, [
                        (item.status === 'uploading')
                          ? (_openBlock$v(), _createBlock$6(_component_at_loading, {
                              key: 0,
                              color: "#fff"
                            }))
                          : (_openBlock$v(), _createElementBlock$v("view", _hoisted_5$c)),
                        (item.message)
                          ? (_openBlock$v(), _createElementBlock$v("view", {
                              key: 2,
                              class: _normalizeClass$f(['at-image-picker__status-message', {
                'at-image-picker__status-message--uploading': item.status === 'uploading',
                'at-image-picker__status-message--failed': item.status !== 'uploading',
              }])
                            }, _toDisplayString$l(item.message), 3 /* TEXT, CLASS */))
                          : _createCommentVNode$h("v-if", true)
                      ]))
                    : _createCommentVNode$h("v-if", true)
                ]))
              : (item.type === 'btn')
                ? (_openBlock$v(), _createElementBlock$v("view", {
                    key: 1,
                    class: "at-image-picker__item at-image-picker__choose-btn",
                    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.chooseFile && _ctx.chooseFile(...args)))
                  }, [
                    (_openBlock$v(), _createElementBlock$v(_Fragment$b, null, _renderList$b([0, 1], (i) => {
                      return _createElementVNode$n("view", {
                        key: i,
                        class: "add-bar"
                      })
                    }), 64 /* STABLE_FRAGMENT */))
                  ], 32 /* HYDRATE_EVENTS */))
                : _createCommentVNode$h("v-if", true)
          ]))
        }), 128 /* KEYED_FRAGMENT */))
      ]))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtImagePicker.render = _sfc_render$v;

const error = "data:image/png;base64,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";
const success = "data:image/png;base64,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";
const loading = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAAn1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8Kd3m4AAAANHRSTlMA6AN+QRH69xUI7Z7x2sWzcWYvphvj4MxiXVIiGAuH08K9ibepmI+Oc2tKHQ+helY5NykfkF5N9AAABmhJREFUeNrdnWlT4kAQhjt3CARIwg1yH3Lpqv3/f9tabsYJMUGCsM6b56NVVjGV6WP6pLvTijTb8bS2X29U581BaBEmLY9T1LrVpukSGhFn06n2W4SExvn4q2ecL6PxeSbrPwRBxN/iG0NSHyHs55kGB1KdVqTxBTjLnU6qo1csdx+ag8CIujXOxe+pf5QEIzPYNDo5OnlbITD2/WObM9AeHwiOYbDMEB/PgHRiwo3GaWpbKFkR6LvI4RTdF4Lk0JtyihXk/Xrnbe2kRKVHoLjjlImphwSKZXicxH4iVB4eNU6ywPHy01SME1nRTIJluOAEtgFpU/4xaHOC2YhgeRjbJble9Dplid0nXHSDEzQJGFNjyZyAGc1YUgVWXqfXqwH3dsy7XnVUf/iD1oQ/mUCfxKonvgn07ao0EnKCLPGkVxO6i6AZl8SeEDVLYuNPToLsd53cLhvZF35HSrwG/D55R5daeAathKkiLaNB0FiTsohJS/sUE9wo0QcmCxaEjcEC3BjkB/rsU0xg48L/GH2KSZ2wkWICm3VIi4kH/V4k0qccsyJsXm2OAc0zfnWEu9g+Fz20OWZL2Aw4pgYu77QoiRtMQ0eoYMC6lWxj8kjYVDThz0PHHt95LIvievBEpRq4LSGjLL6jJepWfPRP8umo7AgbV9iSJYGzFvXC6lc+n+eNYwICR7ywpgROj2MQOgTOcXBK4gNTJEwJgbPjGJBOmlx04QOvCZyNKIkgcEKOAc8yyEa0ZwJnWZKgIwVlUcBDjsHqMc2gXY5yCKJjOaqGiPoiBkHg7EtjSUQ/I3gJAVGjHGVcRJuySLswiV0CxxQ5HwJnxDHoySsSoVPwkg6iLv9jQOBEZdG/Rjkqm4mCshgSkXRvEDhmSeq3KCzLa1c48u2PASxaBPvodUXGPR6J46GexBLVHMKiRIRJRWTgSBOfBhNd1M+SqKwDzVfLg4i8D2h5irxaHrZDL4Vdww6oSPUroo57gkQaRB/7iSVdlDp2iEs6jQ3st6J046vYJR3yYTXHrh+QT90mQztbMvgwwA46ynBQiB10lAE6i2MgW2CTIdMasiFJBrG7yPo3mVYQhmRDgCQTPU3kEFcy9WYip3iTyVCXcR350/R0B7cOIlkwIKX9SHDIEo7ksdoEx2lRTQu2Ejhd5uSjmsR04dkKtYMhXQr4zKBh03RxpsuYkZSv5bITTHfrawHzWtwtqEh2Rkn5H8jOq6wifx8xApHVdmEAdl5lNsIMARstZWtSVufVjGDIbhYLOOaNQMhp3zs4aN0xeQ2VS/F3kMyVbHHNU8pjgiC36Vj3oWZ0nGkD70HN6DjTmK93gGZ0nB2VsAWa0SGHV2DP6Pjmpz7CSIkc8HL+4jmKh1O+HbljgIxBlEOQ8pUzQtL9+7FUUnG1FVbBlwwK07sAjsr8ktFtLxxjv5KiXDhMb8UxU0UDKpeON7Q8xY3JxQMne8wqp6sLjACtqzxEu8hQ1tBWd4h2sTG5T+oO0S44uHihqpgUHSXtyiHaSpX+Fx/ubdoqLmG5Zty6oeASlqsG4Osz5ZawXLmSYKSptoSl8JIIKSZKOcLXr+3oK7WEJblIBXmdzM9+y5xVuV0/XTZ0VGNlXHL90/FKjafCyrhbLOSq1H9/ZdxtVqRZyZVxLSqKQkvrrPoPdpAqtUYweUO50Ipb1RY76sffWXGbXrV51G8SECt+vVRcftrkotdL1XW0fZsl01f6BoUXBJ98ZXv8QLmovrL5RO64PaAc1F+irRs2J1gMKQuIteYn14sdI0etAyyadxecRHtMiQrQ6v8nm5N4hkU3xTI8TmI/0Z0I63xCbezSzXDHNT6hHtL96Hl8grN+o5vwtnb4BK9Hd8VacYpZ70A/5NCbcYqVRffmpcspnGin09Xou8jhFN0X+g/o2xqn0TbhlWK30ThNbavT3ZHqJY22DIYFTV+wFKcoqAzvpPAl7WN/Txex7x/bLMk1T/ensu1wJp3GJjBHlMvIDDaNvP/dVuj/o/d8zqXWjYxgYIZ716roesVy96E5CIyoW+Nc/J5Ov4O+Wzp8I5zlTqdf5BBM+QZMAwXaC4aGzz/CN5SpdPuznvCVTNaKLatwn1c+F8RfPatZwd7qVzt8IZ1qX6nk9xdcs1kVOjZPM1ebpppf4itWOGjOq42639Y8x7YdT2v79UZ13hyEFt2Fv6Loy9OZgJFyAAAAAElFTkSuQmCC";
var statusImg = {
	error: error,
	success: success,
	loading: loading
};

const AtToast = defineComponent({
  name: "AtToast",
  emits: ["click", "close"],
  inheritAttrs: false,
  props: {
    isOpened: Boolean,
    hasMask: Boolean,
    text: String,
    icon: String,
    image: String,
    duration: { type: Number, default: 3e3 },
    status: {
      type: String,
      default: "",
      validator: (val) => ["", "error", "loading", "success"].includes(val)
    }
  },
  setup(props, { emit }) {
    const state = reactive({
      _timer: null,
      _isOpened: props.isOpened
    });
    if (props.isOpened) {
      makeTimer(props.duration || 0);
    }
    const useImg = computed(() => props.image || statusImg[props.status] || null);
    const useIcon = computed(() => Boolean(props.icon && !useImg.value));
    const bodyClasses = computed(() => ({
      "toast-body--text": !props.icon && !useImg.value,
      "at-toast__body--custom-image": props.image,
      [`at-toast__body--${props.status}`]: !!props.status
    }));
    const iconClasses = computed(() => ["at-icon", {
      [`at-icon-${props.icon}`]: props.icon
    }]);
    watch(() => [
      props.isOpened,
      props.duration
    ], ([isOpened, duration]) => {
      if (!isOpened) {
        close();
        return;
      }
      if (!state._isOpened) {
        state._isOpened = true;
      } else {
        clearTimer();
      }
      makeTimer(duration || 0);
    });
    function clearTimer() {
      if (state._timer) {
        clearTimeout(state._timer);
        state._timer = null;
      }
    }
    function makeTimer(duration) {
      state._timer = setTimeout(() => {
        close();
      }, +duration);
    }
    function close() {
      if (state._isOpened) {
        state._isOpened = false;
        nextTick(handleClose);
        clearTimer();
      }
    }
    function handleClose(e) {
      emit("close", e);
    }
    function handleClick(e) {
      if (props.status === "loading")
        return;
      emit("click", e);
      close();
    }
    return {
      isOpened: toRef(state, "_isOpened"),
      hasMask: toRef(props, "hasMask"),
      text: toRef(props, "text"),
      bodyClasses,
      iconClasses,
      useImg,
      useIcon,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _openBlock$u = openBlock, _createElementBlock$u = createElementBlock, _createCommentVNode$g = createCommentVNode, _createElementVNode$m = createElementVNode, _normalizeClass$e = normalizeClass, _toDisplayString$k = toDisplayString, _normalizeStyle$g = normalizeStyle;

const _hoisted_1$p = {
  key: 0,
  class: "at-toast__overlay"
};
const _hoisted_2$k = { class: "toast-body-content" };
const _hoisted_3$i = {
  key: 0,
  class: "toast-body-content__img"
};
const _hoisted_4$e = ["src"];
const _hoisted_5$b = {
  key: 1,
  class: "toast-body-content__icon"
};
const _hoisted_6$6 = {
  key: 2,
  class: "toast-body-content__info"
};

function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
  return (_ctx.isOpened)
    ? (_openBlock$u(), _createElementBlock$u("view", {
        key: 0,
        class: _normalizeClass$e(['at-toast', Boolean(_ctx.$attrs.class) && _ctx.$attrs.class])
      }, [
        (_ctx.hasMask)
          ? (_openBlock$u(), _createElementBlock$u("view", _hoisted_1$p))
          : _createCommentVNode$g("v-if", true),
        _createElementVNode$m("view", {
          class: _normalizeClass$e(['toast-body', _ctx.bodyClasses]),
          style: _normalizeStyle$g(Boolean(_ctx.$attrs.style) && _ctx.$attrs.style),
          onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
        }, [
          _createElementVNode$m("view", _hoisted_2$k, [
            (_ctx.useImg)
              ? (_openBlock$u(), _createElementBlock$u("view", _hoisted_3$i, [
                  _createElementVNode$m("image", {
                    class: "toast-body-content__img-item",
                    mode: "scaleToFill",
                    src: _ctx.useImg
                  }, null, 8 /* PROPS */, _hoisted_4$e)
                ]))
              : (_ctx.useIcon)
                ? (_openBlock$u(), _createElementBlock$u("view", _hoisted_5$b, [
                    _createElementVNode$m("text", {
                      class: _normalizeClass$e(_ctx.iconClasses)
                    }, null, 2 /* CLASS */)
                  ]))
                : _createCommentVNode$g("v-if", true),
            (_ctx.text)
              ? (_openBlock$u(), _createElementBlock$u("view", _hoisted_6$6, [
                  _createElementVNode$m("text", null, _toDisplayString$k(_ctx.text), 1 /* TEXT */)
                ]))
              : _createCommentVNode$g("v-if", true)
          ])
        ], 38 /* CLASS, STYLE, HYDRATE_EVENTS */)
      ], 2 /* CLASS */))
    : _createCommentVNode$g("v-if", true)
}


AtToast.render = _sfc_render$u;

const AtIndexes = defineComponent({
  name: "AtIndexes",
  components: {
    AtList,
    AtListItem,
    AtToast
  },
  emits: {
    "click"(item) {
      return !!(item && typeof item === "object");
    },
    "scroll-into-view"(fn) {
      return !!(fn && typeof fn === "function");
    }
  },
  props: {
    animation: Boolean,
    isVibrate: {
      type: Boolean,
      default: true
    },
    showToast: {
      type: Boolean,
      default: true
    },
    topKey: {
      type: String,
      default: "Top"
    },
    list: {
      type: Array,
      default: () => []
    }
  },
  setup(props, { emit }) {
    const menuHeight = ref(0);
    const startTop = ref(0);
    const itemHeight = ref(0);
    const scrollItemHeights = ref([]);
    const currentIndex = ref(0);
    const timeoutTimer = ref(null);
    const state = reactive({
      scrollIntoView: "",
      scrollTop: 0,
      tipText: "",
      showToast: false,
      isWEB: Taro.getEnv() === Taro.ENV_TYPE.WEB
    });
    const toastStyle = computed(() => ({
      minWidth: pxTransform(100)
    }));
    const genActiveIndexStyle = computed(() => (i) => {
      return currentIndex.value === i ? {
        color: "white",
        backgroundColor: "rgba(97, 144, 232, 1)",
        borderRadius: "40px"
      } : {};
    });
    watch(() => props.list, (list, prevList) => {
      if (list.length !== prevList.length) {
        initData();
      }
    });
    function handleClick(item) {
      emit("click", item);
    }
    function handleTouchmove(e) {
      e.stopPropagation();
      e.preventDefault();
      const pageY = e.touches[0].pageY;
      const index = Math.floor((pageY - startTop.value) / itemHeight.value);
      if (index >= 0 && index <= props.list.length && currentIndex.value !== index) {
        currentIndex.value = index;
        const key = index > 0 ? props.list[index - 1].key : "top";
        const touchView = `at-indexes__list-${key}`;
        jumpTarget(touchView, index);
      }
    }
    function jumpTarget(scrollIntoView, idx) {
      currentIndex.value = idx;
      updateState({
        scrollIntoView,
        scrollTop: scrollItemHeights.value[idx],
        tipText: idx === 0 ? props.topKey : props.list[idx - 1].key
      });
    }
    function __jumpTarget(key) {
      const index = props.list.findIndex((item) => item.key === key);
      const targetView = `at-indexes__list-${key}`;
      jumpTarget(targetView, index + 1);
    }
    function updateState(stateValue) {
      const { scrollIntoView, tipText, scrollTop } = stateValue;
      state.tipText = tipText;
      state.scrollTop = scrollTop;
      state.showToast = props.showToast;
      state.scrollIntoView = scrollIntoView;
      nextTick(() => {
        clearTimeout(timeoutTimer.value);
        timeoutTimer.value = setTimeout(() => {
          state.tipText = "";
          state.showToast = false;
        }, 1e3);
      });
      if (props.isVibrate) {
        Taro.vibrateShort();
      }
    }
    async function initData() {
      if (props.list.length > 0) {
        await _getScrollListItemHeights(props.list).then((res) => {
          scrollItemHeights.value = [...res];
        });
        delayQuerySelector(this, ".at-indexes__menu").then((rect) => {
          const len = props.list.length;
          menuHeight.value = rect[0].height;
          startTop.value = rect[0].top;
          itemHeight.value = Math.floor(menuHeight.value / (len + 1));
        });
      }
    }
    function _getHeight(selector, delay = 500) {
      return new Promise((resolve) => {
        delayQuerySelector(this, selector, delay).then((rect) => {
          if (rect && rect[0]) {
            resolve(rect[0].height);
          }
        });
      });
    }
    function _getScrollListItemHeights(list) {
      return new Promise((resolve) => {
        if (list.length > 0) {
          let rawHeights = [];
          let itemHeights = [];
          rawHeights.push(_getHeight(`#at-indexes__top`));
          list.forEach((item) => {
            rawHeights.push(_getHeight(`#at-indexes__list-${item.key}`));
          });
          Promise.all(rawHeights).then((res) => {
            let height = 0;
            itemHeights.push(height);
            for (let i = 0; i < res.length; i++) {
              height += res[i];
              itemHeights.push(height);
            }
            resolve(itemHeights);
          });
        }
      });
    }
    function handleScroll(e) {
      if (e && e.detail) {
        state.scrollIntoView = "";
        for (let i = 0; i < scrollItemHeights.value.length - 1; i++) {
          let h1 = Math.floor(scrollItemHeights.value[i]);
          let h2 = Math.floor(scrollItemHeights.value[i + 1]);
          if (e.detail.scrollTop >= h1 && e.detail.scrollTop < h2) {
            currentIndex.value = i;
            return;
          }
        }
      }
    }
    onMounted(() => {
      initData();
    });
    onBeforeMount(() => {
      emit("scroll-into-view", __jumpTarget);
    });
    return {
      ...toRefs(props),
      ...toRefs(state),
      toastStyle,
      jumpTarget,
      handleClick,
      handleScroll,
      handleTouchmove,
      genActiveIndexStyle
    };
  }
});

// Binding optimization for webpack code-split
const _toDisplayString$j = toDisplayString, _normalizeStyle$f = normalizeStyle, _createElementVNode$l = createElementVNode, _renderList$a = renderList, _Fragment$a = Fragment, _openBlock$t = openBlock, _createElementBlock$t = createElementBlock, _renderSlot$d = renderSlot, _resolveComponent$5 = resolveComponent, _createBlock$5 = createBlock, _withCtx$5 = withCtx, _createCommentVNode$f = createCommentVNode, _createVNode$2 = createVNode, _mergeProps$t = mergeProps;

const _hoisted_1$o = ["onTap"];
const _hoisted_2$j = ["scrollTop", "scrollIntoView", "scrollWithAnimation"];
const _hoisted_3$h = {
  id: "at-indexes__top",
  class: "at-indexes__content"
};
const _hoisted_4$d = ["id"];
const _hoisted_5$a = { class: "at-indexes__list-title" };

function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_list_item = _resolveComponent$5("at-list-item");
  const _component_at_list = _resolveComponent$5("at-list");
  const _component_at_toast = _resolveComponent$5("at-toast");

  return (_openBlock$t(), _createElementBlock$t("view", _mergeProps$t(_ctx.$attrs, { class: "at-indexes" }), [
    _createElementVNode$l("view", {
      class: "at-indexes__menu",
      onTouchmove: _cache[1] || (_cache[1] = (...args) => (_ctx.handleTouchmove && _ctx.handleTouchmove(...args)))
    }, [
      _createElementVNode$l("view", {
        class: "at-indexes__menu-item",
        style: _normalizeStyle$f(_ctx.genActiveIndexStyle(0)),
        onTap: _cache[0] || (_cache[0] = $event => (_ctx.jumpTarget('at-indexes__top', 0)))
      }, _toDisplayString$j(_ctx.topKey), 37 /* TEXT, STYLE, HYDRATE_EVENTS */),
      (_openBlock$t(true), _createElementBlock$t(_Fragment$a, null, _renderList$a(_ctx.list, (dataList, i) => {
        return (_openBlock$t(), _createElementBlock$t("view", {
          key: `${dataList.key}-${i+1}`,
          class: "at-indexes__menu-item",
          style: _normalizeStyle$f(_ctx.genActiveIndexStyle(i+1)),
          onTap: $event => (_ctx.jumpTarget(`at-indexes__list-${dataList.key}`, i + 1))
        }, _toDisplayString$j(dataList.key), 45 /* TEXT, STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_1$o))
      }), 128 /* KEYED_FRAGMENT */))
    ], 32 /* HYDRATE_EVENTS */),
    _createElementVNode$l("scroll-view", {
      class: "at-indexes__body",
      scrollY: true,
      enableBackToTop: true,
      scrollTop: _ctx.scrollTop,
      scrollIntoView: !_ctx.isWEB ? _ctx.scrollIntoView : '',
      scrollWithAnimation: _ctx.animation,
      onScroll: _cache[2] || (_cache[2] = (...args) => (_ctx.handleScroll && _ctx.handleScroll(...args)))
    }, [
      _createElementVNode$l("view", _hoisted_3$h, [
        _renderSlot$d(_ctx.$slots, "default")
      ]),
      (_openBlock$t(true), _createElementBlock$t(_Fragment$a, null, _renderList$a(_ctx.list, (dataList) => {
        return (_openBlock$t(), _createElementBlock$t("view", {
          key: dataList.key,
          id: `at-indexes__list-${dataList.key}`,
          class: "at-indexes__list"
        }, [
          _createElementVNode$l("view", _hoisted_5$a, _toDisplayString$j(dataList.title), 1 /* TEXT */),
          (dataList.items && dataList.items.length > 0)
            ? (_openBlock$t(), _createBlock$5(_component_at_list, { key: 0 }, {
                default: _withCtx$5(() => [
                  (_openBlock$t(true), _createElementBlock$t(_Fragment$a, null, _renderList$a(dataList.items, (item, i) => {
                    return (_openBlock$t(), _createBlock$5(_component_at_list_item, {
                      key: `${item.name}-${i}`,
                      title: item.name,
                      onClick: $event => (_ctx.handleClick(item))
                    }, null, 8 /* PROPS */, ["title", "onClick"]))
                  }), 128 /* KEYED_FRAGMENT */))
                ]),
                _: 2 /* DYNAMIC */
              }, 1024 /* DYNAMIC_SLOTS */))
            : _createCommentVNode$f("v-if", true)
        ], 8 /* PROPS */, _hoisted_4$d))
      }), 128 /* KEYED_FRAGMENT */))
    ], 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2$j),
    _createVNode$2(_component_at_toast, {
      isOpened: _ctx.showToast,
      text: _ctx.tipText,
      duration: 1000,
      style: _normalizeStyle$f(_ctx.toastStyle)
    }, null, 8 /* PROPS */, ["isOpened", "text", "style"])
  ], 16 /* FULL_PROPS */))
}


AtIndexes.render = _sfc_render$t;

function getInputProps(props) {
  const actualProps = {
    type: props.type,
    maxLength: props.maxLength,
    disabled: props.disabled,
    password: false
  };
  switch (actualProps.type) {
    case "phone":
      actualProps.type = "number";
      actualProps.maxLength = 11;
      break;
    case "password":
      actualProps.type = "text";
      actualProps.password = true;
      break;
  }
  if (!props.disabled && !props.editable) {
    actualProps.disabled = true;
  }
  return actualProps;
}
const AtInput = defineComponent({
  name: "AtInput",
  emits: [
    "blur",
    "focus",
    "confirm",
    "click",
    "error-click",
    "update:modelValue",
    "keyboard-height-change"
  ],
  props: {
    name: {
      type: String,
      default: ""
    },
    title: String,
    type: {
      type: String,
      default: "text",
      validator: (val) => ["text", "number", "password", "phone", "idcard", "digit"].includes(val)
    },
    error: Boolean,
    clear: Boolean,
    disabled: Boolean,
    border: {
      type: Boolean,
      default: true
    },
    modelValue: {
      type: String,
      default: ""
    },
    placeholder: {
      type: String,
      default: ""
    },
    placeholderStyle: {
      type: String,
      default: ""
    },
    placeholderClass: {
      type: String,
      default: ""
    },
    editable: {
      type: Boolean,
      default: true
    },
    focus: Boolean,
    required: Boolean,
    autoFocus: Boolean,
    adjustPosition: Boolean,
    cursorSpacing: {
      type: Number,
      default: 50
    },
    cursor: {
      type: Number,
      default: 0
    },
    selectionStart: {
      type: Number,
      default: -1
    },
    selectionEnd: {
      type: Number,
      default: -1
    },
    maxLength: {
      type: Number,
      default: 140
    },
    confirmType: {
      type: String,
      default: "done",
      validator: (val) => ["done", "send", "search", "next", "go"].includes(val)
    }
  },
  setup(props, { emit }) {
    const inputID = ref("weui-input" + uuid());
    const inputValue = useModelValue(props, emit, "modelValue");
    const inputProps = computed(() => getInputProps(props));
    const rootClasses = computed(() => ["at-input", {
      "at-input--without-border": !props.border
    }]);
    const containerClasses = computed(() => ["at-input__container", {
      "at-input--error": props.error,
      "at-input--disabled": inputProps.value.disabled
    }]);
    const overlayClasses = computed(() => ["at-input__overlay", {
      "at-input__overlay--hidden": !inputProps.value.disabled
    }]);
    const placeholderClasses = computed(() => Boolean(props.placeholderClass) ? `placeholder ${props.placeholderClass}` : "placeholder");
    const titleClasses = computed(() => ["at-input__title", {
      "at-input__title--required": props.required
    }]);
    function handleInput(e) {
      if (!inputProps.value.disabled) {
        inputValue.value = e.detail.value;
      }
    }
    function handleFocus(e) {
      if (!inputProps.value.disabled) {
        emit("focus", e.detail.value);
      }
    }
    function handleBlur(e) {
      if (!inputProps.value.disabled) {
        emit("blur", e.detail.value);
      }
    }
    function handleConfirm(e) {
      if (!inputProps.value.disabled) {
        emit("confirm", e.detail.value);
      }
    }
    function handleClick(e) {
      if (!props.editable) {
        emit("click", e);
      }
    }
    function handleClearValue() {
      inputValue.value = "";
    }
    function handleKeyboardHeightChange(e) {
      if (!inputProps.value.disabled) {
        emit("keyboard-height-change", e);
      }
    }
    function handleErrorClick(e) {
      emit("error-click", e);
    }
    return {
      ...toRefs(props),
      inputID,
      inputProps,
      inputValue,
      rootClasses,
      titleClasses,
      overlayClasses,
      containerClasses,
      placeholderClasses,
      handleBlur,
      handleClick,
      handleFocus,
      handleInput,
      handleConfirm,
      handleClearValue,
      handleErrorClick,
      handleKeyboardHeightChange
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeClass$d = normalizeClass, _createElementVNode$k = createElementVNode, _toDisplayString$i = toDisplayString, _openBlock$s = openBlock, _createElementBlock$s = createElementBlock, _createCommentVNode$e = createCommentVNode, _renderSlot$c = renderSlot, _mergeProps$s = mergeProps;

const _hoisted_1$n = ["for"];
const _hoisted_2$i = ["id", "name", "value", "type", "password", "maxlength", "placeholder", "placeholderStyle", "placeholderClass", "focus", "cursor", "autoFocus", "confirmType", "selectionEnd", "cursorSpacing", "selectionStart", "adjustPosition"];
const _hoisted_3$g = /*#__PURE__*/_createElementVNode$k("text", { class: "at-icon at-icon-close-circle at-input__icon-close" }, null, -1 /* HOISTED */);
const _hoisted_4$c = [
  _hoisted_3$g
];
const _hoisted_5$9 = /*#__PURE__*/_createElementVNode$k("text", { class: "at-icon at-icon-close-circle at-input__icon-alert" }, null, -1 /* HOISTED */);
const _hoisted_6$5 = [
  _hoisted_5$9
];
const _hoisted_7$5 = {
  key: 3,
  class: "at-input__children"
};

function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$s(), _createElementBlock$s("view", _mergeProps$s(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$k("view", {
      class: _normalizeClass$d(_ctx.containerClasses)
    }, [
      _createElementVNode$k("view", {
        class: _normalizeClass$d(_ctx.overlayClasses),
        onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
      }, null, 34 /* CLASS, HYDRATE_EVENTS */),
      (_ctx.title)
        ? (_openBlock$s(), _createElementBlock$s("label", {
            key: 0,
            for: _ctx.name,
            class: _normalizeClass$d(_ctx.titleClasses)
          }, _toDisplayString$i(_ctx.title), 11 /* TEXT, CLASS, PROPS */, _hoisted_1$n))
        : _createCommentVNode$e("v-if", true),
      _createElementVNode$k("input", {
        class: "at-input__input",
        id: _ctx.inputID,
        name: _ctx.name,
        value: _ctx.inputValue,
        type: _ctx.inputProps.type,
        password: _ctx.inputProps.password,
        maxlength: _ctx.inputProps.maxLength,
        placeholder: _ctx.placeholder,
        placeholderStyle: _ctx.placeholderStyle,
        placeholderClass: _ctx.placeholderClasses,
        focus: _ctx.focus,
        cursor: _ctx.cursor,
        autoFocus: _ctx.autoFocus,
        confirmType: _ctx.confirmType,
        selectionEnd: _ctx.selectionEnd,
        cursorSpacing: _ctx.cursorSpacing,
        selectionStart: _ctx.selectionStart,
        adjustPosition: _ctx.adjustPosition,
        onInput: _cache[1] || (_cache[1] = (...args) => (_ctx.handleInput && _ctx.handleInput(...args))),
        onFocus: _cache[2] || (_cache[2] = (...args) => (_ctx.handleFocus && _ctx.handleFocus(...args))),
        onBlur: _cache[3] || (_cache[3] = (...args) => (_ctx.handleBlur && _ctx.handleBlur(...args))),
        onConfirm: _cache[4] || (_cache[4] = (...args) => (_ctx.handleConfirm && _ctx.handleConfirm(...args))),
        onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => (_ctx.handleKeyboardHeightChange && _ctx.handleKeyboardHeightChange(...args)))
      }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2$i),
      (_ctx.clear && String(_ctx.modelValue))
        ? (_openBlock$s(), _createElementBlock$s("view", {
            key: 1,
            class: "at-input__icon",
            onTouchend: _cache[6] || (_cache[6] = (...args) => (_ctx.handleClearValue && _ctx.handleClearValue(...args)))
          }, _hoisted_4$c, 32 /* HYDRATE_EVENTS */))
        : _createCommentVNode$e("v-if", true),
      (_ctx.error)
        ? (_openBlock$s(), _createElementBlock$s("view", {
            key: 2,
            class: "at-input__icon",
            onTouchend: _cache[7] || (_cache[7] = (...args) => (_ctx.handleErrorClick && _ctx.handleErrorClick(...args)))
          }, _hoisted_6$5, 32 /* HYDRATE_EVENTS */))
        : _createCommentVNode$e("v-if", true),
      (Boolean(_ctx.$slots.default))
        ? (_openBlock$s(), _createElementBlock$s("view", _hoisted_7$5, [
            _renderSlot$c(_ctx.$slots, "default")
          ]))
        : _createCommentVNode$e("v-if", true)
    ], 2 /* CLASS */)
  ], 16 /* FULL_PROPS */))
}


AtInput.render = _sfc_render$s;

/**
 * A specialized version of `_.map` for arrays without support for iteratee
 * shorthands.
 *
 * @private
 * @param {Array} [array] The array to iterate over.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the new mapped array.
 */
function arrayMap(array, iteratee) {
  var index = -1,
      length = array == null ? 0 : array.length,
      result = Array(length);

  while (++index < length) {
    result[index] = iteratee(array[index], index, array);
  }
  return result;
}

/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';

/**
 * Checks if `value` is classified as a `Symbol` primitive or object.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
 * @example
 *
 * _.isSymbol(Symbol.iterator);
 * // => true
 *
 * _.isSymbol('abc');
 * // => false
 */
function isSymbol(value) {
  return typeof value == 'symbol' ||
    (isObjectLike$2(value) && baseGetTag$3(value) == symbolTag);
}

/** Used as references for various `Number` constants. */
var INFINITY$1 = 1 / 0;

/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol$4 ? Symbol$4.prototype : undefined,
    symbolToString = symbolProto ? symbolProto.toString : undefined;

/**
 * The base implementation of `_.toString` which doesn't convert nullish
 * values to empty strings.
 *
 * @private
 * @param {*} value The value to process.
 * @returns {string} Returns the string.
 */
function baseToString(value) {
  // Exit early for strings to avoid a performance hit in some environments.
  if (typeof value == 'string') {
    return value;
  }
  if (isArray(value)) {
    // Recursively convert values (susceptible to call stack limits).
    return arrayMap(value, baseToString) + '';
  }
  if (isSymbol(value)) {
    return symbolToString ? symbolToString.call(value) : '';
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
}

/**
 * Converts `value` to a string. An empty string is returned for `null`
 * and `undefined` values. The sign of `-0` is preserved.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 * @example
 *
 * _.toString(null);
 * // => ''
 *
 * _.toString(-0);
 * // => '-0'
 *
 * _.toString([1, 2, 3]);
 * // => '1,2,3'
 */
function toString(value) {
  return value == null ? '' : baseToString(value);
}

function addNum(num1, num2) {
  let sq1, sq2;
  try {
    sq1 = toString(num1).split(".")[1].length;
  } catch (e) {
    sq1 = 0;
  }
  try {
    sq2 = toString(num2).split(".")[1].length;
  } catch (e) {
    sq2 = 0;
  }
  const m = Math.pow(10, Math.max(sq1, sq2));
  return (Math.round(num1 * m) + Math.round(num2 * m)) / m;
}
function parseValue(num) {
  if (num === "")
    return "0";
  const numStr = toString(num);
  if (numStr.indexOf("0") === 0 && numStr.indexOf(".") === -1) {
    return toString(parseFloat(num));
  }
  return toString(num);
}
const AtInputNumber = defineComponent({
  name: "AtInputNumber",
  emits: {
    "blur": null,
    "update:modelValue": null,
    "error-input"(errCb) {
      return !!(errCb && typeof errCb === "object" && ["OVER", "LOW", "DISABLED"].includes(errCb.type) && typeof errCb.errorValue === "number");
    }
  },
  props: {
    type: {
      type: String,
      default: "number"
    },
    modelValue: {
      type: [Number, String],
      default: 1
    },
    min: {
      type: Number,
      default: 0
    },
    max: {
      type: Number,
      default: 100
    },
    step: {
      type: Number,
      default: 1
    },
    size: {
      type: String,
      default: "normal"
    },
    width: {
      type: Number,
      default: 120
    },
    disabled: Boolean,
    disabledInput: Boolean
  },
  setup(props, { emit }) {
    const inputValue = computed({
      get: () => Number(handleValue(props.modelValue)),
      set: (value) => emit("update:modelValue", value)
    });
    const inputStyle = computed(() => ({
      width: props.width ? `${pxTransform(props.width)}` : ""
    }));
    const rootClasses = computed(() => ({
      "at-input-number": true,
      "at-input-number--lg": props.size === "large"
    }));
    const minusBtnClasses = computed(() => ({
      "at-input-number__btn": true,
      "at-input-number--disabled": inputValue.value <= props.min || props.disabled
    }));
    const plusBtnClasses = computed(() => ({
      "at-input-number__btn": true,
      "at-input-number--disabled": inputValue.value >= props.max || props.disabled
    }));
    function handleClick(clickType, e) {
      const belowMin = clickType === "minus" && inputValue.value <= props.min;
      const overMax = clickType === "plus" && inputValue.value >= props.max;
      if (belowMin || overMax || props.disabled) {
        const deltaValue2 = clickType === "minus" ? -props.step : props.step;
        const errorValue = addNum(inputValue.value, deltaValue2);
        if (props.disabled) {
          handleError({
            type: "DISABLED",
            errorValue
          });
        } else {
          handleError({
            type: belowMin ? "LOW" : "OVER",
            errorValue
          });
        }
        return;
      }
      const deltaValue = clickType === "minus" ? -props.step : props.step;
      let newValue = addNum(inputValue.value, deltaValue);
      newValue = Number(handleValue(newValue));
      inputValue.value = newValue;
    }
    function handleValue(value) {
      let resultValue = value === "" ? props.min : value;
      if (resultValue > props.max) {
        resultValue = props.max;
        handleError({
          type: "OVER",
          errorValue: resultValue
        });
      }
      if (resultValue < props.min) {
        resultValue = props.min;
        handleError({
          type: "LOW",
          errorValue: resultValue
        });
      }
      if (resultValue && !Number(resultValue)) {
        resultValue = parseFloat(String(resultValue)) || props.min;
        handleError({
          type: "OVER",
          errorValue: resultValue
        });
      }
      resultValue = parseValue(String(resultValue));
      return resultValue;
    }
    function handleInput(e) {
      if (props.disabled)
        return;
      const { value } = e.target;
      const newValue = handleValue(value);
      inputValue.value = Number(newValue);
    }
    function handleBlur(e) {
      emit("blur", e);
    }
    function handleError(errorValue) {
      emit("error-input", errorValue);
    }
    return {
      type: toRef(props, "type"),
      disabled: toRef(props, "disabled"),
      disabledInput: toRef(props, "disabledInput"),
      inputValue,
      inputStyle,
      rootClasses,
      plusBtnClasses,
      minusBtnClasses,
      handleBlur,
      handleInput,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$j = createElementVNode, _normalizeClass$c = normalizeClass, _normalizeStyle$e = normalizeStyle, _mergeProps$r = mergeProps, _openBlock$r = openBlock, _createElementBlock$r = createElementBlock;

const _hoisted_1$m = /*#__PURE__*/_createElementVNode$j("text", { class: "at-icon at-icon-subtract at-input-number__btn-subtract" }, null, -1 /* HOISTED */);
const _hoisted_2$h = [
  _hoisted_1$m
];
const _hoisted_3$f = ["type", "value", "disabled"];
const _hoisted_4$b = /*#__PURE__*/_createElementVNode$j("text", { class: "at-icon at-icon-add at-input-number__btn-add" }, null, -1 /* HOISTED */);
const _hoisted_5$8 = [
  _hoisted_4$b
];

function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$r(), _createElementBlock$r("view", _mergeProps$r(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$j("view", {
      class: _normalizeClass$c(_ctx.minusBtnClasses),
      onTap: _cache[0] || (_cache[0] = $event => (_ctx.handleClick('minus', $event)))
    }, _hoisted_2$h, 34 /* CLASS, HYDRATE_EVENTS */),
    _createElementVNode$j("input", {
      class: "at-input-number__input",
      style: _normalizeStyle$e(_ctx.inputStyle),
      type: _ctx.type,
      value: _ctx.inputValue,
      disabled: _ctx.disabledInput || _ctx.disabled,
      onBlur: _cache[1] || (_cache[1] = (...args) => (_ctx.handleBlur && _ctx.handleBlur(...args))),
      onInput: _cache[2] || (_cache[2] = (...args) => (_ctx.handleInput && _ctx.handleInput(...args)))
    }, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_3$f),
    _createElementVNode$j("view", {
      class: _normalizeClass$c(_ctx.plusBtnClasses),
      onTap: _cache[3] || (_cache[3] = $event => (_ctx.handleClick('plus', $event)))
    }, _hoisted_5$8, 34 /* CLASS, HYDRATE_EVENTS */)
  ], 16 /* FULL_PROPS */))
}


AtInputNumber.render = _sfc_render$r;

const AtLoadMore = defineComponent({
  name: "AtLoadMore",
  components: {
    AtButton,
    AtActivityIndicator
  },
  emits: ["click"],
  props: {
    noMoreTextStyle: {
      type: [String, Object],
      default: ""
    },
    moreBtnStyle: {
      type: [String, Object],
      default: ""
    },
    status: {
      type: String,
      default: "more"
    },
    loadingText: {
      type: String,
      default: "\u52A0\u8F7D\u4E2D"
    },
    moreText: {
      type: String,
      default: "\u67E5\u770B\u66F4\u591A"
    },
    noMoreText: {
      type: String,
      default: "\u6CA1\u6709\u66F4\u591A"
    }
  },
  setup(props, { emit }) {
    function handleClick() {
      emit("click", arguments);
    }
    return {
      ...toRefs(props),
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _resolveComponent$4 = resolveComponent, _openBlock$q = openBlock, _createBlock$4 = createBlock, _toDisplayString$h = toDisplayString, _createTextVNode$1 = createTextVNode, _normalizeStyle$d = normalizeStyle, _withCtx$4 = withCtx, _createVNode$1 = createVNode, _createElementBlock$q = createElementBlock, _mergeProps$q = mergeProps;

const _hoisted_1$l = {
  key: 1,
  class: "at-load-more__cnt"
};

function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_activity_indicator = _resolveComponent$4("at-activity-indicator");
  const _component_at_button = _resolveComponent$4("at-button");

  return (_openBlock$q(), _createElementBlock$q("view", _mergeProps$q(_ctx.$attrs, { class: "at-load-more" }), [
    (_ctx.status === 'loading')
      ? (_openBlock$q(), _createBlock$4(_component_at_activity_indicator, {
          key: 0,
          mode: "center",
          content: _ctx.loadingText
        }, null, 8 /* PROPS */, ["content"]))
      : (_ctx.status === 'more')
        ? (_openBlock$q(), _createElementBlock$q("view", _hoisted_1$l, [
            _createVNode$1(_component_at_button, {
              full: true,
              style: _normalizeStyle$d(_ctx.moreBtnStyle),
              onClick: _ctx.handleClick
            }, {
              default: _withCtx$4(() => [
                _createTextVNode$1(_toDisplayString$h(_ctx.moreText), 1 /* TEXT */)
              ]),
              _: 1 /* STABLE */
            }, 8 /* PROPS */, ["style", "onClick"])
          ]))
        : (_openBlock$q(), _createElementBlock$q("text", {
            key: 2,
            class: "at-load-more__tip",
            style: _normalizeStyle$d(_ctx.noMoreTextStyle)
          }, _toDisplayString$h(_ctx.noMoreText), 5 /* TEXT, STYLE */))
  ], 16 /* FULL_PROPS */))
}


AtLoadMore.render = _sfc_render$q;

const AtMessage = defineComponent({
  name: "AtMessage",
  onHide() {
    Taro.eventCenter.off("atMessage");
  },
  onShow() {
    this.bindMessageListener();
  },
  setup() {
    const _timer = ref(null);
    const state = reactive({
      _isOpened: false,
      _message: "",
      _type: "info",
      _duration: 3e3
    });
    const rootClasses = computed(() => ({
      "at-message": true,
      "at-message--show": state._isOpened,
      "at-message--hidden": !state._isOpened,
      [`at-message--${state._type}`]: true
    }));
    function bindMessageListener() {
      Taro.eventCenter.on("atMessage", (options = {}) => {
        const { message, type, duration } = options;
        const newState = {
          _isOpened: true,
          _message: message,
          _type: type,
          _duration: duration || state._duration
        };
        Object.assign(state, newState);
        nextTick(() => {
          clearTimeout(_timer.value);
          _timer.value = setTimeout(() => {
            state._isOpened = false;
          }, state._duration);
        });
      });
      Taro.atMessage = Taro.eventCenter.trigger.bind(Taro.eventCenter, "atMessage");
    }
    onMounted(() => {
      bindMessageListener();
    });
    onUnmounted(() => {
      Taro.eventCenter.off("atMessage");
    });
    return {
      message: toRef(state, "_message"),
      rootClasses,
      bindMessageListener
    };
  }
});

// Binding optimization for webpack code-split
const _toDisplayString$g = toDisplayString, _mergeProps$p = mergeProps, _openBlock$p = openBlock, _createElementBlock$p = createElementBlock;

function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$p(), _createElementBlock$p("view", _mergeProps$p(_ctx.$attrs, { class: _ctx.rootClasses }), _toDisplayString$g(_ctx.message), 17 /* TEXT, FULL_PROPS */))
}


AtMessage.render = _sfc_render$p;

const AtModalAction = defineComponent({
  name: "AtModalAction",
  props: {
    isSimple: Boolean
  }
});

// Binding optimization for webpack code-split
const _renderSlot$b = renderSlot, _createElementVNode$i = createElementVNode, _mergeProps$o = mergeProps, _openBlock$o = openBlock, _createElementBlock$o = createElementBlock;

const _hoisted_1$k = { class: "at-modal__action" };

function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$o(), _createElementBlock$o("view", _mergeProps$o(_ctx.$attrs, {
    class: ['at-modal__footer', {
      'at-modal__footer--simple': Boolean(_ctx.$props.isSimple)
    }]
  }), [
    _createElementVNode$i("view", _hoisted_1$k, [
      _renderSlot$b(_ctx.$slots, "default")
    ])
  ], 16 /* FULL_PROPS */))
}


AtModalAction.render = _sfc_render$o;

var _sfc_main$1 = defineComponent({
  name: "AtModalContent"
});

// Binding optimization for webpack code-split
const _renderSlot$a = renderSlot, _mergeProps$n = mergeProps, _openBlock$n = openBlock, _createElementBlock$n = createElementBlock;

function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$n(), _createElementBlock$n("scroll-view", _mergeProps$n(_ctx.$attrs, {
    scrollY: true,
    class: "at-modal__content"
  }), [
    _renderSlot$a(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


_sfc_main$1.render = _sfc_render$n;

var _sfc_main = defineComponent({
  name: "AtModalHeader"
});

// Binding optimization for webpack code-split
const _renderSlot$9 = renderSlot, _mergeProps$m = mergeProps, _openBlock$m = openBlock, _createElementBlock$m = createElementBlock;

function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$m(), _createElementBlock$m("view", _mergeProps$m(_ctx.$attrs, { class: "at-modal__header" }), [
    _renderSlot$9(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


_sfc_main.render = _sfc_render$m;

const AtModal = defineComponent({
  name: "AtModal",
  components: {
    AtModalHeader: _sfc_main,
    AtModalAction,
    AtModalContent: _sfc_main$1
  },
  emits: [
    "close",
    "cancel",
    "confirm"
  ],
  props: {
    title: String,
    isOpened: Boolean,
    content: String,
    closeOnClickOverlay: {
      type: Boolean,
      default: true
    },
    cancelText: String,
    confirmText: String
  },
  setup(props, { attrs, emit }) {
    const state = reactive({
      _isOpened: props.isOpened,
      isWEB: Taro.getEnv() === Taro.ENV_TYPE.WEB
    });
    const rootClasses = computed(() => ({
      "at-modal--active": props.isOpened
    }));
    const disableScroll = {};
    const extendedAttrs = mergeProps(disableScroll, attrs);
    const h5ButtonStyle = computed(() => {
      return state.isWEB && "margin-top: 0px;";
    });
    watch(() => props.isOpened, (val, oldVal) => {
      if (val !== oldVal) {
        handleTouchScroll(val);
      }
      if (val !== state._isOpened) {
        state._isOpened = val;
      }
    });
    function handleClickOverlay() {
      if (props.closeOnClickOverlay) {
        state._isOpened = false;
        nextTick((event) => handleClose(event));
      }
    }
    function handleClose(event) {
      emit("close", event);
    }
    function handleCancel(event) {
      emit("cancel", event);
    }
    function handleConfirm(event) {
      emit("confirm", event);
    }
    function handleTouchmove(e) {
      e.stopPropagation();
    }
    return {
      ...toRefs(props),
      isWEB: toRef(state, "isWEB"),
      rootClasses,
      extendedAttrs,
      h5ButtonStyle,
      handleCancel,
      handleConfirm,
      handleTouchmove,
      handleClickOverlay
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$h = createElementVNode, _toDisplayString$f = toDisplayString, _resolveComponent$3 = resolveComponent, _withCtx$3 = withCtx, _openBlock$l = openBlock, _createBlock$3 = createBlock, _createCommentVNode$d = createCommentVNode, _createElementBlock$l = createElementBlock, _normalizeStyle$c = normalizeStyle, _mergeProps$l = mergeProps, _renderSlot$8 = renderSlot;

const _hoisted_1$j = { class: "at-modal__container" };
const _hoisted_2$g = { class: "content-simple" };
const _hoisted_3$e = ["innerHTML"];
const _hoisted_4$a = { key: 1 };
const _hoisted_5$7 = { class: "at-modal__container" };

function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_modal_header = _resolveComponent$3("at-modal-header");
  const _component_at_modal_content = _resolveComponent$3("at-modal-content");
  const _component_at_modal_action = _resolveComponent$3("at-modal-action");

  return (Boolean(_ctx.title || _ctx.content))
    ? (_openBlock$l(), _createElementBlock$l("view", _mergeProps$l({ key: 0 }, _ctx.extendedAttrs, {
        class: ['at-modal', _ctx.rootClasses],
        catchMove: true,
        onTouchmove: _cache[3] || (_cache[3] = (...args) => (_ctx.handleTouchmove && _ctx.handleTouchmove(...args)))
      }), [
        _createElementVNode$h("view", {
          class: "at-modal__overlay",
          onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClickOverlay && _ctx.handleClickOverlay(...args)))
        }, null, 32 /* HYDRATE_EVENTS */),
        _createElementVNode$h("view", _hoisted_1$j, [
          (_ctx.title)
            ? (_openBlock$l(), _createBlock$3(_component_at_modal_header, { key: 0 }, {
                default: _withCtx$3(() => [
                  _createElementVNode$h("text", null, _toDisplayString$f(_ctx.title), 1 /* TEXT */)
                ]),
                _: 1 /* STABLE */
              }))
            : _createCommentVNode$d("v-if", true),
          (_ctx.content)
            ? (_openBlock$l(), _createBlock$3(_component_at_modal_content, { key: 1 }, {
                default: _withCtx$3(() => [
                  _createElementVNode$h("view", _hoisted_2$g, [
                    (_ctx.isWEB)
                      ? (_openBlock$l(), _createElementBlock$l("text", {
                          key: 0,
                          innerHTML: _ctx.content.replace(/\n/g, '<br])')
                        }, null, 8 /* PROPS */, _hoisted_3$e))
                      : (_openBlock$l(), _createElementBlock$l("text", _hoisted_4$a, _toDisplayString$f(_ctx.content), 1 /* TEXT */))
                  ])
                ]),
                _: 1 /* STABLE */
              }))
            : _createCommentVNode$d("v-if", true),
          (_ctx.cancelText || _ctx.confirmText)
            ? (_openBlock$l(), _createBlock$3(_component_at_modal_action, {
                key: 2,
                isSimple: true
              }, {
                default: _withCtx$3(() => [
                  (_ctx.cancelText)
                    ? (_openBlock$l(), _createElementBlock$l("button", {
                        key: 0,
                        onTap: _cache[1] || (_cache[1] = (...args) => (_ctx.handleCancel && _ctx.handleCancel(...args)))
                      }, _toDisplayString$f(_ctx.cancelText), 33 /* TEXT, HYDRATE_EVENTS */))
                    : _createCommentVNode$d("v-if", true),
                  (_ctx.confirmText)
                    ? (_openBlock$l(), _createElementBlock$l("button", {
                        key: 1,
                        style: _normalizeStyle$c(_ctx.h5ButtonStyle),
                        onTap: _cache[2] || (_cache[2] = (...args) => (_ctx.handleConfirm && _ctx.handleConfirm(...args)))
                      }, _toDisplayString$f(_ctx.confirmText), 37 /* TEXT, STYLE, HYDRATE_EVENTS */))
                    : _createCommentVNode$d("v-if", true)
                ]),
                _: 1 /* STABLE */
              }))
            : _createCommentVNode$d("v-if", true)
        ])
      ], 16 /* FULL_PROPS */))
    : (_openBlock$l(), _createElementBlock$l("view", _mergeProps$l({ key: 1 }, _ctx.extendedAttrs, {
        class: ['at-modal', _ctx.rootClasses],
        catchMove: true,
        onTouchmove: _cache[5] || (_cache[5] = (...args) => (_ctx.handleTouchmove && _ctx.handleTouchmove(...args)))
      }), [
        _createElementVNode$h("view", {
          class: "at-modal__overlay",
          onTap: _cache[4] || (_cache[4] = (...args) => (_ctx.handleClickOverlay && _ctx.handleClickOverlay(...args)))
        }, null, 32 /* HYDRATE_EVENTS */),
        _createElementVNode$h("view", _hoisted_5$7, [
          _renderSlot$8(_ctx.$slots, "default")
        ])
      ], 16 /* FULL_PROPS */))
}


AtModal.render = _sfc_render$l;

const AtNavBar = defineComponent({
  name: "AtNavBar",
  emits: [
    "click-left-icon",
    "click-right-first-icon",
    "click-right-second-icon"
  ],
  props: {
    title: {
      type: String,
      default: ""
    },
    fixed: Boolean,
    border: {
      type: Boolean,
      default: true
    },
    color: {
      type: String,
      default: "#6190E8"
    },
    leftText: {
      type: String,
      default: ""
    },
    leftIconType: {
      type: [String, Object],
      default: "chevron-left"
    },
    rightFirstIconType: [String, Object],
    rightSecondIconType: [String, Object]
  },
  setup(props, { emit }) {
    const linkStyle = computed(() => ({ color: props.color }));
    const rootClasses = computed(() => ({
      "at-nav-bar": true,
      "at-nav-bar--fixed": props.fixed,
      "at-nav-bar--no-border": !props.border
    }));
    const genContainerClasses = computed(() => (iconType) => ({
      "at-nav-bar__container": true,
      "at-nav-bar__container--hide": !Boolean(iconType)
    }));
    const defaultIconInfo = {
      prefixClass: "at-icon",
      value: "",
      color: "",
      size: 24
    };
    const genIconInfo = (iconType) => {
      const iconInfo = computed(() => iconType instanceof Object ? { ...defaultIconInfo, ...iconType } : { ...defaultIconInfo, value: iconType || "" });
      if (iconInfo.value.size) {
        iconInfo.value.size = parseInt(iconInfo.value.size.toString()) * 2;
      }
      return iconInfo;
    };
    const leftIconInfo = genIconInfo(props.leftIconType);
    const rightFirstIconInfo = genIconInfo(props.rightFirstIconType);
    const rightSecondIconInfo = genIconInfo(props.rightSecondIconType);
    const {
      iconClasses: leftIconClasses
    } = useIconClasses(leftIconInfo.value, true);
    const {
      iconStyle: leftIconStyle
    } = useIconStyle(leftIconInfo.value, void 0, void 0, pxTransform);
    const {
      iconClasses: rightFirstIconClasses
    } = useIconClasses(rightFirstIconInfo.value, true);
    const {
      iconStyle: rightFirstIconStyle
    } = useIconStyle(rightFirstIconInfo.value, void 0, void 0, pxTransform);
    const {
      iconClasses: rightSecondIconClasses
    } = useIconClasses(rightSecondIconInfo.value, true);
    const {
      iconStyle: rightSecondIconStyle
    } = useIconStyle(rightSecondIconInfo.value, void 0, void 0, pxTransform);
    function handleClickLeftIcon(event) {
      emit("click-left-icon", event);
    }
    function handleClickRightFirstIcon(event) {
      emit("click-right-first-icon", event);
    }
    function handleClickRightSecondIcon(event) {
      emit("click-right-second-icon", event);
    }
    return {
      ...toRefs(props),
      linkStyle,
      rootClasses,
      genContainerClasses,
      leftIconStyle,
      leftIconClasses,
      rightFirstIconStyle,
      rightFirstIconClasses,
      rightSecondIconStyle,
      rightSecondIconClasses,
      handleClickLeftIcon,
      handleClickRightFirstIcon,
      handleClickRightSecondIcon
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeClass$b = normalizeClass, _normalizeStyle$b = normalizeStyle, _openBlock$k = openBlock, _createElementBlock$k = createElementBlock, _createCommentVNode$c = createCommentVNode, _toDisplayString$e = toDisplayString, _createElementVNode$g = createElementVNode, _renderSlot$7 = renderSlot, _mergeProps$k = mergeProps;

const _hoisted_1$i = {
  key: 1,
  class: "at-nav-bar__text"
};
const _hoisted_2$f = { class: "at-nav-bar__title" };
const _hoisted_3$d = { key: 0 };
const _hoisted_4$9 = { class: "at-nav-bar__right-view" };

function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$k(), _createElementBlock$k("view", _mergeProps$k(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$g("view", {
      class: "at-nav-bar__left-view",
      style: _normalizeStyle$b(_ctx.linkStyle),
      onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClickLeftIcon && _ctx.handleClickLeftIcon(...args)))
    }, [
      (_ctx.leftIconType)
        ? (_openBlock$k(), _createElementBlock$k("text", {
            key: 0,
            class: _normalizeClass$b(_ctx.leftIconClasses),
            style: _normalizeStyle$b(_ctx.leftIconStyle)
          }, null, 6 /* CLASS, STYLE */))
        : _createCommentVNode$c("v-if", true),
      (_ctx.leftText)
        ? (_openBlock$k(), _createElementBlock$k("text", _hoisted_1$i, _toDisplayString$e(_ctx.leftText), 1 /* TEXT */))
        : _createCommentVNode$c("v-if", true)
    ], 36 /* STYLE, HYDRATE_EVENTS */),
    _createElementVNode$g("view", _hoisted_2$f, [
      (_ctx.title)
        ? (_openBlock$k(), _createElementBlock$k("text", _hoisted_3$d, _toDisplayString$e(_ctx.title), 1 /* TEXT */))
        : _renderSlot$7(_ctx.$slots, "default", { key: 1 })
    ]),
    _createElementVNode$g("view", _hoisted_4$9, [
      _createElementVNode$g("view", {
        class: _normalizeClass$b(_ctx.genContainerClasses(_ctx.rightSecondIconType)),
        style: _normalizeStyle$b(_ctx.linkStyle),
        onTap: _cache[1] || (_cache[1] = (...args) => (_ctx.handleClickRightSecondIcon && _ctx.handleClickRightSecondIcon(...args)))
      }, [
        (_ctx.rightSecondIconType)
          ? (_openBlock$k(), _createElementBlock$k("text", {
              key: 0,
              class: _normalizeClass$b(_ctx.rightSecondIconClasses),
              style: _normalizeStyle$b(_ctx.rightSecondIconStyle)
            }, null, 6 /* CLASS, STYLE */))
          : _createCommentVNode$c("v-if", true)
      ], 38 /* CLASS, STYLE, HYDRATE_EVENTS */),
      _createElementVNode$g("view", {
        class: _normalizeClass$b(_ctx.genContainerClasses(_ctx.rightFirstIconType)),
        style: _normalizeStyle$b(_ctx.linkStyle),
        onTap: _cache[2] || (_cache[2] = (...args) => (_ctx.handleClickRightFirstIcon && _ctx.handleClickRightFirstIcon(...args)))
      }, [
        (_ctx.rightFirstIconType)
          ? (_openBlock$k(), _createElementBlock$k("text", {
              key: 0,
              class: _normalizeClass$b(_ctx.rightFirstIconClasses),
              style: _normalizeStyle$b(_ctx.rightFirstIconStyle)
            }, null, 6 /* CLASS, STYLE */))
          : _createCommentVNode$c("v-if", true)
      ], 38 /* CLASS, STYLE, HYDRATE_EVENTS */)
    ])
  ], 16 /* FULL_PROPS */))
}


AtNavBar.render = _sfc_render$k;

const AtNoticebar = defineComponent({
  name: "AtNoticebar",
  emits: ["close", "goto-more"],
  props: {
    close: Boolean,
    single: Boolean,
    marquee: Boolean,
    showMore: Boolean,
    speed: {
      type: Number,
      default: 100
    },
    moreText: {
      type: String,
      default: "\u67E5\u770B\u8BE6\u60C5"
    },
    icon: String
  },
  setup(props, { emit }) {
    const timeout = ref(null);
    const interval = ref(null);
    const state = reactive({
      dura: 15,
      show: true,
      close_: props.marquee ? false : props.close,
      showMore_: !props.single ? false : props.showMore,
      animationElId: `J_${Math.ceil(Math.random() * 1e6).toString(36)}`,
      animationData: { actions: [{}] },
      isWEB: Taro.getEnv() === Taro.ENV_TYPE.WEB
    });
    const rootClasses = computed(() => ({
      "at-noticebar": true,
      "at-noticebar--marquee": props.marquee,
      "at-noticebar--weapp": props.marquee && !state.isWEB,
      "at-noticebar--single": !props.marquee && props.single
    }));
    const animationStyle = computed(() => {
      const style = {};
      if (props.marquee) {
        style.animationDuration = `${state.dura}s`;
      }
      return style;
    });
    const innerContentClasses = computed(() => ({
      "at-noticebar__content-inner": true,
      [`${state.animationElId}`]: props.marquee
    }));
    const iconClasses = computed(() => ({
      "at-icon": true,
      [`at-icon-${props.icon}`]: Boolean(props.icon)
    }));
    function handleClose(event) {
      state.show = false;
      emit("close", event);
    }
    function onGotoMore(event) {
      emit("goto-more", event);
    }
    function initWebAnimation() {
      const elem = document.querySelector(`.${state.animationElId}`);
      if (!elem)
        return;
      const width = elem.getBoundingClientRect().width;
      state.dura = width / +props.speed;
    }
    function initMiniAppAnimation() {
      const query = Taro.createSelectorQuery();
      query.select(`.${state.animationElId}`).boundingClientRect().exec((res) => {
        const queryRes = res[0];
        if (!queryRes)
          return;
        const { width } = queryRes;
        const dura = width / +props.speed;
        const animation = Taro.createAnimation({
          duration: dura * 1e3
        });
        const resetAnimation = Taro.createAnimation({
          duration: 0
        });
        const resetOpacityAnimation = Taro.createAnimation({
          duration: 0
        });
        const animateBody = () => {
          resetOpacityAnimation.opacity(0).step();
          state.animationData = resetOpacityAnimation.export();
          setTimeout(() => {
            resetAnimation.translateX(0).step();
            state.animationData = resetAnimation.export();
          }, 300);
          setTimeout(() => {
            resetOpacityAnimation.opacity(1).step();
            state.animationData = resetOpacityAnimation.export();
          }, 600);
          setTimeout(() => {
            animation.translateX(-width).step();
            state.animationData = animation.export();
          }, 900);
        };
        animateBody();
        interval.value = setInterval(animateBody, dura * 1e3 + 1e3);
      });
    }
    function initAnimation() {
      timeout.value = setTimeout(() => {
        timeout.value = null;
        if (state.isWEB)
          initWebAnimation();
        else
          initMiniAppAnimation();
      }, 100);
    }
    onMounted(() => {
      if (!props.marquee)
        return;
      initAnimation();
    });
    return {
      ...toRefs(state),
      ...toRefs(props),
      rootClasses,
      iconClasses,
      innerContentClasses,
      animationStyle,
      handleClose,
      onGotoMore
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$f = createElementVNode, _openBlock$j = openBlock, _createElementBlock$j = createElementBlock, _createCommentVNode$b = createCommentVNode, _normalizeClass$a = normalizeClass, _renderSlot$6 = renderSlot, _normalizeStyle$a = normalizeStyle, _toDisplayString$d = toDisplayString, _mergeProps$j = mergeProps;

const _hoisted_1$h = /*#__PURE__*/_createElementVNode$f("text", { class: "at-icon at-icon-close" }, null, -1 /* HOISTED */);
const _hoisted_2$e = [
  _hoisted_1$h
];
const _hoisted_3$c = { class: "at-noticebar__content" };
const _hoisted_4$8 = {
  key: 0,
  class: "at-noticebar__content-icon"
};
const _hoisted_5$6 = { class: "at-noticebar__content-text" };
const _hoisted_6$4 = ["id", "animation"];
const _hoisted_7$4 = { class: "text" };
const _hoisted_8$3 = /*#__PURE__*/_createElementVNode$f("view", { class: "at-noticebar__more-icon" }, [
  /*#__PURE__*/_createElementVNode$f("text", { class: "at-icon at-icon-chevron-right" })
], -1 /* HOISTED */);

function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
  return (_ctx.show)
    ? (_openBlock$j(), _createElementBlock$j("view", _mergeProps$j({ key: 0 }, _ctx.$attrs, { class: _ctx.rootClasses }), [
        (_ctx.close_)
          ? (_openBlock$j(), _createElementBlock$j("view", {
              key: 0,
              class: "at-noticebar__close",
              onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClose && _ctx.handleClose(...args)))
            }, _hoisted_2$e, 32 /* HYDRATE_EVENTS */))
          : _createCommentVNode$b("v-if", true),
        _createElementVNode$f("view", _hoisted_3$c, [
          (_ctx.icon)
            ? (_openBlock$j(), _createElementBlock$j("view", _hoisted_4$8, [
                _createElementVNode$f("text", {
                  class: _normalizeClass$a(_ctx.iconClasses)
                }, null, 2 /* CLASS */)
              ]))
            : _createCommentVNode$b("v-if", true),
          _createElementVNode$f("view", _hoisted_5$6, [
            _createElementVNode$f("view", {
              id: _ctx.animationElId,
              animation: _ctx.animationData,
              class: _normalizeClass$a(_ctx.innerContentClasses),
              style: _normalizeStyle$a(_ctx.animationStyle)
            }, [
              _renderSlot$6(_ctx.$slots, "default")
            ], 14 /* CLASS, STYLE, PROPS */, _hoisted_6$4),
            (_ctx.showMore_)
              ? (_openBlock$j(), _createElementBlock$j("view", {
                  key: 0,
                  class: "at-noticebar__more",
                  onTap: _cache[1] || (_cache[1] = (...args) => (_ctx.onGotoMore && _ctx.onGotoMore(...args)))
                }, [
                  _createElementVNode$f("text", _hoisted_7$4, _toDisplayString$d(_ctx.moreText), 1 /* TEXT */),
                  _hoisted_8$3
                ], 32 /* HYDRATE_EVENTS */))
              : _createCommentVNode$b("v-if", true)
          ])
        ])
      ], 16 /* FULL_PROPS */))
    : _createCommentVNode$b("v-if", true)
}


AtNoticebar.render = _sfc_render$j;

const MIN_MAXPAGE = 1;
const getMaxPage = (maxPage = 0) => {
  if (maxPage <= 0)
    return MIN_MAXPAGE;
  return maxPage;
};
const createPickerRange = (max) => {
  const range = new Array(max).fill(0).map((_val, index) => index + 1);
  return range;
};
const AtPagination = defineComponent({
  name: "AtPagination",
  components: {
    AtButton
  },
  emits: {
    "page-change"(data) {
      return !!(data && data.type && ["prev", "next"].includes(data.type) && typeof data.current === "number");
    }
  },
  props: {
    total: { type: Number, default: 0 },
    current: { type: Number, default: 1 },
    pageSize: { type: Number, default: 20 },
    icon: Boolean
  },
  setup(props, { emit }) {
    const maxPage = computed(() => getMaxPage(Math.ceil(props.total / props.pageSize)));
    const state = reactive({
      currentPage: props.current || 1,
      maxPage: maxPage.value,
      pickerRange: createPickerRange(maxPage.value)
    });
    const prevDisabled = computed(() => state.maxPage === MIN_MAXPAGE || state.currentPage === 1);
    const nextDisabled = computed(() => state.maxPage === MIN_MAXPAGE || state.currentPage === state.maxPage);
    const rootClasses = computed(() => ["at-pagination", {
      "at-pagination--icon": props.icon
    }]);
    watch(() => [
      props.total,
      props.pageSize,
      props.current
    ], ([total, pageSize, current]) => {
      const maxPage2 = getMaxPage(Math.ceil(total / pageSize));
      if (maxPage2 !== state.maxPage) {
        state.maxPage = maxPage2;
        state.pickerRange = createPickerRange(maxPage2);
      }
      if (typeof current === "number" && current !== state.currentPage) {
        state.currentPage = current;
      }
    });
    function onPrev() {
      let { currentPage } = state;
      const originCur = currentPage;
      currentPage -= 1;
      currentPage = Math.max(1, currentPage);
      if (originCur === currentPage)
        return;
      emit("page-change", { type: "prev", current: currentPage });
      state.currentPage = currentPage;
    }
    function onNext() {
      let { currentPage } = state;
      const originCur = currentPage;
      const { maxPage: maxPage2 } = state;
      currentPage += 1;
      currentPage = Math.min(maxPage2, currentPage);
      if (originCur === currentPage)
        return;
      emit("page-change", { type: "next", current: currentPage });
      state.currentPage = currentPage;
    }
    return {
      ...toRefs(state),
      icon: toRef(props, "icon"),
      rootClasses,
      prevDisabled,
      nextDisabled,
      onPrev,
      onNext
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$e = createElementVNode, _resolveComponent$2 = resolveComponent, _withCtx$2 = withCtx, _openBlock$i = openBlock, _createBlock$2 = createBlock, _createCommentVNode$a = createCommentVNode, _createTextVNode = createTextVNode, _toDisplayString$c = toDisplayString, _mergeProps$i = mergeProps, _createElementBlock$i = createElementBlock;

const _hoisted_1$g = { class: "at-pagination__btn-prev" };
const _hoisted_2$d = /*#__PURE__*/_createElementVNode$e("text", { class: "at-icon at-icon-chevron-left" }, null, -1 /* HOISTED */);
const _hoisted_3$b = /*#__PURE__*/_createTextVNode("上一页");
const _hoisted_4$7 = { class: "at-pagination__number" };
const _hoisted_5$5 = { class: "at-pagination__number-current" };
const _hoisted_6$3 = { class: "at-pagination__btn-next" };
const _hoisted_7$3 = /*#__PURE__*/_createElementVNode$e("text", { class: "at-icon at-icon-chevron-right" }, null, -1 /* HOISTED */);
const _hoisted_8$2 = /*#__PURE__*/_createTextVNode("下一页");

function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_button = _resolveComponent$2("at-button");

  return (_openBlock$i(), _createElementBlock$i("view", _mergeProps$i(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$e("view", _hoisted_1$g, [
      (_ctx.icon)
        ? (_openBlock$i(), _createBlock$2(_component_at_button, {
            key: 0,
            size: "small",
            disabled: _ctx.prevDisabled,
            onClick: _ctx.onPrev
          }, {
            default: _withCtx$2(() => [
              _hoisted_2$d
            ]),
            _: 1 /* STABLE */
          }, 8 /* PROPS */, ["disabled", "onClick"]))
        : _createCommentVNode$a("v-if", true),
      (!_ctx.icon)
        ? (_openBlock$i(), _createBlock$2(_component_at_button, {
            key: 1,
            size: "small",
            disabled: _ctx.prevDisabled,
            onClick: _ctx.onPrev
          }, {
            default: _withCtx$2(() => [
              _hoisted_3$b
            ]),
            _: 1 /* STABLE */
          }, 8 /* PROPS */, ["disabled", "onClick"]))
        : _createCommentVNode$a("v-if", true)
    ]),
    _createElementVNode$e("view", _hoisted_4$7, [
      _createElementVNode$e("text", _hoisted_5$5, _toDisplayString$c(_ctx.currentPage), 1 /* TEXT */),
      _createElementVNode$e("text", null, _toDisplayString$c(`/${_ctx.maxPage}`), 1 /* TEXT */)
    ]),
    _createElementVNode$e("view", _hoisted_6$3, [
      (_ctx.icon)
        ? (_openBlock$i(), _createBlock$2(_component_at_button, {
            key: 0,
            size: "small",
            disabled: _ctx.nextDisabled,
            onClick: _ctx.onNext
          }, {
            default: _withCtx$2(() => [
              _hoisted_7$3
            ]),
            _: 1 /* STABLE */
          }, 8 /* PROPS */, ["disabled", "onClick"]))
        : _createCommentVNode$a("v-if", true),
      (!_ctx.icon)
        ? (_openBlock$i(), _createBlock$2(_component_at_button, {
            key: 1,
            size: "small",
            disabled: _ctx.nextDisabled,
            onClick: _ctx.onNext
          }, {
            default: _withCtx$2(() => [
              _hoisted_8$2
            ]),
            _: 1 /* STABLE */
          }, 8 /* PROPS */, ["disabled", "onClick"]))
        : _createCommentVNode$a("v-if", true)
    ])
  ], 16 /* FULL_PROPS */))
}


AtPagination.render = _sfc_render$i;

const AtProgress = defineComponent({
  name: "AtProgress",
  props: {
    color: {
      type: String,
      default: ""
    },
    status: {
      type: String,
      validator: (val) => ["progress", "error", "success"].includes(val)
    },
    percent: {
      type: Number,
      default: 0
    },
    strokeWidth: {
      type: Number,
      default: 10
    },
    hidePercent: Boolean
  },
  setup(props) {
    const percent = computed(() => {
      let p = props.percent;
      if (props.percent < 0) {
        p = 0;
      }
      if (props.percent > 100) {
        p = 100;
      }
      return p;
    });
    const rootClasses = computed(() => ["at-progress", {
      [`at-progress--${props.status}`]: !!props.status
    }]);
    const iconClasses = computed(() => ["at-icon", {
      "at-icon-close-circle": props.status === "error",
      "at-icon-check-circle": props.status === "success"
    }]);
    const progressStyle = computed(() => ({
      width: `${percent.value}%`,
      height: props.strokeWidth && `${props.strokeWidth}px`,
      backgroundColor: props.color
    }));
    return {
      status: toRef(props, "status"),
      hidePercent: toRef(props, "hidePercent"),
      percent,
      rootClasses,
      iconClasses,
      progressStyle
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeStyle$9 = normalizeStyle, _createElementVNode$d = createElementVNode, _toDisplayString$b = toDisplayString, _openBlock$h = openBlock, _createElementBlock$h = createElementBlock, _createCommentVNode$9 = createCommentVNode, _normalizeClass$9 = normalizeClass, _mergeProps$h = mergeProps;

const _hoisted_1$f = { class: "at-progress__outer" };
const _hoisted_2$c = { class: "at-progress__outer-inner" };
const _hoisted_3$a = {
  key: 0,
  class: "at-progress__content"
};
const _hoisted_4$6 = { key: 0 };

function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$h(), _createElementBlock$h("view", _mergeProps$h(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$d("view", _hoisted_1$f, [
      _createElementVNode$d("view", _hoisted_2$c, [
        _createElementVNode$d("view", {
          class: "at-progress__outer-inner-background",
          style: _normalizeStyle$9(_ctx.progressStyle)
        }, null, 4 /* STYLE */)
      ])
    ]),
    (!_ctx.hidePercent)
      ? (_openBlock$h(), _createElementBlock$h("view", _hoisted_3$a, [
          (!_ctx.status || _ctx.status === 'progress')
            ? (_openBlock$h(), _createElementBlock$h("text", _hoisted_4$6, _toDisplayString$b(`${_ctx.percent}%`), 1 /* TEXT */))
            : (_openBlock$h(), _createElementBlock$h("text", {
                key: 1,
                class: _normalizeClass$9(_ctx.iconClasses)
              }, null, 2 /* CLASS */))
        ]))
      : _createCommentVNode$9("v-if", true)
  ], 16 /* FULL_PROPS */))
}


AtProgress.render = _sfc_render$h;

const AtRadio = defineComponent({
  name: "AtRadio",
  emits: ["update:modelValue"],
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    options: {
      type: Array,
      default: []
    }
  },
  setup(props, { emit }) {
    const radioModelValue = useModelValue(props, emit);
    const genOptionClasses = computed(() => (option) => ({
      "at-radio__option": true,
      "at-radio__option--disabled": option.disabled
    }));
    const genIconClasses = computed(() => (option) => ({
      "at-radio__icon": true,
      "at-radio__icon--checked": props.modelValue === option.value
    }));
    function handleClick(option) {
      if (option.disabled)
        return;
      radioModelValue.value = option.value;
    }
    return {
      options: toRef(props, "options"),
      genOptionClasses,
      genIconClasses,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$9 = renderList, _Fragment$9 = Fragment, _openBlock$g = openBlock, _createElementBlock$g = createElementBlock, _toDisplayString$a = toDisplayString, _createElementVNode$c = createElementVNode, _normalizeClass$8 = normalizeClass, _createCommentVNode$8 = createCommentVNode, _mergeProps$g = mergeProps;

const _hoisted_1$e = ["onTap"];
const _hoisted_2$b = { class: "at-radio__option-wrap" };
const _hoisted_3$9 = { class: "at-radio__option-container" };
const _hoisted_4$5 = { class: "at-radio__title" };
const _hoisted_5$4 = /*#__PURE__*/_createElementVNode$c("text", { class: "at-icon at-icon-check" }, null, -1 /* HOISTED */);
const _hoisted_6$2 = [
  _hoisted_5$4
];
const _hoisted_7$2 = {
  key: 0,
  class: "at-radio__desc"
};

function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$g(), _createElementBlock$g("view", _mergeProps$g(_ctx.$attrs, { class: "at-radio" }), [
    (_openBlock$g(true), _createElementBlock$g(_Fragment$9, null, _renderList$9(_ctx.options, (option, index) => {
      return (_openBlock$g(), _createElementBlock$g("view", {
        key: index,
        class: _normalizeClass$8(_ctx.genOptionClasses(option)),
        onTap: $event => (_ctx.handleClick(option))
      }, [
        _createElementVNode$c("view", _hoisted_2$b, [
          _createElementVNode$c("view", _hoisted_3$9, [
            _createElementVNode$c("view", _hoisted_4$5, _toDisplayString$a(option.label), 1 /* TEXT */),
            _createElementVNode$c("view", {
              class: _normalizeClass$8(_ctx.genIconClasses(option))
            }, _hoisted_6$2, 2 /* CLASS */)
          ]),
          (option.desc)
            ? (_openBlock$g(), _createElementBlock$g("view", _hoisted_7$2, _toDisplayString$a(option.desc), 1 /* TEXT */))
            : _createCommentVNode$8("v-if", true)
        ])
      ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1$e))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtRadio.render = _sfc_render$g;

const AtRate = defineComponent({
  name: "AtRate",
  emits: ["update:modelValue"],
  props: {
    size: {
      type: [Number, String],
      default: 20,
      validator: (prop) => {
        return typeof parseInt(`${prop}`) === "number";
      }
    },
    modelValue: { type: Number, default: 0 },
    max: {
      type: [Number, String],
      default: 5,
      validator: (prop) => {
        return typeof parseInt(`${prop}`) === "number";
      }
    },
    margin: {
      type: [Number, String],
      default: 5,
      validator: (prop) => {
        return typeof parseInt(`${prop}`) === "number";
      }
    },
    icon: {
      type: String,
      default: "star",
      validator: (prop) => ["star", "heart"].includes(prop)
    },
    color: { type: String, default: "#FFCA3E" }
  },
  setup(props, { emit }) {
    const modelValue = useModelValue(props, emit);
    const iconMarginStyle = computed(() => ({
      marginRight: pxTransform(parseInt(`${props.margin}`))
    }));
    const genIconStyle = computed(() => (cls) => ({
      fontSize: convertToUnit(props.size),
      color: cls.includes("at-rate__icon--on") ? props.color : ""
    }));
    const iconColorClasses = computed(() => {
      const classNames = [];
      const floorValue = Math.floor(props.modelValue);
      const ceilValue = Math.ceil(props.modelValue);
      for (let i = 0; i < parseInt(`${props.max}`); i++) {
        if (floorValue > i) {
          classNames.push("at-rate__icon at-rate__icon--on");
        } else if (ceilValue - 1 === i) {
          classNames.push("at-rate__icon at-rate__icon--half");
        } else {
          classNames.push("at-rate__icon at-rate__icon--off");
        }
      }
      return classNames;
    });
    function handleClick(index) {
      modelValue.value = index;
    }
    return {
      genIconStyle,
      iconMarginStyle,
      iconColorClasses,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$8 = renderList, _Fragment$8 = Fragment, _openBlock$f = openBlock, _createElementBlock$f = createElementBlock, _normalizeClass$7 = normalizeClass, _normalizeStyle$8 = normalizeStyle, _createElementVNode$b = createElementVNode, _mergeProps$f = mergeProps;

const _hoisted_1$d = ["onTap"];
const _hoisted_2$a = { class: "at-rate__left" };

function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$f(), _createElementBlock$f("view", _mergeProps$f(_ctx.$attrs, { class: "at-rate" }), [
    (_openBlock$f(true), _createElementBlock$f(_Fragment$8, null, _renderList$8(_ctx.iconColorClasses, (className, i) => {
      return (_openBlock$f(), _createElementBlock$f("view", {
        key: `at-rate-star-${i}`,
        class: _normalizeClass$7(className),
        style: _normalizeStyle$8(_ctx.iconMarginStyle),
        onTap: $event => (_ctx.handleClick(i + 1))
      }, [
        _createElementVNode$b("text", {
          class: _normalizeClass$7(['at-icon', `at-icon-${_ctx.icon}-2`]),
          style: _normalizeStyle$8(_ctx.genIconStyle(className))
        }, null, 6 /* CLASS, STYLE */),
        _createElementVNode$b("view", _hoisted_2$a, [
          _createElementVNode$b("text", {
            class: _normalizeClass$7(['at-icon', `at-icon-${_ctx.icon}-2`]),
            style: _normalizeStyle$8(_ctx.genIconStyle(className))
          }, null, 6 /* CLASS, STYLE */)
        ])
      ], 46 /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_1$d))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtRate.render = _sfc_render$f;

const AtRange = defineComponent({
  name: "AtRange",
  emits: {
    "update:modelValue"(value) {
      return !!(value && Array.isArray(value) && value.length === 2 && typeof value[0] === "number" && typeof value[1] === "number");
    },
    "after-change"(value) {
      return !!(value && Array.isArray(value) && value.length === 2 && typeof value[0] === "number" && typeof value[1] === "number");
    }
  },
  props: {
    sliderStyle: {
      type: [Object, String],
      default: ""
    },
    railStyle: {
      type: [Object, String],
      default: ""
    },
    trackStyle: {
      type: [Object, String],
      default: ""
    },
    modelValue: {
      type: Array,
      default: [0, 0]
    },
    min: {
      type: Number,
      default: 0
    },
    max: {
      type: Number,
      default: 100
    },
    blockSize: {
      type: Number,
      default: 0
    },
    disabled: Boolean,
    onAfterChange: Function
  },
  setup(props, { emit }) {
    const left = ref(0);
    const width = ref(0);
    const currentSlider = ref("");
    const rangeValue = useModelValue(props, emit);
    const deltaValue = computed(() => props.max - props.min);
    const state = reactive({
      aX: 0,
      bX: 0
    });
    const rootClasses = computed(() => ["at-range", {
      "at-range--disabled": props.disabled
    }]);
    const containerStyle = computed(() => ({
      height: props.blockSize ? `${props.blockSize}PX` : ""
    }));
    const sliderCommonStyle = computed(() => ({
      width: props.blockSize ? `${props.blockSize}PX` : "",
      height: props.blockSize ? `${props.blockSize}PX` : "",
      marginLeft: props.blockSize ? `${-props.blockSize / 2}PX` : ""
    }));
    const sliderAStyle = computed(() => ({
      ...sliderCommonStyle.value,
      ...typeof props.sliderStyle === "string" ? cssStringToObject(props.sliderStyle) : props.sliderStyle,
      left: `${state.aX}%`,
      top: "0%"
    }));
    const sliderBStyle = computed(() => ({
      ...sliderCommonStyle.value,
      ...typeof props.sliderStyle === "string" ? cssStringToObject(props.sliderStyle) : props.sliderStyle,
      left: `${state.bX}%`,
      top: "0%"
    }));
    const atTrackStyle = computed(() => ({
      ...typeof props.trackStyle === "string" ? cssStringToObject(props.trackStyle) : props.trackStyle,
      left: `${Math.min(state.aX, state.bX)}%`,
      width: `${Math.abs(state.aX - state.bX)}%`
    }));
    function handleClick(event) {
      if (currentSlider.value && !props.disabled) {
        let sliderValue = 0;
        const detail = getEventDetail(event);
        sliderValue = detail.x - left.value;
        setSliderValue(currentSlider.value, sliderValue, "onChange");
      }
    }
    function handleTouchmove(sliderName, event) {
      if (props.disabled)
        return;
      event.stopPropagation();
      const clientX = event.touches[0].clientX;
      setSliderValue(sliderName, clientX - left.value, "onChange");
    }
    function handleTouchend(sliderName) {
      if (props.disabled)
        return;
      currentSlider.value = sliderName;
      triggerEvent("onAfterChange");
    }
    function setSliderValue(sliderName, targetValue, funcName) {
      const distance = Math.min(Math.max(targetValue, 0), width.value);
      const sliderValue = Math.floor(distance / width.value * 100);
      if (funcName) {
        state[sliderName] = sliderValue;
        nextTick(() => {
          triggerEvent(funcName);
        });
      } else {
        state[sliderName] = sliderValue;
      }
    }
    function setValue(value) {
      const aX = Math.round((value[0] - props.min) / deltaValue.value * 100);
      const bX = Math.round((value[1] - props.min) / deltaValue.value * 100);
      state.aX = aX;
      state.bX = bX;
    }
    function triggerEvent(funcName) {
      const { aX, bX } = state;
      const a = Math.round(aX / 100 * deltaValue.value) + props.min;
      const b = Math.round(bX / 100 * deltaValue.value) + props.min;
      const result = [a, b].sort((x, y) => x - y);
      if (funcName === "onChange") {
        rangeValue.value = result;
      } else if (funcName === "onAfterChange") {
        emit("after-change", result);
      }
    }
    function updatePos() {
      delayQuerySelector(this, ".at-range__container", 10).then((rect) => {
        width.value = Math.round(rect[0].width);
        left.value = Math.round(rect[0].left);
      });
    }
    watch(rangeValue, (value, prevValue) => {
      updatePos();
      if (prevValue[0] !== value[0] || prevValue[1] !== value[1]) {
        setValue(value);
      }
    });
    onMounted(() => {
      updatePos();
      setValue(rangeValue.value);
    });
    return {
      railStyle: toRef(props, "railStyle"),
      rootClasses,
      sliderAStyle,
      sliderBStyle,
      atTrackStyle,
      containerStyle,
      handleClick,
      handleTouchend,
      handleTouchmove
    };
  }
});

// Binding optimization for webpack code-split
const _normalizeStyle$7 = normalizeStyle, _createElementVNode$a = createElementVNode, _renderList$7 = renderList, _Fragment$7 = Fragment, _openBlock$e = openBlock, _createElementBlock$e = createElementBlock, _mergeProps$e = mergeProps;

const _hoisted_1$c = ["onTouchend", "onTouchmove"];

function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$e(), _createElementBlock$e("view", _mergeProps$e(_ctx.$attrs, {
    class: _ctx.rootClasses,
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    _createElementVNode$a("view", {
      class: "at-range__container",
      style: _normalizeStyle$7(_ctx.containerStyle)
    }, [
      _createElementVNode$a("view", {
        class: "at-range__rail",
        style: _normalizeStyle$7(_ctx.railStyle)
      }, [
        _createElementVNode$a("view", {
          class: "at-range__track",
          style: _normalizeStyle$7(_ctx.atTrackStyle)
        }, null, 4 /* STYLE */),
        (_openBlock$e(), _createElementBlock$e(_Fragment$7, null, _renderList$7(['aX', 'bX'], (sliderName, index) => {
          return _createElementVNode$a("view", {
            key: `${sliderName} - ${index}`,
            style: _normalizeStyle$7(sliderName === 'aX' ? _ctx.sliderAStyle : _ctx.sliderBStyle),
            class: "at-range__slider",
            onTouchend: $event => (_ctx.handleTouchend(sliderName)),
            onTouchmove: $event => (_ctx.handleTouchmove(sliderName, $event))
          }, null, 44 /* STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_1$c)
        }), 64 /* STABLE_FRAGMENT */))
      ], 4 /* STYLE */)
    ], 4 /* STYLE */)
  ], 16 /* FULL_PROPS */))
}


AtRange.render = _sfc_render$e;

const AtSearchBar = defineComponent({
  name: "AtSearchBar",
  emits: [
    "blur",
    "focus",
    "confirm",
    "action-click",
    "update:modelValue"
  ],
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    placeholder: {
      type: String,
      default: "\u641C\u7D22"
    },
    maxLength: {
      type: Number,
      default: 140
    },
    fixed: Boolean,
    focus: Boolean,
    disabled: Boolean,
    showActionButton: Boolean,
    actionName: {
      type: String,
      default: "\u641C\u7D22"
    },
    inputType: {
      type: String,
      default: "text"
    },
    onClear: Function
  },
  setup(props, { emit }) {
    const state = reactive({
      isFocus: !!props.focus
    });
    const fontSize = 14;
    const inputID = ref("weui-input" + uuid());
    const inputValue = useModelValue(props, emit);
    const rootClasses = computed(() => ({
      "at-search-bar": true,
      "at-search-bar--fixed": props.fixed
    }));
    const placeholderWrapStyle = computed(() => {
      const placeholderWrapStyle2 = {};
      if (state.isFocus || !state.isFocus && inputValue.value) {
        placeholderWrapStyle2.flexGrow = 0;
      } else if (!state.isFocus && !inputValue.value) {
        placeholderWrapStyle2.flexGrow = 1;
      }
      return placeholderWrapStyle2;
    });
    const actionStyle = computed(() => {
      const actionStyle2 = {};
      if (state.isFocus || !state.isFocus && inputValue.value) {
        actionStyle2.opacity = 1;
        actionStyle2.marginRight = `0`;
      } else if (!state.isFocus && !inputValue.value) {
        actionStyle2.opacity = 0;
        actionStyle2.marginRight = `-${(props.actionName.length + 1) * fontSize + fontSize / 2 + 10}px`;
      }
      if (props.showActionButton) {
        actionStyle2.opacity = 1;
        actionStyle2.marginRight = `0`;
      }
      return actionStyle2;
    });
    const clearIconStyle = computed(() => ({
      display: !inputValue.value.length ? "none" : "flex"
    }));
    const placeholderStyle = computed(() => ({
      visibility: !inputValue.value.length ? "visible" : "hidden"
    }));
    function handleFocus(event) {
      state.isFocus = true;
      emit("focus", event);
    }
    function handleBlur(event) {
      state.isFocus = false;
      emit("blur", event);
    }
    function handleInput(e) {
      inputValue.value = e.detail.value;
    }
    function handleClear(event) {
      if (typeof props.onClear === "function") {
        props.onClear(event);
      } else {
        inputValue.value = "";
      }
    }
    function handleConfirm(event) {
      emit("confirm", event);
    }
    function handleActionClick(event) {
      emit("action-click", event);
    }
    return {
      ...toRefs(props),
      ...toRefs(state),
      inputID,
      inputValue,
      rootClasses,
      actionStyle,
      clearIconStyle,
      placeholderStyle,
      placeholderWrapStyle,
      handleBlur,
      handleClear,
      handleFocus,
      handleInput,
      handleConfirm,
      handleActionClick
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$9 = createElementVNode, _toDisplayString$9 = toDisplayString, _normalizeStyle$6 = normalizeStyle, _openBlock$d = openBlock, _createElementBlock$d = createElementBlock, _createCommentVNode$7 = createCommentVNode, _mergeProps$d = mergeProps;

const _hoisted_1$b = { class: "at-search-bar__input-cnt" };
const _hoisted_2$9 = /*#__PURE__*/_createElementVNode$9("text", { class: "at-icon at-icon-search" }, null, -1 /* HOISTED */);
const _hoisted_3$8 = ["id", "type", "focus", "disabled", "maxlength", "value"];
const _hoisted_4$4 = /*#__PURE__*/_createElementVNode$9("text", { class: "at-icon at-icon-close-circle" }, null, -1 /* HOISTED */);
const _hoisted_5$3 = [
  _hoisted_4$4
];

function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$d(), _createElementBlock$d("view", _mergeProps$d(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$9("view", _hoisted_1$b, [
      _createElementVNode$9("view", {
        class: "at-search-bar__placeholder-wrap",
        style: _normalizeStyle$6(_ctx.placeholderWrapStyle)
      }, [
        _hoisted_2$9,
        _createElementVNode$9("text", {
          class: "at-search-bar__placeholder",
          style: _normalizeStyle$6(_ctx.placeholderStyle)
        }, _toDisplayString$9(_ctx.isFocus ? '' : _ctx.placeholder), 5 /* TEXT, STYLE */)
      ], 4 /* STYLE */),
      _createElementVNode$9("input", {
        class: "at-search-bar__input",
        id: _ctx.inputID,
        type: _ctx.inputType,
        focus: _ctx.isFocus,
        disabled: _ctx.disabled,
        maxlength: _ctx.maxLength,
        value: _ctx.inputValue,
        confirmType: "search",
        onBlur: _cache[0] || (_cache[0] = (...args) => (_ctx.handleBlur && _ctx.handleBlur(...args))),
        onInput: _cache[1] || (_cache[1] = (...args) => (_ctx.handleInput && _ctx.handleInput(...args))),
        onFocus: _cache[2] || (_cache[2] = (...args) => (_ctx.handleFocus && _ctx.handleFocus(...args))),
        onConfirm: _cache[3] || (_cache[3] = (...args) => (_ctx.handleConfirm && _ctx.handleConfirm(...args)))
      }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_3$8),
      (_ctx.inputValue)
        ? (_openBlock$d(), _createElementBlock$d("view", {
            key: 0,
            class: "at-search-bar__clear",
            style: _normalizeStyle$6(_ctx.clearIconStyle),
            onTouchstart: _cache[4] || (_cache[4] = (...args) => (_ctx.handleClear && _ctx.handleClear(...args)))
          }, _hoisted_5$3, 36 /* STYLE, HYDRATE_EVENTS */))
        : _createCommentVNode$7("v-if", true)
    ]),
    _createElementVNode$9("view", {
      class: "at-search-bar__action",
      style: _normalizeStyle$6(_ctx.actionStyle),
      onTap: _cache[5] || (_cache[5] = (...args) => (_ctx.handleActionClick && _ctx.handleActionClick(...args)))
    }, _toDisplayString$9(_ctx.actionName), 37 /* TEXT, STYLE, HYDRATE_EVENTS */)
  ], 16 /* FULL_PROPS */))
}


AtSearchBar.render = _sfc_render$d;

const AtSegmentedControl = defineComponent({
  name: "AtSegmentedControl",
  emits: {
    "click"(index) {
      return !!(typeof index === "number");
    }
  },
  props: {
    current: {
      type: Number,
      default: 0
    },
    color: {
      type: String,
      default: "#fff"
    },
    selectedColor: {
      type: String,
      default: "#6190E8"
    },
    fontSize: {
      type: Number,
      default: 28
    },
    disabled: Boolean,
    values: {
      type: Array,
      default: []
    }
  },
  setup(props, { emit }) {
    const rootClasses = computed(() => ({
      "at-segmented-control": true,
      "at-segmented-control--disabled": props.disabled
    }));
    const rootStyle = computed(() => ({
      borderColor: props.selectedColor
    }));
    const genItemClasses = computed(() => (i) => ({
      "at-segmented-control__item": true,
      "at-segmented-control__item--active": props.current === i
    }));
    const itemStyle = computed(() => ({
      color: props.selectedColor,
      fontSize: pxTransform(parseInt(`${props.fontSize}`)),
      borderColor: props.selectedColor,
      backgroundColor: props.color
    }));
    const selectedItemStyle = computed(() => ({
      color: props.color,
      fontSize: pxTransform(parseInt(`${props.fontSize}`)),
      borderColor: props.selectedColor,
      backgroundColor: props.selectedColor
    }));
    function handleClick(index) {
      if (props.disabled)
        return;
      emit("click", index);
    }
    return {
      values: toRef(props, "values"),
      rootStyle,
      rootClasses,
      genItemClasses,
      itemStyle,
      selectedItemStyle,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$6 = renderList, _Fragment$6 = Fragment, _openBlock$c = openBlock, _createElementBlock$c = createElementBlock, _toDisplayString$8 = toDisplayString, _normalizeClass$6 = normalizeClass, _normalizeStyle$5 = normalizeStyle, _mergeProps$c = mergeProps;

const _hoisted_1$a = ["onTap"];

function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$c(), _createElementBlock$c("view", _mergeProps$c(_ctx.$attrs, {
    class: _ctx.rootClasses,
    style: _ctx.rootStyle
  }), [
    (_openBlock$c(true), _createElementBlock$c(_Fragment$6, null, _renderList$6(_ctx.values, (value, i) => {
      return (_openBlock$c(), _createElementBlock$c("view", {
        key: i,
        class: _normalizeClass$6(_ctx.genItemClasses(i)),
        style: _normalizeStyle$5(_ctx.current === i ? _ctx.selectedItemStyle : _ctx.itemStyle),
        onTap: $event => (_ctx.handleClick(i))
      }, _toDisplayString$8(value), 47 /* TEXT, CLASS, STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_1$a))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtSegmentedControl.render = _sfc_render$c;

const { makeDimensionsProps: makeDimensionsProps$1, useDimensions: useDimensions$1 } = dimensionsFactory();
const AtSkeleton = defineComponent({
  name: "AtSkeleton",
  props: {
    ...makeElevationProps(),
    ...makeDimensionsProps$1(),
    tile: Boolean,
    loading: Boolean,
    boilerplate: Boolean,
    transition: String,
    type: String,
    types: {
      type: Object,
      default: () => ({})
    }
  },
  setup(props, { slots, attrs }) {
    const { dimensions } = useDimensions$1(props);
    const { elevationClasses } = useElevationClasses(props);
    const isLoading = computed(() => {
      return !("default" in slots) || props.loading;
    });
    const _attrs = computed(() => {
      if (!isLoading.value)
        return attrs;
      return !props.boilerplate ? {
        ...attrs,
        "aria-busy": true,
        "aria-live": "polite",
        role: "alert"
      } : {};
    });
    const classes = computed(() => ({
      ...elevationClasses.value,
      "at-skeleton--boilerplate": props.boilerplate,
      "at-skeleton--is-loading": isLoading.value,
      "at-skeleton--tile": props.tile,
      "at-skeleton": true
    }));
    const rootTypes = computed(() => ({
      ...props.types,
      actions: "button@2",
      article: "heading, paragraph",
      avatar: "avatar",
      button: "button",
      card: "image, card-heading",
      "card-avatar": "image, list-item-avatar",
      "card-heading": "heading",
      chip: "chip",
      "date-picker": "list-item, card-heading, divider, date-picker-options, date-picker-days, actions",
      "date-picker-options": "text, avatar@2",
      "date-picker-days": "avatar@28",
      heading: "heading",
      image: "image",
      "list-item": "text",
      "list-item-avatar": "avatar, text",
      "list-item-two-line": "sentences",
      "list-item-avatar-two-line": "avatar, sentences",
      "list-item-three-line": "paragraph",
      "list-item-avatar-three-line": "avatar, paragraph",
      paragraph: "text@3",
      sentences: "text@2",
      table: "table-heading, table-thead, table-tbody, table-tfoot",
      "table-heading": "heading, text",
      "table-thead": "heading@6",
      "table-tbody": "table-row-divider@6",
      "table-row-divider": "table-row, divider",
      "table-row": "table-cell@6",
      "table-cell": "text",
      "table-tfoot": "text@2, avatar@2",
      text: "text"
    }));
    function genBone(text, children) {
      const View = "view";
      return h(View, {
        class: `at-skeleton__${text} at-skeleton__bone`
      }, { default: () => children });
    }
    function genBones(bone) {
      const [type, length] = bone.split("@");
      const generator = () => genStructure(type);
      return Array.from({ length }).map(generator);
    }
    function genStructure(type) {
      let children = [];
      type = type || props.type || "";
      const bone = rootTypes.value[type] || "";
      if (type === bone) ; else if (type.indexOf(",") > -1)
        return mapBones(type);
      else if (type.indexOf("@") > -1)
        return genBones(type);
      else if (bone.indexOf(",") > -1)
        children = mapBones(bone);
      else if (bone.indexOf("@") > -1)
        children = genBones(bone);
      else if (bone)
        children.push(genStructure(bone));
      return [genBone(type, children)];
    }
    function genSkeleton() {
      const children = [];
      if (!isLoading.value)
        children.push(slots.default?.());
      else
        children.push(genStructure());
      if (!props.transition)
        return children;
      return h(Transition, {
        onAfterEnter: resetStyles,
        onBeforeEnter,
        onBeforeLeave,
        onLeaveCancelled: resetStyles
      }, { default: () => children });
    }
    function mapBones(bones) {
      return bones.replace(/\s/g, "").split(",").map(genStructure);
    }
    function onBeforeEnter(el) {
      resetStyles(el);
      if (!isLoading.value)
        return;
      el._initialStyle = {
        display: el.style.display,
        transition: el.style.transition
      };
      el.style.setProperty("transition", "none", "important");
    }
    function onBeforeLeave(el) {
      el.style.setProperty("display", "none", "important");
    }
    function resetStyles(el) {
      if (!el._initialStyle)
        return;
      el.style.display = el._initialStyle.display || "";
      el.style.transition = el._initialStyle.transition;
      delete el._initialStyle;
    }
    return () => {
      const View = "view";
      return h(View, mergeProps(_attrs.value, {
        class: classes.value,
        style: isLoading.value ? dimensions.value.style : void 0
      }), { default: () => [genSkeleton()] });
    };
  }
});

const AtSlider = defineComponent({
  name: "AtSlider",
  emits: ["change", "changing"],
  props: {
    min: {
      type: Number,
      default: 0
    },
    max: {
      type: Number,
      default: 100
    },
    step: {
      type: Number,
      default: 1
    },
    value: {
      type: Number,
      default: 0
    },
    disabled: Boolean,
    showValue: Boolean,
    activeColor: {
      type: String,
      default: "#6190e8"
    },
    blockSize: {
      type: Number,
      default: 28,
      validator: (val) => val >= 12 && val <= 28
    },
    blockColor: {
      type: String,
      default: "#ffffff"
    },
    backgroundColor: {
      type: String,
      default: "#e9e9e9"
    }
  },
  setup(props, { emit }) {
    const state = reactive({
      _value: clampNumber(props.value, props.min, props.max)
    });
    const precision = computed(() => 10 ** countDecimals(props.step));
    const rootClasses = computed(() => ({
      "at-slider": true,
      "at-slider--disabled": props.disabled
    }));
    function clampNumber(value, lower, upper) {
      return Math.max(lower, Math.min(upper, value));
    }
    function countDecimals(value) {
      if (Math.floor(value) === value)
        return 0;
      return value.toString().split(".")[1].length || 0;
    }
    function ensurePrecision(value) {
      return Math.round((value + Number.EPSILON) * precision.value) / precision.value;
    }
    function handleChanging(e) {
      const { _value } = state;
      let { value } = e.detail;
      value = ensurePrecision(value);
      if (value !== _value) {
        state._value = value;
      }
      emit("changing", value);
    }
    function handleChange(e) {
      let { value } = e.detail;
      value = ensurePrecision(value);
      state._value = value;
      emit("change", value);
    }
    watch(() => [
      props.value,
      props.min,
      props.max
    ], ([value, min, max]) => {
      state._value = clampNumber(value, min, max);
    });
    return {
      ...toRefs(props),
      value_: toRef(state, "_value"),
      rootClasses,
      handleChange,
      handleChanging
    };
  }
});

// Binding optimization for webpack code-split
const _createElementVNode$8 = createElementVNode, _toDisplayString$7 = toDisplayString, _openBlock$b = openBlock, _createElementBlock$b = createElementBlock, _createCommentVNode$6 = createCommentVNode, _mergeProps$b = mergeProps;

const _hoisted_1$9 = { class: "at-slider__inner" };
const _hoisted_2$8 = ["min", "max", "step", "value", "disabled", "blockSize", "blockColor", "activeColor", "backgroundColor"];
const _hoisted_3$7 = {
  key: 0,
  class: "at-slider__text"
};

function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$b(), _createElementBlock$b("view", _mergeProps$b(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$8("view", _hoisted_1$9, [
      _createElementVNode$8("slider", {
        min: _ctx.min,
        max: _ctx.max,
        step: _ctx.step,
        value: _ctx.value_,
        disabled: _ctx.disabled,
        blockSize: _ctx.blockSize,
        blockColor: _ctx.blockColor,
        activeColor: _ctx.activeColor,
        backgroundColor: _ctx.backgroundColor,
        onChange: _cache[0] || (_cache[0] = (...args) => (_ctx.handleChange && _ctx.handleChange(...args))),
        onChanging: _cache[1] || (_cache[1] = (...args) => (_ctx.handleChanging && _ctx.handleChanging(...args)))
      }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_2$8)
    ]),
    (_ctx.showValue)
      ? (_openBlock$b(), _createElementBlock$b("view", _hoisted_3$7, _toDisplayString$7(_ctx.value_), 1 /* TEXT */))
      : _createCommentVNode$6("v-if", true)
  ], 16 /* FULL_PROPS */))
}


AtSlider.render = _sfc_render$b;

const AtSteps = defineComponent({
  name: "AtSteps",
  emits: {
    "change": (current) => !!(typeof current === "number")
  },
  props: {
    current: {
      type: Number,
      default: 0
    },
    items: {
      type: Array,
      default: []
    }
  },
  setup(props, { emit }) {
    const genStepItemClasses = computed(() => (i) => ({
      "at-steps__item": true,
      "at-steps__item--active": i === props.current,
      "at-steps__item--inactive": i !== props.current
    }));
    const genItemStatusClasses = computed(() => (item) => ({
      "at-icon": true,
      "at-steps__single-icon": true,
      "at-icon-check-circle": item.status === "success",
      "at-icon-close-circle": item.status === "error",
      "at-steps__single-icon--success": item.status === "success",
      "at-steps__single-icon--error": item.status === "error"
    }));
    const genItemIconClasses = computed(() => (item) => ({
      "at-icon": true,
      "at-steps__circle-icon": true,
      [`at-icon-${item.icon?.value}`]: Boolean(item.icon && item.icon.value)
    }));
    const genItemIconStyle = (item, i) => {
      const iconInfo = props.current === i ? {
        value: item.icon.value,
        size: item.icon.size,
        color: item.icon.activeColor
      } : {
        value: item.icon.value,
        size: item.icon.size,
        color: item.icon.inactiveColor
      };
      const { iconStyle } = useIconStyle(iconInfo);
      return iconStyle.value;
    };
    function handleClick(current) {
      emit("change", current);
    }
    return {
      items: toRef(props, "items"),
      genItemIconClasses,
      genStepItemClasses,
      genItemStatusClasses,
      genItemIconStyle,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$5 = renderList, _Fragment$5 = Fragment, _openBlock$a = openBlock, _createElementBlock$a = createElementBlock, _createCommentVNode$5 = createCommentVNode, _normalizeClass$5 = normalizeClass, _normalizeStyle$4 = normalizeStyle, _toDisplayString$6 = toDisplayString, _createElementVNode$7 = createElementVNode, _mergeProps$a = mergeProps;

const _hoisted_1$8 = ["onTap"];
const _hoisted_2$7 = { class: "at-steps__circular-wrap" };
const _hoisted_3$6 = {
  key: 0,
  class: "at-steps__left-line"
};
const _hoisted_4$3 = {
  key: 2,
  class: "at-steps__circular"
};
const _hoisted_5$2 = {
  key: 1,
  class: "at-steps__num"
};
const _hoisted_6$1 = {
  key: 3,
  class: "at-steps__right-line"
};
const _hoisted_7$1 = { class: "at-steps__title" };
const _hoisted_8$1 = { class: "at-steps__desc" };

function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$a(), _createElementBlock$a("view", _mergeProps$a(_ctx.$attrs, { class: "at-steps" }), [
    (!!_ctx.items)
      ? (_openBlock$a(true), _createElementBlock$a(_Fragment$5, { key: 0 }, _renderList$5(_ctx.items, (item, i) => {
          return (_openBlock$a(), _createElementBlock$a("view", {
            key: `${item.title}-${i}`,
            class: _normalizeClass$5(_ctx.genStepItemClasses(i)),
            onTap: $event => (_ctx.handleClick(i))
          }, [
            _createElementVNode$7("view", _hoisted_2$7, [
              (i !== 0)
                ? (_openBlock$a(), _createElementBlock$a("view", _hoisted_3$6))
                : _createCommentVNode$5("v-if", true),
              (item.status)
                ? (_openBlock$a(), _createElementBlock$a("view", {
                    key: 1,
                    class: _normalizeClass$5(_ctx.genItemStatusClasses(item))
                  }, null, 2 /* CLASS */))
                : (_openBlock$a(), _createElementBlock$a("view", _hoisted_4$3, [
                    (item.icon)
                      ? (_openBlock$a(), _createElementBlock$a("text", {
                          key: 0,
                          class: _normalizeClass$5(_ctx.genItemIconClasses(item)),
                          style: _normalizeStyle$4(_ctx.genItemIconStyle(item, i))
                        }, null, 6 /* CLASS, STYLE */))
                      : (_openBlock$a(), _createElementBlock$a("text", _hoisted_5$2, _toDisplayString$6(i+1), 1 /* TEXT */))
                  ])),
              (i !== _ctx.items.length - 1)
                ? (_openBlock$a(), _createElementBlock$a("view", _hoisted_6$1))
                : _createCommentVNode$5("v-if", true)
            ]),
            _createElementVNode$7("view", _hoisted_7$1, _toDisplayString$6(item.title), 1 /* TEXT */),
            _createElementVNode$7("view", _hoisted_8$1, _toDisplayString$6(item.desc), 1 /* TEXT */)
          ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1$8))
        }), 128 /* KEYED_FRAGMENT */))
      : _createCommentVNode$5("v-if", true)
  ], 16 /* FULL_PROPS */))
}


AtSteps.render = _sfc_render$a;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
    nativeMin = Math.min;

/**
 * The base implementation of `_.inRange` which doesn't coerce arguments.
 *
 * @private
 * @param {number} number The number to check.
 * @param {number} start The start of the range.
 * @param {number} end The end of the range.
 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
 */
function baseInRange(number, start, end) {
  return number >= nativeMin(start, end) && number < nativeMax(start, end);
}

/** Used to match a single whitespace character. */
var reWhitespace = /\s/;

/**
 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
 * character of `string`.
 *
 * @private
 * @param {string} string The string to inspect.
 * @returns {number} Returns the index of the last non-whitespace character.
 */
function trimmedEndIndex(string) {
  var index = string.length;

  while (index-- && reWhitespace.test(string.charAt(index))) {}
  return index;
}

/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;

/**
 * The base implementation of `_.trim`.
 *
 * @private
 * @param {string} string The string to trim.
 * @returns {string} Returns the trimmed string.
 */
function baseTrim(string) {
  return string
    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
    : string;
}

/** Used as references for various `Number` constants. */
var NAN = 0 / 0;

/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;

/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;

/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;

/**
 * Converts `value` to a number.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to process.
 * @returns {number} Returns the number.
 * @example
 *
 * _.toNumber(3.2);
 * // => 3.2
 *
 * _.toNumber(Number.MIN_VALUE);
 * // => 5e-324
 *
 * _.toNumber(Infinity);
 * // => Infinity
 *
 * _.toNumber('3.2');
 * // => 3.2
 */
function toNumber(value) {
  if (typeof value == 'number') {
    return value;
  }
  if (isSymbol(value)) {
    return NAN;
  }
  if (isObject$4(value)) {
    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
    value = isObject$4(other) ? (other + '') : other;
  }
  if (typeof value != 'string') {
    return value === 0 ? value : +value;
  }
  value = baseTrim(value);
  var isBinary = reIsBinary.test(value);
  return (isBinary || reIsOctal.test(value))
    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
    : (reIsBadHex.test(value) ? NAN : +value);
}

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
    MAX_INTEGER = 1.7976931348623157e+308;

/**
 * Converts `value` to a finite number.
 *
 * @static
 * @memberOf _
 * @since 4.12.0
 * @category Lang
 * @param {*} value The value to convert.
 * @returns {number} Returns the converted number.
 * @example
 *
 * _.toFinite(3.2);
 * // => 3.2
 *
 * _.toFinite(Number.MIN_VALUE);
 * // => 5e-324
 *
 * _.toFinite(Infinity);
 * // => 1.7976931348623157e+308
 *
 * _.toFinite('3.2');
 * // => 3.2
 */
function toFinite(value) {
  if (!value) {
    return value === 0 ? value : 0;
  }
  value = toNumber(value);
  if (value === INFINITY || value === -INFINITY) {
    var sign = (value < 0 ? -1 : 1);
    return sign * MAX_INTEGER;
  }
  return value === value ? value : 0;
}

/**
 * Checks if `n` is between `start` and up to, but not including, `end`. If
 * `end` is not specified, it's set to `start` with `start` then set to `0`.
 * If `start` is greater than `end` the params are swapped to support
 * negative ranges.
 *
 * @static
 * @memberOf _
 * @since 3.3.0
 * @category Number
 * @param {number} number The number to check.
 * @param {number} [start=0] The start of the range.
 * @param {number} end The end of the range.
 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
 * @see _.range, _.rangeRight
 * @example
 *
 * _.inRange(3, 2, 4);
 * // => true
 *
 * _.inRange(4, 8);
 * // => true
 *
 * _.inRange(4, 2);
 * // => false
 *
 * _.inRange(2, 2);
 * // => false
 *
 * _.inRange(1.2, 2);
 * // => true
 *
 * _.inRange(5.2, 4);
 * // => false
 *
 * _.inRange(-3, -2, -6);
 * // => true
 */
function inRange(number, start, end) {
  start = toFinite(start);
  if (end === undefined) {
    end = start;
    start = 0;
  } else {
    end = toFinite(end);
  }
  number = toNumber(number);
  return baseInRange(number, start, end);
}

const AtSwipeActionOptions = defineComponent({
  name: "AtSwipeActionOptions",
  emits: {
    "queryed-dom": ({ width }) => {
      return !!(width && typeof width === "number");
    }
  },
  props: {
    componentId: {
      type: String,
      default: ""
    },
    options: {
      type: Array,
      default: []
    }
  },
  setup(props, { emit }) {
    watch(() => props.options, (options, preOptions) => {
      if (options !== preOptions) {
        trrigerOptionsDomUpadte();
      }
    });
    function trrigerOptionsDomUpadte() {
      delayQuerySelector(this, `#swipeActionOptions-${props.componentId}`, 100).then((res) => {
        const arr = [...res];
        if (Boolean(arr[0])) {
          emit("queryed-dom", arr[0]);
        }
      });
    }
    onMounted(() => {
      trrigerOptionsDomUpadte();
    });
    return {
      componentId: toRef(props, "componentId")
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$5 = renderSlot, _mergeProps$9 = mergeProps, _openBlock$9 = openBlock, _createElementBlock$9 = createElementBlock;

const _hoisted_1$7 = ["id"];

function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$9(), _createElementBlock$9("view", _mergeProps$9(_ctx.$attrs, {
    id: `swipeActionOptions-${_ctx.componentId}`,
    class: "at-swipe-action__options"
  }), [
    _renderSlot$5(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */, _hoisted_1$7))
}


AtSwipeActionOptions.render = _sfc_render$9;

const AtSwipeAction = defineComponent({
  name: "AtSwipeAction",
  components: {
    AtSwipeActionOptions
  },
  emits: {
    "opened": null,
    "closed": null,
    "click": (item, index, event) => {
      return !!(item && item.text && typeof item.text === "string" && typeof index === "number" && typeof event === "object");
    }
  },
  props: {
    isOpened: Boolean,
    disabled: Boolean,
    autoClose: Boolean,
    options: {
      type: Array,
      default: () => []
    }
  },
  setup(props, { emit }) {
    const endValue = ref(0);
    const startX = ref(0);
    const startY = ref(0);
    const maxOffsetSize = ref(0);
    const isMoving = ref(false);
    const isTouching = ref(false);
    const domInfo = ref({});
    const state = reactive({
      componentId: uuid(),
      offsetSize: 0,
      _isOpened: !!props.isOpened
    });
    const transformStyle = computed(() => {
      const transform = computeTransform(state.offsetSize);
      return transform ? { transform } : {};
    });
    const actionContentClasses = computed(() => ({
      "at-swipe-action__content": true,
      "animation": !isTouching.value
    }));
    const genActionItemClasses = computed(() => (item) => ({
      "at-swipe-action__option": true,
      [`${item.className}`]: Boolean(item.className)
    }));
    watch(() => props.isOpened, (isOpened) => {
      if (isOpened !== state._isOpened) {
        _reset(!!isOpened);
      }
    });
    function getDomInfo() {
      return Promise.all([
        delayGetClientRect({
          delayTime: 0,
          selectorStr: `#swipeAction-${state.componentId}`
        }),
        delayGetScrollOffset({ delayTime: 0 })
      ]).then(([rect, scrollOffset]) => {
        if (rect[0]) {
          rect[0].top += scrollOffset[0].scrollTop;
          rect[0].bottom += scrollOffset[0].scrollTop;
          domInfo.value = rect[0];
        }
      });
    }
    function _reset(isOpened) {
      isMoving.value = false;
      isTouching.value = false;
      if (isOpened) {
        endValue.value = -maxOffsetSize.value;
        state._isOpened = true;
        state.offsetSize = -maxOffsetSize.value;
      } else {
        endValue.value = 0;
        state.offsetSize = 0;
        state._isOpened = false;
      }
    }
    function computeTransform(value) {
      return value ? `translate3d(${value}px,0,0)` : null;
    }
    function handleOpened(event) {
      if (state._isOpened) {
        emit("opened", event);
      }
    }
    function handleClosed(event) {
      if (!state._isOpened) {
        emit("closed", event);
      }
    }
    function handleTouchstart(e) {
      if (props.disabled)
        return;
      const { clientX, clientY } = e.touches[0];
      getDomInfo();
      startX.value = clientX;
      startY.value = clientY;
      isTouching.value = true;
    }
    function handleTouchmove(e) {
      if (isEmpty(domInfo.value))
        return;
      const { top, bottom, left, right } = domInfo.value;
      const { clientX, clientY, pageX, pageY } = e.touches[0];
      const x = Math.abs(clientX - startX.value);
      const y = Math.abs(clientY - startY.value);
      const inDom = inRange(pageX, left, right) && inRange(pageY, top, bottom);
      if (!isMoving.value && inDom) {
        isMoving.value = y === 0 || x / y >= Number.parseFloat(Math.tan(45 * Math.PI / 180).toFixed(2));
      }
      if (isTouching.value && isMoving.value) {
        e.preventDefault();
        const offsetSize = clientX - startX.value;
        const isRight = offsetSize > 0;
        if (state.offsetSize === 0 && isRight)
          return;
        const value = endValue.value + offsetSize;
        state.offsetSize = value >= 0 ? 0 : value;
      }
    }
    function handleTouchend(event) {
      if (props.disabled)
        return;
      isTouching.value = false;
      const { offsetSize } = state;
      endValue.value = offsetSize;
      const breakpoint = maxOffsetSize.value / 2;
      const absOffsetSize = Math.abs(offsetSize);
      if (absOffsetSize > breakpoint) {
        _reset(true);
        handleOpened(event);
        return;
      }
      _reset(false);
      handleClosed(event);
    }
    function handleDomInfo({ width }) {
      const { _isOpened } = state;
      maxOffsetSize.value = width;
      _reset(_isOpened);
    }
    function handleClick(item, index, event) {
      emit("click", item, index, event);
      if (props.autoClose) {
        _reset(false);
        handleClosed(event);
      }
    }
    return {
      options: toRef(props, "options"),
      componentId: toRef(state, "componentId"),
      transformStyle,
      actionContentClasses,
      genActionItemClasses,
      handleClick,
      handleDomInfo,
      handleTouchend,
      handleTouchmove,
      handleTouchstart
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$4 = renderSlot, _normalizeClass$4 = normalizeClass, _normalizeStyle$3 = normalizeStyle, _createElementVNode$6 = createElementVNode, _renderList$4 = renderList, _Fragment$4 = Fragment, _openBlock$8 = openBlock, _createElementBlock$8 = createElementBlock, _toDisplayString$5 = toDisplayString, _resolveComponent$1 = resolveComponent, _withCtx$1 = withCtx, _createBlock$1 = createBlock, _createCommentVNode$4 = createCommentVNode, _mergeProps$8 = mergeProps;

const _hoisted_1$6 = ["id"];
const _hoisted_2$6 = ["onTap"];
const _hoisted_3$5 = { class: "option__text" };

function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_swipe_action_options = _resolveComponent$1("at-swipe-action-options");

  return (_openBlock$8(), _createElementBlock$8("view", _mergeProps$8(_ctx.$attrs, {
    id: `swipeAction-${_ctx.componentId}`,
    class: "at-swipe-action",
    onTouchend: _cache[0] || (_cache[0] = (...args) => (_ctx.handleTouchend && _ctx.handleTouchend(...args))),
    onTouchmove: _cache[1] || (_cache[1] = (...args) => (_ctx.handleTouchmove && _ctx.handleTouchmove(...args))),
    onTouchstart: _cache[2] || (_cache[2] = (...args) => (_ctx.handleTouchstart && _ctx.handleTouchstart(...args)))
  }), [
    _createElementVNode$6("view", {
      class: _normalizeClass$4(_ctx.actionContentClasses),
      style: _normalizeStyle$3(_ctx.transformStyle)
    }, [
      _renderSlot$4(_ctx.$slots, "default")
    ], 6 /* CLASS, STYLE */),
    (Array.isArray(_ctx.options) && _ctx.options.length > 0)
      ? (_openBlock$8(), _createBlock$1(_component_at_swipe_action_options, {
          key: 0,
          options: _ctx.options,
          componentId: _ctx.componentId,
          onQueryedDom: _ctx.handleDomInfo
        }, {
          default: _withCtx$1(() => [
            (_openBlock$8(true), _createElementBlock$8(_Fragment$4, null, _renderList$4(_ctx.options, (item, key) => {
              return (_openBlock$8(), _createElementBlock$8("view", {
                key: `${item.text}-${key}`,
                class: _normalizeClass$4(_ctx.genActionItemClasses(item)),
                style: _normalizeStyle$3(item.style),
                onTap: $event => (_ctx.handleClick(item, key, $event))
              }, [
                _createElementVNode$6("text", _hoisted_3$5, _toDisplayString$5(item.text), 1 /* TEXT */)
              ], 46 /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_2$6))
            }), 128 /* KEYED_FRAGMENT */))
          ]),
          _: 1 /* STABLE */
        }, 8 /* PROPS */, ["options", "componentId", "onQueryedDom"]))
      : _createCommentVNode$4("v-if", true)
  ], 16 /* FULL_PROPS */, _hoisted_1$6))
}


AtSwipeAction.render = _sfc_render$8;

const AtSwitch = defineComponent({
  name: "AtSwitch",
  emits: {
    "update:checked": (value) => !!(typeof value === "boolean")
  },
  props: {
    title: {
      type: String,
      default: ""
    },
    color: {
      type: String,
      default: "#6190e8"
    },
    border: Boolean,
    checked: Boolean,
    disabled: Boolean
  },
  setup(props, { emit }) {
    const modelChecked = useModelValue(props, emit, "checked");
    const rootClasses = computed(() => ({
      "at-switch": true,
      "at-switch--without-border": !props.border
    }));
    const containerClasses = computed(() => ({
      "at-switch__container": true,
      "at-switch--disabled": props.disabled
    }));
    function handleChange(event) {
      const { value, checked } = event.detail;
      const state = typeof value === "undefined" ? checked : value;
      modelChecked.value = state;
    }
    return {
      ...toRefs(props),
      modelChecked,
      rootClasses,
      containerClasses,
      handleChange
    };
  }
});

// Binding optimization for webpack code-split
const _toDisplayString$4 = toDisplayString, _createElementVNode$5 = createElementVNode, _normalizeClass$3 = normalizeClass, _mergeProps$7 = mergeProps, _openBlock$7 = openBlock, _createElementBlock$7 = createElementBlock;

const _hoisted_1$5 = { class: "at-switch__title" };
const _hoisted_2$5 = /*#__PURE__*/_createElementVNode$5("view", { class: "at-switch__mask" }, null, -1 /* HOISTED */);
const _hoisted_3$4 = ["color", "checked"];

function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$7(), _createElementBlock$7("view", _mergeProps$7(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$5("view", _hoisted_1$5, _toDisplayString$4(_ctx.title), 1 /* TEXT */),
    _createElementVNode$5("view", {
      class: _normalizeClass$3(_ctx.containerClasses)
    }, [
      _hoisted_2$5,
      _createElementVNode$5("switch", {
        class: "at-switch__switch",
        color: _ctx.color,
        checked: _ctx.modelChecked,
        onChange: _cache[0] || (_cache[0] = (...args) => (_ctx.handleChange && _ctx.handleChange(...args)))
      }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_3$4)
    ], 2 /* CLASS */)
  ], 16 /* FULL_PROPS */))
}


AtSwitch.render = _sfc_render$7;

const AtTabBar = defineComponent({
  name: "AtTabBar",
  components: {
    AtBadge
  },
  emits: {
    "click": (index) => !!(typeof index === "number")
  },
  props: {
    fixed: Boolean,
    current: {
      type: Number,
      default: 0
    },
    iconSize: {
      type: [Number, String],
      default: 24,
      validator: (prop) => {
        return typeof parseInt(`${prop}`) === "number";
      }
    },
    fontSize: {
      type: [Number, String],
      default: 14,
      validator: (prop) => {
        return typeof parseInt(`${prop}`) === "number";
      }
    },
    color: {
      type: String,
      default: "#333"
    },
    selectedColor: {
      type: String,
      default: "#6190E8"
    },
    backgroundColor: {
      type: String,
      default: "#fff"
    },
    tabList: {
      type: Array,
      default: []
    }
  },
  setup(props, { emit }) {
    const rootStyle = computed(() => ({
      backgroundColor: props.backgroundColor
    }));
    const titleStyle = computed(() => ({
      fontSize: props.fontSize ? convertToUnit(props.fontSize) : ""
    }));
    const imgStyle = computed(() => ({
      width: convertToUnit(props.iconSize),
      height: convertToUnit(props.iconSize)
    }));
    const rootClasses = computed(() => ({
      "at-tab-bar": true,
      "at-tab-bar--fixed": props.fixed
    }));
    const genItemClasses = (i) => ({
      "at-tab-bar__item": true,
      "at-tab-bar__item--active": props.current === i
    });
    const genImgClasses = (selected) => ({
      "at-tab-bar__inner-img": true,
      "at-tab-bar__inner-img--inactive": !selected
    });
    const genImgSrc = (item, i) => {
      return props.current === i ? item.selectedImage || item.image : item.image;
    };
    const genItemStyle = (i) => {
      return props.current === i ? { color: props.selectedColor } : { color: props.color };
    };
    function genIconInfo(item, i) {
      const iconInfo = {
        prefixClass: item.iconPrefixClass,
        value: item.iconType,
        color: props.color,
        size: props.iconSize
      };
      if (props.current === i) {
        iconInfo.value = item.selectedIconType || item.iconType;
        iconInfo.color = props.selectedColor;
      }
      return iconInfo;
    }
    const genIconClasses = (item, i) => {
      const iconInfo = genIconInfo(item, i);
      const { iconClasses } = useIconClasses(iconInfo, true);
      return iconClasses.value;
    };
    const genIconStyle = (item, i) => {
      const iconInfo = genIconInfo(item, i);
      const { iconStyle } = useIconStyle(iconInfo);
      return iconStyle.value;
    };
    function handleClick(index) {
      emit("click", index);
    }
    return {
      tabList: toRef(props, "tabList"),
      current: toRef(props, "current"),
      imgStyle,
      rootStyle,
      titleStyle,
      genItemStyle,
      rootClasses,
      genItemClasses,
      genIconStyle,
      genIconClasses,
      genImgClasses,
      genImgSrc,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$3 = renderList, _Fragment$3 = Fragment, _openBlock$6 = openBlock, _createElementBlock$6 = createElementBlock, _normalizeClass$2 = normalizeClass, _normalizeStyle$2 = normalizeStyle, _createElementVNode$4 = createElementVNode, _resolveComponent = resolveComponent, _withCtx = withCtx, _createBlock = createBlock, _createCommentVNode$3 = createCommentVNode, _toDisplayString$3 = toDisplayString, _createVNode = createVNode, _mergeProps$6 = mergeProps;

const _hoisted_1$4 = ["onTap"];
const _hoisted_2$4 = { class: "at-tab-bar__icon" };
const _hoisted_3$3 = { class: "at-tab-bar__icon" };
const _hoisted_4$2 = ["src"];
const _hoisted_5$1 = ["src"];

function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_at_badge = _resolveComponent("at-badge");

  return (_openBlock$6(), _createElementBlock$6("view", _mergeProps$6(_ctx.$attrs, {
    class: _ctx.rootClasses,
    style: _ctx.rootStyle
  }), [
    (_openBlock$6(true), _createElementBlock$6(_Fragment$3, null, _renderList$3(_ctx.tabList, (item, i) => {
      return (_openBlock$6(), _createElementBlock$6("view", {
        key: `${item.title}-${i}`,
        class: _normalizeClass$2(_ctx.genItemClasses(i)),
        style: _normalizeStyle$2(_ctx.genItemStyle(i)),
        onTap: $event => (_ctx.handleClick(i))
      }, [
        (item.iconType)
          ? (_openBlock$6(), _createBlock(_component_at_badge, {
              key: 0,
              dot: !!item.dot,
              value: item.text,
              maxValue: Number(item.max)
            }, {
              default: _withCtx(() => [
                _createElementVNode$4("view", _hoisted_2$4, [
                  _createElementVNode$4("text", {
                    class: _normalizeClass$2(_ctx.genIconClasses(item, i)),
                    style: _normalizeStyle$2(_ctx.genIconStyle(item, i))
                  }, null, 6 /* CLASS, STYLE */)
                ])
              ]),
              _: 2 /* DYNAMIC */
            }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["dot", "value", "maxValue"]))
          : (item.image)
            ? (_openBlock$6(), _createBlock(_component_at_badge, {
                key: 1,
                dot: !!item.dot,
                value: item.text,
                maxValue: Number(item.max)
              }, {
                default: _withCtx(() => [
                  _createElementVNode$4("view", _hoisted_3$3, [
                    _createElementVNode$4("image", {
                      mode: "widthFix",
                      src: _ctx.genImgSrc(item, i),
                      class: _normalizeClass$2(_ctx.genImgClasses(_ctx.current === i)),
                      style: _normalizeStyle$2(_ctx.imgStyle)
                    }, null, 14 /* CLASS, STYLE, PROPS */, _hoisted_4$2),
                    _createElementVNode$4("image", {
                      mode: "widthFix",
                      src: _ctx.genImgSrc(item, i),
                      class: _normalizeClass$2(_ctx.genImgClasses(_ctx.current !== i)),
                      style: _normalizeStyle$2(_ctx.imgStyle)
                    }, null, 14 /* CLASS, STYLE, PROPS */, _hoisted_5$1)
                  ])
                ]),
                _: 2 /* DYNAMIC */
              }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["dot", "value", "maxValue"]))
            : _createCommentVNode$3("v-if", true),
        _createElementVNode$4("view", null, [
          _createVNode(_component_at_badge, {
            dot: Boolean(item.iconType || item.image) ? false : !!item.dot,
            value: Boolean(item.iconType || item.image) ? '' : item.text,
            maxValue: Boolean(item.iconType || item.image) ? 0 : Number(item.max)
          }, {
            default: _withCtx(() => [
              _createElementVNode$4("view", {
                class: "at-tab-bar__title",
                style: _normalizeStyle$2(_ctx.titleStyle)
              }, _toDisplayString$3(item.title), 5 /* TEXT, STYLE */)
            ]),
            _: 2 /* DYNAMIC */
          }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["dot", "value", "maxValue"])
        ])
      ], 46 /* CLASS, STYLE, PROPS, HYDRATE_EVENTS */, _hoisted_1$4))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtTabBar.render = _sfc_render$6;

const ENV = Taro.getEnv();
const MIN_DISTANCE = 100;
const MAX_INTERVAL = 10;
const AtTabs = defineComponent({
  name: "AtTabs",
  emits: {
    "click": (index, event) => {
      return !!(typeof index === "number" && typeof event === "object");
    }
  },
  props: {
    tabDirection: {
      type: String,
      default: "horizontal"
    },
    height: String,
    current: {
      type: Number,
      default: 0
    },
    scroll: Boolean,
    animated: {
      type: Boolean,
      default: true
    },
    swipeable: {
      type: Boolean,
      default: true
    },
    tabList: {
      type: Array,
      default: []
    }
  },
  setup(props, { emit }) {
    const tabId = ref(uuid());
    const _touchDot = ref(0);
    const _timer = ref(null);
    const _interval = ref(0);
    const _isMoving = ref(false);
    const tabHeaderRef = ref(null);
    const state = reactive({
      scrollLeft: 0,
      scrollTop: 0,
      scrollIntoView: ""
    });
    const scrollX = computed(() => props.tabDirection === "horizontal");
    const scrollY = computed(() => props.tabDirection === "vertical");
    const rootClasses = computed(() => ({
      [`at-tabs--${props.tabDirection}`]: true,
      "at-tabs--scroll": props.scroll,
      [`at-tabs--${ENV}`]: true,
      "at-tabs": true
    }));
    const heightStyle = computed(() => scrollY.value ? { height: props.height } : {});
    const underlineStyle = computed(() => ({
      height: scrollY.value ? `${props.tabList.length * 100}%` : "1PX",
      width: scrollX.value ? `${props.tabList.length * 100}%` : "1PX"
    }));
    const bodyStyle = computed(() => {
      const transformStyle = scrollX.value ? `translate3d(-${props.current * 100}%, 0px, 0px)` : `translate3d(0px, -${props.current * 100}%, 0px)`;
      const bodyStyle2 = {
        ...heightStyle.value,
        transform: transformStyle,
        WebkitTransform: transformStyle
      };
      if (!props.animated) {
        bodyStyle2.transition = "unset";
      }
      return bodyStyle2;
    });
    const genTabItemClasses = computed(() => (idx) => ({
      "at-tabs__item": true,
      "at-tabs__item--active": props.current === idx
    }));
    function updateState(idx) {
      if (props.scroll) {
        if (ENV !== Taro.ENV_TYPE.WEB) {
          const index = Math.max(idx - 1, 0);
          state.scrollIntoView = `tab${tabId.value}${index}`;
        } else {
          const index = Math.max(idx - 1, 0);
          const prevTabItem = tabHeaderRef.value.$el.children[index];
          if (prevTabItem) {
            state.scrollTop = prevTabItem.offsetTop;
            state.scrollLeft = prevTabItem.offsetLeft;
          }
        }
      }
    }
    function handleClick(index, event) {
      emit("click", index, event);
    }
    function handleTouchstart(e) {
      if (!props.swipeable || scrollY.value)
        return;
      _touchDot.value = e.touches[0].pageX;
      _timer.value = setInterval(() => {
        _interval.value++;
      }, 100);
    }
    function handleTouchmove(e) {
      if (!props.swipeable || scrollY.value)
        return;
      const touchMove = e.touches[0].pageX;
      const moveDistance = touchMove - _touchDot.value;
      const maxIndex = props.tabList.length;
      if (!_isMoving.value && _interval.value < MAX_INTERVAL && _touchDot.value > 20) {
        if (props.current + 1 < maxIndex && moveDistance <= -MIN_DISTANCE) {
          _isMoving.value = true;
          handleClick(props.current + 1, e);
        } else if (props.current - 1 >= 0 && moveDistance >= MIN_DISTANCE) {
          _isMoving.value = true;
          handleClick(props.current - 1, e);
        }
      }
    }
    function handleTouchend() {
      if (!props.swipeable || scrollY.value)
        return;
      clearInterval(_timer.value);
      _interval.value = 0;
      _isMoving.value = false;
    }
    watch(() => props.current, (current) => {
      updateState(current);
    });
    onMounted(() => {
      updateState(props.current);
    });
    return {
      ...toRefs(props),
      ...toRefs(state),
      tabId,
      scrollX,
      scrollY,
      bodyStyle,
      heightStyle,
      underlineStyle,
      tabHeaderRef,
      rootClasses,
      genTabItemClasses,
      handleClick,
      handleTouchend,
      handleTouchmove,
      handleTouchstart
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$2 = renderList, _Fragment$2 = Fragment, _openBlock$5 = openBlock, _createElementBlock$5 = createElementBlock, _toDisplayString$2 = toDisplayString, _createElementVNode$3 = createElementVNode, _normalizeClass$1 = normalizeClass, _normalizeStyle$1 = normalizeStyle, _renderSlot$3 = renderSlot, _mergeProps$5 = mergeProps;

const _hoisted_1$3 = ["id", "scrollX", "scrollY", "scrollTop", "scrollLeft", "scrollIntoView"];
const _hoisted_2$3 = ["id", "onTap"];
const _hoisted_3$2 = { style: {"white-space":"nowrap"} };
const _hoisted_4$1 = /*#__PURE__*/_createElementVNode$3("view", { class: "at-tabs__item-underline" }, null, -1 /* HOISTED */);
const _hoisted_5 = ["id"];
const _hoisted_6 = ["id", "onTap"];
const _hoisted_7 = { style: {"white-space":"nowrap"} };
const _hoisted_8 = /*#__PURE__*/_createElementVNode$3("view", { class: "at-tabs__item-underline" }, null, -1 /* HOISTED */);

function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$5(), _createElementBlock$5("view", _mergeProps$5(_ctx.$attrs, {
    class: _ctx.rootClasses,
    style: _ctx.heightStyle
  }), [
    (_ctx.scroll)
      ? (_openBlock$5(), _createElementBlock$5("scroll-view", {
          key: 0,
          class: "at-tabs__header",
          scrollWithAnimation: true,
          id: _ctx.tabId,
          ref: (el) => _ctx.tabHeaderRef = el,
          style: _normalizeStyle$1(_ctx.heightStyle),
          scrollX: _ctx.scrollX,
          scrollY: _ctx.scrollY,
          scrollTop: _ctx.scrollTop,
          scrollLeft: _ctx.scrollLeft,
          scrollIntoView: _ctx.scrollIntoView
        }, [
          (_openBlock$5(true), _createElementBlock$5(_Fragment$2, null, _renderList$2(_ctx.tabList, (item, idx) => {
            return (_openBlock$5(), _createElementBlock$5("view", {
              key: `${item.title}-${idx}`,
              id: `tab${_ctx.tabId}${idx}`,
              class: _normalizeClass$1(_ctx.genTabItemClasses(idx)),
              onTap: $event => (_ctx.handleClick(idx, $event))
            }, [
              _createElementVNode$3("text", _hoisted_3$2, _toDisplayString$2(item.title), 1 /* TEXT */),
              _hoisted_4$1
            ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_2$3))
          }), 128 /* KEYED_FRAGMENT */))
        ], 12 /* STYLE, PROPS */, _hoisted_1$3))
      : (_openBlock$5(), _createElementBlock$5("view", {
          key: 1,
          id: _ctx.tabId,
          class: "at-tabs__header"
        }, [
          (_openBlock$5(true), _createElementBlock$5(_Fragment$2, null, _renderList$2(_ctx.tabList, (item, idx) => {
            return (_openBlock$5(), _createElementBlock$5("view", {
              key: `${item.title}-${idx}`,
              id: `tab${_ctx.tabId}${idx}`,
              class: _normalizeClass$1(_ctx.genTabItemClasses(idx)),
              onTap: $event => (_ctx.handleClick(idx, $event))
            }, [
              _createElementVNode$3("text", _hoisted_7, _toDisplayString$2(item.title), 1 /* TEXT */),
              _hoisted_8
            ], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_6))
          }), 128 /* KEYED_FRAGMENT */))
        ], 8 /* PROPS */, _hoisted_5)),
    _createElementVNode$3("view", {
      class: "at-tabs__body",
      style: _normalizeStyle$1(_ctx.bodyStyle),
      onTouchend: _cache[0] || (_cache[0] = (...args) => (_ctx.handleTouchend && _ctx.handleTouchend(...args))),
      onTouchmove: _cache[1] || (_cache[1] = (...args) => (_ctx.handleTouchmove && _ctx.handleTouchmove(...args))),
      onTouchstart: _cache[2] || (_cache[2] = (...args) => (_ctx.handleTouchstart && _ctx.handleTouchstart(...args)))
    }, [
      _createElementVNode$3("view", {
        class: "at-tabs__underline",
        style: _normalizeStyle$1(_ctx.underlineStyle)
      }, null, 4 /* STYLE */),
      _renderSlot$3(_ctx.$slots, "default")
    ], 36 /* STYLE, HYDRATE_EVENTS */)
  ], 16 /* FULL_PROPS */))
}


AtTabs.render = _sfc_render$5;

const AtTabsPane = defineComponent({
  name: "AtTabsPane",
  props: {
    tabDirection: {
      type: String,
      default: "horizontal"
    },
    index: {
      type: Number,
      default: 0
    },
    current: {
      type: Number,
      default: 0
    }
  },
  setup(props) {
    const rootClasses = computed(() => ({
      "at-tabs-pane--active": props.index === props.current,
      "at-tabs-pane--inactive": props.index !== props.current,
      "at-tabs-pane--vertical": props.tabDirection === "vertical",
      "at-tabs-pane": true
    }));
    return {
      rootClasses
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$2 = renderSlot, _mergeProps$4 = mergeProps, _openBlock$4 = openBlock, _createElementBlock$4 = createElementBlock;

function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$4(), _createElementBlock$4("view", _mergeProps$4(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _renderSlot$2(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtTabsPane.render = _sfc_render$4;

const SIZE_CLASS = {
  normal: "normal",
  small: "small"
};
const TYPE_CLASS = {
  primary: "primary"
};
const AtTag = defineComponent({
  name: "AtTag",
  emits: {
    "click": (tagInfo, e) => {
      return !!(tagInfo && typeof tagInfo.name === "string" && typeof tagInfo.active === "boolean");
    }
  },
  props: {
    size: {
      type: String,
      default: "normal",
      validator: (val) => ["normal", "small"].includes(val)
    },
    type: {
      type: String,
      default: "",
      validator: (val) => ["", "primary"].includes(val)
    },
    name: {
      type: String,
      default: ""
    },
    circle: Boolean,
    active: Boolean,
    disabled: Boolean
  },
  setup(props, { emit }) {
    const rootClasses = computed(() => ({
      [`at-tag--${SIZE_CLASS[props.size]}`]: SIZE_CLASS[props.size],
      [`at-tag--${props.type}`]: TYPE_CLASS[props.type],
      "at-tag--disabled": props.disabled,
      "at-tag--circle": props.circle,
      "at-tag--active": props.active,
      "at-tag": true
    }));
    function handleClick(event) {
      if (!props.disabled) {
        emit("click", {
          name: props.name,
          active: Boolean(props.active)
        }, event);
      }
    }
    return {
      rootClasses,
      handleClick
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot$1 = renderSlot, _mergeProps$3 = mergeProps, _openBlock$3 = openBlock, _createElementBlock$3 = createElementBlock;

function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$3(), _createElementBlock$3("view", _mergeProps$3(_ctx.$attrs, {
    class: _ctx.rootClasses,
    onTap: _cache[0] || (_cache[0] = (...args) => (_ctx.handleClick && _ctx.handleClick(...args)))
  }), [
    _renderSlot$1(_ctx.$slots, "default")
  ], 16 /* FULL_PROPS */))
}


AtTag.render = _sfc_render$3;

const AtTextarea = defineComponent({
  name: "AtTextarea",
  emits: [
    "blur",
    "focus",
    "confirm",
    "linechange",
    "update:modelValue"
  ],
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    maxLength: {
      type: [String, Number],
      default: 200
    },
    focus: Boolean,
    fixed: Boolean,
    disabled: Boolean,
    autoFocus: Boolean,
    showConfirmBar: Boolean,
    count: { type: Boolean, default: true },
    textOverflowForbidden: { type: Boolean, default: true },
    placeholder: { type: String, default: "" },
    placeholderClass: { type: String, default: "" },
    placeholderStyle: { type: String, default: "" },
    selectionStart: { type: Number, default: -1 },
    selectionEnd: { type: Number, default: -1 },
    height: { type: [String, Number], default: 100 },
    cursorSpacing: { type: Number, default: 100 }
  },
  setup(props, { emit }) {
    const ENV = Taro.getEnv();
    const isAlipay = ENV === Taro.ENV_TYPE.ALIPAY;
    const inputValue = useModelValue(props, emit);
    const maxlength = computed(() => parseInt(props.maxLength.toString()));
    const actualMaxLength = computed(() => getMaxLength(maxlength.value, Boolean(props.textOverflowForbidden)));
    const textareaStyle = computed(() => props.height ? { height: `${pxTransform(Number(props.height))}` } : {});
    const rootClasses = computed(() => ({
      "at-textarea": true,
      [`at-textarea--${ENV}`]: true,
      "at-textarea--error": maxlength.value < inputValue.value.length
    }));
    const placeholderClasses = computed(() => props.placeholderClass ? `placeholder ${props.placeholderClass}` : "placeholder");
    const showCount = computed(() => isAlipay ? { showCount: props.count } : {});
    function getMaxLength(maxLength, textOverflowForbidden) {
      if (!textOverflowForbidden) {
        return maxLength + 500;
      }
      return maxLength;
    }
    function handleInput(event) {
      inputValue.value = event.detail.value;
    }
    function handleFocus(event) {
      emit("focus", event);
    }
    function handleBlur(event) {
      emit("blur", event);
    }
    function handleConfirm(event) {
      emit("confirm", event);
    }
    function handleLinechange(event) {
      emit("linechange", event);
    }
    return {
      ...toRefs(props),
      isAlipay,
      inputValue,
      showCount,
      maxlength,
      actualMaxLength,
      rootClasses,
      textareaStyle,
      placeholderClasses,
      handleBlur,
      handleInput,
      handleFocus,
      handleConfirm,
      handleLinechange
    };
  }
});

// Binding optimization for webpack code-split
const _mergeProps$2 = mergeProps, _createElementVNode$2 = createElementVNode, _toDisplayString$1 = toDisplayString, _openBlock$2 = openBlock, _createElementBlock$2 = createElementBlock, _createCommentVNode$2 = createCommentVNode;

const _hoisted_1$2 = ["value", "fixed", "focus", "disabled", "autoFocus", "showConfirmBar", "maxlength", "cursorSpacing", "selectionEnd", "selectionStart", "placeholder", "placeholderStyle", "placeholderClass"];
const _hoisted_2$2 = {
  key: 0,
  class: "at-textarea__counter"
};

function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$2(), _createElementBlock$2("view", _mergeProps$2(_ctx.$attrs, { class: _ctx.rootClasses }), [
    _createElementVNode$2("textarea", _mergeProps$2({ class: "at-textarea__textarea" }, _ctx.showCount, {
      style: _ctx.textareaStyle,
      value: _ctx.inputValue,
      fixed: _ctx.fixed,
      focus: _ctx.focus,
      disabled: _ctx.disabled,
      autoFocus: _ctx.autoFocus,
      showConfirmBar: _ctx.showConfirmBar,
      maxlength: _ctx.actualMaxLength,
      cursorSpacing: _ctx.cursorSpacing,
      selectionEnd: _ctx.selectionEnd,
      selectionStart: _ctx.selectionStart,
      placeholder: _ctx.placeholder,
      placeholderStyle: _ctx.placeholderStyle,
      placeholderClass: _ctx.placeholderClasses,
      onBlur: _cache[0] || (_cache[0] = (...args) => (_ctx.handleBlur && _ctx.handleBlur(...args))),
      onFocus: _cache[1] || (_cache[1] = (...args) => (_ctx.handleFocus && _ctx.handleFocus(...args))),
      onInput: _cache[2] || (_cache[2] = (...args) => (_ctx.handleInput && _ctx.handleInput(...args))),
      onConfirm: _cache[3] || (_cache[3] = (...args) => (_ctx.handleConfirm && _ctx.handleConfirm(...args))),
      onLinechange: _cache[4] || (_cache[4] = (...args) => (_ctx.handleLinechange && _ctx.handleLinechange(...args)))
    }), null, 16 /* FULL_PROPS */, _hoisted_1$2),
    (_ctx.count && !_ctx.isAlipay)
      ? (_openBlock$2(), _createElementBlock$2("view", _hoisted_2$2, _toDisplayString$1(`${_ctx.inputValue.length} / ${_ctx.maxlength}`), 1 /* TEXT */))
      : _createCommentVNode$2("v-if", true)
  ], 16 /* FULL_PROPS */))
}


AtTextarea.render = _sfc_render$2;

const AtTimeline = defineComponent({
  name: "AtTimeline",
  props: {
    pending: Boolean,
    items: {
      type: Array,
      default: []
    }
  },
  setup(props) {
    const rootClasses = computed(() => ({
      "at-timeline": true,
      "at-timeline--pending": props.pending
    }));
    const genIconClasses = (item) => ({
      "at-icon": true,
      [`at-icon-${item.icon}`]: Boolean(item.icon)
    });
    const genItemRootClasses = (item) => ({
      "at-timeline-item": true,
      [`${`at-timeline-item--${item.color}`}`]: Boolean(item.color)
    });
    const genDotClasses = (item) => ({
      "at-timeline-item__icon": Boolean(item.icon),
      "at-timeline-item__dot": !Boolean(item.icon)
    });
    return {
      items: toRef(props, "items"),
      rootClasses,
      genDotClasses,
      genIconClasses,
      genItemRootClasses
    };
  }
});

// Binding optimization for webpack code-split
const _renderList$1 = renderList, _Fragment$1 = Fragment, _openBlock$1 = openBlock, _createElementBlock$1 = createElementBlock, _createElementVNode$1 = createElementVNode, _normalizeClass = normalizeClass, _createCommentVNode$1 = createCommentVNode, _toDisplayString = toDisplayString, _mergeProps$1 = mergeProps;

const _hoisted_1$1 = /*#__PURE__*/_createElementVNode$1("view", { class: "at-timeline-item__tail" }, null, -1 /* HOISTED */);
const _hoisted_2$1 = { class: "at-timeline-item__content" };
const _hoisted_3$1 = { class: "at-timeline-item__content-item" };

function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock$1(), _createElementBlock$1("view", _mergeProps$1(_ctx.$attrs, { class: _ctx.rootClasses }), [
    (_openBlock$1(true), _createElementBlock$1(_Fragment$1, null, _renderList$1(_ctx.items, (item, index) => {
      return (_openBlock$1(), _createElementBlock$1("view", {
        key: `at-timeline-item-${index}`,
        class: _normalizeClass(_ctx.genItemRootClasses(item))
      }, [
        _hoisted_1$1,
        _createElementVNode$1("view", {
          class: _normalizeClass(_ctx.genDotClasses(item))
        }, [
          (item.icon)
            ? (_openBlock$1(), _createElementBlock$1("text", {
                key: 0,
                class: _normalizeClass(_ctx.genIconClasses(item))
              }, null, 2 /* CLASS */))
            : _createCommentVNode$1("v-if", true)
        ], 2 /* CLASS */),
        _createElementVNode$1("view", _hoisted_2$1, [
          _createElementVNode$1("view", _hoisted_3$1, _toDisplayString(item.title), 1 /* TEXT */),
          (item.content && item.content.length > 0)
            ? (_openBlock$1(true), _createElementBlock$1(_Fragment$1, { key: 0 }, _renderList$1(item.content, (content, subIndex) => {
                return (_openBlock$1(), _createElementBlock$1("view", {
                  key: subIndex,
                  class: "at-timeline-item__content-item at-timeline-item__content--sub"
                }, _toDisplayString(content), 1 /* TEXT */))
              }), 128 /* KEYED_FRAGMENT */))
            : _createCommentVNode$1("v-if", true)
        ])
      ], 2 /* CLASS */))
    }), 128 /* KEYED_FRAGMENT */))
  ], 16 /* FULL_PROPS */))
}


AtTimeline.render = _sfc_render$1;

const { useDimensions, makeDimensionsProps } = dimensionsFactory();
const AtVirtualScroll = defineComponent({
  name: "AtVirtualScroll",
  emits: ["reach-top", "reach-bottom"],
  props: {
    ...makeDimensionsProps(),
    bench: {
      type: [Number, String],
      default: 0
    },
    itemHeight: {
      type: [Number, String],
      required: true
    },
    items: {
      type: Array,
      default: () => []
    },
    scrollToItem: [Number, String],
    reachTopThreshold: {
      type: [Number, String],
      default: 50
    },
    reachBottomThreshold: {
      type: [Number, String],
      default: 50
    }
  },
  setup(props) {
    const first = ref(0);
    const last = ref(0);
    const scrollTop = ref(0);
    const elRef = ref(null);
    const anchor = computed(() => ({ scrollIntoView: `item-${props.scrollToItem || 0}` }));
    const __bench = computed(() => {
      return parseInt(`${props.bench}`, 10);
    });
    const item_height = computed(() => {
      return parseInt(`${props.itemHeight}`, 10);
    });
    const firstToRender = computed(() => {
      return Math.max(0, first.value - __bench.value);
    });
    const lastToRender = computed(() => {
      return Math.min(props.items.length, last.value + __bench.value);
    });
    const scrollContainerStyle = computed(() => ({
      height: convertToUnit(props.items.length * item_height.value)
    }));
    const genScrollItemStyle = computed(() => (i) => ({
      top: convertToUnit((i + firstToRender.value) * item_height.value)
    }));
    const { dimensions } = useDimensions(props);
    watch(() => props.height, updateFirstAndLast);
    watch(() => props.itemHeight, updateFirstAndLast);
    watch(() => props.scrollToItem, (index, _prevIndex) => {
      let parsedIndex = parseInt(`${index || 0}`, 10);
      parsedIndex = Math.min(props.items.length - 1, Math.max(0, parsedIndex));
      scrollTop.value = parsedIndex * item_height.value;
      updateFirstAndLast();
    });
    onMounted(() => {
      if (typeof props.scrollToItem !== "undefined") {
        let parsedIndex = parseInt(`${props.scrollToItem}`, 10);
        scrollTop.value = parsedIndex * item_height.value;
        updateFirstAndLast();
      } else {
        last.value = getLast(0);
      }
    });
    function getFirst() {
      return Math.floor(scrollTop.value / item_height.value);
    }
    function getLast(first2) {
      const height = parseInt(`${props.height}`, 10) || elRef.value.$el.clientHeight;
      return first2 + Math.ceil(height / item_height.value);
    }
    function updateFirstAndLast() {
      first.value = getFirst();
      last.value = getLast(first.value);
    }
    function handleScroll(e) {
      scrollTop.value = e.detail.scrollTop;
      updateFirstAndLast();
    }
    return {
      ...toRefs(props),
      anchor,
      elRef,
      scrollTop,
      dimensions,
      item_height,
      lastToRender,
      firstToRender,
      genScrollItemStyle,
      scrollContainerStyle,
      handleScroll
    };
  }
});

// Binding optimization for webpack code-split
const _renderSlot = renderSlot, _openBlock = openBlock, _createElementBlock = createElementBlock, _createCommentVNode = createCommentVNode, _renderList = renderList, _Fragment = Fragment, _normalizeStyle = normalizeStyle, _createElementVNode = createElementVNode, _mergeProps = mergeProps;

const _hoisted_1 = {
  key: 0,
  class: "at-virtual-scroll__header"
};
const _hoisted_2 = ["upperThreshold", "lowerThreshold"];
const _hoisted_3 = ["id"];
const _hoisted_4 = {
  key: 0,
  class: "at-virtual-scroll__footer"
};

function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock(), _createElementBlock("view", null, [
    ('header' in _ctx.$slots)
      ? (_openBlock(), _createElementBlock("view", _hoisted_1, [
          _renderSlot(_ctx.$slots, "header")
        ]))
      : _createCommentVNode("v-if", true),
    _createElementVNode("scroll-view", _mergeProps({ class: "at-virtual-scroll" }, _ctx.anchor, {
      ref: el => _ctx.elRef = el,
      style: _ctx.dimensions.style,
      scrollY: true,
      scrollWithAnimation: true,
      upperThreshold: parseInt(`${_ctx.reachTopThreshold}`, 10),
      lowerThreshold: parseInt(`${_ctx.reachBottomThreshold}`, 10),
      onScroll: _cache[0] || (_cache[0] = (...args) => (_ctx.handleScroll && _ctx.handleScroll(...args))),
      onScrolltoupper: _cache[1] || (_cache[1] = $event => (_ctx.$emit('reach-top', $event))),
      onScrolltolower: _cache[2] || (_cache[2] = $event => (_ctx.$emit('reach-bottom', $event)))
    }), [
      _createElementVNode("view", null, [
        _createElementVNode("view", {
          class: "at-virtual-scroll__container",
          style: _normalizeStyle(_ctx.scrollContainerStyle)
        }, [
          (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.items.slice(_ctx.firstToRender, _ctx.lastToRender), (item, index) => {
            return (_openBlock(), _createElementBlock("view", {
              class: "at-virtual-scroll__item",
              key: _ctx.firstToRender + index,
              id: `item-${_ctx.firstToRender + index}`,
              style: _normalizeStyle(_ctx.genScrollItemStyle(index))
            }, [
              _renderSlot(_ctx.$slots, "default", {
                index: _ctx.firstToRender + index,
                item: item
              })
            ], 12 /* STYLE, PROPS */, _hoisted_3))
          }), 128 /* KEYED_FRAGMENT */))
        ], 4 /* STYLE */),
        ('footer' in _ctx.$slots)
          ? (_openBlock(), _createElementBlock("view", _hoisted_4, [
              _renderSlot(_ctx.$slots, "footer")
            ]))
          : _createCommentVNode("v-if", true)
      ])
    ], 16 /* FULL_PROPS */, _hoisted_2)
  ]))
}


AtVirtualScroll.render = _sfc_render;

const allComponents = {
  AtAccordion,
  AtActionSheet,
  AtActionSheetItem,
  AtActivityIndicator,
  AtAvatar,
  AtBadge,
  AtButton,
  AtCalendar,
  AtCard,
  AtCheckbox,
  AtCountdown,
  AtCurtain,
  AtDivider,
  AtDrawer,
  AtFab,
  AtFlex,
  AtFlexItem,
  AtFloatLayout,
  AtForm,
  AtGrid,
  AtIcon,
  AtImagePicker,
  AtIndexes,
  AtInput,
  AtInputNumber,
  AtList,
  AtListItem,
  AtLoadMore,
  AtLoading,
  AtMessage,
  AtModal,
  AtModalAction,
  AtModalContent: _sfc_main$1,
  AtModalHeader: _sfc_main,
  AtNavBar,
  AtNoticebar,
  AtPagination,
  AtProgress,
  AtRadio,
  AtRange,
  AtRate,
  AtSearchBar,
  AtSegmentedControl,
  AtSkeleton,
  AtSlider,
  AtSteps,
  AtSwipeAction,
  AtSwitch,
  AtTabBar,
  AtTabs,
  AtTabsPane,
  AtTag,
  AtTextarea,
  AtTimeline,
  AtToast,
  AtVirtualScroll
};
const createUI = (components = allComponents) => {
  const install = (app) => {
    for (const key in components) {
      const component = components[key];
      app.component(key, component);
    }
  };
  return { install };
};

export { AtAccordion, AtActionSheet, AtActionSheetItem, AtActivityIndicator, AtAvatar, AtBadge, AtButton, AtCalendar, AtCard, AtCheckbox, AtCountdown, AtCurtain, AtDivider, AtDrawer, AtFab, AtFlex, AtFlexItem, AtFloatLayout, AtForm, AtGrid, AtIcon, AtImagePicker, AtIndexes, AtInput, AtInputNumber, AtList, AtListItem, AtLoadMore, AtLoading, AtMessage, AtModal, AtModalAction, _sfc_main$1 as AtModalContent, _sfc_main as AtModalHeader, AtNavBar, AtNoticebar, AtPagination, AtProgress, AtRadio, AtRange, AtRate, AtSearchBar, AtSegmentedControl, AtSkeleton, AtSlider, AtSteps, AtSwipeAction, AtSwitch, AtTabBar, AtTabs, AtTabsPane, AtTag, AtTextarea, AtTimeline, AtToast, AtVirtualScroll, createUI };
//# sourceMappingURL=index.es.js.map