(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{1429:function(t,e,n){},235:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var o=n(3),r=Object.prototype.hasOwnProperty;function l(t,e){return Object.keys(e).forEach((function(n){!function(t,e,n){var c=e[n];Object(o.b)(c)&&(r.call(t,n)&&Object(o.c)(c)&&"function"!=typeof c?t[n]=l(Object(t[n]),e[n]):t[n]=c)}(t,e,n)})),t}},25:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return l}));var o=/-(\w)/g;function r(t){return t.replace(o,(function(t,e){return e.toUpperCase()}))}function l(t,e){void 0===e&&(e=2);for(var n=t+"";n.length2?n-2:0),r=2;rn&&e>10?"horizontal":n>e&&n>10?"vertical":"")},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0}}});function $(t){var e=t.ref,n=t.afterPortal;return h.default.extend({props:{getContainer:[String,Function]},watch:{getContainer:"portal"},mounted:function(){this.getContainer&&this.portal()},methods:{portal:function(){var t,o,r=this.getContainer,l=e?this.$refs[e]:this.$el;r?t="string"==typeof(o=r)?document.querySelector(o):o():this.$parent&&(t=this.$parent.$el),t&&t!==l.parentNode&&t.appendChild(l),n&&n.call(this)}}})}var B=n(3),I=!1;if(!B.d)try{var j={};Object.defineProperty(j,"passive",{get:function(){I=!0}}),window.addEventListener("test-passive",null,j)}catch(t){}function N(t,e,n,o){void 0===o&&(o=!1),B.d||t.addEventListener(e,n,!!I&&{capture:!1,passive:o})}function z(t,e,n){B.d||t.removeEventListener(e,n)}function D(t){t.stopPropagation()}function A(t,e){("boolean"!=typeof t.cancelable||t.cancelable)&&t.preventDefault(),e&&D(t)}function E(t){function e(){this.binded||(t.call(this,N,!0),this.binded=!0)}function n(){this.binded&&(t.call(this,z,!1),this.binded=!1)}return{mounted:e,activated:e,deactivated:n,beforeDestroy:n}}var F=h.default.extend({mixins:[E((function(t,e){this.handlePopstate(e&&this.closeOnPopstate)}))],props:{closeOnPopstate:Boolean},data:function(){return{bindStatus:!1}},watch:{closeOnPopstate:function(t){this.handlePopstate(t)}},methods:{handlePopstate:function(t){this.$isServer||this.bindStatus!==t&&(this.bindStatus=t,(t?N:z)(window,"popstate",this.close))}}}),M=Object(c.a)("overlay"),L=M[0],P=M[1];function V(t){A(t,!0)}function R(t,e,n,r){var style=Object(o.a)({zIndex:e.zIndex},e.customStyle);return Object(B.b)(e.duration)&&(style.animationDuration=e.duration+"s"),t("transition",{attrs:{name:"van-fade"}},[t("div",l()([{directives:[{name:"show",value:e.show}],style:style,class:[P(),e.className],on:{touchmove:V}},m(r,!0)]),[n.default&&n.default()])])}R.props={show:Boolean,duration:[Number,String],className:null,customStyle:Object,zIndex:{type:[Number,String],default:1}};var H,W=L(R),_={className:"",customStyle:{}};function Y(){if(O.top){var t=O.top.vm;t.$emit("click-overlay"),t.closeOnClickOverlay&&(t.onClickOverlay?t.onClickOverlay():t.close())}}function X(){if(H||(H=y(W,{on:{click:Y}})),O.top){var t=O.top,e=t.vm,n=t.config,r=e.$el;r&&r.parentNode?r.parentNode.insertBefore(H.$el,r):document.body.appendChild(H.$el),Object(o.a)(H,_,n,{show:!0})}else H.show=!1}function U(t){var e=O.stack;e.length&&(O.top.vm===t?(e.pop(),X()):O.stack=e.filter((function(e){return e.vm!==t})))}var K=/scroll|auto/i;function G(element,t){void 0===t&&(t=window);for(var e=element;e&&"HTML"!==e.tagName&&1===e.nodeType&&e!==t;){var n=window.getComputedStyle(e).overflowY;if(K.test(n)){if("BODY"!==e.tagName)return e;var o=window.getComputedStyle(e.parentNode).overflowY;if(K.test(o))return e}e=e.parentNode}return t}function Z(element){return"scrollTop"in element?element.scrollTop:element.pageYOffset}function J(element,t){"scrollTop"in element?element.scrollTop=t:element.scrollTo(element.scrollX,t)}function Q(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function tt(t){J(window,t),J(document.body,t)}function et(element){return(element===window?0:element.getBoundingClientRect().top)+Q()}var it={mixins:[T,F,$({afterPortal:function(){this.overlay&&X()}})],props:{value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[Number,String],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}},data:function(){return{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(t){var e=t?"open":"close";this.inited=this.inited||this.value,this[e](),this.$emit(e)},overlay:"renderOverlay"},mounted:function(){this.value&&this.open()},activated:function(){this.value&&this.open()},beforeDestroy:function(){this.close(),this.getContainer&&this.$parent&&this.$parent.$el&&this.$parent.$el.appendChild(this.$el)},deactivated:function(){this.close()},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(O.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.lockScroll&&(N(document,"touchstart",this.touchStart),N(document,"touchmove",this.onTouchMove),O.lockCount||document.body.classList.add("van-overflow-hidden"),O.lockCount++))},close:function(){this.opened&&(this.lockScroll&&(O.lockCount--,z(document,"touchstart",this.touchStart),z(document,"touchmove",this.onTouchMove),O.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,U(this),this.$emit("input",!1))},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",n=G(t.target,this.$el),o=n.scrollHeight,r=n.offsetHeight,l=n.scrollTop,c="11";0===l?c=r>=o?"00":"01":l+r>=o&&(c="10"),"11"===c||"vertical"!==this.direction||parseInt(c,2)&parseInt(e,2)||A(t,!0)},renderOverlay:function(){var t=this;!this.$isServer&&this.value&&this.$nextTick((function(){var e,n;t.updateZIndex(t.overlay?1:0),t.overlay?(e=t,n={zIndex:O.zIndex++,duration:t.duration,className:t.overlayClass,customStyle:t.overlayStyle},O.stack.some((function(t){return t.vm===e}))||(O.stack.push({vm:e,config:n}),X())):U(t)}))},updateZIndex:function(t){void 0===t&&(t=0),this.$el.style.zIndex=++O.zIndex+t}}},nt=n(730),st=Object(c.a)("info"),ot=st[0],at=st[1];function lt(t,e,n,o){var r=e.dot,c=e.info,h=Object(B.b)(c)&&""!==c;if(r||h)return t("div",l()([{class:at({dot:r})},m(o,!0)]),[r?"":e.info])}lt.props={dot:Boolean,info:[Number,String]};var ct=ot(lt),ut=Object(c.a)("image"),ht=ut[0],ft=ut[1],pt=ht({props:{src:String,fit:String,alt:String,round:Boolean,width:[Number,String],height:[Number,String],radius:[Number,String],lazyLoad:Boolean,showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0}},data:function(){return{loading:!0,error:!1}},watch:{src:function(){this.loading=!0,this.error=!1}},computed:{style:function(){var style={};return Object(B.b)(this.width)&&(style.width=Object(nt.a)(this.width)),Object(B.b)(this.height)&&(style.height=Object(nt.a)(this.height)),Object(B.b)(this.radius)&&(style.overflow="hidden",style.borderRadius=Object(nt.a)(this.radius)),style}},created:function(){var t=this.$Lazyload;t&&(t.$on("loaded",this.onLazyLoaded),t.$on("error",this.onLazyLoadError))},beforeDestroy:function(){var t=this.$Lazyload;t&&(t.$off("loaded",this.onLazyLoaded),t.$off("error",this.onLazyLoadError))},methods:{onLoad:function(t){this.loading=!1,this.$emit("load",t)},onLazyLoaded:function(t){t.el===this.$refs.image&&this.loading&&this.onLoad()},onLazyLoadError:function(t){t.el!==this.$refs.image||this.error||this.onError()},onError:function(t){this.error=!0,this.loading=!1,this.$emit("error",t)},onClick:function(t){this.$emit("click",t)},genPlaceholder:function(){var t=this.$createElement;return this.loading&&this.showLoading?t("div",{class:ft("loading")},[this.slots("loading")||t(yt,{attrs:{name:"photo-o",size:"22"}})]):this.error&&this.showError?t("div",{class:ft("error")},[this.slots("error")||t(yt,{attrs:{name:"warning-o",size:"22"}})]):void 0},genImage:function(){var t=this.$createElement,e={class:ft("img"),attrs:{alt:this.alt},style:{objectFit:this.fit}};if(!this.error)return this.lazyLoad?t("img",l()([{ref:"image",directives:[{name:"lazy",value:this.src}]},e])):t("img",l()([{attrs:{src:this.src},on:{load:this.onLoad,error:this.onError}},e]))}},render:function(){var t=arguments[0];return t("div",{class:ft({round:this.round}),style:this.style,on:{click:this.onClick}},[this.genImage(),this.genPlaceholder()])}}),mt=Object(c.a)("icon"),vt=mt[0],gt=mt[1];function bt(t,e,n,o){var r,c=!!(r=e.name)&&-1!==r.indexOf("/");return t(e.tag,l()([{class:[e.classPrefix,c?"":e.classPrefix+"-"+e.name],style:{color:e.color,fontSize:Object(nt.a)(e.size)}},m(o,!0)]),[n.default&&n.default(),c&&t(pt,{class:gt("image"),attrs:{fit:"contain",src:e.name,showLoading:!1}}),t(ct,{attrs:{dot:e.dot,info:e.info}})])}bt.props={dot:Boolean,name:String,size:[Number,String],info:[Number,String],color:String,tag:{type:String,default:"i"},classPrefix:{type:String,default:gt()}};var yt=vt(bt),kt=Object(c.a)("popup"),St=kt[0],xt=kt[1],Ct=St({mixins:[it],props:{round:Boolean,duration:Number,closeable:Boolean,transition:String,safeAreaInsetBottom:Boolean,closeIcon:{type:String,default:"cross"},closeIconPosition:{type:String,default:"top-right"},position:{type:String,default:"center"},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}},beforeCreate:function(){var t=this,e=function(e){return function(n){return t.$emit(e,n)}};this.onClick=e("click"),this.onOpened=e("opened"),this.onClosed=e("closed")},render:function(){var t,e=arguments[0];if(this.shouldRender){var n=this.round,o=this.position,r=this.duration,l=this.transition||("center"===o?"van-fade":"van-popup-slide-"+o),style={};return Object(B.b)(r)&&(style.transitionDuration=r+"s"),e("transition",{attrs:{name:l},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[e("div",{directives:[{name:"show",value:this.value}],style:style,class:xt((t={round:n},t[o]=o,t["safe-area-inset-bottom"]=this.safeAreaInsetBottom,t)),on:{click:this.onClick}},[this.slots(),this.closeable&&e(yt,{attrs:{role:"button",tabindex:"0",name:this.closeIcon},class:xt("close-icon",this.closeIconPosition),on:{click:this.close}})])])}}}),wt=Object(c.a)("loading"),Ot=wt[0],Tt=wt[1];function $t(t,e){if("spinner"===e.type){for(var n=[],i=0;i<12;i++)n.push(t("i"));return n}return t("svg",{class:Tt("circular"),attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])}function Bt(t,e,n){if(n.default){var style=e.textSize&&{fontSize:Object(nt.a)(e.textSize)};return t("span",{class:Tt("text"),style:style},[n.default()])}}function It(t,e,n,o){var r=e.color,c=e.size,h=e.type,style={color:r};if(c){var d=Object(nt.a)(c);style.width=d,style.height=d}return t("div",l()([{class:Tt([h,{vertical:e.vertical}])},m(o,!0)]),[t("span",{class:Tt("spinner",h),style:style},[$t(t,e)]),Bt(t,e,n)])}It.props={color:String,size:[Number,String],vertical:Boolean,textSize:[Number,String],type:{type:String,default:"circular"}};var jt=Ot(It),Nt=Object(c.a)("action-sheet"),zt=Nt[0],Dt=Nt[1];function At(t,e,n,o){var title=e.title,r=e.cancelText;function c(){v(o,"input",!1),v(o,"cancel")}var h=e.description&&t("div",{class:Dt("description")},[e.description]);return t(Ct,l()([{class:Dt(),attrs:{position:"bottom",round:e.round,value:e.value,overlay:e.overlay,duration:e.duration,lazyRender:e.lazyRender,lockScroll:e.lockScroll,getContainer:e.getContainer,closeOnClickOverlay:e.closeOnClickOverlay,safeAreaInsetBottom:e.safeAreaInsetBottom}},m(o,!0)]),[function(){if(title)return t("div",{class:[Dt("header"),C]},[title,t(yt,{attrs:{name:"close"},class:Dt("close"),on:{click:c}})])}(),h,e.actions&&e.actions.map((function(n,r){var l=n.disabled||n.loading;return t("button",{class:[Dt("item",{disabled:l}),n.className,x],style:{color:n.color},on:{click:function(t){t.stopPropagation(),n.disabled||n.loading||(n.callback&&n.callback(n),v(o,"select",n,r),e.closeOnClickAction&&v(o,"input",!1))}}},[n.loading?t(jt,{attrs:{size:"20px"}}):[t("span",{class:Dt("name")},[n.name]),n.subname&&t("span",{class:Dt("subname")},[n.subname])]])})),function(){if(n.default)return t("div",{class:Dt("content")},[n.default()])}(),function(){if(r)return t("button",{class:Dt("cancel"),on:{click:c}},[r])}()])}At.props=Object(o.a)({},it.props,{title:String,actions:Array,duration:Number,cancelText:String,description:String,getContainer:[String,Function],closeOnClickAction:Boolean,round:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});var Et=zt(At);function Ft(t){return t=t.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(t)||/^0[0-9-]{10,13}$/.test(t)}var Mt=n(235);function Lt(t){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pt(t){return Array.isArray(t)?t.map((function(t){return Pt(t)})):"object"===Lt(t)?Object(Mt.a)({},t):t}var Vt={title:String,loading:Boolean,showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,allowHtml:{type:Boolean,default:!0},visibleItemCount:{type:Number,default:5},itemHeight:{type:Number,default:44},swipeDuration:{type:Number,default:1e3}};function Rt(t,e,n){return Math.min(Math.max(t,e),n)}var Ht=Object(c.a)("picker-column"),Wt=Ht[0],_t=Ht[1];function qt(option){return Object(B.c)(option)&&option.disabled}var Yt=Wt({mixins:[T],props:{valueKey:String,allowHtml:Boolean,className:String,itemHeight:Number,defaultIndex:Number,swipeDuration:Number,visibleItemCount:Number,initialOptions:{type:Array,default:function(){return[]}}},data:function(){return{offset:0,duration:0,options:Pt(this.initialOptions),currentIndex:this.defaultIndex}},created:function(){this.$parent.children&&this.$parent.children.push(this),this.setIndex(this.currentIndex)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1)},watch:{defaultIndex:function(){this.setIndex(this.defaultIndex)}},computed:{count:function(){return this.options.length},baseOffset:function(){return this.itemHeight*(this.visibleItemCount-1)/2}},methods:{onTouchStart:function(t){if(this.touchStart(t),this.moving){var e=function(element){var style=window.getComputedStyle(element),t=style.transform||style.webkitTransform,e=t.slice(7,t.length-1).split(", ")[5];return Number(e)}(this.$refs.wrapper);this.offset=Math.min(0,e-this.baseOffset),this.startOffset=this.offset}else this.startOffset=this.offset;this.duration=0,this.transitionEndTrigger=null,this.touchStartTime=Date.now(),this.momentumOffset=this.startOffset},onTouchMove:function(t){this.moving=!0,this.touchMove(t),"vertical"===this.direction&&A(t,!0),this.offset=Rt(this.startOffset+this.deltaY,-this.count*this.itemHeight,this.itemHeight);var e=Date.now();e-this.touchStartTime>300&&(this.touchStartTime=e,this.momentumOffset=this.offset)},onTouchEnd:function(){var t=this.offset-this.momentumOffset,e=Date.now()-this.touchStartTime;if(e<300&&Math.abs(t)>15)this.momentum(t,e);else{var n=this.getIndexByOffset(this.offset);this.moving=!1,this.duration=200,this.setIndex(n,!0)}},onTransitionEnd:function(){this.stopMomentum()},onClickItem:function(t){this.moving||(this.duration=200,this.setIndex(t,!0))},adjustIndex:function(t){for(var i=t=Rt(t,0,this.count);i=0;e--)if(!qt(this.options[e]))return e},getOptionText:function(option){return Object(B.c)(option)&&this.valueKey in option?option[this.valueKey]:option},setIndex:function(t,e){var n=this;t=this.adjustIndex(t)||0,this.offset=-t*this.itemHeight;var o=function(){t!==n.currentIndex&&(n.currentIndex=t,e&&n.$emit("change",t))};this.moving?this.transitionEndTrigger=o:o()},setValue:function(t){for(var e=this.options,i=0;in&&(e=e.slice(0,n),t.value=e),e}},onInput:function(t){t.target.composing||this.$emit("input",this.format(t.target))},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.readonly&&this.blur()},onBlur:function(t){this.focused=!1,this.$emit("blur",t),de()},onClick:function(t){this.$emit("click",t)},onClickLeftIcon:function(t){this.$emit("click-left-icon",t)},onClickRightIcon:function(t){this.$emit("click-right-icon",t)},onClear:function(t){A(t),this.$emit("input",""),this.$emit("clear",t)},onKeypress:function(t){if("number"===this.type){var e=t.keyCode,n=-1===String(this.value).indexOf(".");e>=48&&e<=57||46===e&&n||45===e||A(t)}"search"===this.type&&13===t.keyCode&&this.blur(),this.$emit("keypress",t)},adjustSize:function(){var input=this.$refs.input;if("textarea"===this.type&&this.autosize&&input){input.style.height="auto";var t=input.scrollHeight;if(Object(B.c)(this.autosize)){var e=this.autosize,n=e.maxHeight,o=e.minHeight;n&&(t=Math.min(t,n)),o&&(t=Math.max(t,o))}t&&(input.style.height=t+"px")}},genInput:function(){var t=this.$createElement,e=this.slots("input");if(e)return t("div",{class:me("control",this.inputAlign)},[e]);var n={ref:"input",class:me("control",this.inputAlign),domProps:{value:this.value},attrs:Object(o.a)({},this.$attrs,{readonly:this.readonly}),on:this.listeners,directives:[{name:"model",value:this.value}]};return"textarea"===this.type?t("textarea",l()([{},n])):t("input",l()([{attrs:{type:this.type}},n]))},genLeftIcon:function(){var t=this.$createElement;if(this.slots("left-icon")||this.leftIcon)return t("div",{class:me("left-icon"),on:{click:this.onClickLeftIcon}},[this.slots("left-icon")||t(yt,{attrs:{name:this.leftIcon}})])},genRightIcon:function(){var t=this.$createElement,e=this.slots;if(e("right-icon")||this.rightIcon)return t("div",{class:me("right-icon"),on:{click:this.onClickRightIcon}},[e("right-icon")||t(yt,{attrs:{name:this.rightIcon}})])},genWordLimit:function(){var t=this.$createElement;if(this.showWordLimit&&this.$attrs.maxlength)return t("div",{class:me("word-limit")},[this.value.length,"/",this.$attrs.maxlength])}},render:function(){var t,e=arguments[0],n=this.slots,o=this.labelAlign,r={icon:this.genLeftIcon};return n("label")&&(r.title=function(){return n("label")}),e(ue,{attrs:{icon:this.leftIcon,size:this.size,title:this.label,center:this.center,border:this.border,isLink:this.isLink,required:this.required,clickable:this.clickable,titleStyle:this.labelStyle,titleClass:[me("label",o),this.labelClass],arrowDirection:this.arrowDirection},class:me((t={error:this.error},t["label-"+o]=o,t["min-height"]="textarea"===this.type&&!this.autosize,t)),scopedSlots:r,on:{click:this.onClick}},[e("div",{class:me("body")},[this.genInput(),this.showClear&&e(yt,{attrs:{name:"clear"},class:me("clear"),on:{touchstart:this.onClear}}),this.genRightIcon(),n("button")&&e("div",{class:me("button")},[n("button")])]),this.genWordLimit(),this.errorMessage&&e("div",{class:me("error-message",this.errorMessageAlign)},[this.errorMessage])])}}),ge=Object(c.a)("toast"),be=ge[0],ye=ge[1],ke=be({mixins:[it],props:{icon:String,className:null,iconPrefix:String,loadingType:String,forbidClick:Boolean,closeOnClick:Boolean,message:[Number,String],type:{type:String,default:"text"},position:{type:String,default:"middle"},transition:{type:String,default:"van-fade"},lockScroll:{type:Boolean,default:!1}},data:function(){return{clickable:!1}},mounted:function(){this.toggleClickable()},destroyed:function(){this.toggleClickable()},watch:{value:"toggleClickable",forbidClick:"toggleClickable"},methods:{onClick:function(){this.closeOnClick&&this.close()},toggleClickable:function(){var t=this.value&&this.forbidClick;if(this.clickable!==t){this.clickable=t;var e=t?"add":"remove";document.body.classList[e]("van-toast--unclickable")}},onAfterEnter:function(){this.$emit("opened"),this.onOpened&&this.onOpened()},onAfterLeave:function(){this.$emit("closed")},genIcon:function(){var t=this.$createElement,e=this.icon,n=this.type,o=this.iconPrefix,r=this.loadingType;return e||"success"===n||"fail"===n?t(yt,{class:ye("icon"),attrs:{classPrefix:o,name:e||n}}):"loading"===n?t(jt,{class:ye("loading"),attrs:{type:r}}):void 0},genMessage:function(){var t=this.$createElement,e=this.type,n=this.message;if(Object(B.b)(n)&&""!==n)return"html"===e?t("div",{class:ye("text"),domProps:{innerHTML:n}}):t("div",{class:ye("text")},[n])}},render:function(){var t,e=arguments[0];return e("transition",{attrs:{name:this.transition},on:{afterEnter:this.onAfterEnter,afterLeave:this.onAfterLeave}},[e("div",{directives:[{name:"show",value:this.value}],class:[ye([this.position,(t={},t[this.type]=!this.icon,t)]),this.className],on:{click:this.onClick}},[this.genIcon(),this.genMessage()])])}}),Se={icon:"",type:"text",mask:!1,value:!0,message:"",className:"",onClose:null,onOpened:null,duration:2e3,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,getContainer:"body",overlayStyle:null,closeOnClick:!1},xe={},Ce=[],we=!1,Oe=Object(o.a)({},Se);function Te(t){return Object(B.c)(t)?t:{message:t}}function $e(t){void 0===t&&(t={});var e=function(){if(B.d)return{};if(!Ce.length||we){var t=new(h.default.extend(ke))({el:document.createElement("div")});t.$on("input",(function(e){t.value=e})),Ce.push(t)}return Ce[Ce.length-1]}();return e.value&&e.updateZIndex(),t=Te(t),(t=Object(o.a)({},Oe,{},xe[t.type||Oe.type],{},t)).clear=function(){e.value=!1,t.onClose&&t.onClose(),we&&!B.d&&e.$on("closed",(function(){clearTimeout(e.timer),Ce=Ce.filter((function(t){return t!==e}));var t=e.$el.parentNode;t&&t.removeChild(e.$el),e.$destroy()}))},Object(o.a)(e,function(t){return Object(o.a)({},t,{overlay:t.mask,mask:void 0,duration:void 0})}(t)),clearTimeout(e.timer),t.duration>0&&(e.timer=setTimeout((function(){e.clear()}),t.duration)),e}["loading","success","fail"].forEach((function(t){var e;$e[t]=(e=t,function(t){return $e(Object(o.a)({type:e},Te(t)))})})),$e.clear=function(t){Ce.length&&(t?(Ce.forEach((function(t){t.clear()})),Ce=[]):we?Ce.shift().clear():Ce[0].clear())},$e.setDefaultOptions=function(t,e){"string"==typeof t?xe[t]=e:Object(o.a)(Oe,t)},$e.resetDefaultOptions=function(t){"string"==typeof t?xe[t]=null:(Oe=Object(o.a)({},Se),xe={})},$e.allowMultiple=function(t){void 0===t&&(t=!0),we=t},$e.install=function(){h.default.use(ke)},h.default.prototype.$toast=$e;var Be=$e,Ie=Object(c.a)("button"),je=Ie[0],Ne=Ie[1];function ze(t,e,n,o){var r,c=e.tag,h=e.icon,d=e.type,f=e.color,y=e.plain,k=e.disabled,S=e.loading,x=e.hairline,C=e.loadingText,style={};f&&(style.color=y?f:"#fff",y||(style.background=f),-1!==f.indexOf("gradient")?style.border=0:style.borderColor=f);var text,content,w=[Ne([d,e.size,{plain:y,disabled:k,hairline:x,block:e.block,round:e.round,square:e.square}]),(r={},r["van-hairline--surround"]=x,r)];return t(c,l()([{style:style,class:w,attrs:{type:e.nativeType,disabled:k},on:{click:function(t){S||k||(v(o,"click",t),se(o))},touchstart:function(t){v(o,"touchstart",t)}}},m(o)]),[(content=[],S?content.push(t(jt,{class:Ne("loading"),attrs:{size:e.loadingSize,type:e.loadingType,color:"currentColor"}})):h&&content.push(t(yt,{attrs:{name:h},class:Ne("icon")})),(text=S?C:n.default?n.default():e.text)&&content.push(t("span",{class:Ne("text")},[text])),content)])}ze.props=Object(o.a)({},oe,{text:String,icon:String,color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,nativeType:String,loadingText:String,loadingType:String,tag:{type:String,default:"button"},type:{type:String,default:"default"},size:{type:String,default:"normal"},loadingSize:{type:String,default:"20px"}});var De,Ae=je(ze),Ee=Object(c.a)("dialog"),Fe=Ee[0],Me=Ee[1],Le=Ee[2],Pe=Fe({mixins:[it],props:{title:String,width:[Number,String],message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,transition:{type:String,default:"van-dialog-bounce"},showConfirmButton:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{onClickOverlay:function(){this.handleAction("overlay")},handleAction:function(t){var e=this;this.$emit(t),this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,(function(n){!1!==n&&e.loading[t]&&e.onClose(t),e.loading.confirm=!1,e.loading.cancel=!1}))):this.onClose(t)},onClose:function(t){this.close(),this.callback&&this.callback(t)},onOpened:function(){this.$emit("opened")},onClosed:function(){this.$emit("closed")}},render:function(){var t,e,n=this,o=arguments[0];if(this.shouldRender){var r=this.message,l=this.messageAlign,c=this.slots(),title=this.slots("title")||this.title,h=title&&o("div",{class:Me("header",{isolated:!r&&!c})},[title]),d=(c||r)&&o("div",{class:Me("content")},[c||o("div",{domProps:{innerHTML:r},class:Me("message",(t={"has-title":title},t[l]=l,t))})]),f=this.showCancelButton&&this.showConfirmButton,m=o("div",{class:[x,Me("footer",{buttons:f})]},[this.showCancelButton&&o(Ae,{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||Le("cancel")},class:Me("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){n.handleAction("cancel")}}}),this.showConfirmButton&&o(Ae,{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||Le("confirm")},class:[Me("confirm"),(e={},e["van-hairline--left"]=f,e)],style:{color:this.confirmButtonColor},on:{click:function(){n.handleAction("confirm")}}})]);return o("transition",{attrs:{name:this.transition},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[o("div",{directives:[{name:"show",value:this.value}],attrs:{role:"dialog","aria-labelledby":this.title||r},class:[Me(),this.className],style:{width:Object(nt.a)(this.width)}},[h,d,m])])}}});function Ve(t){return B.d?Promise.resolve():new Promise((function(e,n){var element;De&&(element=De.$el,document.body.contains(element))||(De&&De.$destroy(),(De=new(h.default.extend(Pe))({el:document.createElement("div"),propsData:{lazyRender:!1}})).$on("input",(function(t){De.value=t}))),Object(o.a)(De,Ve.currentOptions,t,{resolve:e,reject:n})}))}Ve.defaultOptions={value:!0,title:"",width:"",message:"",overlay:!0,className:"",lockScroll:!0,transition:"van-dialog-bounce",beforeClose:null,overlayClass:"",overlayStyle:null,messageAlign:"",getContainer:"body",cancelButtonText:"",cancelButtonColor:null,confirmButtonText:"",confirmButtonColor:null,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!1,closeOnClickOverlay:!1,callback:function(t){De["confirm"===t?"resolve":"reject"](t)}},Ve.alert=Ve,Ve.confirm=function(t){return Ve(Object(o.a)({showCancelButton:!0},t))},Ve.close=function(){De&&(De.value=!1)},Ve.setDefaultOptions=function(t){Object(o.a)(Ve.currentOptions,t)},Ve.resetDefaultOptions=function(){Ve.currentOptions=Object(o.a)({},Ve.defaultOptions)},Ve.resetDefaultOptions(),Ve.install=function(){h.default.use(Pe)},Ve.Component=Pe,h.default.prototype.$dialog=Ve;var dialog=Ve,Re=Object(c.a)("address-edit-detail"),He=Re[0],We=Re[1],_e=Re[2],qe=!B.d&&/android/.test(navigator.userAgent.toLowerCase()),Ye=He({props:{value:String,error:Boolean,focused:Boolean,detailRows:Number,searchResult:Array,detailMaxlength:Number,showSearchResult:Boolean},methods:{onSelect:function(t){this.$emit("select-search",t),this.$emit("input",((t.address||"")+" "+(t.name||"")).trim())},onFinish:function(){this.$refs.field.blur()},genFinish:function(){var t=this.$createElement;if(this.value&&this.focused&&qe)return t("div",{class:We("finish"),on:{click:this.onFinish}},[_e("complete")])},genSearchResult:function(){var t=this,e=this.$createElement,n=this.searchResult;if(this.focused&&n&&this.showSearchResult)return n.map((function(n){return e(ue,{key:n.name+n.address,attrs:{title:n.name,label:n.address,icon:"location-o",clickable:!0},on:{click:function(){t.onSelect(n)}}})}))}},render:function(){var t=arguments[0];return t(ue,{class:We()},[t(ve,{attrs:{autosize:!0,rows:this.detailRows,clearable:!qe,type:"textarea",value:this.value,error:this.error,label:_e("label"),maxlength:this.detailMaxlength,placeholder:_e("placeholder")},ref:"field",scopedSlots:{icon:this.genFinish},on:Object(o.a)({},this.$listeners)}),this.genSearchResult()])}}),Xe={size:String,value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1}},Ue=Object(c.a)("switch"),Ke=Ue[0],Ge=Ue[1];function Ze(t,e,n,o){var r=e.size,c=e.value,h=e.loading,d=e.disabled,f=e.activeColor,y=e.activeValue,k=e.inactiveColor,S=e.inactiveValue,x=c===y,C={fontSize:Object(nt.a)(r),backgroundColor:x?f:k},w=x?f||"#1989fa":k||"#969799";return t("div",l()([{class:Ge({on:x,disabled:d}),attrs:{role:"switch","aria-checked":String(x)},style:C,on:{click:function(t){if(v(o,"click",t),!d&&!h){var e=x?S:y;v(o,"input",e),v(o,"change",e)}}}},m(o)]),[t("div",{class:Ge("node")},[h&&t(jt,{class:Ge("loading"),attrs:{color:w}})])])}Ze.props=Xe;var Je=Ke(Ze),Qe=Object(c.a)("switch-cell"),ti=Qe[0],ei=Qe[1];function ii(t,e,n,r){return t(ue,l()([{attrs:{center:!0,size:e.cellSize,title:e.title,border:e.border},class:ei([e.cellSize])},m(r)]),[t(Je,{props:Object(o.a)({},e),on:Object(o.a)({},r.listeners)})])}ii.props=Object(o.a)({},Xe,{title:String,cellSize:String,border:{type:Boolean,default:!0},size:{type:String,default:"24px"}});var ni=ti(ii),si=Object(c.a)("address-edit"),oi=si[0],ai=si[1],ri=si[2],ci={name:"",tel:"",country:"",province:"",city:"",county:"",areaCode:"",postalCode:"",addressDetail:"",isDefault:!1};var ui=oi({props:{areaList:Object,isSaving:Boolean,isDeleting:Boolean,validator:Function,showDelete:Boolean,showPostal:Boolean,searchResult:Array,showSetDefault:Boolean,showSearchResult:Boolean,saveButtonText:String,deleteButtonText:String,showArea:{type:Boolean,default:!0},showDetail:{type:Boolean,default:!0},detailRows:{type:Number,default:1},detailMaxlength:{type:Number,default:200},addressInfo:{type:Object,default:function(){return Object(o.a)({},ci)}},telValidator:{type:Function,default:Ft},postalValidator:{type:Function,default:function(t){return/^\d{6}$/.test(t)}},areaColumnsPlaceholder:{type:Array,default:function(){return[]}}},data:function(){return{data:{},showAreaPopup:!1,detailFocused:!1,errorInfo:{tel:!1,name:!1,postalCode:!1,addressDetail:!1}}},computed:{areaListLoaded:function(){return Object(B.c)(this.areaList)&&Object.keys(this.areaList).length},areaText:function(){var t=this.data,e=t.country,n=t.province,o=t.city,r=t.county;if(t.areaCode){var l=[e,n,o,r];return n&&n===o&&l.splice(1,1),l.filter((function(text){return text})).join("/")}return""}},watch:{addressInfo:{handler:function(t){this.data=Object(o.a)({},ci,{},t),this.setAreaCode(t.areaCode)},deep:!0,immediate:!0},areaList:function(){this.setAreaCode(this.data.areaCode)}},methods:{onFocus:function(t){this.errorInfo[t]=!1,this.detailFocused="addressDetail"===t,this.$emit("focus",t)},onChangeDetail:function(t){this.data.addressDetail=t,this.$emit("change-detail",t)},onAreaConfirm:function(t){(t=t.filter((function(t){return!!t}))).some((function(t){return!t.code}))?Be(ri("areaEmpty")):(this.showAreaPopup=!1,this.assignAreaValues(),this.$emit("change-area",t))},assignAreaValues:function(){var area=this.$refs.area;if(area){var t=area.getArea();t.areaCode=t.code,delete t.code,Object(o.a)(this.data,t)}},onSave:function(){var t=this,e=["name","tel","areaCode","addressDetail"];this.showPostal&&e.push("postalCode"),e.every((function(e){var n=t.getErrorMessage(e);return n&&(t.errorInfo[e]=!0,Be(n)),!n}))&&!this.isSaving&&this.$emit("save",this.data)},getErrorMessage:function(t){var e=String(this.data[t]||"").trim();if(this.validator){var n=this.validator(t,e);if(n)return n}switch(t){case"name":return e?"":ri("nameEmpty");case"tel":return this.telValidator(e)?"":ri("telInvalid");case"areaCode":return e?"":ri("areaEmpty");case"addressDetail":return e?"":ri("addressEmpty");case"postalCode":return e&&!this.postalValidator(e)?ri("postalEmpty"):""}},onDelete:function(){var t=this;dialog.confirm({title:ri("confirmDelete")}).then((function(){t.$emit("delete",t.data)})).catch((function(){t.$emit("cancel-delete",t.data)}))},getArea:function(){return this.$refs.area?this.$refs.area.getValues():[]},setAreaCode:function(code){this.data.areaCode=code||"",code&&this.$nextTick(this.assignAreaValues)},setAddressDetail:function(t){this.data.addressDetail=t},onDetailBlur:function(){var t=this;setTimeout((function(){t.detailFocused=!1}))}},render:function(){var t=this,e=arguments[0],data=this.data,n=this.errorInfo,o=this.searchResult,r=function(e){return function(){return t.onFocus(e)}},l=o&&o.length&&this.detailFocused;return e("div",{class:ai()},[e(ve,{attrs:{clearable:!0,label:ri("name"),placeholder:ri("namePlaceholder"),error:n.name},on:{focus:r("name")},model:{value:data.name,callback:function(t){data.name=t}}}),e(ve,{attrs:{clearable:!0,type:"tel",label:ri("tel"),placeholder:ri("telPlaceholder"),error:n.tel},on:{focus:r("tel")},model:{value:data.tel,callback:function(t){data.tel=t}}}),e(ve,{directives:[{name:"show",value:this.showArea}],attrs:{readonly:!0,label:ri("area"),placeholder:ri("areaPlaceholder"),value:this.areaText},on:{click:function(){t.showAreaPopup=!0}}}),e(Ye,{directives:[{name:"show",value:this.showDetail}],attrs:{focused:this.detailFocused,value:data.addressDetail,error:n.addressDetail,detailRows:this.detailRows,detailMaxlength:this.detailMaxlength,searchResult:this.searchResult,showSearchResult:this.showSearchResult},on:{focus:r("addressDetail"),blur:this.onDetailBlur,input:this.onChangeDetail,"select-search":function(e){t.$emit("select-search",e)}}}),this.showPostal&&e(ve,{directives:[{name:"show",value:!l}],attrs:{type:"tel",maxlength:"6",label:ri("postal"),placeholder:ri("postal"),error:n.postalCode},on:{focus:r("postalCode")},model:{value:data.postalCode,callback:function(t){data.postalCode=t}}}),this.slots(),this.showSetDefault&&e(ni,{directives:[{name:"show",value:!l}],attrs:{title:ri("defaultAddress")},on:{change:function(e){t.$emit("change-default",e)}},model:{value:data.isDefault,callback:function(t){data.isDefault=t}}}),e("div",{directives:[{name:"show",value:!l}],class:ai("buttons")},[e(Ae,{attrs:{block:!0,loading:this.isSaving,type:"danger",text:this.saveButtonText||ri("save")},on:{click:this.onSave}}),this.showDelete&&e(Ae,{attrs:{block:!0,loading:this.isDeleting,text:this.deleteButtonText||ri("delete")},on:{click:this.onDelete}})]),e(Ct,{attrs:{position:"bottom",lazyRender:!1,getContainer:"body"},model:{value:t.showAreaPopup,callback:function(e){t.showAreaPopup=e}}},[e(ee,{ref:"area",attrs:{loading:!this.areaListLoaded,value:data.areaCode,areaList:this.areaList,columnsPlaceholder:this.areaColumnsPlaceholder},on:{confirm:this.onAreaConfirm,cancel:function(){t.showAreaPopup=!1}}})])])}});function hi(t,e){var n,o;void 0===e&&(e={});var r=e.indexKey||"index";return h.default.extend({inject:(n={},n[t]={default:null},n),computed:(o={parent:function(){return this.disableBindRelation?null:this[t]}},o[r]=function(){return this.bindRelation(),this.parent.children.indexOf(this)},o),mounted:function(){this.bindRelation()},beforeDestroy:function(){var t=this;this.parent&&(this.parent.children=this.parent.children.filter((function(e){return e!==t})))},methods:{bindRelation:function(){if(this.parent&&-1===this.parent.children.indexOf(this)){var t=[].concat(this.parent.children,[this]),e=function(t){var e=[];return function t(n){n.forEach((function(n){e.push(n),n.children&&t(n.children)}))}(t),e}(this.parent.slots());t.sort((function(a,b){return e.indexOf(a.$vnode)-e.indexOf(b.$vnode)})),this.parent.children=t}}}})}function di(t){return{provide:function(){var e;return(e={})[t]=this,e},data:function(){return{children:[]}}}}var fi=Object(c.a)("radio-group"),pi=fi[0],mi=fi[1],vi=pi({mixins:[di("vanRadio")],props:{value:null,disabled:Boolean,checkedColor:String,iconSize:[Number,String]},watch:{value:function(t){this.$emit("change",t)}},render:function(){var t=arguments[0];return t("div",{class:mi(),attrs:{role:"radiogroup"}},[this.slots()])}}),gi=function(t){var e=t.parent,n=t.bem,o=t.role;return{mixins:[hi(e)],props:{name:null,value:null,disabled:Boolean,iconSize:[Number,String],checkedColor:String,labelPosition:String,labelDisabled:Boolean,shape:{type:String,default:"round"},bindGroup:{type:Boolean,default:!0}},computed:{disableBindRelation:function(){return!this.bindGroup},isDisabled:function(){return this.parent&&this.parent.disabled||this.disabled},iconStyle:function(){var t=this.checkedColor||this.parent&&this.parent.checkedColor;if(t&&this.checked&&!this.isDisabled)return{borderColor:t,backgroundColor:t}},tabindex:function(){return this.isDisabled||"radio"===o&&!this.checked?-1:0}},methods:{onClick:function(t){var label=this.$refs.label,e=t.target,n=label&&(label===e||label.contains(e));this.isDisabled||n&&this.labelDisabled||this.toggle(),this.$emit("click",t)}},render:function(){var t=arguments[0],e=this.slots,r=this.checked,l=e("icon",{checked:r})||t(yt,{attrs:{name:"success"},style:this.iconStyle}),c=e()&&t("span",{ref:"label",class:n("label",[this.labelPosition,{disabled:this.isDisabled}])},[e()]),h=this.iconSize||this.parent&&this.parent.iconSize,d=[t("div",{class:n("icon",[this.shape,{disabled:this.isDisabled,checked:r}]),style:{fontSize:Object(nt.a)(h)}},[l])];return"left"===this.labelPosition?d.unshift(c):d.push(c),t("div",{attrs:{role:o,tabindex:this.tabindex,"aria-checked":String(this.checked)},class:n(),on:{click:this.onClick}},[d])}}},bi=Object(c.a)("radio"),yi=(0,bi[0])({mixins:[gi({bem:bi[1],role:"radio",parent:"vanRadio"})],computed:{currentValue:{get:function(){return this.parent?this.parent.value:this.value},set:function(t){(this.parent||this).$emit("input",t)}},checked:function(){return this.currentValue===this.name}},methods:{toggle:function(){this.currentValue=this.name}}}),ki=Object(c.a)("address-item"),Si=ki[0],xi=ki[1];function Ci(t,e,n,o){var r=e.disabled,c=e.switchable;return t(ue,l()([{class:xi({disabled:r}),attrs:{valueClass:xi("value"),clickable:c&&!r},scopedSlots:{default:function(){var data=e.data,n=[t("div",{class:xi("name")},[data.name+","+data.tel]),t("div",{class:xi("address")},[data.address])];return c&&!r?t(yi,{attrs:{name:data.id,iconSize:16}},[n]):n},"right-icon":function(){return t(yt,{attrs:{name:"edit"},class:xi("edit"),on:{click:function(t){t.stopPropagation(),v(o,"edit"),v(o,"click")}}})}},on:{click:function(){c&&v(o,"select"),v(o,"click")}}},m(o)]))}Ci.props={data:Object,disabled:Boolean,switchable:Boolean};var wi=Si(Ci),Oi=Object(c.a)("address-list"),Ti=Oi[0],$i=Oi[1],Bi=Oi[2];function Ii(t,e,n,o){function r(n,r){if(n)return n.map((function(n,l){return t(wi,{attrs:{data:n,disabled:r,switchable:e.switchable},key:n.id,on:{select:function(){v(o,r?"select-disabled":"select",n,l),r||v(o,"input",n.id)},edit:function(){v(o,r?"edit-disabled":"edit",n,l)},click:function(){v(o,"click-item",n,l)}}})}))}var c=r(e.list),h=r(e.disabledList,!0);return t("div",l()([{class:$i()},m(o)]),[n.top&&n.top(),t(vi,{attrs:{value:e.value}},[c]),e.disabledText&&t("div",{class:$i("disabled-text")},[e.disabledText]),h,n.default&&n.default(),t(Ae,{attrs:{square:!0,size:"large",type:"danger",text:e.addButtonText||Bi("add")},class:$i("add"),on:{click:function(){v(o,"add")}}})])}Ii.props={list:Array,disabledList:Array,disabledText:String,addButtonText:String,value:[Number,String],switchable:{type:Boolean,default:!0}};var ji=Ti(Ii),Ni=Object(c.a)("tag"),zi=Ni[0],Di=Ni[1];function Ai(t,e,n,o){var r,c,h=e.type,mark=e.mark,d=e.plain,f=e.color,y=e.round,k=e.size,style=((r={})[d?"color":"backgroundColor"]=f,r);e.textColor&&(style.color=e.textColor);var S={mark:mark,plain:d,round:y};k&&(S[k]=k);var x=t("span",l()([{style:style,class:[Di([S,h]),(c={},c["van-hairline--surround"]=d,c)]},m(o,!0)]),[n.default&&n.default(),e.closeable&&t(yt,{attrs:{name:"cross"},class:Di("close"),on:{click:function(){v(o,"close")}}})]);return e.closeable?t("transition",{attrs:{name:"van-fade"}},[x]):x}Ai.props={size:String,mark:Boolean,color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean,type:{type:String,default:"default"}};var Ei=zi(Ai),Fi=Object(c.a)("card"),Mi=Fi[0],Li=Fi[1];function Pi(t,e,n,o){var r=e.thumb,c=n.num||Object(B.b)(e.num),h=n.price||Object(B.b)(e.price),d=n["origin-price"]||Object(B.b)(e.originPrice),f=c||h||d;function y(t){v(o,"click-thumb",t)}function k(){if(n.tag||e.tag)return t("div",{class:Li("tag")},[n.tag?n.tag():t(Ei,{attrs:{mark:!0,type:"danger"}},[e.tag])])}return t("div",l()([{class:Li()},m(o,!0)]),[t("div",{class:Li("header")},[function(){if(n.thumb||r)return t("a",{attrs:{href:e.thumbLink},class:Li("thumb"),on:{click:y}},[n.thumb?n.thumb():t(pt,{attrs:{src:r,width:"100%",height:"100%",fit:"contain","lazy-load":e.lazyLoad}}),k()])}(),t("div",{class:Li("content",{centered:e.centered})},[n.title?n.title():e.title?t("div",{class:[Li("title"),"van-multi-ellipsis--l2"]},[e.title]):void 0,n.desc?n.desc():e.desc?t("div",{class:[Li("desc"),"van-ellipsis"]},[e.desc]):void 0,n.tags&&n.tags(),f&&t("div",{class:"van-card__bottom"},[function(){if(h)return t("div",{class:Li("price")},[n.price?n.price():e.currency+" "+e.price])}(),function(){if(d){var slot=n["origin-price"];return t("div",{class:Li("origin-price")},[slot?slot():e.currency+" "+e.originPrice])}}(),function(){if(c)return t("div",{class:Li("num")},[n.num?n.num():"x "+e.num])}(),n.bottom&&n.bottom()])])]),function(){if(n.footer)return t("div",{class:Li("footer")},[n.footer()])}()])}Pi.props={tag:String,desc:String,thumb:String,title:String,centered:Boolean,lazyLoad:Boolean,thumbLink:String,num:[Number,String],price:[Number,String],originPrice:[Number,String],currency:{type:String,default:"¥"}};var Vi=Mi(Pi),Ri=Object(c.a)("cell-group"),Hi=Ri[0],Wi=Ri[1];function _i(t,e,n,o){var r,c=t("div",l()([{class:[Wi(),(r={},r[w]=e.border,r)]},m(o,!0)]),[n.default&&n.default()]);return e.title||n.title?t("div",[t("div",{class:Wi("title")},[n.title?n.title():e.title]),c]):c}_i.props={title:String,border:{type:Boolean,default:!0}};var qi=Hi(_i),Yi=Object(c.a)("checkbox"),Xi=(0,Yi[0])({mixins:[gi({bem:Yi[1],role:"checkbox",parent:"vanCheckbox"})],computed:{checked:{get:function(){return this.parent?-1!==this.parent.value.indexOf(this.name):this.value},set:function(t){this.parent?this.setParentValue(t):this.$emit("input",t)}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggle:function(t){var e=this;void 0===t&&(t=!this.checked),clearTimeout(this.toggleTask),this.toggleTask=setTimeout((function(){e.checked=t}))},setParentValue:function(t){var e=this.parent,n=e.value.slice();if(t){if(e.max&&n.length>=e.max)return;-1===n.indexOf(this.name)&&(n.push(this.name),e.$emit("input",n))}else{var o=n.indexOf(this.name);-1!==o&&(n.splice(o,1),e.$emit("input",n))}}}}),Ui=Object(c.a)("checkbox-group"),Ki=Ui[0],Gi=Ui[1],Zi=Ki({mixins:[di("vanCheckbox")],props:{max:Number,disabled:Boolean,iconSize:[Number,String],checkedColor:String,value:{type:Array,default:function(){return[]}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggleAll:function(t){this.children.forEach((function(e){e.toggle(t)}))}},render:function(){var t=arguments[0];return t("div",{class:Gi()},[this.slots()])}}),Ji=n(46),Qi=Object(c.a)("circle"),tn=Qi[0],en=Qi[1],nn=0;function sn(t){return Math.min(Math.max(t,0),100)}var circle=tn({props:{text:String,value:{type:Number,default:0},speed:{type:Number,default:0},size:{type:[String,Number],default:100},fill:{type:String,default:"none"},rate:{type:Number,default:100},layerColor:{type:String,default:"#fff"},color:{type:[String,Object],default:"#1989fa"},strokeWidth:{type:Number,default:40},clockwise:{type:Boolean,default:!0}},beforeCreate:function(){this.uid="van-circle-gradient-"+nn++},computed:{style:function(){var t=Object(nt.a)(this.size);return{width:t,height:t}},path:function(){return t=this.clockwise,"M "+(e=this.viewBoxSize)/2+" "+e/2+" m 0, -500 a 500, 500 0 1, "+(n=t?1:0)+" 0, 1000 a 500, 500 0 1, "+n+" 0, -1000";var t,e,n},viewBoxSize:function(){return 1e3+this.strokeWidth},layerStyle:function(){var t=3140*this.value/100;return{stroke:""+this.color,strokeWidth:this.strokeWidth+1+"px",strokeDasharray:t+"px 3140px"}},hoverStyle:function(){return{fill:""+this.fill,stroke:""+this.layerColor,strokeWidth:this.strokeWidth+"px"}},gradient:function(){return Object(B.c)(this.color)},LinearGradient:function(){var t=this,e=this.$createElement;if(this.gradient){var n=Object.keys(this.color).sort((function(a,b){return parseFloat(a)-parseFloat(b)})).map((function(n,o){return e("stop",{key:o,attrs:{offset:n,"stop-color":t.color[n]}})}));return e("defs",[e("linearGradient",{attrs:{id:this.uid,x1:"100%",y1:"0%",x2:"0%",y2:"0%"}},[n])])}}},watch:{rate:{handler:function(){this.startTime=Date.now(),this.startRate=this.value,this.endRate=sn(this.rate),this.increase=this.endRate>this.startRate,this.duration=Math.abs(1e3*(this.startRate-this.endRate)/this.speed),this.speed?(Object(Ji.a)(this.rafId),this.rafId=Object(Ji.c)(this.animate)):this.$emit("input",this.endRate)},immediate:!0}},methods:{animate:function(){var t=Date.now(),e=Math.min((t-this.startTime)/this.duration,1)*(this.endRate-this.startRate)+this.startRate;this.$emit("input",sn(parseFloat(e.toFixed(1)))),(this.increase?ethis.endRate)&&(this.rafId=Object(Ji.c)(this.animate))}},render:function(){var t=arguments[0];return t("div",{class:en(),style:this.style},[t("svg",{attrs:{viewBox:"0 0 "+this.viewBoxSize+" "+this.viewBoxSize}},[this.LinearGradient,t("path",{class:en("hover"),style:this.hoverStyle,attrs:{d:this.path}}),t("path",{attrs:{d:this.path,stroke:this.gradient?"url(#"+this.uid+")":this.color},class:en("layer"),style:this.layerStyle})]),this.slots()||this.text&&t("div",{class:en("text")},[this.text])])}}),on=Object(c.a)("col"),an=on[0],rn=on[1],col=an({props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{gutter:function(){return this.$parent&&Number(this.$parent.gutter)||0},style:function(){var t=this.gutter/2+"px";return this.gutter?{paddingLeft:t,paddingRight:t}:{}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,e=arguments[0],span=this.span,n=this.offset;return e(this.tag,{style:this.style,class:rn((t={},t[span]=span,t["offset-"+n]=n,t)),on:{click:this.onClick}},[this.slots()])}}),ln=Object(c.a)("collapse"),cn=ln[0],un=ln[1],hn=cn({mixins:[di("vanCollapse")],props:{accordion:Boolean,value:[String,Number,Array],border:{type:Boolean,default:!0}},methods:{switch:function(t,e){this.accordion||(t=e?this.value.concat(t):this.value.filter((function(e){return e!==t}))),this.$emit("change",t),this.$emit("input",t)}},render:function(){var t,e=arguments[0];return e("div",{class:[un(),(t={},t[w]=this.border,t)]},[this.slots()])}}),dn=Object(c.a)("collapse-item"),fn=dn[0],pn=dn[1],mn=["title","icon","right-icon"],vn=fn({mixins:[hi("vanCollapse")],props:Object(o.a)({},ie,{name:[Number,String],disabled:Boolean,isLink:{type:Boolean,default:!0}}),data:function(){return{show:null,inited:null}},computed:{currentName:function(){return Object(B.b)(this.name)?this.name:this.index},expanded:function(){var t=this;if(!this.parent)return null;var e=this.parent,n=e.value;return e.accordion?n===this.currentName:n.some((function(e){return e===t.currentName}))}},created:function(){this.show=this.expanded,this.inited=this.expanded},watch:{expanded:function(t,e){var n=this;null!==e&&(t&&(this.show=!0,this.inited=!0),(t?this.$nextTick:Ji.c)((function(){var e=n.$refs,content=e.content,o=e.wrapper;if(content&&o){var r=content.offsetHeight;if(r){var l=r+"px";o.style.height=t?0:l,Object(Ji.b)((function(){o.style.height=t?l:0}))}else n.onTransitionEnd()}})))}},methods:{onClick:function(){if(!this.disabled){var t=this.parent,e=t.accordion&&this.currentName===t.value?"":this.currentName;this.parent.switch(e,!this.expanded)}},onTransitionEnd:function(){this.expanded?this.$refs.wrapper.style.height="":this.show=!1}},render:function(){var t,e=this,n=arguments[0],r=this.disabled,l=this.expanded,c=mn.reduce((function(t,n){return e.slots(n)&&(t[n]=function(){return e.slots(n)}),t}),{});this.slots("value")&&(c.default=function(){return e.slots("value")});var h=n(ue,{attrs:{role:"button",tabindex:r?-1:0,"aria-expanded":String(l)},class:pn("title",{disabled:r,expanded:l}),on:{click:this.onClick},scopedSlots:c,props:Object(o.a)({},this.$props)}),d=this.inited&&n("div",{directives:[{name:"show",value:this.show}],ref:"wrapper",class:pn("wrapper"),on:{transitionend:this.onTransitionEnd}},[n("div",{ref:"content",class:pn("content")},[this.slots()])]);return n("div",{class:[pn(),(t={},t[x]=this.index,t)]},[h,d])}}),gn=Object(c.a)("contact-card"),bn=gn[0],yn=gn[1],kn=gn[2];function Sn(t,e,n,o){var r=e.type,c=e.editable;return t(ue,l()([{attrs:{center:!0,border:!1,isLink:c,valueClass:yn("value"),icon:"edit"===r?"contact":"add-square"},class:yn([r]),on:{click:function(t){c&&v(o,"click",t)}}},m(o)]),["add"===r?e.addText||kn("addText"):[t("div",[kn("name")+":"+e.name]),t("div",[kn("tel")+":"+e.tel])]])}Sn.props={tel:String,name:String,addText:String,editable:{type:Boolean,default:!0},type:{type:String,default:"add"}};var xn=bn(Sn),Cn=Object(c.a)("contact-edit"),wn=Cn[0],On=Cn[1],Tn=Cn[2],$n={tel:"",name:""},Bn=wn({props:{isEdit:Boolean,isSaving:Boolean,isDeleting:Boolean,contactInfo:{type:Object,default:function(){return Object(o.a)({},$n)}},telValidator:{type:Function,default:Ft}},data:function(){return{data:Object(o.a)({},$n,{},this.contactInfo),errorInfo:{name:!1,tel:!1}}},watch:{contactInfo:function(t){this.data=Object(o.a)({},$n,{},t)}},methods:{onFocus:function(t){this.errorInfo[t]=!1},getErrorMessageByKey:function(t){var e=this.data[t].trim();switch(t){case"name":return e?"":Tn("nameEmpty");case"tel":return this.telValidator(e)?"":Tn("telInvalid")}},onSave:function(){var t=this;["name","tel"].every((function(e){var n=t.getErrorMessageByKey(e);return n&&(t.errorInfo[e]=!0,Be(n)),!n}))&&!this.isSaving&&this.$emit("save",this.data)},onDelete:function(){var t=this;dialog.confirm({message:Tn("confirmDelete")}).then((function(){t.$emit("delete",t.data)}))}},render:function(){var t=this,e=arguments[0],data=this.data,n=this.errorInfo,o=function(e){return function(){return t.onFocus(e)}};return e("div",{class:On()},[e(ve,{attrs:{clearable:!0,maxlength:"30",label:Tn("name"),placeholder:Tn("nameEmpty"),error:n.name},on:{focus:o("name")},model:{value:data.name,callback:function(t){data.name=t}}}),e(ve,{attrs:{clearable:!0,type:"tel",label:Tn("tel"),placeholder:Tn("telEmpty"),error:n.tel},on:{focus:o("tel")},model:{value:data.tel,callback:function(t){data.tel=t}}}),e("div",{class:On("buttons")},[e(Ae,{attrs:{block:!0,type:"danger",text:Tn("save"),loading:this.isSaving},on:{click:this.onSave}}),this.isEdit&&e(Ae,{attrs:{block:!0,text:Tn("delete"),loading:this.isDeleting},on:{click:this.onDelete}})])])}}),In=Object(c.a)("contact-list"),jn=In[0],Nn=In[1],zn=In[2];function Dn(t,e,n,o){var r=e.list&&e.list.map((function(e,n){function r(){v(o,"input",e.id),v(o,"select",e,n)}return t(ue,{key:e.id,attrs:{isLink:!0,valueClass:Nn("item-value")},class:Nn("item"),scopedSlots:{default:function(){return t(yi,{attrs:{name:e.id,iconSize:16,checkedColor:k},on:{click:r}},[t("div",{class:Nn("name")},[e.name+","+e.tel])])},"right-icon":function(){return t(yt,{attrs:{name:"edit"},class:Nn("edit"),on:{click:function(t){t.stopPropagation(),v(o,"edit",e,n)}}})}},on:{click:r}})}));return t("div",l()([{class:Nn()},m(o)]),[t(vi,{attrs:{value:e.value},class:Nn("group")},[r]),t(Ae,{attrs:{square:!0,size:"large",type:"danger",text:e.addText||zn("addText")},class:Nn("add"),on:{click:function(){v(o,"add")}}})])}Dn.props={value:null,list:Array,addText:String};var An=jn(Dn),En=n(25);var Fn=Object(c.a)("count-down"),Mn=Fn[0],Ln=Fn[1],Pn=Mn({props:{millisecond:Boolean,time:{type:Number,default:0},format:{type:String,default:"HH:mm:ss"},autoStart:{type:Boolean,default:!0}},data:function(){return{remain:0}},computed:{timeData:function(){return time=this.remain,{days:Math.floor(time/864e5),hours:Math.floor(time%864e5/36e5),minutes:Math.floor(time%36e5/6e4),seconds:Math.floor(time%6e4/1e3),milliseconds:Math.floor(time%1e3)};var time},formattedTime:function(){return t=this.format,e=this.timeData,n=e.days,o=e.hours,r=e.minutes,l=e.seconds,c=e.milliseconds,-1===t.indexOf("DD")?o+=24*n:t=t.replace("DD",Object(En.b)(n)),-1===t.indexOf("HH")?r+=60*o:t=t.replace("HH",Object(En.b)(o)),-1===t.indexOf("mm")?l+=60*r:t=t.replace("mm",Object(En.b)(r)),-1===t.indexOf("ss")?c+=1e3*l:t=t.replace("ss",Object(En.b)(l)),t.replace("SSS",Object(En.b)(c,3));var t,e,n,o,r,l,c}},watch:{time:{immediate:!0,handler:"reset"}},activated:function(){this.keepAlivePaused&&(this.counting=!0,this.keepAlivePaused=!1,this.tick())},deactivated:function(){this.counting&&(this.pause(),this.keepAlivePaused=!0)},beforeDestroy:function(){this.pause()},methods:{start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+this.remain,this.tick())},pause:function(){this.counting=!1,Object(Ji.a)(this.rafId)},reset:function(){this.pause(),this.remain=this.time,this.autoStart&&this.start()},tick:function(){this.millisecond?this.microTick():this.macroTick()},microTick:function(){var t=this;this.rafId=Object(Ji.c)((function(){t.setRemain(t.getRemain()),0!==t.remain&&t.microTick()}))},macroTick:function(){var t=this;this.rafId=Object(Ji.c)((function(){var e,n,o=t.getRemain();e=o,n=t.remain,(Math.floor(e/1e3)!==Math.floor(n/1e3)||0===o)&&t.setRemain(o),0!==t.remain&&t.macroTick()}))},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},setRemain:function(t){this.remain=t,0===t&&(this.pause(),this.$emit("finish"))}},render:function(){var t=arguments[0];return t("div",{class:Ln()},[this.slots("default",this.timeData)||this.formattedTime])}}),Vn=Object(c.a)("coupon"),Rn=Vn[0],Hn=Vn[1],Wn=Vn[2];function _n(t){var e=new Date(1e3*t);return e.getFullYear()+"."+Object(En.b)(e.getMonth()+1)+"."+Object(En.b)(e.getDate())}function qn(t){return(t/100).toFixed(t%100==0?0:t%10==0?1:2)}var Yn=Rn({props:{coupon:Object,chosen:Boolean,disabled:Boolean,currency:{type:String,default:"¥"}},computed:{validPeriod:function(){var t=this.coupon,e=t.startAt,n=t.endAt;return Wn("valid")+":"+_n(e)+" - "+_n(n)},faceAmount:function(){var t,e=this.coupon;return e.valueDesc?e.valueDesc+""+(e.unitDesc||"")+"":e.denominations?""+this.currency+" "+qn(this.coupon.denominations):e.discount?Wn("discount",((t=this.coupon.discount)/10).toFixed(t%10==0?0:1)):""},conditionMessage:function(){var t=qn(this.coupon.originCondition);return"0"===t?Wn("unlimited"):Wn("condition",t)}},render:function(){var t=arguments[0],e=this.coupon,n=this.disabled,o=n&&e.reason||e.description;return t("div",{class:Hn({disabled:n})},[t("div",{class:Hn("content")},[t("div",{class:Hn("head")},[t("h2",{class:Hn("amount"),domProps:{innerHTML:this.faceAmount}}),t("p",[this.coupon.condition||this.conditionMessage])]),t("div",{class:Hn("body")},[t("h2",{class:Hn("name")},[e.name]),t("p",[this.validPeriod]),this.chosen&&t(Xi,{attrs:{value:!0,"checked-color":k},class:Hn("corner")})])]),o&&t("p",{class:Hn("description")},[o])])}}),Xn=Object(c.a)("coupon-cell"),Un=Xn[0],Kn=Xn[1],Gn=Xn[2];function Zn(t,e,n,o){var r=e.coupons[e.chosenCoupon]?"van-coupon-cell--selected":"",c=function(t){var e=t.coupons,n=t.chosenCoupon,o=t.currency,r=e[n];return r?"-"+o+((r.denominations||r.value)/100).toFixed(2):0===e.length?Gn("tips"):Gn("count",e.length)}(e);return t(ue,l()([{class:Kn(),attrs:{value:c,title:e.title||Gn("title"),border:e.border,isLink:e.editable,valueClass:r}},m(o,!0)]))}Zn.model={prop:"chosenCoupon"},Zn.props={title:String,coupons:{type:Array,default:function(){return[]}},currency:{type:String,default:"¥"},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},chosenCoupon:{type:Number,default:-1}};var Jn=Un(Zn),Qn=Object(c.a)("tab"),ts=Qn[0],es=Qn[1],is=ts({mixins:[hi("vanTabs")],props:Object(o.a)({},oe,{name:[Number,String],title:String,disabled:Boolean}),data:function(){return{inited:!1}},computed:{computedName:function(){return this.name||this.index},isActive:function(){return this.computedName===this.parent.currentName}},watch:{"parent.currentIndex":function(){this.inited=this.inited||this.isActive},title:function(){this.parent.setLine()}},mounted:function(){this.slots("title")&&this.parent.renderTitle(this.$refs.title,this.index)},render:function(t){var e=this.slots,n=this.isActive,o=[this.inited||!this.parent.lazyRender?e():t()];return e("title")&&o.push(t("div",{ref:"title"},[e("title")])),this.parent.animated?t("div",{attrs:{role:"tabpanel","aria-hidden":!n},class:es("pane-wrapper",{inactive:!n})},[t("div",{class:es("pane")},[o])]):t("div",{directives:[{name:"show",value:n}],attrs:{role:"tabpanel"},class:es("pane")},[o])}});function ns(element){return"none"===window.getComputedStyle(element).display||null===element.offsetParent}var ss=Object(c.a)("tab")[1],os={props:{type:String,color:String,title:String,isActive:Boolean,ellipsis:Boolean,disabled:Boolean,scrollable:Boolean,activeColor:String,inactiveColor:String,swipeThreshold:Number},computed:{style:function(){var style={},t=this.color,e=this.isActive,n="card"===this.type;t&&n&&(style.borderColor=t,this.disabled||(e?style.backgroundColor=t:style.color=t));var o=e?this.activeColor:this.inactiveColor;return o&&(style.color=o),this.scrollable&&this.ellipsis&&(style.flexBasis=88/this.swipeThreshold+"%"),style}},methods:{onClick:function(){this.$emit("click")},renderTitle:function(t){var title=this.$refs.title;title.innerHTML="",title.appendChild(t)}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"tab","aria-selected":this.isActive},class:ss({active:this.isActive,disabled:this.disabled,complete:!this.ellipsis}),style:this.style,on:{click:this.onClick}},[t("span",{ref:"title",class:{"van-ellipsis":this.ellipsis}},[this.title])])}},as=Object(c.a)("tabs"),rs=as[0],ls=as[1],cs=rs({mixins:[T],props:{count:Number,duration:Number,animated:Boolean,swipeable:Boolean,currentIndex:Number},computed:{style:function(){if(this.animated)return{transform:"translate3d("+-1*this.currentIndex*100+"%, 0, 0)",transitionDuration:this.duration+"s"}},listeners:function(){if(this.swipeable)return{touchstart:this.touchStart,touchmove:this.touchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}}},methods:{onTouchEnd:function(){var t=this.direction,e=this.deltaX,n=this.currentIndex;"horizontal"===t&&this.offsetX>=50&&(e>0&&0!==n?this.$emit("change",n-1):e<0&&n!==this.count-1&&this.$emit("change",n+1))},genChildren:function(){var t=this.$createElement;return this.animated?t("div",{class:ls("track"),style:this.style},[this.slots()]):this.slots()}},render:function(){var t=arguments[0];return t("div",{class:ls("content",{animated:this.animated}),on:Object(o.a)({},this.listeners)},[this.genChildren()])}}),us=Object(c.a)("sticky"),hs=us[0],ds=us[1],fs=hs({mixins:[E((function(t){this.scroller||(this.scroller=G(this.$el)),t(this.scroller,"scroll",this.onScroll,!0),this.onScroll()}))],props:{zIndex:Number,container:null,offsetTop:{type:Number,default:0}},data:function(){return{fixed:!1,height:0,transform:0}},computed:{style:function(){if(this.fixed){var style={};return Object(B.b)(this.zIndex)&&(style.zIndex=this.zIndex),this.offsetTop&&this.fixed&&(style.top=this.offsetTop+"px"),this.transform&&(style.transform="translate3d(0, "+this.transform+"px, 0)"),style}}},methods:{onScroll:function(){var t=this;this.height=this.$el.offsetHeight;var e=this.container,n=this.offsetTop,o=Z(window),r=et(this.$el),l=function(){t.$emit("scroll",{scrollTop:o,isFixed:t.fixed})};if(e){var c=r+e.offsetHeight;if(o+n+this.height>c){var h=this.height+o-c;return hr?(this.fixed=!0,this.transform=0):this.fixed=!1,l()}},render:function(){var t=arguments[0],e=this.fixed,style={height:e?this.height+"px":null};return t("div",{style:style},[t("div",{class:ds({fixed:e}),style:this.style},[this.slots()])])}}),ps=Object(c.a)("tabs"),ms=ps[0],vs=ps[1],gs=ms({mixins:[di("vanTabs"),E((function(t){t(window,"resize",this.setLine,!0)}))],model:{prop:"active"},props:{color:String,sticky:Boolean,animated:Boolean,swipeable:Boolean,background:String,lineWidth:[Number,String],lineHeight:[Number,String],titleActiveColor:String,titleInactiveColor:String,type:{type:String,default:"line"},active:{type:[Number,String],default:0},border:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},duration:{type:Number,default:.3},offsetTop:{type:Number,default:0},lazyRender:{type:Boolean,default:!0},swipeThreshold:{type:Number,default:4}},data:function(){return{position:"",currentIndex:null,lineStyle:{backgroundColor:this.color}}},computed:{scrollable:function(){return this.children.length>this.swipeThreshold||!this.ellipsis},navStyle:function(){return{borderColor:this.color,background:this.background}},currentName:function(){var t=this.children[this.currentIndex];if(t)return t.computedName}},watch:{color:"setLine",active:function(t){t!==this.currentName&&this.setCurrentIndexByName(t)},children:function(){var t=this;this.setCurrentIndexByName(this.currentName||this.active),this.setLine(),this.$nextTick((function(){t.scrollIntoView(!0)}))},currentIndex:function(){this.scrollIntoView(),this.setLine(),this.stickyFixed&&tt(Math.ceil(et(this.$el)-this.offsetTop))}},mounted:function(){this.onShow()},activated:function(){this.onShow(),this.setLine()},methods:{onShow:function(){var t=this;this.$nextTick((function(){t.inited=!0,t.scrollIntoView(!0)}))},setLine:function(){var t=this,e=this.inited;this.$nextTick((function(){var n=t.$refs.titles;if(n&&n[t.currentIndex]&&"line"===t.type&&!ns(t.$el)){var title=n[t.currentIndex].$el,o=t.lineWidth,r=t.lineHeight,l=Object(B.b)(o)?o:title.offsetWidth/2,c=title.offsetLeft+title.offsetWidth/2,h={width:Object(nt.a)(l),backgroundColor:t.color,transform:"translateX("+c+"px) translateX(-50%)"};if(e&&(h.transitionDuration=t.duration+"s"),Object(B.b)(r)){var d=Object(nt.a)(r);h.height=d,h.borderRadius=d}t.lineStyle=h}}))},setCurrentIndexByName:function(t){var e=this.children.filter((function(e){return e.computedName===t})),n=(this.children[0]||{}).index||0;this.setCurrentIndex(e.length?e[0].index:n)},setCurrentIndex:function(t){if(t=this.findAvailableTab(t),Object(B.b)(t)&&t!==this.currentIndex){var e=null!==this.currentIndex;this.currentIndex=t,this.$emit("input",this.currentName),e&&this.$emit("change",this.currentName,this.children[t].title)}},findAvailableTab:function(t){for(var e=t=0&&t1))return;t=t.slice(1)}return parseInt(t,10)}}(e.originColumns[t].values[n[t]])},r=o(0),l=o(1),c=ws(r,l);t=(t="year-month"===this.type?1:o(2))>c?c:t;var h=0,d=0;"datetime"===this.type&&(h=o(3),d=o(4));var f=new Date(r,l-1,t,h,d);this.innerValue=this.formatValue(f)},onChange:function(t){var e=this;this.updateInnerValue(),this.$nextTick((function(){e.$nextTick((function(){e.$emit("change",t)}))}))},updateColumnValue:function(){var t=this,e=this.innerValue,n=this.formatter,o=[n("year",""+e.getFullYear()),n("month",Object(En.b)(e.getMonth()+1)),n("day",Object(En.b)(e.getDate()))];"datetime"===this.type&&o.push(n("hour",Object(En.b)(e.getHours())),n("minute",Object(En.b)(e.getMinutes()))),"year-month"===this.type&&(o=o.slice(0,2)),this.$nextTick((function(){t.$refs.picker.setValues(o)}))}}}),Ns=Object(c.a)("datetime-picker"),zs=Ns[0],Ds=Ns[1],As=zs({props:Object(o.a)({},$s.props,{},js.props),render:function(){var t=arguments[0],e="time"===this.type?$s:js;return t(e,{class:Ds(),props:Object(o.a)({},this.$props),on:Object(o.a)({},this.$listeners)})}}),Es=Object(c.a)("divider"),Fs=Es[0],Ms=Es[1];function Ls(t,e,n,o){var r;return t("div",l()([{attrs:{role:"separator"},style:{borderColor:e.borderColor},class:Ms((r={dashed:e.dashed,hairline:e.hairline},r["content-"+e.contentPosition]=n.default,r))},m(o,!0)]),[n.default&&n.default()])}Ls.props={dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center"}};var Ps=Fs(Ls),Vs=Object(c.a)("dropdown-item"),Rs=Vs[0],Hs=Vs[1],Ws=Rs({mixins:[$({ref:"wrapper"}),hi("vanDropdownMenu")],props:{value:null,title:String,disabled:Boolean,titleClass:String,options:{type:Array,default:function(){return[]}}},data:function(){return{transition:!0,showPopup:!1,showWrapper:!1}},computed:{displayTitle:function(){var t=this;if(this.title)return this.title;var e=this.options.filter((function(option){return option.value===t.value}));return e.length?e[0].text:""}},methods:{toggle:function(t,e){void 0===t&&(t=!this.showPopup),void 0===e&&(e={}),t!==this.showPopup&&(this.transition=!e.immediate,this.showPopup=t,t&&(this.parent.updateOffset(),this.showWrapper=!0))}},beforeCreate:function(){var t=this,e=function(e){return function(){return t.$emit(e)}};this.onOpen=e("open"),this.onClose=e("close"),this.onOpened=e("opened")},render:function(){var t=this,e=arguments[0],n=this.parent,o=n.zIndex,r=n.offset,l=n.overlay,c=n.duration,h=n.direction,d=n.activeColor,f=n.closeOnClickOverlay,m=this.options.map((function(option){var n=option.value===t.value;return e(ue,{attrs:{clickable:!0,icon:option.icon,title:option.text},key:option.value,class:Hs("option",{active:n}),style:{color:n?d:""},on:{click:function(){t.showPopup=!1,option.value!==t.value&&(t.$emit("input",option.value),t.$emit("change",option.value))}}},[n&&e(yt,{class:Hs("icon"),attrs:{color:d,name:"success"}})])})),style={zIndex:o};return"down"===h?style.top=r+"px":style.bottom=r+"px",e("div",[e("div",{directives:[{name:"show",value:this.showWrapper}],ref:"wrapper",style:style,class:Hs([h])},[e(Ct,{attrs:{overlay:l,position:"down"===h?"top":"bottom",duration:this.transition?c:0,closeOnClickOverlay:f,overlayStyle:{position:"absolute"}},class:Hs("content"),on:{open:this.onOpen,close:this.onClose,opened:this.onOpened,closed:function(){t.showWrapper=!1,t.$emit("closed")}},model:{value:t.showPopup,callback:function(e){t.showPopup=e}}},[m,this.slots("default")])])])}}),_s=function(t){return h.default.extend({props:{closeOnClickOutside:{type:Boolean,default:!0}},data:function(){var e=this;return{clickOutsideHandler:function(n){e.closeOnClickOutside&&!e.$el.contains(n.target)&&e[t.method]()}}},mounted:function(){N(document,t.event,this.clickOutsideHandler)},beforeDestroy:function(){z(document,t.event,this.clickOutsideHandler)}})},qs=Object(c.a)("dropdown-menu"),Ys=qs[0],Xs=qs[1],Us=Ys({mixins:[di("vanDropdownMenu"),_s({event:"click",method:"onClickOutside"})],props:{activeColor:String,overlay:{type:Boolean,default:!0},zIndex:{type:Number,default:10},duration:{type:Number,default:.2},direction:{type:String,default:"down"},closeOnClickOverlay:{type:Boolean,default:!0}},data:function(){return{offset:0}},methods:{updateOffset:function(){var rect=this.$refs.menu.getBoundingClientRect();"down"===this.direction?this.offset=rect.bottom:this.offset=window.innerHeight-rect.top},toggleItem:function(t){this.children.forEach((function(e,n){n===t?e.toggle():e.showPopup&&e.toggle(!1,{immediate:!0})}))},onClickOutside:function(){this.children.forEach((function(t){t.toggle(!1)}))}},render:function(){var t=this,e=arguments[0],n=this.children.map((function(n,o){return e("div",{attrs:{role:"button",tabindex:n.disabled?-1:0},class:Xs("item",{disabled:n.disabled}),on:{click:function(){n.disabled||t.toggleItem(o)}}},[e("span",{class:[Xs("title",{active:n.showPopup,down:n.showPopup===("down"===t.direction)}),n.titleClass],style:{color:n.showPopup?t.activeColor:""}},[e("div",{class:"van-ellipsis"},[n.displayTitle])])])}));return e("div",{ref:"menu",class:[Xs(),w]},[n,this.slots("default")])}}),Ks=Object(c.a)("goods-action"),Gs=Ks[0],Zs=Ks[1],Js=Gs({mixins:[di("vanGoodsAction")],props:{safeAreaInsetBottom:Boolean},render:function(){var t=arguments[0];return t("div",{class:Zs({"safe-area-inset-bottom":this.safeAreaInsetBottom})},[this.slots()])}}),Qs=Object(c.a)("goods-action-button"),to=Qs[0],eo=Qs[1],io=to({mixins:[hi("vanGoodsAction")],props:Object(o.a)({},oe,{type:String,text:String,color:String,loading:Boolean,disabled:Boolean}),computed:{isFirst:function(){var t=this.parent&&this.parent.children[this.index-1];return!t||t.$options.name!==this.$options.name},isLast:function(){var t=this.parent&&this.parent.children[this.index+1];return!t||t.$options.name!==this.$options.name}},methods:{onClick:function(t){this.$emit("click",t),ne(this.$router,this)}},render:function(){var t=arguments[0];return t(Ae,{class:eo([{first:this.isFirst,last:this.isLast},this.type]),attrs:{square:!0,size:"large",type:this.type,color:this.color,loading:this.loading,disabled:this.disabled},on:{click:this.onClick}},[this.slots()||this.text])}}),no=Object(c.a)("goods-action-icon"),so=no[0],oo=no[1],ao=so({mixins:[hi("vanGoodsAction")],props:Object(o.a)({},oe,{text:String,icon:String,info:[Number,String],iconClass:null}),methods:{onClick:function(t){this.$emit("click",t),ne(this.$router,this)}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"button",tabindex:"0"},class:oo(),on:{click:this.onClick}},[this.slots("icon")?t("div",{class:oo("icon")},[this.slots("icon")]):t(yt,{class:[oo("icon"),this.iconClass],attrs:{tag:"div",info:this.info,name:this.icon}}),this.slots()||this.text])}}),ro=Object(c.a)("grid"),lo=ro[0],co=ro[1],uo=lo({mixins:[di("vanGrid")],props:{square:Boolean,gutter:[Number,String],iconSize:[Number,String],clickable:Boolean,columnNum:{type:Number,default:4},center:{type:Boolean,default:!0},border:{type:Boolean,default:!0}},computed:{style:function(){var t=this.gutter;if(t)return{paddingLeft:Object(nt.a)(t)}}},render:function(){var t,e=arguments[0];return e("div",{style:this.style,class:[co(),(t={},t[x]=this.border&&!this.gutter,t)]},[this.slots()])}}),ho=Object(c.a)("grid-item"),fo=ho[0],po=ho[1],mo=fo({mixins:[hi("vanGrid")],props:Object(o.a)({},oe,{dot:Boolean,text:String,icon:String,info:[Number,String]}),computed:{style:function(){var t=this.parent,e=t.square,n=t.gutter,o=t.columnNum,r=100/o+"%",style={flexBasis:r};if(e)style.paddingTop=r;else if(n){var l=Object(nt.a)(n);style.paddingRight=l,this.index>=o&&(style.marginTop=l)}return style},contentStyle:function(){var t=this.parent,e=t.square,n=t.gutter;if(e&&n){var o=Object(nt.a)(n);return{right:o,bottom:o,height:"auto"}}}},methods:{onClick:function(t){this.$emit("click",t),ne(this.$router,this)},genIcon:function(){var t=this.$createElement,e=this.slots("icon");return e?t("div",{class:po("icon-wrapper")},[e,t(ct,{attrs:{dot:this.dot,info:this.info}})]):this.icon?t(yt,{attrs:{name:this.icon,dot:this.dot,info:this.info,size:this.parent.iconSize},class:po("icon")}):void 0},genContent:function(){var t=this.$createElement,slot=this.slots();return slot||[this.genIcon(),this.slots("text")||this.text&&t("span",{class:po("text")},[this.text])]}},render:function(){var t,e=arguments[0],n=this.parent,o=n.center,r=n.border,l=n.square,c=n.gutter,h=n.clickable;return e("div",{class:[po({square:l})],style:this.style},[e("div",{style:this.contentStyle,attrs:{role:h?"button":null,tabindex:h?0:null},class:[po("content",{center:o,square:l,clickable:h,surround:r&&c}),(t={},t[S]=r,t)],on:{click:this.onClick}},[this.genContent()])])}}),vo=Object(c.a)("swipe"),go=vo[0],bo=vo[1],yo=go({mixins:[T,E((function(t,e){t(window,"resize",this.onResize,!0),e?this.initialize():this.clear()}))],props:{width:Number,height:Number,autoplay:Number,vertical:Boolean,indicatorColor:String,loop:{type:Boolean,default:!0},duration:{type:Number,default:500},touchable:{type:Boolean,default:!0},initialSwipe:{type:Number,default:0},showIndicators:{type:Boolean,default:!0}},data:function(){return{computedWidth:0,computedHeight:0,offset:0,active:0,deltaX:0,deltaY:0,swipes:[],swiping:!1}},watch:{swipes:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t?this.autoPlay():this.clear()}},computed:{count:function(){return this.swipes.length},delta:function(){return this.vertical?this.deltaY:this.deltaX},size:function(){return this[this.vertical?"computedHeight":"computedWidth"]},trackSize:function(){return this.count*this.size},activeIndicator:function(){return(this.active+this.count)%this.count},isCorrectDirection:function(){var t=this.vertical?"vertical":"horizontal";return this.direction===t},trackStyle:function(){var t,e=this.vertical?"height":"width",n=this.vertical?"width":"height";return(t={})[e]=this.trackSize+"px",t[n]=this[n]?this[n]+"px":"",t.transitionDuration=(this.swiping?0:this.duration)+"ms",t.transform="translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)",t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}},minOffset:function(){var rect=this.$el.getBoundingClientRect();return(this.vertical?rect.height:rect.width)-this.size*this.count}},methods:{initialize:function(t){if(void 0===t&&(t=this.initialSwipe),clearTimeout(this.timer),this.$el){var rect=this.$el.getBoundingClientRect();this.computedWidth=this.width||rect.width,this.computedHeight=this.height||rect.height}this.swiping=!0,this.active=t,this.offset=this.count>1?-this.size*this.active:0,this.swipes.forEach((function(t){t.offset=0})),this.autoPlay()},onResize:function(){this.initialize(this.activeIndicator)},onTouchStart:function(t){this.touchable&&(this.clear(),this.swiping=!0,this.touchStart(t),this.correctPosition())},onTouchMove:function(t){this.touchable&&this.swiping&&(this.touchMove(t),this.isCorrectDirection&&(A(t,!0),this.move({offset:this.delta})))},onTouchEnd:function(){if(this.touchable&&this.swiping){if(this.delta&&this.isCorrectDirection){var t=this.vertical?this.offsetY:this.offsetX;this.move({pace:t>0?this.delta>0?-1:1:0,emitChange:!0})}this.swiping=!1,this.autoPlay()}},getTargetActive:function(t){var e=this.active,n=this.count;return t?this.loop?Rt(e+t,-1,n):Rt(e+t,0,n-1):e},getTargetOffset:function(t,e){var n=t*this.size;this.loop||(n=Math.min(n,-this.minOffset));var o=Math.round(e-n);return this.loop||(o=Rt(o,this.minOffset,0)),o},move:function(t){var e=t.pace,n=void 0===e?0:e,o=t.offset,r=void 0===o?0:o,l=t.emitChange,c=this.loop,h=this.count,d=this.active,f=this.swipes,m=this.trackSize,v=this.minOffset;if(!(h<=1)){var y=this.getTargetActive(n),k=this.getTargetOffset(y,r);if(c){if(f[0]){var S=k0;f[h-1].offset=x?-m:0}}this.active=y,this.offset=k,l&&y!==d&&this.$emit("change",this.activeIndicator)}},swipeTo:function(t,e){var n=this;void 0===e&&(e={}),this.swiping=!0,this.resetTouchStatus(),this.correctPosition(),Object(Ji.b)((function(){var o;o=n.loop&&t===n.count?0===n.active?0:t:t%n.count,n.move({pace:o-n.active,emitChange:!0}),e.immediate?Object(Ji.b)((function(){n.swiping=!1})):n.swiping=!1}))},correctPosition:function(){this.active<=-1&&this.move({pace:this.count}),this.active>=this.count&&this.move({pace:-this.count})},clear:function(){clearTimeout(this.timer)},autoPlay:function(){var t=this,e=this.autoplay;e&&this.count>1&&(this.clear(),this.timer=setTimeout((function(){t.swiping=!0,t.resetTouchStatus(),t.correctPosition(),Object(Ji.b)((function(){t.swiping=!1,t.move({pace:1,emitChange:!0}),t.autoPlay()}))}),e))},genIndicator:function(){var t=this,e=this.$createElement,n=this.count,o=this.activeIndicator,slot=this.slots("indicator");return slot||(this.showIndicators&&n>1?e("div",{class:bo("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(n)).map((function(n,r){return e("i",{class:bo("indicator",{active:r===o}),style:r===o?t.indicatorStyle:null})}))]):void 0)}},render:function(){var t=arguments[0];return t("div",{class:bo()},[t("div",{ref:"track",style:this.trackStyle,class:bo("track"),on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[this.slots()]),this.genIndicator()])}}),ko=Object(c.a)("swipe-item"),So=ko[0],xo=ko[1],Co=So({data:function(){return{offset:0}},beforeCreate:function(){this.$parent.swipes.push(this)},destroyed:function(){this.$parent.swipes.splice(this.$parent.swipes.indexOf(this),1)},render:function(){var t=arguments[0],e=this.$parent,n=e.vertical,r=e.computedWidth,l=e.computedHeight,style={width:r+"px",height:n?l+"px":"100%",transform:"translate"+(n?"Y":"X")+"("+this.offset+"px)"};return t("div",{class:xo(),style:style,on:Object(o.a)({},this.$listeners)},[this.slots()])}}),wo=Object(c.a)("image-preview"),Oo=wo[0],To=wo[1];function $o(t){return Math.sqrt(Math.pow(t[0].clientX-t[1].clientX,2)+Math.pow(t[0].clientY-t[1].clientY,2))}var Bo,Io=Oo({mixins:[it,T],props:{className:null,lazyLoad:Boolean,asyncClose:Boolean,showIndicators:Boolean,images:{type:Array,default:function(){return[]}},loop:{type:Boolean,default:!0},swipeDuration:{type:Number,default:500},overlay:{type:Boolean,default:!0},showIndex:{type:Boolean,default:!0},startPosition:{type:Number,default:0},minZoom:{type:Number,default:1/3},maxZoom:{type:Number,default:3},overlayClass:{type:String,default:To("overlay")}},data:function(){return{scale:1,moveX:0,moveY:0,active:0,moving:!1,zooming:!1,doubleClickTimer:null}},computed:{imageStyle:function(){var t=this.scale,style={transitionDuration:this.zooming||this.moving?"0s":".3s"};return 1!==t&&(style.transform="scale3d("+t+", "+t+", 1) translate("+this.moveX/t+"px, "+this.moveY/t+"px)"),style}},watch:{value:function(){this.setActive(this.startPosition)},startPosition:function(t){this.setActive(t)}},methods:{onWrapperTouchStart:function(){this.touchStartTime=new Date},onWrapperTouchEnd:function(t){var e=this;A(t);var n=new Date-this.touchStartTime,o=this.$refs.swipe||{},r=o.offsetX,l=void 0===r?0:r,c=o.offsetY;n<300&&l<10&&(void 0===c?0:c)<10&&(this.doubleClickTimer?(clearTimeout(this.doubleClickTimer),this.doubleClickTimer=null,this.toggleScale()):this.doubleClickTimer=setTimeout((function(){var t=e.active;e.$emit("close",{index:t,url:e.images[t]}),e.asyncClose||e.$emit("input",!1),e.doubleClickTimer=null}),300))},startMove:function(t){var rect=t.currentTarget.getBoundingClientRect(),e=window.innerWidth,n=window.innerHeight;this.touchStart(t),this.moving=!0,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.maxMoveX=Math.max(0,(rect.width-e)/2),this.maxMoveY=Math.max(0,(rect.height-n)/2)},startZoom:function(t){this.moving=!1,this.zooming=!0,this.startScale=this.scale,this.startDistance=$o(t.touches)},onImageTouchStart:function(t){var e=t.touches,n=(this.$refs.swipe||{}).offsetX,o=void 0===n?0:n;1===e.length&&1!==this.scale?this.startMove(t):2!==e.length||o||this.startZoom(t)},onImageTouchMove:function(t){var e=t.touches;if((this.moving||this.zooming)&&A(t,!0),this.moving){this.touchMove(t);var n=this.deltaX+this.startMoveX,o=this.deltaY+this.startMoveY;this.moveX=Rt(n,-this.maxMoveX,this.maxMoveX),this.moveY=Rt(o,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&2===e.length){var r=$o(e),l=this.startScale*r/this.startDistance;this.scale=Rt(l,this.minZoom,this.maxZoom)}},onImageTouchEnd:function(t){if(this.moving||this.zooming){var e=!0;this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(e=!1),t.touches.length||(this.moving=!1,this.zooming=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale()),e&&A(t,!0)}},setActive:function(t){this.resetScale(),t!==this.active&&(this.active=t,this.$emit("change",t))},resetScale:function(){this.scale=1,this.moveX=0,this.moveY=0},toggleScale:function(){var t=this.scale>1?1:2;this.scale=t,this.moveX=0,this.moveY=0},genIndex:function(){var t=this.$createElement;if(this.showIndex)return t("div",{class:To("index")},[this.slots("index")||this.active+1+" / "+this.images.length])},genCover:function(){var t=this.$createElement,e=this.slots("cover");if(e)return t("div",{class:To("cover")},[e])},genImages:function(){var t=this,e=this.$createElement,n={loading:function(){return e(jt,{attrs:{type:"spinner"}})}};return e(yo,{ref:"swipe",attrs:{loop:this.loop,duration:this.swipeDuration,indicatorColor:"white",initialSwipe:this.startPosition,showIndicators:this.showIndicators},class:To("swipe"),on:{change:this.setActive},nativeOn:{touchstart:this.onWrapperTouchStart,touchMove:A,touchend:this.onWrapperTouchEnd,touchcancel:this.onWrapperTouchEnd}},[this.images.map((function(image,o){return e(Co,[e(pt,{attrs:{src:image,fit:"contain",lazyLoad:t.lazyLoad},class:To("image"),scopedSlots:n,style:o===t.active?t.imageStyle:null,nativeOn:{touchstart:t.onImageTouchStart,touchmove:t.onImageTouchMove,touchend:t.onImageTouchEnd,touchcancel:t.onImageTouchEnd}})])}))])}},render:function(){var t=arguments[0];if(this.value)return t("transition",{attrs:{name:"van-fade"}},[t("div",{class:[To(),this.className]},[this.genImages(),this.genIndex(),this.genCover()])])}}),jo={images:[],loop:!0,swipeDuration:500,value:!0,minZoom:1/3,maxZoom:3,className:"",onClose:null,onChange:null,lazyLoad:!1,showIndex:!0,asyncClose:!1,startPosition:0,showIndicators:!1,closeOnPopstate:!1},No=function(t,e){if(void 0===e&&(e=0),!B.d){Bo||(Bo=new(h.default.extend(Io))({el:document.createElement("div")}),document.body.appendChild(Bo.$el),Bo.$on("change",(function(t){Bo.onChange&&Bo.onChange(t)})));var n=Array.isArray(t)?{images:t,startPosition:e}:t;return Object(o.a)(Bo,jo,n),Bo.$once("input",(function(t){Bo.value=t})),n.onClose&&Bo.$once("close",n.onClose),Bo}};No.install=function(){h.default.use(Io)};var zo=No,Do=Object(c.a)("index-anchor"),Ao=Do[0],Eo=Do[1],Fo=Ao({mixins:[hi("vanIndexBar",{indexKey:"childrenIndex"})],props:{index:[Number,String]},data:function(){return{top:0,active:!1,position:"static"}},computed:{sticky:function(){return this.active&&this.parent.sticky},anchorStyle:function(){if(this.sticky)return{position:this.position,zIndex:""+this.parent.zIndex,transform:"translate3d(0, "+this.top+"px, 0)",color:this.parent.highlightColor}}},mounted:function(){this.height=this.$el.offsetHeight},methods:{scrollIntoView:function(){this.$el.scrollIntoView()}},render:function(){var t,e=arguments[0],n=this.sticky;return e("div",{style:{height:n?this.height+"px":null}},[e("div",{style:this.anchorStyle,class:[Eo({sticky:n}),(t={},t[C]=n,t)]},[this.slots("default")||this.index])])}}),Mo=Object(c.a)("index-bar"),Lo=Mo[0],Po=Mo[1],Vo=Lo({mixins:[T,di("vanIndexBar"),E((function(t){this.scroller||(this.scroller=G(this.$el)),t(this.scroller,"scroll",this.onScroll)}))],props:{sticky:{type:Boolean,default:!0},zIndex:{type:Number,default:1},highlightColor:{type:String,default:"#07c160"},stickyOffsetTop:{type:Number,default:0},indexList:{type:Array,default:function(){for(var t=[],e="A".charCodeAt(0),i=0;i<26;i++)t.push(String.fromCharCode(e+i));return t}}},data:function(){return{activeAnchorIndex:null}},computed:{highlightStyle:function(){var t=this.highlightColor;if(t)return{color:t}}},watch:{indexList:function(){this.$nextTick(this.onScroll)}},methods:{onScroll:function(){var t=this,e=Z(this.scroller),n=this.getScrollerRect(),o=this.children.map((function(e){return{height:e.height,top:t.getElementTop(e.$el,n)}})),r=this.getActiveAnchorIndex(e,o);if(this.activeAnchorIndex=this.indexList[r],this.sticky){var l=0,c=!1;-1!==r&&(l=o[r].top-e,c=l<=0),this.children.forEach((function(e,o){o===r?(e.active=!0,e.position=c?"fixed":"relative",e.top=c?t.stickyOffsetTop+n.top:0):o===r-1?(e.active=!c,e.position="relative",e.top=e.$el.parentElement.offsetHeight-e.height):(e.active=!1,e.position="static")}))}},getScrollerRect:function(){var t=this.scroller,e={top:0,left:0};return t.getBoundingClientRect&&(e=t.getBoundingClientRect()),e},getElementTop:function(t,e){var n=this.scroller;return n===window||n===document.body?et(t):t.getBoundingClientRect().top-e.top+Z(n)},getActiveAnchorIndex:function(t,e){for(var i=this.children.length-1;i>=0;i--){if(t+(i>0?e[i-1].height:0)+this.stickyOffsetTop>=e[i].top)return i}return-1},onClick:function(t){this.scrollToElement(t.target)},onTouchMove:function(t){if(this.touchMove(t),"vertical"===this.direction){A(t);var e=t.touches[0],n=e.clientX,o=e.clientY,r=document.elementFromPoint(n,o);if(r){var l=r.dataset.index;this.touchActiveIndex!==l&&(this.touchActiveIndex=l,this.scrollToElement(r))}}},scrollToElement:function(element){var t=element.dataset.index;if(t){var e=this.children.filter((function(e){return String(e.index)===t}));e[0]&&(e[0].scrollIntoView(),this.stickyOffsetTop&&tt(Q()-this.stickyOffsetTop),this.$emit("select",e[0].index))}},onTouchEnd:function(){this.active=null}},render:function(){var t=this,e=arguments[0],n=this.indexList.map((function(n){var o=n===t.activeAnchorIndex;return e("span",{class:Po("index",{active:o}),style:o?t.highlightStyle:null,attrs:{"data-index":n}},[n])}));return e("div",{class:Po()},[e("div",{class:Po("sidebar"),style:{zIndex:this.zIndex+1},on:{click:this.onClick,touchstart:this.touchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[n]),this.slots("default")])}}),Ro=Object(c.a)("list"),Ho=Ro[0],Wo=Ro[1],_o=Ro[2],qo=Ho({mixins:[E((function(t){this.scroller||(this.scroller=G(this.$el)),t(this.scroller,"scroll",this.check)}))],model:{prop:"loading"},props:{error:Boolean,loading:Boolean,finished:Boolean,errorText:String,loadingText:String,finishedText:String,immediateCheck:{type:Boolean,default:!0},offset:{type:Number,default:300},direction:{type:String,default:"down"}},data:function(){return{innerLoading:this.loading}},mounted:function(){this.immediateCheck&&this.check()},watch:{finished:"check",loading:function(t){this.innerLoading=t,this.check()}},methods:{check:function(){var t=this;this.$nextTick((function(){if(!(t.innerLoading||t.finished||t.error)){var e,n=t.$el,o=t.scroller,r=t.offset,l=t.direction;if(!((e=o.getBoundingClientRect?o.getBoundingClientRect():{top:0,bottom:o.innerHeight}).bottom-e.top)||ns(n))return!1;var c=t.$refs.placeholder.getBoundingClientRect();("up"===l?c.top-e.top<=r:c.bottom-e.bottom<=r)&&(t.innerLoading=!0,t.$emit("input",!0),t.$emit("load"))}}))},clickErrorText:function(){this.$emit("update:error",!1),this.check()},genLoading:function(){var t=this.$createElement;if(this.innerLoading)return t("div",{class:Wo("loading"),key:"loading"},[this.slots("loading")||t(jt,{attrs:{size:"16"}},[this.loadingText||_o("loading")])])},genFinishedText:function(){var t=this.$createElement;if(this.finished&&this.finishedText)return t("div",{class:Wo("finished-text")},[this.finishedText])},genErrorText:function(){var t=this.$createElement;if(this.error&&this.errorText)return t("div",{on:{click:this.clickErrorText},class:Wo("error-text")},[this.errorText])}},render:function(){var t=arguments[0],e=t("div",{ref:"placeholder",class:Wo("placeholder")});return t("div",{class:Wo(),attrs:{role:"feed","aria-busy":this.innerLoading}},["down"===this.direction?this.slots():e,this.genLoading(),this.genFinishedText(),this.genErrorText(),"up"===this.direction?this.slots():e])}}),Yo=Object(c.a)("nav-bar"),Xo=Yo[0],Uo=Yo[1];function Ko(t,e,n,o){var r;return t("div",l()([{class:[Uo({fixed:e.fixed}),(r={},r[C]=e.border,r)],style:{zIndex:e.zIndex}},m(o)]),[t("div",{class:Uo("left"),on:{click:o.listeners["click-left"]||B.e}},[n.left?n.left():[e.leftArrow&&t(yt,{class:Uo("arrow"),attrs:{name:"arrow-left"}}),e.leftText&&t("span",{class:Uo("text")},[e.leftText])]]),t("div",{class:[Uo("title"),"van-ellipsis"]},[n.title?n.title():e.title]),t("div",{class:Uo("right"),on:{click:o.listeners["click-right"]||B.e}},[n.right?n.right():e.rightText&&t("span",{class:Uo("text")},[e.rightText])])])}Ko.props={title:String,fixed:Boolean,leftText:String,rightText:String,leftArrow:Boolean,border:{type:Boolean,default:!0},zIndex:{type:Number,default:1}};var Go=Xo(Ko),Zo=Object(c.a)("notice-bar"),Jo=Zo[0],Qo=Zo[1],ta=Jo({props:{text:String,mode:String,color:String,leftIcon:String,wrapable:Boolean,background:String,delay:{type:[Number,String],default:1},scrollable:{type:Boolean,default:!0},speed:{type:Number,default:50}},data:function(){return{wrapWidth:0,firstRound:!0,duration:0,offsetWidth:0,showNoticeBar:!0,animationClass:""}},watch:{text:{handler:function(){var t=this;this.$nextTick((function(){var e=t.$refs,n=e.wrap,content=e.content;if(n&&content){var o=n.getBoundingClientRect().width,r=content.getBoundingClientRect().width;t.scrollable&&r>o&&(t.wrapWidth=o,t.offsetWidth=r,t.duration=r/t.speed,t.animationClass=Qo("play"))}}))},immediate:!0}},methods:{onClickIcon:function(t){"closeable"===this.mode&&(this.showNoticeBar=!1,this.$emit("close",t))},onAnimationEnd:function(){var t=this;this.firstRound=!1,this.$nextTick((function(){t.duration=(t.offsetWidth+t.wrapWidth)/t.speed,t.animationClass=Qo("play--infinite")}))}},render:function(){var t=this,e=arguments[0],n=this.slots,o=this.mode,r=this.leftIcon,l=this.onClickIcon,c={color:this.color,background:this.background},h={paddingLeft:this.firstRound?0:this.wrapWidth+"px",animationDelay:(this.firstRound?this.delay:0)+"s",animationDuration:this.duration+"s"};function d(){var slot=n("left-icon");return slot||(r?e(yt,{class:Qo("left-icon"),attrs:{name:r}}):void 0)}function f(){var slot=n("right-icon");if(slot)return slot;var t="closeable"===o?"cross":"link"===o?"arrow":"";return t?e(yt,{class:Qo("right-icon"),attrs:{name:t},on:{click:l}}):void 0}return e("div",{attrs:{role:"alert"},directives:[{name:"show",value:this.showNoticeBar}],class:Qo({wrapable:this.wrapable}),style:c,on:{click:function(e){t.$emit("click",e)}}},[d(),e("div",{ref:"wrap",class:Qo("wrap"),attrs:{role:"marquee"}},[e("div",{ref:"content",class:[Qo("content"),this.animationClass,{"van-ellipsis":!this.scrollable&&!this.wrapable}],style:h,on:{animationend:this.onAnimationEnd,webkitAnimationEnd:this.onAnimationEnd}},[this.slots()||this.text])]),f()])}}),ea=Object(c.a)("notify"),ia=ea[0],na=ea[1];function sa(t,e,n,o){var style={color:e.color,background:e.background};return t(Ct,l()([{attrs:{value:e.value,position:"top",overlay:!1,duration:.2,lockScroll:!1},style:style,class:[na([e.type]),e.className]},m(o,!0)]),[e.message])}sa.props=Object(o.a)({},it.props,{background:String,className:null,message:[Number,String],getContainer:[String,Function],type:{type:String,default:"danger"},color:{type:String,default:"#fff"},duration:{type:Number,default:3e3}});var oa,aa,ra=ia(sa);function la(t){var e;if(!B.d)return aa||(aa=y(ra,{on:{click:function(t){aa.onClick&&aa.onClick(t)},close:function(){aa.onClose&&aa.onClose()},opened:function(){aa.onOpened&&aa.onOpened()}}})),t=Object(o.a)({},la.currentOptions,{},(e=t,Object(B.c)(e)?e:{message:e})),Object(o.a)(aa,t),clearTimeout(oa),t.duration&&t.duration>0&&(oa=setTimeout(la.clear,t.duration)),aa}la.clear=function(){aa&&(aa.value=!1)},la.currentOptions={type:"danger",value:!0,message:"",color:"#fff",background:void 0,duration:3e3,className:"",onClose:null,onClick:null,onOpened:null},la.setDefaultOptions=function(t){Object(o.a)(la.currentOptions,t)},la.resetDefaultOptions=function(){la.currentOptions={type:"danger",value:!0,message:"",color:"#fff",background:void 0,duration:3e3,className:"",onClose:null,onClick:null,onOpened:null}},la.install=function(){h.default.use(ra)},h.default.prototype.$notify=la;var ca=la,ua=Object(c.a)("key"),ha=ua[0],da=ua[1],fa=ha({mixins:[T],props:{type:String,text:[Number,String],theme:{type:Array,default:function(){return[]}}},data:function(){return{active:!1}},computed:{className:function(){var t=this.theme.slice(0);return this.active&&t.push("active"),this.type&&t.push(this.type),da(t)}},methods:{onTouchStart:function(t){t.stopPropagation(),this.touchStart(t),this.active=!0},onTouchMove:function(t){this.touchMove(t),this.direction&&(this.active=!1)},onTouchEnd:function(){this.active&&(this.active=!1,this.$emit("press",this.text,this.type))}},render:function(){var t=arguments[0];return t("i",{attrs:{role:"button",tabindex:"0"},class:[S,this.className],on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[this.slots("default")||this.text])}}),pa=Object(c.a)("number-keyboard"),ma=pa[0],va=pa[1],ga=pa[2],ba=["blue","big"],ya=["delete","big","gray"],ka=ma({mixins:[E((function(t){this.hideOnClickOutside&&t(document.body,"touchstart",this.onBlur)}))],model:{event:"update:value"},props:{show:Boolean,title:String,closeButtonText:String,deleteButtonText:String,theme:{type:String,default:"default"},value:{type:String,default:""},extraKey:{type:String,default:""},maxlength:{type:[Number,String],default:Number.MAX_VALUE},zIndex:{type:Number,default:100},transition:{type:Boolean,default:!0},showDeleteKey:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0}},watch:{show:function(){this.transition||this.$emit(this.show?"show":"hide")}},computed:{keys:function(){for(var t=[],i=1;i<=9;i++)t.push({text:i});switch(this.theme){case"default":t.push({text:this.extraKey,theme:["gray"],type:"extra"},{text:0},{text:this.deleteText,theme:["gray"],type:"delete"});break;case"custom":t.push({text:0,theme:["middle"]},{text:this.extraKey,type:"extra"})}return t},deleteText:function(){return this.deleteButtonText||ga("delete")}},methods:{onBlur:function(){this.$emit("blur")},onClose:function(){this.$emit("close"),this.onBlur()},onAnimationEnd:function(){this.$emit(this.show?"show":"hide")},onPress:function(text,t){if(""!==text){var e=this.value;"delete"===t?(this.$emit("delete"),this.$emit("update:value",e.slice(0,e.length-1))):"close"===t?this.onClose():e.lengthe&&(n=(o=e)-this.showPageSize+1);for(var l=n;l<=o;l++){var c=Oa(l,l,l===this.value);t.push(c)}if(r&&this.showPageSize>0&&this.forceEllipses){if(n>1){var h=Oa(n-1,"...",!1);t.unshift(h)}if(o=0&&t<=100}},showPivot:{type:Boolean,default:!0}},data:function(){return{pivotWidth:0,progressWidth:0}},mounted:function(){this.setWidth()},watch:{showPivot:"setWidth",pivotText:"setWidth"},methods:{setWidth:function(){var t=this;this.$nextTick((function(){t.progressWidth=t.$el.offsetWidth,t.pivotWidth=t.$refs.pivot?t.$refs.pivot.offsetWidth:0}))}},render:function(){var t=arguments[0],e=this.pivotText,n=this.percentage,text=Object(B.b)(e)?e:n+"%",o=this.showPivot&&text,r=this.inactive?"#cacaca":this.color,l={color:this.textColor,left:(this.progressWidth-this.pivotWidth)*n/100+"px",background:this.pivotColor||r},c={background:r,width:this.progressWidth*n/100+"px"},h={background:this.trackColor,height:Object(nt.a)(this.strokeWidth)};return t("div",{class:Pa(),style:h},[t("span",{class:Pa("portion"),style:c},[o&&t("span",{ref:"pivot",style:l,class:Pa("pivot")},[text])])])}}),Ra=Object(c.a)("pull-refresh"),Ha=Ra[0],Wa=Ra[1],_a=Ra[2],qa=["pulling","loosing","success"],Ya=Ha({mixins:[T],props:{disabled:Boolean,successText:String,pullingText:String,loosingText:String,loadingText:String,value:{type:Boolean,required:!0},successDuration:{type:Number,default:500},animationDuration:{type:Number,default:300},headHeight:{type:Number,default:50}},data:function(){return{status:"normal",distance:0,duration:0}},computed:{untouchable:function(){return"loading"===this.status||"success"===this.status||this.disabled}},watch:{value:function(t){var e=this;this.duration=this.animationDuration,!t&&this.successText?(this.status="success",setTimeout((function(){e.setStatus(0)}),this.successDuration)):this.setStatus(t?this.headHeight:0,t)}},mounted:function(){this.scrollEl=G(this.$el)},methods:{onTouchStart:function(t){!this.untouchable&&this.getCeiling()&&(this.duration=0,this.touchStart(t))},onTouchMove:function(t){this.untouchable||(this.touchMove(t),!this.ceiling&&this.getCeiling()&&(this.duration=0,this.startY=t.touches[0].clientY,this.deltaY=0),this.ceiling&&this.deltaY>=0&&"vertical"===this.direction&&(this.setStatus(this.ease(this.deltaY)),A(t)))},onTouchEnd:function(){var t=this;!this.untouchable&&this.ceiling&&this.deltaY&&(this.duration=this.animationDuration,"loosing"===this.status?(this.setStatus(this.headHeight,!0),this.$emit("input",!0),this.$nextTick((function(){t.$emit("refresh")}))):this.setStatus(0))},getCeiling:function(){return this.ceiling=0===Z(this.scrollEl),this.ceiling},ease:function(t){var e=this.headHeight;return Math.round(t=e?"full":t+.5>=e&&n?"half":"void"));return o},sizeWithUnit:function(){return Object(nt.a)(this.size)},gutterWithUnit:function(){return Object(nt.a)(this.gutter)}},methods:{select:function(t){this.disabled||this.readonly||t===this.value||(this.$emit("input",t),this.$emit("change",t))},onTouchStart:function(t){var e=this;if(!this.readonly&&!this.disabled&&this.touchable){this.touchStart(t);var n=this.$refs.items.map((function(t){return t.getBoundingClientRect()})),o=[];n.forEach((function(rect,t){e.allowHalf?o.push({score:t+.5,left:rect.left},{score:t+1,left:rect.left+rect.width/2}):o.push({score:t+1,left:rect.left})})),this.ranges=o}},onTouchMove:function(t){if(!this.readonly&&!this.disabled&&this.touchable&&(this.touchMove(t),"horizontal"===this.direction)){A(t);var e=t.touches[0].clientX;this.select(this.getScoreByPosition(e))}},getScoreByPosition:function(t){for(var i=this.ranges.length-1;i>0;i--)if(t>this.ranges[i].left)return this.ranges[i].score;return this.allowHalf?.5:1},genStar:function(t,e){var style,n=this,o=this.$createElement,r=this.icon,l=this.color,c=this.count,h=this.voidIcon,d=this.disabled,f=this.voidColor,m=this.disabledColor,v=e+1,y="full"===t,k="void"===t;return this.gutterWithUnit&&v!==c&&(style={paddingRight:this.gutterWithUnit}),o("div",{ref:"items",refInFor:!0,key:e,attrs:{role:"radio",tabindex:"0","aria-setsize":c,"aria-posinset":v,"aria-checked":String(!k)},style:style,class:Ka("item")},[o(yt,{attrs:{size:this.sizeWithUnit,name:y?r:h,"data-score":v,color:d?m:y?l:f},class:Ka("icon"),on:{click:function(){n.select(v)}}}),this.allowHalf&&o(yt,{attrs:{size:this.sizeWithUnit,name:k?h:r,"data-score":v-.5,color:d?m:k?f:l},class:Ka("icon","half"),on:{click:function(){n.select(v-.5)}}})])}},render:function(){var t=this,e=arguments[0];return e("div",{class:Ka(),attrs:{tabindex:"0",role:"radiogroup"},on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove}},[this.list.map((function(e,n){return t.genStar(e,n)}))])}}),Za=Object(c.a)("row"),Ja=Za[0],Qa=Za[1],er=Ja({props:{type:String,align:String,justify:String,tag:{type:String,default:"div"},gutter:{type:[Number,String],default:0}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,e=arguments[0],n=this.align,o=this.justify,r="flex"===this.type,l="-"+Number(this.gutter)/2+"px",style=this.gutter?{marginLeft:l,marginRight:l}:{};return e(this.tag,{style:style,class:Qa((t={flex:r},t["align-"+n]=r&&n,t["justify-"+o]=r&&o,t)),on:{click:this.onClick}},[this.slots()])}}),ir=Object(c.a)("search"),nr=ir[0],sr=ir[1],or=ir[2];function ar(t,e,n,r){var c={attrs:r.data.attrs,on:Object(o.a)({},r.listeners,{keypress:function(t){13===t.keyCode&&(A(t),v(r,"search",e.value)),v(r,"keypress",t)}})},h=m(r);return h.attrs=void 0,t("div",l()([{class:sr({"show-action":e.showAction}),style:{background:e.background}},h]),[t("div",{class:sr("content",e.shape)},[function(){if(n.label||e.label)return t("div",{class:sr("label")},[n.label?n.label():e.label])}(),t(ve,l()([{attrs:{type:"search",border:!1,value:e.value,leftIcon:e.leftIcon,rightIcon:e.rightIcon,clearable:e.clearable},scopedSlots:{"left-icon":n["left-icon"],"right-icon":n["right-icon"]}},c]))]),function(){if(e.showAction)return t("div",{class:sr("action"),attrs:{role:"button",tabindex:"0"},on:{click:function(){n.action||(v(r,"input",""),v(r,"cancel"))}}},[n.action?n.action():e.actionText||or("cancel")])}()])}ar.props={value:String,label:String,rightIcon:String,actionText:String,showAction:Boolean,shape:{type:String,default:"square"},clearable:{type:Boolean,default:!0},background:{type:String,default:"#fff"},leftIcon:{type:String,default:"search"}};var rr=nr(ar),lr=Object(c.a)("sidebar"),cr=lr[0],ur=lr[1],dr=cr({mixins:[di("vanSidebar")],model:{prop:"activeKey"},props:{activeKey:{type:[Number,String],default:0}},render:function(){var t=arguments[0];return t("div",{class:ur()},[this.slots()])}}),fr=Object(c.a)("sidebar-item"),pr=fr[0],mr=fr[1],vr=pr({mixins:[hi("vanSidebar")],props:Object(o.a)({},oe,{dot:Boolean,info:[Number,String],title:String,disabled:Boolean}),computed:{select:function(){return this.index===+this.parent.activeKey}},methods:{onClick:function(){this.disabled||(this.$emit("click",this.index),this.parent.$emit("input",this.index),this.parent.$emit("change",this.index),ne(this.$router,this))}},render:function(){var t=arguments[0];return t("a",{class:mr({select:this.select,disabled:this.disabled}),on:{click:this.onClick}},[t("div",{class:mr("text")},[this.title,t(ct,{attrs:{dot:this.dot,info:this.info},class:mr("info")})])])}}),gr=Object(c.a)("skeleton"),yr=gr[0],kr=gr[1];function Sr(t,e,n,o){if(!e.loading)return n.default&&n.default();return t("div",l()([{class:kr({animate:e.animate})},m(o)]),[function(){if(e.avatar){var n=Object(nt.a)(e.avatarSize);return t("div",{class:kr("avatar",e.avatarShape),style:{width:n,height:n}})}}(),t("div",{class:kr("content")},[function(){if(e.title)return t("h3",{class:kr("title"),style:{width:Object(nt.a)(e.titleWidth)}})}(),function(){for(var n,o=[],r=e.rowWidth,i=0;i0},qr={normalizeSkuTree:Vr,getSkuComb:Hr,getSelectedSkuValues:Wr,isAllSelected:Rr,isSkuChoosable:_r},Yr=(0,Object(c.a)("sku-row-item")[0])({props:{skuValue:Object,skuKeyStr:String,skuEventBus:Object,selectedSku:Object,skuList:{type:Array,default:function(){return[]}}},computed:{choosable:function(){return _r(this.skuList,this.selectedSku,{key:this.skuKeyStr,valueId:this.skuValue.id})}},methods:{onSelect:function(){this.choosable&&this.skuEventBus.$emit("sku:select",Object(o.a)({},this.skuValue,{skuKeyStr:this.skuKeyStr}))}},render:function(){var t=arguments[0],e=this.skuValue.id===this.selectedSku[this.skuKeyStr],n=this.skuValue.imgUrl||this.skuValue.img_url;return t("span",{class:["van-sku-row__item",{"van-sku-row__item--active":e,"van-sku-row__item--disabled":!this.choosable}],on:{click:this.onSelect}},[n&&t("img",{class:"van-sku-row__item-img",attrs:{src:n}}),t("span",{class:"van-sku-row__item-name"},[this.skuValue.name])])}}),Xr=Object(c.a)("stepper"),Ur=Xr[0],Kr=Xr[1];function Gr(t,e){return String(t)===String(e)}var Zr=Ur({props:{value:null,integer:Boolean,disabled:Boolean,inputWidth:[Number,String],buttonSize:[Number,String],asyncChange:Boolean,disableInput:Boolean,decimalLength:Number,name:{type:[Number,String],default:""},min:{type:[Number,String],default:1},max:{type:[Number,String],default:1/0},step:{type:[Number,String],default:1},defaultValue:{type:[Number,String],default:1},showPlus:{type:Boolean,default:!0},showMinus:{type:Boolean,default:!0}},data:function(){var t=Object(B.b)(this.value)?this.value:this.defaultValue,e=this.format(t);return Gr(e,this.value)||this.$emit("input",e),{currentValue:e}},computed:{minusDisabled:function(){return this.disabled||this.currentValue<=this.min},plusDisabled:function(){return this.disabled||this.currentValue>=this.max},inputStyle:function(){var style={};return this.inputWidth&&(style.width=Object(nt.a)(this.inputWidth)),this.buttonSize&&(style.height=Object(nt.a)(this.buttonSize)),style},buttonStyle:function(){if(this.buttonSize){var t=Object(nt.a)(this.buttonSize);return{width:t,height:t}}}},watch:{value:function(t){Gr(t,this.currentValue)||(this.currentValue=this.format(t))},currentValue:function(t){this.$emit("input",t),this.$emit("change",t,{name:this.name})}},methods:{filter:function(t){return t=String(t).replace(/[^0-9.-]/g,""),this.integer&&-1!==t.indexOf(".")&&(t=t.split(".")[0]),t},format:function(t){return t=""===(t=this.filter(t))?0:+t,t=Math.max(Math.min(this.max,t),this.min),Object(B.b)(this.decimalLength)&&(t=t.toFixed(this.decimalLength)),t},onInput:function(t){var e=t.target.value;if(""!==e){var n=this.filter(e);if(Object(B.b)(this.decimalLength)&&-1!==n.indexOf(".")){var o=n.split(".");n=o[0]+"."+o[1].slice(0,this.decimalLength)}Gr(e,n)||(t.target.value=n),this.emitChange(n)}},emitChange:function(t){this.asyncChange?(this.$emit("input",t),this.$emit("change",t,{name:this.name})):this.currentValue=t},onChange:function(){var t=this.type;if(this[t+"Disabled"])this.$emit("overlimit",t);else{var e,n,o,r="minus"===t?-this.step:+this.step,l=this.format((e=+this.currentValue,n=r,o=Math.pow(10,10),Math.round((e+n)*o)/o));this.emitChange(l),this.$emit(t)}},onFocus:function(t){this.$emit("focus",t)},onBlur:function(t){var e=this.format(t.target.value);t.target.value=e,this.currentValue=e,this.$emit("blur",t),de()},longPressStep:function(){var t=this;this.longPressTimer=setTimeout((function(){t.onChange(t.type),t.longPressStep(t.type)}),200)},onTouchStart:function(){var t=this;clearTimeout(this.longPressTimer),this.isLongPress=!1,this.longPressTimer=setTimeout((function(){t.isLongPress=!0,t.onChange(),t.longPressStep()}),600)},onTouchEnd:function(t){clearTimeout(this.longPressTimer),this.isLongPress&&A(t)}},render:function(){var t=this,e=arguments[0],n=function(e){return{on:{click:function(){t.type=e,t.onChange()},touchstart:function(){t.type=e,t.onTouchStart(e)},touchend:t.onTouchEnd,touchcancel:t.onTouchEnd}}};return e("div",{class:Kr()},[e("button",l()([{directives:[{name:"show",value:this.showMinus}],style:this.buttonStyle,class:Kr("minus",{disabled:this.minusDisabled})},n("minus")])),e("input",{attrs:{type:"number",role:"spinbutton","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.currentValue,disabled:this.disabled||this.disableInput},class:Kr("input"),domProps:{value:this.currentValue},style:this.inputStyle,on:{input:this.onInput,focus:this.onFocus,blur:this.onBlur}}),e("button",l()([{directives:[{name:"show",value:this.showPlus}],style:this.buttonStyle,class:Kr("plus",{disabled:this.plusDisabled})},n("plus")]))])}}),Jr=Object(c.a)("sku-stepper"),Qr=Jr[0],tl=Jr[2],el=Lr.QUOTA_LIMIT,il=Lr.STOCK_LIMIT,nl=Qr({props:{stock:Number,skuEventBus:Object,skuStockNum:Number,selectedNum:Number,stepperTitle:String,disableStepperInput:Boolean,customStepperConfig:Object,quota:{type:Number,default:0},quotaUsed:{type:Number,default:0}},data:function(){return{currentNum:this.selectedNum,limitType:il}},watch:{currentNum:function(t){this.skuEventBus.$emit("sku:numChange",t)},stepperLimit:function(t){t0&&e<=this.stock?(t=e<0?0:e,this.limitType=el):(t=this.stock,this.limitType=il),t}},methods:{setCurrentNum:function(t){this.currentNum=t},onOverLimit:function(t){this.skuEventBus.$emit("sku:overLimit",{action:t,limitType:this.limitType,quota:this.quota,quotaUsed:this.quotaUsed})},onChange:function(t){var e=this.customStepperConfig.handleStepperChange;e&&e(t),this.$emit("change",t)}},render:function(){var t=this,e=arguments[0];return e("div",{class:"van-sku-stepper-stock"},[e("div",{class:"van-sku-stepper-container"},[e("div",{class:"van-sku__stepper-title"},[this.stepperTitle||tl("num")]),e(Zr,{class:"van-sku__stepper",attrs:{max:this.stepperLimit,disableInput:this.disableStepperInput},on:{overlimit:this.onOverLimit,change:this.onChange},model:{value:t.currentNum,callback:function(e){t.currentNum=e}}})])])}});function sl(t){return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)}function al(t){return Array.isArray(t)?t:[t]}function rl(t,e){return new Promise((function(n){if("file"!==e){var o=new FileReader;o.onload=function(t){n(t.target.result)},"dataUrl"===e?o.readAsDataURL(t):"text"===e&&o.readAsText(t)}else n()}))}var ll=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;function cl(t){return!!t.isImage||(t.file&&t.file.type?0===t.file.type.indexOf("image"):t.url?(e=t.url,ll.test(e)):!!t.content&&0===t.content.indexOf("data:image"));var e}var hl=Object(c.a)("uploader"),fl=hl[0],pl=hl[1],ml=fl({inheritAttrs:!1,model:{prop:"fileList"},props:{disabled:Boolean,uploadText:String,afterRead:Function,beforeRead:Function,beforeDelete:Function,previewSize:[Number,String],name:{type:[Number,String],default:""},accept:{type:String,default:"image/*"},fileList:{type:Array,default:function(){return[]}},maxSize:{type:Number,default:Number.MAX_VALUE},maxCount:{type:Number,default:Number.MAX_VALUE},deletable:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},previewFullImage:{type:Boolean,default:!0},imageFit:{type:String,default:"cover"},resultType:{type:String,default:"dataUrl"}},computed:{previewSizeWithUnit:function(){return Object(nt.a)(this.previewSize)}},methods:{getDetail:function(t){return void 0===t&&(t=this.fileList.length),{name:this.name,index:t}},onChange:function(t){var e=this,n=t.target.files;if(!this.disabled&&n.length){if(n=1===n.length?n[0]:[].slice.call(n),this.beforeRead){var o=this.beforeRead(n,this.getDetail());if(!o)return void this.resetInput();if(o.then)return void o.then((function(){e.readFile(n)})).catch(this.resetInput)}this.readFile(n)}},readFile:function(t){var e=this,n=function(t,e){return al(t).some((function(t){return t.size>e}))}(t,this.maxSize);if(Array.isArray(t)){var o=this.maxCount-this.fileList.length;t.length>o&&(t=t.slice(0,o)),Promise.all(t.map((function(t){return rl(t,e.resultType)}))).then((function(o){var r=t.map((function(t,e){var n={file:t};return o[e]&&(n.content=o[e]),n}));e.onAfterRead(r,n)}))}else rl(t,this.resultType).then((function(content){var o={file:t};content&&(o.content=content),e.onAfterRead(o,n)}))},onAfterRead:function(t,e){e?this.$emit("oversize",t,this.getDetail()):(this.resetInput(),this.$emit("input",[].concat(this.fileList,al(t))),this.afterRead&&this.afterRead(t,this.getDetail()))},onDelete:function(t,e){var n=this;if(this.beforeDelete){var o=this.beforeDelete(t,this.getDetail(e));if(!o)return;if(o.then)return void o.then((function(){n.deleteFile(t,e)})).catch(B.e)}this.deleteFile(t,e)},deleteFile:function(t,e){var n=this.fileList.slice(0);n.splice(e,1),this.$emit("input",n),this.$emit("delete",t,this.getDetail(e))},resetInput:function(){this.$refs.input&&(this.$refs.input.value="")},onPreviewImage:function(t){var e=this;if(this.previewFullImage){var n=this.fileList.filter((function(t){return cl(t)})),o=n.map((function(t){return t.content||t.url}));this.imagePreview=zo({images:o,closeOnPopstate:!0,startPosition:n.indexOf(t),onClose:function(){e.$emit("close-preview")}})}},closeImagePreview:function(){this.imagePreview&&this.imagePreview.close()},genPreviewItem:function(t,e){var n=this,o=this.$createElement,r=this.deletable&&o(yt,{attrs:{name:"clear"},class:pl("preview-delete"),on:{click:function(o){o.stopPropagation(),n.onDelete(t,e)}}}),l=cl(t)?o(pt,{attrs:{fit:this.imageFit,src:t.content||t.url,width:this.previewSize,height:this.previewSize,radius:4},class:pl("preview-image"),on:{click:function(){n.onPreviewImage(t)}}}):o("div",{class:pl("file"),style:{width:this.previewSizeWithUnit,height:this.previewSizeWithUnit}},[o(yt,{class:pl("file-icon"),attrs:{name:"description"}}),o("div",{class:[pl("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url])]);return o("div",{class:pl("preview"),on:{click:function(){n.$emit("click-preview",t,n.getDetail(e))}}},[l,r])},genPreviewList:function(){if(this.previewImage)return this.fileList.map(this.genPreviewItem)},genUpload:function(){var t=this.$createElement;if(!(this.fileList.length>=this.maxCount)){var style,slot=this.slots(),e=t("input",{attrs:Object(o.a)({},this.$attrs,{type:"file",accept:this.accept,disabled:this.disabled}),ref:"input",class:pl("input"),on:{change:this.onChange}});if(slot)return t("div",{class:pl("input-wrapper")},[slot,e]);if(this.previewSize){var n=this.previewSizeWithUnit;style={width:n,height:n}}return t("div",{class:pl("upload"),style:style},[t(yt,{attrs:{name:"plus"},class:pl("upload-icon")}),this.uploadText&&t("span",{class:pl("upload-text")},[this.uploadText]),e])}}},render:function(){var t=arguments[0];return t("div",{class:pl()},[t("div",{class:pl("wrapper")},[this.genPreviewList(),this.genUpload()])])}}),vl=Object(c.a)("sku-img-uploader"),gl=vl[0],bl=vl[1],yl=vl[2],kl=gl({props:{value:String,uploadImg:Function,maxSize:{type:Number,default:6}},data:function(){return{paddingImg:"",uploadFail:!1}},methods:{afterReadFile:function(t){var e=this;this.paddingImg=t.content,this.uploadFail=!1,this.uploadImg(t.file,t.content).then((function(img){e.$emit("input",img),e.$nextTick((function(){e.paddingImg=""}))})).catch((function(){e.uploadFail=!0}))},onOversize:function(){this.$toast(yl("oversize",this.maxSize))},genUploader:function(content,t){void 0===t&&(t=!1);var e=this.$createElement;return e(ml,{class:bl("uploader"),attrs:{disabled:t,afterRead:this.afterReadFile,maxSize:1024*this.maxSize*1024},on:{oversize:this.onOversize}},[e("div",{class:bl("img")},[content])])},genMask:function(){var t=this.$createElement;return t("div",{class:bl("mask")},[this.uploadFail?[t(yt,{attrs:{name:"warning-o",size:"20px"}}),t("div",{class:bl("warn-text"),domProps:{innerHTML:yl("fail")}})]:t(jt,{attrs:{type:"spinner",size:"20px",color:"white"}})])}},render:function(){var t=this,e=arguments[0];return e("div",{class:bl()},[this.value&&this.genUploader([e("img",{attrs:{src:this.value}}),e(yt,{attrs:{name:"clear"},class:bl("delete"),on:{click:function(){t.$emit("input","")}}})],!0),this.paddingImg&&this.genUploader([e("img",{attrs:{src:this.paddingImg}}),this.genMask()],!this.uploadFail),!this.value&&!this.paddingImg&&this.genUploader(e("div",{class:bl("trigger")},[e(yt,{attrs:{name:"photograph",size:"22px"}})]))])}}),Sl=Object(c.a)("sku-messages"),xl=Sl[0],Cl=Sl[1],wl=Sl[2],Ol=xl({props:{messages:{type:Array,default:function(){return[]}},messageConfig:Object,goodsId:[Number,String]},data:function(){return{messageValues:this.resetMessageValues(this.messages)}},watch:{messages:function(t){this.messageValues=this.resetMessageValues(t)}},methods:{resetMessageValues:function(t){return(t||[]).map((function(){return{value:""}}))},getType:function(t){return 1==+t.multiple?"textarea":"id_no"===t.type?"text":t.datetime>0?"datetime-local":t.type},getMessages:function(){var t=this,e={};return this.messageValues.forEach((function(n,o){var r=n.value;t.messages[o].datetime>0&&(r=r.replace(/T/g," ")),e["message_"+o]=r})),e},getCartMessages:function(){var t=this,e={};return this.messageValues.forEach((function(n,o){var r=n.value,l=t.messages[o];l.datetime>0&&(r=r.replace(/T/g," ")),e[l.name]=r})),e},getPlaceholder:function(t){var e=1==+t.multiple?"textarea":t.type,map=this.messageConfig.placeholderMap||{};return t.placeholder||map[e]||wl("placeholder."+e)},validateMessages:function(){for(var t=this.messageValues,i=0;i18))return wl("invalid.id_no")}}}},render:function(){var t=this,e=arguments[0];return e(qi,{class:Cl(),attrs:{border:this.messages.length>0}},[this.messages.map((function(n,o){return"image"===n.type?e(ue,{class:Cl("image-cell"),attrs:{"value-class":Cl("image-cell-value"),label:wl("imageLabel"),title:n.name,required:"1"===String(n.required)},key:t.goodsId+"-"+o},[e(kl,{attrs:{uploadImg:t.messageConfig.uploadImg,maxSize:t.messageConfig.uploadMaxSize},model:{value:t.messageValues[o].value,callback:function(e){t.messageValues[o].value=e}}})]):e(ve,{attrs:{maxlength:"200",label:n.name,required:"1"===String(n.required),placeholder:t.getPlaceholder(n),type:t.getType(n)},key:t.goodsId+"-"+o,model:{value:t.messageValues[o].value,callback:function(e){t.messageValues[o].value=e}}})}))])}}),Tl=Object(c.a)("sku-actions"),$l=Tl[0],Bl=Tl[1],Il=Tl[2];function jl(t,e,n,o){var r=function(t){return function(){e.skuEventBus.$emit(t)}};return t("div",l()([{class:Bl()},m(o)]),[e.showAddCartBtn&&t(Ae,{attrs:{size:"large",type:"warning",text:e.addCartText||Il("addCart")},on:{click:r("sku:addCart")}}),t(Ae,{attrs:{size:"large",type:"danger",text:e.buyText||Il("buy")},on:{click:r("sku:buy")}})])}jl.props={buyText:String,addCartText:String,skuEventBus:Object,showAddCartBtn:Boolean};var Nl=$l(jl),zl=Object(c.a)("sku"),Dl=zl[0],Al=zl[1],El=zl[2],Fl=Lr.QUOTA_LIMIT,Ml=Dl({props:{sku:Object,priceTag:String,goods:Object,value:Boolean,buyText:String,goodsId:[Number,String],hideStock:Boolean,addCartText:String,stepperTitle:String,getContainer:Function,hideQuotaText:Boolean,hideSelectedText:Boolean,resetStepperOnHide:Boolean,customSkuValidator:Function,closeOnClickOverlay:Boolean,disableStepperInput:Boolean,safeAreaInsetBottom:Boolean,resetSelectedSkuOnHide:Boolean,quota:{type:Number,default:0},quotaUsed:{type:Number,default:0},initialSku:{type:Object,default:function(){return{}}},stockThreshold:{type:Number,default:50},showSoldoutSku:{type:Boolean,default:!0},showAddCartBtn:{type:Boolean,default:!0},bodyOffsetTop:{type:Number,default:200},messageConfig:{type:Object,default:function(){return{placeholderMap:{},uploadImg:function(){return Promise.resolve()},uploadMaxSize:5}}},customStepperConfig:{type:Object,default:function(){return{}}}},data:function(){return{selectedSku:{},selectedNum:1,show:this.value}},watch:{show:function(t){this.$emit("input",t),t||(this.$emit("sku-close",{selectedSkuValues:this.selectedSkuValues,selectedNum:this.selectedNum,selectedSkuComb:this.selectedSkuComb}),this.resetStepperOnHide&&this.resetStepper(),this.resetSelectedSkuOnHide&&this.resetSelectedSku(this.skuTree))},value:function(t){this.show=t},skuTree:"resetSelectedSku",initialSku:function(){this.resetStepper(),this.resetSelectedSku(this.skuTree)}},computed:{skuGroupClass:function(){return["van-sku-group-container",{"van-sku-group-container--hide-soldout":!this.showSoldoutSku}]},bodyStyle:function(){if(!this.$isServer)return{maxHeight:window.innerHeight-this.bodyOffsetTop+"px"}},isSkuCombSelected:function(){return Rr(this.sku.tree,this.selectedSku)},isSkuEmpty:function(){return 0===Object.keys(this.sku).length},hasSku:function(){return!this.sku.none_sku},selectedSkuComb:function(){return this.hasSku?this.isSkuCombSelected?Hr(this.sku.list,this.selectedSku):null:{id:this.sku.collection_id,price:Math.round(100*this.sku.price),stock_num:this.sku.stock_num}},selectedSkuValues:function(){return Wr(this.skuTree,this.selectedSku)},price:function(){return this.selectedSkuComb?(this.selectedSkuComb.price/100).toFixed(2):this.sku.price},originPrice:function(){return this.selectedSkuComb&&this.selectedSkuComb.origin_price?(this.selectedSkuComb.origin_price/100).toFixed(2):this.sku.origin_price},skuTree:function(){return this.sku.tree||[]},imageList:function(){var t=[this.goods.picture];return this.skuTree.length>0&&this.skuTree.forEach((function(e){e.v&&e.v.forEach((function(e){var img=e.previewImgUrl||e.imgUrl||e.img_url;img&&t.push(img)}))})),t},stock:function(){var t=this.customStepperConfig.stockNum;return void 0!==t?t:this.selectedSkuComb?this.selectedSkuComb.stock_num:this.sku.stock_num},stockText:function(){var t=this.$createElement,e=this.customStepperConfig.stockFormatter;return e?e(this.stock):[El("stock")+" ",t("span",{class:Al("stock-num",{highlight:this.stock0&&(text=El("quotaLimit",this.quota)),text},selectedText:function(){var t=this;if(this.selectedSkuComb)return El("selected")+" "+this.selectedSkuValues.map((function(t){return t.name})).join(";");var e=this.skuTree.filter((function(e){return""===t.selectedSku[e.k_s]})).map((function(t){return t.k})).join(";");return El("select")+" "+e}},created:function(){var t=new h.default;this.skuEventBus=t,t.$on("sku:select",this.onSelect),t.$on("sku:numChange",this.onNumChange),t.$on("sku:previewImage",this.onPreviewImage),t.$on("sku:overLimit",this.onOverLimit),t.$on("sku:addCart",this.onAddCart),t.$on("sku:buy",this.onBuy),this.resetStepper(),this.resetSelectedSku(this.skuTree),this.$emit("after-sku-create",t)},methods:{resetStepper:function(){var t=this.$refs.skuStepper,e=this.initialSku.selectedNum,n=Object(B.b)(e)?e:1;t?t.setCurrentNum(n):this.selectedNum=n},resetSelectedSku:function(t){var e=this;this.selectedSku={},t.forEach((function(t){e.selectedSku[t.k_s]=e.initialSku[t.k_s]||""})),t.forEach((function(t){var n=t.k_s,o=t.v[0].id;1===t.v.length&&_r(e.sku.list,e.selectedSku,{key:n,valueId:o})&&(e.selectedSku[n]=o)}));var n=this.selectedSkuValues;n.length>0&&this.$nextTick((function(){e.$emit("sku-selected",{skuValue:n[n.length-1],selectedSku:e.selectedSku,selectedSkuComb:e.selectedSkuComb})}))},getSkuMessages:function(){return this.$refs.skuMessages?this.$refs.skuMessages.getMessages():{}},getSkuCartMessages:function(){return this.$refs.skuMessages?this.$refs.skuMessages.getCartMessages():{}},validateSkuMessages:function(){return this.$refs.skuMessages?this.$refs.skuMessages.validateMessages():""},validateSku:function(){if(0===this.selectedNum)return El("unavailable");if(this.isSkuCombSelected)return this.validateSkuMessages();if(this.customSkuValidator){var t=this.customSkuValidator(this);if(t)return t}return El("selectSku")},onSelect:function(t){var e,n;this.selectedSku=this.selectedSku[t.skuKeyStr]===t.id?Object(o.a)({},this.selectedSku,((e={})[t.skuKeyStr]="",e)):Object(o.a)({},this.selectedSku,((n={})[t.skuKeyStr]=t.id,n)),this.$emit("sku-selected",{skuValue:t,selectedSku:this.selectedSku,selectedSkuComb:this.selectedSkuComb})},onNumChange:function(t){this.selectedNum=t},onPreviewImage:function(t){var e=this,n=this.imageList.findIndex((function(image){return image===t})),o={index:n,imageList:this.imageList,indexImage:t};this.$emit("open-preview",o),zo({images:this.imageList,startPosition:n,closeOnPopstate:!0,onClose:function(){e.$emit("close-preview",o)}})},onOverLimit:function(data){var t=data.action,e=data.limitType,n=data.quota,o=data.quotaUsed,r=this.customStepperConfig.handleOverLimit;if(r)r(data);else if("minus"===t)Be(El("minusTip"));else if("plus"===t)if(e===Fl){var l=El("quotaLimit",n);o>0&&(l+=","+El("quotaCount",o)),Be(l)}else Be(El("soldout"))},onAddCart:function(){this.onBuyOrAddCart("add-cart")},onBuy:function(){this.onBuyOrAddCart("buy-clicked")},onBuyOrAddCart:function(t){var e=this.validateSku();e?Be(e):this.$emit(t,this.getSkuData())},getSkuData:function(){return{goodsId:this.goodsId,selectedNum:this.selectedNum,selectedSkuComb:this.selectedSkuComb,messages:this.getSkuMessages(),cartMessages:this.getSkuCartMessages()}}},render:function(){var t=this,e=arguments[0];if(!this.isSkuEmpty){var n=this.sku,o=this.goods,r=this.price,l=this.originPrice,c=this.skuEventBus,h=this.selectedSku,d=this.selectedNum,f=this.stepperTitle,m=this.hideQuotaText,v=this.selectedSkuComb,y={price:r,originPrice:l,selectedNum:d,skuEventBus:c,selectedSku:h,selectedSkuComb:v},k=function(e){return t.slots(e,y)},S=k("sku-header")||e(Br,{attrs:{sku:n,goods:o,skuEventBus:c,selectedSku:h}},[k("sku-header-price")||e("div",{class:"van-sku__goods-price"},[e("span",{class:"van-sku__price-symbol"},["¥"]),e("span",{class:"van-sku__price-num"},[r]),this.priceTag&&e("span",{class:"van-sku__price-tag"},[this.priceTag])]),k("sku-header-origin-price")||l&&e(zr,[El("originPrice")," ¥",l]),!this.hideStock&&e(zr,[e("span",{class:"van-sku__stock"},[this.stockText]),!m&&this.quotaText&&e("span",{class:"van-sku__quota"},["(",this.quotaText,")"])]),this.hasSku&&!this.hideSelectedText&&e(zr,[this.selectedText]),k("sku-header-extra")]),x=k("sku-group")||this.hasSku&&e("div",{class:this.skuGroupClass},[this.skuTree.map((function(t){return e(Mr,{attrs:{skuRow:t}},[t.v.map((function(o){return e(Yr,{attrs:{skuList:n.list,skuValue:o,selectedSku:h,skuEventBus:c,skuKeyStr:t.k_s}})}))])}))]),C=k("sku-stepper")||e(nl,{ref:"skuStepper",attrs:{stock:this.stock,quota:this.quota,quotaUsed:this.quotaUsed,skuEventBus:c,selectedNum:d,selectedSku:h,stepperTitle:f,skuStockNum:n.stock_num,disableStepperInput:this.disableStepperInput,customStepperConfig:this.customStepperConfig},on:{change:function(e){t.$emit("stepper-change",e)}}}),w=k("sku-messages")||e(Ol,{ref:"skuMessages",attrs:{goodsId:this.goodsId,messageConfig:this.messageConfig,messages:n.messages}}),O=k("sku-actions")||e(Nl,{attrs:{buyText:this.buyText,skuEventBus:c,addCartText:this.addCartText,showAddCartBtn:this.showAddCartBtn}});return e(Ct,{attrs:{round:!0,closeable:!0,position:"bottom",getContainer:this.getContainer,closeOnClickOverlay:this.closeOnClickOverlay,safeAreaInsetBottom:this.safeAreaInsetBottom},class:"van-sku-container",model:{value:t.show,callback:function(e){t.show=e}}},[S,e("div",{class:"van-sku-body",style:this.bodyStyle},[k("sku-body-top"),x,k("extra-sku-group"),C,w]),O])}}});Cr.a.add({"zh-CN":{vanSku:{select:"选择",selected:"已选",selectSku:"请先选择商品规格",soldout:"库存不足",originPrice:"原价",minusTip:"至少选择一件",unavailable:"商品已经无法购买啦",stock:"剩余",stockUnit:"件",quotaLimit:function(t){return"每人限购"+t+"件"},quotaCount:function(t){return"你已购买"+t+"件"}},vanSkuActions:{buy:"立即购买",addCart:"加入购物车"},vanSkuImgUploader:{oversize:function(t){return"最大可上传图片为"+t+"MB,请尝试压缩图片尺寸"},fail:"上传失败
重新上传"},vanSkuStepper:{num:"购买数量"},vanSkuMessages:{fill:"请填写",upload:"请上传",imageLabel:"仅限一张",invalid:{tel:"请填写正确的数字格式留言",mobile:"手机号长度为6-20位数字",email:"请填写正确的邮箱",id_no:"请填写正确的身份证号码"},placeholder:{id_no:"输入身份证号码",text:"输入文本",tel:"输入数字",email:"输入邮箱",date:"点击选择日期",time:"点击选择时间",textarea:"点击填写段落文本",mobile:"输入手机号码"}}}}),Ml.SkuActions=Nl,Ml.SkuHeader=Br,Ml.SkuHeaderItem=zr,Ml.SkuMessages=Ol,Ml.SkuStepper=nl,Ml.SkuRow=Mr,Ml.SkuRowItem=Yr,Ml.skuHelper=qr,Ml.skuConstants=Pr;var Ll=Ml,Pl=Object(c.a)("slider"),Vl=Pl[0],Rl=Pl[1],Hl=Vl({mixins:[T],props:{disabled:Boolean,vertical:Boolean,activeColor:String,inactiveColor:String,min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},value:{type:Number,default:0},barHeight:{type:[Number,String],default:2}},data:function(){return{dragStatus:""}},computed:{range:function(){return this.max-this.min}},created:function(){this.updateValue(this.value)},methods:{onTouchStart:function(t){this.disabled||(this.touchStart(t),this.startValue=this.format(this.value),this.dragStatus="start")},onTouchMove:function(t){if(!this.disabled){"start"===this.dragStatus&&this.$emit("drag-start"),A(t,!0),this.touchMove(t),this.dragStatus="draging";var rect=this.$el.getBoundingClientRect(),e=(this.vertical?this.deltaY:this.deltaX)/(this.vertical?rect.height:rect.width)*this.range;this.newValue=this.startValue+e,this.updateValue(this.newValue)}},onTouchEnd:function(){this.disabled||("draging"===this.dragStatus&&(this.updateValue(this.newValue,!0),this.$emit("drag-end")),this.dragStatus="")},onClick:function(t){if(t.stopPropagation(),!this.disabled){var rect=this.$el.getBoundingClientRect(),e=(this.vertical?t.clientY-rect.top:t.clientX-rect.left)/(this.vertical?rect.height:rect.width)*this.range+this.min;this.startValue=this.value,this.updateValue(e,!0)}},updateValue:function(t,e){(t=this.format(t))!==this.value&&this.$emit("input",t),e&&t!==this.startValue&&this.$emit("change",t)},format:function(t){return Math.round(Math.max(this.min,Math.min(t,this.max))/this.step)*this.step}},render:function(){var t,e=arguments[0],n=this.vertical,style={background:this.inactiveColor},o=n?"height":"width",r=n?"width":"height",l=((t={})[o]=100*(this.value-this.min)/this.range+"%",t[r]=Object(nt.a)(this.barHeight),t.background=this.activeColor,t);return this.dragStatus&&(l.transition="none"),e("div",{style:style,class:Rl({disabled:this.disabled,vertical:n}),on:{click:this.onClick}},[e("div",{class:Rl("bar"),style:l},[e("div",{attrs:{role:"slider",tabindex:this.disabled?-1:0,"aria-valuemin":this.min,"aria-valuenow":this.value,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal"},class:Rl("button-wrapper"),on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[this.slots("button")||e("div",{class:Rl("button")})])])])}}),Wl=Object(c.a)("step"),_l=Wl[0],ql=Wl[1],Yl=_l({mixins:[hi("vanSteps")],computed:{status:function(){return this.indexo*r&&o>0?this.open("right"):"left"===t&&e>n*r&&n>0?this.open("left"):this.swipeMove(0)},startDrag:function(t){this.disabled||(this.dragging=!0,this.startOffset=this.offset,this.touchStart(t))},onDrag:function(t){this.disabled||(this.touchMove(t),"horizontal"===this.direction&&((!this.opened||this.deltaX*this.startOffset<0)&&A(t,this.stopPropagation),this.swipeMove(this.deltaX+this.startOffset)))},endDrag:function(){this.disabled||(this.dragging=!1,this.swiping&&this.swipeLeaveTransition(this.offset>0?"left":"right"))},onClick:function(t){void 0===t&&(t="outside"),this.$emit("click",t),this.offset&&(this.onClose?this.onClose(t,this,{name:this.name}):this.swipeMove(0))}},render:function(){var t=this,e=arguments[0],n=function(e,n){return function(o){n&&o.stopPropagation(),t.onClick(e)}},o={transform:"translate3d("+this.offset+"px, 0, 0)",transitionDuration:this.dragging?"0s":".6s"};return e("div",{class:oc(),on:{click:n("cell"),touchstart:this.startDrag,touchmove:this.onDrag,touchend:this.endDrag,touchcancel:this.endDrag}},[e("div",{class:oc("wrapper"),style:o,on:{transitionend:function(){t.swiping=!1}}},[this.slots("left")&&e("div",{ref:"left",class:oc("left"),on:{click:n("left",!0)}},[this.slots("left")]),this.slots(),this.slots("right")&&e("div",{ref:"right",class:oc("right"),on:{click:n("right",!0)}},[this.slots("right")])])])}}),rc=Object(c.a)("tabbar"),lc=rc[0],cc=rc[1],uc=lc({mixins:[di("vanTabbar")],props:{route:Boolean,activeColor:String,inactiveColor:String,safeAreaInsetBottom:Boolean,value:{type:[Number,String],default:0},border:{type:Boolean,default:!0},fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1}},watch:{value:"setActiveItem",children:"setActiveItem"},methods:{setActiveItem:function(){var t=this;this.children.forEach((function(e,n){e.active=(e.name||n)===t.value}))},onChange:function(t){t!==this.value&&(this.$emit("input",t),this.$emit("change",t))}},render:function(){var t,e=arguments[0];return e("div",{style:{zIndex:this.zIndex},class:[(t={},t[w]=this.border,t),cc({fixed:this.fixed,"safe-area-inset-bottom":this.safeAreaInsetBottom})]},[this.slots()])}}),hc=Object(c.a)("tabbar-item"),dc=hc[0],fc=hc[1],pc=dc({mixins:[hi("vanTabbar")],props:Object(o.a)({},oe,{dot:Boolean,icon:String,name:[Number,String],info:[Number,String]}),data:function(){return{active:!1}},computed:{routeActive:function(){var t=this.to,e=this.$route;if(t&&e){var n=Object(B.c)(t)?t:{path:t},o=n.path===e.path,r=Object(B.b)(n.name)&&n.name===e.name;return o||r}}},methods:{onClick:function(t){this.parent.onChange(this.name||this.index),this.$emit("click",t),ne(this.$router,this)}},render:function(){var t=arguments[0],e=this.icon,n=this.slots,o=this.parent.route?this.routeActive:this.active,r=this.parent[o?"activeColor":"inactiveColor"];return t("div",{class:fc({active:o}),style:{color:r},on:{click:this.onClick}},[t("div",{class:fc("icon")},[n("icon",{active:o})||e&&t(yt,{attrs:{name:e}}),t(ct,{attrs:{dot:this.dot,info:this.info}})]),t("div",{class:fc("text")},[n("default",{active:o})])])}}),mc=Object(c.a)("tree-select"),vc=mc[0],gc=mc[1];function bc(t,e,n,o){var r=e.height,c=e.items,h=e.mainActiveIndex,d=e.activeId,f=(c[h]||{}).children||[],y=Array.isArray(d);function k(t){return y?-1!==d.indexOf(t):d===t}var S=c.map((function(e){return t(vr,{attrs:{dot:e.dot,info:e.info,title:e.text,disabled:e.disabled},class:[gc("nav-item"),e.className]})}));return t("div",l()([{class:gc(),style:{height:Object(nt.a)(r)}},m(o)]),[t(dr,{class:gc("nav"),attrs:{activeKey:h},on:{change:function(t){v(o,"click-nav",t),v(o,"update:main-active-index",t),v(o,"navclick",t)}}},[S]),t("div",{class:gc("content")},[n.content?n.content():f.map((function(n){return t("div",{key:n.id,class:["van-ellipsis",gc("item",{active:k(n.id),disabled:n.disabled})],on:{click:function(){if(!n.disabled){var t=n.id;if(y){var r=(t=d.slice()).indexOf(n.id);-1!==r?t.splice(r,1):t.length1?n-1:0),r=1;r