@zhangcf233/pay 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pay.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
var eg=Object.defineProperty;var ig=(J,$,m)=>$ in J?eg(J,$,{enumerable:!0,configurable:!0,writable:!0,value:m}):J[$]=m;var E=(J,$,m)=>(ig(J,typeof $!="symbol"?$+"":$,m),m);(function(J,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],$):(J=typeof globalThis<"u"?globalThis:J||self,$(J.PayPlugin={},J.Vue))})(this,function(J,$){var Fl,Hl;"use strict";function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}function jl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t,i=1;i<arguments.length;i++)for(var n in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Mi.apply(this,arguments)}var Wl=["attrs","props","domProps"],Ul=["class","style","directives"],ql=["on","nativeOn"],Kl=function(e){return e.reduce(function(t,i){for(var n in i)if(!t[n])t[n]=i[n];else if(Wl.indexOf(n)!==-1)t[n]=Mi({},t[n],i[n]);else if(Ul.indexOf(n)!==-1){var r=t[n]instanceof Array?t[n]:[t[n]],a=i[n]instanceof Array?i[n]:[i[n]];t[n]=[].concat(r,a)}else if(ql.indexOf(n)!==-1)for(var s in i[n])if(t[n][s]){var o=t[n][s]instanceof Array?t[n][s]:[t[n][s]],l=i[n][s]instanceof Array?i[n][s]:[i[n][s]];t[n][s]=[].concat(o,l)}else t[n][s]=i[n][s];else if(n==="hook")for(var c in i[n])t[n][c]=t[n][c]?Yl(t[n][c],i[n][c]):i[n][c];else t[n]=i[n];return t},{})},Yl=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Xl=Kl;const T=jl(Xl);function Li(e,t){return t?typeof t=="string"?" "+e+"--"+t:Array.isArray(t)?t.reduce(function(i,n){return i+Li(e,n)},""):Object.keys(t).reduce(function(i,n){return i+(t[n]?Li(e,n):"")},""):""}function Gl(e){return function(t,i){return t&&typeof t!="string"&&(i=t,t=""),t=t?e+"__"+t:e,""+t+Li(t,i)}}var Zl=Object.prototype.hasOwnProperty;function Jl(e,t,i){var n=t[i];_(n)&&(!Zl.call(e,i)||!ct(n)?e[i]=n:e[i]=Cr(Object(e[i]),t[i]))}function Cr(e,t){return Object.keys(t).forEach(function(i){Jl(e,t,i)}),e}const Ql={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",complete:"完成",loading:"加载中...",telEmpty:"请填写电话",nameEmpty:"请填写姓名",nameInvalid:"请输入正确的姓名",confirmDelete:"确定要删除吗",telInvalid:"请输入正确的手机号",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:function(t,i){return t+"年"+i+"月"},rangePrompt:function(t){return"选择天数不能超过 "+t+" 天"}},vanCascader:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:function(t){return t+"折"},condition:function(t){return"满"+t+"元可用"}},vanCouponCell:{title:"优惠券",tips:"暂无可用",count:function(t){return t+"张可用"}},vanCouponList:{empty:"暂无优惠券",exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码格式不正确",defaultAddress:"设为默认收货地址",telPlaceholder:"收货人手机号",namePlaceholder:"收货人姓名",areaPlaceholder:"选择省 / 市 / 区"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌、楼层房间号等信息"},vanAddressList:{add:"新增地址"}};var ee=$.prototype,$r=$.util.defineReactive;$r(ee,"$vantLang","zh-CN"),$r(ee,"$vantMessages",{"zh-CN":Ql});const Ai={messages:function(){return ee.$vantMessages[ee.$vantLang]},use:function(t,i){var n;ee.$vantLang=t,this.add((n={},n[t]=i,n))},add:function(t){t===void 0&&(t={}),Cr(ee.$vantMessages,t)}};var tc=/-(\w)/g;function wr(e){return e.replace(tc,function(t,i){return i.toUpperCase()})}function N(e,t){t===void 0&&(t=2);for(var i=e+"";i.length<t;)i="0"+i;return i}var ec={methods:{slots:function(t,i){t===void 0&&(t="default");var n=this.$slots,r=this.$scopedSlots,a=r[t];return a?a(i):n[t]}}};function ic(e){var t=this.name;e.component(t,this),e.component(wr("-"+t),this)}function nc(e){var t=e.scopedSlots||e.data.scopedSlots||{},i=e.slots();return Object.keys(i).forEach(function(n){t[n]||(t[n]=function(){return i[n]})}),t}function rc(e){return{functional:!0,props:e.props,model:e.model,render:function(i,n){return e(i,n.props,nc(n),n)}}}function ac(e){return function(t){return ie(t)&&(t=rc(t)),t.functional||(t.mixins=t.mixins||[],t.mixins.push(ec)),t.name=e,t.install=ic,t}}function sc(e){var t=wr(e)+".";return function(i){for(var n=Ai.messages(),r=xr(n,t+i)||xr(n,i),a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];return ie(r)?r.apply(void 0,s):r}}function p(e){return e="van-"+e,[ac(e),Gl(e),sc(e)]}function Ri(e){return/^\d+(\.\d+)?$/.test(e)}function Vi(e){return Number.isNaN?Number.isNaN(e):e!==e}function P(e){if(_(e))return e=String(e),Ri(e)?e+"px":e}var zi;function oc(){if(!zi){var e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;zi=parseFloat(t)}return zi}function lc(e){return e=e.replace(/rem/g,""),+e*oc()}function cc(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function uc(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function Fi(e){if(typeof e=="number")return e;if(Ae){if(e.indexOf("rem")!==-1)return lc(e);if(e.indexOf("vw")!==-1)return cc(e);if(e.indexOf("vh")!==-1)return uc(e)}return parseFloat(e)}var Ae=typeof window<"u",K=$.prototype.$isServer;function pe(){}function _(e){return e!=null}function ie(e){return typeof e=="function"}function ct(e){return e!==null&&typeof e=="object"}function Re(e){return ct(e)&&ie(e.then)&&ie(e.catch)}function xr(e,t){var i=t.split("."),n=e;return i.forEach(function(r){var a;n=ct(n)&&(a=n[r])!=null?a:""}),n}function Tr(e){return e==null||typeof e!="object"?!0:Object.keys(e).length===0}var hc=["ref","key","style","class","attrs","refInFor","nativeOn","directives","staticClass","staticStyle"],dc={nativeOn:"on"};function B(e,t){var i=hc.reduce(function(n,r){return e.data[r]&&(n[dc[r]||r]=e.data[r]),n},{});return t&&(i.on=i.on||{},m(i.on,e.data.on)),i}function I(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];var a=e.listeners[t];a&&(Array.isArray(a)?a.forEach(function(s){s.apply(void 0,n)}):a.apply(void 0,n))}function _r(e,t){var i=new $({el:document.createElement("div"),props:e.props,render:function(r){return r(e,m({props:this.$props},t))}});return document.body.appendChild(i.$el),i}var Y={zIndex:2e3,lockCount:0,stack:[],find:function(t){return this.stack.filter(function(i){return i.vm===t})[0]},remove:function(t){var i=this.find(t);if(i){i.vm=null,i.overlay=null;var n=this.stack.indexOf(i);this.stack.splice(n,1)}}},Ir=!1;if(!K)try{var Or={};Object.defineProperty(Or,"passive",{get:function(){Ir=!0}}),window.addEventListener("test-passive",null,Or)}catch{}function it(e,t,i,n){n===void 0&&(n=!1),K||e.addEventListener(t,i,Ir?{capture:!1,passive:n}:!1)}function Nt(e,t,i){K||e.removeEventListener(t,i)}function Pr(e){e.stopPropagation()}function z(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&Pr(e)}var Br=p("overlay"),fc=Br[0],pc=Br[1];function vc(e){z(e,!0)}function Er(e,t,i,n){var r=m({zIndex:t.zIndex},t.customStyle);return _(t.duration)&&(r.animationDuration=t.duration+"s"),e("transition",{attrs:{name:"van-fade"}},[e("div",T([{directives:[{name:"show",value:t.show}],style:r,class:[pc(),t.className],on:{touchmove:t.lockScroll?vc:pe}},B(n,!0)]),[i.default==null?void 0:i.default()])])}Er.props={show:Boolean,zIndex:[Number,String],duration:[Number,String],className:null,customStyle:Object,lockScroll:{type:Boolean,default:!0}};const Dr=fc(Er);function Hi(e){var t=e.parentNode;t&&t.removeChild(e)}var mc={className:"",customStyle:{}};function gc(e){return _r(Dr,{on:{click:function(){e.$emit("click-overlay"),e.closeOnClickOverlay&&(e.onClickOverlay?e.onClickOverlay():e.close())}}})}function Nr(e){var t=Y.find(e);if(t){var i=e.$el,n=t.config,r=t.overlay;i&&i.parentNode&&i.parentNode.insertBefore(r.$el,i),m(r,mc,n,{show:!0})}}function yc(e,t){var i=Y.find(e);if(i)i.config=t;else{var n=gc(e);Y.stack.push({vm:e,config:t,overlay:n})}Nr(e)}function Mr(e){var t=Y.find(e);t&&(t.overlay.show=!1)}function bc(e){var t=Y.find(e);t&&(Hi(t.overlay.$el),Y.remove(e))}function ji(e){return e===window}var Sc=/scroll|auto|overlay/i;function Ut(e,t){t===void 0&&(t=window);for(var i=e;i&&i.tagName!=="HTML"&&i.tagName!=="BODY"&&i.nodeType===1&&i!==t;){var n=window.getComputedStyle(i),r=n.overflowY;if(Sc.test(r))return i;i=i.parentNode}return t}function qt(e){var t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function Ve(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function ve(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function ze(e){Ve(window,e),Ve(document.body,e)}function Wi(e,t){if(ji(e))return 0;var i=t?qt(t):ve();return e.getBoundingClientRect().top+i}function kc(e){return ji(e)?e.innerHeight:e.getBoundingClientRect().height}function Cc(e){return ji(e)?0:e.getBoundingClientRect().top}function $c(e,t){return e>t?"horizontal":t>e?"vertical":""}var nt={data:function(){return{direction:""}},methods:{touchStart:function(t){this.resetTouchStatus(),this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY},touchMove:function(t){var i=t.touches[0];this.deltaX=i.clientX<0?0:i.clientX-this.startX,this.deltaY=i.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY);var n=10;(!this.direction||this.offsetX<n&&this.offsetY<n)&&(this.direction=$c(this.offsetX,this.offsetY))},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},bindTouchEvent:function(t){var i=this.onTouchStart,n=this.onTouchMove,r=this.onTouchEnd;it(t,"touchstart",i),it(t,"touchmove",n),r&&(it(t,"touchend",r),it(t,"touchcancel",r))}}};function wc(e){return typeof e=="string"?document.querySelector(e):e()}function Ui(e){var t=e===void 0?{}:e,i=t.ref,n=t.afterPortal;return{props:{getContainer:[String,Function]},watch:{getContainer:"portal"},mounted:function(){this.getContainer&&this.portal()},methods:{portal:function(){var a=this.getContainer,s=i?this.$refs[i]:this.$el,o;a?o=wc(a):this.$parent&&(o=this.$parent.$el),o&&o!==s.parentNode&&o.appendChild(s),n&&n.call(this)}}}}var xc=0;function ut(e){var t="binded_"+xc++;function i(){this[t]||(e.call(this,it,!0),this[t]=!0)}function n(){this[t]&&(e.call(this,Nt,!1),this[t]=!1)}return{mounted:i,activated:i,deactivated:n,beforeDestroy:n}}var Tc={mixins:[ut(function(e,t){this.handlePopstate(t&&this.closeOnPopstate)})],props:{closeOnPopstate:Boolean},data:function(){return{bindStatus:!1}},watch:{closeOnPopstate:function(t){this.handlePopstate(t)}},methods:{onPopstate:function(){this.close(),this.shouldReopen=!1},handlePopstate:function(t){if(!this.$isServer&&this.bindStatus!==t){this.bindStatus=t;var i=t?it:Nt;i(window,"popstate",this.onPopstate)}}}},Fe={transitionAppear:Boolean,value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[Number,String],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}};function He(e){return e===void 0&&(e={}),{mixins:[nt,Tc,Ui({afterPortal:function(){this.overlay&&Nr()}})],provide:function(){return{vanPopup:this}},props:Fe,data:function(){return this.onReopenCallback=[],{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(i){var n=i?"open":"close";this.inited=this.inited||this.value,this[n](),e.skipToggleEvent||this.$emit(n)},overlay:"renderOverlay"},mounted:function(){this.value&&this.open()},activated:function(){this.shouldReopen&&(this.$emit("input",!0),this.shouldReopen=!1)},beforeDestroy:function(){bc(this),this.opened&&this.removeLock(),this.getContainer&&Hi(this.$el)},deactivated:function(){this.value&&(this.close(),this.shouldReopen=!0)},methods:{open:function(){this.$isServer||this.opened||(this.zIndex!==void 0&&(Y.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.addLock(),this.onReopenCallback.forEach(function(i){i()}))},addLock:function(){this.lockScroll&&(it(document,"touchstart",this.touchStart),it(document,"touchmove",this.onTouchMove),Y.lockCount||document.body.classList.add("van-overflow-hidden"),Y.lockCount++)},removeLock:function(){this.lockScroll&&Y.lockCount&&(Y.lockCount--,Nt(document,"touchstart",this.touchStart),Nt(document,"touchmove",this.onTouchMove),Y.lockCount||document.body.classList.remove("van-overflow-hidden"))},close:function(){this.opened&&(Mr(this),this.opened=!1,this.removeLock(),this.$emit("input",!1))},onTouchMove:function(i){this.touchMove(i);var n=this.deltaY>0?"10":"01",r=Ut(i.target,this.$el),a=r.scrollHeight,s=r.offsetHeight,o=r.scrollTop,l="11";o===0?l=s>=a?"00":"01":o+s>=a&&(l="10"),l!=="11"&&this.direction==="vertical"&&!(parseInt(l,2)&parseInt(n,2))&&z(i,!0)},renderOverlay:function(){var i=this;this.$isServer||!this.value||this.$nextTick(function(){i.updateZIndex(i.overlay?1:0),i.overlay?yc(i,{zIndex:Y.zIndex++,duration:i.duration,className:i.overlayClass,customStyle:i.overlayStyle}):Mr(i)})},updateZIndex:function(i){i===void 0&&(i=0),this.$el.style.zIndex=++Y.zIndex+i},onReopen:function(i){this.onReopenCallback.push(i)}}}}var Lr=p("info"),_c=Lr[0],Ic=Lr[1];function Ar(e,t,i,n){var r=t.dot,a=t.info,s=_(a)&&a!=="";if(!(!r&&!s))return e("div",T([{class:Ic({dot:r})},B(n,!0)]),[r?"":t.info])}Ar.props={dot:Boolean,info:[Number,String]};const Kt=_c(Ar);var Rr=p("icon"),Oc=Rr[0],Vr=Rr[1];function Pc(e){return e?e.indexOf("/")!==-1:!1}var Bc={medel:"medal","medel-o":"medal-o","calender-o":"calendar-o"};function Ec(e){return e&&Bc[e]||e}function zr(e,t,i,n){var r,a=Ec(t.name),s=Pc(a);return process.env.NODE_ENV==="development"&&t.info&&console.warn('[Vant] Icon: "info" prop is deprecated, use "badge" prop instead.'),e(t.tag,T([{class:[t.classPrefix,s?"":t.classPrefix+"-"+a],style:{color:t.color,fontSize:P(t.size)}},B(n,!0)]),[i.default&&i.default(),s&&e("img",{class:Vr("image"),attrs:{src:a}}),e(Kt,{attrs:{dot:t.dot,info:(r=t.badge)!=null?r:t.info}})])}zr.props={dot:Boolean,name:String,size:[Number,String],info:[Number,String],badge:[Number,String],color:String,tag:{type:String,default:"i"},classPrefix:{type:String,default:Vr()}};const w=Oc(zr);var Fr=p("popup"),Dc=Fr[0],Hr=Fr[1];const St=Dc({mixins:[He()],props:{round:Boolean,duration:[Number,String],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,i=function(r){return function(a){return t.$emit(r,a)}};this.onClick=i("click"),this.onOpened=i("opened"),this.onClosed=i("closed")},methods:{onClickCloseIcon:function(t){this.$emit("click-close-icon",t),this.close()}},render:function(){var t,i=arguments[0];if(this.shouldRender){var n=this.round,r=this.position,a=this.duration,s=r==="center",o=this.transition||(s?"van-fade":"van-popup-slide-"+r),l={};if(_(a)){var c=s?"animationDuration":"transitionDuration";l[c]=a+"s"}return i("transition",{attrs:{appear:this.transitionAppear,name:o},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[i("div",{directives:[{name:"show",value:this.value}],style:l,class:Hr((t={round:n},t[r]=r,t["safe-area-inset-bottom"]=this.safeAreaInsetBottom,t)),on:{click:this.onClick}},[this.slots(),this.closeable&&i(w,{attrs:{role:"button",tabindex:"0",name:this.closeIcon},class:Hr("close-icon",this.closeIconPosition),on:{click:this.onClickCloseIcon}})])])}}});var jr=p("loading"),Nc=jr[0],je=jr[1];function Mc(e,t){if(t.type==="spinner"){for(var i=[],n=0;n<12;n++)i.push(e("i"));return i}return e("svg",{class:je("circular"),attrs:{viewBox:"25 25 50 50"}},[e("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])}function Lc(e,t,i){if(i.default){var n,r={fontSize:P(t.textSize),color:(n=t.textColor)!=null?n:t.color};return e("span",{class:je("text"),style:r},[i.default()])}}function Wr(e,t,i,n){var r=t.color,a=t.size,s=t.type,o={color:r};if(a){var l=P(a);o.width=l,o.height=l}return e("div",T([{class:je([s,{vertical:t.vertical}])},B(n,!0)]),[e("span",{class:je("spinner",s),style:o},[Mc(e,t)]),Lc(e,t,i)])}Wr.props={color:String,size:[Number,String],vertical:Boolean,textSize:[Number,String],textColor:String,type:{type:String,default:"circular"}};const ht=Nc(Wr);var Ur=p("action-sheet"),Ac=Ur[0],dt=Ur[1];function qr(e,t,i,n){var r=t.title,a=t.cancelText,s=t.closeable;function o(){I(n,"input",!1),I(n,"cancel")}function l(){if(r)return e("div",{class:dt("header")},[r,s&&e(w,{attrs:{name:t.closeIcon},class:dt("close"),on:{click:o}})])}function c(d,f){var v=d.disabled,g=d.loading,y=d.callback;function b(x){x.stopPropagation(),!(v||g)&&(y&&y(d),t.closeOnClickAction&&I(n,"input",!1),$.nextTick(function(){I(n,"select",d,f)}))}function S(){return g?e(ht,{class:dt("loading-icon")}):[e("span",{class:dt("name")},[d.name]),d.subname&&e("div",{class:dt("subname")},[d.subname])]}return e("button",{attrs:{type:"button"},class:[dt("item",{disabled:v,loading:g}),d.className],style:{color:d.color},on:{click:b}},[S()])}function u(){if(a)return[e("div",{class:dt("gap")}),e("button",{attrs:{type:"button"},class:dt("cancel"),on:{click:o}},[a])]}function h(){var d=(i.description==null?void 0:i.description())||t.description;if(d)return e("div",{class:dt("description")},[d])}return e(St,T([{class:dt(),attrs:{position:"bottom",round:t.round,value:t.value,overlay:t.overlay,duration:t.duration,lazyRender:t.lazyRender,lockScroll:t.lockScroll,getContainer:t.getContainer,closeOnPopstate:t.closeOnPopstate,closeOnClickOverlay:t.closeOnClickOverlay,safeAreaInsetBottom:t.safeAreaInsetBottom}},B(n,!0)]),[l(),h(),e("div",{class:dt("content")},[t.actions&&t.actions.map(c),i.default==null?void 0:i.default()]),u()])}qr.props=m({},Fe,{title:String,actions:Array,duration:[Number,String],cancelText:String,description:String,getContainer:[String,Function],closeOnPopstate:Boolean,closeOnClickAction:Boolean,round:{type:Boolean,default:!0},closeable:{type:Boolean,default:!0},closeIcon:{type:String,default:"cross"},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});const Rc=Ac(qr);function Kr(e){return e=e.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(e)||/^0[0-9-]{10,13}$/.test(e)}var Vc=44,We={title:String,loading:Boolean,readonly:Boolean,itemHeight:[Number,String],showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,allowHtml:{type:Boolean,default:!0},visibleItemCount:{type:[Number,String],default:6},swipeDuration:{type:[Number,String],default:1e3}},Yr="#ee0a24",ft="van-hairline",qi=ft+"--top",Xr=ft+"--left",me=ft+"--bottom",Gr=ft+"--surround",Ue=ft+"--top-bottom",zc=ft+"-unset--top-bottom";function ge(e){if(!_(e))return e;if(Array.isArray(e))return e.map(function(i){return ge(i)});if(typeof e=="object"){var t={};return Object.keys(e).forEach(function(i){t[i]=ge(e[i])}),t}return e}function W(e,t,i){return Math.min(Math.max(e,t),i)}function Zr(e,t,i){var n=e.indexOf(t),r="";return n===-1?e:t==="-"&&n!==0?e.slice(0,n):(t==="."&&e.match(/^(\.|-\.)/)&&(r=n?"-0":"0"),r+e.slice(0,n+1)+e.slice(n).replace(i,""))}function Jr(e,t,i){t===void 0&&(t=!0),i===void 0&&(i=!0),t?e=Zr(e,".",/\./g):e=e.split(".")[0],i?e=Zr(e,"-",/-/g):e=e.replace(/-/,"");var n=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(n,"")}function Qr(e,t){var i=Math.pow(10,10);return Math.round((e+t)*i)/i}var ta=200,Ki=300,Fc=15,ea=p("picker-column"),Hc=ea[0],Yi=ea[1];function ia(e){var t=window.getComputedStyle(e),i=t.transform||t.webkitTransform,n=i.slice(7,i.length-1).split(", ")[5];return Number(n)}function Xi(e){return ct(e)&&e.disabled}var na=Ae&&"onwheel"in window,Gi=null;const jc=Hc({mixins:[nt],props:{valueKey:String,readonly:Boolean,allowHtml:Boolean,className:String,itemHeight:Number,defaultIndex:Number,swipeDuration:[Number,String],visibleItemCount:[Number,String],initialOptions:{type:Array,default:function(){return[]}}},data:function(){return{offset:0,duration:0,options:ge(this.initialOptions),currentIndex:this.defaultIndex}},created:function(){this.$parent.children&&this.$parent.children.push(this),this.setIndex(this.currentIndex)},mounted:function(){this.bindTouchEvent(this.$el),na&&it(this.$el,"wheel",this.onMouseWheel,!1)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1),na&&Nt(this.$el,"wheel")},watch:{initialOptions:"setOptions",defaultIndex:function(t){this.setIndex(t)}},computed:{count:function(){return this.options.length},baseOffset:function(){return this.itemHeight*(this.visibleItemCount-1)/2}},methods:{setOptions:function(t){JSON.stringify(t)!==JSON.stringify(this.options)&&(this.options=ge(t),this.setIndex(this.defaultIndex))},onTouchStart:function(t){if(!this.readonly){if(this.touchStart(t),this.moving){var i=ia(this.$refs.wrapper);this.offset=Math.min(0,i-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){if(!this.readonly){this.touchMove(t),this.direction==="vertical"&&(this.moving=!0,z(t,!0)),this.offset=W(this.startOffset+this.deltaY,-(this.count*this.itemHeight),this.itemHeight);var i=Date.now();i-this.touchStartTime>Ki&&(this.touchStartTime=i,this.momentumOffset=this.offset)}},onTouchEnd:function(){var t=this;if(!this.readonly){var i=this.offset-this.momentumOffset,n=Date.now()-this.touchStartTime,r=n<Ki&&Math.abs(i)>Fc;if(r){this.momentum(i,n);return}var a=this.getIndexByOffset(this.offset);this.duration=ta,this.setIndex(a,!0),setTimeout(function(){t.moving=!1},0)}},onMouseWheel:function(t){var i=this;if(!this.readonly){z(t,!0);var n=ia(this.$refs.wrapper);this.startOffset=Math.min(0,n-this.baseOffset),this.momentumOffset=this.startOffset,this.transitionEndTrigger=null;var r=t.deltaY;if(!(this.startOffset===0&&r<0)){var a=this.itemHeight*(r>0?-1:1);this.offset=W(this.startOffset+a,-(this.count*this.itemHeight),this.itemHeight),Gi&&clearTimeout(Gi),Gi=setTimeout(function(){i.onTouchEnd(),i.touchStartTime=0},Ki)}}},onTransitionEnd:function(){this.stopMomentum()},onClickItem:function(t){this.moving||this.readonly||(this.transitionEndTrigger=null,this.duration=ta,this.setIndex(t,!0))},adjustIndex:function(t){t=W(t,0,this.count);for(var i=t;i<this.count;i++)if(!Xi(this.options[i]))return i;for(var n=t-1;n>=0;n--)if(!Xi(this.options[n]))return n},getOptionText:function(t){return ct(t)&&this.valueKey in t?t[this.valueKey]:t},setIndex:function(t,i){var n=this;t=this.adjustIndex(t)||0;var r=-t*this.itemHeight,a=function(){t!==n.currentIndex&&(n.currentIndex=t,i&&n.$emit("change",t))};this.moving&&r!==this.offset?this.transitionEndTrigger=a:a(),this.offset=r},setValue:function(t){for(var i=this.options,n=0;n<i.length;n++)if(this.getOptionText(i[n])===t)return this.setIndex(n)},getValue:function(){return this.options[this.currentIndex]},getIndexByOffset:function(t){return W(Math.round(-t/this.itemHeight),0,this.count-1)},momentum:function(t,i){var n=Math.abs(t/i);t=this.offset+n/.003*(t<0?-1:1);var r=this.getIndexByOffset(t);this.duration=+this.swipeDuration,this.setIndex(r,!0)},stopMomentum:function(){this.moving=!1,this.duration=0,this.transitionEndTrigger&&(this.transitionEndTrigger(),this.transitionEndTrigger=null)},genOptions:function(){var t=this,i=this.$createElement,n={height:this.itemHeight+"px"};return this.options.map(function(r,a){var s,o=t.getOptionText(r),l=Xi(r),c={style:n,attrs:{role:"button",tabindex:l?-1:0},class:[Yi("item",{disabled:l,selected:a===t.currentIndex})],on:{click:function(){t.onClickItem(a)}}},u={class:"van-ellipsis",domProps:(s={},s[t.allowHtml?"innerHTML":"textContent"]=o,s)};return i("li",T([{},c]),[t.slots("option",r)||i("div",T([{},u]))])})}},render:function(){var t=arguments[0],i={transform:"translate3d(0, "+(this.offset+this.baseOffset)+"px, 0)",transitionDuration:this.duration+"ms",transitionProperty:this.duration?"all":"none"};return t("div",{class:[Yi(),this.className]},[t("ul",{ref:"wrapper",style:i,class:Yi("wrapper"),on:{transitionend:this.onTransitionEnd}},[this.genOptions()])])}});var Zi=p("picker"),Wc=Zi[0],It=Zi[1],ra=Zi[2];const Ji=Wc({props:m({},We,{defaultIndex:{type:[Number,String],default:0},columns:{type:Array,default:function(){return[]}},toolbarPosition:{type:String,default:"top"},valueKey:{type:String,default:"text"}}),data:function(){return{children:[],formattedColumns:[]}},computed:{itemPxHeight:function(){return this.itemHeight?Fi(this.itemHeight):Vc},dataType:function(){var t=this.columns,i=t[0]||{};return i.children?"cascade":i.values?"object":"text"}},watch:{columns:{handler:"format",immediate:!0}},methods:{format:function(){var t=this.columns,i=this.dataType;i==="text"?this.formattedColumns=[{values:t}]:i==="cascade"?this.formatCascade():this.formattedColumns=t},formatCascade:function(){for(var t=[],i={children:this.columns};i&&i.children;){for(var n,r=i,a=r.children,s=(n=i.defaultIndex)!=null?n:+this.defaultIndex;a[s]&&a[s].disabled;)if(s<a.length-1)s++;else{s=0;break}t.push({values:i.children,className:i.className,defaultIndex:s}),i=a[s]}this.formattedColumns=t},emit:function(t){var i=this;if(this.dataType==="text")this.$emit(t,this.getColumnValue(0),this.getColumnIndex(0));else{var n=this.getValues();this.dataType==="cascade"&&(n=n.map(function(r){return r[i.valueKey]})),this.$emit(t,n,this.getIndexes())}},onCascadeChange:function(t){for(var i={children:this.columns},n=this.getIndexes(),r=0;r<=t;r++)i=i.children[n[r]];for(;i&&i.children;)t++,this.setColumnValues(t,i.children),i=i.children[i.defaultIndex||0]},onChange:function(t){var i=this;if(this.dataType==="cascade"&&this.onCascadeChange(t),this.dataType==="text")this.$emit("change",this,this.getColumnValue(0),this.getColumnIndex(0));else{var n=this.getValues();this.dataType==="cascade"&&(n=n.map(function(r){return r[i.valueKey]})),this.$emit("change",this,n,t)}},getColumn:function(t){return this.children[t]},getColumnValue:function(t){var i=this.getColumn(t);return i&&i.getValue()},setColumnValue:function(t,i){var n=this.getColumn(t);n&&(n.setValue(i),this.dataType==="cascade"&&this.onCascadeChange(t))},getColumnIndex:function(t){return(this.getColumn(t)||{}).currentIndex},setColumnIndex:function(t,i){var n=this.getColumn(t);n&&(n.setIndex(i),this.dataType==="cascade"&&this.onCascadeChange(t))},getColumnValues:function(t){return(this.children[t]||{}).options},setColumnValues:function(t,i){var n=this.children[t];n&&n.setOptions(i)},getValues:function(){return this.children.map(function(t){return t.getValue()})},setValues:function(t){var i=this;t.forEach(function(n,r){i.setColumnValue(r,n)})},getIndexes:function(){return this.children.map(function(t){return t.currentIndex})},setIndexes:function(t){var i=this;t.forEach(function(n,r){i.setColumnIndex(r,n)})},confirm:function(){this.children.forEach(function(t){return t.stopMomentum()}),this.emit("confirm")},cancel:function(){this.emit("cancel")},genTitle:function(){var t=this.$createElement,i=this.slots("title");if(i)return i;if(this.title)return t("div",{class:["van-ellipsis",It("title")]},[this.title])},genCancel:function(){var t=this.$createElement;return t("button",{attrs:{type:"button"},class:It("cancel"),on:{click:this.cancel}},[this.slots("cancel")||this.cancelButtonText||ra("cancel")])},genConfirm:function(){var t=this.$createElement;return t("button",{attrs:{type:"button"},class:It("confirm"),on:{click:this.confirm}},[this.slots("confirm")||this.confirmButtonText||ra("confirm")])},genToolbar:function(){var t=this.$createElement;if(this.showToolbar)return t("div",{class:It("toolbar")},[this.slots()||[this.genCancel(),this.genTitle(),this.genConfirm()]])},genColumns:function(){var t=this.$createElement,i=this.itemPxHeight,n=i*this.visibleItemCount,r={height:i+"px"},a={height:n+"px"},s={backgroundSize:"100% "+(n-i)/2+"px"};return t("div",{class:It("columns"),style:a,on:{touchmove:z}},[this.genColumnItems(),t("div",{class:It("mask"),style:s}),t("div",{class:[zc,It("frame")],style:r})])},genColumnItems:function(){var t=this,i=this.$createElement;return this.formattedColumns.map(function(n,r){var a;return i(jc,{attrs:{readonly:t.readonly,valueKey:t.valueKey,allowHtml:t.allowHtml,className:n.className,itemHeight:t.itemPxHeight,defaultIndex:(a=n.defaultIndex)!=null?a:+t.defaultIndex,swipeDuration:t.swipeDuration,visibleItemCount:t.visibleItemCount,initialOptions:n.values},scopedSlots:{option:t.$scopedSlots.option},on:{change:function(){t.onChange(r)}}})})}},render:function(t){return t("div",{class:It()},[this.toolbarPosition==="top"?this.genToolbar():t(),this.loading?t(ht,{class:It("loading")}):t(),this.slots("columns-top"),this.genColumns(),this.slots("columns-bottom"),this.toolbarPosition==="bottom"?this.genToolbar():t()])}});var aa=p("area"),Uc=aa[0],qc=aa[1],Qi="000000";function Kc(e){return e[0]==="9"}function Yc(e,t){var i=e.$slots,n=e.$scopedSlots,r={};return t.forEach(function(a){n[a]?r[a]=n[a]:i[a]&&(r[a]=function(){return i[a]})}),r}const sa=Uc({props:m({},We,{value:String,areaList:{type:Object,default:function(){return{}}},columnsNum:{type:[Number,String],default:3},isOverseaCode:{type:Function,default:Kc},columnsPlaceholder:{type:Array,default:function(){return[]}}}),data:function(){return{code:this.value,columns:[{values:[]},{values:[]},{values:[]}]}},computed:{province:function(){return this.areaList.province_list||{}},city:function(){return this.areaList.city_list||{}},county:function(){return this.areaList.county_list||{}},displayColumns:function(){return this.columns.slice(0,+this.columnsNum)},placeholderMap:function(){return{province:this.columnsPlaceholder[0]||"",city:this.columnsPlaceholder[1]||"",county:this.columnsPlaceholder[2]||""}}},watch:{value:function(t){this.code=t,this.setValues()},areaList:{deep:!0,handler:"setValues"},columnsNum:function(){var t=this;this.$nextTick(function(){t.setValues()})}},mounted:function(){this.setValues()},methods:{getList:function(t,i){var n=[];if(t!=="province"&&!i)return n;var r=this[t];if(n=Object.keys(r).map(function(s){return{code:s,name:r[s]}}),i&&(this.isOverseaCode(i)&&t==="city"&&(i="9"),n=n.filter(function(s){return s.code.indexOf(i)===0})),this.placeholderMap[t]&&n.length){var a="";t==="city"?a=Qi.slice(2,4):t==="county"&&(a=Qi.slice(4,6)),n.unshift({code:""+i+a,name:this.placeholderMap[t]})}return n},getIndex:function(t,i){var n=t==="province"?2:t==="city"?4:6,r=this.getList(t,i.slice(0,n-2));this.isOverseaCode(i)&&t==="province"&&(n=1),i=i.slice(0,n);for(var a=0;a<r.length;a++)if(r[a].code.slice(0,n)===i)return a;return 0},parseOutputValues:function(t){var i=this;return t.map(function(n,r){return n&&(n=JSON.parse(JSON.stringify(n)),(!n.code||n.name===i.columnsPlaceholder[r])&&(n.code="",n.name=""),n)})},onChange:function(t,i,n){this.code=i[n].code,this.setValues();var r=this.parseOutputValues(t.getValues());this.$emit("change",t,r,n)},onConfirm:function(t,i){t=this.parseOutputValues(t),this.setValues(),this.$emit("confirm",t,i)},getDefaultCode:function(){if(this.columnsPlaceholder.length)return Qi;var t=Object.keys(this.county);if(t[0])return t[0];var i=Object.keys(this.city);return i[0]?i[0]:""},setValues:function(){var t=this.code;t||(t=this.getDefaultCode());var i=this.$refs.picker,n=this.getList("province"),r=this.getList("city",t.slice(0,2));i&&(i.setColumnValues(0,n),i.setColumnValues(1,r),r.length&&t.slice(2,4)==="00"&&!this.isOverseaCode(t)&&(t=r[0].code),i.setColumnValues(2,this.getList("county",t.slice(0,4))),i.setIndexes([this.getIndex("province",t),this.getIndex("city",t),this.getIndex("county",t)]))},getValues:function(){var t=this.$refs.picker,i=t?t.getValues().filter(function(n){return!!n}):[];return i=this.parseOutputValues(i),i},getArea:function(){var t=this.getValues(),i={code:"",country:"",province:"",city:"",county:""};if(!t.length)return i;var n=t.map(function(a){return a.name}),r=t.filter(function(a){return!!a.code});return i.code=r.length?r[r.length-1].code:"",this.isOverseaCode(i.code)?(i.country=n[1]||"",i.province=n[2]||""):(i.province=n[0]||"",i.city=n[1]||"",i.county=n[2]||""),i},reset:function(t){this.code=t||"",this.setValues()}},render:function(){var t=arguments[0],i=m({},this.$listeners,{change:this.onChange,confirm:this.onConfirm});return t(Ji,{ref:"picker",class:qc(),attrs:{showToolbar:!0,valueKey:"name",title:this.title,columns:this.displayColumns,loading:this.loading,readonly:this.readonly,itemHeight:this.itemHeight,swipeDuration:this.swipeDuration,visibleItemCount:this.visibleItemCount,cancelButtonText:this.cancelButtonText,confirmButtonText:this.confirmButtonText},scopedSlots:Yc(this,["title","columns-top","columns-bottom"]),on:m({},i)})}});function Xc(e){return e.name==="NavigationDuplicated"||e.message&&e.message.indexOf("redundant navigation")!==-1}function Yt(e,t){var i=t.to,n=t.url,r=t.replace;if(i&&e){var a=e[r?"replace":"push"](i);a&&a.catch&&a.catch(function(s){if(s&&!Xc(s))throw s})}else n&&(r?location.replace(n):location.href=n)}function oa(e){Yt(e.parent&&e.parent.$router,e.props)}var Mt={url:String,replace:Boolean,to:[String,Object]},tn={icon:String,size:String,center:Boolean,isLink:Boolean,required:Boolean,iconPrefix:String,titleStyle:null,titleClass:null,valueClass:null,labelClass:null,title:[Number,String],value:[Number,String],label:[Number,String],arrowDirection:String,border:{type:Boolean,default:!0},clickable:{type:Boolean,default:null}},la=p("cell"),Gc=la[0],ne=la[1];function ca(e,t,i,n){var r,a=t.icon,s=t.size,o=t.title,l=t.label,c=t.value,u=t.isLink,h=i.title||_(o);function d(){var k=i.label||_(l);if(k)return e("div",{class:[ne("label"),t.labelClass]},[i.label?i.label():l])}function f(){if(h)return e("div",{class:[ne("title"),t.titleClass],style:t.titleStyle},[i.title?i.title():e("span",[o]),d()])}function v(){var k=i.default||_(c);if(k)return e("div",{class:[ne("value",{alone:!h}),t.valueClass]},[i.default?i.default():e("span",[c])])}function g(){if(i.icon)return i.icon();if(a)return e(w,{class:ne("left-icon"),attrs:{name:a,classPrefix:t.iconPrefix}})}function y(){var k=i["right-icon"];if(k)return k();if(u){var C=t.arrowDirection;return e(w,{class:ne("right-icon"),attrs:{name:C?"arrow-"+C:"arrow"}})}}function b(k){I(n,"click",k),oa(n)}var S=(r=t.clickable)!=null?r:u,x={clickable:S,center:t.center,required:t.required,borderless:!t.border};return s&&(x[s]=s),e("div",T([{class:ne(x),attrs:{role:S?"button":null,tabindex:S?0:null},on:{click:b}},B(n)]),[g(),f(),v(),y(),i.extra==null?void 0:i.extra()])}ca.props=m({},tn,Mt);const q=Gc(ca);function Zc(){return K?!1:/android/.test(navigator.userAgent.toLowerCase())}function Jc(){return K?!1:/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())}var Qc=Jc();function ua(){Qc&&ze(ve())}var ha=p("field"),tu=ha[0],Q=ha[1];const rt=tu({inheritAttrs:!1,provide:function(){return{vanField:this}},inject:{vanForm:{default:null}},props:m({},tn,{name:String,rules:Array,disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},autosize:[Boolean,Object],leftIcon:String,rightIcon:String,clearable:Boolean,formatter:Function,maxlength:[Number,String],labelWidth:[Number,String],labelClass:null,labelAlign:String,inputAlign:String,placeholder:String,errorMessage:String,errorMessageAlign:String,showWordLimit:Boolean,value:{type:[Number,String],default:""},type:{type:String,default:"text"},error:{type:Boolean,default:null},colon:{type:Boolean,default:null},clearTrigger:{type:String,default:"focus"},formatTrigger:{type:String,default:"onChange"}}),data:function(){return{focused:!1,validateFailed:!1,validateMessage:""}},watch:{value:function(){this.updateValue(this.value),this.resetValidation(),this.validateWithTrigger("onChange"),this.$nextTick(this.adjustSize)}},mounted:function(){this.updateValue(this.value,this.formatTrigger),this.$nextTick(this.adjustSize),this.vanForm&&this.vanForm.addField(this)},beforeDestroy:function(){this.vanForm&&this.vanForm.removeField(this)},computed:{showClear:function(){var t=this.getProp("readonly");if(this.clearable&&!t){var i=_(this.value)&&this.value!=="",n=this.clearTrigger==="always"||this.clearTrigger==="focus"&&this.focused;return i&&n}},showError:function(){if(this.error!==null)return this.error;if(this.vanForm&&this.vanForm.showError&&this.validateFailed)return!0},listeners:function(){return m({},this.$listeners,{blur:this.onBlur,focus:this.onFocus,input:this.onInput,click:this.onClickInput,keypress:this.onKeypress})},labelStyle:function(){var t=this.getProp("labelWidth");if(t)return{width:P(t)}},formValue:function(){return this.children&&(this.$scopedSlots.input||this.$slots.input)?this.children.value:this.value}},methods:{focus:function(){this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},runValidator:function(t,i){return new Promise(function(n){var r=i.validator(t,i);if(Re(r))return r.then(n);n(r)})},isEmptyValue:function(t){return Array.isArray(t)?!t.length:t===0?!1:!t},runSyncRule:function(t,i){return!(i.required&&this.isEmptyValue(t)||i.pattern&&!i.pattern.test(t))},getRuleMessage:function(t,i){var n=i.message;return ie(n)?n(t,i):n},runRules:function(t){var i=this;return t.reduce(function(n,r){return n.then(function(){if(!i.validateFailed){var a=i.formValue;if(r.formatter&&(a=r.formatter(a,r)),!i.runSyncRule(a,r)){i.validateFailed=!0,i.validateMessage=i.getRuleMessage(a,r);return}if(r.validator)return i.runValidator(a,r).then(function(s){s===!1&&(i.validateFailed=!0,i.validateMessage=i.getRuleMessage(a,r))})}})},Promise.resolve())},validate:function(t){var i=this;return t===void 0&&(t=this.rules),new Promise(function(n){t||n(),i.resetValidation(),i.runRules(t).then(function(){i.validateFailed?n({name:i.name,message:i.validateMessage}):n()})})},validateWithTrigger:function(t){if(this.vanForm&&this.rules){var i=this.vanForm.validateTrigger===t,n=this.rules.filter(function(r){return r.trigger?r.trigger===t:i});n.length&&this.validate(n)}},resetValidation:function(){this.validateFailed&&(this.validateFailed=!1,this.validateMessage="")},updateValue:function(t,i){i===void 0&&(i="onChange"),t=_(t)?String(t):"";var n=this.maxlength;if(_(n)&&t.length>n&&(this.value&&this.value.length===+n?t=this.value:t=t.slice(0,n)),this.type==="number"||this.type==="digit"){var r=this.type==="number";t=Jr(t,r,r)}this.formatter&&i===this.formatTrigger&&(t=this.formatter(t));var a=this.$refs.input;a&&t!==a.value&&(a.value=t),t!==this.value&&this.$emit("input",t)},onInput:function(t){t.target.composing||this.updateValue(t.target.value)},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.$nextTick(this.adjustSize),this.getProp("readonly")&&this.blur()},onBlur:function(t){this.getProp("readonly")||(this.focused=!1,this.updateValue(this.value,"onBlur"),this.$emit("blur",t),this.validateWithTrigger("onBlur"),this.$nextTick(this.adjustSize),ua())},onClick:function(t){this.$emit("click",t)},onClickInput:function(t){this.$emit("click-input",t)},onClickLeftIcon:function(t){this.$emit("click-left-icon",t)},onClickRightIcon:function(t){this.$emit("click-right-icon",t)},onClear:function(t){z(t),this.$emit("input",""),this.$emit("clear",t)},onKeypress:function(t){var i=13;if(t.keyCode===i){var n=this.getProp("submitOnEnter");!n&&this.type!=="textarea"&&z(t),this.type==="search"&&this.blur()}this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if(!(!(this.type==="textarea"&&this.autosize)||!t)){var i=ve();t.style.height="auto";var n=t.scrollHeight;if(ct(this.autosize)){var r=this.autosize,a=r.maxHeight,s=r.minHeight;a&&(n=Math.min(n,a)),s&&(n=Math.max(n,s))}n&&(t.style.height=n+"px",ze(i))}},genInput:function(){var t=this.$createElement,i=this.type,n=this.getProp("disabled"),r=this.getProp("readonly"),a=this.slots("input"),s=this.getProp("inputAlign");if(a)return t("div",{class:Q("control",[s,"custom"]),on:{click:this.onClickInput}},[a]);var o={ref:"input",class:Q("control",s),domProps:{value:this.value},attrs:m({},this.$attrs,{name:this.name,disabled:n,readonly:r,placeholder:this.placeholder}),on:this.listeners,directives:[{name:"model",value:this.value}]};if(i==="textarea")return t("textarea",T([{},o]));var l=i,c;return i==="number"&&(l="text",c="decimal"),i==="digit"&&(l="tel",c="numeric"),t("input",T([{attrs:{type:l,inputmode:c}},o]))},genLeftIcon:function(){var t=this.$createElement,i=this.slots("left-icon")||this.leftIcon;if(i)return t("div",{class:Q("left-icon"),on:{click:this.onClickLeftIcon}},[this.slots("left-icon")||t(w,{attrs:{name:this.leftIcon,classPrefix:this.iconPrefix}})])},genRightIcon:function(){var t=this.$createElement,i=this.slots,n=i("right-icon")||this.rightIcon;if(n)return t("div",{class:Q("right-icon"),on:{click:this.onClickRightIcon}},[i("right-icon")||t(w,{attrs:{name:this.rightIcon,classPrefix:this.iconPrefix}})])},genWordLimit:function(){var t=this.$createElement;if(this.showWordLimit&&this.maxlength){var i=(this.value||"").length;return t("div",{class:Q("word-limit")},[t("span",{class:Q("word-num")},[i]),"/",this.maxlength])}},genMessage:function(){var t=this.$createElement;if(!(this.vanForm&&this.vanForm.showErrorMessage===!1)){var i=this.errorMessage||this.validateMessage;if(i){var n=this.getProp("errorMessageAlign");return t("div",{class:Q("error-message",n)},[i])}}},getProp:function(t){if(_(this[t]))return this[t];if(this.vanForm&&_(this.vanForm[t]))return this.vanForm[t]},genLabel:function(){var t=this.$createElement,i=this.getProp("colon")?":":"";if(this.slots("label"))return[this.slots("label"),i];if(this.label)return t("span",[this.label+i])}},render:function(){var t,i=arguments[0],n=this.slots,r=this.getProp("disabled"),a=this.getProp("labelAlign"),s={icon:this.genLeftIcon},o=this.genLabel();o&&(s.title=function(){return o});var l=this.slots("extra");return l&&(s.extra=function(){return l}),i(q,{attrs:{icon:this.leftIcon,size:this.size,center:this.center,border:this.border,isLink:this.isLink,required:this.required,clickable:this.clickable,titleStyle:this.labelStyle,valueClass:Q("value"),titleClass:[Q("label",a),this.labelClass],arrowDirection:this.arrowDirection},scopedSlots:s,class:Q((t={error:this.showError,disabled:r},t["label-"+a]=a,t["min-height"]=this.type==="textarea"&&!this.autosize,t)),on:{click:this.onClick}},[i("div",{class:Q("body")},[this.genInput(),this.showClear&&i(w,{attrs:{name:"clear"},class:Q("clear"),on:{touchstart:this.onClear}}),this.genRightIcon(),n("button")&&i("div",{class:Q("button")},[n("button")])]),this.genWordLimit(),this.genMessage()])}});var qe=0;function eu(e){e?(qe||document.body.classList.add("van-toast--unclickable"),qe++):(qe--,qe||document.body.classList.remove("van-toast--unclickable"))}var da=p("toast"),iu=da[0],ye=da[1];const fa=iu({mixins:[He()],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;this.clickable!==t&&(this.clickable=t,eu(t))},onAfterEnter:function(){this.$emit("opened"),this.onOpened&&this.onOpened()},onAfterLeave:function(){this.$emit("closed")},genIcon:function(){var t=this.$createElement,i=this.icon,n=this.type,r=this.iconPrefix,a=this.loadingType,s=i||n==="success"||n==="fail";if(s)return t(w,{class:ye("icon"),attrs:{classPrefix:r,name:i||n}});if(n==="loading")return t(ht,{class:ye("loading"),attrs:{type:a}})},genMessage:function(){var t=this.$createElement,i=this.type,n=this.message;if(!(!_(n)||n===""))return i==="html"?t("div",{class:ye("text"),domProps:{innerHTML:n}}):t("div",{class:ye("text")},[n])}},render:function(){var t,i=arguments[0];return i("transition",{attrs:{name:this.transition},on:{afterEnter:this.onAfterEnter,afterLeave:this.onAfterLeave}},[i("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()])])}});var pa={icon:"",type:"text",mask:!1,value:!0,message:"",className:"",overlay:!1,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,closeOnClickOverlay:!1},Ke={},tt=[],Ye=!1,Xe=m({},pa);function va(e){return ct(e)?e:{message:e}}function nu(e){return document.body.contains(e)}function ru(){if(K)return{};if(tt=tt.filter(function(t){return!t.$el.parentNode||nu(t.$el)}),!tt.length||Ye){var e=new($.extend(fa))({el:document.createElement("div")});e.$on("input",function(t){e.value=t}),tt.push(e)}return tt[tt.length-1]}function au(e){return m({},e,{overlay:e.mask||e.overlay,mask:void 0,duration:void 0})}function L(e){e===void 0&&(e={});var t=ru();return t.value&&t.updateZIndex(),e=va(e),e=m({},Xe,Ke[e.type||Xe.type],e),process.env.NODE_ENV==="development"&&e.mask&&console.warn('[Vant] Toast: "mask" option is deprecated, use "overlay" option instead.'),e.clear=function(){t.value=!1,e.onClose&&(e.onClose(),e.onClose=null),Ye&&!K&&t.$on("closed",function(){clearTimeout(t.timer),tt=tt.filter(function(i){return i!==t}),Hi(t.$el),t.$destroy()})},m(t,au(e)),clearTimeout(t.timer),e.duration>0&&(t.timer=setTimeout(function(){t.clear()},e.duration)),t}var su=function(t){return function(i){return L(m({type:t},va(i)))}};["loading","success","fail"].forEach(function(e){L[e]=su(e)}),L.clear=function(e){tt.length&&(e?(tt.forEach(function(t){t.clear()}),tt=[]):Ye?tt.shift().clear():tt[0].clear())},L.setDefaultOptions=function(e,t){typeof e=="string"?Ke[e]=t:m(Xe,e)},L.resetDefaultOptions=function(e){typeof e=="string"?Ke[e]=null:(Xe=m({},pa),Ke={})},L.allowMultiple=function(e){e===void 0&&(e=!0),Ye=e},L.install=function(){$.use(fa)},$.prototype.$toast=L;var ma=p("button"),ou=ma[0],re=ma[1];function ga(e,t,i,n){var r,a=t.tag,s=t.icon,o=t.type,l=t.color,c=t.plain,u=t.disabled,h=t.loading,d=t.hairline,f=t.loadingText,v=t.iconPosition,g={};l&&(g.color=c?l:"white",c||(g.background=l),l.indexOf("gradient")!==-1?g.border=0:g.borderColor=l);function y(C){t.loading&&C.preventDefault(),!h&&!u&&(I(n,"click",C),oa(n))}function b(C){I(n,"touchstart",C)}var S=[re([o,t.size,{plain:c,loading:h,disabled:u,hairline:d,block:t.block,round:t.round,square:t.square}]),(r={},r[Gr]=d,r)];function x(){if(h)return i.loading?i.loading():e(ht,{class:re("loading"),attrs:{size:t.loadingSize,type:t.loadingType,color:"currentColor"}});if(i.icon)return e("div",{class:re("icon")},[i.icon()]);if(s)return e(w,{attrs:{name:s,classPrefix:t.iconPrefix},class:re("icon")})}function k(){var C=[];v==="left"&&C.push(x());var O;return h?O=f:O=i.default?i.default():t.text,O&&C.push(e("span",{class:re("text")},[O])),v==="right"&&C.push(x()),C}return e(a,T([{style:g,class:S,attrs:{type:t.nativeType,disabled:u},on:{click:y,touchstart:b}},B(n)]),[e("div",{class:re("content")},[k()])])}ga.props=m({},Mt,{text:String,icon:String,color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,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"},iconPosition:{type:String,default:"left"}});const F=ou(ga);function lu(e){var t=[];function i(n){n.forEach(function(r){t.push(r),r.componentInstance&&i(r.componentInstance.$children.map(function(a){return a.$vnode})),r.children&&i(r.children)})}return i(e),t}function ya(e,t){var i=t.$vnode.componentOptions;if(!(!i||!i.children)){var n=lu(i.children);e.sort(function(r,a){return n.indexOf(r.$vnode)-n.indexOf(a.$vnode)})}}function X(e,t){var i,n;t===void 0&&(t={});var r=t.indexKey||"index";return{inject:(i={},i[e]={default:null},i),computed:(n={parent:function(){return this.disableBindRelation?null:this[e]}},n[r]=function(){return this.bindRelation(),this.parent?this.parent.children.indexOf(this):null},n),watch:{disableBindRelation:function(s){s||this.bindRelation()}},mounted:function(){this.bindRelation()},beforeDestroy:function(){var s=this;this.parent&&(this.parent.children=this.parent.children.filter(function(o){return o!==s}))},methods:{bindRelation:function(){if(!(!this.parent||this.parent.children.indexOf(this)!==-1)){var s=[].concat(this.parent.children,[this]);ya(s,this.parent),this.parent.children=s}}}}}function G(e){return{provide:function(){var i;return i={},i[e]=this,i},data:function(){return{children:[]}}}}var ba=p("goods-action"),cu=ba[0],uu=ba[1];const Sa=cu({mixins:[G("vanGoodsAction")],props:{safeAreaInsetBottom:{type:Boolean,default:!0}},render:function(){var t=arguments[0];return t("div",{class:uu({unfit:!this.safeAreaInsetBottom})},[this.slots()])}});var ka=p("goods-action-button"),hu=ka[0],du=ka[1];const en=hu({mixins:[X("vanGoodsAction")],props:m({},Mt,{type:String,text:String,icon: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),Yt(this.$router,this)}},render:function(){var t=arguments[0];return t(F,{class:du([{first:this.isFirst,last:this.isLast},this.type]),attrs:{size:"large",type:this.type,icon:this.icon,color:this.color,loading:this.loading,disabled:this.disabled},on:{click:this.onClick}},[this.slots()||this.text])}});var nn=p("dialog"),fu=nn[0],pt=nn[1],Ge=nn[2];const rn=fu({mixins:[He()],props:{title:String,theme:String,width:[Number,String],message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,overlay:{type:Boolean,default:!0},allowHtml:{type:Boolean,default:!0},transition:{type:String,default:"van-dialog-bounce"},showConfirmButton:{type:Boolean,default:!0},closeOnPopstate:{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 i=this;this.$emit(t),this.value&&(this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,function(n){n!==!1&&i.loading[t]&&i.onClose(t),i.loading.confirm=!1,i.loading.cancel=!1})):this.onClose(t))},onClose:function(t){this.close(),this.callback&&this.callback(t)},onOpened:function(){var t=this;this.$emit("opened"),this.$nextTick(function(){var i;(i=t.$refs.dialog)==null||i.focus()})},onClosed:function(){this.$emit("closed")},onKeydown:function(t){var i=this;if(t.key==="Escape"||t.key==="Enter"){if(t.target!==this.$refs.dialog)return;var n={Enter:this.showConfirmButton?function(){return i.handleAction("confirm")}:pe,Escape:this.showCancelButton?function(){return i.handleAction("cancel")}:pe};n[t.key](),this.$emit("keydown",t)}},genRoundButtons:function(){var t=this,i=this.$createElement;return i(Sa,{class:pt("footer")},[this.showCancelButton&&i(en,{attrs:{size:"large",type:"warning",text:this.cancelButtonText||Ge("cancel"),color:this.cancelButtonColor,loading:this.loading.cancel},class:pt("cancel"),on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&i(en,{attrs:{size:"large",type:"danger",text:this.confirmButtonText||Ge("confirm"),color:this.confirmButtonColor,loading:this.loading.confirm},class:pt("confirm"),on:{click:function(){t.handleAction("confirm")}}})])},genButtons:function(){var t=this,i,n=this.$createElement,r=this.showCancelButton&&this.showConfirmButton;return n("div",{class:[qi,pt("footer")]},[this.showCancelButton&&n(F,{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||Ge("cancel"),nativeType:"button"},class:pt("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&n(F,{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||Ge("confirm"),nativeType:"button"},class:[pt("confirm"),(i={},i[Xr]=r,i)],style:{color:this.confirmButtonColor},on:{click:function(){t.handleAction("confirm")}}})])},genContent:function(t,i){var n=this.$createElement;if(i)return n("div",{class:pt("content")},[i]);var r=this.message,a=this.messageAlign;if(r){var s,o,l={class:pt("message",(s={"has-title":t},s[a]=a,s)),domProps:(o={},o[this.allowHtml?"innerHTML":"textContent"]=r,o)};return n("div",{class:pt("content",{isolated:!t})},[n("div",T([{},l]))])}}},render:function(){var t=arguments[0];if(this.shouldRender){var i=this.message,n=this.slots(),r=this.slots("title")||this.title,a=r&&t("div",{class:pt("header",{isolated:!i&&!n})},[r]);return t("transition",{attrs:{name:this.transition},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[t("div",{directives:[{name:"show",value:this.value}],attrs:{role:"dialog","aria-labelledby":this.title||i,tabIndex:0},class:[pt([this.theme]),this.className],style:{width:P(this.width)},ref:"dialog",on:{keydown:this.onKeydown}},[a,this.genContent(r,n),this.theme==="round-button"?this.genRoundButtons():this.genButtons()])])}}});var vt;function pu(e){return document.body.contains(e)}function vu(){vt&&vt.$destroy(),vt=new($.extend(rn))({el:document.createElement("div"),propsData:{lazyRender:!1}}),vt.$on("input",function(e){vt.value=e})}function D(e){return K?Promise.resolve():new Promise(function(t,i){(!vt||!pu(vt.$el))&&vu(),m(vt,D.currentOptions,e,{resolve:t,reject:i})})}D.defaultOptions={value:!0,title:"",width:"",theme:null,message:"",overlay:!0,className:"",allowHtml:!0,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:!0,closeOnClickOverlay:!1,callback:function(t){vt[t==="confirm"?"resolve":"reject"](t)}},D.alert=D,D.confirm=function(e){return D(m({showCancelButton:!0},e))},D.close=function(){vt&&(vt.value=!1)},D.setDefaultOptions=function(e){m(D.currentOptions,e)},D.resetDefaultOptions=function(){D.currentOptions=m({},D.defaultOptions)},D.resetDefaultOptions(),D.install=function(){$.use(rn)},D.Component=rn,$.prototype.$dialog=D;var an=p("address-edit-detail"),mu=an[0],Ze=an[1],sn=an[2],Ca=Zc();const gu=mu({props:{value:String,errorMessage:String,focused:Boolean,detailRows:[Number,String],searchResult:Array,detailMaxlength:[Number,String],showSearchResult:Boolean},computed:{shouldShowSearchResult:function(){return this.focused&&this.searchResult&&this.showSearchResult}},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,i=this.value&&this.focused&&Ca;if(i)return t("div",{class:Ze("finish"),on:{click:this.onFinish}},[sn("complete")])},genSearchResult:function(){var t=this,i=this.$createElement,n=this.value,r=this.shouldShowSearchResult,a=this.searchResult;if(r)return a.map(function(s){return i(q,{key:s.name+s.address,attrs:{clickable:!0,border:!1,icon:"location-o",label:s.address},class:Ze("search-item"),on:{click:function(){t.onSelect(s)}},scopedSlots:{title:function(){if(s.name){var l=s.name.replace(n,"<span class="+Ze("keyword")+">"+n+"</span>");return i("div",{domProps:{innerHTML:l}})}}}})})}},render:function(){var t=arguments[0];return t(q,{class:Ze()},[t(rt,{attrs:{autosize:!0,rows:this.detailRows,clearable:!Ca,type:"textarea",value:this.value,errorMessage:this.errorMessage,border:!this.shouldShowSearchResult,label:sn("label"),maxlength:this.detailMaxlength,placeholder:sn("placeholder")},ref:"field",scopedSlots:{icon:this.genFinish},on:m({},this.$listeners)}),this.genSearchResult()])}});var $a={size:[Number,String],value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1}},Lt={inject:{vanField:{default:null}},watch:{value:function(){var t=this.vanField;t&&(t.resetValidation(),t.validateWithTrigger("onChange"))}},created:function(){var t=this.vanField;t&&!t.children&&(t.children=this)}},wa=p("switch"),yu=wa[0],on=wa[1];const Je=yu({mixins:[Lt],props:$a,computed:{checked:function(){return this.value===this.activeValue},style:function(){return{fontSize:P(this.size),backgroundColor:this.checked?this.activeColor:this.inactiveColor}}},methods:{onClick:function(t){if(this.$emit("click",t),!this.disabled&&!this.loading){var i=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",i),this.$emit("change",i)}},genLoading:function(){var t=this.$createElement;if(this.loading){var i=this.checked?this.activeColor:this.inactiveColor;return t(ht,{class:on("loading"),attrs:{color:i}})}}},render:function(){var t=arguments[0],i=this.checked,n=this.loading,r=this.disabled;return t("div",{class:on({on:i,loading:n,disabled:r}),attrs:{role:"switch","aria-checked":String(i)},style:this.style,on:{click:this.onClick}},[t("div",{class:on("node")},[this.genLoading()])])}});var ln=p("address-edit"),bu=ln[0],Qe=ln[1],V=ln[2],xa={name:"",tel:"",country:"",province:"",city:"",county:"",areaCode:"",postalCode:"",addressDetail:"",isDefault:!1};function Su(e){return/^\d{6}$/.test(e)}const ku=bu({props:{areaList:Object,isSaving:Boolean,isDeleting:Boolean,validator:Function,showDelete:Boolean,showPostal:Boolean,searchResult:Array,telMaxlength:[Number,String],showSetDefault:Boolean,saveButtonText:String,areaPlaceholder:String,deleteButtonText:String,showSearchResult:Boolean,showArea:{type:Boolean,default:!0},showDetail:{type:Boolean,default:!0},disableArea:Boolean,detailRows:{type:[Number,String],default:1},detailMaxlength:{type:[Number,String],default:200},addressInfo:{type:Object,default:function(){return m({},xa)}},telValidator:{type:Function,default:Kr},postalValidator:{type:Function,default:Su},areaColumnsPlaceholder:{type:Array,default:function(){return[]}}},data:function(){return{data:{},showAreaPopup:!1,detailFocused:!1,errorInfo:{tel:"",name:"",areaCode:"",postalCode:"",addressDetail:""}}},computed:{areaListLoaded:function(){return ct(this.areaList)&&Object.keys(this.areaList).length},areaText:function(){var t=this.data,i=t.country,n=t.province,r=t.city,a=t.county,s=t.areaCode;if(s){var o=[i,n,r,a];return n&&n===r&&o.splice(1,1),o.filter(function(l){return l}).join("/")}return""},hideBottomFields:function(){var t=this.searchResult;return t&&t.length&&this.detailFocused}},watch:{addressInfo:{handler:function(t){this.data=m({},xa,t),this.setAreaCode(t.areaCode)},deep:!0,immediate:!0},areaList:function(){this.setAreaCode(this.data.areaCode)}},methods:{onFocus:function(t){this.errorInfo[t]="",this.detailFocused=t==="addressDetail",this.$emit("focus",t)},onChangeDetail:function(t){this.data.addressDetail=t,this.$emit("change-detail",t)},onAreaConfirm:function(t){if(t=t.filter(function(i){return!!i}),t.some(function(i){return!i.code})){L(V("areaEmpty"));return}this.showAreaPopup=!1,this.assignAreaValues(),this.$emit("change-area",t)},assignAreaValues:function(){var t=this.$refs.area;if(t){var i=t.getArea();i.areaCode=i.code,delete i.code,m(this.data,i)}},onSave:function(){var t=this,i=["name","tel"];this.showArea&&i.push("areaCode"),this.showDetail&&i.push("addressDetail"),this.showPostal&&i.push("postalCode");var n=i.every(function(r){var a=t.getErrorMessage(r);return a&&(t.errorInfo[r]=a),!a});n&&!this.isSaving&&this.$emit("save",this.data)},getErrorMessage:function(t){var i=String(this.data[t]||"").trim();if(this.validator){var n=this.validator(t,i);if(n)return n}switch(t){case"name":return i?"":V("nameEmpty");case"tel":return this.telValidator(i)?"":V("telInvalid");case"areaCode":return i?"":V("areaEmpty");case"addressDetail":return i?"":V("addressEmpty");case"postalCode":return i&&!this.postalValidator(i)?V("postalEmpty"):""}},onDelete:function(){var t=this;D.confirm({title:V("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(t){this.data.areaCode=t||"",t&&this.$nextTick(this.assignAreaValues)},setAddressDetail:function(t){this.data.addressDetail=t},onDetailBlur:function(){var t=this;setTimeout(function(){t.detailFocused=!1})},genSetDefaultCell:function(t){var i=this;if(this.showSetDefault){var n={"right-icon":function(){return t(Je,{attrs:{size:"24"},on:{change:function(s){i.$emit("change-default",s)}},model:{value:i.data.isDefault,callback:function(s){i.$set(i.data,"isDefault",s)}}})}};return t(q,{directives:[{name:"show",value:!this.hideBottomFields}],attrs:{center:!0,title:V("defaultAddress")},class:Qe("default"),scopedSlots:n})}return t()}},render:function(t){var i=this,n=this.data,r=this.errorInfo,a=this.disableArea,s=this.hideBottomFields,o=function(c){return function(){return i.onFocus(c)}};return t("div",{class:Qe()},[t("div",{class:Qe("fields")},[t(rt,{attrs:{clearable:!0,label:V("name"),placeholder:V("namePlaceholder"),errorMessage:r.name},on:{focus:o("name")},model:{value:n.name,callback:function(c){i.$set(n,"name",c)}}}),t(rt,{attrs:{clearable:!0,type:"tel",label:V("tel"),maxlength:this.telMaxlength,placeholder:V("telPlaceholder"),errorMessage:r.tel},on:{focus:o("tel")},model:{value:n.tel,callback:function(c){i.$set(n,"tel",c)}}}),t(rt,{directives:[{name:"show",value:this.showArea}],attrs:{readonly:!0,clickable:!a,label:V("area"),placeholder:this.areaPlaceholder||V("areaPlaceholder"),errorMessage:r.areaCode,rightIcon:a?null:"arrow",value:this.areaText},on:{focus:o("areaCode"),click:function(){i.$emit("click-area"),i.showAreaPopup=!a}}}),t(gu,{directives:[{name:"show",value:this.showDetail}],attrs:{focused:this.detailFocused,value:n.addressDetail,errorMessage:r.addressDetail,detailRows:this.detailRows,detailMaxlength:this.detailMaxlength,searchResult:this.searchResult,showSearchResult:this.showSearchResult},on:{focus:o("addressDetail"),blur:this.onDetailBlur,input:this.onChangeDetail,"select-search":function(c){i.$emit("select-search",c)}}}),this.showPostal&&t(rt,{directives:[{name:"show",value:!s}],attrs:{type:"tel",maxlength:"6",label:V("postal"),placeholder:V("postal"),errorMessage:r.postalCode},on:{focus:o("postalCode")},model:{value:n.postalCode,callback:function(c){i.$set(n,"postalCode",c)}}}),this.slots()]),this.genSetDefaultCell(t),t("div",{directives:[{name:"show",value:!s}],class:Qe("buttons")},[t(F,{attrs:{block:!0,round:!0,loading:this.isSaving,type:"danger",text:this.saveButtonText||V("save")},on:{click:this.onSave}}),this.showDelete&&t(F,{attrs:{block:!0,round:!0,loading:this.isDeleting,text:this.deleteButtonText||V("delete")},on:{click:this.onDelete}})]),t(St,{attrs:{round:!0,position:"bottom",lazyRender:!1,getContainer:"body"},model:{value:i.showAreaPopup,callback:function(c){i.showAreaPopup=c}}},[t(sa,{ref:"area",attrs:{value:n.areaCode,loading:!this.areaListLoaded,areaList:this.areaList,columnsPlaceholder:this.areaColumnsPlaceholder},on:{confirm:this.onAreaConfirm,cancel:function(){i.showAreaPopup=!1}}})])])}});var Ta=p("radio-group"),Cu=Ta[0],$u=Ta[1];const cn=Cu({mixins:[G("vanRadio"),Lt],props:{value:null,disabled:Boolean,direction:String,checkedColor:String,iconSize:[Number,String]},watch:{value:function(t){this.$emit("change",t)}},render:function(){var t=arguments[0];return t("div",{class:$u([this.direction]),attrs:{role:"radiogroup"}},[this.slots()])}});var _a=p("tag"),wu=_a[0],Ia=_a[1];function Oa(e,t,i,n){var r,a=t.type,s=t.mark,o=t.plain,l=t.color,c=t.round,u=t.size,h=t.textColor,d=o?"color":"backgroundColor",f=(r={},r[d]=l,r);o?(f.color=h||l,f.borderColor=l):(f.color=h,f.background=l);var v={mark:s,plain:o,round:c};u&&(v[u]=u);var g=t.closeable&&e(w,{attrs:{name:"cross"},class:Ia("close"),on:{click:function(b){b.stopPropagation(),I(n,"close")}}});return e("transition",{attrs:{name:t.closeable?"van-fade":null}},[e("span",T([{key:"content",style:f,class:Ia([v,a])},B(n,!0)]),[i.default==null?void 0:i.default(),g])])}Oa.props={size:String,mark:Boolean,color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean,type:{type:String,default:"default"}};const ti=wu(Oa);var Pa=function(t){var i=t.parent,n=t.bem,r=t.role;return{mixins:[X(i),Lt],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},direction:function(){return this.parent&&this.parent.direction||null},iconStyle:function(){var s=this.checkedColor||this.parent&&this.parent.checkedColor;if(s&&this.checked&&!this.isDisabled)return{borderColor:s,backgroundColor:s}},tabindex:function(){return this.isDisabled||r==="radio"&&!this.checked?-1:0}},methods:{onClick:function(s){var o=this,l=s.target,c=this.$refs.icon,u=c===l||(c==null?void 0:c.contains(l));!this.isDisabled&&(u||!this.labelDisabled)?(this.toggle(),setTimeout(function(){o.$emit("click",s)})):this.$emit("click",s)},genIcon:function(){var s=this.$createElement,o=this.checked,l=this.iconSize||this.parent&&this.parent.iconSize;return s("div",{ref:"icon",class:n("icon",[this.shape,{disabled:this.isDisabled,checked:o}]),style:{fontSize:P(l)}},[this.slots("icon",{checked:o})||s(w,{attrs:{name:"success"},style:this.iconStyle})])},genLabel:function(){var s=this.$createElement,o=this.slots();if(o)return s("span",{class:n("label",[this.labelPosition,{disabled:this.isDisabled}])},[o])}},render:function(){var s=arguments[0],o=[this.genIcon()];return this.labelPosition==="left"?o.unshift(this.genLabel()):o.push(this.genLabel()),s("div",{attrs:{role:r,tabindex:this.tabindex,"aria-checked":String(this.checked)},class:n([{disabled:this.isDisabled,"label-disabled":this.labelDisabled},this.direction]),on:{click:this.onClick}},[o])}}},Ba=p("radio"),xu=Ba[0],Tu=Ba[1];const un=xu({mixins:[Pa({bem:Tu,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}}});var Ea=p("address-item"),_u=Ea[0],ae=Ea[1];function Da(e,t,i,n){var r=t.disabled,a=t.switchable;function s(){a&&I(n,"select"),I(n,"click")}var o=function(){return e(w,{attrs:{name:"edit"},class:ae("edit"),on:{click:function(d){d.stopPropagation(),I(n,"edit"),I(n,"click")}}})};function l(){if(i.tag)return i.tag(m({},t.data));if(t.data.isDefault&&t.defaultTagText)return e(ti,{attrs:{type:"danger",round:!0},class:ae("tag")},[t.defaultTagText])}function c(){var u=t.data,h=[e("div",{class:ae("name")},[u.name+" "+u.tel,l()]),e("div",{class:ae("address")},[u.address])];return a&&!r?e(un,{attrs:{name:u.id,iconSize:18}},[h]):h}return e("div",{class:ae({disabled:r}),on:{click:s}},[e(q,T([{attrs:{border:!1,valueClass:ae("value")},scopedSlots:{default:c,"right-icon":o}},B(n)])),i.bottom==null?void 0:i.bottom(m({},t.data,{disabled:r}))])}Da.props={data:Object,disabled:Boolean,switchable:Boolean,defaultTagText:String};const Iu=_u(Da);var hn=p("address-list"),Ou=hn[0],ei=hn[1],Pu=hn[2];function Na(e,t,i,n){function r(o,l){if(o)return o.map(function(c,u){return e(Iu,{attrs:{data:c,disabled:l,switchable:t.switchable,defaultTagText:t.defaultTagText},key:c.id,scopedSlots:{bottom:i["item-bottom"],tag:i.tag},on:{select:function(){I(n,l?"select-disabled":"select",c,u),l||I(n,"input",c.id)},edit:function(){I(n,l?"edit-disabled":"edit",c,u)},click:function(){I(n,"click-item",c,u)}}})})}var a=r(t.list),s=r(t.disabledList,!0);return e("div",T([{class:ei()},B(n)]),[i.top==null?void 0:i.top(),e(cn,{attrs:{value:t.value}},[a]),t.disabledText&&e("div",{class:ei("disabled-text")},[t.disabledText]),s,i.default==null?void 0:i.default(),e("div",{class:ei("bottom")},[e(F,{attrs:{round:!0,block:!0,type:"danger",text:t.addButtonText||Pu("add")},class:ei("add"),on:{click:function(){I(n,"add")}}})])])}Na.props={list:Array,value:[Number,String],disabledList:Array,disabledText:String,addButtonText:String,defaultTagText:String,switchable:{type:Boolean,default:!0}};const Bu=Ou(Na);var Ma=p("badge"),Eu=Ma[0],La=Ma[1];const Du=Eu({props:{dot:Boolean,max:[Number,String],color:String,content:[Number,String],tag:{type:String,default:"div"}},methods:{hasContent:function(){return!!(this.$scopedSlots.content||_(this.content)&&this.content!=="")},renderContent:function(){var t=this.dot,i=this.max,n=this.content;if(!t&&this.hasContent())return this.$scopedSlots.content?this.$scopedSlots.content():_(i)&&Ri(n)&&+n>i?i+"+":n},renderBadge:function(){var t=this.$createElement;if(this.hasContent()||this.dot)return t("div",{class:La({dot:this.dot,fixed:!!this.$scopedSlots.default}),style:{background:this.color}},[this.renderContent()])}},render:function(){var t=arguments[0];if(this.$scopedSlots.default){var i=this.tag;return t(i,{class:La("wrapper")},[this.$scopedSlots.default(),this.renderBadge()])}return this.renderBadge()}});var Aa=Date.now();function Nu(e){var t=Date.now(),i=Math.max(0,16-(t-Aa)),n=setTimeout(e,i);return Aa=t+i,n}var be=K?global:window,Mu=be.requestAnimationFrame||Nu,Lu=be.cancelAnimationFrame||be.clearTimeout;function at(e){return Mu.call(be,e)}function Xt(e){at(function(){at(e)})}function Ra(e){Lu.call(be,e)}function Se(e){return Object.prototype.toString.call(e)==="[object Date]"&&!Vi(e.getTime())}var dn=p("calendar"),Au=dn[0],A=dn[1],At=dn[2];function Ru(e){return At("monthTitle",e.getFullYear(),e.getMonth()+1)}function fn(e,t){var i=e.getFullYear(),n=t.getFullYear(),r=e.getMonth(),a=t.getMonth();return i===n?r===a?0:r>a?1:-1:i>n?1:-1}function kt(e,t){var i=fn(e,t);if(i===0){var n=e.getDate(),r=t.getDate();return n===r?0:n>r?1:-1}return i}function pn(e,t){return e=new Date(e),e.setDate(e.getDate()+t),e}function Vu(e){return pn(e,-1)}function Va(e){return pn(e,1)}function zu(e){var t=e[0].getTime(),i=e[1].getTime();return(i-t)/(1e3*60*60*24)+1}function vn(e){return new Date(e)}function za(e){return Array.isArray(e)?e.map(function(t){return t===null?t:vn(t)}):vn(e)}function Fu(e,t){if(e<0)return[];for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function mn(e){if(!e)return 0;for(;Vi(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function gn(e,t){return 32-new Date(e,t-1,32).getDate()}var Hu=p("calendar-month"),ju=Hu[0];const Wu=ju({props:{date:Date,type:String,color:String,minDate:Date,maxDate:Date,showMark:Boolean,rowHeight:[Number,String],formatter:Function,lazyRender:Boolean,currentDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Boolean,showMonthTitle:Boolean,firstDayOfWeek:Number},data:function(){return{visible:!1}},computed:{title:function(){return Ru(this.date)},rowHeightWithUnit:function(){return P(this.rowHeight)},offset:function(){var t=this.firstDayOfWeek,i=this.date.getDay();return t?(i+7-this.firstDayOfWeek)%7:i},totalDay:function(){return gn(this.date.getFullYear(),this.date.getMonth()+1)},shouldRender:function(){return this.visible||!this.lazyRender},placeholders:function(){for(var t=[],i=Math.ceil((this.totalDay+this.offset)/7),n=1;n<=i;n++)t.push({type:"placeholder"});return t},days:function(){for(var t=[],i=this.date.getFullYear(),n=this.date.getMonth(),r=1;r<=this.totalDay;r++){var a=new Date(i,n,r),s=this.getDayType(a),o={date:a,type:s,text:r,bottomInfo:this.getBottomInfo(s)};this.formatter&&(o=this.formatter(o)),t.push(o)}return t}},methods:{getHeight:function(){var t;return((t=this.$el)==null?void 0:t.getBoundingClientRect().height)||0},scrollIntoView:function(t){var i=this.$refs,n=i.days,r=i.month,a=this.showSubtitle?n:r,s=a.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;Ve(t,s)},getMultipleDayType:function(t){var i=this,n=function(c){return i.currentDate.some(function(u){return kt(u,c)===0})};if(n(t)){var r=Vu(t),a=Va(t),s=n(r),o=n(a);return s&&o?"multiple-middle":s?"end":o?"start":"multiple-selected"}return""},getRangeDayType:function(t){var i=this.currentDate,n=i[0],r=i[1];if(!n)return"";var a=kt(t,n);if(!r)return a===0?"start":"";var s=kt(t,r);if(a===0&&s===0&&this.allowSameDay)return"start-end";if(a===0)return"start";if(s===0)return"end";if(a>0&&s<0)return"middle"},getDayType:function(t){var i=this.type,n=this.minDate,r=this.maxDate,a=this.currentDate;if(kt(t,n)<0||kt(t,r)>0)return"disabled";if(a!==null){if(i==="single")return kt(t,a)===0?"selected":"";if(i==="multiple")return this.getMultipleDayType(t);if(i==="range")return this.getRangeDayType(t)}},getBottomInfo:function(t){if(this.type==="range"){if(t==="start"||t==="end")return At(t);if(t==="start-end")return At("startEnd")}},getDayStyle:function(t,i){var n={height:this.rowHeightWithUnit};return t==="placeholder"?(n.width="100%",n):(i===0&&(n.marginLeft=100*this.offset/7+"%"),this.color&&(t==="start"||t==="end"||t==="start-end"||t==="multiple-selected"||t==="multiple-middle"?n.background=this.color:t==="middle"&&(n.color=this.color)),n)},genTitle:function(){var t=this.$createElement;if(this.showMonthTitle)return t("div",{class:A("month-title")},[this.title])},genMark:function(){var t=this.$createElement;if(this.showMark&&this.shouldRender)return t("div",{class:A("month-mark")},[this.date.getMonth()+1])},genDays:function(){var t=this.$createElement,i=this.shouldRender?this.days:this.placeholders;return t("div",{ref:"days",attrs:{role:"grid"},class:A("days")},[this.genMark(),i.map(this.genDay)])},genTopInfo:function(t){var i=this.$createElement,n=this.$scopedSlots["top-info"];if(t.topInfo||n)return i("div",{class:A("top-info")},[n?n(t):t.topInfo])},genBottomInfo:function(t){var i=this.$createElement,n=this.$scopedSlots["bottom-info"];if(t.bottomInfo||n)return i("div",{class:A("bottom-info")},[n?n(t):t.bottomInfo])},genDay:function(t,i){var n=this,r=this.$createElement,a=t.type,s=this.getDayStyle(a,i),o=a==="disabled",l=function(){o||n.$emit("click",t)};return a==="selected"?r("div",{attrs:{role:"gridcell",tabindex:-1},style:s,class:[A("day"),t.className],on:{click:l}},[r("div",{class:A("selected-day"),style:{width:this.rowHeightWithUnit,height:this.rowHeightWithUnit,background:this.color}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])]):r("div",{attrs:{role:"gridcell",tabindex:o?null:-1},style:s,class:[A("day",a),t.className],on:{click:l}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])}},render:function(){var t=arguments[0];return t("div",{class:A("month"),ref:"month"},[this.genTitle(),this.genDays()])}});var Uu=p("calendar-header"),qu=Uu[0];const Ku=qu({props:{title:String,subtitle:String,showTitle:Boolean,showSubtitle:Boolean,firstDayOfWeek:Number},methods:{genTitle:function(){var t=this.$createElement;if(this.showTitle){var i=this.slots("title")||this.title||At("title");return t("div",{class:A("header-title")},[i])}},genSubtitle:function(){var t=this.$createElement;if(this.showSubtitle)return t("div",{class:A("header-subtitle")},[this.subtitle])},genWeekDays:function(){var t=this.$createElement,i=At("weekdays"),n=this.firstDayOfWeek,r=[].concat(i.slice(n,7),i.slice(0,n));return t("div",{class:A("weekdays")},[r.map(function(a){return t("span",{class:A("weekday")},[a])})])}},render:function(){var t=arguments[0];return t("div",{class:A("header")},[this.genTitle(),this.genSubtitle(),this.genWeekDays()])}}),Yu=Au({props:{title:String,color:String,value:Boolean,readonly:Boolean,formatter:Function,rowHeight:[Number,String],confirmText:String,rangePrompt:String,defaultDate:[Date,Array],getContainer:[String,Function],allowSameDay:Boolean,confirmDisabledText:String,type:{type:String,default:"single"},round:{type:Boolean,default:!0},position:{type:String,default:"bottom"},poppable:{type:Boolean,default:!0},maxRange:{type:[Number,String],default:null},lazyRender:{type:Boolean,default:!0},showMark:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showSubtitle:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},minDate:{type:Date,validator:Se,default:function(){return new Date}},maxDate:{type:Date,validator:Se,default:function(){var t=new Date;return new Date(t.getFullYear(),t.getMonth()+6,t.getDate())}},firstDayOfWeek:{type:[Number,String],default:0,validator:function(t){return t>=0&&t<=6}}},inject:{vanPopup:{default:null}},data:function(){return{subtitle:"",currentDate:this.getInitialDate()}},computed:{months:function(){var t=[],i=new Date(this.minDate);i.setDate(1);do t.push(new Date(i)),i.setMonth(i.getMonth()+1);while(fn(i,this.maxDate)!==1);return t},buttonDisabled:function(){var t=this.type,i=this.currentDate;if(i){if(t==="range")return!i[0]||!i[1];if(t==="multiple")return!i.length}return!i},dayOffset:function(){return this.firstDayOfWeek?this.firstDayOfWeek%7:0}},watch:{value:"init",type:function(){this.reset()},defaultDate:function(t){this.currentDate=t,this.scrollIntoView()}},mounted:function(){if(this.init(),!this.poppable){var t;(t=this.vanPopup)==null||t.$on("opened",this.onScroll)}},activated:function(){this.init()},methods:{reset:function(t){t===void 0&&(t=this.getInitialDate()),this.currentDate=t,this.scrollIntoView()},init:function(){var t=this;this.poppable&&!this.value||this.$nextTick(function(){t.bodyHeight=Math.floor(t.$refs.body.getBoundingClientRect().height),t.onScroll(),t.scrollIntoView()})},scrollToDate:function(t){var i=this;at(function(){var n=i.value||!i.poppable;!t||!n||(i.months.some(function(r,a){if(fn(r,t)===0){var s=i.$refs,o=s.body,l=s.months;return l[a].scrollIntoView(o),!0}return!1}),i.onScroll())})},scrollIntoView:function(){var t=this.currentDate;if(t){var i=this.type==="single"?t:t[0];this.scrollToDate(i)}},getInitialDate:function(){var t=this.type,i=this.minDate,n=this.maxDate,r=this.defaultDate;if(r===null)return r;var a=new Date;if(kt(a,i)===-1?a=i:kt(a,n)===1&&(a=n),t==="range"){var s=r||[],o=s[0],l=s[1];return[o||a,l||Va(a)]}return t==="multiple"?r||[a]:r||a},onScroll:function(){var t=this.$refs,i=t.body,n=t.months,r=qt(i),a=r+this.bodyHeight,s=n.map(function(f){return f.getHeight()}),o=s.reduce(function(f,v){return f+v},0);if(!(a>o&&r>0)){for(var l=0,c,u=[-1,-1],h=0;h<n.length;h++){var d=l<=a&&l+s[h]>=r;d&&(u[1]=h,c||(c=n[h],u[0]=h),n[h].showed||(n[h].showed=!0,this.$emit("month-show",{date:n[h].date,title:n[h].title}))),l+=s[h]}n.forEach(function(f,v){f.visible=v>=u[0]-1&&v<=u[1]+1}),c&&(this.subtitle=c.title)}},onClickDay:function(t){if(!this.readonly){var i=t.date,n=this.type,r=this.currentDate;if(n==="range"){if(!r){this.select([i,null]);return}var a=r[0],s=r[1];if(a&&!s){var o=kt(i,a);o===1?this.select([a,i],!0):o===-1?this.select([i,null]):this.allowSameDay&&this.select([i,i],!0)}else this.select([i,null])}else if(n==="multiple"){if(!r){this.select([i]);return}var l,c=this.currentDate.some(function(d,f){var v=kt(d,i)===0;return v&&(l=f),v});if(c){var u=r.splice(l,1),h=u[0];this.$emit("unselect",vn(h))}else this.maxRange&&r.length>=this.maxRange?L(this.rangePrompt||At("rangePrompt",this.maxRange)):this.select([].concat(r,[i]))}else this.select(i,!0)}},togglePopup:function(t){this.$emit("input",t)},select:function(t,i){var n=this,r=function(o){n.currentDate=o,n.$emit("select",za(n.currentDate))};if(i&&this.type==="range"){var a=this.checkRange(t);if(!a){this.showConfirm?r([t[0],pn(t[0],this.maxRange-1)]):r(t);return}}r(t),i&&!this.showConfirm&&this.onConfirm()},checkRange:function(t){var i=this.maxRange,n=this.rangePrompt;return i&&zu(t)>i?(L(n||At("rangePrompt",i)),!1):!0},onConfirm:function(){this.$emit("confirm",za(this.currentDate))},genMonth:function(t,i){var n=this.$createElement,r=i!==0||!this.showSubtitle;return n(Wu,{ref:"months",refInFor:!0,attrs:{date:t,type:this.type,color:this.color,minDate:this.minDate,maxDate:this.maxDate,showMark:this.showMark,formatter:this.formatter,rowHeight:this.rowHeight,lazyRender:this.lazyRender,currentDate:this.currentDate,showSubtitle:this.showSubtitle,allowSameDay:this.allowSameDay,showMonthTitle:r,firstDayOfWeek:this.dayOffset},scopedSlots:{"top-info":this.$scopedSlots["top-info"],"bottom-info":this.$scopedSlots["bottom-info"]},on:{click:this.onClickDay}})},genFooterContent:function(){var t=this.$createElement,i=this.slots("footer");if(i)return i;if(this.showConfirm){var n=this.buttonDisabled?this.confirmDisabledText:this.confirmText;return t(F,{attrs:{round:!0,block:!0,type:"danger",color:this.color,disabled:this.buttonDisabled,nativeType:"button"},class:A("confirm"),on:{click:this.onConfirm}},[n||At("confirm")])}},genFooter:function(){var t=this.$createElement;return t("div",{class:A("footer",{unfit:!this.safeAreaInsetBottom})},[this.genFooterContent()])},genCalendar:function(){var t=this,i=this.$createElement;return i("div",{class:A()},[i(Ku,{attrs:{title:this.title,showTitle:this.showTitle,subtitle:this.subtitle,showSubtitle:this.showSubtitle,firstDayOfWeek:this.dayOffset},scopedSlots:{title:function(){return t.slots("title")}}}),i("div",{ref:"body",class:A("body"),on:{scroll:this.onScroll}},[this.months.map(this.genMonth)]),this.genFooter()])}},render:function(){var t=this,i=arguments[0];if(this.poppable){var n,r=function(s){return function(){return t.$emit(s)}};return i(St,{attrs:(n={round:!0,value:this.value},n.round=this.round,n.position=this.position,n.closeable=this.showTitle||this.showSubtitle,n.getContainer=this.getContainer,n.closeOnPopstate=this.closeOnPopstate,n.closeOnClickOverlay=this.closeOnClickOverlay,n),class:A("popup"),on:{input:this.togglePopup,open:r("open"),opened:r("opened"),close:r("close"),closed:r("closed")}},[this.genCalendar()])}return this.genCalendar()}});var Fa=p("image"),Xu=Fa[0],se=Fa[1];const oe=Xu({props:{src:String,fit:String,alt:String,round:Boolean,width:[Number,String],height:[Number,String],radius:[Number,String],lazyLoad:Boolean,iconPrefix:String,showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},errorIcon:{type:String,default:"photo-fail"},loadingIcon:{type:String,default:"photo"}},data:function(){return{loading:!0,error:!1}},watch:{src:function(){this.loading=!0,this.error=!1}},computed:{style:function(){var t={};return _(this.width)&&(t.width=P(this.width)),_(this.height)&&(t.height=P(this.height)),_(this.radius)&&(t.overflow="hidden",t.borderRadius=P(this.radius)),t}},created:function(){var t=this.$Lazyload;t&&Ae&&(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){var i=t.el;i===this.$refs.image&&this.loading&&this.onLoad()},onLazyLoadError:function(t){var i=t.el;i===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;if(this.loading&&this.showLoading)return t("div",{class:se("loading")},[this.slots("loading")||t(w,{attrs:{name:this.loadingIcon,classPrefix:this.iconPrefix},class:se("loading-icon")})]);if(this.error&&this.showError)return t("div",{class:se("error")},[this.slots("error")||t(w,{attrs:{name:this.errorIcon,classPrefix:this.iconPrefix},class:se("error-icon")})])},genImage:function(){var t=this.$createElement,i={class:se("img"),attrs:{alt:this.alt},style:{objectFit:this.fit}};if(!this.error)return this.lazyLoad?t("img",T([{ref:"image",directives:[{name:"lazy",value:this.src}]},i])):t("img",T([{attrs:{src:this.src},on:{load:this.onLoad,error:this.onError}},i]))}},render:function(){var t=arguments[0];return t("div",{class:se({round:this.round}),style:this.style,on:{click:this.onClick}},[this.genImage(),this.genPlaceholder(),this.slots()])}});var Ha=p("card"),Gu=Ha[0],Z=Ha[1];function ja(e,t,i,n){var r,a=t.thumb,s=i.num||_(t.num),o=i.price||_(t.price),l=i["origin-price"]||_(t.originPrice),c=s||o||l||i.bottom;function u(k){I(n,"click-thumb",k)}function h(){if(i.tag||t.tag)return e("div",{class:Z("tag")},[i.tag?i.tag():e(ti,{attrs:{mark:!0,type:"danger"}},[t.tag])])}function d(){if(i.thumb||a)return e("a",{attrs:{href:t.thumbLink},class:Z("thumb"),on:{click:u}},[i.thumb?i.thumb():e(oe,{attrs:{src:a,width:"100%",height:"100%",fit:"cover","lazy-load":t.lazyLoad}}),h()])}function f(){if(i.title)return i.title();if(t.title)return e("div",{class:[Z("title"),"van-multi-ellipsis--l2"]},[t.title])}function v(){if(i.desc)return i.desc();if(t.desc)return e("div",{class:[Z("desc"),"van-ellipsis"]},[t.desc])}function g(){var k=t.price.toString().split(".");return e("div",[e("span",{class:Z("price-currency")},[t.currency]),e("span",{class:Z("price-integer")},[k[0]]),".",e("span",{class:Z("price-decimal")},[k[1]])])}function y(){if(o)return e("div",{class:Z("price")},[i.price?i.price():g()])}function b(){if(l){var k=i["origin-price"];return e("div",{class:Z("origin-price")},[k?k():t.currency+" "+t.originPrice])}}function S(){if(s)return e("div",{class:Z("num")},[i.num?i.num():"x"+t.num])}function x(){if(i.footer)return e("div",{class:Z("footer")},[i.footer()])}return e("div",T([{class:Z()},B(n,!0)]),[e("div",{class:Z("header")},[d(),e("div",{class:Z("content",{centered:t.centered})},[e("div",[f(),v(),i.tags==null?void 0:i.tags()]),c&&e("div",{class:"van-card__bottom"},[(r=i["price-top"])==null?void 0:r.call(i),y(),b(),S(),i.bottom==null?void 0:i.bottom()])])]),x()])}ja.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:"¥"}};const Zu=Gu(ja);var Wa=p("tab"),Ju=Wa[0],yn=Wa[1];const ii=Ju({mixins:[X("vanTabs")],props:m({},Mt,{dot:Boolean,name:[Number,String],info:[Number,String],badge:[Number,String],title:String,titleStyle:null,titleClass:null,disabled:Boolean}),data:function(){return{inited:!1}},computed:{computedName:function(){var t;return(t=this.name)!=null?t:this.index},isActive:function(){var t=this.computedName===this.parent.currentName;return t&&(this.inited=!0),t}},watch:{title:function(){this.parent.setLine(),this.parent.scrollIntoView()},inited:function(t){var i=this;this.parent.lazyRender&&t&&this.$nextTick(function(){i.parent.$emit("rendered",i.computedName,i.title)})}},render:function(t){var i=this.slots,n=this.parent,r=this.isActive,a=i();if(process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] Tab: "info" prop is deprecated, use "badge" prop instead.'),!(!a&&!n.animated)){var s=n.scrollspy||r,o=this.inited||n.scrollspy||!n.lazyRender,l=o?a:t();return n.animated?t("div",{attrs:{role:"tabpanel","aria-hidden":!r},class:yn("pane-wrapper",{inactive:!r})},[t("div",{class:yn("pane")},[l])]):t("div",{directives:[{name:"show",value:s}],attrs:{role:"tabpanel"},class:yn("pane")},[l])}}});function Qu(e,t,i){var n=0,r=e.scrollLeft,a=i===0?1:Math.round(i*1e3/16);function s(){e.scrollLeft+=(t-r)/a,++n<a&&at(s)}s()}function th(e,t,i,n){var r=qt(e),a=r<t,s=i===0?1:Math.round(i*1e3/16),o=(t-r)/s;function l(){r+=o,(a&&r>t||!a&&r<t)&&(r=t),Ve(e,r),a&&r<t||!a&&r>t?at(l):n&&at(n)}l()}function ke(e){var t=window.getComputedStyle(e),i=t.display==="none",n=e.offsetParent===null&&t.position!=="fixed";return i||n}function Ua(e){var t=e.interceptor,i=e.args,n=e.done;if(t){var r=t.apply(void 0,i);Re(r)?r.then(function(a){a&&n()}).catch(pe):r&&n()}else n()}var qa=p("tab"),eh=qa[0],bn=qa[1];const ih=eh({props:{dot:Boolean,type:String,info:[Number,String],color:String,title:String,isActive:Boolean,disabled:Boolean,scrollable:Boolean,activeColor:String,inactiveColor:String},computed:{style:function(){var t={},i=this.color,n=this.isActive,r=this.type==="card";i&&r&&(t.borderColor=i,this.disabled||(n?t.backgroundColor=i:t.color=i));var a=n?this.activeColor:this.inactiveColor;return a&&(t.color=a),t}},methods:{onClick:function(){this.$emit("click")},genText:function(){var t=this.$createElement,i=t("span",{class:bn("text",{ellipsis:!this.scrollable})},[this.slots()||this.title]);return this.dot||_(this.info)&&this.info!==""?t("span",{class:bn("text-wrapper")},[i,t(Kt,{attrs:{dot:this.dot,info:this.info}})]):i}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"tab","aria-selected":this.isActive},class:[bn({active:this.isActive,disabled:this.disabled})],style:this.style,on:{click:this.onClick}},[this.genText()])}});var Ka=p("sticky"),nh=Ka[0],rh=Ka[1];const Ya=nh({mixins:[ut(function(e,t){if(this.scroller||(this.scroller=Ut(this.$el)),this.observer){var i=t?"observe":"unobserve";this.observer[i](this.$el)}e(this.scroller,"scroll",this.onScroll,!0),this.onScroll()})],props:{zIndex:[Number,String],container:null,offsetTop:{type:[Number,String],default:0}},data:function(){return{fixed:!1,height:0,transform:0}},computed:{offsetTopPx:function(){return Fi(this.offsetTop)},style:function(){if(this.fixed){var t={};return _(this.zIndex)&&(t.zIndex=this.zIndex),this.offsetTopPx&&this.fixed&&(t.top=this.offsetTopPx+"px"),this.transform&&(t.transform="translate3d(0, "+this.transform+"px, 0)"),t}}},watch:{fixed:function(t){this.$emit("change",t)}},created:function(){var t=this;!K&&window.IntersectionObserver&&(this.observer=new IntersectionObserver(function(i){i[0].intersectionRatio>0&&t.onScroll()},{root:document.body}))},methods:{onScroll:function(){var t=this;if(!ke(this.$el)){this.height=this.$el.offsetHeight;var i=this.container,n=this.offsetTopPx,r=qt(window),a=Wi(this.$el),s=function(){t.$emit("scroll",{scrollTop:r,isFixed:t.fixed})};if(i){var o=a+i.offsetHeight;if(r+n+this.height>o){var l=this.height+r-o;l<this.height?(this.fixed=!0,this.transform=-(l+n)):this.fixed=!1,s();return}}r+n>a?(this.fixed=!0,this.transform=0):this.fixed=!1,s()}}},render:function(){var t=arguments[0],i=this.fixed,n={height:i?this.height+"px":null};return t("div",{style:n},[t("div",{class:rh({fixed:i}),style:this.style},[this.slots()])])}});var Xa=p("tabs"),ah=Xa[0],Ga=Xa[1],sh=50;const oh=ah({mixins:[nt],props:{count:Number,duration:[Number,String],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,i=this.deltaX,n=this.currentIndex;t==="horizontal"&&this.offsetX>=sh&&(i>0&&n!==0?this.$emit("change",n-1):i<0&&n!==this.count-1&&this.$emit("change",n+1))},genChildren:function(){var t=this.$createElement;return this.animated?t("div",{class:Ga("track"),style:this.style},[this.slots()]):this.slots()}},render:function(){var t=arguments[0];return t("div",{class:Ga("content",{animated:this.animated}),on:m({},this.listeners)},[this.genChildren()])}});var Za=p("tabs"),lh=Za[0],ni=Za[1];const Sn=lh({mixins:[G("vanTabs"),ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(window,"resize",this.resize,!0),this.scrollspy&&e(this.scroller,"scroll",this.onScroll,!0)})],inject:{vanPopup:{default:null}},model:{prop:"active"},props:{color:String,border:Boolean,sticky:Boolean,animated:Boolean,swipeable:Boolean,scrollspy:Boolean,background:String,lineWidth:[Number,String],lineHeight:[Number,String],beforeChange:Function,titleActiveColor:String,titleInactiveColor:String,type:{type:String,default:"line"},active:{type:[Number,String],default:0},ellipsis:{type:Boolean,default:!0},duration:{type:[Number,String],default:.3},offsetTop:{type:[Number,String],default:0},lazyRender:{type:Boolean,default:!0},swipeThreshold:{type:[Number,String],default:5}},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},offsetTopPx:function(){return Fi(this.offsetTop)},scrollOffset:function(){return this.sticky?this.offsetTopPx+this.tabHeight:0}},watch:{color:"setLine",active:function(t){t!==this.currentName&&this.setCurrentIndexByName(t)},children:function(){var t=this;this.setCurrentIndexByName(this.active),this.setLine(),this.$nextTick(function(){t.scrollIntoView(!0)})},currentIndex:function(){this.scrollIntoView(),this.setLine(),this.stickyFixed&&!this.scrollspy&&ze(Math.ceil(Wi(this.$el)-this.offsetTopPx))},scrollspy:function(t){t?it(this.scroller,"scroll",this.onScroll,!0):Nt(this.scroller,"scroll",this.onScroll)}},mounted:function(){var t=this;this.init(),this.vanPopup&&this.vanPopup.onReopen(function(){t.setLine()})},activated:function(){this.init(),this.setLine()},methods:{resize:function(){this.setLine()},init:function(){var t=this;this.$nextTick(function(){t.inited=!0,t.tabHeight=kc(t.$refs.wrap),t.scrollIntoView(!0)})},setLine:function(){var t=this,i=this.inited;this.$nextTick(function(){var n=t.$refs.titles;if(!(!n||!n[t.currentIndex]||t.type!=="line"||ke(t.$el))){var r=n[t.currentIndex].$el,a=t.lineWidth,s=t.lineHeight,o=r.offsetLeft+r.offsetWidth/2,l={width:P(a),backgroundColor:t.color,transform:"translateX("+o+"px) translateX(-50%)"};if(i&&(l.transitionDuration=t.duration+"s"),_(s)){var c=P(s);l.height=c,l.borderRadius=c}t.lineStyle=l}})},setCurrentIndexByName:function(t){var i=this.children.filter(function(r){return r.computedName===t}),n=(this.children[0]||{}).index||0;this.setCurrentIndex(i.length?i[0].index:n)},setCurrentIndex:function(t){var i=this.findAvailableTab(t);if(_(i)){var n=this.children[i],r=n.computedName,a=this.currentIndex!==null;this.currentIndex=i,r!==this.active&&(this.$emit("input",r),a&&this.$emit("change",r,n.title))}},findAvailableTab:function(t){for(var i=t<this.currentIndex?-1:1;t>=0&&t<this.children.length;){if(!this.children[t].disabled)return t;t+=i}},onClick:function(t,i){var n=this,r=this.children[i],a=r.title,s=r.disabled,o=r.computedName;s?this.$emit("disabled",o,a):(Ua({interceptor:this.beforeChange,args:[o],done:function(){n.setCurrentIndex(i),n.scrollToCurrentContent()}}),this.$emit("click",o,a),Yt(t.$router,t))},scrollIntoView:function(t){var i=this.$refs.titles;if(!(!this.scrollable||!i||!i[this.currentIndex])){var n=this.$refs.nav,r=i[this.currentIndex].$el,a=r.offsetLeft-(n.offsetWidth-r.offsetWidth)/2;Qu(n,a,t?0:+this.duration)}},onSticktScroll:function(t){this.stickyFixed=t.isFixed,this.$emit("scroll",t)},scrollTo:function(t){var i=this;this.$nextTick(function(){i.setCurrentIndexByName(t),i.scrollToCurrentContent(!0)})},scrollToCurrentContent:function(t){var i=this;if(t===void 0&&(t=!1),this.scrollspy){var n=this.children[this.currentIndex],r=n==null?void 0:n.$el;if(r){var a=Wi(r,this.scroller)-this.scrollOffset;this.lockScroll=!0,th(this.scroller,a,t?0:+this.duration,function(){i.lockScroll=!1})}}},onScroll:function(){if(this.scrollspy&&!this.lockScroll){var t=this.getCurrentIndexOnScroll();this.setCurrentIndex(t)}},getCurrentIndexOnScroll:function(){for(var t=this.children,i=0;i<t.length;i++){var n=Cc(t[i].$el);if(n>this.scrollOffset)return i===0?0:i-1}return t.length-1}},render:function(){var t=this,i,n=arguments[0],r=this.type,a=this.animated,s=this.scrollable,o=this.children.map(function(c,u){var h;return n(ih,{ref:"titles",refInFor:!0,attrs:{type:r,dot:c.dot,info:(h=c.badge)!=null?h:c.info,title:c.title,color:t.color,isActive:u===t.currentIndex,disabled:c.disabled,scrollable:s,activeColor:t.titleActiveColor,inactiveColor:t.titleInactiveColor},style:c.titleStyle,class:c.titleClass,scopedSlots:{default:function(){return c.slots("title")}},on:{click:function(){t.onClick(c,u)}}})}),l=n("div",{ref:"wrap",class:[ni("wrap",{scrollable:s}),(i={},i[Ue]=r==="line"&&this.border,i)]},[n("div",{ref:"nav",attrs:{role:"tablist"},class:ni("nav",[r,{complete:this.scrollable}]),style:this.navStyle},[this.slots("nav-left"),o,r==="line"&&n("div",{class:ni("line"),style:this.lineStyle}),this.slots("nav-right")])]);return n("div",{class:ni([r])},[this.sticky?n(Ya,{attrs:{container:this.$el,offsetTop:this.offsetTop},on:{scroll:this.onSticktScroll}},[l]):l,n(oh,{attrs:{count:this.children.length,animated:a,duration:this.duration,swipeable:this.swipeable,currentIndex:this.currentIndex},on:{change:this.setCurrentIndex}},[this.slots()])])}});var kn=p("cascader"),ch=kn[0],Ot=kn[1],uh=kn[2];const hh=ch({props:{title:String,value:[Number,String],fieldNames:Object,placeholder:String,activeColor:String,options:{type:Array,default:function(){return[]}},closeable:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0}},data:function(){return{tabs:[],activeTab:0}},computed:{textKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.text)||"text"},valueKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.value)||"value"},childrenKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.children)||"children"}},watch:{options:{deep:!0,handler:"updateTabs"},value:function(t){var i=this;if(t||t===0){var n=this.tabs.map(function(r){var a;return(a=r.selectedOption)==null?void 0:a[i.valueKey]});if(n.indexOf(t)!==-1)return}this.updateTabs()}},created:function(){this.updateTabs()},methods:{getSelectedOptionsByValue:function(t,i){for(var n=0;n<t.length;n++){var r=t[n];if(r[this.valueKey]===i)return[r];if(r[this.childrenKey]){var a=this.getSelectedOptionsByValue(r[this.childrenKey],i);if(a)return[r].concat(a)}}},updateTabs:function(){var t=this;if(this.value||this.value===0){var i=this.getSelectedOptionsByValue(this.options,this.value);if(i){var n=this.options;this.tabs=i.map(function(r){var a={options:n,selectedOption:r},s=n.filter(function(o){return o[t.valueKey]===r[t.valueKey]});return s.length&&(n=s[0][t.childrenKey]),a}),n&&this.tabs.push({options:n,selectedOption:null}),this.$nextTick(function(){t.activeTab=t.tabs.length-1});return}}this.tabs=[{options:this.options,selectedOption:null}]},onSelect:function(t,i){var n=this;if(this.tabs[i].selectedOption=t,this.tabs.length>i+1&&(this.tabs=this.tabs.slice(0,i+1)),t[this.childrenKey]){var r={options:t[this.childrenKey],selectedOption:null};this.tabs[i+1]?this.$set(this.tabs,i+1,r):this.tabs.push(r),this.$nextTick(function(){n.activeTab++})}var a=this.tabs.map(function(o){return o.selectedOption}).filter(function(o){return!!o}),s={value:t[this.valueKey],tabIndex:i,selectedOptions:a};this.$emit("input",t[this.valueKey]),this.$emit("change",s),t[this.childrenKey]||this.$emit("finish",s)},onClose:function(){this.$emit("close")},renderHeader:function(){var t=this.$createElement;if(this.showHeader)return t("div",{class:Ot("header")},[t("h2",{class:Ot("title")},[this.slots("title")||this.title]),this.closeable?t(w,{attrs:{name:"cross"},class:Ot("close-icon"),on:{click:this.onClose}}):null])},renderOptions:function(t,i,n){var r=this,a=this.$createElement,s=function(l){var c=i&&l[r.valueKey]===i[r.valueKey],u=r.slots("option",{option:l,selected:c})||a("span",[l[r.textKey]]);return a("li",{class:Ot("option",{selected:c}),style:{color:c?r.activeColor:null},on:{click:function(){r.onSelect(l,n)}}},[u,c?a(w,{attrs:{name:"success"},class:Ot("selected-icon")}):null])};return a("ul",{class:Ot("options")},[t.map(s)])},renderTab:function(t,i){var n=this.$createElement,r=t.options,a=t.selectedOption,s=a?a[this.textKey]:this.placeholder||uh("select");return n(ii,{attrs:{title:s,titleClass:Ot("tab",{unselected:!a})}},[this.renderOptions(r,a,i)])},renderTabs:function(){var t=this,i=this.$createElement;return i(Sn,{attrs:{animated:!0,swipeable:!0,swipeThreshold:0,color:this.activeColor},class:Ot("tabs"),model:{value:t.activeTab,callback:function(r){t.activeTab=r}}},[this.tabs.map(this.renderTab)])}},render:function(){var t=arguments[0];return t("div",{class:Ot()},[this.renderHeader(),this.renderTabs()])}});var Ja=p("cell-group"),dh=Ja[0],Qa=Ja[1];function ts(e,t,i,n){var r,a=e("div",T([{class:[Qa({inset:t.inset}),(r={},r[Ue]=t.border,r)]},B(n,!0)]),[i.default==null?void 0:i.default()]);return t.title||i.title?e("div",{key:n.data.key},[e("div",{class:Qa("title",{inset:t.inset})},[i.title?i.title():t.title]),a]):a}ts.props={title:String,inset:Boolean,border:{type:Boolean,default:!0}};const es=dh(ts);var is=p("checkbox"),fh=is[0],ph=is[1];const ns=fh({mixins:[Pa({bem:ph,role:"checkbox",parent:"vanCheckbox"})],computed:{checked:{get:function(){return this.parent?this.parent.value.indexOf(this.name)!==-1: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 i=this;t===void 0&&(t=!this.checked),clearTimeout(this.toggleTask),this.toggleTask=setTimeout(function(){i.checked=t})},setParentValue:function(t){var i=this.parent,n=i.value.slice();if(t){if(i.max&&n.length>=i.max)return;n.indexOf(this.name)===-1&&(n.push(this.name),i.$emit("input",n))}else{var r=n.indexOf(this.name);r!==-1&&(n.splice(r,1),i.$emit("input",n))}}}});var rs=p("checkbox-group"),vh=rs[0],mh=rs[1];const gh=vh({mixins:[G("vanCheckbox"),Lt],props:{max:[Number,String],disabled:Boolean,direction:String,iconSize:[Number,String],checkedColor:String,value:{type:Array,default:function(){return[]}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggleAll:function(t){t===void 0&&(t={}),typeof t=="boolean"&&(t={checked:t});var i=t,n=i.checked,r=i.skipDisabled,a=this.children.filter(function(o){return o.disabled&&r?o.checked:n??!o.checked}),s=a.map(function(o){return o.name});this.$emit("input",s)}},render:function(){var t=arguments[0];return t("div",{class:mh([this.direction])},[this.slots()])}});var as=p("circle"),yh=as[0],ri=as[1],ss=3140,bh=0;function os(e){return Math.min(Math.max(e,0),100)}function Sh(e,t){var i=e?1:0;return"M "+t/2+" "+t/2+" m 0, -500 a 500, 500 0 1, "+i+" 0, 1000 a 500, 500 0 1, "+i+" 0, -1000"}const kh=yh({props:{text:String,size:[Number,String],color:[String,Object],layerColor:String,strokeLinecap:String,value:{type:Number,default:0},speed:{type:[Number,String],default:0},fill:{type:String,default:"none"},rate:{type:[Number,String],default:100},strokeWidth:{type:[Number,String],default:40},clockwise:{type:Boolean,default:!0}},beforeCreate:function(){this.uid="van-circle-gradient-"+bh++},computed:{style:function(){var t=P(this.size);return{width:t,height:t}},path:function(){return Sh(this.clockwise,this.viewBoxSize)},viewBoxSize:function(){return+this.strokeWidth+1e3},layerStyle:function(){return{fill:""+this.fill,stroke:""+this.layerColor,strokeWidth:this.strokeWidth+"px"}},hoverStyle:function(){var t=ss*this.value/100;return{stroke:""+(this.gradient?"url(#"+this.uid+")":this.color),strokeWidth:+this.strokeWidth+1+"px",strokeLinecap:this.strokeLinecap,strokeDasharray:t+"px "+ss+"px"}},gradient:function(){return ct(this.color)},LinearGradient:function(){var t=this,i=this.$createElement;if(this.gradient){var n=Object.keys(this.color).sort(function(r,a){return parseFloat(r)-parseFloat(a)}).map(function(r,a){return i("stop",{key:a,attrs:{offset:r,"stop-color":t.color[r]}})});return i("defs",[i("linearGradient",{attrs:{id:this.uid,x1:"100%",y1:"0%",x2:"0%",y2:"0%"}},[n])])}}},watch:{rate:{handler:function(t){this.startTime=Date.now(),this.startRate=this.value,this.endRate=os(t),this.increase=this.endRate>this.startRate,this.duration=Math.abs((this.startRate-this.endRate)*1e3/this.speed),this.speed?(Ra(this.rafId),this.rafId=at(this.animate)):this.$emit("input",this.endRate)},immediate:!0}},methods:{animate:function(){var t=Date.now(),i=Math.min((t-this.startTime)/this.duration,1),n=i*(this.endRate-this.startRate)+this.startRate;this.$emit("input",os(parseFloat(n.toFixed(1)))),(this.increase?n<this.endRate:n>this.endRate)&&(this.rafId=at(this.animate))}},render:function(){var t=arguments[0];return t("div",{class:ri(),style:this.style},[t("svg",{attrs:{viewBox:"0 0 "+this.viewBoxSize+" "+this.viewBoxSize}},[this.LinearGradient,t("path",{class:ri("layer"),style:this.layerStyle,attrs:{d:this.path}}),t("path",{attrs:{d:this.path},class:ri("hover"),style:this.hoverStyle})]),this.slots()||this.text&&t("div",{class:ri("text")},[this.text])])}});var ls=p("col"),Ch=ls[0],$h=ls[1];const wh=Ch({mixins:[X("vanRow")],props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{style:function(){var t=this.index,i=this.parent||{},n=i.spaces;if(n&&n[t]){var r=n[t],a=r.left,s=r.right;return{paddingLeft:a?a+"px":null,paddingRight:s?s+"px":null}}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,i=arguments[0],n=this.span,r=this.offset;return i(this.tag,{style:this.style,class:$h((t={},t[n]=n,t["offset-"+r]=r,t)),on:{click:this.onClick}},[this.slots()])}});var cs=p("collapse"),xh=cs[0],Th=cs[1];const _h=xh({mixins:[G("vanCollapse")],props:{accordion:Boolean,value:[String,Number,Array],border:{type:Boolean,default:!0}},methods:{switch:function(t,i){this.accordion||(t=i?this.value.concat(t):this.value.filter(function(n){return n!==t})),this.$emit("change",t),this.$emit("input",t)}},render:function(){var t,i=arguments[0];return i("div",{class:[Th(),(t={},t[Ue]=this.border,t)]},[this.slots()])}});var us=p("collapse-item"),Ih=us[0],ai=us[1],Oh=["title","icon","right-icon"];const Ph=Ih({mixins:[X("vanCollapse")],props:m({},tn,{name:[Number,String],disabled:Boolean,lazyRender:{type:Boolean,default:!0},isLink:{type:Boolean,default:!0}}),data:function(){return{show:null,inited:null}},computed:{currentName:function(){var t;return(t=this.name)!=null?t:this.index},expanded:function(){var t=this;if(!this.parent)return null;var i=this.parent,n=i.value,r=i.accordion;if(process.env.NODE_ENV==="development"&&!r&&!Array.isArray(n)){console.error('[Vant] Collapse: type of prop "value" should be Array');return}return r?n===this.currentName:n.some(function(a){return a===t.currentName})}},created:function(){this.show=this.expanded,this.inited=this.expanded},watch:{expanded:function(t,i){var n=this;if(i!==null){t&&(this.show=!0,this.inited=!0);var r=t?this.$nextTick:at;r(function(){var a=n.$refs,s=a.content,o=a.wrapper;if(!(!s||!o)){var l=s.offsetHeight;if(l){var c=l+"px";o.style.height=t?0:c,Xt(function(){o.style.height=t?c:0})}else n.onTransitionEnd()}})}}},methods:{onClick:function(){this.disabled||this.toggle()},toggle:function(t){t===void 0&&(t=!this.expanded);var i=this.parent,n=this.currentName,r=i.accordion&&n===i.value,a=r?"":n;this.parent.switch(a,t)},onTransitionEnd:function(){this.expanded?this.$refs.wrapper.style.height="":this.show=!1},genTitle:function(){var t=this,i=this.$createElement,n=this.border,r=this.disabled,a=this.expanded,s=Oh.reduce(function(o,l){return t.slots(l)&&(o[l]=function(){return t.slots(l)}),o},{});return this.slots("value")&&(s.default=function(){return t.slots("value")}),i(q,{attrs:{role:"button",tabindex:r?-1:0,"aria-expanded":String(a)},class:ai("title",{disabled:r,expanded:a,borderless:!n}),on:{click:this.onClick},scopedSlots:s,props:m({},this.$props)})},genContent:function(){var t=this.$createElement;if(this.inited||!this.lazyRender)return t("div",{directives:[{name:"show",value:this.show}],ref:"wrapper",class:ai("wrapper"),on:{transitionend:this.onTransitionEnd}},[t("div",{ref:"content",class:ai("content")},[this.slots()])])}},render:function(){var t=arguments[0];return t("div",{class:[ai({border:this.index&&this.border})]},[this.genTitle(),this.genContent()])}});var Cn=p("contact-card"),Bh=Cn[0],hs=Cn[1],$n=Cn[2];function ds(e,t,i,n){var r=t.type,a=t.editable;function s(l){a&&I(n,"click",l)}function o(){return r==="add"?t.addText||$n("addText"):[e("div",[$n("name")+":"+t.name]),e("div",[$n("tel")+":"+t.tel])]}return e(q,T([{attrs:{center:!0,border:!1,isLink:a,valueClass:hs("value"),icon:r==="edit"?"contact":"add-square"},class:hs([r]),on:{click:s}},B(n)]),[o()])}ds.props={tel:String,name:String,addText:String,editable:{type:Boolean,default:!0},type:{type:String,default:"add"}};const Eh=Bh(ds);var wn=p("contact-edit"),Dh=wn[0],si=wn[1],Pt=wn[2],xn={tel:"",name:""};const Nh=Dh({props:{isEdit:Boolean,isSaving:Boolean,isDeleting:Boolean,showSetDefault:Boolean,setDefaultLabel:String,contactInfo:{type:Object,default:function(){return m({},xn)}},telValidator:{type:Function,default:Kr}},data:function(){return{data:m({},xn,this.contactInfo),errorInfo:{name:"",tel:""}}},watch:{contactInfo:function(t){this.data=m({},xn,t)}},methods:{onFocus:function(t){this.errorInfo[t]=""},getErrorMessageByKey:function(t){var i=this.data[t].trim();switch(t){case"name":return i?"":Pt("nameInvalid");case"tel":return this.telValidator(i)?"":Pt("telInvalid")}},onSave:function(){var t=this,i=["name","tel"].every(function(n){var r=t.getErrorMessageByKey(n);return r&&(t.errorInfo[n]=r),!r});i&&!this.isSaving&&this.$emit("save",this.data)},onDelete:function(){var t=this;D.confirm({title:Pt("confirmDelete")}).then(function(){t.$emit("delete",t.data)})}},render:function(){var t=this,i=arguments[0],n=this.data,r=this.errorInfo,a=function(o){return function(){return t.onFocus(o)}};return i("div",{class:si()},[i("div",{class:si("fields")},[i(rt,{attrs:{clearable:!0,maxlength:"30",label:Pt("name"),placeholder:Pt("nameEmpty"),errorMessage:r.name},on:{focus:a("name")},model:{value:n.name,callback:function(o){t.$set(n,"name",o)}}}),i(rt,{attrs:{clearable:!0,type:"tel",label:Pt("tel"),placeholder:Pt("telEmpty"),errorMessage:r.tel},on:{focus:a("tel")},model:{value:n.tel,callback:function(o){t.$set(n,"tel",o)}}})]),this.showSetDefault&&i(q,{attrs:{title:this.setDefaultLabel,border:!1},class:si("switch-cell")},[i(Je,{attrs:{size:24},slot:"right-icon",on:{change:function(o){t.$emit("change-default",o)}},model:{value:n.isDefault,callback:function(o){t.$set(n,"isDefault",o)}}})]),i("div",{class:si("buttons")},[i(F,{attrs:{block:!0,round:!0,type:"danger",text:Pt("save"),loading:this.isSaving},on:{click:this.onSave}}),this.isEdit&&i(F,{attrs:{block:!0,round:!0,text:Pt("delete"),loading:this.isDeleting},on:{click:this.onDelete}})])])}});var Tn=p("contact-list"),Mh=Tn[0],Rt=Tn[1],Lh=Tn[2];function fs(e,t,i,n){var r=t.list&&t.list.map(function(a,s){function o(){I(n,"input",a.id),I(n,"select",a,s)}function l(){return e(un,{attrs:{name:a.id,iconSize:16,checkedColor:Yr},on:{click:o}})}function c(){return e(w,{attrs:{name:"edit"},class:Rt("edit"),on:{click:function(d){d.stopPropagation(),I(n,"edit",a,s)}}})}function u(){var h=[a.name+","+a.tel];return a.isDefault&&t.defaultTagText&&h.push(e(ti,{attrs:{type:"danger",round:!0},class:Rt("item-tag")},[t.defaultTagText])),h}return e(q,{key:a.id,attrs:{isLink:!0,center:!0,valueClass:Rt("item-value")},class:Rt("item"),scopedSlots:{icon:c,default:u,"right-icon":l},on:{click:o}})});return e("div",T([{class:Rt()},B(n)]),[e(cn,{attrs:{value:t.value},class:Rt("group")},[r]),e("div",{class:Rt("bottom")},[e(F,{attrs:{round:!0,block:!0,type:"danger",text:t.addText||Lh("addText")},class:Rt("add"),on:{click:function(){I(n,"add")}}})])])}fs.props={value:null,list:Array,addText:String,defaultTagText:String};const Ah=Mh(fs);var _n=1e3,In=60*_n,On=60*In,ps=24*On;function Rh(e){var t=Math.floor(e/ps),i=Math.floor(e%ps/On),n=Math.floor(e%On/In),r=Math.floor(e%In/_n),a=Math.floor(e%_n);return{days:t,hours:i,minutes:n,seconds:r,milliseconds:a}}function Vh(e,t){var i=t.days,n=t.hours,r=t.minutes,a=t.seconds,s=t.milliseconds;if(e.indexOf("DD")===-1?n+=i*24:e=e.replace("DD",N(i)),e.indexOf("HH")===-1?r+=n*60:e=e.replace("HH",N(n)),e.indexOf("mm")===-1?a+=r*60:e=e.replace("mm",N(r)),e.indexOf("ss")===-1?s+=a*1e3:e=e.replace("ss",N(a)),e.indexOf("S")!==-1){var o=N(s,3);e.indexOf("SSS")!==-1?e=e.replace("SSS",o):e.indexOf("SS")!==-1?e=e.replace("SS",o.slice(0,2)):e=e.replace("S",o.charAt(0))}return e}function zh(e,t){return Math.floor(e/1e3)===Math.floor(t/1e3)}var vs=p("count-down"),Fh=vs[0],Hh=vs[1];const jh=Fh({props:{millisecond:Boolean,time:{type:[Number,String],default:0},format:{type:String,default:"HH:mm:ss"},autoStart:{type:Boolean,default:!0}},data:function(){return{remain:0}},computed:{timeData:function(){return Rh(this.remain)},formattedTime:function(){return Vh(this.format,this.timeData)}},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,Ra(this.rafId)},reset:function(){this.pause(),this.remain=+this.time,this.autoStart&&this.start()},tick:function(){Ae&&(this.millisecond?this.microTick():this.macroTick())},microTick:function(){var t=this;this.rafId=at(function(){t.counting&&(t.setRemain(t.getRemain()),t.remain>0&&t.microTick())})},macroTick:function(){var t=this;this.rafId=at(function(){if(t.counting){var i=t.getRemain();(!zh(i,t.remain)||i===0)&&t.setRemain(i),t.remain>0&&t.macroTick()}})},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},setRemain:function(t){this.remain=t,this.$emit("change",this.timeData),t===0&&(this.pause(),this.$emit("finish"))}},render:function(){var t=arguments[0];return t("div",{class:Hh()},[this.slots("default",this.timeData)||this.formattedTime])}});var Pn=p("coupon"),Wh=Pn[0],Ct=Pn[1],Bn=Pn[2];function Uh(e){return e<Math.pow(10,12)?e*1e3:+e}function ms(e){var t=new Date(Uh(e));return t.getFullYear()+"."+N(t.getMonth()+1)+"."+N(t.getDate())}function qh(e){return(e/10).toFixed(e%10===0?0:1)}function gs(e){return(e/100).toFixed(e%100===0?0:e%10===0?1:2)}const En=Wh({props:{coupon:Object,chosen:Boolean,disabled:Boolean,currency:{type:String,default:"¥"}},computed:{validPeriod:function(){var t=this.coupon,i=t.startAt,n=t.endAt,r=t.customValidPeriod;return r||ms(i)+" - "+ms(n)},faceAmount:function(){var t=this.coupon;if(t.valueDesc)return t.valueDesc+"<span>"+(t.unitDesc||"")+"</span>";if(t.denominations){var i=gs(t.denominations);return"<span>"+this.currency+"</span> "+i}return t.discount?Bn("discount",qh(t.discount)):""},conditionMessage:function(){var t=gs(this.coupon.originCondition);return t==="0"?Bn("unlimited"):Bn("condition",t)}},render:function(){var t=arguments[0],i=this.coupon,n=this.disabled,r=n&&i.reason||i.description;return t("div",{class:Ct({disabled:n})},[t("div",{class:Ct("content")},[t("div",{class:Ct("head")},[t("h2",{class:Ct("amount"),domProps:{innerHTML:this.faceAmount}}),t("p",{class:Ct("condition")},[this.coupon.condition||this.conditionMessage])]),t("div",{class:Ct("body")},[t("p",{class:Ct("name")},[i.name]),t("p",{class:Ct("valid")},[this.validPeriod]),!this.disabled&&t(ns,{attrs:{size:18,value:this.chosen,checkedColor:Yr},class:Ct("corner")})])]),r&&t("p",{class:Ct("description")},[r])])}});var Dn=p("coupon-cell"),Kh=Dn[0],ys=Dn[1],Nn=Dn[2];function Yh(e){var t=e.coupons,i=e.chosenCoupon,n=e.currency,r=t[+i];if(r){var a=0;return _(r.value)?a=r.value:_(r.denominations)&&(a=r.denominations),"-"+n+" "+(a/100).toFixed(2)}return t.length===0?Nn("tips"):Nn("count",t.length)}function Mn(e,t,i,n){var r=t.coupons[+t.chosenCoupon],a=Yh(t);return e(q,T([{class:ys(),attrs:{value:a,title:t.title||Nn("title"),border:t.border,isLink:t.editable,valueClass:ys("value",{selected:r})}},B(n,!0)]))}Mn.model={prop:"chosenCoupon"},Mn.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,String],default:-1}};const Xh=Kh(Mn);var Ln=p("coupon-list"),Gh=Ln[0],$t=Ln[1],le=Ln[2],Zh="https://img01.yzcdn.cn/vant/coupon-empty.png";const Jh=Gh({model:{prop:"code"},props:{code:String,closeButtonText:String,inputPlaceholder:String,enabledTitle:String,disabledTitle:String,exchangeButtonText:String,exchangeButtonLoading:Boolean,exchangeButtonDisabled:Boolean,exchangeMinLength:{type:Number,default:1},chosenCoupon:{type:Number,default:-1},coupons:{type:Array,default:function(){return[]}},disabledCoupons:{type:Array,default:function(){return[]}},displayedCouponIndex:{type:Number,default:-1},showExchangeBar:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showCount:{type:Boolean,default:!0},currency:{type:String,default:"¥"},emptyImage:{type:String,default:Zh}},data:function(){return{tab:0,winHeight:window.innerHeight,currentCode:this.code||""}},computed:{buttonDisabled:function(){return!this.exchangeButtonLoading&&(this.exchangeButtonDisabled||!this.currentCode||this.currentCode.length<this.exchangeMinLength)},listStyle:function(){return{height:this.winHeight-(this.showExchangeBar?140:94)+"px"}}},watch:{code:function(t){this.currentCode=t},currentCode:function(t){this.$emit("input",t)},displayedCouponIndex:"scrollToShowCoupon"},mounted:function(){this.scrollToShowCoupon(this.displayedCouponIndex)},methods:{onClickExchangeButton:function(){this.$emit("exchange",this.currentCode),this.code||(this.currentCode="")},scrollToShowCoupon:function(t){var i=this;t!==-1&&this.$nextTick(function(){var n=i.$refs,r=n.card,a=n.list;a&&r&&r[t]&&(a.scrollTop=r[t].$el.offsetTop-100)})},genEmpty:function(){var t=this.$createElement;return t("div",{class:$t("empty")},[t("img",{attrs:{src:this.emptyImage}}),t("p",[le("empty")])])},genExchangeButton:function(){var t=this.$createElement;return t(F,{attrs:{plain:!0,type:"danger",text:this.exchangeButtonText||le("exchange"),loading:this.exchangeButtonLoading,disabled:this.buttonDisabled},class:$t("exchange"),on:{click:this.onClickExchangeButton}})}},render:function(){var t=this,i=arguments[0],n=this.coupons,r=this.disabledCoupons,a=this.showCount?" ("+n.length+")":"",s=(this.enabledTitle||le("enable"))+a,o=this.showCount?" ("+r.length+")":"",l=(this.disabledTitle||le("disabled"))+o,c=this.showExchangeBar&&i("div",{class:$t("exchange-bar")},[i(rt,{attrs:{clearable:!0,border:!1,placeholder:this.inputPlaceholder||le("placeholder"),maxlength:"20"},class:$t("field"),model:{value:t.currentCode,callback:function(v){t.currentCode=v}}}),this.genExchangeButton()]),u=function(v){return function(){return t.$emit("change",v)}},h=i(ii,{attrs:{title:s}},[i("div",{class:$t("list",{"with-bottom":this.showCloseButton}),style:this.listStyle},[n.map(function(f,v){return i(En,{ref:"card",key:f.id,attrs:{coupon:f,currency:t.currency,chosen:v===t.chosenCoupon},nativeOn:{click:u(v)}})}),!n.length&&this.genEmpty(),this.slots("list-footer")])]),d=i(ii,{attrs:{title:l}},[i("div",{class:$t("list",{"with-bottom":this.showCloseButton}),style:this.listStyle},[r.map(function(f){return i(En,{attrs:{disabled:!0,coupon:f,currency:t.currency},key:f.id})}),!r.length&&this.genEmpty(),this.slots("disabled-list-footer")])]);return i("div",{class:$t()},[c,i(Sn,{class:$t("tab"),attrs:{border:!1},model:{value:t.tab,callback:function(v){t.tab=v}}},[h,d]),i("div",{class:$t("bottom")},[i(F,{directives:[{name:"show",value:this.showCloseButton}],attrs:{round:!0,type:"danger",block:!0,text:this.closeButtonText||le("close")},class:$t("close"),on:{click:u(-1)}})])])}});var bs=m({},We,{value:null,filter:Function,columnsOrder:Array,showToolbar:{type:Boolean,default:!0},formatter:{type:Function,default:function(t,i){return i}}}),Ss={data:function(){return{innerValue:this.formatValue(this.value)}},computed:{originColumns:function(){var t=this;return this.ranges.map(function(i){var n=i.type,r=i.range,a=Fu(r[1]-r[0]+1,function(s){var o=N(r[0]+s);return o});return t.filter&&(a=t.filter(n,a)),{type:n,values:a}})},columns:function(){var t=this;return this.originColumns.map(function(i){return{values:i.values.map(function(n){return t.formatter(i.type,n)})}})}},watch:{columns:"updateColumnValue",innerValue:function(t,i){i?this.$emit("input",t):this.$emit("input",null)}},mounted:function(){var t=this;this.updateColumnValue(),this.$nextTick(function(){t.updateInnerValue()})},methods:{getPicker:function(){return this.$refs.picker},getProxiedPicker:function(){var t=this,i=this.$refs.picker;if(i){var n=function(a){return function(){i[a].apply(i,arguments),t.updateInnerValue()}};return m({},i,{setValues:n("setValues"),setIndexes:n("setIndexes"),setColumnIndex:n("setColumnIndex"),setColumnValue:n("setColumnValue")})}},onConfirm:function(){this.$emit("input",this.innerValue),this.$emit("confirm",this.innerValue)},onCancel:function(){this.$emit("cancel")}},render:function(){var t=this,i=arguments[0],n={};return Object.keys(We).forEach(function(r){n[r]=t[r]}),i(Ji,{ref:"picker",attrs:{columns:this.columns,readonly:this.readonly},scopedSlots:this.$scopedSlots,on:{change:this.onChange,confirm:this.onConfirm,cancel:this.onCancel},props:m({},n)})}},Qh=p("time-picker"),td=Qh[0];const ks=td({mixins:[Ss],props:m({},bs,{minHour:{type:[Number,String],default:0},maxHour:{type:[Number,String],default:23},minMinute:{type:[Number,String],default:0},maxMinute:{type:[Number,String],default:59}}),computed:{ranges:function(){return[{type:"hour",range:[+this.minHour,+this.maxHour]},{type:"minute",range:[+this.minMinute,+this.maxMinute]}]}},watch:{filter:"updateInnerValue",minHour:function(){var t=this;this.$nextTick(function(){t.updateInnerValue()})},maxHour:function(t){var i=this.innerValue.split(":"),n=i[0],r=i[1];n>=t?(this.innerValue=this.formatValue(t+":"+r),this.updateColumnValue()):this.updateInnerValue()},minMinute:"updateInnerValue",maxMinute:function(t){var i=this.innerValue.split(":"),n=i[0],r=i[1];r>=t?(this.innerValue=this.formatValue(n+":"+t),this.updateColumnValue()):this.updateInnerValue()},value:function(t){t=this.formatValue(t),t!==this.innerValue&&(this.innerValue=t,this.updateColumnValue())}},methods:{formatValue:function(t){t||(t=N(this.minHour)+":"+N(this.minMinute));var i=t.split(":"),n=i[0],r=i[1];return n=N(W(n,this.minHour,this.maxHour)),r=N(W(r,this.minMinute,this.maxMinute)),n+":"+r},updateInnerValue:function(){var t=this.getPicker().getIndexes(),i=t[0],n=t[1],r=this.originColumns,a=r[0],s=r[1],o=a.values[i]||a.values[0],l=s.values[n]||s.values[0];this.innerValue=this.formatValue(o+":"+l),this.updateColumnValue()},onChange:function(t){var i=this;this.updateInnerValue(),this.$nextTick(function(){i.$nextTick(function(){i.updateInnerValue(),i.$emit("change",t)})})},updateColumnValue:function(){var t=this,i=this.formatter,n=this.innerValue.split(":"),r=[i("hour",n[0]),i("minute",n[1])];this.$nextTick(function(){t.getPicker().setValues(r)})}}});function Cs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cs=function(){return!!e})()}function An(e,t){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},An(e,t)}function $s(e,t,i){if(Cs())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&An(r,i.prototype),r}var ws=new Date().getFullYear(),ed=p("date-picker"),id=ed[0];const xs=id({mixins:[Ss],props:m({},bs,{type:{type:String,default:"datetime"},minDate:{type:Date,default:function(){return new Date(ws-10,0,1)},validator:Se},maxDate:{type:Date,default:function(){return new Date(ws+10,11,31)},validator:Se}}),watch:{filter:"updateInnerValue",minDate:function(){var t=this;this.$nextTick(function(){t.updateInnerValue()})},maxDate:function(t){this.innerValue.valueOf()>=t.valueOf()?this.innerValue=t:this.updateInnerValue()},value:function(t){t=this.formatValue(t),t&&t.valueOf()!==this.innerValue.valueOf()&&(this.innerValue=t)}},computed:{ranges:function(){var t=this.getBoundary("max",this.innerValue?this.innerValue:this.minDate),i=t.maxYear,n=t.maxDate,r=t.maxMonth,a=t.maxHour,s=t.maxMinute,o=this.getBoundary("min",this.innerValue?this.innerValue:this.minDate),l=o.minYear,c=o.minDate,u=o.minMonth,h=o.minHour,d=o.minMinute,f=[{type:"year",range:[l,i]},{type:"month",range:[u,r]},{type:"day",range:[c,n]},{type:"hour",range:[h,a]},{type:"minute",range:[d,s]}];switch(this.type){case"date":f=f.slice(0,3);break;case"year-month":f=f.slice(0,2);break;case"month-day":f=f.slice(1,3);break;case"datehour":f=f.slice(0,4);break}if(this.columnsOrder){var v=this.columnsOrder.concat(f.map(function(g){return g.type}));f.sort(function(g,y){return v.indexOf(g.type)-v.indexOf(y.type)})}return f}},methods:{formatValue:function(t){var i=this;if(!Se(t))return null;var n=new Date(this.minDate),r=new Date(this.maxDate),a={year:"getFullYear",month:"getMonth",day:"getDate",hour:"getHours",minute:"getMinutes"};if(this.originColumns){var s=this.originColumns.map(function(c,u){var h=c.type,d=c.values,f=i.ranges[u].range,v=n[a[h]](),g=r[a[h]](),y=h==="month"?+d[0]-1:+d[0],b=h==="month"?+d[d.length-1]-1:+d[d.length-1];return{type:h,values:[v<f[0]?Math.max(v,y):y||v,g>f[1]?Math.min(g,b):b||g]}});if(this.type==="month-day"){var o=(this.innerValue||this.minDate).getFullYear();s.unshift({type:"year",values:[o,o]})}var l=Object.keys(a).map(function(c){var u;return(u=s.filter(function(h){return h.type===c})[0])==null?void 0:u.values}).filter(function(c){return c});n=$s(Date,l.map(function(c){return mn(c[0])})),r=$s(Date,l.map(function(c){return mn(c[1])}))}return t=Math.max(t,n.getTime()),t=Math.min(t,r.getTime()),new Date(t)},getBoundary:function(t,i){var n,r=this[t+"Date"],a=r.getFullYear(),s=1,o=1,l=0,c=0;return t==="max"&&(s=12,o=gn(i.getFullYear(),i.getMonth()+1),l=23,c=59),i.getFullYear()===a&&(s=r.getMonth()+1,i.getMonth()+1===s&&(o=r.getDate(),i.getDate()===o&&(l=r.getHours(),i.getHours()===l&&(c=r.getMinutes())))),n={},n[t+"Year"]=a,n[t+"Month"]=s,n[t+"Date"]=o,n[t+"Hour"]=l,n[t+"Minute"]=c,n},updateInnerValue:function(){var t=this,i=this.type,n=this.getPicker().getIndexes(),r=function(f){var v=0;t.originColumns.forEach(function(y,b){f===y.type&&(v=b)});var g=t.originColumns[v].values;return mn(g[n[v]])},a,s,o;i==="month-day"?(a=(this.innerValue||this.minDate).getFullYear(),s=r("month"),o=r("day")):(a=r("year"),s=r("month"),o=i==="year-month"?1:r("day"));var l=gn(a,s);o=o>l?l:o;var c=0,u=0;i==="datehour"&&(c=r("hour")),i==="datetime"&&(c=r("hour"),u=r("minute"));var h=new Date(a,s-1,o,c,u);this.innerValue=this.formatValue(h)},onChange:function(t){var i=this;this.updateInnerValue(),this.$nextTick(function(){i.$nextTick(function(){i.updateInnerValue(),i.$emit("change",t)})})},updateColumnValue:function(){var t=this,i=this.innerValue?this.innerValue:this.minDate,n=this.formatter,r=this.originColumns.map(function(a){switch(a.type){case"year":return n("year",""+i.getFullYear());case"month":return n("month",N(i.getMonth()+1));case"day":return n("day",N(i.getDate()));case"hour":return n("hour",N(i.getHours()));case"minute":return n("minute",N(i.getMinutes()));default:return null}});this.$nextTick(function(){t.getPicker().setValues(r)})}}});var Ts=p("datetime-picker"),nd=Ts[0],rd=Ts[1];const _s=nd({props:m({},ks.props,xs.props),methods:{getPicker:function(){return this.$refs.root.getProxiedPicker()}},render:function(){var t=arguments[0],i=this.type==="time"?ks:xs;return t(i,{ref:"root",class:rd(),scopedSlots:this.$scopedSlots,props:m({},this.$props),on:m({},this.$listeners)})}});var Is=p("divider"),ad=Is[0],sd=Is[1];function Os(e,t,i,n){var r;return e("div",T([{attrs:{role:"separator"},style:{borderColor:t.borderColor},class:sd((r={dashed:t.dashed,hairline:t.hairline},r["content-"+t.contentPosition]=i.default,r))},B(n,!0)]),[i.default&&i.default()])}Os.props={dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center"}};const Ps=ad(Os);var Bs=p("dropdown-item"),od=Bs[0],oi=Bs[1];const ld=od({mixins:[Ui({ref:"wrapper"}),X("vanDropdownMenu")],props:{value:null,title:String,disabled:Boolean,titleClass:String,options:{type:Array,default:function(){return[]}},lazyRender:{type:Boolean,default:!0}},data:function(){return{transition:!0,showPopup:!1,showWrapper:!1}},computed:{displayTitle:function(){var t=this;if(this.title)return this.title;var i=this.options.filter(function(n){return n.value===t.value});return i.length?i[0].text:""}},watch:{showPopup:function(t){this.bindScroll(t)}},beforeCreate:function(){var t=this,i=function(r){return function(){return t.$emit(r)}};this.onOpen=i("open"),this.onClose=i("close"),this.onOpened=i("opened")},methods:{toggle:function(t,i){t===void 0&&(t=!this.showPopup),i===void 0&&(i={}),t!==this.showPopup&&(this.transition=!i.immediate,this.showPopup=t,t&&(this.parent.updateOffset(),this.showWrapper=!0))},bindScroll:function(t){var i=this.parent.scroller,n=t?it:Nt;n(i,"scroll",this.onScroll,!0)},onScroll:function(){this.parent.updateOffset()},onClickWrapper:function(t){this.getContainer&&t.stopPropagation()}},render:function(){var t=this,i=arguments[0],n=this.parent,r=n.zIndex,a=n.offset,s=n.overlay,o=n.duration,l=n.direction,c=n.activeColor,u=n.closeOnClickOverlay,h=this.options.map(function(f){var v=f.value===t.value;return i(q,{attrs:{clickable:!0,icon:f.icon,title:f.text},key:f.value,class:oi("option",{active:v}),style:{color:v?c:""},on:{click:function(){t.showPopup=!1,f.value!==t.value&&(t.$emit("input",f.value),t.$emit("change",f.value))}}},[v&&i(w,{class:oi("icon"),attrs:{color:c,name:"success"}})])}),d={zIndex:r};return l==="down"?d.top=a+"px":d.bottom=a+"px",i("div",[i("div",{directives:[{name:"show",value:this.showWrapper}],ref:"wrapper",style:d,class:oi([l]),on:{click:this.onClickWrapper}},[i(St,{attrs:{overlay:s,position:l==="down"?"top":"bottom",duration:this.transition?o:0,lazyRender:this.lazyRender,overlayStyle:{position:"absolute"},closeOnClickOverlay:u},class:oi("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(v){t.showPopup=v}}},[h,this.slots("default")])])])}});var Rn=function(t){return{props:{closeOnClickOutside:{type:Boolean,default:!0}},data:function(){var n=this,r=function(s){n.closeOnClickOutside&&!n.$el.contains(s.target)&&n[t.method]()};return{clickOutsideHandler:r}},mounted:function(){it(document,t.event,this.clickOutsideHandler)},beforeDestroy:function(){Nt(document,t.event,this.clickOutsideHandler)}}},Es=p("dropdown-menu"),cd=Es[0],li=Es[1];const ud=cd({mixins:[G("vanDropdownMenu"),Rn({event:"click",method:"onClickOutside"})],props:{zIndex:[Number,String],activeColor:String,overlay:{type:Boolean,default:!0},duration:{type:[Number,String],default:.2},direction:{type:String,default:"down"},closeOnClickOverlay:{type:Boolean,default:!0}},data:function(){return{offset:0}},computed:{scroller:function(){return Ut(this.$el)},opened:function(){return this.children.some(function(t){return t.showWrapper})},barStyle:function(){if(this.opened&&_(this.zIndex))return{zIndex:1+this.zIndex}}},methods:{updateOffset:function(){if(this.$refs.bar){var t=this.$refs.bar.getBoundingClientRect();this.direction==="down"?this.offset=t.bottom:this.offset=window.innerHeight-t.top}},toggleItem:function(t){this.children.forEach(function(i,n){n===t?i.toggle():i.showPopup&&i.toggle(!1,{immediate:!0})})},onClickOutside:function(){this.children.forEach(function(t){t.toggle(!1)})}},render:function(){var t=this,i=arguments[0],n=this.children.map(function(r,a){return i("div",{attrs:{role:"button",tabindex:r.disabled?-1:0},class:li("item",{disabled:r.disabled}),on:{click:function(){r.disabled||t.toggleItem(a)}}},[i("span",{class:[li("title",{active:r.showPopup,down:r.showPopup===(t.direction==="down")}),r.titleClass],style:{color:r.showPopup?t.activeColor:""}},[i("div",{class:"van-ellipsis"},[r.slots("title")||r.displayTitle])])])});return i("div",{class:li()},[i("div",{ref:"bar",style:this.barStyle,class:li("bar",{opened:this.opened})},[n]),this.slots("default")])}});var H="van-empty-network-";const hd={render:function(){var t=arguments[0],i=function(r,a,s){return t("stop",{attrs:{"stop-color":r,offset:a+"%","stop-opacity":s}})};return t("svg",{attrs:{viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[t("linearGradient",{attrs:{id:H+"1",x1:"64.022%",y1:"100%",x2:"64.022%",y2:"0%"}},[i("#FFF",0,.5),i("#F2F3F5",100)]),t("linearGradient",{attrs:{id:H+"2",x1:"50%",y1:"0%",x2:"50%",y2:"84.459%"}},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),t("linearGradient",{attrs:{id:H+"3",x1:"100%",y1:"0%",x2:"100%",y2:"100%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"4",x1:"100%",y1:"100%",x2:"100%",y2:"0%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"5",x1:"0%",y1:"43.982%",x2:"100%",y2:"54.703%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"6",x1:"94.535%",y1:"43.837%",x2:"5.465%",y2:"54.948%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("radialGradient",{attrs:{id:H+"7",cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54835 0 .5 -.5)"}},[i("#EBEDF0",0),i("#FFF",100,0)])]),t("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[t("g",{attrs:{opacity:".8"}},[t("path",{attrs:{d:"M0 124V46h20v20h14v58H0z",fill:"url(#"+H+"1)",transform:"matrix(-1 0 0 1 36 7)"}}),t("path",{attrs:{d:"M121 8h22.231v14H152v77.37h-31V8z",fill:"url(#"+H+"1)",transform:"translate(2 7)"}})]),t("path",{attrs:{fill:"url(#"+H+"7)",d:"M0 139h160v21H0z"}}),t("path",{attrs:{d:"M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z",fill:"url(#"+H+"2)","fill-rule":"nonzero",transform:"translate(43 36)"}}),t("g",{attrs:{opacity:".6","stroke-linecap":"round","stroke-width":"7"}},[t("path",{attrs:{d:"M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+H+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+H+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+H+"4)",transform:"rotate(-180 76.483 42.257)"}}),t("path",{attrs:{d:"M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+H+"4)",transform:"rotate(-180 89.791 42.146)"}})]),t("g",{attrs:{transform:"translate(31 105)","fill-rule":"nonzero"}},[t("rect",{attrs:{fill:"url(#"+H+"5)",width:"98",height:"34",rx:"2"}}),t("rect",{attrs:{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.114"}}),t("rect",{attrs:{fill:"url(#"+H+"6)",x:"15",y:"12",width:"18",height:"6",rx:"1.114"}})])])])}};var Ds=p("empty"),dd=Ds[0],ci=Ds[1],fd=["error","search","default"];const pd=dd({props:{imageSize:[Number,String],description:String,image:{type:String,default:"default"}},methods:{genImageContent:function(){var t=this.$createElement,i=this.slots("image");if(i)return i;if(this.image==="network")return t(hd);var n=this.image;return fd.indexOf(n)!==-1&&(n="https://img01.yzcdn.cn/vant/empty-image-"+n+".png"),t("img",{attrs:{src:n}})},genImage:function(){var t=this.$createElement,i={width:P(this.imageSize),height:P(this.imageSize)};return t("div",{class:ci("image"),style:i},[this.genImageContent()])},genDescription:function(){var t=this.$createElement,i=this.slots("description")||this.description;if(i)return t("p",{class:ci("description")},[i])},genBottom:function(){var t=this.$createElement,i=this.slots();if(i)return t("div",{class:ci("bottom")},[i])}},render:function(){var t=arguments[0];return t("div",{class:ci()},[this.genImage(),this.genDescription(),this.genBottom()])}});var Ns=p("form"),vd=Ns[0],md=Ns[1];const gd=vd({props:{colon:Boolean,disabled:Boolean,readonly:Boolean,labelWidth:[Number,String],labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,errorMessageAlign:String,submitOnEnter:{type:Boolean,default:!0},validateTrigger:{type:String,default:"onBlur"},showError:{type:Boolean,default:!0},showErrorMessage:{type:Boolean,default:!0}},provide:function(){return{vanForm:this}},data:function(){return{fields:[]}},methods:{getFieldsByNames:function(t){return t?this.fields.filter(function(i){return t.indexOf(i.name)!==-1}):this.fields},validateSeq:function(t){var i=this;return new Promise(function(n,r){var a=[],s=i.getFieldsByNames(t);s.reduce(function(o,l){return o.then(function(){if(!a.length)return l.validate().then(function(c){c&&a.push(c)})})},Promise.resolve()).then(function(){a.length?r(a):n()})})},validateFields:function(t){var i=this;return new Promise(function(n,r){var a=i.getFieldsByNames(t);Promise.all(a.map(function(s){return s.validate()})).then(function(s){s=s.filter(function(o){return o}),s.length?r(s):n()})})},validate:function(t){return t&&!Array.isArray(t)?this.validateField(t):this.validateFirst?this.validateSeq(t):this.validateFields(t)},validateField:function(t){var i=this.fields.filter(function(n){return n.name===t});return i.length?new Promise(function(n,r){i[0].validate().then(function(a){a?r(a):n()})}):Promise.reject()},resetValidation:function(t){t&&!Array.isArray(t)&&(t=[t]);var i=this.getFieldsByNames(t);i.forEach(function(n){n.resetValidation()})},scrollToField:function(t,i){this.fields.some(function(n){return n.name===t?(n.$el.scrollIntoView(i),!0):!1})},addField:function(t){this.fields.push(t),ya(this.fields,this)},removeField:function(t){this.fields=this.fields.filter(function(i){return i!==t})},getValues:function(){return this.fields.reduce(function(t,i){return t[i.name]=i.formValue,t},{})},onSubmit:function(t){t.preventDefault(),this.submit()},submit:function(){var t=this,i=this.getValues();this.validate().then(function(){t.$emit("submit",i)}).catch(function(n){t.$emit("failed",{values:i,errors:n}),t.scrollToError&&t.scrollToField(n[0].name)})}},render:function(){var t=arguments[0];return t("form",{class:md(),on:{submit:this.onSubmit}},[this.slots()])}});var Ms=p("goods-action-icon"),yd=Ms[0],Vn=Ms[1];const bd=yd({mixins:[X("vanGoodsAction")],props:m({},Mt,{dot:Boolean,text:String,icon:String,color:String,info:[Number,String],badge:[Number,String],iconClass:null}),methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)},genIcon:function(){var t,i=this.$createElement,n=this.slots("icon"),r=(t=this.badge)!=null?t:this.info;return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] GoodsActionIcon: "info" prop is deprecated, use "badge" prop instead.'),n?i("div",{class:Vn("icon")},[n,i(Kt,{attrs:{dot:this.dot,info:r}})]):i(w,{class:[Vn("icon"),this.iconClass],attrs:{tag:"div",dot:this.dot,name:this.icon,badge:r,color:this.color}})}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"button",tabindex:"0"},class:Vn(),on:{click:this.onClick}},[this.genIcon(),this.slots()||this.text])}});var Ls=p("grid"),Sd=Ls[0],kd=Ls[1];const Cd=Sd({mixins:[G("vanGrid")],props:{square:Boolean,gutter:[Number,String],iconSize:[Number,String],direction:String,clickable:Boolean,columnNum:{type:[Number,String],default:4},center:{type:Boolean,default:!0},border:{type:Boolean,default:!0}},computed:{style:function(){var t=this.gutter;if(t)return{paddingLeft:P(t)}}},render:function(){var t,i=arguments[0];return i("div",{style:this.style,class:[kd(),(t={},t[qi]=this.border&&!this.gutter,t)]},[this.slots()])}});var As=p("grid-item"),$d=As[0],Ce=As[1];const wd=$d({mixins:[X("vanGrid")],props:m({},Mt,{dot:Boolean,text:String,icon:String,iconPrefix:String,info:[Number,String],badge:[Number,String]}),computed:{style:function(){var t=this.parent,i=t.square,n=t.gutter,r=t.columnNum,a=100/r+"%",s={flexBasis:a};if(i)s.paddingTop=a;else if(n){var o=P(n);s.paddingRight=o,this.index>=r&&(s.marginTop=o)}return s},contentStyle:function(){var t=this.parent,i=t.square,n=t.gutter;if(i&&n){var r=P(n);return{right:r,bottom:r,height:"auto"}}}},methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)},genIcon:function(){var t,i=this.$createElement,n=this.slots("icon"),r=(t=this.badge)!=null?t:this.info;if(process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] GridItem: "info" prop is deprecated, use "badge" prop instead.'),n)return i("div",{class:Ce("icon-wrapper")},[n,i(Kt,{attrs:{dot:this.dot,info:r}})]);if(this.icon)return i(w,{attrs:{name:this.icon,dot:this.dot,badge:r,size:this.parent.iconSize,classPrefix:this.iconPrefix},class:Ce("icon")})},getText:function(){var t=this.$createElement,i=this.slots("text");if(i)return i;if(this.text)return t("span",{class:Ce("text")},[this.text])},genContent:function(){var t=this.slots();return t||[this.genIcon(),this.getText()]}},render:function(){var t,i=arguments[0],n=this.parent,r=n.center,a=n.border,s=n.square,o=n.gutter,l=n.direction,c=n.clickable;return i("div",{class:[Ce({square:s})],style:this.style},[i("div",{style:this.contentStyle,attrs:{role:c?"button":null,tabindex:c?0:null},class:[Ce("content",[l,{center:r,square:s,clickable:c,surround:a&&o}]),(t={},t[ft]=a,t)],on:{click:this.onClick}},[this.genContent()])])}});var Rs=p("image-preview"),xd=Rs[0],Vt=Rs[1],Vs=p("swipe"),Td=Vs[0],ui=Vs[1];const zs=Td({mixins:[nt,G("vanSwipe"),ut(function(e,t){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0),e(window,"visibilitychange",this.onVisibilityChange),t?this.initialize():this.clear()})],props:{width:[Number,String],height:[Number,String],autoplay:[Number,String],vertical:Boolean,lazyRender:Boolean,indicatorColor:String,loop:{type:Boolean,default:!0},duration:{type:[Number,String],default:500},touchable:{type:Boolean,default:!0},initialSwipe:{type:[Number,String],default:0},showIndicators:{type:Boolean,default:!0},stopPropagation:{type:Boolean,default:!0}},data:function(){return{rect:null,offset:0,active:0,deltaX:0,deltaY:0,swiping:!1,computedWidth:0,computedHeight:0}},watch:{children:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t>0?this.autoPlay():this.clear()}},computed:{count:function(){return this.children.length},maxCount:function(){return Math.ceil(Math.abs(this.minOffset)/this.size)},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={transitionDuration:(this.swiping?0:this.duration)+"ms",transform:"translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)"};if(this.size){var i=this.vertical?"height":"width",n=this.vertical?"width":"height";t[i]=this.trackSize+"px",t[n]=this[n]?this[n]+"px":""}return t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}},minOffset:function(){return(this.vertical?this.rect.height:this.rect.width)-this.size*this.count}},mounted:function(){this.bindTouchEvent(this.$refs.track)},methods:{initialize:function(t){if(t===void 0&&(t=+this.initialSwipe),!(!this.$el||ke(this.$el))){clearTimeout(this.timer);var i={width:this.$el.offsetWidth,height:this.$el.offsetHeight};this.rect=i,this.swiping=!0,this.active=t,this.computedWidth=+this.width||i.width,this.computedHeight=+this.height||i.height,this.offset=this.getTargetOffset(t),this.children.forEach(function(n){n.offset=0}),this.autoPlay()}},resize:function(){this.initialize(this.activeIndicator)},onVisibilityChange:function(){document.hidden?this.clear():this.autoPlay()},onTouchStart:function(t){this.touchable&&(this.clear(),this.touchStartTime=Date.now(),this.touchStart(t),this.correctPosition())},onTouchMove:function(t){!this.touchable||!this.swiping||(this.touchMove(t),this.isCorrectDirection&&(z(t,this.stopPropagation),this.move({offset:this.delta})))},onTouchEnd:function(){if(!(!this.touchable||!this.swiping)){var t=this.size,i=this.delta,n=Date.now()-this.touchStartTime,r=i/n,a=Math.abs(r)>.25||Math.abs(i)>t/2;if(a&&this.isCorrectDirection){var s=this.vertical?this.offsetY:this.offsetX,o=0;this.loop?o=s>0?i>0?-1:1:0:o=-Math[i>0?"ceil":"floor"](i/t),this.move({pace:o,emitChange:!0})}else i&&this.move({pace:0});this.swiping=!1,this.autoPlay()}},getTargetActive:function(t){var i=this.active,n=this.count,r=this.maxCount;return t?this.loop?W(i+t,-1,n):W(i+t,0,r):i},getTargetOffset:function(t,i){i===void 0&&(i=0);var n=t*this.size;this.loop||(n=Math.min(n,-this.minOffset));var r=i-n;return this.loop||(r=W(r,this.minOffset,0)),r},move:function(t){var i=t.pace,n=i===void 0?0:i,r=t.offset,a=r===void 0?0:r,s=t.emitChange,o=this.loop,l=this.count,c=this.active,u=this.children,h=this.trackSize,d=this.minOffset;if(!(l<=1)){var f=this.getTargetActive(n),v=this.getTargetOffset(f,a);if(o){if(u[0]&&v!==d){var g=v<d;u[0].offset=g?h:0}if(u[l-1]&&v!==0){var y=v>0;u[l-1].offset=y?-h:0}}this.active=f,this.offset=v,s&&f!==c&&this.$emit("change",this.activeIndicator)}},prev:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),Xt(function(){t.swiping=!1,t.move({pace:-1,emitChange:!0})})},next:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),Xt(function(){t.swiping=!1,t.move({pace:1,emitChange:!0})})},swipeTo:function(t,i){var n=this;i===void 0&&(i={}),this.correctPosition(),this.resetTouchStatus(),Xt(function(){var r;n.loop&&t===n.count?r=n.active===0?0:t:r=t%n.count,i.immediate?Xt(function(){n.swiping=!1}):n.swiping=!1,n.move({pace:r-n.active,emitChange:!0})})},correctPosition:function(){this.swiping=!0,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,i=this.autoplay;i>0&&this.count>1&&(this.clear(),this.timer=setTimeout(function(){t.next(),t.autoPlay()},i))},genIndicator:function(){var t=this,i=this.$createElement,n=this.count,r=this.activeIndicator,a=this.slots("indicator");if(a)return a;if(this.showIndicators&&n>1)return i("div",{class:ui("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(n)).map(function(s,o){return i("i",{class:ui("indicator",{active:o===r}),style:o===r?t.indicatorStyle:null})})])}},render:function(){var t=arguments[0];return t("div",{class:ui()},[t("div",{ref:"track",style:this.trackStyle,class:ui("track",{vertical:this.vertical})},[this.slots()]),this.genIndicator()])}});var Fs=p("swipe-item"),_d=Fs[0],Id=Fs[1];const Hs=_d({mixins:[X("vanSwipe")],data:function(){return{offset:0,inited:!1,mounted:!1}},mounted:function(){var t=this;this.$nextTick(function(){t.mounted=!0})},computed:{style:function(){var t={},i=this.parent,n=i.size,r=i.vertical;return n&&(t[r?"height":"width"]=n+"px"),this.offset&&(t.transform="translate"+(r?"Y":"X")+"("+this.offset+"px)"),t},shouldRender:function(){var t=this.index,i=this.inited,n=this.parent,r=this.mounted;if(!n.lazyRender||i)return!0;if(!r)return!1;var a=n.activeIndicator,s=n.count-1,o=a===0&&n.loop?s:a-1,l=a===s&&n.loop?0:a+1,c=t===a||t===o||t===l;return c&&(this.inited=!0),c}},render:function(){var t=arguments[0];return t("div",{class:Id(),style:this.style,on:m({},this.$listeners)},[this.shouldRender&&this.slots()])}});function js(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}const Od={mixins:[nt],props:{src:String,show:Boolean,active:Number,minZoom:[Number,String],maxZoom:[Number,String],rootWidth:Number,rootHeight:Number},data:function(){return{scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}},computed:{vertical:function(){var t=this.rootWidth,i=this.rootHeight,n=i/t;return this.imageRatio>n},imageStyle:function(){var t=this.scale,i={transitionDuration:this.zooming||this.moving?"0s":".3s"};if(t!==1){var n=this.moveX/t,r=this.moveY/t;i.transform="scale("+t+", "+t+") translate("+n+"px, "+r+"px)"}return i},maxMoveX:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight/this.imageRatio:this.rootWidth;return Math.max(0,(this.scale*t-this.rootWidth)/2)}return 0},maxMoveY:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight:this.rootWidth*this.imageRatio;return Math.max(0,(this.scale*t-this.rootHeight)/2)}return 0}},watch:{active:"resetScale",show:function(t){t||this.resetScale()}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{resetScale:function(){this.setScale(1),this.moveX=0,this.moveY=0},setScale:function(t){t=W(t,+this.minZoom,+this.maxZoom),t!==this.scale&&(this.scale=t,this.$emit("scale",{scale:this.scale,index:this.active}))},toggleScale:function(){var t=this.scale>1?1:2;this.setScale(t),this.moveX=0,this.moveY=0},onTouchStart:function(t){var i=t.touches,n=this.offsetX,r=n===void 0?0:n;this.touchStart(t),this.touchStartTime=new Date,this.fingerNum=i.length,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.moving=this.fingerNum===1&&this.scale!==1,this.zooming=this.fingerNum===2&&!r,this.zooming&&(this.startScale=this.scale,this.startDistance=js(t.touches))},onTouchMove:function(t){var i=t.touches;if(this.touchMove(t),(this.moving||this.zooming)&&z(t,!0),this.moving){var n=this.deltaX+this.startMoveX,r=this.deltaY+this.startMoveY;this.moveX=W(n,-this.maxMoveX,this.maxMoveX),this.moveY=W(r,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&i.length===2){var a=js(i),s=this.startScale*a/this.startDistance;this.setScale(s)}},onTouchEnd:function(t){var i=!1;(this.moving||this.zooming)&&(i=!0,this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(i=!1),t.touches.length||(this.zooming&&(this.moveX=W(this.moveX,-this.maxMoveX,this.maxMoveX),this.moveY=W(this.moveY,-this.maxMoveY,this.maxMoveY),this.zooming=!1),this.moving=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale())),z(t,i),this.checkTap(),this.resetTouchStatus()},checkTap:function(){var t=this;if(!(this.fingerNum>1)){var i=this.offsetX,n=i===void 0?0:i,r=this.offsetY,a=r===void 0?0:r,s=new Date-this.touchStartTime,o=250,l=5;n<l&&a<l&&s<o&&(this.doubleTapTimer?(clearTimeout(this.doubleTapTimer),this.doubleTapTimer=null,this.toggleScale()):this.doubleTapTimer=setTimeout(function(){t.$emit("close"),t.doubleTapTimer=null},o))}},onLoad:function(t){var i=t.target,n=i.naturalWidth,r=i.naturalHeight;this.imageRatio=r/n}},render:function(){var t=arguments[0],i={loading:function(){return t(ht,{attrs:{type:"spinner"}})}};return t(Hs,{class:Vt("swipe-item")},[t(oe,{attrs:{src:this.src,fit:"contain"},class:Vt("image",{vertical:this.vertical}),style:this.imageStyle,scopedSlots:i,on:{load:this.onLoad}})])}},zn=xd({mixins:[nt,He({skipToggleEvent:!0}),ut(function(e){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0)})],props:{className:null,closeable:Boolean,asyncClose:Boolean,overlayStyle:Object,showIndicators:Boolean,images:{type:Array,default:function(){return[]}},loop:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},minZoom:{type:[Number,String],default:1/3},maxZoom:{type:[Number,String],default:3},transition:{type:String,default:"van-fade"},showIndex:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:300},startPosition:{type:[Number,String],default:0},overlayClass:{type:String,default:Vt("overlay")},closeIcon:{type:String,default:"clear"},closeOnPopstate:{type:Boolean,default:!0},closeIconPosition:{type:String,default:"top-right"}},data:function(){return{active:0,rootWidth:0,rootHeight:0,doubleClickTimer:null}},mounted:function(){this.resize()},watch:{startPosition:"setActive",value:function(t){var i=this;t?(this.setActive(+this.startPosition),this.$nextTick(function(){i.resize(),i.$refs.swipe.swipeTo(+i.startPosition,{immediate:!0})})):this.$emit("close",{index:this.active,url:this.images[this.active]})}},methods:{resize:function(){if(this.$el&&this.$el.getBoundingClientRect){var t=this.$el.getBoundingClientRect();this.rootWidth=t.width,this.rootHeight=t.height}},emitClose:function(){this.asyncClose||this.$emit("input",!1)},emitScale:function(t){this.$emit("scale",t)},setActive:function(t){t!==this.active&&(this.active=t,this.$emit("change",t))},genIndex:function(){var t=this.$createElement;if(this.showIndex)return t("div",{class:Vt("index")},[this.slots("index",{index:this.active})||this.active+1+" / "+this.images.length])},genCover:function(){var t=this.$createElement,i=this.slots("cover");if(i)return t("div",{class:Vt("cover")},[i])},genImages:function(){var t=this,i=this.$createElement;return i(zs,{ref:"swipe",attrs:{lazyRender:!0,loop:this.loop,duration:this.swipeDuration,initialSwipe:this.startPosition,showIndicators:this.showIndicators,indicatorColor:"white"},class:Vt("swipe"),on:{change:this.setActive}},[this.images.map(function(n){return i(Od,{attrs:{src:n,show:t.value,active:t.active,maxZoom:t.maxZoom,minZoom:t.minZoom,rootWidth:t.rootWidth,rootHeight:t.rootHeight},on:{scale:t.emitScale,close:t.emitClose}})})])},genClose:function(){var t=this.$createElement;if(this.closeable)return t(w,{attrs:{role:"button",name:this.closeIcon},class:Vt("close-icon",this.closeIconPosition),on:{click:this.emitClose}})},onClosed:function(){this.$emit("closed")},swipeTo:function(t,i){this.$refs.swipe&&this.$refs.swipe.swipeTo(t,i)}},render:function(){var t=arguments[0];return t("transition",{attrs:{name:this.transition},on:{afterLeave:this.onClosed}},[this.shouldRender?t("div",{directives:[{name:"show",value:this.value}],class:[Vt(),this.className]},[this.genClose(),this.genImages(),this.genIndex(),this.genCover()]):null])}});var j,Pd={loop:!0,value:!0,images:[],maxZoom:3,minZoom:1/3,onClose:null,onChange:null,className:"",showIndex:!0,closeable:!1,closeIcon:"clear",asyncClose:!1,transition:"van-fade",getContainer:"body",overlayStyle:null,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"},Bd=function(){j=new($.extend(zn))({el:document.createElement("div")}),document.body.appendChild(j.$el),j.$on("change",function(t){j.onChange&&j.onChange(t)}),j.$on("scale",function(t){j.onScale&&j.onScale(t)})},Fn=function(t,i){if(i===void 0&&(i=0),!K){j||Bd();var n=Array.isArray(t)?{images:t,startPosition:i}:t;return m(j,Pd,n),j.$once("input",function(r){j.value=r}),j.$once("closed",function(){j.images=[]}),n.onClose&&(j.$off("close"),j.$once("close",n.onClose)),j}};Fn.Component=zn,Fn.install=function(){$.use(zn)};const Hn=Fn;var Ws=p("index-anchor"),Ed=Ws[0],Dd=Ws[1];const Nd=Ed({mixins:[X("vanIndexBar",{indexKey:"childrenIndex"})],props:{index:[Number,String]},data:function(){return{top:0,left:null,rect:{top:0,height:0},width:null,active:!1}},computed:{sticky:function(){return this.active&&this.parent.sticky},anchorStyle:function(){if(this.sticky)return{zIndex:""+this.parent.zIndex,left:this.left?this.left+"px":null,width:this.width?this.width+"px":null,transform:"translate3d(0, "+this.top+"px, 0)",color:this.parent.highlightColor}}},mounted:function(){var t=this.$el.getBoundingClientRect();this.rect.height=t.height},methods:{scrollIntoView:function(){this.$el.scrollIntoView()},getRect:function(t,i){var n=this.$el,r=n.getBoundingClientRect();return this.rect.height=r.height,t===window||t===document.body?this.rect.top=r.top+ve():this.rect.top=r.top+qt(t)-i.top,this.rect}},render:function(){var t,i=arguments[0],n=this.sticky;return i("div",{style:{height:n?this.rect.height+"px":null}},[i("div",{style:this.anchorStyle,class:[Dd({sticky:n}),(t={},t[me]=n,t)]},[this.slots("default")||this.index])])}});function Md(){for(var e=[],t="A".charCodeAt(0),i=0;i<26;i++)e.push(String.fromCharCode(t+i));return e}var Us=p("index-bar"),Ld=Us[0],jn=Us[1];const Ad=Ld({mixins:[nt,G("vanIndexBar"),ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(this.scroller,"scroll",this.onScroll)})],props:{zIndex:[Number,String],highlightColor:String,sticky:{type:Boolean,default:!0},stickyOffsetTop:{type:Number,default:0},indexList:{type:Array,default:Md}},data:function(){return{activeAnchorIndex:null}},computed:{sidebarStyle:function(){if(_(this.zIndex))return{zIndex:this.zIndex+1}},highlightStyle:function(){var t=this.highlightColor;if(t)return{color:t}}},watch:{indexList:function(){this.$nextTick(this.onScroll)},activeAnchorIndex:function(t){t&&this.$emit("change",t)}},methods:{onScroll:function(){var t=this;if(!ke(this.$el)){var i=qt(this.scroller),n=this.getScrollerRect(),r=this.children.map(function(s){return s.getRect(t.scroller,n)}),a=this.getActiveAnchorIndex(i,r);this.activeAnchorIndex=this.indexList[a],this.sticky&&this.children.forEach(function(s,o){if(o===a||o===a-1){var l=s.$el.getBoundingClientRect();s.left=l.left,s.width=l.width}else s.left=null,s.width=null;if(o===a)s.active=!0,s.top=Math.max(t.stickyOffsetTop,r[o].top-i)+n.top;else if(o===a-1){var c=r[a].top-i;s.active=c>0,s.top=c+n.top-r[o].height}else s.active=!1})}},getScrollerRect:function(){return this.scroller.getBoundingClientRect?this.scroller.getBoundingClientRect():{top:0,left:0}},getActiveAnchorIndex:function(t,i){for(var n=this.children.length-1;n>=0;n--){var r=n>0?i[n-1].height:0,a=this.sticky?r+this.stickyOffsetTop:0;if(t+a>=i[n].top)return n}return-1},onClick:function(t){this.scrollToElement(t.target)},onTouchMove:function(t){if(this.touchMove(t),this.direction==="vertical"){z(t);var i=t.touches[0],n=i.clientX,r=i.clientY,a=document.elementFromPoint(n,r);if(a){var s=a.dataset.index;this.touchActiveIndex!==s&&(this.touchActiveIndex=s,this.scrollToElement(a))}}},scrollTo:function(t){var i=this.children.filter(function(n){return String(n.index)===t});i[0]&&(i[0].scrollIntoView(),this.sticky&&this.stickyOffsetTop&&ze(ve()-this.stickyOffsetTop),this.$emit("select",i[0].index))},scrollToElement:function(t){var i=t.dataset.index;this.scrollTo(i)},onTouchEnd:function(){this.active=null}},render:function(){var t=this,i=arguments[0],n=this.indexList.map(function(r){var a=r===t.activeAnchorIndex;return i("span",{class:jn("index",{active:a}),style:a?t.highlightStyle:null,attrs:{"data-index":r}},[r])});return i("div",{class:jn()},[i("div",{class:jn("sidebar"),style:this.sidebarStyle,on:{click:this.onClick,touchstart:this.touchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[n]),this.slots("default")])}});var Wn=p("list"),Rd=Wn[0],$e=Wn[1],Vd=Wn[2];const zd=Rd({mixins:[ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(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,String],default:300},direction:{type:String,default:"down"}},data:function(){return{innerLoading:this.loading}},updated:function(){this.innerLoading=this.loading},mounted:function(){this.immediateCheck&&this.check()},watch:{loading:"check",finished:"check"},methods:{check:function(){var t=this;this.$nextTick(function(){if(!(t.innerLoading||t.finished||t.error)){var i=t.$el,n=t.scroller,r=t.offset,a=t.direction,s;n.getBoundingClientRect?s=n.getBoundingClientRect():s={top:0,bottom:n.innerHeight};var o=s.bottom-s.top;if(!o||ke(i))return!1;var l=!1,c=t.$refs.placeholder.getBoundingClientRect();a==="up"?l=s.top-c.top<=r:l=c.bottom-s.bottom<=r,l&&(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&&!this.finished)return t("div",{key:"loading",class:$e("loading")},[this.slots("loading")||t(ht,{attrs:{size:"16"}},[this.loadingText||Vd("loading")])])},genFinishedText:function(){var t=this.$createElement;if(this.finished){var i=this.slots("finished")||this.finishedText;if(i)return t("div",{class:$e("finished-text")},[i])}},genErrorText:function(){var t=this.$createElement;if(this.error){var i=this.slots("error")||this.errorText;if(i)return t("div",{on:{click:this.clickErrorText},class:$e("error-text")},[i])}}},render:function(){var t=arguments[0],i=t("div",{ref:"placeholder",key:"placeholder",class:$e("placeholder")});return t("div",{class:$e(),attrs:{role:"feed","aria-busy":this.innerLoading}},[this.direction==="down"?this.slots():i,this.genLoading(),this.genFinishedText(),this.genErrorText(),this.direction==="up"?this.slots():i])}});var qs=p("nav-bar"),Fd=qs[0],Bt=qs[1];const Hd=Fd({props:{title:String,fixed:Boolean,zIndex:[Number,String],leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,border:{type:Boolean,default:!0}},data:function(){return{height:null}},mounted:function(){var t=this;if(this.placeholder&&this.fixed){var i=function(){t.height=t.$refs.navBar.getBoundingClientRect().height};i(),setTimeout(i,100)}},methods:{genLeft:function(){var t=this.$createElement,i=this.slots("left");return i||[this.leftArrow&&t(w,{class:Bt("arrow"),attrs:{name:"arrow-left"}}),this.leftText&&t("span",{class:Bt("text")},[this.leftText])]},genRight:function(){var t=this.$createElement,i=this.slots("right");if(i)return i;if(this.rightText)return t("span",{class:Bt("text")},[this.rightText])},genNavBar:function(){var t,i=this.$createElement;return i("div",{ref:"navBar",style:{zIndex:this.zIndex},class:[Bt({fixed:this.fixed,"safe-area-inset-top":this.safeAreaInsetTop}),(t={},t[me]=this.border,t)]},[i("div",{class:Bt("content")},[this.hasLeft()&&i("div",{class:Bt("left"),on:{click:this.onClickLeft}},[this.genLeft()]),i("div",{class:[Bt("title"),"van-ellipsis"]},[this.slots("title")||this.title]),this.hasRight()&&i("div",{class:Bt("right"),on:{click:this.onClickRight}},[this.genRight()])])])},hasLeft:function(){return this.leftArrow||this.leftText||this.slots("left")},hasRight:function(){return this.rightText||this.slots("right")},onClickLeft:function(t){this.$emit("click-left",t)},onClickRight:function(t){this.$emit("click-right",t)}},render:function(){var t=arguments[0];return this.placeholder&&this.fixed?t("div",{class:Bt("placeholder"),style:{height:this.height+"px"}},[this.genNavBar()]):this.genNavBar()}});var Ks=p("notice-bar"),jd=Ks[0],we=Ks[1];const Wd=jd({mixins:[ut(function(e){e(window,"pageshow",this.reset)})],inject:{vanPopup:{default:null}},props:{text:String,mode:String,color:String,leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null},delay:{type:[Number,String],default:1},speed:{type:[Number,String],default:60}},data:function(){return{show:!0,offset:0,duration:0,wrapWidth:0,contentWidth:0}},watch:{scrollable:"reset",text:{handler:"reset",immediate:!0}},created:function(){this.vanPopup&&this.vanPopup.onReopen(this.reset)},activated:function(){this.reset()},methods:{onClickIcon:function(t){this.mode==="closeable"&&(this.show=!1,this.$emit("close",t))},onTransitionEnd:function(){var t=this;this.offset=this.wrapWidth,this.duration=0,at(function(){Xt(function(){t.offset=-t.contentWidth,t.duration=(t.contentWidth+t.wrapWidth)/t.speed,t.$emit("replay")})})},start:function(){this.reset()},reset:function(){var t=this,i=_(this.delay)?this.delay*1e3:0;this.offset=0,this.duration=0,this.wrapWidth=0,this.contentWidth=0,clearTimeout(this.startTimer),this.startTimer=setTimeout(function(){var n=t.$refs,r=n.wrap,a=n.content;if(!(!r||!a||t.scrollable===!1)){var s=r.getBoundingClientRect().width,o=a.getBoundingClientRect().width;(t.scrollable||o>s)&&Xt(function(){t.offset=-o,t.duration=o/t.speed,t.wrapWidth=s,t.contentWidth=o})}},i)}},render:function(){var t=this,i=arguments[0],n=this.slots,r=this.mode,a=this.leftIcon,s=this.onClickIcon,o={color:this.color,background:this.background},l={transform:this.offset?"translateX("+this.offset+"px)":"",transitionDuration:this.duration+"s"};function c(){var h=n("left-icon");if(h)return h;if(a)return i(w,{class:we("left-icon"),attrs:{name:a}})}function u(){var h=n("right-icon");if(h)return h;var d;if(r==="closeable"?d="cross":r==="link"&&(d="arrow"),d)return i(w,{class:we("right-icon"),attrs:{name:d},on:{click:s}})}return i("div",{attrs:{role:"alert"},directives:[{name:"show",value:this.show}],class:we({wrapable:this.wrapable}),style:o,on:{click:function(d){t.$emit("click",d)}}},[c(),i("div",{ref:"wrap",class:we("wrap"),attrs:{role:"marquee"}},[i("div",{ref:"content",class:[we("content"),{"van-ellipsis":this.scrollable===!1&&!this.wrapable}],style:l,on:{transitionend:this.onTransitionEnd}},[this.slots()||this.text])]),u()])}});var Ys=p("notify"),Ud=Ys[0],qd=Ys[1];function Xs(e,t,i,n){var r={color:t.color,background:t.background};return e(St,T([{attrs:{value:t.value,position:"top",overlay:!1,duration:.2,lockScroll:!1},style:r,class:[qd([t.type]),t.className]},B(n,!0)]),[(i.default==null?void 0:i.default())||t.message])}Xs.props=m({},Fe,{color:String,message:[Number,String],duration:[Number,String],className:null,background:String,getContainer:[String,Function],type:{type:String,default:"danger"}});const Un=Ud(Xs);var Gs,st;function Kd(e){return ct(e)?e:{message:e}}function ot(e){if(!K)return st||(st=_r(Un,{on:{click:function(i){st.onClick&&st.onClick(i)},close:function(){st.onClose&&st.onClose()},opened:function(){st.onOpened&&st.onOpened()}}})),e=m({},ot.currentOptions,Kd(e)),m(st,e),clearTimeout(Gs),e.duration&&e.duration>0&&(Gs=setTimeout(ot.clear,e.duration)),st}function Zs(){return{type:"danger",value:!0,message:"",color:void 0,background:void 0,duration:3e3,className:"",onClose:null,onClick:null,onOpened:null}}ot.clear=function(){st&&(st.value=!1)},ot.currentOptions=Zs(),ot.setDefaultOptions=function(e){m(ot.currentOptions,e)},ot.resetDefaultOptions=function(){ot.currentOptions=Zs()},ot.install=function(){$.use(Un)},ot.Component=Un,$.prototype.$notify=ot;const Yd={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"0 0 32 22",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M28.016 0A3.991 3.991 0 0132 3.987v14.026c0 2.2-1.787 3.987-3.98 3.987H10.382c-.509 0-.996-.206-1.374-.585L.89 13.09C.33 12.62 0 11.84 0 11.006c0-.86.325-1.62.887-2.08L9.01.585A1.936 1.936 0 0110.383 0zm0 1.947H10.368L2.24 10.28c-.224.226-.312.432-.312.73 0 .287.094.51.312.729l8.128 8.333h17.648a2.041 2.041 0 002.037-2.04V3.987c0-1.127-.915-2.04-2.037-2.04zM23.028 6a.96.96 0 01.678.292.95.95 0 01-.003 1.377l-3.342 3.348 3.326 3.333c.189.188.292.43.292.679 0 .248-.103.49-.292.679a.96.96 0 01-.678.292.959.959 0 01-.677-.292L18.99 12.36l-3.343 3.345a.96.96 0 01-.677.292.96.96 0 01-.678-.292.962.962 0 01-.292-.68c0-.248.104-.49.292-.679l3.342-3.348-3.342-3.348A.963.963 0 0114 6.971c0-.248.104-.49.292-.679A.96.96 0 0114.97 6a.96.96 0 01.677.292l3.358 3.348 3.345-3.348A.96.96 0 0123.028 6z",fill:"currentColor"}})])}},Xd={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"0 0 30 24",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M25.877 12.843h-1.502c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.5c.187 0 .187 0 .187-.188v-1.511c0-.19 0-.191-.185-.191zM17.999 10.2c0 .188 0 .188.188.188h1.687c.188 0 .188 0 .188-.188V8.688c0-.187.004-.187-.186-.19h-1.69c-.187 0-.187 0-.187.19V10.2zm2.25-3.967h1.5c.188 0 .188 0 .188-.188v-1.7c0-.19 0-.19-.188-.19h-1.5c-.189 0-.189 0-.189.19v1.7c0 .188 0 .188.19.188zm2.063 4.157h3.563c.187 0 .187 0 .187-.189V4.346c0-.19.004-.19-.185-.19h-1.69c-.187 0-.187 0-.187.188v4.155h-1.688c-.187 0-.187 0-.187.189v1.514c0 .19 0 .19.187.19zM14.812 24l2.812-3.4H12l2.813 3.4zm-9-11.157H4.31c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.502c.187 0 .187 0 .187-.188v-1.511c0-.19.01-.191-.189-.191zm15.937 0H8.25c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h13.5c.188 0 .188 0 .188-.188v-1.511c0-.19 0-.191-.188-.191zm-11.438-2.454h1.5c.188 0 .188 0 .188-.188V8.688c0-.187 0-.187-.188-.189h-1.5c-.187 0-.187 0-.187.189V10.2c0 .188 0 .188.187.188zM27.94 0c.563 0 .917.21 1.313.567.518.466.748.757.748 1.51v14.92c0 .567-.188 1.134-.562 1.512-.376.378-.938.566-1.313.566H2.063c-.563 0-.938-.188-1.313-.566-.562-.378-.75-.945-.75-1.511V2.078C0 1.51.188.944.562.567.938.189 1.5 0 1.875 0zm-.062 2H2v14.92h25.877V2zM5.81 4.157c.19 0 .19 0 .19.189v1.762c-.003.126-.024.126-.188.126H4.249c-.126-.003-.126-.023-.126-.188v-1.7c-.187-.19 0-.19.188-.19zm10.5 2.077h1.503c.187 0 .187 0 .187-.188v-1.7c0-.19 0-.19-.187-.19h-1.502c-.188 0-.188.001-.188.19v1.7c0 .188 0 .188.188.188zM7.875 8.5c.187 0 .187.002.187.189V10.2c0 .188 0 .188-.187.188H4.249c-.126-.002-.126-.023-.126-.188V8.625c.003-.126.024-.126.188-.126zm7.875 0c.19.002.19.002.19.189v1.575c-.003.126-.024.126-.19.126h-1.563c-.126-.002-.126-.023-.126-.188V8.625c.002-.126.023-.126.189-.126zm-6-4.342c.187 0 .187 0 .187.189v1.7c0 .188 0 .188-.187.188H8.187c-.126-.003-.126-.023-.126-.188V4.283c.003-.126.024-.126.188-.126zm3.94 0c.185 0 .372 0 .372.189v1.762c-.002.126-.023.126-.187.126h-1.75C12 6.231 12 6.211 12 6.046v-1.7c0-.19.187-.19.187-.19z",fill:"currentColor"}})])}};var Js=p("key"),Gd=Js[0],xe=Js[1];const qn=Gd({mixins:[nt],props:{type:String,text:[Number,String],color:String,wider:Boolean,large:Boolean,loading:Boolean},data:function(){return{active:!1}},mounted:function(){this.bindTouchEvent(this.$el)},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(t){this.active&&(this.slots("default")||t.preventDefault(),this.active=!1,this.$emit("press",this.text,this.type))},genContent:function(){var t=this.$createElement,i=this.type==="extra",n=this.type==="delete",r=this.slots("default")||this.text;return this.loading?t(ht,{class:xe("loading-icon")}):n?r||t(Yd,{class:xe("delete-icon")}):i?r||t(Xd,{class:xe("collapse-icon")}):r}},render:function(){var t=arguments[0];return t("div",{class:xe("wrapper",{wider:this.wider})},[t("div",{attrs:{role:"button",tabindex:"0"},class:xe([this.color,{large:this.large,active:this.active,delete:this.type==="delete"}])},[this.genContent()])])}});var Qs=p("number-keyboard"),Zd=Qs[0],zt=Qs[1];const Jd=Zd({mixins:[Ui(),ut(function(e){this.hideOnClickOutside&&e(document.body,"touchstart",this.onBlur)})],model:{event:"update:value"},props:{show:Boolean,title:String,zIndex:[Number,String],randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,theme:{type:String,default:"default"},value:{type:String,default:""},extraKey:{type:[String,Array],default:""},maxlength:{type:[Number,String],default:Number.MAX_VALUE},transition:{type:Boolean,default:!0},showDeleteKey:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0}},watch:{show:function(t){this.transition||this.$emit(t?"show":"hide")}},computed:{keys:function(){return this.theme==="custom"?this.genCustomKeys():this.genDefaultKeys()}},methods:{genBasicKeys:function(){for(var t=[],i=1;i<=9;i++)t.push({text:i});return this.randomKeyOrder&&t.sort(function(){return Math.random()>.5?1:-1}),t},genDefaultKeys:function(){return[].concat(this.genBasicKeys(),[{text:this.extraKey,type:"extra"},{text:0},{text:this.showDeleteKey?this.deleteButtonText:"",type:this.showDeleteKey?"delete":""}])},genCustomKeys:function(){var t=this.genBasicKeys(),i=this.extraKey,n=Array.isArray(i)?i:[i];return n.length===1?t.push({text:0,wider:!0},{text:n[0],type:"extra"}):n.length===2&&t.push({text:n[0],type:"extra"},{text:0},{text:n[1],type:"extra"}),t},onBlur:function(){this.show&&this.$emit("blur")},onClose:function(){this.$emit("close"),this.onBlur()},onAnimationEnd:function(){this.$emit(this.show?"show":"hide")},onPress:function(t,i){if(t===""){i==="extra"&&this.onBlur();return}var n=this.value;i==="delete"?(this.$emit("delete"),this.$emit("update:value",n.slice(0,n.length-1))):i==="close"?this.onClose():n.length<this.maxlength&&(this.$emit("input",t),this.$emit("update:value",n+t))},genTitle:function(){var t=this.$createElement,i=this.title,n=this.theme,r=this.closeButtonText,a=this.slots("title-left"),s=r&&n==="default",o=i||s||a;if(o)return t("div",{class:zt("header")},[a&&t("span",{class:zt("title-left")},[a]),i&&t("h2",{class:zt("title")},[i]),s&&t("button",{attrs:{type:"button"},class:zt("close"),on:{click:this.onClose}},[r])])},genKeys:function(){var t=this,i=this.$createElement;return this.keys.map(function(n){return i(qn,{key:n.text,attrs:{text:n.text,type:n.type,wider:n.wider,color:n.color},on:{press:t.onPress}},[n.type==="delete"&&t.slots("delete"),n.type==="extra"&&t.slots("extra-key")])})},genSidebar:function(){var t=this.$createElement;if(this.theme==="custom")return t("div",{class:zt("sidebar")},[this.showDeleteKey&&t(qn,{attrs:{large:!0,text:this.deleteButtonText,type:"delete"},on:{press:this.onPress}},[this.slots("delete")]),t(qn,{attrs:{large:!0,text:this.closeButtonText,type:"close",color:"blue",loading:this.closeButtonLoading},on:{press:this.onPress}})])}},render:function(){var t=arguments[0],i=this.genTitle();return t("transition",{attrs:{name:this.transition?"van-slide-up":""}},[t("div",{directives:[{name:"show",value:this.show}],style:{zIndex:this.zIndex},class:zt({unfit:!this.safeAreaInsetBottom,"with-title":i}),on:{touchstart:Pr,animationend:this.onAnimationEnd,webkitAnimationEnd:this.onAnimationEnd}},[i,t("div",{class:zt("body")},[t("div",{class:zt("keys")},[this.genKeys()]),this.genSidebar()])])])}});var Kn=p("pagination"),Qd=Kn[0],Ft=Kn[1],to=Kn[2];function Yn(e,t,i){return{number:e,text:t,active:i}}const tf=Qd({props:{prevText:String,nextText:String,forceEllipses:Boolean,mode:{type:String,default:"multi"},value:{type:Number,default:0},pageCount:{type:[Number,String],default:0},totalItems:{type:[Number,String],default:0},itemsPerPage:{type:[Number,String],default:10},showPageSize:{type:[Number,String],default:5}},computed:{count:function(){var t=this.pageCount||Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(1,t)},pages:function(){var t=[],i=this.count,n=+this.showPageSize;if(this.mode!=="multi")return t;var r=1,a=i,s=n<i;s&&(r=Math.max(this.value-Math.floor(n/2),1),a=r+n-1,a>i&&(a=i,r=a-n+1));for(var o=r;o<=a;o++){var l=Yn(o,o,o===this.value);t.push(l)}if(s&&n>0&&this.forceEllipses){if(r>1){var c=Yn(r-1,"...",!1);t.unshift(c)}if(a<i){var u=Yn(a+1,"...",!1);t.push(u)}}return t}},watch:{value:{handler:function(t){this.select(t||this.value)},immediate:!0}},methods:{select:function(t,i){t=Math.min(this.count,Math.max(1,t)),this.value!==t&&(this.$emit("input",t),i&&this.$emit("change",t))}},render:function(){var t=this,i,n,r=arguments[0],a=this.value,s=this.mode!=="multi",o=function(c){return function(){t.select(c,!0)}};return r("ul",{class:Ft({simple:s})},[r("li",{class:[Ft("item",{disabled:a===1}),Ft("prev"),ft],on:{click:o(a-1)}},[((i=this.slots("prev-text"))!=null?i:this.prevText)||to("prev")]),this.pages.map(function(l){var c;return r("li",{class:[Ft("item",{active:l.active}),Ft("page"),ft],on:{click:o(l.number)}},[(c=t.slots("page",l))!=null?c:l.text])}),s&&r("li",{class:Ft("page-desc")},[this.slots("pageDesc")||a+"/"+this.count]),r("li",{class:[Ft("item",{disabled:a===this.count}),Ft("next"),ft],on:{click:o(a+1)}},[((n=this.slots("next-text"))!=null?n:this.nextText)||to("next")])])}});var eo=p("panel"),ef=eo[0],Te=eo[1];function io(e,t,i,n){var r=function(){return[i.header?i.header():e(q,{attrs:{icon:t.icon,label:t.desc,title:t.title,value:t.status,valueClass:Te("header-value")},class:Te("header")}),e("div",{class:Te("content")},[i.default&&i.default()]),i.footer&&e("div",{class:[Te("footer"),qi]},[i.footer()])]};return e(es,T([{class:Te(),scopedSlots:{default:r}},B(n,!0)]))}io.props={icon:String,desc:String,title:String,status:String};const nf=ef(io);var no=p("password-input"),rf=no[0],_e=no[1];function ro(e,t,i,n){for(var r,a=t.mask,s=t.value,o=t.length,l=t.gutter,c=t.focused,u=t.errorInfo,h=u||t.info,d=[],f=0;f<o;f++){var v,g=s[f],y=f!==0&&!l,b=c&&f===s.length,S=void 0;f!==0&&l&&(S={marginLeft:P(l)}),d.push(e("li",{class:[(v={},v[Xr]=y,v),_e("item",{focus:b})],style:S},[a?e("i",{style:{visibility:g?"visible":"hidden"}}):g,b&&e("div",{class:_e("cursor")})]))}return e("div",{class:_e()},[e("ul",T([{class:[_e("security"),(r={},r[Gr]=!l,r)],on:{touchstart:function(k){k.stopPropagation(),I(n,"focus",k)}}},B(n,!0)]),[d]),h&&e("div",{class:_e(u?"error-info":"info")},[h])])}ro.props={info:String,gutter:[Number,String],focused:Boolean,errorInfo:String,mask:{type:Boolean,default:!0},value:{type:String,default:""},length:{type:[Number,String],default:6}};const af=rf(ro);function mt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xn(e){var t=mt(e).Element;return e instanceof t||e instanceof Element}function gt(e){var t=mt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ao(e){if(typeof ShadowRoot>"u")return!1;var t=mt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var ce=Math.round;function Gn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sf(){return!/^((?!chrome|android).)*safari/i.test(Gn())}function hi(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=e.getBoundingClientRect(),r=1,a=1;t&>(e)&&(r=e.offsetWidth>0&&ce(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ce(n.height)/e.offsetHeight||1);var s=Xn(e)?mt(e):window,o=s.visualViewport,l=!sf()&&i,c=(n.left+(l&&o?o.offsetLeft:0))/r,u=(n.top+(l&&o?o.offsetTop:0))/a,h=n.width/r,d=n.height/a;return{width:h,height:d,top:u,right:c+h,bottom:u+d,left:c,x:c,y:u}}function so(e){var t=mt(e),i=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:i,scrollTop:n}}function of(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lf(e){return e===mt(e)||!gt(e)?so(e):of(e)}function Et(e){return e?(e.nodeName||"").toLowerCase():null}function di(e){return((Xn(e)?e.ownerDocument:e.document)||window.document).documentElement}function cf(e){return hi(di(e)).left+so(e).scrollLeft}function Dt(e){return mt(e).getComputedStyle(e)}function Zn(e){var t=Dt(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function uf(e){var t=e.getBoundingClientRect(),i=ce(t.width)/e.offsetWidth||1,n=ce(t.height)/e.offsetHeight||1;return i!==1||n!==1}function hf(e,t,i){i===void 0&&(i=!1);var n=gt(t),r=gt(t)&&uf(t),a=di(t),s=hi(e,r,i),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&((Et(t)!=="body"||Zn(a))&&(o=lf(t)),gt(t)?(l=hi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=cf(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function df(e){var t=hi(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Jn(e){return Et(e)==="html"?e:e.assignedSlot||e.parentNode||(ao(e)?e.host:null)||di(e)}function oo(e){return["html","body","#document"].indexOf(Et(e))>=0?e.ownerDocument.body:gt(e)&&Zn(e)?e:oo(Jn(e))}function fi(e,t){var i;t===void 0&&(t=[]);var n=oo(e),r=n===((i=e.ownerDocument)==null?void 0:i.body),a=mt(n),s=r?[a].concat(a.visualViewport||[],Zn(n)?n:[]):n,o=t.concat(s);return r?o:o.concat(fi(Jn(s)))}function ff(e){return["table","td","th"].indexOf(Et(e))>=0}function lo(e){return!gt(e)||Dt(e).position==="fixed"?null:e.offsetParent}function pf(e){var t=/firefox/i.test(Gn()),i=/Trident/i.test(Gn());if(i&>(e)){var n=Dt(e);if(n.position==="fixed")return null}var r=Jn(e);for(ao(r)&&(r=r.host);gt(r)&&["html","body"].indexOf(Et(r))<0;){var a=Dt(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function co(e){for(var t=mt(e),i=lo(e);i&&ff(i)&&Dt(i).position==="static";)i=lo(i);return i&&(Et(i)==="html"||Et(i)==="body"&&Dt(i).position==="static")?t:i||pf(e)||t}var ue="top",pi="bottom",Ie="right",Gt="left",uo="auto",vf=[ue,pi,Ie,Gt],ho="start",vi="end",mf=[].concat(vf,[uo]).reduce(function(e,t){return e.concat([t,t+"-"+ho,t+"-"+vi])},[]),gf="beforeRead",yf="read",bf="afterRead",Sf="beforeMain",kf="main",Cf="afterMain",$f="beforeWrite",wf="write",xf="afterWrite",Qn=[gf,yf,bf,Sf,kf,Cf,$f,wf,xf];function Tf(e){var t=new Map,i=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function r(a){i.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!i.has(o)){var l=t.get(o);l&&r(l)}}),n.push(a)}return e.forEach(function(a){i.has(a.name)||r(a)}),n}function _f(e){var t=Tf(e);return Qn.reduce(function(i,n){return i.concat(t.filter(function(r){return r.phase===n}))},[])}function If(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function Ht(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return[].concat(i).reduce(function(r,a){return r.replace(/%s/,a)},e)}var Zt='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Of='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',fo=["name","enabled","phase","fn","effect","requires","options"];function Pf(e){e.forEach(function(t){[].concat(Object.keys(t),fo).filter(function(i,n,r){return r.indexOf(i)===n}).forEach(function(i){switch(i){case"name":typeof t.name!="string"&&console.error(Ht(Zt,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Ht(Zt,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":Qn.indexOf(t.phase)<0&&console.error(Ht(Zt,t.name,'"phase"',"either "+Qn.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Ht(Zt,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Ht(Zt,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Ht(Zt,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Ht(Zt,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+fo.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+i+'" was provided.')}t.requires&&t.requires.forEach(function(n){e.find(function(r){return r.name===n})==null&&console.error(Ht(Of,String(t.name),n,n))})})})}function Bf(e,t){var i=new Set;return e.filter(function(n){var r=t(n);if(!i.has(r))return i.add(r),!0})}function mi(e){return e.split("-")[0]}function Ef(e){var t=e.reduce(function(i,n){var r=i[n.name];return i[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,i},{});return Object.keys(t).map(function(i){return t[i]})}function po(e){return e.split("-")[1]}function Df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nf(e){var t=e.reference,i=e.element,n=e.placement,r=n?mi(n):null,a=n?po(n):null,s=t.x+t.width/2-i.width/2,o=t.y+t.height/2-i.height/2,l;switch(r){case ue:l={x:s,y:t.y-i.height};break;case pi:l={x:s,y:t.y+t.height};break;case Ie:l={x:t.x+t.width,y:o};break;case Gt:l={x:t.x-i.width,y:o};break;default:l={x:t.x,y:t.y}}var c=r?Df(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case ho:l[c]=l[c]-(t[u]/2-i[u]/2);break;case vi:l[c]=l[c]+(t[u]/2-i[u]/2);break}}return l}var vo="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Mf="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",mo={placement:"bottom",modifiers:[],strategy:"absolute"};function go(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Lf(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,n=i===void 0?[]:i,r=t.defaultOptions,a=r===void 0?mo:r;return function(o,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},mo,a),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},h=[],d=!1,f={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;g(),u.options=Object.assign({},a,u.options,S),u.scrollParents={reference:Xn(o)?fi(o):o.contextElement?fi(o.contextElement):[],popper:fi(l)};var x=_f(Ef([].concat(n,u.options.modifiers)));u.orderedModifiers=x.filter(function(et){return et.enabled});{var k=Bf([].concat(x,u.options.modifiers),function(et){var fe=et.name;return fe});if(Pf(k),mi(u.options.placement)===uo){var C=u.orderedModifiers.find(function(et){var fe=et.name;return fe==="flip"});C||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var O=Dt(l),_t=O.marginTop,M=O.marginRight,U=O.marginBottom,Me=O.marginLeft;[_t,M,U,Me].some(function(et){return parseFloat(et)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return v(),f.update()},forceUpdate:function(){if(!d){var b=u.elements,S=b.reference,x=b.popper;if(!go(S,x)){console.error(vo);return}u.rects={reference:hf(S,co(x),u.options.strategy==="fixed"),popper:df(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(et){return u.modifiersData[et.name]=Object.assign({},et.data)});for(var k=0,C=0;C<u.orderedModifiers.length;C++){if(k+=1,k>100){console.error(Mf);break}if(u.reset===!0){u.reset=!1,C=-1;continue}var O=u.orderedModifiers[C],_t=O.fn,M=O.options,U=M===void 0?{}:M,Me=O.name;typeof _t=="function"&&(u=_t({state:u,options:U,name:Me,instance:f})||u)}}},update:If(function(){return new Promise(function(y){f.forceUpdate(),y(u)})}),destroy:function(){g(),d=!0}};if(!go(o,l))return console.error(vo),f;f.setOptions(c).then(function(y){!d&&c.onFirstUpdate&&c.onFirstUpdate(y)});function v(){u.orderedModifiers.forEach(function(y){var b=y.name,S=y.options,x=S===void 0?{}:S,k=y.effect;if(typeof k=="function"){var C=k({state:u,name:b,instance:f,options:x}),O=function(){};h.push(C||O)}})}function g(){h.forEach(function(y){return y()}),h=[]}return f}}var gi={passive:!0};function Af(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,a=r===void 0?!0:r,s=n.resize,o=s===void 0?!0:s,l=mt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",i.update,gi)}),o&&l.addEventListener("resize",i.update,gi),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",i.update,gi)}),o&&l.removeEventListener("resize",i.update,gi)}}var Rf={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Af,data:{}};function Vf(e){var t=e.state,i=e.name;t.modifiersData[i]=Nf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var zf={name:"popperOffsets",enabled:!0,phase:"read",fn:Vf,data:{}},Ff={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hf(e){var t=e.x,i=e.y,n=window,r=n.devicePixelRatio||1;return{x:ce(t*r)/r||0,y:ce(i*r)/r||0}}function yo(e){var t,i=e.popper,n=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,h=e.isFixed,d=s.x,f=d===void 0?0:d,v=s.y,g=v===void 0?0:v,y=typeof u=="function"?u({x:f,y:g}):{x:f,y:g};f=y.x,g=y.y;var b=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),x=Gt,k=ue,C=window;if(c){var O=co(i),_t="clientHeight",M="clientWidth";if(O===mt(i)&&(O=di(i),Dt(O).position!=="static"&&o==="absolute"&&(_t="scrollHeight",M="scrollWidth")),O=O,r===ue||(r===Gt||r===Ie)&&a===vi){k=pi;var U=h&&O===C&&C.visualViewport?C.visualViewport.height:O[_t];g-=U-n.height,g*=l?1:-1}if(r===Gt||(r===ue||r===pi)&&a===vi){x=Ie;var Me=h&&O===C&&C.visualViewport?C.visualViewport.width:O[M];f-=Me-n.width,f*=l?1:-1}}var et=Object.assign({position:o},c&&Ff),fe=u===!0?Hf({x:f,y:g}):{x:f,y:g};if(f=fe.x,g=fe.y,l){var Le;return Object.assign({},et,(Le={},Le[k]=S?"0":"",Le[x]=b?"0":"",Le.transform=(C.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",Le))}return Object.assign({},et,(t={},t[k]=S?g+"px":"",t[x]=b?f+"px":"",t.transform="",t))}function jf(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=n===void 0?!0:n,a=i.adaptive,s=a===void 0?!0:a,o=i.roundOffsets,l=o===void 0?!0:o;{var c=Dt(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(h){return c.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@charset "UTF-8";.pay-error-container[data-v-0817c014]{position:relative}.pay-error-container .loading[data-v-0817c014]{width:100%;height:100%;position:absolute;background:#fff;z-index:1;transition:all .3s;justify-content:center;align-items:center}.pay-error-container .message[data-v-0817c014]{font-size:.1rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-75290345]{font-family:WeChat-Bold}.root[data-v-75290345]{text-align:center}.cell[data-v-4e4c306e]{display:flex;align-items:center;justify-content:space-between;height:.3rem}.cell .name[data-v-4e4c306e]{width:30vw;color:gray;font-size:.14rem;display:flex;align-items:center;justify-content:end}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-ea027830]{font-family:WeChat-Bold}.custom-price .input[data-v-ea027830]{font-size:.2rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-68d98a5c]{font-family:WeChat-Bold}.price-root[data-v-68d98a5c]{position:relative;text-align:center;background:#f3f3f3;border-radius:.08rem;padding:.1rem 0;display:flex;flex-direction:column;height:.6rem;box-sizing:border-box;justify-content:space-between;align-items:center}.price-root .gift[data-v-68d98a5c]{position:absolute;top:-.1rem;right:-.05rem;background:linear-gradient(248.45deg,#fa1e1e,#ff7752 99.44%);padding:0 .05rem;border-radius:.1rem .1rem .1rem 0;font-size:.1rem;border-width:.02rem;border-color:#fff;border-style:solid;box-sizing:border-box;color:#fff}.price-root .token-count[data-v-68d98a5c]{display:flex;justify-content:center;align-items:center;font-size:.2rem}.price-root .token-count img[data-v-68d98a5c]{width:.16rem;height:.16rem;margin-right:.02rem}.price-root .price[data-v-68d98a5c]{font-size:.14rem}.only-price[data-v-68d98a5c]{align-items:center;justify-content:center}.only-price .price[data-v-68d98a5c]{font-size:.2rem}.content[data-v-76333b1f]{width:100%;margin:.2rem 0;display:grid;grid-template-columns:repeat(3,1fr);gap:.1rem;box-sizing:border-box;font-weight:500}.loading[data-v-76333b1f]{display:flex;justify-content:center;align-items:center}.select[data-v-76333b1f]{color:#fff}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-c1cac5f0]{font-family:WeChat-Bold}.pay-popup[data-v-c1cac5f0]{display:flex;flex-direction:column;width:100vw;box-sizing:border-box;overflow:hidden;padding:0 .15rem .2rem;transition:all .3s}.title[data-v-c1cac5f0]{text-align:center;margin:.16rem 0}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
var ng=Object.defineProperty;var rg=(J,$,m)=>$ in J?ng(J,$,{enumerable:!0,configurable:!0,writable:!0,value:m}):J[$]=m;var E=(J,$,m)=>(rg(J,typeof $!="symbol"?$+"":$,m),m);(function(J,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],$):(J=typeof globalThis<"u"?globalThis:J||self,$(J.PayPlugin={},J.Vue))})(this,function(J,$){var jl,Wl;"use strict";function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}function Ul(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t,i=1;i<arguments.length;i++)for(var n in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Mi.apply(this,arguments)}var ql=["attrs","props","domProps"],Kl=["class","style","directives"],Yl=["on","nativeOn"],Xl=function(e){return e.reduce(function(t,i){for(var n in i)if(!t[n])t[n]=i[n];else if(ql.indexOf(n)!==-1)t[n]=Mi({},t[n],i[n]);else if(Kl.indexOf(n)!==-1){var r=t[n]instanceof Array?t[n]:[t[n]],a=i[n]instanceof Array?i[n]:[i[n]];t[n]=[].concat(r,a)}else if(Yl.indexOf(n)!==-1)for(var s in i[n])if(t[n][s]){var o=t[n][s]instanceof Array?t[n][s]:[t[n][s]],l=i[n][s]instanceof Array?i[n][s]:[i[n][s]];t[n][s]=[].concat(o,l)}else t[n][s]=i[n][s];else if(n==="hook")for(var c in i[n])t[n][c]=t[n][c]?Gl(t[n][c],i[n][c]):i[n][c];else t[n]=i[n];return t},{})},Gl=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Zl=Xl;const T=Ul(Zl);function Li(e,t){return t?typeof t=="string"?" "+e+"--"+t:Array.isArray(t)?t.reduce(function(i,n){return i+Li(e,n)},""):Object.keys(t).reduce(function(i,n){return i+(t[n]?Li(e,n):"")},""):""}function Jl(e){return function(t,i){return t&&typeof t!="string"&&(i=t,t=""),t=t?e+"__"+t:e,""+t+Li(t,i)}}var Ql=Object.prototype.hasOwnProperty;function tc(e,t,i){var n=t[i];_(n)&&(!Ql.call(e,i)||!ct(n)?e[i]=n:e[i]=Cr(Object(e[i]),t[i]))}function Cr(e,t){return Object.keys(t).forEach(function(i){tc(e,t,i)}),e}const ec={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",complete:"完成",loading:"加载中...",telEmpty:"请填写电话",nameEmpty:"请填写姓名",nameInvalid:"请输入正确的姓名",confirmDelete:"确定要删除吗",telInvalid:"请输入正确的手机号",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:function(t,i){return t+"年"+i+"月"},rangePrompt:function(t){return"选择天数不能超过 "+t+" 天"}},vanCascader:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:function(t){return t+"折"},condition:function(t){return"满"+t+"元可用"}},vanCouponCell:{title:"优惠券",tips:"暂无可用",count:function(t){return t+"张可用"}},vanCouponList:{empty:"暂无优惠券",exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码格式不正确",defaultAddress:"设为默认收货地址",telPlaceholder:"收货人手机号",namePlaceholder:"收货人姓名",areaPlaceholder:"选择省 / 市 / 区"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌、楼层房间号等信息"},vanAddressList:{add:"新增地址"}};var ee=$.prototype,$r=$.util.defineReactive;$r(ee,"$vantLang","zh-CN"),$r(ee,"$vantMessages",{"zh-CN":ec});const Ai={messages:function(){return ee.$vantMessages[ee.$vantLang]},use:function(t,i){var n;ee.$vantLang=t,this.add((n={},n[t]=i,n))},add:function(t){t===void 0&&(t={}),Cr(ee.$vantMessages,t)}};var ic=/-(\w)/g;function wr(e){return e.replace(ic,function(t,i){return i.toUpperCase()})}function N(e,t){t===void 0&&(t=2);for(var i=e+"";i.length<t;)i="0"+i;return i}var nc={methods:{slots:function(t,i){t===void 0&&(t="default");var n=this.$slots,r=this.$scopedSlots,a=r[t];return a?a(i):n[t]}}};function rc(e){var t=this.name;e.component(t,this),e.component(wr("-"+t),this)}function ac(e){var t=e.scopedSlots||e.data.scopedSlots||{},i=e.slots();return Object.keys(i).forEach(function(n){t[n]||(t[n]=function(){return i[n]})}),t}function sc(e){return{functional:!0,props:e.props,model:e.model,render:function(i,n){return e(i,n.props,ac(n),n)}}}function oc(e){return function(t){return ie(t)&&(t=sc(t)),t.functional||(t.mixins=t.mixins||[],t.mixins.push(nc)),t.name=e,t.install=rc,t}}function lc(e){var t=wr(e)+".";return function(i){for(var n=Ai.messages(),r=xr(n,t+i)||xr(n,i),a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];return ie(r)?r.apply(void 0,s):r}}function p(e){return e="van-"+e,[oc(e),Jl(e),lc(e)]}function Ri(e){return/^\d+(\.\d+)?$/.test(e)}function Vi(e){return Number.isNaN?Number.isNaN(e):e!==e}function P(e){if(_(e))return e=String(e),Ri(e)?e+"px":e}var zi;function cc(){if(!zi){var e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;zi=parseFloat(t)}return zi}function uc(e){return e=e.replace(/rem/g,""),+e*cc()}function hc(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function dc(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function Fi(e){if(typeof e=="number")return e;if(Ae){if(e.indexOf("rem")!==-1)return uc(e);if(e.indexOf("vw")!==-1)return hc(e);if(e.indexOf("vh")!==-1)return dc(e)}return parseFloat(e)}var Ae=typeof window<"u",K=$.prototype.$isServer;function pe(){}function _(e){return e!=null}function ie(e){return typeof e=="function"}function ct(e){return e!==null&&typeof e=="object"}function Re(e){return ct(e)&&ie(e.then)&&ie(e.catch)}function xr(e,t){var i=t.split("."),n=e;return i.forEach(function(r){var a;n=ct(n)&&(a=n[r])!=null?a:""}),n}function Tr(e){return e==null||typeof e!="object"?!0:Object.keys(e).length===0}var fc=["ref","key","style","class","attrs","refInFor","nativeOn","directives","staticClass","staticStyle"],pc={nativeOn:"on"};function B(e,t){var i=fc.reduce(function(n,r){return e.data[r]&&(n[pc[r]||r]=e.data[r]),n},{});return t&&(i.on=i.on||{},m(i.on,e.data.on)),i}function I(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];var a=e.listeners[t];a&&(Array.isArray(a)?a.forEach(function(s){s.apply(void 0,n)}):a.apply(void 0,n))}function _r(e,t){var i=new $({el:document.createElement("div"),props:e.props,render:function(r){return r(e,m({props:this.$props},t))}});return document.body.appendChild(i.$el),i}var Y={zIndex:2e3,lockCount:0,stack:[],find:function(t){return this.stack.filter(function(i){return i.vm===t})[0]},remove:function(t){var i=this.find(t);if(i){i.vm=null,i.overlay=null;var n=this.stack.indexOf(i);this.stack.splice(n,1)}}},Ir=!1;if(!K)try{var Or={};Object.defineProperty(Or,"passive",{get:function(){Ir=!0}}),window.addEventListener("test-passive",null,Or)}catch{}function it(e,t,i,n){n===void 0&&(n=!1),K||e.addEventListener(t,i,Ir?{capture:!1,passive:n}:!1)}function Nt(e,t,i){K||e.removeEventListener(t,i)}function Pr(e){e.stopPropagation()}function z(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&Pr(e)}var Br=p("overlay"),vc=Br[0],mc=Br[1];function gc(e){z(e,!0)}function Er(e,t,i,n){var r=m({zIndex:t.zIndex},t.customStyle);return _(t.duration)&&(r.animationDuration=t.duration+"s"),e("transition",{attrs:{name:"van-fade"}},[e("div",T([{directives:[{name:"show",value:t.show}],style:r,class:[mc(),t.className],on:{touchmove:t.lockScroll?gc:pe}},B(n,!0)]),[i.default==null?void 0:i.default()])])}Er.props={show:Boolean,zIndex:[Number,String],duration:[Number,String],className:null,customStyle:Object,lockScroll:{type:Boolean,default:!0}};const Dr=vc(Er);function Hi(e){var t=e.parentNode;t&&t.removeChild(e)}var yc={className:"",customStyle:{}};function bc(e){return _r(Dr,{on:{click:function(){e.$emit("click-overlay"),e.closeOnClickOverlay&&(e.onClickOverlay?e.onClickOverlay():e.close())}}})}function Nr(e){var t=Y.find(e);if(t){var i=e.$el,n=t.config,r=t.overlay;i&&i.parentNode&&i.parentNode.insertBefore(r.$el,i),m(r,yc,n,{show:!0})}}function Sc(e,t){var i=Y.find(e);if(i)i.config=t;else{var n=bc(e);Y.stack.push({vm:e,config:t,overlay:n})}Nr(e)}function Mr(e){var t=Y.find(e);t&&(t.overlay.show=!1)}function kc(e){var t=Y.find(e);t&&(Hi(t.overlay.$el),Y.remove(e))}function ji(e){return e===window}var Cc=/scroll|auto|overlay/i;function Ut(e,t){t===void 0&&(t=window);for(var i=e;i&&i.tagName!=="HTML"&&i.tagName!=="BODY"&&i.nodeType===1&&i!==t;){var n=window.getComputedStyle(i),r=n.overflowY;if(Cc.test(r))return i;i=i.parentNode}return t}function qt(e){var t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function Ve(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function ve(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function ze(e){Ve(window,e),Ve(document.body,e)}function Wi(e,t){if(ji(e))return 0;var i=t?qt(t):ve();return e.getBoundingClientRect().top+i}function $c(e){return ji(e)?e.innerHeight:e.getBoundingClientRect().height}function wc(e){return ji(e)?0:e.getBoundingClientRect().top}function xc(e,t){return e>t?"horizontal":t>e?"vertical":""}var nt={data:function(){return{direction:""}},methods:{touchStart:function(t){this.resetTouchStatus(),this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY},touchMove:function(t){var i=t.touches[0];this.deltaX=i.clientX<0?0:i.clientX-this.startX,this.deltaY=i.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY);var n=10;(!this.direction||this.offsetX<n&&this.offsetY<n)&&(this.direction=xc(this.offsetX,this.offsetY))},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},bindTouchEvent:function(t){var i=this.onTouchStart,n=this.onTouchMove,r=this.onTouchEnd;it(t,"touchstart",i),it(t,"touchmove",n),r&&(it(t,"touchend",r),it(t,"touchcancel",r))}}};function Tc(e){return typeof e=="string"?document.querySelector(e):e()}function Ui(e){var t=e===void 0?{}:e,i=t.ref,n=t.afterPortal;return{props:{getContainer:[String,Function]},watch:{getContainer:"portal"},mounted:function(){this.getContainer&&this.portal()},methods:{portal:function(){var a=this.getContainer,s=i?this.$refs[i]:this.$el,o;a?o=Tc(a):this.$parent&&(o=this.$parent.$el),o&&o!==s.parentNode&&o.appendChild(s),n&&n.call(this)}}}}var _c=0;function ut(e){var t="binded_"+_c++;function i(){this[t]||(e.call(this,it,!0),this[t]=!0)}function n(){this[t]&&(e.call(this,Nt,!1),this[t]=!1)}return{mounted:i,activated:i,deactivated:n,beforeDestroy:n}}var Ic={mixins:[ut(function(e,t){this.handlePopstate(t&&this.closeOnPopstate)})],props:{closeOnPopstate:Boolean},data:function(){return{bindStatus:!1}},watch:{closeOnPopstate:function(t){this.handlePopstate(t)}},methods:{onPopstate:function(){this.close(),this.shouldReopen=!1},handlePopstate:function(t){if(!this.$isServer&&this.bindStatus!==t){this.bindStatus=t;var i=t?it:Nt;i(window,"popstate",this.onPopstate)}}}},Fe={transitionAppear:Boolean,value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[Number,String],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}};function He(e){return e===void 0&&(e={}),{mixins:[nt,Ic,Ui({afterPortal:function(){this.overlay&&Nr()}})],provide:function(){return{vanPopup:this}},props:Fe,data:function(){return this.onReopenCallback=[],{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(i){var n=i?"open":"close";this.inited=this.inited||this.value,this[n](),e.skipToggleEvent||this.$emit(n)},overlay:"renderOverlay"},mounted:function(){this.value&&this.open()},activated:function(){this.shouldReopen&&(this.$emit("input",!0),this.shouldReopen=!1)},beforeDestroy:function(){kc(this),this.opened&&this.removeLock(),this.getContainer&&Hi(this.$el)},deactivated:function(){this.value&&(this.close(),this.shouldReopen=!0)},methods:{open:function(){this.$isServer||this.opened||(this.zIndex!==void 0&&(Y.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.addLock(),this.onReopenCallback.forEach(function(i){i()}))},addLock:function(){this.lockScroll&&(it(document,"touchstart",this.touchStart),it(document,"touchmove",this.onTouchMove),Y.lockCount||document.body.classList.add("van-overflow-hidden"),Y.lockCount++)},removeLock:function(){this.lockScroll&&Y.lockCount&&(Y.lockCount--,Nt(document,"touchstart",this.touchStart),Nt(document,"touchmove",this.onTouchMove),Y.lockCount||document.body.classList.remove("van-overflow-hidden"))},close:function(){this.opened&&(Mr(this),this.opened=!1,this.removeLock(),this.$emit("input",!1))},onTouchMove:function(i){this.touchMove(i);var n=this.deltaY>0?"10":"01",r=Ut(i.target,this.$el),a=r.scrollHeight,s=r.offsetHeight,o=r.scrollTop,l="11";o===0?l=s>=a?"00":"01":o+s>=a&&(l="10"),l!=="11"&&this.direction==="vertical"&&!(parseInt(l,2)&parseInt(n,2))&&z(i,!0)},renderOverlay:function(){var i=this;this.$isServer||!this.value||this.$nextTick(function(){i.updateZIndex(i.overlay?1:0),i.overlay?Sc(i,{zIndex:Y.zIndex++,duration:i.duration,className:i.overlayClass,customStyle:i.overlayStyle}):Mr(i)})},updateZIndex:function(i){i===void 0&&(i=0),this.$el.style.zIndex=++Y.zIndex+i},onReopen:function(i){this.onReopenCallback.push(i)}}}}var Lr=p("info"),Oc=Lr[0],Pc=Lr[1];function Ar(e,t,i,n){var r=t.dot,a=t.info,s=_(a)&&a!=="";if(!(!r&&!s))return e("div",T([{class:Pc({dot:r})},B(n,!0)]),[r?"":t.info])}Ar.props={dot:Boolean,info:[Number,String]};const Kt=Oc(Ar);var Rr=p("icon"),Bc=Rr[0],Vr=Rr[1];function Ec(e){return e?e.indexOf("/")!==-1:!1}var Dc={medel:"medal","medel-o":"medal-o","calender-o":"calendar-o"};function Nc(e){return e&&Dc[e]||e}function zr(e,t,i,n){var r,a=Nc(t.name),s=Ec(a);return process.env.NODE_ENV==="development"&&t.info&&console.warn('[Vant] Icon: "info" prop is deprecated, use "badge" prop instead.'),e(t.tag,T([{class:[t.classPrefix,s?"":t.classPrefix+"-"+a],style:{color:t.color,fontSize:P(t.size)}},B(n,!0)]),[i.default&&i.default(),s&&e("img",{class:Vr("image"),attrs:{src:a}}),e(Kt,{attrs:{dot:t.dot,info:(r=t.badge)!=null?r:t.info}})])}zr.props={dot:Boolean,name:String,size:[Number,String],info:[Number,String],badge:[Number,String],color:String,tag:{type:String,default:"i"},classPrefix:{type:String,default:Vr()}};const w=Bc(zr);var Fr=p("popup"),Mc=Fr[0],Hr=Fr[1];const St=Mc({mixins:[He()],props:{round:Boolean,duration:[Number,String],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,i=function(r){return function(a){return t.$emit(r,a)}};this.onClick=i("click"),this.onOpened=i("opened"),this.onClosed=i("closed")},methods:{onClickCloseIcon:function(t){this.$emit("click-close-icon",t),this.close()}},render:function(){var t,i=arguments[0];if(this.shouldRender){var n=this.round,r=this.position,a=this.duration,s=r==="center",o=this.transition||(s?"van-fade":"van-popup-slide-"+r),l={};if(_(a)){var c=s?"animationDuration":"transitionDuration";l[c]=a+"s"}return i("transition",{attrs:{appear:this.transitionAppear,name:o},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[i("div",{directives:[{name:"show",value:this.value}],style:l,class:Hr((t={round:n},t[r]=r,t["safe-area-inset-bottom"]=this.safeAreaInsetBottom,t)),on:{click:this.onClick}},[this.slots(),this.closeable&&i(w,{attrs:{role:"button",tabindex:"0",name:this.closeIcon},class:Hr("close-icon",this.closeIconPosition),on:{click:this.onClickCloseIcon}})])])}}});var jr=p("loading"),Lc=jr[0],je=jr[1];function Ac(e,t){if(t.type==="spinner"){for(var i=[],n=0;n<12;n++)i.push(e("i"));return i}return e("svg",{class:je("circular"),attrs:{viewBox:"25 25 50 50"}},[e("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])}function Rc(e,t,i){if(i.default){var n,r={fontSize:P(t.textSize),color:(n=t.textColor)!=null?n:t.color};return e("span",{class:je("text"),style:r},[i.default()])}}function Wr(e,t,i,n){var r=t.color,a=t.size,s=t.type,o={color:r};if(a){var l=P(a);o.width=l,o.height=l}return e("div",T([{class:je([s,{vertical:t.vertical}])},B(n,!0)]),[e("span",{class:je("spinner",s),style:o},[Ac(e,t)]),Rc(e,t,i)])}Wr.props={color:String,size:[Number,String],vertical:Boolean,textSize:[Number,String],textColor:String,type:{type:String,default:"circular"}};const ht=Lc(Wr);var Ur=p("action-sheet"),Vc=Ur[0],dt=Ur[1];function qr(e,t,i,n){var r=t.title,a=t.cancelText,s=t.closeable;function o(){I(n,"input",!1),I(n,"cancel")}function l(){if(r)return e("div",{class:dt("header")},[r,s&&e(w,{attrs:{name:t.closeIcon},class:dt("close"),on:{click:o}})])}function c(d,f){var v=d.disabled,g=d.loading,y=d.callback;function b(x){x.stopPropagation(),!(v||g)&&(y&&y(d),t.closeOnClickAction&&I(n,"input",!1),$.nextTick(function(){I(n,"select",d,f)}))}function S(){return g?e(ht,{class:dt("loading-icon")}):[e("span",{class:dt("name")},[d.name]),d.subname&&e("div",{class:dt("subname")},[d.subname])]}return e("button",{attrs:{type:"button"},class:[dt("item",{disabled:v,loading:g}),d.className],style:{color:d.color},on:{click:b}},[S()])}function u(){if(a)return[e("div",{class:dt("gap")}),e("button",{attrs:{type:"button"},class:dt("cancel"),on:{click:o}},[a])]}function h(){var d=(i.description==null?void 0:i.description())||t.description;if(d)return e("div",{class:dt("description")},[d])}return e(St,T([{class:dt(),attrs:{position:"bottom",round:t.round,value:t.value,overlay:t.overlay,duration:t.duration,lazyRender:t.lazyRender,lockScroll:t.lockScroll,getContainer:t.getContainer,closeOnPopstate:t.closeOnPopstate,closeOnClickOverlay:t.closeOnClickOverlay,safeAreaInsetBottom:t.safeAreaInsetBottom}},B(n,!0)]),[l(),h(),e("div",{class:dt("content")},[t.actions&&t.actions.map(c),i.default==null?void 0:i.default()]),u()])}qr.props=m({},Fe,{title:String,actions:Array,duration:[Number,String],cancelText:String,description:String,getContainer:[String,Function],closeOnPopstate:Boolean,closeOnClickAction:Boolean,round:{type:Boolean,default:!0},closeable:{type:Boolean,default:!0},closeIcon:{type:String,default:"cross"},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});const zc=Vc(qr);function Kr(e){return e=e.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(e)||/^0[0-9-]{10,13}$/.test(e)}var Fc=44,We={title:String,loading:Boolean,readonly:Boolean,itemHeight:[Number,String],showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,allowHtml:{type:Boolean,default:!0},visibleItemCount:{type:[Number,String],default:6},swipeDuration:{type:[Number,String],default:1e3}},Yr="#ee0a24",ft="van-hairline",qi=ft+"--top",Xr=ft+"--left",me=ft+"--bottom",Gr=ft+"--surround",Ue=ft+"--top-bottom",Hc=ft+"-unset--top-bottom";function ge(e){if(!_(e))return e;if(Array.isArray(e))return e.map(function(i){return ge(i)});if(typeof e=="object"){var t={};return Object.keys(e).forEach(function(i){t[i]=ge(e[i])}),t}return e}function W(e,t,i){return Math.min(Math.max(e,t),i)}function Zr(e,t,i){var n=e.indexOf(t),r="";return n===-1?e:t==="-"&&n!==0?e.slice(0,n):(t==="."&&e.match(/^(\.|-\.)/)&&(r=n?"-0":"0"),r+e.slice(0,n+1)+e.slice(n).replace(i,""))}function Jr(e,t,i){t===void 0&&(t=!0),i===void 0&&(i=!0),t?e=Zr(e,".",/\./g):e=e.split(".")[0],i?e=Zr(e,"-",/-/g):e=e.replace(/-/,"");var n=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(n,"")}function Qr(e,t){var i=Math.pow(10,10);return Math.round((e+t)*i)/i}var ta=200,Ki=300,jc=15,ea=p("picker-column"),Wc=ea[0],Yi=ea[1];function ia(e){var t=window.getComputedStyle(e),i=t.transform||t.webkitTransform,n=i.slice(7,i.length-1).split(", ")[5];return Number(n)}function Xi(e){return ct(e)&&e.disabled}var na=Ae&&"onwheel"in window,Gi=null;const Uc=Wc({mixins:[nt],props:{valueKey:String,readonly:Boolean,allowHtml:Boolean,className:String,itemHeight:Number,defaultIndex:Number,swipeDuration:[Number,String],visibleItemCount:[Number,String],initialOptions:{type:Array,default:function(){return[]}}},data:function(){return{offset:0,duration:0,options:ge(this.initialOptions),currentIndex:this.defaultIndex}},created:function(){this.$parent.children&&this.$parent.children.push(this),this.setIndex(this.currentIndex)},mounted:function(){this.bindTouchEvent(this.$el),na&&it(this.$el,"wheel",this.onMouseWheel,!1)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1),na&&Nt(this.$el,"wheel")},watch:{initialOptions:"setOptions",defaultIndex:function(t){this.setIndex(t)}},computed:{count:function(){return this.options.length},baseOffset:function(){return this.itemHeight*(this.visibleItemCount-1)/2}},methods:{setOptions:function(t){JSON.stringify(t)!==JSON.stringify(this.options)&&(this.options=ge(t),this.setIndex(this.defaultIndex))},onTouchStart:function(t){if(!this.readonly){if(this.touchStart(t),this.moving){var i=ia(this.$refs.wrapper);this.offset=Math.min(0,i-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){if(!this.readonly){this.touchMove(t),this.direction==="vertical"&&(this.moving=!0,z(t,!0)),this.offset=W(this.startOffset+this.deltaY,-(this.count*this.itemHeight),this.itemHeight);var i=Date.now();i-this.touchStartTime>Ki&&(this.touchStartTime=i,this.momentumOffset=this.offset)}},onTouchEnd:function(){var t=this;if(!this.readonly){var i=this.offset-this.momentumOffset,n=Date.now()-this.touchStartTime,r=n<Ki&&Math.abs(i)>jc;if(r){this.momentum(i,n);return}var a=this.getIndexByOffset(this.offset);this.duration=ta,this.setIndex(a,!0),setTimeout(function(){t.moving=!1},0)}},onMouseWheel:function(t){var i=this;if(!this.readonly){z(t,!0);var n=ia(this.$refs.wrapper);this.startOffset=Math.min(0,n-this.baseOffset),this.momentumOffset=this.startOffset,this.transitionEndTrigger=null;var r=t.deltaY;if(!(this.startOffset===0&&r<0)){var a=this.itemHeight*(r>0?-1:1);this.offset=W(this.startOffset+a,-(this.count*this.itemHeight),this.itemHeight),Gi&&clearTimeout(Gi),Gi=setTimeout(function(){i.onTouchEnd(),i.touchStartTime=0},Ki)}}},onTransitionEnd:function(){this.stopMomentum()},onClickItem:function(t){this.moving||this.readonly||(this.transitionEndTrigger=null,this.duration=ta,this.setIndex(t,!0))},adjustIndex:function(t){t=W(t,0,this.count);for(var i=t;i<this.count;i++)if(!Xi(this.options[i]))return i;for(var n=t-1;n>=0;n--)if(!Xi(this.options[n]))return n},getOptionText:function(t){return ct(t)&&this.valueKey in t?t[this.valueKey]:t},setIndex:function(t,i){var n=this;t=this.adjustIndex(t)||0;var r=-t*this.itemHeight,a=function(){t!==n.currentIndex&&(n.currentIndex=t,i&&n.$emit("change",t))};this.moving&&r!==this.offset?this.transitionEndTrigger=a:a(),this.offset=r},setValue:function(t){for(var i=this.options,n=0;n<i.length;n++)if(this.getOptionText(i[n])===t)return this.setIndex(n)},getValue:function(){return this.options[this.currentIndex]},getIndexByOffset:function(t){return W(Math.round(-t/this.itemHeight),0,this.count-1)},momentum:function(t,i){var n=Math.abs(t/i);t=this.offset+n/.003*(t<0?-1:1);var r=this.getIndexByOffset(t);this.duration=+this.swipeDuration,this.setIndex(r,!0)},stopMomentum:function(){this.moving=!1,this.duration=0,this.transitionEndTrigger&&(this.transitionEndTrigger(),this.transitionEndTrigger=null)},genOptions:function(){var t=this,i=this.$createElement,n={height:this.itemHeight+"px"};return this.options.map(function(r,a){var s,o=t.getOptionText(r),l=Xi(r),c={style:n,attrs:{role:"button",tabindex:l?-1:0},class:[Yi("item",{disabled:l,selected:a===t.currentIndex})],on:{click:function(){t.onClickItem(a)}}},u={class:"van-ellipsis",domProps:(s={},s[t.allowHtml?"innerHTML":"textContent"]=o,s)};return i("li",T([{},c]),[t.slots("option",r)||i("div",T([{},u]))])})}},render:function(){var t=arguments[0],i={transform:"translate3d(0, "+(this.offset+this.baseOffset)+"px, 0)",transitionDuration:this.duration+"ms",transitionProperty:this.duration?"all":"none"};return t("div",{class:[Yi(),this.className]},[t("ul",{ref:"wrapper",style:i,class:Yi("wrapper"),on:{transitionend:this.onTransitionEnd}},[this.genOptions()])])}});var Zi=p("picker"),qc=Zi[0],It=Zi[1],ra=Zi[2];const Ji=qc({props:m({},We,{defaultIndex:{type:[Number,String],default:0},columns:{type:Array,default:function(){return[]}},toolbarPosition:{type:String,default:"top"},valueKey:{type:String,default:"text"}}),data:function(){return{children:[],formattedColumns:[]}},computed:{itemPxHeight:function(){return this.itemHeight?Fi(this.itemHeight):Fc},dataType:function(){var t=this.columns,i=t[0]||{};return i.children?"cascade":i.values?"object":"text"}},watch:{columns:{handler:"format",immediate:!0}},methods:{format:function(){var t=this.columns,i=this.dataType;i==="text"?this.formattedColumns=[{values:t}]:i==="cascade"?this.formatCascade():this.formattedColumns=t},formatCascade:function(){for(var t=[],i={children:this.columns};i&&i.children;){for(var n,r=i,a=r.children,s=(n=i.defaultIndex)!=null?n:+this.defaultIndex;a[s]&&a[s].disabled;)if(s<a.length-1)s++;else{s=0;break}t.push({values:i.children,className:i.className,defaultIndex:s}),i=a[s]}this.formattedColumns=t},emit:function(t){var i=this;if(this.dataType==="text")this.$emit(t,this.getColumnValue(0),this.getColumnIndex(0));else{var n=this.getValues();this.dataType==="cascade"&&(n=n.map(function(r){return r[i.valueKey]})),this.$emit(t,n,this.getIndexes())}},onCascadeChange:function(t){for(var i={children:this.columns},n=this.getIndexes(),r=0;r<=t;r++)i=i.children[n[r]];for(;i&&i.children;)t++,this.setColumnValues(t,i.children),i=i.children[i.defaultIndex||0]},onChange:function(t){var i=this;if(this.dataType==="cascade"&&this.onCascadeChange(t),this.dataType==="text")this.$emit("change",this,this.getColumnValue(0),this.getColumnIndex(0));else{var n=this.getValues();this.dataType==="cascade"&&(n=n.map(function(r){return r[i.valueKey]})),this.$emit("change",this,n,t)}},getColumn:function(t){return this.children[t]},getColumnValue:function(t){var i=this.getColumn(t);return i&&i.getValue()},setColumnValue:function(t,i){var n=this.getColumn(t);n&&(n.setValue(i),this.dataType==="cascade"&&this.onCascadeChange(t))},getColumnIndex:function(t){return(this.getColumn(t)||{}).currentIndex},setColumnIndex:function(t,i){var n=this.getColumn(t);n&&(n.setIndex(i),this.dataType==="cascade"&&this.onCascadeChange(t))},getColumnValues:function(t){return(this.children[t]||{}).options},setColumnValues:function(t,i){var n=this.children[t];n&&n.setOptions(i)},getValues:function(){return this.children.map(function(t){return t.getValue()})},setValues:function(t){var i=this;t.forEach(function(n,r){i.setColumnValue(r,n)})},getIndexes:function(){return this.children.map(function(t){return t.currentIndex})},setIndexes:function(t){var i=this;t.forEach(function(n,r){i.setColumnIndex(r,n)})},confirm:function(){this.children.forEach(function(t){return t.stopMomentum()}),this.emit("confirm")},cancel:function(){this.emit("cancel")},genTitle:function(){var t=this.$createElement,i=this.slots("title");if(i)return i;if(this.title)return t("div",{class:["van-ellipsis",It("title")]},[this.title])},genCancel:function(){var t=this.$createElement;return t("button",{attrs:{type:"button"},class:It("cancel"),on:{click:this.cancel}},[this.slots("cancel")||this.cancelButtonText||ra("cancel")])},genConfirm:function(){var t=this.$createElement;return t("button",{attrs:{type:"button"},class:It("confirm"),on:{click:this.confirm}},[this.slots("confirm")||this.confirmButtonText||ra("confirm")])},genToolbar:function(){var t=this.$createElement;if(this.showToolbar)return t("div",{class:It("toolbar")},[this.slots()||[this.genCancel(),this.genTitle(),this.genConfirm()]])},genColumns:function(){var t=this.$createElement,i=this.itemPxHeight,n=i*this.visibleItemCount,r={height:i+"px"},a={height:n+"px"},s={backgroundSize:"100% "+(n-i)/2+"px"};return t("div",{class:It("columns"),style:a,on:{touchmove:z}},[this.genColumnItems(),t("div",{class:It("mask"),style:s}),t("div",{class:[Hc,It("frame")],style:r})])},genColumnItems:function(){var t=this,i=this.$createElement;return this.formattedColumns.map(function(n,r){var a;return i(Uc,{attrs:{readonly:t.readonly,valueKey:t.valueKey,allowHtml:t.allowHtml,className:n.className,itemHeight:t.itemPxHeight,defaultIndex:(a=n.defaultIndex)!=null?a:+t.defaultIndex,swipeDuration:t.swipeDuration,visibleItemCount:t.visibleItemCount,initialOptions:n.values},scopedSlots:{option:t.$scopedSlots.option},on:{change:function(){t.onChange(r)}}})})}},render:function(t){return t("div",{class:It()},[this.toolbarPosition==="top"?this.genToolbar():t(),this.loading?t(ht,{class:It("loading")}):t(),this.slots("columns-top"),this.genColumns(),this.slots("columns-bottom"),this.toolbarPosition==="bottom"?this.genToolbar():t()])}});var aa=p("area"),Kc=aa[0],Yc=aa[1],Qi="000000";function Xc(e){return e[0]==="9"}function Gc(e,t){var i=e.$slots,n=e.$scopedSlots,r={};return t.forEach(function(a){n[a]?r[a]=n[a]:i[a]&&(r[a]=function(){return i[a]})}),r}const sa=Kc({props:m({},We,{value:String,areaList:{type:Object,default:function(){return{}}},columnsNum:{type:[Number,String],default:3},isOverseaCode:{type:Function,default:Xc},columnsPlaceholder:{type:Array,default:function(){return[]}}}),data:function(){return{code:this.value,columns:[{values:[]},{values:[]},{values:[]}]}},computed:{province:function(){return this.areaList.province_list||{}},city:function(){return this.areaList.city_list||{}},county:function(){return this.areaList.county_list||{}},displayColumns:function(){return this.columns.slice(0,+this.columnsNum)},placeholderMap:function(){return{province:this.columnsPlaceholder[0]||"",city:this.columnsPlaceholder[1]||"",county:this.columnsPlaceholder[2]||""}}},watch:{value:function(t){this.code=t,this.setValues()},areaList:{deep:!0,handler:"setValues"},columnsNum:function(){var t=this;this.$nextTick(function(){t.setValues()})}},mounted:function(){this.setValues()},methods:{getList:function(t,i){var n=[];if(t!=="province"&&!i)return n;var r=this[t];if(n=Object.keys(r).map(function(s){return{code:s,name:r[s]}}),i&&(this.isOverseaCode(i)&&t==="city"&&(i="9"),n=n.filter(function(s){return s.code.indexOf(i)===0})),this.placeholderMap[t]&&n.length){var a="";t==="city"?a=Qi.slice(2,4):t==="county"&&(a=Qi.slice(4,6)),n.unshift({code:""+i+a,name:this.placeholderMap[t]})}return n},getIndex:function(t,i){var n=t==="province"?2:t==="city"?4:6,r=this.getList(t,i.slice(0,n-2));this.isOverseaCode(i)&&t==="province"&&(n=1),i=i.slice(0,n);for(var a=0;a<r.length;a++)if(r[a].code.slice(0,n)===i)return a;return 0},parseOutputValues:function(t){var i=this;return t.map(function(n,r){return n&&(n=JSON.parse(JSON.stringify(n)),(!n.code||n.name===i.columnsPlaceholder[r])&&(n.code="",n.name=""),n)})},onChange:function(t,i,n){this.code=i[n].code,this.setValues();var r=this.parseOutputValues(t.getValues());this.$emit("change",t,r,n)},onConfirm:function(t,i){t=this.parseOutputValues(t),this.setValues(),this.$emit("confirm",t,i)},getDefaultCode:function(){if(this.columnsPlaceholder.length)return Qi;var t=Object.keys(this.county);if(t[0])return t[0];var i=Object.keys(this.city);return i[0]?i[0]:""},setValues:function(){var t=this.code;t||(t=this.getDefaultCode());var i=this.$refs.picker,n=this.getList("province"),r=this.getList("city",t.slice(0,2));i&&(i.setColumnValues(0,n),i.setColumnValues(1,r),r.length&&t.slice(2,4)==="00"&&!this.isOverseaCode(t)&&(t=r[0].code),i.setColumnValues(2,this.getList("county",t.slice(0,4))),i.setIndexes([this.getIndex("province",t),this.getIndex("city",t),this.getIndex("county",t)]))},getValues:function(){var t=this.$refs.picker,i=t?t.getValues().filter(function(n){return!!n}):[];return i=this.parseOutputValues(i),i},getArea:function(){var t=this.getValues(),i={code:"",country:"",province:"",city:"",county:""};if(!t.length)return i;var n=t.map(function(a){return a.name}),r=t.filter(function(a){return!!a.code});return i.code=r.length?r[r.length-1].code:"",this.isOverseaCode(i.code)?(i.country=n[1]||"",i.province=n[2]||""):(i.province=n[0]||"",i.city=n[1]||"",i.county=n[2]||""),i},reset:function(t){this.code=t||"",this.setValues()}},render:function(){var t=arguments[0],i=m({},this.$listeners,{change:this.onChange,confirm:this.onConfirm});return t(Ji,{ref:"picker",class:Yc(),attrs:{showToolbar:!0,valueKey:"name",title:this.title,columns:this.displayColumns,loading:this.loading,readonly:this.readonly,itemHeight:this.itemHeight,swipeDuration:this.swipeDuration,visibleItemCount:this.visibleItemCount,cancelButtonText:this.cancelButtonText,confirmButtonText:this.confirmButtonText},scopedSlots:Gc(this,["title","columns-top","columns-bottom"]),on:m({},i)})}});function Zc(e){return e.name==="NavigationDuplicated"||e.message&&e.message.indexOf("redundant navigation")!==-1}function Yt(e,t){var i=t.to,n=t.url,r=t.replace;if(i&&e){var a=e[r?"replace":"push"](i);a&&a.catch&&a.catch(function(s){if(s&&!Zc(s))throw s})}else n&&(r?location.replace(n):location.href=n)}function oa(e){Yt(e.parent&&e.parent.$router,e.props)}var Mt={url:String,replace:Boolean,to:[String,Object]},tn={icon:String,size:String,center:Boolean,isLink:Boolean,required:Boolean,iconPrefix:String,titleStyle:null,titleClass:null,valueClass:null,labelClass:null,title:[Number,String],value:[Number,String],label:[Number,String],arrowDirection:String,border:{type:Boolean,default:!0},clickable:{type:Boolean,default:null}},la=p("cell"),Jc=la[0],ne=la[1];function ca(e,t,i,n){var r,a=t.icon,s=t.size,o=t.title,l=t.label,c=t.value,u=t.isLink,h=i.title||_(o);function d(){var k=i.label||_(l);if(k)return e("div",{class:[ne("label"),t.labelClass]},[i.label?i.label():l])}function f(){if(h)return e("div",{class:[ne("title"),t.titleClass],style:t.titleStyle},[i.title?i.title():e("span",[o]),d()])}function v(){var k=i.default||_(c);if(k)return e("div",{class:[ne("value",{alone:!h}),t.valueClass]},[i.default?i.default():e("span",[c])])}function g(){if(i.icon)return i.icon();if(a)return e(w,{class:ne("left-icon"),attrs:{name:a,classPrefix:t.iconPrefix}})}function y(){var k=i["right-icon"];if(k)return k();if(u){var C=t.arrowDirection;return e(w,{class:ne("right-icon"),attrs:{name:C?"arrow-"+C:"arrow"}})}}function b(k){I(n,"click",k),oa(n)}var S=(r=t.clickable)!=null?r:u,x={clickable:S,center:t.center,required:t.required,borderless:!t.border};return s&&(x[s]=s),e("div",T([{class:ne(x),attrs:{role:S?"button":null,tabindex:S?0:null},on:{click:b}},B(n)]),[g(),f(),v(),y(),i.extra==null?void 0:i.extra()])}ca.props=m({},tn,Mt);const q=Jc(ca);function Qc(){return K?!1:/android/.test(navigator.userAgent.toLowerCase())}function tu(){return K?!1:/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())}var eu=tu();function ua(){eu&&ze(ve())}var ha=p("field"),iu=ha[0],Q=ha[1];const rt=iu({inheritAttrs:!1,provide:function(){return{vanField:this}},inject:{vanForm:{default:null}},props:m({},tn,{name:String,rules:Array,disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},autosize:[Boolean,Object],leftIcon:String,rightIcon:String,clearable:Boolean,formatter:Function,maxlength:[Number,String],labelWidth:[Number,String],labelClass:null,labelAlign:String,inputAlign:String,placeholder:String,errorMessage:String,errorMessageAlign:String,showWordLimit:Boolean,value:{type:[Number,String],default:""},type:{type:String,default:"text"},error:{type:Boolean,default:null},colon:{type:Boolean,default:null},clearTrigger:{type:String,default:"focus"},formatTrigger:{type:String,default:"onChange"}}),data:function(){return{focused:!1,validateFailed:!1,validateMessage:""}},watch:{value:function(){this.updateValue(this.value),this.resetValidation(),this.validateWithTrigger("onChange"),this.$nextTick(this.adjustSize)}},mounted:function(){this.updateValue(this.value,this.formatTrigger),this.$nextTick(this.adjustSize),this.vanForm&&this.vanForm.addField(this)},beforeDestroy:function(){this.vanForm&&this.vanForm.removeField(this)},computed:{showClear:function(){var t=this.getProp("readonly");if(this.clearable&&!t){var i=_(this.value)&&this.value!=="",n=this.clearTrigger==="always"||this.clearTrigger==="focus"&&this.focused;return i&&n}},showError:function(){if(this.error!==null)return this.error;if(this.vanForm&&this.vanForm.showError&&this.validateFailed)return!0},listeners:function(){return m({},this.$listeners,{blur:this.onBlur,focus:this.onFocus,input:this.onInput,click:this.onClickInput,keypress:this.onKeypress})},labelStyle:function(){var t=this.getProp("labelWidth");if(t)return{width:P(t)}},formValue:function(){return this.children&&(this.$scopedSlots.input||this.$slots.input)?this.children.value:this.value}},methods:{focus:function(){this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},runValidator:function(t,i){return new Promise(function(n){var r=i.validator(t,i);if(Re(r))return r.then(n);n(r)})},isEmptyValue:function(t){return Array.isArray(t)?!t.length:t===0?!1:!t},runSyncRule:function(t,i){return!(i.required&&this.isEmptyValue(t)||i.pattern&&!i.pattern.test(t))},getRuleMessage:function(t,i){var n=i.message;return ie(n)?n(t,i):n},runRules:function(t){var i=this;return t.reduce(function(n,r){return n.then(function(){if(!i.validateFailed){var a=i.formValue;if(r.formatter&&(a=r.formatter(a,r)),!i.runSyncRule(a,r)){i.validateFailed=!0,i.validateMessage=i.getRuleMessage(a,r);return}if(r.validator)return i.runValidator(a,r).then(function(s){s===!1&&(i.validateFailed=!0,i.validateMessage=i.getRuleMessage(a,r))})}})},Promise.resolve())},validate:function(t){var i=this;return t===void 0&&(t=this.rules),new Promise(function(n){t||n(),i.resetValidation(),i.runRules(t).then(function(){i.validateFailed?n({name:i.name,message:i.validateMessage}):n()})})},validateWithTrigger:function(t){if(this.vanForm&&this.rules){var i=this.vanForm.validateTrigger===t,n=this.rules.filter(function(r){return r.trigger?r.trigger===t:i});n.length&&this.validate(n)}},resetValidation:function(){this.validateFailed&&(this.validateFailed=!1,this.validateMessage="")},updateValue:function(t,i){i===void 0&&(i="onChange"),t=_(t)?String(t):"";var n=this.maxlength;if(_(n)&&t.length>n&&(this.value&&this.value.length===+n?t=this.value:t=t.slice(0,n)),this.type==="number"||this.type==="digit"){var r=this.type==="number";t=Jr(t,r,r)}this.formatter&&i===this.formatTrigger&&(t=this.formatter(t));var a=this.$refs.input;a&&t!==a.value&&(a.value=t),t!==this.value&&this.$emit("input",t)},onInput:function(t){t.target.composing||this.updateValue(t.target.value)},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.$nextTick(this.adjustSize),this.getProp("readonly")&&this.blur()},onBlur:function(t){this.getProp("readonly")||(this.focused=!1,this.updateValue(this.value,"onBlur"),this.$emit("blur",t),this.validateWithTrigger("onBlur"),this.$nextTick(this.adjustSize),ua())},onClick:function(t){this.$emit("click",t)},onClickInput:function(t){this.$emit("click-input",t)},onClickLeftIcon:function(t){this.$emit("click-left-icon",t)},onClickRightIcon:function(t){this.$emit("click-right-icon",t)},onClear:function(t){z(t),this.$emit("input",""),this.$emit("clear",t)},onKeypress:function(t){var i=13;if(t.keyCode===i){var n=this.getProp("submitOnEnter");!n&&this.type!=="textarea"&&z(t),this.type==="search"&&this.blur()}this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if(!(!(this.type==="textarea"&&this.autosize)||!t)){var i=ve();t.style.height="auto";var n=t.scrollHeight;if(ct(this.autosize)){var r=this.autosize,a=r.maxHeight,s=r.minHeight;a&&(n=Math.min(n,a)),s&&(n=Math.max(n,s))}n&&(t.style.height=n+"px",ze(i))}},genInput:function(){var t=this.$createElement,i=this.type,n=this.getProp("disabled"),r=this.getProp("readonly"),a=this.slots("input"),s=this.getProp("inputAlign");if(a)return t("div",{class:Q("control",[s,"custom"]),on:{click:this.onClickInput}},[a]);var o={ref:"input",class:Q("control",s),domProps:{value:this.value},attrs:m({},this.$attrs,{name:this.name,disabled:n,readonly:r,placeholder:this.placeholder}),on:this.listeners,directives:[{name:"model",value:this.value}]};if(i==="textarea")return t("textarea",T([{},o]));var l=i,c;return i==="number"&&(l="text",c="decimal"),i==="digit"&&(l="tel",c="numeric"),t("input",T([{attrs:{type:l,inputmode:c}},o]))},genLeftIcon:function(){var t=this.$createElement,i=this.slots("left-icon")||this.leftIcon;if(i)return t("div",{class:Q("left-icon"),on:{click:this.onClickLeftIcon}},[this.slots("left-icon")||t(w,{attrs:{name:this.leftIcon,classPrefix:this.iconPrefix}})])},genRightIcon:function(){var t=this.$createElement,i=this.slots,n=i("right-icon")||this.rightIcon;if(n)return t("div",{class:Q("right-icon"),on:{click:this.onClickRightIcon}},[i("right-icon")||t(w,{attrs:{name:this.rightIcon,classPrefix:this.iconPrefix}})])},genWordLimit:function(){var t=this.$createElement;if(this.showWordLimit&&this.maxlength){var i=(this.value||"").length;return t("div",{class:Q("word-limit")},[t("span",{class:Q("word-num")},[i]),"/",this.maxlength])}},genMessage:function(){var t=this.$createElement;if(!(this.vanForm&&this.vanForm.showErrorMessage===!1)){var i=this.errorMessage||this.validateMessage;if(i){var n=this.getProp("errorMessageAlign");return t("div",{class:Q("error-message",n)},[i])}}},getProp:function(t){if(_(this[t]))return this[t];if(this.vanForm&&_(this.vanForm[t]))return this.vanForm[t]},genLabel:function(){var t=this.$createElement,i=this.getProp("colon")?":":"";if(this.slots("label"))return[this.slots("label"),i];if(this.label)return t("span",[this.label+i])}},render:function(){var t,i=arguments[0],n=this.slots,r=this.getProp("disabled"),a=this.getProp("labelAlign"),s={icon:this.genLeftIcon},o=this.genLabel();o&&(s.title=function(){return o});var l=this.slots("extra");return l&&(s.extra=function(){return l}),i(q,{attrs:{icon:this.leftIcon,size:this.size,center:this.center,border:this.border,isLink:this.isLink,required:this.required,clickable:this.clickable,titleStyle:this.labelStyle,valueClass:Q("value"),titleClass:[Q("label",a),this.labelClass],arrowDirection:this.arrowDirection},scopedSlots:s,class:Q((t={error:this.showError,disabled:r},t["label-"+a]=a,t["min-height"]=this.type==="textarea"&&!this.autosize,t)),on:{click:this.onClick}},[i("div",{class:Q("body")},[this.genInput(),this.showClear&&i(w,{attrs:{name:"clear"},class:Q("clear"),on:{touchstart:this.onClear}}),this.genRightIcon(),n("button")&&i("div",{class:Q("button")},[n("button")])]),this.genWordLimit(),this.genMessage()])}});var qe=0;function nu(e){e?(qe||document.body.classList.add("van-toast--unclickable"),qe++):(qe--,qe||document.body.classList.remove("van-toast--unclickable"))}var da=p("toast"),ru=da[0],ye=da[1];const fa=ru({mixins:[He()],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;this.clickable!==t&&(this.clickable=t,nu(t))},onAfterEnter:function(){this.$emit("opened"),this.onOpened&&this.onOpened()},onAfterLeave:function(){this.$emit("closed")},genIcon:function(){var t=this.$createElement,i=this.icon,n=this.type,r=this.iconPrefix,a=this.loadingType,s=i||n==="success"||n==="fail";if(s)return t(w,{class:ye("icon"),attrs:{classPrefix:r,name:i||n}});if(n==="loading")return t(ht,{class:ye("loading"),attrs:{type:a}})},genMessage:function(){var t=this.$createElement,i=this.type,n=this.message;if(!(!_(n)||n===""))return i==="html"?t("div",{class:ye("text"),domProps:{innerHTML:n}}):t("div",{class:ye("text")},[n])}},render:function(){var t,i=arguments[0];return i("transition",{attrs:{name:this.transition},on:{afterEnter:this.onAfterEnter,afterLeave:this.onAfterLeave}},[i("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()])])}});var pa={icon:"",type:"text",mask:!1,value:!0,message:"",className:"",overlay:!1,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,closeOnClickOverlay:!1},Ke={},tt=[],Ye=!1,Xe=m({},pa);function va(e){return ct(e)?e:{message:e}}function au(e){return document.body.contains(e)}function su(){if(K)return{};if(tt=tt.filter(function(t){return!t.$el.parentNode||au(t.$el)}),!tt.length||Ye){var e=new($.extend(fa))({el:document.createElement("div")});e.$on("input",function(t){e.value=t}),tt.push(e)}return tt[tt.length-1]}function ou(e){return m({},e,{overlay:e.mask||e.overlay,mask:void 0,duration:void 0})}function M(e){e===void 0&&(e={});var t=su();return t.value&&t.updateZIndex(),e=va(e),e=m({},Xe,Ke[e.type||Xe.type],e),process.env.NODE_ENV==="development"&&e.mask&&console.warn('[Vant] Toast: "mask" option is deprecated, use "overlay" option instead.'),e.clear=function(){t.value=!1,e.onClose&&(e.onClose(),e.onClose=null),Ye&&!K&&t.$on("closed",function(){clearTimeout(t.timer),tt=tt.filter(function(i){return i!==t}),Hi(t.$el),t.$destroy()})},m(t,ou(e)),clearTimeout(t.timer),e.duration>0&&(t.timer=setTimeout(function(){t.clear()},e.duration)),t}var lu=function(t){return function(i){return M(m({type:t},va(i)))}};["loading","success","fail"].forEach(function(e){M[e]=lu(e)}),M.clear=function(e){tt.length&&(e?(tt.forEach(function(t){t.clear()}),tt=[]):Ye?tt.shift().clear():tt[0].clear())},M.setDefaultOptions=function(e,t){typeof e=="string"?Ke[e]=t:m(Xe,e)},M.resetDefaultOptions=function(e){typeof e=="string"?Ke[e]=null:(Xe=m({},pa),Ke={})},M.allowMultiple=function(e){e===void 0&&(e=!0),Ye=e},M.install=function(){$.use(fa)},$.prototype.$toast=M;var ma=p("button"),cu=ma[0],re=ma[1];function ga(e,t,i,n){var r,a=t.tag,s=t.icon,o=t.type,l=t.color,c=t.plain,u=t.disabled,h=t.loading,d=t.hairline,f=t.loadingText,v=t.iconPosition,g={};l&&(g.color=c?l:"white",c||(g.background=l),l.indexOf("gradient")!==-1?g.border=0:g.borderColor=l);function y(C){t.loading&&C.preventDefault(),!h&&!u&&(I(n,"click",C),oa(n))}function b(C){I(n,"touchstart",C)}var S=[re([o,t.size,{plain:c,loading:h,disabled:u,hairline:d,block:t.block,round:t.round,square:t.square}]),(r={},r[Gr]=d,r)];function x(){if(h)return i.loading?i.loading():e(ht,{class:re("loading"),attrs:{size:t.loadingSize,type:t.loadingType,color:"currentColor"}});if(i.icon)return e("div",{class:re("icon")},[i.icon()]);if(s)return e(w,{attrs:{name:s,classPrefix:t.iconPrefix},class:re("icon")})}function k(){var C=[];v==="left"&&C.push(x());var O;return h?O=f:O=i.default?i.default():t.text,O&&C.push(e("span",{class:re("text")},[O])),v==="right"&&C.push(x()),C}return e(a,T([{style:g,class:S,attrs:{type:t.nativeType,disabled:u},on:{click:y,touchstart:b}},B(n)]),[e("div",{class:re("content")},[k()])])}ga.props=m({},Mt,{text:String,icon:String,color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,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"},iconPosition:{type:String,default:"left"}});const F=cu(ga);function uu(e){var t=[];function i(n){n.forEach(function(r){t.push(r),r.componentInstance&&i(r.componentInstance.$children.map(function(a){return a.$vnode})),r.children&&i(r.children)})}return i(e),t}function ya(e,t){var i=t.$vnode.componentOptions;if(!(!i||!i.children)){var n=uu(i.children);e.sort(function(r,a){return n.indexOf(r.$vnode)-n.indexOf(a.$vnode)})}}function X(e,t){var i,n;t===void 0&&(t={});var r=t.indexKey||"index";return{inject:(i={},i[e]={default:null},i),computed:(n={parent:function(){return this.disableBindRelation?null:this[e]}},n[r]=function(){return this.bindRelation(),this.parent?this.parent.children.indexOf(this):null},n),watch:{disableBindRelation:function(s){s||this.bindRelation()}},mounted:function(){this.bindRelation()},beforeDestroy:function(){var s=this;this.parent&&(this.parent.children=this.parent.children.filter(function(o){return o!==s}))},methods:{bindRelation:function(){if(!(!this.parent||this.parent.children.indexOf(this)!==-1)){var s=[].concat(this.parent.children,[this]);ya(s,this.parent),this.parent.children=s}}}}}function G(e){return{provide:function(){var i;return i={},i[e]=this,i},data:function(){return{children:[]}}}}var ba=p("goods-action"),hu=ba[0],du=ba[1];const Sa=hu({mixins:[G("vanGoodsAction")],props:{safeAreaInsetBottom:{type:Boolean,default:!0}},render:function(){var t=arguments[0];return t("div",{class:du({unfit:!this.safeAreaInsetBottom})},[this.slots()])}});var ka=p("goods-action-button"),fu=ka[0],pu=ka[1];const en=fu({mixins:[X("vanGoodsAction")],props:m({},Mt,{type:String,text:String,icon: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),Yt(this.$router,this)}},render:function(){var t=arguments[0];return t(F,{class:pu([{first:this.isFirst,last:this.isLast},this.type]),attrs:{size:"large",type:this.type,icon:this.icon,color:this.color,loading:this.loading,disabled:this.disabled},on:{click:this.onClick}},[this.slots()||this.text])}});var nn=p("dialog"),vu=nn[0],pt=nn[1],Ge=nn[2];const rn=vu({mixins:[He()],props:{title:String,theme:String,width:[Number,String],message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,overlay:{type:Boolean,default:!0},allowHtml:{type:Boolean,default:!0},transition:{type:String,default:"van-dialog-bounce"},showConfirmButton:{type:Boolean,default:!0},closeOnPopstate:{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 i=this;this.$emit(t),this.value&&(this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,function(n){n!==!1&&i.loading[t]&&i.onClose(t),i.loading.confirm=!1,i.loading.cancel=!1})):this.onClose(t))},onClose:function(t){this.close(),this.callback&&this.callback(t)},onOpened:function(){var t=this;this.$emit("opened"),this.$nextTick(function(){var i;(i=t.$refs.dialog)==null||i.focus()})},onClosed:function(){this.$emit("closed")},onKeydown:function(t){var i=this;if(t.key==="Escape"||t.key==="Enter"){if(t.target!==this.$refs.dialog)return;var n={Enter:this.showConfirmButton?function(){return i.handleAction("confirm")}:pe,Escape:this.showCancelButton?function(){return i.handleAction("cancel")}:pe};n[t.key](),this.$emit("keydown",t)}},genRoundButtons:function(){var t=this,i=this.$createElement;return i(Sa,{class:pt("footer")},[this.showCancelButton&&i(en,{attrs:{size:"large",type:"warning",text:this.cancelButtonText||Ge("cancel"),color:this.cancelButtonColor,loading:this.loading.cancel},class:pt("cancel"),on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&i(en,{attrs:{size:"large",type:"danger",text:this.confirmButtonText||Ge("confirm"),color:this.confirmButtonColor,loading:this.loading.confirm},class:pt("confirm"),on:{click:function(){t.handleAction("confirm")}}})])},genButtons:function(){var t=this,i,n=this.$createElement,r=this.showCancelButton&&this.showConfirmButton;return n("div",{class:[qi,pt("footer")]},[this.showCancelButton&&n(F,{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||Ge("cancel"),nativeType:"button"},class:pt("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&n(F,{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||Ge("confirm"),nativeType:"button"},class:[pt("confirm"),(i={},i[Xr]=r,i)],style:{color:this.confirmButtonColor},on:{click:function(){t.handleAction("confirm")}}})])},genContent:function(t,i){var n=this.$createElement;if(i)return n("div",{class:pt("content")},[i]);var r=this.message,a=this.messageAlign;if(r){var s,o,l={class:pt("message",(s={"has-title":t},s[a]=a,s)),domProps:(o={},o[this.allowHtml?"innerHTML":"textContent"]=r,o)};return n("div",{class:pt("content",{isolated:!t})},[n("div",T([{},l]))])}}},render:function(){var t=arguments[0];if(this.shouldRender){var i=this.message,n=this.slots(),r=this.slots("title")||this.title,a=r&&t("div",{class:pt("header",{isolated:!i&&!n})},[r]);return t("transition",{attrs:{name:this.transition},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[t("div",{directives:[{name:"show",value:this.value}],attrs:{role:"dialog","aria-labelledby":this.title||i,tabIndex:0},class:[pt([this.theme]),this.className],style:{width:P(this.width)},ref:"dialog",on:{keydown:this.onKeydown}},[a,this.genContent(r,n),this.theme==="round-button"?this.genRoundButtons():this.genButtons()])])}}});var vt;function mu(e){return document.body.contains(e)}function gu(){vt&&vt.$destroy(),vt=new($.extend(rn))({el:document.createElement("div"),propsData:{lazyRender:!1}}),vt.$on("input",function(e){vt.value=e})}function D(e){return K?Promise.resolve():new Promise(function(t,i){(!vt||!mu(vt.$el))&&gu(),m(vt,D.currentOptions,e,{resolve:t,reject:i})})}D.defaultOptions={value:!0,title:"",width:"",theme:null,message:"",overlay:!0,className:"",allowHtml:!0,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:!0,closeOnClickOverlay:!1,callback:function(t){vt[t==="confirm"?"resolve":"reject"](t)}},D.alert=D,D.confirm=function(e){return D(m({showCancelButton:!0},e))},D.close=function(){vt&&(vt.value=!1)},D.setDefaultOptions=function(e){m(D.currentOptions,e)},D.resetDefaultOptions=function(){D.currentOptions=m({},D.defaultOptions)},D.resetDefaultOptions(),D.install=function(){$.use(rn)},D.Component=rn,$.prototype.$dialog=D;var an=p("address-edit-detail"),yu=an[0],Ze=an[1],sn=an[2],Ca=Qc();const bu=yu({props:{value:String,errorMessage:String,focused:Boolean,detailRows:[Number,String],searchResult:Array,detailMaxlength:[Number,String],showSearchResult:Boolean},computed:{shouldShowSearchResult:function(){return this.focused&&this.searchResult&&this.showSearchResult}},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,i=this.value&&this.focused&&Ca;if(i)return t("div",{class:Ze("finish"),on:{click:this.onFinish}},[sn("complete")])},genSearchResult:function(){var t=this,i=this.$createElement,n=this.value,r=this.shouldShowSearchResult,a=this.searchResult;if(r)return a.map(function(s){return i(q,{key:s.name+s.address,attrs:{clickable:!0,border:!1,icon:"location-o",label:s.address},class:Ze("search-item"),on:{click:function(){t.onSelect(s)}},scopedSlots:{title:function(){if(s.name){var l=s.name.replace(n,"<span class="+Ze("keyword")+">"+n+"</span>");return i("div",{domProps:{innerHTML:l}})}}}})})}},render:function(){var t=arguments[0];return t(q,{class:Ze()},[t(rt,{attrs:{autosize:!0,rows:this.detailRows,clearable:!Ca,type:"textarea",value:this.value,errorMessage:this.errorMessage,border:!this.shouldShowSearchResult,label:sn("label"),maxlength:this.detailMaxlength,placeholder:sn("placeholder")},ref:"field",scopedSlots:{icon:this.genFinish},on:m({},this.$listeners)}),this.genSearchResult()])}});var $a={size:[Number,String],value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1}},Lt={inject:{vanField:{default:null}},watch:{value:function(){var t=this.vanField;t&&(t.resetValidation(),t.validateWithTrigger("onChange"))}},created:function(){var t=this.vanField;t&&!t.children&&(t.children=this)}},wa=p("switch"),Su=wa[0],on=wa[1];const Je=Su({mixins:[Lt],props:$a,computed:{checked:function(){return this.value===this.activeValue},style:function(){return{fontSize:P(this.size),backgroundColor:this.checked?this.activeColor:this.inactiveColor}}},methods:{onClick:function(t){if(this.$emit("click",t),!this.disabled&&!this.loading){var i=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",i),this.$emit("change",i)}},genLoading:function(){var t=this.$createElement;if(this.loading){var i=this.checked?this.activeColor:this.inactiveColor;return t(ht,{class:on("loading"),attrs:{color:i}})}}},render:function(){var t=arguments[0],i=this.checked,n=this.loading,r=this.disabled;return t("div",{class:on({on:i,loading:n,disabled:r}),attrs:{role:"switch","aria-checked":String(i)},style:this.style,on:{click:this.onClick}},[t("div",{class:on("node")},[this.genLoading()])])}});var ln=p("address-edit"),ku=ln[0],Qe=ln[1],V=ln[2],xa={name:"",tel:"",country:"",province:"",city:"",county:"",areaCode:"",postalCode:"",addressDetail:"",isDefault:!1};function Cu(e){return/^\d{6}$/.test(e)}const $u=ku({props:{areaList:Object,isSaving:Boolean,isDeleting:Boolean,validator:Function,showDelete:Boolean,showPostal:Boolean,searchResult:Array,telMaxlength:[Number,String],showSetDefault:Boolean,saveButtonText:String,areaPlaceholder:String,deleteButtonText:String,showSearchResult:Boolean,showArea:{type:Boolean,default:!0},showDetail:{type:Boolean,default:!0},disableArea:Boolean,detailRows:{type:[Number,String],default:1},detailMaxlength:{type:[Number,String],default:200},addressInfo:{type:Object,default:function(){return m({},xa)}},telValidator:{type:Function,default:Kr},postalValidator:{type:Function,default:Cu},areaColumnsPlaceholder:{type:Array,default:function(){return[]}}},data:function(){return{data:{},showAreaPopup:!1,detailFocused:!1,errorInfo:{tel:"",name:"",areaCode:"",postalCode:"",addressDetail:""}}},computed:{areaListLoaded:function(){return ct(this.areaList)&&Object.keys(this.areaList).length},areaText:function(){var t=this.data,i=t.country,n=t.province,r=t.city,a=t.county,s=t.areaCode;if(s){var o=[i,n,r,a];return n&&n===r&&o.splice(1,1),o.filter(function(l){return l}).join("/")}return""},hideBottomFields:function(){var t=this.searchResult;return t&&t.length&&this.detailFocused}},watch:{addressInfo:{handler:function(t){this.data=m({},xa,t),this.setAreaCode(t.areaCode)},deep:!0,immediate:!0},areaList:function(){this.setAreaCode(this.data.areaCode)}},methods:{onFocus:function(t){this.errorInfo[t]="",this.detailFocused=t==="addressDetail",this.$emit("focus",t)},onChangeDetail:function(t){this.data.addressDetail=t,this.$emit("change-detail",t)},onAreaConfirm:function(t){if(t=t.filter(function(i){return!!i}),t.some(function(i){return!i.code})){M(V("areaEmpty"));return}this.showAreaPopup=!1,this.assignAreaValues(),this.$emit("change-area",t)},assignAreaValues:function(){var t=this.$refs.area;if(t){var i=t.getArea();i.areaCode=i.code,delete i.code,m(this.data,i)}},onSave:function(){var t=this,i=["name","tel"];this.showArea&&i.push("areaCode"),this.showDetail&&i.push("addressDetail"),this.showPostal&&i.push("postalCode");var n=i.every(function(r){var a=t.getErrorMessage(r);return a&&(t.errorInfo[r]=a),!a});n&&!this.isSaving&&this.$emit("save",this.data)},getErrorMessage:function(t){var i=String(this.data[t]||"").trim();if(this.validator){var n=this.validator(t,i);if(n)return n}switch(t){case"name":return i?"":V("nameEmpty");case"tel":return this.telValidator(i)?"":V("telInvalid");case"areaCode":return i?"":V("areaEmpty");case"addressDetail":return i?"":V("addressEmpty");case"postalCode":return i&&!this.postalValidator(i)?V("postalEmpty"):""}},onDelete:function(){var t=this;D.confirm({title:V("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(t){this.data.areaCode=t||"",t&&this.$nextTick(this.assignAreaValues)},setAddressDetail:function(t){this.data.addressDetail=t},onDetailBlur:function(){var t=this;setTimeout(function(){t.detailFocused=!1})},genSetDefaultCell:function(t){var i=this;if(this.showSetDefault){var n={"right-icon":function(){return t(Je,{attrs:{size:"24"},on:{change:function(s){i.$emit("change-default",s)}},model:{value:i.data.isDefault,callback:function(s){i.$set(i.data,"isDefault",s)}}})}};return t(q,{directives:[{name:"show",value:!this.hideBottomFields}],attrs:{center:!0,title:V("defaultAddress")},class:Qe("default"),scopedSlots:n})}return t()}},render:function(t){var i=this,n=this.data,r=this.errorInfo,a=this.disableArea,s=this.hideBottomFields,o=function(c){return function(){return i.onFocus(c)}};return t("div",{class:Qe()},[t("div",{class:Qe("fields")},[t(rt,{attrs:{clearable:!0,label:V("name"),placeholder:V("namePlaceholder"),errorMessage:r.name},on:{focus:o("name")},model:{value:n.name,callback:function(c){i.$set(n,"name",c)}}}),t(rt,{attrs:{clearable:!0,type:"tel",label:V("tel"),maxlength:this.telMaxlength,placeholder:V("telPlaceholder"),errorMessage:r.tel},on:{focus:o("tel")},model:{value:n.tel,callback:function(c){i.$set(n,"tel",c)}}}),t(rt,{directives:[{name:"show",value:this.showArea}],attrs:{readonly:!0,clickable:!a,label:V("area"),placeholder:this.areaPlaceholder||V("areaPlaceholder"),errorMessage:r.areaCode,rightIcon:a?null:"arrow",value:this.areaText},on:{focus:o("areaCode"),click:function(){i.$emit("click-area"),i.showAreaPopup=!a}}}),t(bu,{directives:[{name:"show",value:this.showDetail}],attrs:{focused:this.detailFocused,value:n.addressDetail,errorMessage:r.addressDetail,detailRows:this.detailRows,detailMaxlength:this.detailMaxlength,searchResult:this.searchResult,showSearchResult:this.showSearchResult},on:{focus:o("addressDetail"),blur:this.onDetailBlur,input:this.onChangeDetail,"select-search":function(c){i.$emit("select-search",c)}}}),this.showPostal&&t(rt,{directives:[{name:"show",value:!s}],attrs:{type:"tel",maxlength:"6",label:V("postal"),placeholder:V("postal"),errorMessage:r.postalCode},on:{focus:o("postalCode")},model:{value:n.postalCode,callback:function(c){i.$set(n,"postalCode",c)}}}),this.slots()]),this.genSetDefaultCell(t),t("div",{directives:[{name:"show",value:!s}],class:Qe("buttons")},[t(F,{attrs:{block:!0,round:!0,loading:this.isSaving,type:"danger",text:this.saveButtonText||V("save")},on:{click:this.onSave}}),this.showDelete&&t(F,{attrs:{block:!0,round:!0,loading:this.isDeleting,text:this.deleteButtonText||V("delete")},on:{click:this.onDelete}})]),t(St,{attrs:{round:!0,position:"bottom",lazyRender:!1,getContainer:"body"},model:{value:i.showAreaPopup,callback:function(c){i.showAreaPopup=c}}},[t(sa,{ref:"area",attrs:{value:n.areaCode,loading:!this.areaListLoaded,areaList:this.areaList,columnsPlaceholder:this.areaColumnsPlaceholder},on:{confirm:this.onAreaConfirm,cancel:function(){i.showAreaPopup=!1}}})])])}});var Ta=p("radio-group"),wu=Ta[0],xu=Ta[1];const cn=wu({mixins:[G("vanRadio"),Lt],props:{value:null,disabled:Boolean,direction:String,checkedColor:String,iconSize:[Number,String]},watch:{value:function(t){this.$emit("change",t)}},render:function(){var t=arguments[0];return t("div",{class:xu([this.direction]),attrs:{role:"radiogroup"}},[this.slots()])}});var _a=p("tag"),Tu=_a[0],Ia=_a[1];function Oa(e,t,i,n){var r,a=t.type,s=t.mark,o=t.plain,l=t.color,c=t.round,u=t.size,h=t.textColor,d=o?"color":"backgroundColor",f=(r={},r[d]=l,r);o?(f.color=h||l,f.borderColor=l):(f.color=h,f.background=l);var v={mark:s,plain:o,round:c};u&&(v[u]=u);var g=t.closeable&&e(w,{attrs:{name:"cross"},class:Ia("close"),on:{click:function(b){b.stopPropagation(),I(n,"close")}}});return e("transition",{attrs:{name:t.closeable?"van-fade":null}},[e("span",T([{key:"content",style:f,class:Ia([v,a])},B(n,!0)]),[i.default==null?void 0:i.default(),g])])}Oa.props={size:String,mark:Boolean,color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean,type:{type:String,default:"default"}};const ti=Tu(Oa);var Pa=function(t){var i=t.parent,n=t.bem,r=t.role;return{mixins:[X(i),Lt],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},direction:function(){return this.parent&&this.parent.direction||null},iconStyle:function(){var s=this.checkedColor||this.parent&&this.parent.checkedColor;if(s&&this.checked&&!this.isDisabled)return{borderColor:s,backgroundColor:s}},tabindex:function(){return this.isDisabled||r==="radio"&&!this.checked?-1:0}},methods:{onClick:function(s){var o=this,l=s.target,c=this.$refs.icon,u=c===l||(c==null?void 0:c.contains(l));!this.isDisabled&&(u||!this.labelDisabled)?(this.toggle(),setTimeout(function(){o.$emit("click",s)})):this.$emit("click",s)},genIcon:function(){var s=this.$createElement,o=this.checked,l=this.iconSize||this.parent&&this.parent.iconSize;return s("div",{ref:"icon",class:n("icon",[this.shape,{disabled:this.isDisabled,checked:o}]),style:{fontSize:P(l)}},[this.slots("icon",{checked:o})||s(w,{attrs:{name:"success"},style:this.iconStyle})])},genLabel:function(){var s=this.$createElement,o=this.slots();if(o)return s("span",{class:n("label",[this.labelPosition,{disabled:this.isDisabled}])},[o])}},render:function(){var s=arguments[0],o=[this.genIcon()];return this.labelPosition==="left"?o.unshift(this.genLabel()):o.push(this.genLabel()),s("div",{attrs:{role:r,tabindex:this.tabindex,"aria-checked":String(this.checked)},class:n([{disabled:this.isDisabled,"label-disabled":this.labelDisabled},this.direction]),on:{click:this.onClick}},[o])}}},Ba=p("radio"),_u=Ba[0],Iu=Ba[1];const un=_u({mixins:[Pa({bem:Iu,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}}});var Ea=p("address-item"),Ou=Ea[0],ae=Ea[1];function Da(e,t,i,n){var r=t.disabled,a=t.switchable;function s(){a&&I(n,"select"),I(n,"click")}var o=function(){return e(w,{attrs:{name:"edit"},class:ae("edit"),on:{click:function(d){d.stopPropagation(),I(n,"edit"),I(n,"click")}}})};function l(){if(i.tag)return i.tag(m({},t.data));if(t.data.isDefault&&t.defaultTagText)return e(ti,{attrs:{type:"danger",round:!0},class:ae("tag")},[t.defaultTagText])}function c(){var u=t.data,h=[e("div",{class:ae("name")},[u.name+" "+u.tel,l()]),e("div",{class:ae("address")},[u.address])];return a&&!r?e(un,{attrs:{name:u.id,iconSize:18}},[h]):h}return e("div",{class:ae({disabled:r}),on:{click:s}},[e(q,T([{attrs:{border:!1,valueClass:ae("value")},scopedSlots:{default:c,"right-icon":o}},B(n)])),i.bottom==null?void 0:i.bottom(m({},t.data,{disabled:r}))])}Da.props={data:Object,disabled:Boolean,switchable:Boolean,defaultTagText:String};const Pu=Ou(Da);var hn=p("address-list"),Bu=hn[0],ei=hn[1],Eu=hn[2];function Na(e,t,i,n){function r(o,l){if(o)return o.map(function(c,u){return e(Pu,{attrs:{data:c,disabled:l,switchable:t.switchable,defaultTagText:t.defaultTagText},key:c.id,scopedSlots:{bottom:i["item-bottom"],tag:i.tag},on:{select:function(){I(n,l?"select-disabled":"select",c,u),l||I(n,"input",c.id)},edit:function(){I(n,l?"edit-disabled":"edit",c,u)},click:function(){I(n,"click-item",c,u)}}})})}var a=r(t.list),s=r(t.disabledList,!0);return e("div",T([{class:ei()},B(n)]),[i.top==null?void 0:i.top(),e(cn,{attrs:{value:t.value}},[a]),t.disabledText&&e("div",{class:ei("disabled-text")},[t.disabledText]),s,i.default==null?void 0:i.default(),e("div",{class:ei("bottom")},[e(F,{attrs:{round:!0,block:!0,type:"danger",text:t.addButtonText||Eu("add")},class:ei("add"),on:{click:function(){I(n,"add")}}})])])}Na.props={list:Array,value:[Number,String],disabledList:Array,disabledText:String,addButtonText:String,defaultTagText:String,switchable:{type:Boolean,default:!0}};const Du=Bu(Na);var Ma=p("badge"),Nu=Ma[0],La=Ma[1];const Mu=Nu({props:{dot:Boolean,max:[Number,String],color:String,content:[Number,String],tag:{type:String,default:"div"}},methods:{hasContent:function(){return!!(this.$scopedSlots.content||_(this.content)&&this.content!=="")},renderContent:function(){var t=this.dot,i=this.max,n=this.content;if(!t&&this.hasContent())return this.$scopedSlots.content?this.$scopedSlots.content():_(i)&&Ri(n)&&+n>i?i+"+":n},renderBadge:function(){var t=this.$createElement;if(this.hasContent()||this.dot)return t("div",{class:La({dot:this.dot,fixed:!!this.$scopedSlots.default}),style:{background:this.color}},[this.renderContent()])}},render:function(){var t=arguments[0];if(this.$scopedSlots.default){var i=this.tag;return t(i,{class:La("wrapper")},[this.$scopedSlots.default(),this.renderBadge()])}return this.renderBadge()}});var Aa=Date.now();function Lu(e){var t=Date.now(),i=Math.max(0,16-(t-Aa)),n=setTimeout(e,i);return Aa=t+i,n}var be=K?global:window,Au=be.requestAnimationFrame||Lu,Ru=be.cancelAnimationFrame||be.clearTimeout;function at(e){return Au.call(be,e)}function Xt(e){at(function(){at(e)})}function Ra(e){Ru.call(be,e)}function Se(e){return Object.prototype.toString.call(e)==="[object Date]"&&!Vi(e.getTime())}var dn=p("calendar"),Vu=dn[0],A=dn[1],At=dn[2];function zu(e){return At("monthTitle",e.getFullYear(),e.getMonth()+1)}function fn(e,t){var i=e.getFullYear(),n=t.getFullYear(),r=e.getMonth(),a=t.getMonth();return i===n?r===a?0:r>a?1:-1:i>n?1:-1}function kt(e,t){var i=fn(e,t);if(i===0){var n=e.getDate(),r=t.getDate();return n===r?0:n>r?1:-1}return i}function pn(e,t){return e=new Date(e),e.setDate(e.getDate()+t),e}function Fu(e){return pn(e,-1)}function Va(e){return pn(e,1)}function Hu(e){var t=e[0].getTime(),i=e[1].getTime();return(i-t)/(1e3*60*60*24)+1}function vn(e){return new Date(e)}function za(e){return Array.isArray(e)?e.map(function(t){return t===null?t:vn(t)}):vn(e)}function ju(e,t){if(e<0)return[];for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function mn(e){if(!e)return 0;for(;Vi(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function gn(e,t){return 32-new Date(e,t-1,32).getDate()}var Wu=p("calendar-month"),Uu=Wu[0];const qu=Uu({props:{date:Date,type:String,color:String,minDate:Date,maxDate:Date,showMark:Boolean,rowHeight:[Number,String],formatter:Function,lazyRender:Boolean,currentDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Boolean,showMonthTitle:Boolean,firstDayOfWeek:Number},data:function(){return{visible:!1}},computed:{title:function(){return zu(this.date)},rowHeightWithUnit:function(){return P(this.rowHeight)},offset:function(){var t=this.firstDayOfWeek,i=this.date.getDay();return t?(i+7-this.firstDayOfWeek)%7:i},totalDay:function(){return gn(this.date.getFullYear(),this.date.getMonth()+1)},shouldRender:function(){return this.visible||!this.lazyRender},placeholders:function(){for(var t=[],i=Math.ceil((this.totalDay+this.offset)/7),n=1;n<=i;n++)t.push({type:"placeholder"});return t},days:function(){for(var t=[],i=this.date.getFullYear(),n=this.date.getMonth(),r=1;r<=this.totalDay;r++){var a=new Date(i,n,r),s=this.getDayType(a),o={date:a,type:s,text:r,bottomInfo:this.getBottomInfo(s)};this.formatter&&(o=this.formatter(o)),t.push(o)}return t}},methods:{getHeight:function(){var t;return((t=this.$el)==null?void 0:t.getBoundingClientRect().height)||0},scrollIntoView:function(t){var i=this.$refs,n=i.days,r=i.month,a=this.showSubtitle?n:r,s=a.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;Ve(t,s)},getMultipleDayType:function(t){var i=this,n=function(c){return i.currentDate.some(function(u){return kt(u,c)===0})};if(n(t)){var r=Fu(t),a=Va(t),s=n(r),o=n(a);return s&&o?"multiple-middle":s?"end":o?"start":"multiple-selected"}return""},getRangeDayType:function(t){var i=this.currentDate,n=i[0],r=i[1];if(!n)return"";var a=kt(t,n);if(!r)return a===0?"start":"";var s=kt(t,r);if(a===0&&s===0&&this.allowSameDay)return"start-end";if(a===0)return"start";if(s===0)return"end";if(a>0&&s<0)return"middle"},getDayType:function(t){var i=this.type,n=this.minDate,r=this.maxDate,a=this.currentDate;if(kt(t,n)<0||kt(t,r)>0)return"disabled";if(a!==null){if(i==="single")return kt(t,a)===0?"selected":"";if(i==="multiple")return this.getMultipleDayType(t);if(i==="range")return this.getRangeDayType(t)}},getBottomInfo:function(t){if(this.type==="range"){if(t==="start"||t==="end")return At(t);if(t==="start-end")return At("startEnd")}},getDayStyle:function(t,i){var n={height:this.rowHeightWithUnit};return t==="placeholder"?(n.width="100%",n):(i===0&&(n.marginLeft=100*this.offset/7+"%"),this.color&&(t==="start"||t==="end"||t==="start-end"||t==="multiple-selected"||t==="multiple-middle"?n.background=this.color:t==="middle"&&(n.color=this.color)),n)},genTitle:function(){var t=this.$createElement;if(this.showMonthTitle)return t("div",{class:A("month-title")},[this.title])},genMark:function(){var t=this.$createElement;if(this.showMark&&this.shouldRender)return t("div",{class:A("month-mark")},[this.date.getMonth()+1])},genDays:function(){var t=this.$createElement,i=this.shouldRender?this.days:this.placeholders;return t("div",{ref:"days",attrs:{role:"grid"},class:A("days")},[this.genMark(),i.map(this.genDay)])},genTopInfo:function(t){var i=this.$createElement,n=this.$scopedSlots["top-info"];if(t.topInfo||n)return i("div",{class:A("top-info")},[n?n(t):t.topInfo])},genBottomInfo:function(t){var i=this.$createElement,n=this.$scopedSlots["bottom-info"];if(t.bottomInfo||n)return i("div",{class:A("bottom-info")},[n?n(t):t.bottomInfo])},genDay:function(t,i){var n=this,r=this.$createElement,a=t.type,s=this.getDayStyle(a,i),o=a==="disabled",l=function(){o||n.$emit("click",t)};return a==="selected"?r("div",{attrs:{role:"gridcell",tabindex:-1},style:s,class:[A("day"),t.className],on:{click:l}},[r("div",{class:A("selected-day"),style:{width:this.rowHeightWithUnit,height:this.rowHeightWithUnit,background:this.color}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])]):r("div",{attrs:{role:"gridcell",tabindex:o?null:-1},style:s,class:[A("day",a),t.className],on:{click:l}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])}},render:function(){var t=arguments[0];return t("div",{class:A("month"),ref:"month"},[this.genTitle(),this.genDays()])}});var Ku=p("calendar-header"),Yu=Ku[0];const Xu=Yu({props:{title:String,subtitle:String,showTitle:Boolean,showSubtitle:Boolean,firstDayOfWeek:Number},methods:{genTitle:function(){var t=this.$createElement;if(this.showTitle){var i=this.slots("title")||this.title||At("title");return t("div",{class:A("header-title")},[i])}},genSubtitle:function(){var t=this.$createElement;if(this.showSubtitle)return t("div",{class:A("header-subtitle")},[this.subtitle])},genWeekDays:function(){var t=this.$createElement,i=At("weekdays"),n=this.firstDayOfWeek,r=[].concat(i.slice(n,7),i.slice(0,n));return t("div",{class:A("weekdays")},[r.map(function(a){return t("span",{class:A("weekday")},[a])})])}},render:function(){var t=arguments[0];return t("div",{class:A("header")},[this.genTitle(),this.genSubtitle(),this.genWeekDays()])}}),Gu=Vu({props:{title:String,color:String,value:Boolean,readonly:Boolean,formatter:Function,rowHeight:[Number,String],confirmText:String,rangePrompt:String,defaultDate:[Date,Array],getContainer:[String,Function],allowSameDay:Boolean,confirmDisabledText:String,type:{type:String,default:"single"},round:{type:Boolean,default:!0},position:{type:String,default:"bottom"},poppable:{type:Boolean,default:!0},maxRange:{type:[Number,String],default:null},lazyRender:{type:Boolean,default:!0},showMark:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showSubtitle:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},minDate:{type:Date,validator:Se,default:function(){return new Date}},maxDate:{type:Date,validator:Se,default:function(){var t=new Date;return new Date(t.getFullYear(),t.getMonth()+6,t.getDate())}},firstDayOfWeek:{type:[Number,String],default:0,validator:function(t){return t>=0&&t<=6}}},inject:{vanPopup:{default:null}},data:function(){return{subtitle:"",currentDate:this.getInitialDate()}},computed:{months:function(){var t=[],i=new Date(this.minDate);i.setDate(1);do t.push(new Date(i)),i.setMonth(i.getMonth()+1);while(fn(i,this.maxDate)!==1);return t},buttonDisabled:function(){var t=this.type,i=this.currentDate;if(i){if(t==="range")return!i[0]||!i[1];if(t==="multiple")return!i.length}return!i},dayOffset:function(){return this.firstDayOfWeek?this.firstDayOfWeek%7:0}},watch:{value:"init",type:function(){this.reset()},defaultDate:function(t){this.currentDate=t,this.scrollIntoView()}},mounted:function(){if(this.init(),!this.poppable){var t;(t=this.vanPopup)==null||t.$on("opened",this.onScroll)}},activated:function(){this.init()},methods:{reset:function(t){t===void 0&&(t=this.getInitialDate()),this.currentDate=t,this.scrollIntoView()},init:function(){var t=this;this.poppable&&!this.value||this.$nextTick(function(){t.bodyHeight=Math.floor(t.$refs.body.getBoundingClientRect().height),t.onScroll(),t.scrollIntoView()})},scrollToDate:function(t){var i=this;at(function(){var n=i.value||!i.poppable;!t||!n||(i.months.some(function(r,a){if(fn(r,t)===0){var s=i.$refs,o=s.body,l=s.months;return l[a].scrollIntoView(o),!0}return!1}),i.onScroll())})},scrollIntoView:function(){var t=this.currentDate;if(t){var i=this.type==="single"?t:t[0];this.scrollToDate(i)}},getInitialDate:function(){var t=this.type,i=this.minDate,n=this.maxDate,r=this.defaultDate;if(r===null)return r;var a=new Date;if(kt(a,i)===-1?a=i:kt(a,n)===1&&(a=n),t==="range"){var s=r||[],o=s[0],l=s[1];return[o||a,l||Va(a)]}return t==="multiple"?r||[a]:r||a},onScroll:function(){var t=this.$refs,i=t.body,n=t.months,r=qt(i),a=r+this.bodyHeight,s=n.map(function(f){return f.getHeight()}),o=s.reduce(function(f,v){return f+v},0);if(!(a>o&&r>0)){for(var l=0,c,u=[-1,-1],h=0;h<n.length;h++){var d=l<=a&&l+s[h]>=r;d&&(u[1]=h,c||(c=n[h],u[0]=h),n[h].showed||(n[h].showed=!0,this.$emit("month-show",{date:n[h].date,title:n[h].title}))),l+=s[h]}n.forEach(function(f,v){f.visible=v>=u[0]-1&&v<=u[1]+1}),c&&(this.subtitle=c.title)}},onClickDay:function(t){if(!this.readonly){var i=t.date,n=this.type,r=this.currentDate;if(n==="range"){if(!r){this.select([i,null]);return}var a=r[0],s=r[1];if(a&&!s){var o=kt(i,a);o===1?this.select([a,i],!0):o===-1?this.select([i,null]):this.allowSameDay&&this.select([i,i],!0)}else this.select([i,null])}else if(n==="multiple"){if(!r){this.select([i]);return}var l,c=this.currentDate.some(function(d,f){var v=kt(d,i)===0;return v&&(l=f),v});if(c){var u=r.splice(l,1),h=u[0];this.$emit("unselect",vn(h))}else this.maxRange&&r.length>=this.maxRange?M(this.rangePrompt||At("rangePrompt",this.maxRange)):this.select([].concat(r,[i]))}else this.select(i,!0)}},togglePopup:function(t){this.$emit("input",t)},select:function(t,i){var n=this,r=function(o){n.currentDate=o,n.$emit("select",za(n.currentDate))};if(i&&this.type==="range"){var a=this.checkRange(t);if(!a){this.showConfirm?r([t[0],pn(t[0],this.maxRange-1)]):r(t);return}}r(t),i&&!this.showConfirm&&this.onConfirm()},checkRange:function(t){var i=this.maxRange,n=this.rangePrompt;return i&&Hu(t)>i?(M(n||At("rangePrompt",i)),!1):!0},onConfirm:function(){this.$emit("confirm",za(this.currentDate))},genMonth:function(t,i){var n=this.$createElement,r=i!==0||!this.showSubtitle;return n(qu,{ref:"months",refInFor:!0,attrs:{date:t,type:this.type,color:this.color,minDate:this.minDate,maxDate:this.maxDate,showMark:this.showMark,formatter:this.formatter,rowHeight:this.rowHeight,lazyRender:this.lazyRender,currentDate:this.currentDate,showSubtitle:this.showSubtitle,allowSameDay:this.allowSameDay,showMonthTitle:r,firstDayOfWeek:this.dayOffset},scopedSlots:{"top-info":this.$scopedSlots["top-info"],"bottom-info":this.$scopedSlots["bottom-info"]},on:{click:this.onClickDay}})},genFooterContent:function(){var t=this.$createElement,i=this.slots("footer");if(i)return i;if(this.showConfirm){var n=this.buttonDisabled?this.confirmDisabledText:this.confirmText;return t(F,{attrs:{round:!0,block:!0,type:"danger",color:this.color,disabled:this.buttonDisabled,nativeType:"button"},class:A("confirm"),on:{click:this.onConfirm}},[n||At("confirm")])}},genFooter:function(){var t=this.$createElement;return t("div",{class:A("footer",{unfit:!this.safeAreaInsetBottom})},[this.genFooterContent()])},genCalendar:function(){var t=this,i=this.$createElement;return i("div",{class:A()},[i(Xu,{attrs:{title:this.title,showTitle:this.showTitle,subtitle:this.subtitle,showSubtitle:this.showSubtitle,firstDayOfWeek:this.dayOffset},scopedSlots:{title:function(){return t.slots("title")}}}),i("div",{ref:"body",class:A("body"),on:{scroll:this.onScroll}},[this.months.map(this.genMonth)]),this.genFooter()])}},render:function(){var t=this,i=arguments[0];if(this.poppable){var n,r=function(s){return function(){return t.$emit(s)}};return i(St,{attrs:(n={round:!0,value:this.value},n.round=this.round,n.position=this.position,n.closeable=this.showTitle||this.showSubtitle,n.getContainer=this.getContainer,n.closeOnPopstate=this.closeOnPopstate,n.closeOnClickOverlay=this.closeOnClickOverlay,n),class:A("popup"),on:{input:this.togglePopup,open:r("open"),opened:r("opened"),close:r("close"),closed:r("closed")}},[this.genCalendar()])}return this.genCalendar()}});var Fa=p("image"),Zu=Fa[0],se=Fa[1];const oe=Zu({props:{src:String,fit:String,alt:String,round:Boolean,width:[Number,String],height:[Number,String],radius:[Number,String],lazyLoad:Boolean,iconPrefix:String,showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},errorIcon:{type:String,default:"photo-fail"},loadingIcon:{type:String,default:"photo"}},data:function(){return{loading:!0,error:!1}},watch:{src:function(){this.loading=!0,this.error=!1}},computed:{style:function(){var t={};return _(this.width)&&(t.width=P(this.width)),_(this.height)&&(t.height=P(this.height)),_(this.radius)&&(t.overflow="hidden",t.borderRadius=P(this.radius)),t}},created:function(){var t=this.$Lazyload;t&&Ae&&(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){var i=t.el;i===this.$refs.image&&this.loading&&this.onLoad()},onLazyLoadError:function(t){var i=t.el;i===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;if(this.loading&&this.showLoading)return t("div",{class:se("loading")},[this.slots("loading")||t(w,{attrs:{name:this.loadingIcon,classPrefix:this.iconPrefix},class:se("loading-icon")})]);if(this.error&&this.showError)return t("div",{class:se("error")},[this.slots("error")||t(w,{attrs:{name:this.errorIcon,classPrefix:this.iconPrefix},class:se("error-icon")})])},genImage:function(){var t=this.$createElement,i={class:se("img"),attrs:{alt:this.alt},style:{objectFit:this.fit}};if(!this.error)return this.lazyLoad?t("img",T([{ref:"image",directives:[{name:"lazy",value:this.src}]},i])):t("img",T([{attrs:{src:this.src},on:{load:this.onLoad,error:this.onError}},i]))}},render:function(){var t=arguments[0];return t("div",{class:se({round:this.round}),style:this.style,on:{click:this.onClick}},[this.genImage(),this.genPlaceholder(),this.slots()])}});var Ha=p("card"),Ju=Ha[0],Z=Ha[1];function ja(e,t,i,n){var r,a=t.thumb,s=i.num||_(t.num),o=i.price||_(t.price),l=i["origin-price"]||_(t.originPrice),c=s||o||l||i.bottom;function u(k){I(n,"click-thumb",k)}function h(){if(i.tag||t.tag)return e("div",{class:Z("tag")},[i.tag?i.tag():e(ti,{attrs:{mark:!0,type:"danger"}},[t.tag])])}function d(){if(i.thumb||a)return e("a",{attrs:{href:t.thumbLink},class:Z("thumb"),on:{click:u}},[i.thumb?i.thumb():e(oe,{attrs:{src:a,width:"100%",height:"100%",fit:"cover","lazy-load":t.lazyLoad}}),h()])}function f(){if(i.title)return i.title();if(t.title)return e("div",{class:[Z("title"),"van-multi-ellipsis--l2"]},[t.title])}function v(){if(i.desc)return i.desc();if(t.desc)return e("div",{class:[Z("desc"),"van-ellipsis"]},[t.desc])}function g(){var k=t.price.toString().split(".");return e("div",[e("span",{class:Z("price-currency")},[t.currency]),e("span",{class:Z("price-integer")},[k[0]]),".",e("span",{class:Z("price-decimal")},[k[1]])])}function y(){if(o)return e("div",{class:Z("price")},[i.price?i.price():g()])}function b(){if(l){var k=i["origin-price"];return e("div",{class:Z("origin-price")},[k?k():t.currency+" "+t.originPrice])}}function S(){if(s)return e("div",{class:Z("num")},[i.num?i.num():"x"+t.num])}function x(){if(i.footer)return e("div",{class:Z("footer")},[i.footer()])}return e("div",T([{class:Z()},B(n,!0)]),[e("div",{class:Z("header")},[d(),e("div",{class:Z("content",{centered:t.centered})},[e("div",[f(),v(),i.tags==null?void 0:i.tags()]),c&&e("div",{class:"van-card__bottom"},[(r=i["price-top"])==null?void 0:r.call(i),y(),b(),S(),i.bottom==null?void 0:i.bottom()])])]),x()])}ja.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:"¥"}};const Qu=Ju(ja);var Wa=p("tab"),th=Wa[0],yn=Wa[1];const ii=th({mixins:[X("vanTabs")],props:m({},Mt,{dot:Boolean,name:[Number,String],info:[Number,String],badge:[Number,String],title:String,titleStyle:null,titleClass:null,disabled:Boolean}),data:function(){return{inited:!1}},computed:{computedName:function(){var t;return(t=this.name)!=null?t:this.index},isActive:function(){var t=this.computedName===this.parent.currentName;return t&&(this.inited=!0),t}},watch:{title:function(){this.parent.setLine(),this.parent.scrollIntoView()},inited:function(t){var i=this;this.parent.lazyRender&&t&&this.$nextTick(function(){i.parent.$emit("rendered",i.computedName,i.title)})}},render:function(t){var i=this.slots,n=this.parent,r=this.isActive,a=i();if(process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] Tab: "info" prop is deprecated, use "badge" prop instead.'),!(!a&&!n.animated)){var s=n.scrollspy||r,o=this.inited||n.scrollspy||!n.lazyRender,l=o?a:t();return n.animated?t("div",{attrs:{role:"tabpanel","aria-hidden":!r},class:yn("pane-wrapper",{inactive:!r})},[t("div",{class:yn("pane")},[l])]):t("div",{directives:[{name:"show",value:s}],attrs:{role:"tabpanel"},class:yn("pane")},[l])}}});function eh(e,t,i){var n=0,r=e.scrollLeft,a=i===0?1:Math.round(i*1e3/16);function s(){e.scrollLeft+=(t-r)/a,++n<a&&at(s)}s()}function ih(e,t,i,n){var r=qt(e),a=r<t,s=i===0?1:Math.round(i*1e3/16),o=(t-r)/s;function l(){r+=o,(a&&r>t||!a&&r<t)&&(r=t),Ve(e,r),a&&r<t||!a&&r>t?at(l):n&&at(n)}l()}function ke(e){var t=window.getComputedStyle(e),i=t.display==="none",n=e.offsetParent===null&&t.position!=="fixed";return i||n}function Ua(e){var t=e.interceptor,i=e.args,n=e.done;if(t){var r=t.apply(void 0,i);Re(r)?r.then(function(a){a&&n()}).catch(pe):r&&n()}else n()}var qa=p("tab"),nh=qa[0],bn=qa[1];const rh=nh({props:{dot:Boolean,type:String,info:[Number,String],color:String,title:String,isActive:Boolean,disabled:Boolean,scrollable:Boolean,activeColor:String,inactiveColor:String},computed:{style:function(){var t={},i=this.color,n=this.isActive,r=this.type==="card";i&&r&&(t.borderColor=i,this.disabled||(n?t.backgroundColor=i:t.color=i));var a=n?this.activeColor:this.inactiveColor;return a&&(t.color=a),t}},methods:{onClick:function(){this.$emit("click")},genText:function(){var t=this.$createElement,i=t("span",{class:bn("text",{ellipsis:!this.scrollable})},[this.slots()||this.title]);return this.dot||_(this.info)&&this.info!==""?t("span",{class:bn("text-wrapper")},[i,t(Kt,{attrs:{dot:this.dot,info:this.info}})]):i}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"tab","aria-selected":this.isActive},class:[bn({active:this.isActive,disabled:this.disabled})],style:this.style,on:{click:this.onClick}},[this.genText()])}});var Ka=p("sticky"),ah=Ka[0],sh=Ka[1];const Ya=ah({mixins:[ut(function(e,t){if(this.scroller||(this.scroller=Ut(this.$el)),this.observer){var i=t?"observe":"unobserve";this.observer[i](this.$el)}e(this.scroller,"scroll",this.onScroll,!0),this.onScroll()})],props:{zIndex:[Number,String],container:null,offsetTop:{type:[Number,String],default:0}},data:function(){return{fixed:!1,height:0,transform:0}},computed:{offsetTopPx:function(){return Fi(this.offsetTop)},style:function(){if(this.fixed){var t={};return _(this.zIndex)&&(t.zIndex=this.zIndex),this.offsetTopPx&&this.fixed&&(t.top=this.offsetTopPx+"px"),this.transform&&(t.transform="translate3d(0, "+this.transform+"px, 0)"),t}}},watch:{fixed:function(t){this.$emit("change",t)}},created:function(){var t=this;!K&&window.IntersectionObserver&&(this.observer=new IntersectionObserver(function(i){i[0].intersectionRatio>0&&t.onScroll()},{root:document.body}))},methods:{onScroll:function(){var t=this;if(!ke(this.$el)){this.height=this.$el.offsetHeight;var i=this.container,n=this.offsetTopPx,r=qt(window),a=Wi(this.$el),s=function(){t.$emit("scroll",{scrollTop:r,isFixed:t.fixed})};if(i){var o=a+i.offsetHeight;if(r+n+this.height>o){var l=this.height+r-o;l<this.height?(this.fixed=!0,this.transform=-(l+n)):this.fixed=!1,s();return}}r+n>a?(this.fixed=!0,this.transform=0):this.fixed=!1,s()}}},render:function(){var t=arguments[0],i=this.fixed,n={height:i?this.height+"px":null};return t("div",{style:n},[t("div",{class:sh({fixed:i}),style:this.style},[this.slots()])])}});var Xa=p("tabs"),oh=Xa[0],Ga=Xa[1],lh=50;const ch=oh({mixins:[nt],props:{count:Number,duration:[Number,String],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,i=this.deltaX,n=this.currentIndex;t==="horizontal"&&this.offsetX>=lh&&(i>0&&n!==0?this.$emit("change",n-1):i<0&&n!==this.count-1&&this.$emit("change",n+1))},genChildren:function(){var t=this.$createElement;return this.animated?t("div",{class:Ga("track"),style:this.style},[this.slots()]):this.slots()}},render:function(){var t=arguments[0];return t("div",{class:Ga("content",{animated:this.animated}),on:m({},this.listeners)},[this.genChildren()])}});var Za=p("tabs"),uh=Za[0],ni=Za[1];const Sn=uh({mixins:[G("vanTabs"),ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(window,"resize",this.resize,!0),this.scrollspy&&e(this.scroller,"scroll",this.onScroll,!0)})],inject:{vanPopup:{default:null}},model:{prop:"active"},props:{color:String,border:Boolean,sticky:Boolean,animated:Boolean,swipeable:Boolean,scrollspy:Boolean,background:String,lineWidth:[Number,String],lineHeight:[Number,String],beforeChange:Function,titleActiveColor:String,titleInactiveColor:String,type:{type:String,default:"line"},active:{type:[Number,String],default:0},ellipsis:{type:Boolean,default:!0},duration:{type:[Number,String],default:.3},offsetTop:{type:[Number,String],default:0},lazyRender:{type:Boolean,default:!0},swipeThreshold:{type:[Number,String],default:5}},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},offsetTopPx:function(){return Fi(this.offsetTop)},scrollOffset:function(){return this.sticky?this.offsetTopPx+this.tabHeight:0}},watch:{color:"setLine",active:function(t){t!==this.currentName&&this.setCurrentIndexByName(t)},children:function(){var t=this;this.setCurrentIndexByName(this.active),this.setLine(),this.$nextTick(function(){t.scrollIntoView(!0)})},currentIndex:function(){this.scrollIntoView(),this.setLine(),this.stickyFixed&&!this.scrollspy&&ze(Math.ceil(Wi(this.$el)-this.offsetTopPx))},scrollspy:function(t){t?it(this.scroller,"scroll",this.onScroll,!0):Nt(this.scroller,"scroll",this.onScroll)}},mounted:function(){var t=this;this.init(),this.vanPopup&&this.vanPopup.onReopen(function(){t.setLine()})},activated:function(){this.init(),this.setLine()},methods:{resize:function(){this.setLine()},init:function(){var t=this;this.$nextTick(function(){t.inited=!0,t.tabHeight=$c(t.$refs.wrap),t.scrollIntoView(!0)})},setLine:function(){var t=this,i=this.inited;this.$nextTick(function(){var n=t.$refs.titles;if(!(!n||!n[t.currentIndex]||t.type!=="line"||ke(t.$el))){var r=n[t.currentIndex].$el,a=t.lineWidth,s=t.lineHeight,o=r.offsetLeft+r.offsetWidth/2,l={width:P(a),backgroundColor:t.color,transform:"translateX("+o+"px) translateX(-50%)"};if(i&&(l.transitionDuration=t.duration+"s"),_(s)){var c=P(s);l.height=c,l.borderRadius=c}t.lineStyle=l}})},setCurrentIndexByName:function(t){var i=this.children.filter(function(r){return r.computedName===t}),n=(this.children[0]||{}).index||0;this.setCurrentIndex(i.length?i[0].index:n)},setCurrentIndex:function(t){var i=this.findAvailableTab(t);if(_(i)){var n=this.children[i],r=n.computedName,a=this.currentIndex!==null;this.currentIndex=i,r!==this.active&&(this.$emit("input",r),a&&this.$emit("change",r,n.title))}},findAvailableTab:function(t){for(var i=t<this.currentIndex?-1:1;t>=0&&t<this.children.length;){if(!this.children[t].disabled)return t;t+=i}},onClick:function(t,i){var n=this,r=this.children[i],a=r.title,s=r.disabled,o=r.computedName;s?this.$emit("disabled",o,a):(Ua({interceptor:this.beforeChange,args:[o],done:function(){n.setCurrentIndex(i),n.scrollToCurrentContent()}}),this.$emit("click",o,a),Yt(t.$router,t))},scrollIntoView:function(t){var i=this.$refs.titles;if(!(!this.scrollable||!i||!i[this.currentIndex])){var n=this.$refs.nav,r=i[this.currentIndex].$el,a=r.offsetLeft-(n.offsetWidth-r.offsetWidth)/2;eh(n,a,t?0:+this.duration)}},onSticktScroll:function(t){this.stickyFixed=t.isFixed,this.$emit("scroll",t)},scrollTo:function(t){var i=this;this.$nextTick(function(){i.setCurrentIndexByName(t),i.scrollToCurrentContent(!0)})},scrollToCurrentContent:function(t){var i=this;if(t===void 0&&(t=!1),this.scrollspy){var n=this.children[this.currentIndex],r=n==null?void 0:n.$el;if(r){var a=Wi(r,this.scroller)-this.scrollOffset;this.lockScroll=!0,ih(this.scroller,a,t?0:+this.duration,function(){i.lockScroll=!1})}}},onScroll:function(){if(this.scrollspy&&!this.lockScroll){var t=this.getCurrentIndexOnScroll();this.setCurrentIndex(t)}},getCurrentIndexOnScroll:function(){for(var t=this.children,i=0;i<t.length;i++){var n=wc(t[i].$el);if(n>this.scrollOffset)return i===0?0:i-1}return t.length-1}},render:function(){var t=this,i,n=arguments[0],r=this.type,a=this.animated,s=this.scrollable,o=this.children.map(function(c,u){var h;return n(rh,{ref:"titles",refInFor:!0,attrs:{type:r,dot:c.dot,info:(h=c.badge)!=null?h:c.info,title:c.title,color:t.color,isActive:u===t.currentIndex,disabled:c.disabled,scrollable:s,activeColor:t.titleActiveColor,inactiveColor:t.titleInactiveColor},style:c.titleStyle,class:c.titleClass,scopedSlots:{default:function(){return c.slots("title")}},on:{click:function(){t.onClick(c,u)}}})}),l=n("div",{ref:"wrap",class:[ni("wrap",{scrollable:s}),(i={},i[Ue]=r==="line"&&this.border,i)]},[n("div",{ref:"nav",attrs:{role:"tablist"},class:ni("nav",[r,{complete:this.scrollable}]),style:this.navStyle},[this.slots("nav-left"),o,r==="line"&&n("div",{class:ni("line"),style:this.lineStyle}),this.slots("nav-right")])]);return n("div",{class:ni([r])},[this.sticky?n(Ya,{attrs:{container:this.$el,offsetTop:this.offsetTop},on:{scroll:this.onSticktScroll}},[l]):l,n(ch,{attrs:{count:this.children.length,animated:a,duration:this.duration,swipeable:this.swipeable,currentIndex:this.currentIndex},on:{change:this.setCurrentIndex}},[this.slots()])])}});var kn=p("cascader"),hh=kn[0],Ot=kn[1],dh=kn[2];const fh=hh({props:{title:String,value:[Number,String],fieldNames:Object,placeholder:String,activeColor:String,options:{type:Array,default:function(){return[]}},closeable:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0}},data:function(){return{tabs:[],activeTab:0}},computed:{textKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.text)||"text"},valueKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.value)||"value"},childrenKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.children)||"children"}},watch:{options:{deep:!0,handler:"updateTabs"},value:function(t){var i=this;if(t||t===0){var n=this.tabs.map(function(r){var a;return(a=r.selectedOption)==null?void 0:a[i.valueKey]});if(n.indexOf(t)!==-1)return}this.updateTabs()}},created:function(){this.updateTabs()},methods:{getSelectedOptionsByValue:function(t,i){for(var n=0;n<t.length;n++){var r=t[n];if(r[this.valueKey]===i)return[r];if(r[this.childrenKey]){var a=this.getSelectedOptionsByValue(r[this.childrenKey],i);if(a)return[r].concat(a)}}},updateTabs:function(){var t=this;if(this.value||this.value===0){var i=this.getSelectedOptionsByValue(this.options,this.value);if(i){var n=this.options;this.tabs=i.map(function(r){var a={options:n,selectedOption:r},s=n.filter(function(o){return o[t.valueKey]===r[t.valueKey]});return s.length&&(n=s[0][t.childrenKey]),a}),n&&this.tabs.push({options:n,selectedOption:null}),this.$nextTick(function(){t.activeTab=t.tabs.length-1});return}}this.tabs=[{options:this.options,selectedOption:null}]},onSelect:function(t,i){var n=this;if(this.tabs[i].selectedOption=t,this.tabs.length>i+1&&(this.tabs=this.tabs.slice(0,i+1)),t[this.childrenKey]){var r={options:t[this.childrenKey],selectedOption:null};this.tabs[i+1]?this.$set(this.tabs,i+1,r):this.tabs.push(r),this.$nextTick(function(){n.activeTab++})}var a=this.tabs.map(function(o){return o.selectedOption}).filter(function(o){return!!o}),s={value:t[this.valueKey],tabIndex:i,selectedOptions:a};this.$emit("input",t[this.valueKey]),this.$emit("change",s),t[this.childrenKey]||this.$emit("finish",s)},onClose:function(){this.$emit("close")},renderHeader:function(){var t=this.$createElement;if(this.showHeader)return t("div",{class:Ot("header")},[t("h2",{class:Ot("title")},[this.slots("title")||this.title]),this.closeable?t(w,{attrs:{name:"cross"},class:Ot("close-icon"),on:{click:this.onClose}}):null])},renderOptions:function(t,i,n){var r=this,a=this.$createElement,s=function(l){var c=i&&l[r.valueKey]===i[r.valueKey],u=r.slots("option",{option:l,selected:c})||a("span",[l[r.textKey]]);return a("li",{class:Ot("option",{selected:c}),style:{color:c?r.activeColor:null},on:{click:function(){r.onSelect(l,n)}}},[u,c?a(w,{attrs:{name:"success"},class:Ot("selected-icon")}):null])};return a("ul",{class:Ot("options")},[t.map(s)])},renderTab:function(t,i){var n=this.$createElement,r=t.options,a=t.selectedOption,s=a?a[this.textKey]:this.placeholder||dh("select");return n(ii,{attrs:{title:s,titleClass:Ot("tab",{unselected:!a})}},[this.renderOptions(r,a,i)])},renderTabs:function(){var t=this,i=this.$createElement;return i(Sn,{attrs:{animated:!0,swipeable:!0,swipeThreshold:0,color:this.activeColor},class:Ot("tabs"),model:{value:t.activeTab,callback:function(r){t.activeTab=r}}},[this.tabs.map(this.renderTab)])}},render:function(){var t=arguments[0];return t("div",{class:Ot()},[this.renderHeader(),this.renderTabs()])}});var Ja=p("cell-group"),ph=Ja[0],Qa=Ja[1];function ts(e,t,i,n){var r,a=e("div",T([{class:[Qa({inset:t.inset}),(r={},r[Ue]=t.border,r)]},B(n,!0)]),[i.default==null?void 0:i.default()]);return t.title||i.title?e("div",{key:n.data.key},[e("div",{class:Qa("title",{inset:t.inset})},[i.title?i.title():t.title]),a]):a}ts.props={title:String,inset:Boolean,border:{type:Boolean,default:!0}};const es=ph(ts);var is=p("checkbox"),vh=is[0],mh=is[1];const ns=vh({mixins:[Pa({bem:mh,role:"checkbox",parent:"vanCheckbox"})],computed:{checked:{get:function(){return this.parent?this.parent.value.indexOf(this.name)!==-1: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 i=this;t===void 0&&(t=!this.checked),clearTimeout(this.toggleTask),this.toggleTask=setTimeout(function(){i.checked=t})},setParentValue:function(t){var i=this.parent,n=i.value.slice();if(t){if(i.max&&n.length>=i.max)return;n.indexOf(this.name)===-1&&(n.push(this.name),i.$emit("input",n))}else{var r=n.indexOf(this.name);r!==-1&&(n.splice(r,1),i.$emit("input",n))}}}});var rs=p("checkbox-group"),gh=rs[0],yh=rs[1];const bh=gh({mixins:[G("vanCheckbox"),Lt],props:{max:[Number,String],disabled:Boolean,direction:String,iconSize:[Number,String],checkedColor:String,value:{type:Array,default:function(){return[]}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggleAll:function(t){t===void 0&&(t={}),typeof t=="boolean"&&(t={checked:t});var i=t,n=i.checked,r=i.skipDisabled,a=this.children.filter(function(o){return o.disabled&&r?o.checked:n??!o.checked}),s=a.map(function(o){return o.name});this.$emit("input",s)}},render:function(){var t=arguments[0];return t("div",{class:yh([this.direction])},[this.slots()])}});var as=p("circle"),Sh=as[0],ri=as[1],ss=3140,kh=0;function os(e){return Math.min(Math.max(e,0),100)}function Ch(e,t){var i=e?1:0;return"M "+t/2+" "+t/2+" m 0, -500 a 500, 500 0 1, "+i+" 0, 1000 a 500, 500 0 1, "+i+" 0, -1000"}const $h=Sh({props:{text:String,size:[Number,String],color:[String,Object],layerColor:String,strokeLinecap:String,value:{type:Number,default:0},speed:{type:[Number,String],default:0},fill:{type:String,default:"none"},rate:{type:[Number,String],default:100},strokeWidth:{type:[Number,String],default:40},clockwise:{type:Boolean,default:!0}},beforeCreate:function(){this.uid="van-circle-gradient-"+kh++},computed:{style:function(){var t=P(this.size);return{width:t,height:t}},path:function(){return Ch(this.clockwise,this.viewBoxSize)},viewBoxSize:function(){return+this.strokeWidth+1e3},layerStyle:function(){return{fill:""+this.fill,stroke:""+this.layerColor,strokeWidth:this.strokeWidth+"px"}},hoverStyle:function(){var t=ss*this.value/100;return{stroke:""+(this.gradient?"url(#"+this.uid+")":this.color),strokeWidth:+this.strokeWidth+1+"px",strokeLinecap:this.strokeLinecap,strokeDasharray:t+"px "+ss+"px"}},gradient:function(){return ct(this.color)},LinearGradient:function(){var t=this,i=this.$createElement;if(this.gradient){var n=Object.keys(this.color).sort(function(r,a){return parseFloat(r)-parseFloat(a)}).map(function(r,a){return i("stop",{key:a,attrs:{offset:r,"stop-color":t.color[r]}})});return i("defs",[i("linearGradient",{attrs:{id:this.uid,x1:"100%",y1:"0%",x2:"0%",y2:"0%"}},[n])])}}},watch:{rate:{handler:function(t){this.startTime=Date.now(),this.startRate=this.value,this.endRate=os(t),this.increase=this.endRate>this.startRate,this.duration=Math.abs((this.startRate-this.endRate)*1e3/this.speed),this.speed?(Ra(this.rafId),this.rafId=at(this.animate)):this.$emit("input",this.endRate)},immediate:!0}},methods:{animate:function(){var t=Date.now(),i=Math.min((t-this.startTime)/this.duration,1),n=i*(this.endRate-this.startRate)+this.startRate;this.$emit("input",os(parseFloat(n.toFixed(1)))),(this.increase?n<this.endRate:n>this.endRate)&&(this.rafId=at(this.animate))}},render:function(){var t=arguments[0];return t("div",{class:ri(),style:this.style},[t("svg",{attrs:{viewBox:"0 0 "+this.viewBoxSize+" "+this.viewBoxSize}},[this.LinearGradient,t("path",{class:ri("layer"),style:this.layerStyle,attrs:{d:this.path}}),t("path",{attrs:{d:this.path},class:ri("hover"),style:this.hoverStyle})]),this.slots()||this.text&&t("div",{class:ri("text")},[this.text])])}});var ls=p("col"),wh=ls[0],xh=ls[1];const Th=wh({mixins:[X("vanRow")],props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{style:function(){var t=this.index,i=this.parent||{},n=i.spaces;if(n&&n[t]){var r=n[t],a=r.left,s=r.right;return{paddingLeft:a?a+"px":null,paddingRight:s?s+"px":null}}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,i=arguments[0],n=this.span,r=this.offset;return i(this.tag,{style:this.style,class:xh((t={},t[n]=n,t["offset-"+r]=r,t)),on:{click:this.onClick}},[this.slots()])}});var cs=p("collapse"),_h=cs[0],Ih=cs[1];const Oh=_h({mixins:[G("vanCollapse")],props:{accordion:Boolean,value:[String,Number,Array],border:{type:Boolean,default:!0}},methods:{switch:function(t,i){this.accordion||(t=i?this.value.concat(t):this.value.filter(function(n){return n!==t})),this.$emit("change",t),this.$emit("input",t)}},render:function(){var t,i=arguments[0];return i("div",{class:[Ih(),(t={},t[Ue]=this.border,t)]},[this.slots()])}});var us=p("collapse-item"),Ph=us[0],ai=us[1],Bh=["title","icon","right-icon"];const Eh=Ph({mixins:[X("vanCollapse")],props:m({},tn,{name:[Number,String],disabled:Boolean,lazyRender:{type:Boolean,default:!0},isLink:{type:Boolean,default:!0}}),data:function(){return{show:null,inited:null}},computed:{currentName:function(){var t;return(t=this.name)!=null?t:this.index},expanded:function(){var t=this;if(!this.parent)return null;var i=this.parent,n=i.value,r=i.accordion;if(process.env.NODE_ENV==="development"&&!r&&!Array.isArray(n)){console.error('[Vant] Collapse: type of prop "value" should be Array');return}return r?n===this.currentName:n.some(function(a){return a===t.currentName})}},created:function(){this.show=this.expanded,this.inited=this.expanded},watch:{expanded:function(t,i){var n=this;if(i!==null){t&&(this.show=!0,this.inited=!0);var r=t?this.$nextTick:at;r(function(){var a=n.$refs,s=a.content,o=a.wrapper;if(!(!s||!o)){var l=s.offsetHeight;if(l){var c=l+"px";o.style.height=t?0:c,Xt(function(){o.style.height=t?c:0})}else n.onTransitionEnd()}})}}},methods:{onClick:function(){this.disabled||this.toggle()},toggle:function(t){t===void 0&&(t=!this.expanded);var i=this.parent,n=this.currentName,r=i.accordion&&n===i.value,a=r?"":n;this.parent.switch(a,t)},onTransitionEnd:function(){this.expanded?this.$refs.wrapper.style.height="":this.show=!1},genTitle:function(){var t=this,i=this.$createElement,n=this.border,r=this.disabled,a=this.expanded,s=Bh.reduce(function(o,l){return t.slots(l)&&(o[l]=function(){return t.slots(l)}),o},{});return this.slots("value")&&(s.default=function(){return t.slots("value")}),i(q,{attrs:{role:"button",tabindex:r?-1:0,"aria-expanded":String(a)},class:ai("title",{disabled:r,expanded:a,borderless:!n}),on:{click:this.onClick},scopedSlots:s,props:m({},this.$props)})},genContent:function(){var t=this.$createElement;if(this.inited||!this.lazyRender)return t("div",{directives:[{name:"show",value:this.show}],ref:"wrapper",class:ai("wrapper"),on:{transitionend:this.onTransitionEnd}},[t("div",{ref:"content",class:ai("content")},[this.slots()])])}},render:function(){var t=arguments[0];return t("div",{class:[ai({border:this.index&&this.border})]},[this.genTitle(),this.genContent()])}});var Cn=p("contact-card"),Dh=Cn[0],hs=Cn[1],$n=Cn[2];function ds(e,t,i,n){var r=t.type,a=t.editable;function s(l){a&&I(n,"click",l)}function o(){return r==="add"?t.addText||$n("addText"):[e("div",[$n("name")+":"+t.name]),e("div",[$n("tel")+":"+t.tel])]}return e(q,T([{attrs:{center:!0,border:!1,isLink:a,valueClass:hs("value"),icon:r==="edit"?"contact":"add-square"},class:hs([r]),on:{click:s}},B(n)]),[o()])}ds.props={tel:String,name:String,addText:String,editable:{type:Boolean,default:!0},type:{type:String,default:"add"}};const Nh=Dh(ds);var wn=p("contact-edit"),Mh=wn[0],si=wn[1],Pt=wn[2],xn={tel:"",name:""};const Lh=Mh({props:{isEdit:Boolean,isSaving:Boolean,isDeleting:Boolean,showSetDefault:Boolean,setDefaultLabel:String,contactInfo:{type:Object,default:function(){return m({},xn)}},telValidator:{type:Function,default:Kr}},data:function(){return{data:m({},xn,this.contactInfo),errorInfo:{name:"",tel:""}}},watch:{contactInfo:function(t){this.data=m({},xn,t)}},methods:{onFocus:function(t){this.errorInfo[t]=""},getErrorMessageByKey:function(t){var i=this.data[t].trim();switch(t){case"name":return i?"":Pt("nameInvalid");case"tel":return this.telValidator(i)?"":Pt("telInvalid")}},onSave:function(){var t=this,i=["name","tel"].every(function(n){var r=t.getErrorMessageByKey(n);return r&&(t.errorInfo[n]=r),!r});i&&!this.isSaving&&this.$emit("save",this.data)},onDelete:function(){var t=this;D.confirm({title:Pt("confirmDelete")}).then(function(){t.$emit("delete",t.data)})}},render:function(){var t=this,i=arguments[0],n=this.data,r=this.errorInfo,a=function(o){return function(){return t.onFocus(o)}};return i("div",{class:si()},[i("div",{class:si("fields")},[i(rt,{attrs:{clearable:!0,maxlength:"30",label:Pt("name"),placeholder:Pt("nameEmpty"),errorMessage:r.name},on:{focus:a("name")},model:{value:n.name,callback:function(o){t.$set(n,"name",o)}}}),i(rt,{attrs:{clearable:!0,type:"tel",label:Pt("tel"),placeholder:Pt("telEmpty"),errorMessage:r.tel},on:{focus:a("tel")},model:{value:n.tel,callback:function(o){t.$set(n,"tel",o)}}})]),this.showSetDefault&&i(q,{attrs:{title:this.setDefaultLabel,border:!1},class:si("switch-cell")},[i(Je,{attrs:{size:24},slot:"right-icon",on:{change:function(o){t.$emit("change-default",o)}},model:{value:n.isDefault,callback:function(o){t.$set(n,"isDefault",o)}}})]),i("div",{class:si("buttons")},[i(F,{attrs:{block:!0,round:!0,type:"danger",text:Pt("save"),loading:this.isSaving},on:{click:this.onSave}}),this.isEdit&&i(F,{attrs:{block:!0,round:!0,text:Pt("delete"),loading:this.isDeleting},on:{click:this.onDelete}})])])}});var Tn=p("contact-list"),Ah=Tn[0],Rt=Tn[1],Rh=Tn[2];function fs(e,t,i,n){var r=t.list&&t.list.map(function(a,s){function o(){I(n,"input",a.id),I(n,"select",a,s)}function l(){return e(un,{attrs:{name:a.id,iconSize:16,checkedColor:Yr},on:{click:o}})}function c(){return e(w,{attrs:{name:"edit"},class:Rt("edit"),on:{click:function(d){d.stopPropagation(),I(n,"edit",a,s)}}})}function u(){var h=[a.name+","+a.tel];return a.isDefault&&t.defaultTagText&&h.push(e(ti,{attrs:{type:"danger",round:!0},class:Rt("item-tag")},[t.defaultTagText])),h}return e(q,{key:a.id,attrs:{isLink:!0,center:!0,valueClass:Rt("item-value")},class:Rt("item"),scopedSlots:{icon:c,default:u,"right-icon":l},on:{click:o}})});return e("div",T([{class:Rt()},B(n)]),[e(cn,{attrs:{value:t.value},class:Rt("group")},[r]),e("div",{class:Rt("bottom")},[e(F,{attrs:{round:!0,block:!0,type:"danger",text:t.addText||Rh("addText")},class:Rt("add"),on:{click:function(){I(n,"add")}}})])])}fs.props={value:null,list:Array,addText:String,defaultTagText:String};const Vh=Ah(fs);var _n=1e3,In=60*_n,On=60*In,ps=24*On;function zh(e){var t=Math.floor(e/ps),i=Math.floor(e%ps/On),n=Math.floor(e%On/In),r=Math.floor(e%In/_n),a=Math.floor(e%_n);return{days:t,hours:i,minutes:n,seconds:r,milliseconds:a}}function Fh(e,t){var i=t.days,n=t.hours,r=t.minutes,a=t.seconds,s=t.milliseconds;if(e.indexOf("DD")===-1?n+=i*24:e=e.replace("DD",N(i)),e.indexOf("HH")===-1?r+=n*60:e=e.replace("HH",N(n)),e.indexOf("mm")===-1?a+=r*60:e=e.replace("mm",N(r)),e.indexOf("ss")===-1?s+=a*1e3:e=e.replace("ss",N(a)),e.indexOf("S")!==-1){var o=N(s,3);e.indexOf("SSS")!==-1?e=e.replace("SSS",o):e.indexOf("SS")!==-1?e=e.replace("SS",o.slice(0,2)):e=e.replace("S",o.charAt(0))}return e}function Hh(e,t){return Math.floor(e/1e3)===Math.floor(t/1e3)}var vs=p("count-down"),jh=vs[0],Wh=vs[1];const Uh=jh({props:{millisecond:Boolean,time:{type:[Number,String],default:0},format:{type:String,default:"HH:mm:ss"},autoStart:{type:Boolean,default:!0}},data:function(){return{remain:0}},computed:{timeData:function(){return zh(this.remain)},formattedTime:function(){return Fh(this.format,this.timeData)}},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,Ra(this.rafId)},reset:function(){this.pause(),this.remain=+this.time,this.autoStart&&this.start()},tick:function(){Ae&&(this.millisecond?this.microTick():this.macroTick())},microTick:function(){var t=this;this.rafId=at(function(){t.counting&&(t.setRemain(t.getRemain()),t.remain>0&&t.microTick())})},macroTick:function(){var t=this;this.rafId=at(function(){if(t.counting){var i=t.getRemain();(!Hh(i,t.remain)||i===0)&&t.setRemain(i),t.remain>0&&t.macroTick()}})},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},setRemain:function(t){this.remain=t,this.$emit("change",this.timeData),t===0&&(this.pause(),this.$emit("finish"))}},render:function(){var t=arguments[0];return t("div",{class:Wh()},[this.slots("default",this.timeData)||this.formattedTime])}});var Pn=p("coupon"),qh=Pn[0],Ct=Pn[1],Bn=Pn[2];function Kh(e){return e<Math.pow(10,12)?e*1e3:+e}function ms(e){var t=new Date(Kh(e));return t.getFullYear()+"."+N(t.getMonth()+1)+"."+N(t.getDate())}function Yh(e){return(e/10).toFixed(e%10===0?0:1)}function gs(e){return(e/100).toFixed(e%100===0?0:e%10===0?1:2)}const En=qh({props:{coupon:Object,chosen:Boolean,disabled:Boolean,currency:{type:String,default:"¥"}},computed:{validPeriod:function(){var t=this.coupon,i=t.startAt,n=t.endAt,r=t.customValidPeriod;return r||ms(i)+" - "+ms(n)},faceAmount:function(){var t=this.coupon;if(t.valueDesc)return t.valueDesc+"<span>"+(t.unitDesc||"")+"</span>";if(t.denominations){var i=gs(t.denominations);return"<span>"+this.currency+"</span> "+i}return t.discount?Bn("discount",Yh(t.discount)):""},conditionMessage:function(){var t=gs(this.coupon.originCondition);return t==="0"?Bn("unlimited"):Bn("condition",t)}},render:function(){var t=arguments[0],i=this.coupon,n=this.disabled,r=n&&i.reason||i.description;return t("div",{class:Ct({disabled:n})},[t("div",{class:Ct("content")},[t("div",{class:Ct("head")},[t("h2",{class:Ct("amount"),domProps:{innerHTML:this.faceAmount}}),t("p",{class:Ct("condition")},[this.coupon.condition||this.conditionMessage])]),t("div",{class:Ct("body")},[t("p",{class:Ct("name")},[i.name]),t("p",{class:Ct("valid")},[this.validPeriod]),!this.disabled&&t(ns,{attrs:{size:18,value:this.chosen,checkedColor:Yr},class:Ct("corner")})])]),r&&t("p",{class:Ct("description")},[r])])}});var Dn=p("coupon-cell"),Xh=Dn[0],ys=Dn[1],Nn=Dn[2];function Gh(e){var t=e.coupons,i=e.chosenCoupon,n=e.currency,r=t[+i];if(r){var a=0;return _(r.value)?a=r.value:_(r.denominations)&&(a=r.denominations),"-"+n+" "+(a/100).toFixed(2)}return t.length===0?Nn("tips"):Nn("count",t.length)}function Mn(e,t,i,n){var r=t.coupons[+t.chosenCoupon],a=Gh(t);return e(q,T([{class:ys(),attrs:{value:a,title:t.title||Nn("title"),border:t.border,isLink:t.editable,valueClass:ys("value",{selected:r})}},B(n,!0)]))}Mn.model={prop:"chosenCoupon"},Mn.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,String],default:-1}};const Zh=Xh(Mn);var Ln=p("coupon-list"),Jh=Ln[0],$t=Ln[1],le=Ln[2],Qh="https://img01.yzcdn.cn/vant/coupon-empty.png";const td=Jh({model:{prop:"code"},props:{code:String,closeButtonText:String,inputPlaceholder:String,enabledTitle:String,disabledTitle:String,exchangeButtonText:String,exchangeButtonLoading:Boolean,exchangeButtonDisabled:Boolean,exchangeMinLength:{type:Number,default:1},chosenCoupon:{type:Number,default:-1},coupons:{type:Array,default:function(){return[]}},disabledCoupons:{type:Array,default:function(){return[]}},displayedCouponIndex:{type:Number,default:-1},showExchangeBar:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showCount:{type:Boolean,default:!0},currency:{type:String,default:"¥"},emptyImage:{type:String,default:Qh}},data:function(){return{tab:0,winHeight:window.innerHeight,currentCode:this.code||""}},computed:{buttonDisabled:function(){return!this.exchangeButtonLoading&&(this.exchangeButtonDisabled||!this.currentCode||this.currentCode.length<this.exchangeMinLength)},listStyle:function(){return{height:this.winHeight-(this.showExchangeBar?140:94)+"px"}}},watch:{code:function(t){this.currentCode=t},currentCode:function(t){this.$emit("input",t)},displayedCouponIndex:"scrollToShowCoupon"},mounted:function(){this.scrollToShowCoupon(this.displayedCouponIndex)},methods:{onClickExchangeButton:function(){this.$emit("exchange",this.currentCode),this.code||(this.currentCode="")},scrollToShowCoupon:function(t){var i=this;t!==-1&&this.$nextTick(function(){var n=i.$refs,r=n.card,a=n.list;a&&r&&r[t]&&(a.scrollTop=r[t].$el.offsetTop-100)})},genEmpty:function(){var t=this.$createElement;return t("div",{class:$t("empty")},[t("img",{attrs:{src:this.emptyImage}}),t("p",[le("empty")])])},genExchangeButton:function(){var t=this.$createElement;return t(F,{attrs:{plain:!0,type:"danger",text:this.exchangeButtonText||le("exchange"),loading:this.exchangeButtonLoading,disabled:this.buttonDisabled},class:$t("exchange"),on:{click:this.onClickExchangeButton}})}},render:function(){var t=this,i=arguments[0],n=this.coupons,r=this.disabledCoupons,a=this.showCount?" ("+n.length+")":"",s=(this.enabledTitle||le("enable"))+a,o=this.showCount?" ("+r.length+")":"",l=(this.disabledTitle||le("disabled"))+o,c=this.showExchangeBar&&i("div",{class:$t("exchange-bar")},[i(rt,{attrs:{clearable:!0,border:!1,placeholder:this.inputPlaceholder||le("placeholder"),maxlength:"20"},class:$t("field"),model:{value:t.currentCode,callback:function(v){t.currentCode=v}}}),this.genExchangeButton()]),u=function(v){return function(){return t.$emit("change",v)}},h=i(ii,{attrs:{title:s}},[i("div",{class:$t("list",{"with-bottom":this.showCloseButton}),style:this.listStyle},[n.map(function(f,v){return i(En,{ref:"card",key:f.id,attrs:{coupon:f,currency:t.currency,chosen:v===t.chosenCoupon},nativeOn:{click:u(v)}})}),!n.length&&this.genEmpty(),this.slots("list-footer")])]),d=i(ii,{attrs:{title:l}},[i("div",{class:$t("list",{"with-bottom":this.showCloseButton}),style:this.listStyle},[r.map(function(f){return i(En,{attrs:{disabled:!0,coupon:f,currency:t.currency},key:f.id})}),!r.length&&this.genEmpty(),this.slots("disabled-list-footer")])]);return i("div",{class:$t()},[c,i(Sn,{class:$t("tab"),attrs:{border:!1},model:{value:t.tab,callback:function(v){t.tab=v}}},[h,d]),i("div",{class:$t("bottom")},[i(F,{directives:[{name:"show",value:this.showCloseButton}],attrs:{round:!0,type:"danger",block:!0,text:this.closeButtonText||le("close")},class:$t("close"),on:{click:u(-1)}})])])}});var bs=m({},We,{value:null,filter:Function,columnsOrder:Array,showToolbar:{type:Boolean,default:!0},formatter:{type:Function,default:function(t,i){return i}}}),Ss={data:function(){return{innerValue:this.formatValue(this.value)}},computed:{originColumns:function(){var t=this;return this.ranges.map(function(i){var n=i.type,r=i.range,a=ju(r[1]-r[0]+1,function(s){var o=N(r[0]+s);return o});return t.filter&&(a=t.filter(n,a)),{type:n,values:a}})},columns:function(){var t=this;return this.originColumns.map(function(i){return{values:i.values.map(function(n){return t.formatter(i.type,n)})}})}},watch:{columns:"updateColumnValue",innerValue:function(t,i){i?this.$emit("input",t):this.$emit("input",null)}},mounted:function(){var t=this;this.updateColumnValue(),this.$nextTick(function(){t.updateInnerValue()})},methods:{getPicker:function(){return this.$refs.picker},getProxiedPicker:function(){var t=this,i=this.$refs.picker;if(i){var n=function(a){return function(){i[a].apply(i,arguments),t.updateInnerValue()}};return m({},i,{setValues:n("setValues"),setIndexes:n("setIndexes"),setColumnIndex:n("setColumnIndex"),setColumnValue:n("setColumnValue")})}},onConfirm:function(){this.$emit("input",this.innerValue),this.$emit("confirm",this.innerValue)},onCancel:function(){this.$emit("cancel")}},render:function(){var t=this,i=arguments[0],n={};return Object.keys(We).forEach(function(r){n[r]=t[r]}),i(Ji,{ref:"picker",attrs:{columns:this.columns,readonly:this.readonly},scopedSlots:this.$scopedSlots,on:{change:this.onChange,confirm:this.onConfirm,cancel:this.onCancel},props:m({},n)})}},ed=p("time-picker"),id=ed[0];const ks=id({mixins:[Ss],props:m({},bs,{minHour:{type:[Number,String],default:0},maxHour:{type:[Number,String],default:23},minMinute:{type:[Number,String],default:0},maxMinute:{type:[Number,String],default:59}}),computed:{ranges:function(){return[{type:"hour",range:[+this.minHour,+this.maxHour]},{type:"minute",range:[+this.minMinute,+this.maxMinute]}]}},watch:{filter:"updateInnerValue",minHour:function(){var t=this;this.$nextTick(function(){t.updateInnerValue()})},maxHour:function(t){var i=this.innerValue.split(":"),n=i[0],r=i[1];n>=t?(this.innerValue=this.formatValue(t+":"+r),this.updateColumnValue()):this.updateInnerValue()},minMinute:"updateInnerValue",maxMinute:function(t){var i=this.innerValue.split(":"),n=i[0],r=i[1];r>=t?(this.innerValue=this.formatValue(n+":"+t),this.updateColumnValue()):this.updateInnerValue()},value:function(t){t=this.formatValue(t),t!==this.innerValue&&(this.innerValue=t,this.updateColumnValue())}},methods:{formatValue:function(t){t||(t=N(this.minHour)+":"+N(this.minMinute));var i=t.split(":"),n=i[0],r=i[1];return n=N(W(n,this.minHour,this.maxHour)),r=N(W(r,this.minMinute,this.maxMinute)),n+":"+r},updateInnerValue:function(){var t=this.getPicker().getIndexes(),i=t[0],n=t[1],r=this.originColumns,a=r[0],s=r[1],o=a.values[i]||a.values[0],l=s.values[n]||s.values[0];this.innerValue=this.formatValue(o+":"+l),this.updateColumnValue()},onChange:function(t){var i=this;this.updateInnerValue(),this.$nextTick(function(){i.$nextTick(function(){i.updateInnerValue(),i.$emit("change",t)})})},updateColumnValue:function(){var t=this,i=this.formatter,n=this.innerValue.split(":"),r=[i("hour",n[0]),i("minute",n[1])];this.$nextTick(function(){t.getPicker().setValues(r)})}}});function Cs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cs=function(){return!!e})()}function An(e,t){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},An(e,t)}function $s(e,t,i){if(Cs())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&An(r,i.prototype),r}var ws=new Date().getFullYear(),nd=p("date-picker"),rd=nd[0];const xs=rd({mixins:[Ss],props:m({},bs,{type:{type:String,default:"datetime"},minDate:{type:Date,default:function(){return new Date(ws-10,0,1)},validator:Se},maxDate:{type:Date,default:function(){return new Date(ws+10,11,31)},validator:Se}}),watch:{filter:"updateInnerValue",minDate:function(){var t=this;this.$nextTick(function(){t.updateInnerValue()})},maxDate:function(t){this.innerValue.valueOf()>=t.valueOf()?this.innerValue=t:this.updateInnerValue()},value:function(t){t=this.formatValue(t),t&&t.valueOf()!==this.innerValue.valueOf()&&(this.innerValue=t)}},computed:{ranges:function(){var t=this.getBoundary("max",this.innerValue?this.innerValue:this.minDate),i=t.maxYear,n=t.maxDate,r=t.maxMonth,a=t.maxHour,s=t.maxMinute,o=this.getBoundary("min",this.innerValue?this.innerValue:this.minDate),l=o.minYear,c=o.minDate,u=o.minMonth,h=o.minHour,d=o.minMinute,f=[{type:"year",range:[l,i]},{type:"month",range:[u,r]},{type:"day",range:[c,n]},{type:"hour",range:[h,a]},{type:"minute",range:[d,s]}];switch(this.type){case"date":f=f.slice(0,3);break;case"year-month":f=f.slice(0,2);break;case"month-day":f=f.slice(1,3);break;case"datehour":f=f.slice(0,4);break}if(this.columnsOrder){var v=this.columnsOrder.concat(f.map(function(g){return g.type}));f.sort(function(g,y){return v.indexOf(g.type)-v.indexOf(y.type)})}return f}},methods:{formatValue:function(t){var i=this;if(!Se(t))return null;var n=new Date(this.minDate),r=new Date(this.maxDate),a={year:"getFullYear",month:"getMonth",day:"getDate",hour:"getHours",minute:"getMinutes"};if(this.originColumns){var s=this.originColumns.map(function(c,u){var h=c.type,d=c.values,f=i.ranges[u].range,v=n[a[h]](),g=r[a[h]](),y=h==="month"?+d[0]-1:+d[0],b=h==="month"?+d[d.length-1]-1:+d[d.length-1];return{type:h,values:[v<f[0]?Math.max(v,y):y||v,g>f[1]?Math.min(g,b):b||g]}});if(this.type==="month-day"){var o=(this.innerValue||this.minDate).getFullYear();s.unshift({type:"year",values:[o,o]})}var l=Object.keys(a).map(function(c){var u;return(u=s.filter(function(h){return h.type===c})[0])==null?void 0:u.values}).filter(function(c){return c});n=$s(Date,l.map(function(c){return mn(c[0])})),r=$s(Date,l.map(function(c){return mn(c[1])}))}return t=Math.max(t,n.getTime()),t=Math.min(t,r.getTime()),new Date(t)},getBoundary:function(t,i){var n,r=this[t+"Date"],a=r.getFullYear(),s=1,o=1,l=0,c=0;return t==="max"&&(s=12,o=gn(i.getFullYear(),i.getMonth()+1),l=23,c=59),i.getFullYear()===a&&(s=r.getMonth()+1,i.getMonth()+1===s&&(o=r.getDate(),i.getDate()===o&&(l=r.getHours(),i.getHours()===l&&(c=r.getMinutes())))),n={},n[t+"Year"]=a,n[t+"Month"]=s,n[t+"Date"]=o,n[t+"Hour"]=l,n[t+"Minute"]=c,n},updateInnerValue:function(){var t=this,i=this.type,n=this.getPicker().getIndexes(),r=function(f){var v=0;t.originColumns.forEach(function(y,b){f===y.type&&(v=b)});var g=t.originColumns[v].values;return mn(g[n[v]])},a,s,o;i==="month-day"?(a=(this.innerValue||this.minDate).getFullYear(),s=r("month"),o=r("day")):(a=r("year"),s=r("month"),o=i==="year-month"?1:r("day"));var l=gn(a,s);o=o>l?l:o;var c=0,u=0;i==="datehour"&&(c=r("hour")),i==="datetime"&&(c=r("hour"),u=r("minute"));var h=new Date(a,s-1,o,c,u);this.innerValue=this.formatValue(h)},onChange:function(t){var i=this;this.updateInnerValue(),this.$nextTick(function(){i.$nextTick(function(){i.updateInnerValue(),i.$emit("change",t)})})},updateColumnValue:function(){var t=this,i=this.innerValue?this.innerValue:this.minDate,n=this.formatter,r=this.originColumns.map(function(a){switch(a.type){case"year":return n("year",""+i.getFullYear());case"month":return n("month",N(i.getMonth()+1));case"day":return n("day",N(i.getDate()));case"hour":return n("hour",N(i.getHours()));case"minute":return n("minute",N(i.getMinutes()));default:return null}});this.$nextTick(function(){t.getPicker().setValues(r)})}}});var Ts=p("datetime-picker"),ad=Ts[0],sd=Ts[1];const _s=ad({props:m({},ks.props,xs.props),methods:{getPicker:function(){return this.$refs.root.getProxiedPicker()}},render:function(){var t=arguments[0],i=this.type==="time"?ks:xs;return t(i,{ref:"root",class:sd(),scopedSlots:this.$scopedSlots,props:m({},this.$props),on:m({},this.$listeners)})}});var Is=p("divider"),od=Is[0],ld=Is[1];function Os(e,t,i,n){var r;return e("div",T([{attrs:{role:"separator"},style:{borderColor:t.borderColor},class:ld((r={dashed:t.dashed,hairline:t.hairline},r["content-"+t.contentPosition]=i.default,r))},B(n,!0)]),[i.default&&i.default()])}Os.props={dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center"}};const Ps=od(Os);var Bs=p("dropdown-item"),cd=Bs[0],oi=Bs[1];const ud=cd({mixins:[Ui({ref:"wrapper"}),X("vanDropdownMenu")],props:{value:null,title:String,disabled:Boolean,titleClass:String,options:{type:Array,default:function(){return[]}},lazyRender:{type:Boolean,default:!0}},data:function(){return{transition:!0,showPopup:!1,showWrapper:!1}},computed:{displayTitle:function(){var t=this;if(this.title)return this.title;var i=this.options.filter(function(n){return n.value===t.value});return i.length?i[0].text:""}},watch:{showPopup:function(t){this.bindScroll(t)}},beforeCreate:function(){var t=this,i=function(r){return function(){return t.$emit(r)}};this.onOpen=i("open"),this.onClose=i("close"),this.onOpened=i("opened")},methods:{toggle:function(t,i){t===void 0&&(t=!this.showPopup),i===void 0&&(i={}),t!==this.showPopup&&(this.transition=!i.immediate,this.showPopup=t,t&&(this.parent.updateOffset(),this.showWrapper=!0))},bindScroll:function(t){var i=this.parent.scroller,n=t?it:Nt;n(i,"scroll",this.onScroll,!0)},onScroll:function(){this.parent.updateOffset()},onClickWrapper:function(t){this.getContainer&&t.stopPropagation()}},render:function(){var t=this,i=arguments[0],n=this.parent,r=n.zIndex,a=n.offset,s=n.overlay,o=n.duration,l=n.direction,c=n.activeColor,u=n.closeOnClickOverlay,h=this.options.map(function(f){var v=f.value===t.value;return i(q,{attrs:{clickable:!0,icon:f.icon,title:f.text},key:f.value,class:oi("option",{active:v}),style:{color:v?c:""},on:{click:function(){t.showPopup=!1,f.value!==t.value&&(t.$emit("input",f.value),t.$emit("change",f.value))}}},[v&&i(w,{class:oi("icon"),attrs:{color:c,name:"success"}})])}),d={zIndex:r};return l==="down"?d.top=a+"px":d.bottom=a+"px",i("div",[i("div",{directives:[{name:"show",value:this.showWrapper}],ref:"wrapper",style:d,class:oi([l]),on:{click:this.onClickWrapper}},[i(St,{attrs:{overlay:s,position:l==="down"?"top":"bottom",duration:this.transition?o:0,lazyRender:this.lazyRender,overlayStyle:{position:"absolute"},closeOnClickOverlay:u},class:oi("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(v){t.showPopup=v}}},[h,this.slots("default")])])])}});var Rn=function(t){return{props:{closeOnClickOutside:{type:Boolean,default:!0}},data:function(){var n=this,r=function(s){n.closeOnClickOutside&&!n.$el.contains(s.target)&&n[t.method]()};return{clickOutsideHandler:r}},mounted:function(){it(document,t.event,this.clickOutsideHandler)},beforeDestroy:function(){Nt(document,t.event,this.clickOutsideHandler)}}},Es=p("dropdown-menu"),hd=Es[0],li=Es[1];const dd=hd({mixins:[G("vanDropdownMenu"),Rn({event:"click",method:"onClickOutside"})],props:{zIndex:[Number,String],activeColor:String,overlay:{type:Boolean,default:!0},duration:{type:[Number,String],default:.2},direction:{type:String,default:"down"},closeOnClickOverlay:{type:Boolean,default:!0}},data:function(){return{offset:0}},computed:{scroller:function(){return Ut(this.$el)},opened:function(){return this.children.some(function(t){return t.showWrapper})},barStyle:function(){if(this.opened&&_(this.zIndex))return{zIndex:1+this.zIndex}}},methods:{updateOffset:function(){if(this.$refs.bar){var t=this.$refs.bar.getBoundingClientRect();this.direction==="down"?this.offset=t.bottom:this.offset=window.innerHeight-t.top}},toggleItem:function(t){this.children.forEach(function(i,n){n===t?i.toggle():i.showPopup&&i.toggle(!1,{immediate:!0})})},onClickOutside:function(){this.children.forEach(function(t){t.toggle(!1)})}},render:function(){var t=this,i=arguments[0],n=this.children.map(function(r,a){return i("div",{attrs:{role:"button",tabindex:r.disabled?-1:0},class:li("item",{disabled:r.disabled}),on:{click:function(){r.disabled||t.toggleItem(a)}}},[i("span",{class:[li("title",{active:r.showPopup,down:r.showPopup===(t.direction==="down")}),r.titleClass],style:{color:r.showPopup?t.activeColor:""}},[i("div",{class:"van-ellipsis"},[r.slots("title")||r.displayTitle])])])});return i("div",{class:li()},[i("div",{ref:"bar",style:this.barStyle,class:li("bar",{opened:this.opened})},[n]),this.slots("default")])}});var H="van-empty-network-";const fd={render:function(){var t=arguments[0],i=function(r,a,s){return t("stop",{attrs:{"stop-color":r,offset:a+"%","stop-opacity":s}})};return t("svg",{attrs:{viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[t("linearGradient",{attrs:{id:H+"1",x1:"64.022%",y1:"100%",x2:"64.022%",y2:"0%"}},[i("#FFF",0,.5),i("#F2F3F5",100)]),t("linearGradient",{attrs:{id:H+"2",x1:"50%",y1:"0%",x2:"50%",y2:"84.459%"}},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),t("linearGradient",{attrs:{id:H+"3",x1:"100%",y1:"0%",x2:"100%",y2:"100%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"4",x1:"100%",y1:"100%",x2:"100%",y2:"0%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"5",x1:"0%",y1:"43.982%",x2:"100%",y2:"54.703%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"6",x1:"94.535%",y1:"43.837%",x2:"5.465%",y2:"54.948%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("radialGradient",{attrs:{id:H+"7",cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54835 0 .5 -.5)"}},[i("#EBEDF0",0),i("#FFF",100,0)])]),t("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[t("g",{attrs:{opacity:".8"}},[t("path",{attrs:{d:"M0 124V46h20v20h14v58H0z",fill:"url(#"+H+"1)",transform:"matrix(-1 0 0 1 36 7)"}}),t("path",{attrs:{d:"M121 8h22.231v14H152v77.37h-31V8z",fill:"url(#"+H+"1)",transform:"translate(2 7)"}})]),t("path",{attrs:{fill:"url(#"+H+"7)",d:"M0 139h160v21H0z"}}),t("path",{attrs:{d:"M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z",fill:"url(#"+H+"2)","fill-rule":"nonzero",transform:"translate(43 36)"}}),t("g",{attrs:{opacity:".6","stroke-linecap":"round","stroke-width":"7"}},[t("path",{attrs:{d:"M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+H+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+H+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+H+"4)",transform:"rotate(-180 76.483 42.257)"}}),t("path",{attrs:{d:"M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+H+"4)",transform:"rotate(-180 89.791 42.146)"}})]),t("g",{attrs:{transform:"translate(31 105)","fill-rule":"nonzero"}},[t("rect",{attrs:{fill:"url(#"+H+"5)",width:"98",height:"34",rx:"2"}}),t("rect",{attrs:{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.114"}}),t("rect",{attrs:{fill:"url(#"+H+"6)",x:"15",y:"12",width:"18",height:"6",rx:"1.114"}})])])])}};var Ds=p("empty"),pd=Ds[0],ci=Ds[1],vd=["error","search","default"];const md=pd({props:{imageSize:[Number,String],description:String,image:{type:String,default:"default"}},methods:{genImageContent:function(){var t=this.$createElement,i=this.slots("image");if(i)return i;if(this.image==="network")return t(fd);var n=this.image;return vd.indexOf(n)!==-1&&(n="https://img01.yzcdn.cn/vant/empty-image-"+n+".png"),t("img",{attrs:{src:n}})},genImage:function(){var t=this.$createElement,i={width:P(this.imageSize),height:P(this.imageSize)};return t("div",{class:ci("image"),style:i},[this.genImageContent()])},genDescription:function(){var t=this.$createElement,i=this.slots("description")||this.description;if(i)return t("p",{class:ci("description")},[i])},genBottom:function(){var t=this.$createElement,i=this.slots();if(i)return t("div",{class:ci("bottom")},[i])}},render:function(){var t=arguments[0];return t("div",{class:ci()},[this.genImage(),this.genDescription(),this.genBottom()])}});var Ns=p("form"),gd=Ns[0],yd=Ns[1];const bd=gd({props:{colon:Boolean,disabled:Boolean,readonly:Boolean,labelWidth:[Number,String],labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,errorMessageAlign:String,submitOnEnter:{type:Boolean,default:!0},validateTrigger:{type:String,default:"onBlur"},showError:{type:Boolean,default:!0},showErrorMessage:{type:Boolean,default:!0}},provide:function(){return{vanForm:this}},data:function(){return{fields:[]}},methods:{getFieldsByNames:function(t){return t?this.fields.filter(function(i){return t.indexOf(i.name)!==-1}):this.fields},validateSeq:function(t){var i=this;return new Promise(function(n,r){var a=[],s=i.getFieldsByNames(t);s.reduce(function(o,l){return o.then(function(){if(!a.length)return l.validate().then(function(c){c&&a.push(c)})})},Promise.resolve()).then(function(){a.length?r(a):n()})})},validateFields:function(t){var i=this;return new Promise(function(n,r){var a=i.getFieldsByNames(t);Promise.all(a.map(function(s){return s.validate()})).then(function(s){s=s.filter(function(o){return o}),s.length?r(s):n()})})},validate:function(t){return t&&!Array.isArray(t)?this.validateField(t):this.validateFirst?this.validateSeq(t):this.validateFields(t)},validateField:function(t){var i=this.fields.filter(function(n){return n.name===t});return i.length?new Promise(function(n,r){i[0].validate().then(function(a){a?r(a):n()})}):Promise.reject()},resetValidation:function(t){t&&!Array.isArray(t)&&(t=[t]);var i=this.getFieldsByNames(t);i.forEach(function(n){n.resetValidation()})},scrollToField:function(t,i){this.fields.some(function(n){return n.name===t?(n.$el.scrollIntoView(i),!0):!1})},addField:function(t){this.fields.push(t),ya(this.fields,this)},removeField:function(t){this.fields=this.fields.filter(function(i){return i!==t})},getValues:function(){return this.fields.reduce(function(t,i){return t[i.name]=i.formValue,t},{})},onSubmit:function(t){t.preventDefault(),this.submit()},submit:function(){var t=this,i=this.getValues();this.validate().then(function(){t.$emit("submit",i)}).catch(function(n){t.$emit("failed",{values:i,errors:n}),t.scrollToError&&t.scrollToField(n[0].name)})}},render:function(){var t=arguments[0];return t("form",{class:yd(),on:{submit:this.onSubmit}},[this.slots()])}});var Ms=p("goods-action-icon"),Sd=Ms[0],Vn=Ms[1];const kd=Sd({mixins:[X("vanGoodsAction")],props:m({},Mt,{dot:Boolean,text:String,icon:String,color:String,info:[Number,String],badge:[Number,String],iconClass:null}),methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)},genIcon:function(){var t,i=this.$createElement,n=this.slots("icon"),r=(t=this.badge)!=null?t:this.info;return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] GoodsActionIcon: "info" prop is deprecated, use "badge" prop instead.'),n?i("div",{class:Vn("icon")},[n,i(Kt,{attrs:{dot:this.dot,info:r}})]):i(w,{class:[Vn("icon"),this.iconClass],attrs:{tag:"div",dot:this.dot,name:this.icon,badge:r,color:this.color}})}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"button",tabindex:"0"},class:Vn(),on:{click:this.onClick}},[this.genIcon(),this.slots()||this.text])}});var Ls=p("grid"),Cd=Ls[0],$d=Ls[1];const wd=Cd({mixins:[G("vanGrid")],props:{square:Boolean,gutter:[Number,String],iconSize:[Number,String],direction:String,clickable:Boolean,columnNum:{type:[Number,String],default:4},center:{type:Boolean,default:!0},border:{type:Boolean,default:!0}},computed:{style:function(){var t=this.gutter;if(t)return{paddingLeft:P(t)}}},render:function(){var t,i=arguments[0];return i("div",{style:this.style,class:[$d(),(t={},t[qi]=this.border&&!this.gutter,t)]},[this.slots()])}});var As=p("grid-item"),xd=As[0],Ce=As[1];const Td=xd({mixins:[X("vanGrid")],props:m({},Mt,{dot:Boolean,text:String,icon:String,iconPrefix:String,info:[Number,String],badge:[Number,String]}),computed:{style:function(){var t=this.parent,i=t.square,n=t.gutter,r=t.columnNum,a=100/r+"%",s={flexBasis:a};if(i)s.paddingTop=a;else if(n){var o=P(n);s.paddingRight=o,this.index>=r&&(s.marginTop=o)}return s},contentStyle:function(){var t=this.parent,i=t.square,n=t.gutter;if(i&&n){var r=P(n);return{right:r,bottom:r,height:"auto"}}}},methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)},genIcon:function(){var t,i=this.$createElement,n=this.slots("icon"),r=(t=this.badge)!=null?t:this.info;if(process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] GridItem: "info" prop is deprecated, use "badge" prop instead.'),n)return i("div",{class:Ce("icon-wrapper")},[n,i(Kt,{attrs:{dot:this.dot,info:r}})]);if(this.icon)return i(w,{attrs:{name:this.icon,dot:this.dot,badge:r,size:this.parent.iconSize,classPrefix:this.iconPrefix},class:Ce("icon")})},getText:function(){var t=this.$createElement,i=this.slots("text");if(i)return i;if(this.text)return t("span",{class:Ce("text")},[this.text])},genContent:function(){var t=this.slots();return t||[this.genIcon(),this.getText()]}},render:function(){var t,i=arguments[0],n=this.parent,r=n.center,a=n.border,s=n.square,o=n.gutter,l=n.direction,c=n.clickable;return i("div",{class:[Ce({square:s})],style:this.style},[i("div",{style:this.contentStyle,attrs:{role:c?"button":null,tabindex:c?0:null},class:[Ce("content",[l,{center:r,square:s,clickable:c,surround:a&&o}]),(t={},t[ft]=a,t)],on:{click:this.onClick}},[this.genContent()])])}});var Rs=p("image-preview"),_d=Rs[0],Vt=Rs[1],Vs=p("swipe"),Id=Vs[0],ui=Vs[1];const zs=Id({mixins:[nt,G("vanSwipe"),ut(function(e,t){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0),e(window,"visibilitychange",this.onVisibilityChange),t?this.initialize():this.clear()})],props:{width:[Number,String],height:[Number,String],autoplay:[Number,String],vertical:Boolean,lazyRender:Boolean,indicatorColor:String,loop:{type:Boolean,default:!0},duration:{type:[Number,String],default:500},touchable:{type:Boolean,default:!0},initialSwipe:{type:[Number,String],default:0},showIndicators:{type:Boolean,default:!0},stopPropagation:{type:Boolean,default:!0}},data:function(){return{rect:null,offset:0,active:0,deltaX:0,deltaY:0,swiping:!1,computedWidth:0,computedHeight:0}},watch:{children:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t>0?this.autoPlay():this.clear()}},computed:{count:function(){return this.children.length},maxCount:function(){return Math.ceil(Math.abs(this.minOffset)/this.size)},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={transitionDuration:(this.swiping?0:this.duration)+"ms",transform:"translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)"};if(this.size){var i=this.vertical?"height":"width",n=this.vertical?"width":"height";t[i]=this.trackSize+"px",t[n]=this[n]?this[n]+"px":""}return t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}},minOffset:function(){return(this.vertical?this.rect.height:this.rect.width)-this.size*this.count}},mounted:function(){this.bindTouchEvent(this.$refs.track)},methods:{initialize:function(t){if(t===void 0&&(t=+this.initialSwipe),!(!this.$el||ke(this.$el))){clearTimeout(this.timer);var i={width:this.$el.offsetWidth,height:this.$el.offsetHeight};this.rect=i,this.swiping=!0,this.active=t,this.computedWidth=+this.width||i.width,this.computedHeight=+this.height||i.height,this.offset=this.getTargetOffset(t),this.children.forEach(function(n){n.offset=0}),this.autoPlay()}},resize:function(){this.initialize(this.activeIndicator)},onVisibilityChange:function(){document.hidden?this.clear():this.autoPlay()},onTouchStart:function(t){this.touchable&&(this.clear(),this.touchStartTime=Date.now(),this.touchStart(t),this.correctPosition())},onTouchMove:function(t){!this.touchable||!this.swiping||(this.touchMove(t),this.isCorrectDirection&&(z(t,this.stopPropagation),this.move({offset:this.delta})))},onTouchEnd:function(){if(!(!this.touchable||!this.swiping)){var t=this.size,i=this.delta,n=Date.now()-this.touchStartTime,r=i/n,a=Math.abs(r)>.25||Math.abs(i)>t/2;if(a&&this.isCorrectDirection){var s=this.vertical?this.offsetY:this.offsetX,o=0;this.loop?o=s>0?i>0?-1:1:0:o=-Math[i>0?"ceil":"floor"](i/t),this.move({pace:o,emitChange:!0})}else i&&this.move({pace:0});this.swiping=!1,this.autoPlay()}},getTargetActive:function(t){var i=this.active,n=this.count,r=this.maxCount;return t?this.loop?W(i+t,-1,n):W(i+t,0,r):i},getTargetOffset:function(t,i){i===void 0&&(i=0);var n=t*this.size;this.loop||(n=Math.min(n,-this.minOffset));var r=i-n;return this.loop||(r=W(r,this.minOffset,0)),r},move:function(t){var i=t.pace,n=i===void 0?0:i,r=t.offset,a=r===void 0?0:r,s=t.emitChange,o=this.loop,l=this.count,c=this.active,u=this.children,h=this.trackSize,d=this.minOffset;if(!(l<=1)){var f=this.getTargetActive(n),v=this.getTargetOffset(f,a);if(o){if(u[0]&&v!==d){var g=v<d;u[0].offset=g?h:0}if(u[l-1]&&v!==0){var y=v>0;u[l-1].offset=y?-h:0}}this.active=f,this.offset=v,s&&f!==c&&this.$emit("change",this.activeIndicator)}},prev:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),Xt(function(){t.swiping=!1,t.move({pace:-1,emitChange:!0})})},next:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),Xt(function(){t.swiping=!1,t.move({pace:1,emitChange:!0})})},swipeTo:function(t,i){var n=this;i===void 0&&(i={}),this.correctPosition(),this.resetTouchStatus(),Xt(function(){var r;n.loop&&t===n.count?r=n.active===0?0:t:r=t%n.count,i.immediate?Xt(function(){n.swiping=!1}):n.swiping=!1,n.move({pace:r-n.active,emitChange:!0})})},correctPosition:function(){this.swiping=!0,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,i=this.autoplay;i>0&&this.count>1&&(this.clear(),this.timer=setTimeout(function(){t.next(),t.autoPlay()},i))},genIndicator:function(){var t=this,i=this.$createElement,n=this.count,r=this.activeIndicator,a=this.slots("indicator");if(a)return a;if(this.showIndicators&&n>1)return i("div",{class:ui("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(n)).map(function(s,o){return i("i",{class:ui("indicator",{active:o===r}),style:o===r?t.indicatorStyle:null})})])}},render:function(){var t=arguments[0];return t("div",{class:ui()},[t("div",{ref:"track",style:this.trackStyle,class:ui("track",{vertical:this.vertical})},[this.slots()]),this.genIndicator()])}});var Fs=p("swipe-item"),Od=Fs[0],Pd=Fs[1];const Hs=Od({mixins:[X("vanSwipe")],data:function(){return{offset:0,inited:!1,mounted:!1}},mounted:function(){var t=this;this.$nextTick(function(){t.mounted=!0})},computed:{style:function(){var t={},i=this.parent,n=i.size,r=i.vertical;return n&&(t[r?"height":"width"]=n+"px"),this.offset&&(t.transform="translate"+(r?"Y":"X")+"("+this.offset+"px)"),t},shouldRender:function(){var t=this.index,i=this.inited,n=this.parent,r=this.mounted;if(!n.lazyRender||i)return!0;if(!r)return!1;var a=n.activeIndicator,s=n.count-1,o=a===0&&n.loop?s:a-1,l=a===s&&n.loop?0:a+1,c=t===a||t===o||t===l;return c&&(this.inited=!0),c}},render:function(){var t=arguments[0];return t("div",{class:Pd(),style:this.style,on:m({},this.$listeners)},[this.shouldRender&&this.slots()])}});function js(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}const Bd={mixins:[nt],props:{src:String,show:Boolean,active:Number,minZoom:[Number,String],maxZoom:[Number,String],rootWidth:Number,rootHeight:Number},data:function(){return{scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}},computed:{vertical:function(){var t=this.rootWidth,i=this.rootHeight,n=i/t;return this.imageRatio>n},imageStyle:function(){var t=this.scale,i={transitionDuration:this.zooming||this.moving?"0s":".3s"};if(t!==1){var n=this.moveX/t,r=this.moveY/t;i.transform="scale("+t+", "+t+") translate("+n+"px, "+r+"px)"}return i},maxMoveX:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight/this.imageRatio:this.rootWidth;return Math.max(0,(this.scale*t-this.rootWidth)/2)}return 0},maxMoveY:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight:this.rootWidth*this.imageRatio;return Math.max(0,(this.scale*t-this.rootHeight)/2)}return 0}},watch:{active:"resetScale",show:function(t){t||this.resetScale()}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{resetScale:function(){this.setScale(1),this.moveX=0,this.moveY=0},setScale:function(t){t=W(t,+this.minZoom,+this.maxZoom),t!==this.scale&&(this.scale=t,this.$emit("scale",{scale:this.scale,index:this.active}))},toggleScale:function(){var t=this.scale>1?1:2;this.setScale(t),this.moveX=0,this.moveY=0},onTouchStart:function(t){var i=t.touches,n=this.offsetX,r=n===void 0?0:n;this.touchStart(t),this.touchStartTime=new Date,this.fingerNum=i.length,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.moving=this.fingerNum===1&&this.scale!==1,this.zooming=this.fingerNum===2&&!r,this.zooming&&(this.startScale=this.scale,this.startDistance=js(t.touches))},onTouchMove:function(t){var i=t.touches;if(this.touchMove(t),(this.moving||this.zooming)&&z(t,!0),this.moving){var n=this.deltaX+this.startMoveX,r=this.deltaY+this.startMoveY;this.moveX=W(n,-this.maxMoveX,this.maxMoveX),this.moveY=W(r,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&i.length===2){var a=js(i),s=this.startScale*a/this.startDistance;this.setScale(s)}},onTouchEnd:function(t){var i=!1;(this.moving||this.zooming)&&(i=!0,this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(i=!1),t.touches.length||(this.zooming&&(this.moveX=W(this.moveX,-this.maxMoveX,this.maxMoveX),this.moveY=W(this.moveY,-this.maxMoveY,this.maxMoveY),this.zooming=!1),this.moving=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale())),z(t,i),this.checkTap(),this.resetTouchStatus()},checkTap:function(){var t=this;if(!(this.fingerNum>1)){var i=this.offsetX,n=i===void 0?0:i,r=this.offsetY,a=r===void 0?0:r,s=new Date-this.touchStartTime,o=250,l=5;n<l&&a<l&&s<o&&(this.doubleTapTimer?(clearTimeout(this.doubleTapTimer),this.doubleTapTimer=null,this.toggleScale()):this.doubleTapTimer=setTimeout(function(){t.$emit("close"),t.doubleTapTimer=null},o))}},onLoad:function(t){var i=t.target,n=i.naturalWidth,r=i.naturalHeight;this.imageRatio=r/n}},render:function(){var t=arguments[0],i={loading:function(){return t(ht,{attrs:{type:"spinner"}})}};return t(Hs,{class:Vt("swipe-item")},[t(oe,{attrs:{src:this.src,fit:"contain"},class:Vt("image",{vertical:this.vertical}),style:this.imageStyle,scopedSlots:i,on:{load:this.onLoad}})])}},zn=_d({mixins:[nt,He({skipToggleEvent:!0}),ut(function(e){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0)})],props:{className:null,closeable:Boolean,asyncClose:Boolean,overlayStyle:Object,showIndicators:Boolean,images:{type:Array,default:function(){return[]}},loop:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},minZoom:{type:[Number,String],default:1/3},maxZoom:{type:[Number,String],default:3},transition:{type:String,default:"van-fade"},showIndex:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:300},startPosition:{type:[Number,String],default:0},overlayClass:{type:String,default:Vt("overlay")},closeIcon:{type:String,default:"clear"},closeOnPopstate:{type:Boolean,default:!0},closeIconPosition:{type:String,default:"top-right"}},data:function(){return{active:0,rootWidth:0,rootHeight:0,doubleClickTimer:null}},mounted:function(){this.resize()},watch:{startPosition:"setActive",value:function(t){var i=this;t?(this.setActive(+this.startPosition),this.$nextTick(function(){i.resize(),i.$refs.swipe.swipeTo(+i.startPosition,{immediate:!0})})):this.$emit("close",{index:this.active,url:this.images[this.active]})}},methods:{resize:function(){if(this.$el&&this.$el.getBoundingClientRect){var t=this.$el.getBoundingClientRect();this.rootWidth=t.width,this.rootHeight=t.height}},emitClose:function(){this.asyncClose||this.$emit("input",!1)},emitScale:function(t){this.$emit("scale",t)},setActive:function(t){t!==this.active&&(this.active=t,this.$emit("change",t))},genIndex:function(){var t=this.$createElement;if(this.showIndex)return t("div",{class:Vt("index")},[this.slots("index",{index:this.active})||this.active+1+" / "+this.images.length])},genCover:function(){var t=this.$createElement,i=this.slots("cover");if(i)return t("div",{class:Vt("cover")},[i])},genImages:function(){var t=this,i=this.$createElement;return i(zs,{ref:"swipe",attrs:{lazyRender:!0,loop:this.loop,duration:this.swipeDuration,initialSwipe:this.startPosition,showIndicators:this.showIndicators,indicatorColor:"white"},class:Vt("swipe"),on:{change:this.setActive}},[this.images.map(function(n){return i(Bd,{attrs:{src:n,show:t.value,active:t.active,maxZoom:t.maxZoom,minZoom:t.minZoom,rootWidth:t.rootWidth,rootHeight:t.rootHeight},on:{scale:t.emitScale,close:t.emitClose}})})])},genClose:function(){var t=this.$createElement;if(this.closeable)return t(w,{attrs:{role:"button",name:this.closeIcon},class:Vt("close-icon",this.closeIconPosition),on:{click:this.emitClose}})},onClosed:function(){this.$emit("closed")},swipeTo:function(t,i){this.$refs.swipe&&this.$refs.swipe.swipeTo(t,i)}},render:function(){var t=arguments[0];return t("transition",{attrs:{name:this.transition},on:{afterLeave:this.onClosed}},[this.shouldRender?t("div",{directives:[{name:"show",value:this.value}],class:[Vt(),this.className]},[this.genClose(),this.genImages(),this.genIndex(),this.genCover()]):null])}});var j,Ed={loop:!0,value:!0,images:[],maxZoom:3,minZoom:1/3,onClose:null,onChange:null,className:"",showIndex:!0,closeable:!1,closeIcon:"clear",asyncClose:!1,transition:"van-fade",getContainer:"body",overlayStyle:null,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"},Dd=function(){j=new($.extend(zn))({el:document.createElement("div")}),document.body.appendChild(j.$el),j.$on("change",function(t){j.onChange&&j.onChange(t)}),j.$on("scale",function(t){j.onScale&&j.onScale(t)})},Fn=function(t,i){if(i===void 0&&(i=0),!K){j||Dd();var n=Array.isArray(t)?{images:t,startPosition:i}:t;return m(j,Ed,n),j.$once("input",function(r){j.value=r}),j.$once("closed",function(){j.images=[]}),n.onClose&&(j.$off("close"),j.$once("close",n.onClose)),j}};Fn.Component=zn,Fn.install=function(){$.use(zn)};const Hn=Fn;var Ws=p("index-anchor"),Nd=Ws[0],Md=Ws[1];const Ld=Nd({mixins:[X("vanIndexBar",{indexKey:"childrenIndex"})],props:{index:[Number,String]},data:function(){return{top:0,left:null,rect:{top:0,height:0},width:null,active:!1}},computed:{sticky:function(){return this.active&&this.parent.sticky},anchorStyle:function(){if(this.sticky)return{zIndex:""+this.parent.zIndex,left:this.left?this.left+"px":null,width:this.width?this.width+"px":null,transform:"translate3d(0, "+this.top+"px, 0)",color:this.parent.highlightColor}}},mounted:function(){var t=this.$el.getBoundingClientRect();this.rect.height=t.height},methods:{scrollIntoView:function(){this.$el.scrollIntoView()},getRect:function(t,i){var n=this.$el,r=n.getBoundingClientRect();return this.rect.height=r.height,t===window||t===document.body?this.rect.top=r.top+ve():this.rect.top=r.top+qt(t)-i.top,this.rect}},render:function(){var t,i=arguments[0],n=this.sticky;return i("div",{style:{height:n?this.rect.height+"px":null}},[i("div",{style:this.anchorStyle,class:[Md({sticky:n}),(t={},t[me]=n,t)]},[this.slots("default")||this.index])])}});function Ad(){for(var e=[],t="A".charCodeAt(0),i=0;i<26;i++)e.push(String.fromCharCode(t+i));return e}var Us=p("index-bar"),Rd=Us[0],jn=Us[1];const Vd=Rd({mixins:[nt,G("vanIndexBar"),ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(this.scroller,"scroll",this.onScroll)})],props:{zIndex:[Number,String],highlightColor:String,sticky:{type:Boolean,default:!0},stickyOffsetTop:{type:Number,default:0},indexList:{type:Array,default:Ad}},data:function(){return{activeAnchorIndex:null}},computed:{sidebarStyle:function(){if(_(this.zIndex))return{zIndex:this.zIndex+1}},highlightStyle:function(){var t=this.highlightColor;if(t)return{color:t}}},watch:{indexList:function(){this.$nextTick(this.onScroll)},activeAnchorIndex:function(t){t&&this.$emit("change",t)}},methods:{onScroll:function(){var t=this;if(!ke(this.$el)){var i=qt(this.scroller),n=this.getScrollerRect(),r=this.children.map(function(s){return s.getRect(t.scroller,n)}),a=this.getActiveAnchorIndex(i,r);this.activeAnchorIndex=this.indexList[a],this.sticky&&this.children.forEach(function(s,o){if(o===a||o===a-1){var l=s.$el.getBoundingClientRect();s.left=l.left,s.width=l.width}else s.left=null,s.width=null;if(o===a)s.active=!0,s.top=Math.max(t.stickyOffsetTop,r[o].top-i)+n.top;else if(o===a-1){var c=r[a].top-i;s.active=c>0,s.top=c+n.top-r[o].height}else s.active=!1})}},getScrollerRect:function(){return this.scroller.getBoundingClientRect?this.scroller.getBoundingClientRect():{top:0,left:0}},getActiveAnchorIndex:function(t,i){for(var n=this.children.length-1;n>=0;n--){var r=n>0?i[n-1].height:0,a=this.sticky?r+this.stickyOffsetTop:0;if(t+a>=i[n].top)return n}return-1},onClick:function(t){this.scrollToElement(t.target)},onTouchMove:function(t){if(this.touchMove(t),this.direction==="vertical"){z(t);var i=t.touches[0],n=i.clientX,r=i.clientY,a=document.elementFromPoint(n,r);if(a){var s=a.dataset.index;this.touchActiveIndex!==s&&(this.touchActiveIndex=s,this.scrollToElement(a))}}},scrollTo:function(t){var i=this.children.filter(function(n){return String(n.index)===t});i[0]&&(i[0].scrollIntoView(),this.sticky&&this.stickyOffsetTop&&ze(ve()-this.stickyOffsetTop),this.$emit("select",i[0].index))},scrollToElement:function(t){var i=t.dataset.index;this.scrollTo(i)},onTouchEnd:function(){this.active=null}},render:function(){var t=this,i=arguments[0],n=this.indexList.map(function(r){var a=r===t.activeAnchorIndex;return i("span",{class:jn("index",{active:a}),style:a?t.highlightStyle:null,attrs:{"data-index":r}},[r])});return i("div",{class:jn()},[i("div",{class:jn("sidebar"),style:this.sidebarStyle,on:{click:this.onClick,touchstart:this.touchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[n]),this.slots("default")])}});var Wn=p("list"),zd=Wn[0],$e=Wn[1],Fd=Wn[2];const Hd=zd({mixins:[ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(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,String],default:300},direction:{type:String,default:"down"}},data:function(){return{innerLoading:this.loading}},updated:function(){this.innerLoading=this.loading},mounted:function(){this.immediateCheck&&this.check()},watch:{loading:"check",finished:"check"},methods:{check:function(){var t=this;this.$nextTick(function(){if(!(t.innerLoading||t.finished||t.error)){var i=t.$el,n=t.scroller,r=t.offset,a=t.direction,s;n.getBoundingClientRect?s=n.getBoundingClientRect():s={top:0,bottom:n.innerHeight};var o=s.bottom-s.top;if(!o||ke(i))return!1;var l=!1,c=t.$refs.placeholder.getBoundingClientRect();a==="up"?l=s.top-c.top<=r:l=c.bottom-s.bottom<=r,l&&(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&&!this.finished)return t("div",{key:"loading",class:$e("loading")},[this.slots("loading")||t(ht,{attrs:{size:"16"}},[this.loadingText||Fd("loading")])])},genFinishedText:function(){var t=this.$createElement;if(this.finished){var i=this.slots("finished")||this.finishedText;if(i)return t("div",{class:$e("finished-text")},[i])}},genErrorText:function(){var t=this.$createElement;if(this.error){var i=this.slots("error")||this.errorText;if(i)return t("div",{on:{click:this.clickErrorText},class:$e("error-text")},[i])}}},render:function(){var t=arguments[0],i=t("div",{ref:"placeholder",key:"placeholder",class:$e("placeholder")});return t("div",{class:$e(),attrs:{role:"feed","aria-busy":this.innerLoading}},[this.direction==="down"?this.slots():i,this.genLoading(),this.genFinishedText(),this.genErrorText(),this.direction==="up"?this.slots():i])}});var qs=p("nav-bar"),jd=qs[0],Bt=qs[1];const Wd=jd({props:{title:String,fixed:Boolean,zIndex:[Number,String],leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,border:{type:Boolean,default:!0}},data:function(){return{height:null}},mounted:function(){var t=this;if(this.placeholder&&this.fixed){var i=function(){t.height=t.$refs.navBar.getBoundingClientRect().height};i(),setTimeout(i,100)}},methods:{genLeft:function(){var t=this.$createElement,i=this.slots("left");return i||[this.leftArrow&&t(w,{class:Bt("arrow"),attrs:{name:"arrow-left"}}),this.leftText&&t("span",{class:Bt("text")},[this.leftText])]},genRight:function(){var t=this.$createElement,i=this.slots("right");if(i)return i;if(this.rightText)return t("span",{class:Bt("text")},[this.rightText])},genNavBar:function(){var t,i=this.$createElement;return i("div",{ref:"navBar",style:{zIndex:this.zIndex},class:[Bt({fixed:this.fixed,"safe-area-inset-top":this.safeAreaInsetTop}),(t={},t[me]=this.border,t)]},[i("div",{class:Bt("content")},[this.hasLeft()&&i("div",{class:Bt("left"),on:{click:this.onClickLeft}},[this.genLeft()]),i("div",{class:[Bt("title"),"van-ellipsis"]},[this.slots("title")||this.title]),this.hasRight()&&i("div",{class:Bt("right"),on:{click:this.onClickRight}},[this.genRight()])])])},hasLeft:function(){return this.leftArrow||this.leftText||this.slots("left")},hasRight:function(){return this.rightText||this.slots("right")},onClickLeft:function(t){this.$emit("click-left",t)},onClickRight:function(t){this.$emit("click-right",t)}},render:function(){var t=arguments[0];return this.placeholder&&this.fixed?t("div",{class:Bt("placeholder"),style:{height:this.height+"px"}},[this.genNavBar()]):this.genNavBar()}});var Ks=p("notice-bar"),Ud=Ks[0],we=Ks[1];const qd=Ud({mixins:[ut(function(e){e(window,"pageshow",this.reset)})],inject:{vanPopup:{default:null}},props:{text:String,mode:String,color:String,leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null},delay:{type:[Number,String],default:1},speed:{type:[Number,String],default:60}},data:function(){return{show:!0,offset:0,duration:0,wrapWidth:0,contentWidth:0}},watch:{scrollable:"reset",text:{handler:"reset",immediate:!0}},created:function(){this.vanPopup&&this.vanPopup.onReopen(this.reset)},activated:function(){this.reset()},methods:{onClickIcon:function(t){this.mode==="closeable"&&(this.show=!1,this.$emit("close",t))},onTransitionEnd:function(){var t=this;this.offset=this.wrapWidth,this.duration=0,at(function(){Xt(function(){t.offset=-t.contentWidth,t.duration=(t.contentWidth+t.wrapWidth)/t.speed,t.$emit("replay")})})},start:function(){this.reset()},reset:function(){var t=this,i=_(this.delay)?this.delay*1e3:0;this.offset=0,this.duration=0,this.wrapWidth=0,this.contentWidth=0,clearTimeout(this.startTimer),this.startTimer=setTimeout(function(){var n=t.$refs,r=n.wrap,a=n.content;if(!(!r||!a||t.scrollable===!1)){var s=r.getBoundingClientRect().width,o=a.getBoundingClientRect().width;(t.scrollable||o>s)&&Xt(function(){t.offset=-o,t.duration=o/t.speed,t.wrapWidth=s,t.contentWidth=o})}},i)}},render:function(){var t=this,i=arguments[0],n=this.slots,r=this.mode,a=this.leftIcon,s=this.onClickIcon,o={color:this.color,background:this.background},l={transform:this.offset?"translateX("+this.offset+"px)":"",transitionDuration:this.duration+"s"};function c(){var h=n("left-icon");if(h)return h;if(a)return i(w,{class:we("left-icon"),attrs:{name:a}})}function u(){var h=n("right-icon");if(h)return h;var d;if(r==="closeable"?d="cross":r==="link"&&(d="arrow"),d)return i(w,{class:we("right-icon"),attrs:{name:d},on:{click:s}})}return i("div",{attrs:{role:"alert"},directives:[{name:"show",value:this.show}],class:we({wrapable:this.wrapable}),style:o,on:{click:function(d){t.$emit("click",d)}}},[c(),i("div",{ref:"wrap",class:we("wrap"),attrs:{role:"marquee"}},[i("div",{ref:"content",class:[we("content"),{"van-ellipsis":this.scrollable===!1&&!this.wrapable}],style:l,on:{transitionend:this.onTransitionEnd}},[this.slots()||this.text])]),u()])}});var Ys=p("notify"),Kd=Ys[0],Yd=Ys[1];function Xs(e,t,i,n){var r={color:t.color,background:t.background};return e(St,T([{attrs:{value:t.value,position:"top",overlay:!1,duration:.2,lockScroll:!1},style:r,class:[Yd([t.type]),t.className]},B(n,!0)]),[(i.default==null?void 0:i.default())||t.message])}Xs.props=m({},Fe,{color:String,message:[Number,String],duration:[Number,String],className:null,background:String,getContainer:[String,Function],type:{type:String,default:"danger"}});const Un=Kd(Xs);var Gs,st;function Xd(e){return ct(e)?e:{message:e}}function ot(e){if(!K)return st||(st=_r(Un,{on:{click:function(i){st.onClick&&st.onClick(i)},close:function(){st.onClose&&st.onClose()},opened:function(){st.onOpened&&st.onOpened()}}})),e=m({},ot.currentOptions,Xd(e)),m(st,e),clearTimeout(Gs),e.duration&&e.duration>0&&(Gs=setTimeout(ot.clear,e.duration)),st}function Zs(){return{type:"danger",value:!0,message:"",color:void 0,background:void 0,duration:3e3,className:"",onClose:null,onClick:null,onOpened:null}}ot.clear=function(){st&&(st.value=!1)},ot.currentOptions=Zs(),ot.setDefaultOptions=function(e){m(ot.currentOptions,e)},ot.resetDefaultOptions=function(){ot.currentOptions=Zs()},ot.install=function(){$.use(Un)},ot.Component=Un,$.prototype.$notify=ot;const Gd={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"0 0 32 22",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M28.016 0A3.991 3.991 0 0132 3.987v14.026c0 2.2-1.787 3.987-3.98 3.987H10.382c-.509 0-.996-.206-1.374-.585L.89 13.09C.33 12.62 0 11.84 0 11.006c0-.86.325-1.62.887-2.08L9.01.585A1.936 1.936 0 0110.383 0zm0 1.947H10.368L2.24 10.28c-.224.226-.312.432-.312.73 0 .287.094.51.312.729l8.128 8.333h17.648a2.041 2.041 0 002.037-2.04V3.987c0-1.127-.915-2.04-2.037-2.04zM23.028 6a.96.96 0 01.678.292.95.95 0 01-.003 1.377l-3.342 3.348 3.326 3.333c.189.188.292.43.292.679 0 .248-.103.49-.292.679a.96.96 0 01-.678.292.959.959 0 01-.677-.292L18.99 12.36l-3.343 3.345a.96.96 0 01-.677.292.96.96 0 01-.678-.292.962.962 0 01-.292-.68c0-.248.104-.49.292-.679l3.342-3.348-3.342-3.348A.963.963 0 0114 6.971c0-.248.104-.49.292-.679A.96.96 0 0114.97 6a.96.96 0 01.677.292l3.358 3.348 3.345-3.348A.96.96 0 0123.028 6z",fill:"currentColor"}})])}},Zd={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"0 0 30 24",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M25.877 12.843h-1.502c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.5c.187 0 .187 0 .187-.188v-1.511c0-.19 0-.191-.185-.191zM17.999 10.2c0 .188 0 .188.188.188h1.687c.188 0 .188 0 .188-.188V8.688c0-.187.004-.187-.186-.19h-1.69c-.187 0-.187 0-.187.19V10.2zm2.25-3.967h1.5c.188 0 .188 0 .188-.188v-1.7c0-.19 0-.19-.188-.19h-1.5c-.189 0-.189 0-.189.19v1.7c0 .188 0 .188.19.188zm2.063 4.157h3.563c.187 0 .187 0 .187-.189V4.346c0-.19.004-.19-.185-.19h-1.69c-.187 0-.187 0-.187.188v4.155h-1.688c-.187 0-.187 0-.187.189v1.514c0 .19 0 .19.187.19zM14.812 24l2.812-3.4H12l2.813 3.4zm-9-11.157H4.31c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.502c.187 0 .187 0 .187-.188v-1.511c0-.19.01-.191-.189-.191zm15.937 0H8.25c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h13.5c.188 0 .188 0 .188-.188v-1.511c0-.19 0-.191-.188-.191zm-11.438-2.454h1.5c.188 0 .188 0 .188-.188V8.688c0-.187 0-.187-.188-.189h-1.5c-.187 0-.187 0-.187.189V10.2c0 .188 0 .188.187.188zM27.94 0c.563 0 .917.21 1.313.567.518.466.748.757.748 1.51v14.92c0 .567-.188 1.134-.562 1.512-.376.378-.938.566-1.313.566H2.063c-.563 0-.938-.188-1.313-.566-.562-.378-.75-.945-.75-1.511V2.078C0 1.51.188.944.562.567.938.189 1.5 0 1.875 0zm-.062 2H2v14.92h25.877V2zM5.81 4.157c.19 0 .19 0 .19.189v1.762c-.003.126-.024.126-.188.126H4.249c-.126-.003-.126-.023-.126-.188v-1.7c-.187-.19 0-.19.188-.19zm10.5 2.077h1.503c.187 0 .187 0 .187-.188v-1.7c0-.19 0-.19-.187-.19h-1.502c-.188 0-.188.001-.188.19v1.7c0 .188 0 .188.188.188zM7.875 8.5c.187 0 .187.002.187.189V10.2c0 .188 0 .188-.187.188H4.249c-.126-.002-.126-.023-.126-.188V8.625c.003-.126.024-.126.188-.126zm7.875 0c.19.002.19.002.19.189v1.575c-.003.126-.024.126-.19.126h-1.563c-.126-.002-.126-.023-.126-.188V8.625c.002-.126.023-.126.189-.126zm-6-4.342c.187 0 .187 0 .187.189v1.7c0 .188 0 .188-.187.188H8.187c-.126-.003-.126-.023-.126-.188V4.283c.003-.126.024-.126.188-.126zm3.94 0c.185 0 .372 0 .372.189v1.762c-.002.126-.023.126-.187.126h-1.75C12 6.231 12 6.211 12 6.046v-1.7c0-.19.187-.19.187-.19z",fill:"currentColor"}})])}};var Js=p("key"),Jd=Js[0],xe=Js[1];const qn=Jd({mixins:[nt],props:{type:String,text:[Number,String],color:String,wider:Boolean,large:Boolean,loading:Boolean},data:function(){return{active:!1}},mounted:function(){this.bindTouchEvent(this.$el)},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(t){this.active&&(this.slots("default")||t.preventDefault(),this.active=!1,this.$emit("press",this.text,this.type))},genContent:function(){var t=this.$createElement,i=this.type==="extra",n=this.type==="delete",r=this.slots("default")||this.text;return this.loading?t(ht,{class:xe("loading-icon")}):n?r||t(Gd,{class:xe("delete-icon")}):i?r||t(Zd,{class:xe("collapse-icon")}):r}},render:function(){var t=arguments[0];return t("div",{class:xe("wrapper",{wider:this.wider})},[t("div",{attrs:{role:"button",tabindex:"0"},class:xe([this.color,{large:this.large,active:this.active,delete:this.type==="delete"}])},[this.genContent()])])}});var Qs=p("number-keyboard"),Qd=Qs[0],zt=Qs[1];const tf=Qd({mixins:[Ui(),ut(function(e){this.hideOnClickOutside&&e(document.body,"touchstart",this.onBlur)})],model:{event:"update:value"},props:{show:Boolean,title:String,zIndex:[Number,String],randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,theme:{type:String,default:"default"},value:{type:String,default:""},extraKey:{type:[String,Array],default:""},maxlength:{type:[Number,String],default:Number.MAX_VALUE},transition:{type:Boolean,default:!0},showDeleteKey:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0}},watch:{show:function(t){this.transition||this.$emit(t?"show":"hide")}},computed:{keys:function(){return this.theme==="custom"?this.genCustomKeys():this.genDefaultKeys()}},methods:{genBasicKeys:function(){for(var t=[],i=1;i<=9;i++)t.push({text:i});return this.randomKeyOrder&&t.sort(function(){return Math.random()>.5?1:-1}),t},genDefaultKeys:function(){return[].concat(this.genBasicKeys(),[{text:this.extraKey,type:"extra"},{text:0},{text:this.showDeleteKey?this.deleteButtonText:"",type:this.showDeleteKey?"delete":""}])},genCustomKeys:function(){var t=this.genBasicKeys(),i=this.extraKey,n=Array.isArray(i)?i:[i];return n.length===1?t.push({text:0,wider:!0},{text:n[0],type:"extra"}):n.length===2&&t.push({text:n[0],type:"extra"},{text:0},{text:n[1],type:"extra"}),t},onBlur:function(){this.show&&this.$emit("blur")},onClose:function(){this.$emit("close"),this.onBlur()},onAnimationEnd:function(){this.$emit(this.show?"show":"hide")},onPress:function(t,i){if(t===""){i==="extra"&&this.onBlur();return}var n=this.value;i==="delete"?(this.$emit("delete"),this.$emit("update:value",n.slice(0,n.length-1))):i==="close"?this.onClose():n.length<this.maxlength&&(this.$emit("input",t),this.$emit("update:value",n+t))},genTitle:function(){var t=this.$createElement,i=this.title,n=this.theme,r=this.closeButtonText,a=this.slots("title-left"),s=r&&n==="default",o=i||s||a;if(o)return t("div",{class:zt("header")},[a&&t("span",{class:zt("title-left")},[a]),i&&t("h2",{class:zt("title")},[i]),s&&t("button",{attrs:{type:"button"},class:zt("close"),on:{click:this.onClose}},[r])])},genKeys:function(){var t=this,i=this.$createElement;return this.keys.map(function(n){return i(qn,{key:n.text,attrs:{text:n.text,type:n.type,wider:n.wider,color:n.color},on:{press:t.onPress}},[n.type==="delete"&&t.slots("delete"),n.type==="extra"&&t.slots("extra-key")])})},genSidebar:function(){var t=this.$createElement;if(this.theme==="custom")return t("div",{class:zt("sidebar")},[this.showDeleteKey&&t(qn,{attrs:{large:!0,text:this.deleteButtonText,type:"delete"},on:{press:this.onPress}},[this.slots("delete")]),t(qn,{attrs:{large:!0,text:this.closeButtonText,type:"close",color:"blue",loading:this.closeButtonLoading},on:{press:this.onPress}})])}},render:function(){var t=arguments[0],i=this.genTitle();return t("transition",{attrs:{name:this.transition?"van-slide-up":""}},[t("div",{directives:[{name:"show",value:this.show}],style:{zIndex:this.zIndex},class:zt({unfit:!this.safeAreaInsetBottom,"with-title":i}),on:{touchstart:Pr,animationend:this.onAnimationEnd,webkitAnimationEnd:this.onAnimationEnd}},[i,t("div",{class:zt("body")},[t("div",{class:zt("keys")},[this.genKeys()]),this.genSidebar()])])])}});var Kn=p("pagination"),ef=Kn[0],Ft=Kn[1],to=Kn[2];function Yn(e,t,i){return{number:e,text:t,active:i}}const nf=ef({props:{prevText:String,nextText:String,forceEllipses:Boolean,mode:{type:String,default:"multi"},value:{type:Number,default:0},pageCount:{type:[Number,String],default:0},totalItems:{type:[Number,String],default:0},itemsPerPage:{type:[Number,String],default:10},showPageSize:{type:[Number,String],default:5}},computed:{count:function(){var t=this.pageCount||Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(1,t)},pages:function(){var t=[],i=this.count,n=+this.showPageSize;if(this.mode!=="multi")return t;var r=1,a=i,s=n<i;s&&(r=Math.max(this.value-Math.floor(n/2),1),a=r+n-1,a>i&&(a=i,r=a-n+1));for(var o=r;o<=a;o++){var l=Yn(o,o,o===this.value);t.push(l)}if(s&&n>0&&this.forceEllipses){if(r>1){var c=Yn(r-1,"...",!1);t.unshift(c)}if(a<i){var u=Yn(a+1,"...",!1);t.push(u)}}return t}},watch:{value:{handler:function(t){this.select(t||this.value)},immediate:!0}},methods:{select:function(t,i){t=Math.min(this.count,Math.max(1,t)),this.value!==t&&(this.$emit("input",t),i&&this.$emit("change",t))}},render:function(){var t=this,i,n,r=arguments[0],a=this.value,s=this.mode!=="multi",o=function(c){return function(){t.select(c,!0)}};return r("ul",{class:Ft({simple:s})},[r("li",{class:[Ft("item",{disabled:a===1}),Ft("prev"),ft],on:{click:o(a-1)}},[((i=this.slots("prev-text"))!=null?i:this.prevText)||to("prev")]),this.pages.map(function(l){var c;return r("li",{class:[Ft("item",{active:l.active}),Ft("page"),ft],on:{click:o(l.number)}},[(c=t.slots("page",l))!=null?c:l.text])}),s&&r("li",{class:Ft("page-desc")},[this.slots("pageDesc")||a+"/"+this.count]),r("li",{class:[Ft("item",{disabled:a===this.count}),Ft("next"),ft],on:{click:o(a+1)}},[((n=this.slots("next-text"))!=null?n:this.nextText)||to("next")])])}});var eo=p("panel"),rf=eo[0],Te=eo[1];function io(e,t,i,n){var r=function(){return[i.header?i.header():e(q,{attrs:{icon:t.icon,label:t.desc,title:t.title,value:t.status,valueClass:Te("header-value")},class:Te("header")}),e("div",{class:Te("content")},[i.default&&i.default()]),i.footer&&e("div",{class:[Te("footer"),qi]},[i.footer()])]};return e(es,T([{class:Te(),scopedSlots:{default:r}},B(n,!0)]))}io.props={icon:String,desc:String,title:String,status:String};const af=rf(io);var no=p("password-input"),sf=no[0],_e=no[1];function ro(e,t,i,n){for(var r,a=t.mask,s=t.value,o=t.length,l=t.gutter,c=t.focused,u=t.errorInfo,h=u||t.info,d=[],f=0;f<o;f++){var v,g=s[f],y=f!==0&&!l,b=c&&f===s.length,S=void 0;f!==0&&l&&(S={marginLeft:P(l)}),d.push(e("li",{class:[(v={},v[Xr]=y,v),_e("item",{focus:b})],style:S},[a?e("i",{style:{visibility:g?"visible":"hidden"}}):g,b&&e("div",{class:_e("cursor")})]))}return e("div",{class:_e()},[e("ul",T([{class:[_e("security"),(r={},r[Gr]=!l,r)],on:{touchstart:function(k){k.stopPropagation(),I(n,"focus",k)}}},B(n,!0)]),[d]),h&&e("div",{class:_e(u?"error-info":"info")},[h])])}ro.props={info:String,gutter:[Number,String],focused:Boolean,errorInfo:String,mask:{type:Boolean,default:!0},value:{type:String,default:""},length:{type:[Number,String],default:6}};const of=sf(ro);function mt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xn(e){var t=mt(e).Element;return e instanceof t||e instanceof Element}function gt(e){var t=mt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ao(e){if(typeof ShadowRoot>"u")return!1;var t=mt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var ce=Math.round;function Gn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lf(){return!/^((?!chrome|android).)*safari/i.test(Gn())}function hi(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=e.getBoundingClientRect(),r=1,a=1;t&>(e)&&(r=e.offsetWidth>0&&ce(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ce(n.height)/e.offsetHeight||1);var s=Xn(e)?mt(e):window,o=s.visualViewport,l=!lf()&&i,c=(n.left+(l&&o?o.offsetLeft:0))/r,u=(n.top+(l&&o?o.offsetTop:0))/a,h=n.width/r,d=n.height/a;return{width:h,height:d,top:u,right:c+h,bottom:u+d,left:c,x:c,y:u}}function so(e){var t=mt(e),i=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:i,scrollTop:n}}function cf(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function uf(e){return e===mt(e)||!gt(e)?so(e):cf(e)}function Et(e){return e?(e.nodeName||"").toLowerCase():null}function di(e){return((Xn(e)?e.ownerDocument:e.document)||window.document).documentElement}function hf(e){return hi(di(e)).left+so(e).scrollLeft}function Dt(e){return mt(e).getComputedStyle(e)}function Zn(e){var t=Dt(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function df(e){var t=e.getBoundingClientRect(),i=ce(t.width)/e.offsetWidth||1,n=ce(t.height)/e.offsetHeight||1;return i!==1||n!==1}function ff(e,t,i){i===void 0&&(i=!1);var n=gt(t),r=gt(t)&&df(t),a=di(t),s=hi(e,r,i),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&((Et(t)!=="body"||Zn(a))&&(o=uf(t)),gt(t)?(l=hi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=hf(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function pf(e){var t=hi(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Jn(e){return Et(e)==="html"?e:e.assignedSlot||e.parentNode||(ao(e)?e.host:null)||di(e)}function oo(e){return["html","body","#document"].indexOf(Et(e))>=0?e.ownerDocument.body:gt(e)&&Zn(e)?e:oo(Jn(e))}function fi(e,t){var i;t===void 0&&(t=[]);var n=oo(e),r=n===((i=e.ownerDocument)==null?void 0:i.body),a=mt(n),s=r?[a].concat(a.visualViewport||[],Zn(n)?n:[]):n,o=t.concat(s);return r?o:o.concat(fi(Jn(s)))}function vf(e){return["table","td","th"].indexOf(Et(e))>=0}function lo(e){return!gt(e)||Dt(e).position==="fixed"?null:e.offsetParent}function mf(e){var t=/firefox/i.test(Gn()),i=/Trident/i.test(Gn());if(i&>(e)){var n=Dt(e);if(n.position==="fixed")return null}var r=Jn(e);for(ao(r)&&(r=r.host);gt(r)&&["html","body"].indexOf(Et(r))<0;){var a=Dt(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function co(e){for(var t=mt(e),i=lo(e);i&&vf(i)&&Dt(i).position==="static";)i=lo(i);return i&&(Et(i)==="html"||Et(i)==="body"&&Dt(i).position==="static")?t:i||mf(e)||t}var ue="top",pi="bottom",Ie="right",Gt="left",uo="auto",gf=[ue,pi,Ie,Gt],ho="start",vi="end",yf=[].concat(gf,[uo]).reduce(function(e,t){return e.concat([t,t+"-"+ho,t+"-"+vi])},[]),bf="beforeRead",Sf="read",kf="afterRead",Cf="beforeMain",$f="main",wf="afterMain",xf="beforeWrite",Tf="write",_f="afterWrite",Qn=[bf,Sf,kf,Cf,$f,wf,xf,Tf,_f];function If(e){var t=new Map,i=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function r(a){i.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!i.has(o)){var l=t.get(o);l&&r(l)}}),n.push(a)}return e.forEach(function(a){i.has(a.name)||r(a)}),n}function Of(e){var t=If(e);return Qn.reduce(function(i,n){return i.concat(t.filter(function(r){return r.phase===n}))},[])}function Pf(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function Ht(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return[].concat(i).reduce(function(r,a){return r.replace(/%s/,a)},e)}var Zt='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Bf='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',fo=["name","enabled","phase","fn","effect","requires","options"];function Ef(e){e.forEach(function(t){[].concat(Object.keys(t),fo).filter(function(i,n,r){return r.indexOf(i)===n}).forEach(function(i){switch(i){case"name":typeof t.name!="string"&&console.error(Ht(Zt,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Ht(Zt,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":Qn.indexOf(t.phase)<0&&console.error(Ht(Zt,t.name,'"phase"',"either "+Qn.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Ht(Zt,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Ht(Zt,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Ht(Zt,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Ht(Zt,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+fo.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+i+'" was provided.')}t.requires&&t.requires.forEach(function(n){e.find(function(r){return r.name===n})==null&&console.error(Ht(Bf,String(t.name),n,n))})})})}function Df(e,t){var i=new Set;return e.filter(function(n){var r=t(n);if(!i.has(r))return i.add(r),!0})}function mi(e){return e.split("-")[0]}function Nf(e){var t=e.reduce(function(i,n){var r=i[n.name];return i[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,i},{});return Object.keys(t).map(function(i){return t[i]})}function po(e){return e.split("-")[1]}function Mf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Lf(e){var t=e.reference,i=e.element,n=e.placement,r=n?mi(n):null,a=n?po(n):null,s=t.x+t.width/2-i.width/2,o=t.y+t.height/2-i.height/2,l;switch(r){case ue:l={x:s,y:t.y-i.height};break;case pi:l={x:s,y:t.y+t.height};break;case Ie:l={x:t.x+t.width,y:o};break;case Gt:l={x:t.x-i.width,y:o};break;default:l={x:t.x,y:t.y}}var c=r?Mf(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case ho:l[c]=l[c]-(t[u]/2-i[u]/2);break;case vi:l[c]=l[c]+(t[u]/2-i[u]/2);break}}return l}var vo="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Af="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",mo={placement:"bottom",modifiers:[],strategy:"absolute"};function go(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Rf(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,n=i===void 0?[]:i,r=t.defaultOptions,a=r===void 0?mo:r;return function(o,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},mo,a),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},h=[],d=!1,f={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;g(),u.options=Object.assign({},a,u.options,S),u.scrollParents={reference:Xn(o)?fi(o):o.contextElement?fi(o.contextElement):[],popper:fi(l)};var x=Of(Nf([].concat(n,u.options.modifiers)));u.orderedModifiers=x.filter(function(et){return et.enabled});{var k=Df([].concat(x,u.options.modifiers),function(et){var fe=et.name;return fe});if(Ef(k),mi(u.options.placement)===uo){var C=u.orderedModifiers.find(function(et){var fe=et.name;return fe==="flip"});C||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var O=Dt(l),_t=O.marginTop,L=O.marginRight,U=O.marginBottom,Me=O.marginLeft;[_t,L,U,Me].some(function(et){return parseFloat(et)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return v(),f.update()},forceUpdate:function(){if(!d){var b=u.elements,S=b.reference,x=b.popper;if(!go(S,x)){console.error(vo);return}u.rects={reference:ff(S,co(x),u.options.strategy==="fixed"),popper:pf(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(et){return u.modifiersData[et.name]=Object.assign({},et.data)});for(var k=0,C=0;C<u.orderedModifiers.length;C++){if(k+=1,k>100){console.error(Af);break}if(u.reset===!0){u.reset=!1,C=-1;continue}var O=u.orderedModifiers[C],_t=O.fn,L=O.options,U=L===void 0?{}:L,Me=O.name;typeof _t=="function"&&(u=_t({state:u,options:U,name:Me,instance:f})||u)}}},update:Pf(function(){return new Promise(function(y){f.forceUpdate(),y(u)})}),destroy:function(){g(),d=!0}};if(!go(o,l))return console.error(vo),f;f.setOptions(c).then(function(y){!d&&c.onFirstUpdate&&c.onFirstUpdate(y)});function v(){u.orderedModifiers.forEach(function(y){var b=y.name,S=y.options,x=S===void 0?{}:S,k=y.effect;if(typeof k=="function"){var C=k({state:u,name:b,instance:f,options:x}),O=function(){};h.push(C||O)}})}function g(){h.forEach(function(y){return y()}),h=[]}return f}}var gi={passive:!0};function Vf(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,a=r===void 0?!0:r,s=n.resize,o=s===void 0?!0:s,l=mt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",i.update,gi)}),o&&l.addEventListener("resize",i.update,gi),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",i.update,gi)}),o&&l.removeEventListener("resize",i.update,gi)}}var zf={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vf,data:{}};function Ff(e){var t=e.state,i=e.name;t.modifiersData[i]=Lf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Hf={name:"popperOffsets",enabled:!0,phase:"read",fn:Ff,data:{}},jf={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wf(e){var t=e.x,i=e.y,n=window,r=n.devicePixelRatio||1;return{x:ce(t*r)/r||0,y:ce(i*r)/r||0}}function yo(e){var t,i=e.popper,n=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,h=e.isFixed,d=s.x,f=d===void 0?0:d,v=s.y,g=v===void 0?0:v,y=typeof u=="function"?u({x:f,y:g}):{x:f,y:g};f=y.x,g=y.y;var b=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),x=Gt,k=ue,C=window;if(c){var O=co(i),_t="clientHeight",L="clientWidth";if(O===mt(i)&&(O=di(i),Dt(O).position!=="static"&&o==="absolute"&&(_t="scrollHeight",L="scrollWidth")),O=O,r===ue||(r===Gt||r===Ie)&&a===vi){k=pi;var U=h&&O===C&&C.visualViewport?C.visualViewport.height:O[_t];g-=U-n.height,g*=l?1:-1}if(r===Gt||(r===ue||r===pi)&&a===vi){x=Ie;var Me=h&&O===C&&C.visualViewport?C.visualViewport.width:O[L];f-=Me-n.width,f*=l?1:-1}}var et=Object.assign({position:o},c&&jf),fe=u===!0?Wf({x:f,y:g}):{x:f,y:g};if(f=fe.x,g=fe.y,l){var Le;return Object.assign({},et,(Le={},Le[k]=S?"0":"",Le[x]=b?"0":"",Le.transform=(C.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",Le))}return Object.assign({},et,(t={},t[k]=S?g+"px":"",t[x]=b?f+"px":"",t.transform="",t))}function Uf(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=n===void 0?!0:n,a=i.adaptive,s=a===void 0?!0:a,o=i.roundOffsets,l=o===void 0?!0:o;{var c=Dt(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(h){return c.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
3
3
|
|
|
4
4
|
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
|
5
5
|
|
|
6
|
-
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:mi(t.placement),variation:po(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,yo(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,yo(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Wf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jf,data:{}};function Uf(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var n=t.styles[i]||{},r=t.attributes[i]||{},a=t.elements[i];!gt(a)||!Et(a)||(Object.assign(a.style,n),Object.keys(r).forEach(function(s){var o=r[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function qf(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(n){var r=t.elements[n],a=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:i[n]),o=s.reduce(function(l,c){return l[c]="",l},{});!gt(r)||!Et(r)||(Object.assign(r.style,o),Object.keys(a).forEach(function(l){r.removeAttribute(l)}))})}}var Kf={name:"applyStyles",enabled:!0,phase:"write",fn:Uf,effect:qf,requires:["computeStyles"]},Yf=[Rf,zf,Wf,Kf],Xf=Lf({defaultModifiers:Yf});function Gf(e,t,i){var n=mi(e),r=[Gt,ue].indexOf(n)>=0?-1:1,a=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,s=a[0],o=a[1];return s=s||0,o=(o||0)*r,[Gt,Ie].indexOf(n)>=0?{x:o,y:s}:{x:s,y:o}}function Zf(e){var t=e.state,i=e.options,n=e.name,r=i.offset,a=r===void 0?[0,0]:r,s=mf.reduce(function(u,h){return u[h]=Gf(h,t.rects,a),u},{}),o=s[t.placement],l=o.x,c=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}var Jf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Zf},bo=p("popover"),Qf=bo[0],Jt=bo[1];const tp=Qf({mixins:[Rn({event:"touchstart",method:"onClickOutside"})],props:{value:Boolean,trigger:String,overlay:Boolean,offset:{type:Array,default:function(){return[0,8]}},theme:{type:String,default:"light"},actions:{type:Array,default:function(){return[]}},placement:{type:String,default:"bottom"},getContainer:{type:[String,Function],default:"body"},closeOnClickAction:{type:Boolean,default:!0}},watch:{value:"updateLocation",placement:"updateLocation"},mounted:function(){this.updateLocation()},beforeDestroy:function(){this.popper&&(K||(window.removeEventListener("animationend",this.updateLocation),window.removeEventListener("transitionend",this.updateLocation)),this.popper.destroy(),this.popper=null)},methods:{createPopper:function(){var t=Xf(this.$refs.wrapper,this.$refs.popover.$el,{placement:this.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},m({},Jf,{options:{offset:this.offset}})]});return K||(window.addEventListener("animationend",this.updateLocation),window.addEventListener("transitionend",this.updateLocation)),t},updateLocation:function(){var t=this;this.$nextTick(function(){t.value&&(t.popper?t.popper.setOptions({placement:t.placement}):t.popper=t.createPopper())})},renderAction:function(t,i){var n=this,r=this.$createElement,a=t.icon,s=t.text,o=t.disabled,l=t.className;return r("div",{attrs:{role:"menuitem"},class:[Jt("action",{disabled:o,"with-icon":a}),l],on:{click:function(){return n.onClickAction(t,i)}}},[a&&r(w,{attrs:{name:a},class:Jt("action-icon")}),r("div",{class:[Jt("action-text"),me]},[s])])},onToggle:function(t){this.$emit("input",t)},onClickWrapper:function(){this.trigger==="click"&&this.onToggle(!this.value)},onTouchstart:function(t){t.stopPropagation(),this.$emit("touchstart",t)},onClickAction:function(t,i){t.disabled||(this.$emit("select",t,i),this.closeOnClickAction&&this.$emit("input",!1))},onClickOutside:function(){this.$emit("input",!1)},onOpen:function(){this.$emit("open")},onOpened:function(){this.$emit("opened")},onClose:function(){this.$emit("close")},onClosed:function(){this.$emit("closed")}},render:function(){var t=arguments[0];return t("span",{ref:"wrapper",class:Jt("wrapper"),on:{click:this.onClickWrapper}},[t(St,{ref:"popover",attrs:{value:this.value,overlay:this.overlay,position:null,transition:"van-popover-zoom",lockScroll:!1,getContainer:this.getContainer},class:Jt([this.theme]),on:{open:this.onOpen,close:this.onClose,input:this.onToggle,opened:this.onOpened,closed:this.onClosed},nativeOn:{touchstart:this.onTouchstart}},[t("div",{class:Jt("arrow")}),t("div",{class:Jt("content"),attrs:{role:"menu"}},[this.slots("default")||this.actions.map(this.renderAction)])]),this.slots("reference")])}});var So=p("progress"),ep=So[0],tr=So[1];const ip=ep({mixins:[ut(function(e){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0)})],props:{color:String,inactive:Boolean,pivotText:String,textColor:String,pivotColor:String,trackColor:String,strokeWidth:[Number,String],percentage:{type:[Number,String],required:!0,validator:function(t){return t>=0&&t<=100}},showPivot:{type:Boolean,default:!0}},data:function(){return{pivotWidth:0,progressWidth:0}},mounted:function(){this.resize()},watch:{showPivot:"resize",pivotText:"resize"},methods:{resize: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],i=this.pivotText,n=this.percentage,r=i??n+"%",a=this.showPivot&&r,s=this.inactive?"#cacaca":this.color,o={color:this.textColor,left:(this.progressWidth-this.pivotWidth)*n/100+"px",background:this.pivotColor||s},l={background:s,width:this.progressWidth*n/100+"px"},c={background:this.trackColor,height:P(this.strokeWidth)};return t("div",{class:tr(),style:c},[t("span",{class:tr("portion"),style:l},[a&&t("span",{ref:"pivot",style:o,class:tr("pivot")},[r])])])}});var er=p("pull-refresh"),np=er[0],yi=er[1],rp=er[2],ko=50,ap=["pulling","loosing","success"];const sp=np({mixins:[nt],props:{disabled:Boolean,successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:[Number,String],value:{type:Boolean,required:!0},successDuration:{type:[Number,String],default:500},animationDuration:{type:[Number,String],default:300},headHeight:{type:[Number,String],default:ko}},data:function(){return{status:"normal",distance:0,duration:0}},computed:{touchable:function(){return this.status!=="loading"&&this.status!=="success"&&!this.disabled},headStyle:function(){if(this.headHeight!==ko)return{height:this.headHeight+"px"}}},watch:{value:function(t){this.duration=this.animationDuration,t?this.setStatus(+this.headHeight,!0):this.slots("success")||this.successText?this.showSuccessTip():this.setStatus(0,!1)}},mounted:function(){this.bindTouchEvent(this.$refs.track),this.scrollEl=Ut(this.$el)},methods:{checkPullStart:function(t){this.ceiling=qt(this.scrollEl)===0,this.ceiling&&(this.duration=0,this.touchStart(t))},onTouchStart:function(t){this.touchable&&this.checkPullStart(t)},onTouchMove:function(t){this.touchable&&(this.ceiling||this.checkPullStart(t),this.touchMove(t),this.ceiling&&this.deltaY>=0&&this.direction==="vertical"&&(z(t),this.setStatus(this.ease(this.deltaY))))},onTouchEnd:function(){var t=this;this.touchable&&this.ceiling&&this.deltaY&&(this.duration=this.animationDuration,this.status==="loosing"?(this.setStatus(+this.headHeight,!0),this.$emit("input",!0),this.$nextTick(function(){t.$emit("refresh")})):this.setStatus(0))},ease:function(t){var i=+(this.pullDistance||this.headHeight);return t>i&&(t<i*2?t=i+(t-i)/2:t=i*1.5+(t-i*2)/4),Math.round(t)},setStatus:function(t,i){var n;i?n="loading":t===0?n="normal":n=t<(this.pullDistance||this.headHeight)?"pulling":"loosing",this.distance=t,n!==this.status&&(this.status=n)},genStatus:function(){var t=this.$createElement,i=this.status,n=this.distance,r=this.slots(i,{distance:n});if(r)return r;var a=[],s=this[i+"Text"]||rp(i);return ap.indexOf(i)!==-1&&a.push(t("div",{class:yi("text")},[s])),i==="loading"&&a.push(t(ht,{attrs:{size:"16"}},[s])),a},showSuccessTip:function(){var t=this;this.status="success",setTimeout(function(){t.setStatus(0)},this.successDuration)}},render:function(){var t=arguments[0],i={transitionDuration:this.duration+"ms",transform:this.distance?"translate3d(0,"+this.distance+"px, 0)":""};return t("div",{class:yi()},[t("div",{ref:"track",class:yi("track"),style:i},[t("div",{class:yi("head"),style:this.headStyle},[this.genStatus()]),this.slots()])])}});var Co=p("rate"),op=Co[0],bi=Co[1];function lp(e,t,i){return e>=t?"full":e+.5>=t&&i?"half":"void"}const cp=op({mixins:[nt,Lt],props:{size:[Number,String],color:String,gutter:[Number,String],readonly:Boolean,disabled:Boolean,allowHalf:Boolean,voidColor:String,iconPrefix:String,disabledColor:String,value:{type:Number,default:0},icon:{type:String,default:"star"},voidIcon:{type:String,default:"star-o"},count:{type:[Number,String],default:5},touchable:{type:Boolean,default:!0}},computed:{list:function(){for(var t=[],i=1;i<=this.count;i++)t.push(lp(this.value,i,this.allowHalf));return t},sizeWithUnit:function(){return P(this.size)},gutterWithUnit:function(){return P(this.gutter)}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{select:function(t){!this.disabled&&!this.readonly&&t!==this.value&&(this.$emit("input",t),this.$emit("change",t))},onTouchStart:function(t){var i=this;if(!(this.readonly||this.disabled||!this.touchable)){this.touchStart(t);var n=this.$refs.items.map(function(a){return a.getBoundingClientRect()}),r=[];n.forEach(function(a,s){i.allowHalf?r.push({score:s+.5,left:a.left},{score:s+1,left:a.left+a.width/2}):r.push({score:s+1,left:a.left})}),this.ranges=r}},onTouchMove:function(t){if(!(this.readonly||this.disabled||!this.touchable)&&(this.touchMove(t),this.direction==="horizontal")){z(t);var i=t.touches[0].clientX;this.select(this.getScoreByPosition(i))}},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,i){var n=this,r=this.$createElement,a=this.icon,s=this.color,o=this.count,l=this.voidIcon,c=this.disabled,u=this.voidColor,h=this.disabledColor,d=i+1,f=t==="full",v=t==="void",g;return this.gutterWithUnit&&d!==+o&&(g={paddingRight:this.gutterWithUnit}),r("div",{ref:"items",refInFor:!0,key:i,attrs:{role:"radio",tabindex:"0","aria-setsize":o,"aria-posinset":d,"aria-checked":String(!v)},style:g,class:bi("item")},[r(w,{attrs:{size:this.sizeWithUnit,name:f?a:l,color:c?h:f?s:u,classPrefix:this.iconPrefix,"data-score":d},class:bi("icon",{disabled:c,full:f}),on:{click:function(){n.select(d)}}}),this.allowHalf&&r(w,{attrs:{size:this.sizeWithUnit,name:v?l:a,color:c?h:v?u:s,classPrefix:this.iconPrefix,"data-score":d-.5},class:bi("icon",["half",{disabled:c,full:!v}]),on:{click:function(){n.select(d-.5)}}})])}},render:function(){var t=this,i=arguments[0];return i("div",{class:bi({readonly:this.readonly,disabled:this.disabled}),attrs:{tabindex:"0",role:"radiogroup"}},[this.list.map(function(n,r){return t.genStar(n,r)})])}});var $o=p("row"),up=$o[0],hp=$o[1];const dp=up({mixins:[G("vanRow")],props:{type:String,align:String,justify:String,tag:{type:String,default:"div"},gutter:{type:[Number,String],default:0}},computed:{spaces:function(){var t=Number(this.gutter);if(t){var i=[],n=[[]],r=0;return this.children.forEach(function(a,s){r+=Number(a.span),r>24?(n.push([s]),r-=24):n[n.length-1].push(s)}),n.forEach(function(a){var s=t*(a.length-1)/a.length;a.forEach(function(o,l){if(l===0)i.push({right:s});else{var c=t-i[o-1].right,u=s-c;i.push({left:c,right:u})}})}),i}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,i=arguments[0],n=this.align,r=this.justify,a=this.type==="flex";return i(this.tag,{class:hp((t={flex:a},t["align-"+n]=a&&n,t["justify-"+r]=a&&r,t)),on:{click:this.onClick}},[this.slots()])}});var ir=p("search"),fp=ir[0],Si=ir[1],pp=ir[2];function wo(e,t,i,n){function r(){if(i.label||t.label)return e("div",{class:Si("label")},[i.label?i.label():t.label])}function a(){if(!t.showAction)return;function l(){i.action||(I(n,"input",""),I(n,"cancel"))}return e("div",{class:Si("action"),attrs:{role:"button",tabindex:"0"},on:{click:l}},[i.action?i.action():t.actionText||pp("cancel")])}var s={attrs:n.data.attrs,on:m({},n.listeners,{keypress:function(c){c.keyCode===13&&(z(c),I(n,"search",t.value)),I(n,"keypress",c)}})},o=B(n);return o.attrs=void 0,e("div",T([{class:Si({"show-action":t.showAction}),style:{background:t.background}},o]),[i.left==null?void 0:i.left(),e("div",{class:Si("content",t.shape)},[r(),e(rt,T([{attrs:{type:"search",border:!1,value:t.value,leftIcon:t.leftIcon,rightIcon:t.rightIcon,clearable:t.clearable,clearTrigger:t.clearTrigger},scopedSlots:{"left-icon":i["left-icon"],"right-icon":i["right-icon"]}},s]))]),a()])}wo.props={value:String,label:String,rightIcon:String,actionText:String,background:String,showAction:Boolean,clearTrigger:String,shape:{type:String,default:"square"},clearable:{type:Boolean,default:!0},leftIcon:{type:String,default:"search"}};const vp=fp(wo);var mp=["qq","link","weibo","wechat","poster","qrcode","weapp-qrcode","wechat-moments"],nr=p("share-sheet"),gp=nr[0],wt=nr[1],yp=nr[2];const bp=gp({props:m({},Fe,{title:String,duration:String,cancelText:String,description:String,getContainer:[String,Function],options:{type:Array,default:function(){return[]}},overlay:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}}),methods:{onCancel:function(){this.toggle(!1),this.$emit("cancel")},onSelect:function(t,i){this.$emit("select",t,i)},toggle:function(t){this.$emit("input",t)},getIconURL:function(t){return mp.indexOf(t)!==-1?"https://img01.yzcdn.cn/vant/share-sheet-"+t+".png":t},genHeader:function(){var t=this.$createElement,i=this.slots("title")||this.title,n=this.slots("description")||this.description;if(!(!i&&!n))return t("div",{class:wt("header")},[i&&t("h2",{class:wt("title")},[i]),n&&t("span",{class:wt("description")},[n])])},genOptions:function(t,i){var n=this,r=this.$createElement;return r("div",{class:wt("options",{border:i})},[t.map(function(a,s){return r("div",{attrs:{role:"button",tabindex:"0"},class:[wt("option"),a.className],on:{click:function(){n.onSelect(a,s)}}},[r("img",{attrs:{src:n.getIconURL(a.icon)},class:wt("icon")}),a.name&&r("span",{class:wt("name")},[a.name]),a.description&&r("span",{class:wt("option-description")},[a.description])])})])},genRows:function(){var t=this,i=this.options;return Array.isArray(i[0])?i.map(function(n,r){return t.genOptions(n,r!==0)}):this.genOptions(i)},genCancelText:function(){var t,i=this.$createElement,n=(t=this.cancelText)!=null?t:yp("cancel");if(n)return i("button",{attrs:{type:"button"},class:wt("cancel"),on:{click:this.onCancel}},[n])},onClickOverlay:function(){this.$emit("click-overlay")}},render:function(){var t=arguments[0];return t(St,{attrs:{round:!0,value:this.value,position:"bottom",overlay:this.overlay,duration:this.duration,lazyRender:this.lazyRender,lockScroll:this.lockScroll,getContainer:this.getContainer,closeOnPopstate:this.closeOnPopstate,closeOnClickOverlay:this.closeOnClickOverlay,safeAreaInsetBottom:this.safeAreaInsetBottom},class:wt(),on:{input:this.toggle,"click-overlay":this.onClickOverlay}},[this.genHeader(),this.genRows(),this.genCancelText()])}});var xo=p("sidebar"),Sp=xo[0],kp=xo[1];const To=Sp({mixins:[G("vanSidebar")],model:{prop:"activeKey"},props:{activeKey:{type:[Number,String],default:0}},data:function(){return{index:+this.activeKey}},watch:{activeKey:function(){this.setIndex(+this.activeKey)}},methods:{setIndex:function(t){t!==this.index&&(this.index=t,this.$emit("change",t))}},render:function(){var t=arguments[0];return t("div",{class:kp()},[this.slots()])}});var _o=p("sidebar-item"),Cp=_o[0],rr=_o[1];const Io=Cp({mixins:[X("vanSidebar")],props:m({},Mt,{dot:Boolean,info:[Number,String],badge:[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.setIndex(this.index),Yt(this.$router,this))}},render:function(){var t,i,n=arguments[0];return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] SidebarItem: "info" prop is deprecated, use "badge" prop instead.'),n("a",{class:rr({select:this.select,disabled:this.disabled}),on:{click:this.onClick}},[n("div",{class:rr("text")},[(t=this.slots("title"))!=null?t:this.title,n(Kt,{attrs:{dot:this.dot,info:(i=this.badge)!=null?i:this.info},class:rr("info")})])])}});var Oo=p("skeleton"),$p=Oo[0],Oe=Oo[1],Po="100%",wp="60%";function Bo(e,t,i,n){if(!t.loading)return i.default&&i.default();function r(){if(t.title)return e("h3",{class:Oe("title"),style:{width:P(t.titleWidth)}})}function a(){var o=[],l=t.rowWidth;function c(h){return l===Po&&h===+t.row-1?wp:Array.isArray(l)?l[h]:l}for(var u=0;u<t.row;u++)o.push(e("div",{class:Oe("row"),style:{width:P(c(u))}}));return o}function s(){if(t.avatar){var o=P(t.avatarSize);return e("div",{class:Oe("avatar",t.avatarShape),style:{width:o,height:o}})}}return e("div",T([{class:Oe({animate:t.animate,round:t.round})},B(n)]),[s(),e("div",{class:Oe("content")},[r(),a()])])}Bo.props={title:Boolean,round:Boolean,avatar:Boolean,titleWidth:[Number,String],avatarSize:[Number,String],row:{type:[Number,String],default:0},loading:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},avatarShape:{type:String,default:"round"},rowWidth:{type:[Number,String,Array],default:Po}};const xp=$p(Bo),Tp={"zh-CN":{vanSku:{select:"请选择",selected:"已选",selectSku:"请先选择商品规格",soldout:"库存不足",originPrice:"原价",minusTip:"至少选择一件",minusStartTip:function(t){return t+"件起售"},unavailable:"商品已经无法购买啦",stock:"剩余",stockUnit:"件",quotaTip:function(t){return"每人限购"+t+"件"},quotaUsedTip:function(t,i){return"每人限购"+t+"件,你已购买"+i+"件"}},vanSkuActions:{buy:"立即购买",addCart:"加入购物车"},vanSkuImgUploader:{oversize:function(t){return"最大可上传图片为"+t+"MB,请尝试压缩图片尺寸"},fail:"上传失败",uploading:"上传中..."},vanSkuStepper:{quotaLimit:function(t){return"限购"+t+"件"},quotaStart:function(t){return t+"件起售"},comma:",",num:"购买数量"},vanSkuMessages:{fill:"请填写",upload:"请上传",imageLabel:"仅限一张",invalid:{tel:"请填写正确的数字格式留言",mobile:"手机号长度为6-20位数字",email:"请填写正确的邮箱",id_no:"请填写正确的身份证号码"},placeholder:{id_no:"请填写身份证号",text:"请填写留言",tel:"请填写数字",email:"请填写邮箱",date:"请选择日期",time:"请选择时间",textarea:"请填写留言",mobile:"请填写手机号"}},vanSkuRow:{multiple:"可多选"},vanSkuDatetimeField:{title:{date:"选择年月日",time:"选择时间",datetime:"选择日期时间"},format:{year:"年",month:"月",day:"日",hour:"时",minute:"分"}}}};var ki={QUOTA_LIMIT:0,STOCK_LIMIT:1},xt="";const _p={LIMIT_TYPE:ki,UNSELECTED_SKU_VALUE_ID:xt};var Eo=function(t){var i={};return t.forEach(function(n){i[n.k_s]=n.v}),i},Ip=function(t){var i={};return t.forEach(function(n){var r={};n.v.forEach(function(a){r[a.id]=a}),i[n.k_id]=r}),i},Do=function(t,i){var n=Object.keys(i).filter(function(r){return i[r]!==xt});return t.length===n.length},No=function(t,i){var n=t.filter(function(r){return Object.keys(i).every(function(a){return String(r[a])===String(i[a])})});return n[0]},Mo=function(t,i){var n=Eo(t);return Object.keys(i).reduce(function(r,a){var s=n[a]||[],o=i[a];if(o!==xt&&s.length>0){var l=s.filter(function(c){return c.id===o})[0];l&&r.push(l)}return r},[])},ar=function(t,i,n){var r,a=n.key,s=n.valueId,o=m({},i,(r={},r[a]=s,r)),l=Object.keys(o).filter(function(d){return o[d]!==xt}),c=t.filter(function(d){return l.every(function(f){return String(o[f])===String(d[f])})}),u=c.filter(function(d){return d.disable_status!==1}),h=u.reduce(function(d,f){return d+=f.stock_num,d},0);return h>0},Lo=function(t,i,n){if(n===void 0&&(n={}),!(i!=null&&i.length))return t;var r=JSON.parse(JSON.stringify(t)),a={};return r.forEach(function(s){var o=s.k_s;s.v.forEach(function(l){var c=l.id;a[o+"-"+c]=[]})}),i.forEach(function(s){for(var o=1;o<=5;o++){var l="s"+o,c=s[l];if(c&&c!=="0"){var u=l+"-"+c;a[u]&&a[u].push(s)}}}),r.filter(function(s){var o=s.k_s,l=n[o]&&n[o]!==xt;if(s.v=s.v.filter(function(u){var h=u.id,d=o+"-"+h,f=a[d]||[];if(f.length>0){var v=f.every(function(x){return x.disable_status===1});if(v)return!1}if(l&&String(h)===String(n[o]))return!0;var g=Object.entries(n).filter(function(x){var k=x[0],C=x[1];return C!==xt&&k!==o});if(g.length>0){var y={};g.forEach(function(x){var k=x[0],C=x[1];y[k]=C}),y[o]=String(h);var b=i.filter(function(x){return Object.entries(y).every(function(k){var C=k[0],O=k[1];return String(x[C])===String(O)})});if(b.length>0){var S=b.every(function(x){return x.disable_status===1});return!S}}return!0}),l){var c=s.v.some(function(u){return String(u.id)===String(n[o])});return c}return s.v.length>0})},Ao=function(t,i){var n=Ip(t);return Object.keys(i).reduce(function(r,a){return i[a].forEach(function(s){r.push(m({},n[a][s]))}),r},[])},Ro=function(t,i){var n=[];return(t||[]).forEach(function(r){if(i[r.k_id]&&i[r.k_id].length>0){var a=[];r.v.forEach(function(s){i[r.k_id].indexOf(s.id)>-1&&a.push(m({},s))}),n.push(m({},r,{v:a}))}}),n};const Op={normalizeSkuTree:Eo,getSkuComb:No,getSelectedSkuValues:Mo,isAllSelected:Do,isSkuChoosable:ar,getSelectedPropValues:Ao,getSelectedProperties:Ro,filterDisabledSkuTree:Lo};var Vo=p("sku-header"),Pp=Vo[0],sr=Vo[1];function Bp(e,t){var i;return e.tree.some(function(n){var r=t[n.k_s];if(r&&n.v){var a=n.v.filter(function(o){return o.id===r})[0]||{},s=a.previewImgUrl||a.imgUrl||a.img_url;if(s)return i=m({},a,{ks:n.k_s,imgUrl:s}),!0}return!1}),i}function zo(e,t,i,n){var r,a=t.sku,s=t.goods,o=t.skuEventBus,l=t.selectedSku,c=t.showHeaderImage,u=c===void 0?!0:c,h=Bp(a,l),d=h?h.imgUrl:s.picture,f=function(){o.$emit("sku:previewImage",h)};return e("div",T([{class:[sr(),me]},B(n)]),[u&&e(oe,{attrs:{fit:"cover",src:d},class:sr("img-wrap"),on:{click:f}},[(r=i["sku-header-image-extra"])==null?void 0:r.call(i)]),e("div",{class:sr("goods-info")},[i.default==null?void 0:i.default()])])}zo.props={sku:Object,goods:Object,skuEventBus:Object,selectedSku:Object,showHeaderImage:Boolean};const Fo=Pp(zo);var Ho=p("sku-header-item"),Ep=Ho[0],Dp=Ho[1];function Np(e,t,i,n){return e("div",T([{class:Dp()},B(n)]),[i.default&&i.default()])}const Ci=Ep(Np);var or=p("sku-row"),Mp=or[0],yt=or[1],Lp=or[2];const lr=Mp({mixins:[G("vanSkuRows"),ut(function(e){this.scrollable&&this.$refs.scroller&&e(this.$refs.scroller,"scroll",this.onScroll)})],props:{skuRow:Object},data:function(){return{progress:0}},computed:{scrollable:function(){return this.skuRow.largeImageMode&&this.skuRow.v.length>6}},methods:{onScroll:function(){var t=this.$refs,i=t.scroller,n=t.row,r=n.offsetWidth-i.offsetWidth;this.progress=i.scrollLeft/r},genTitle:function(){var t=this.$createElement;return t("div",{class:yt("title")},[this.skuRow.k,this.skuRow.is_multiple&&t("span",{class:yt("title-multiple")},["(",Lp("multiple"),")"])])},genIndicator:function(){var t=this.$createElement;if(this.scrollable){var i={transform:"translate3d("+this.progress*20+"px, 0, 0)"};return t("div",{class:yt("indicator-wrapper")},[t("div",{class:yt("indicator")},[t("div",{class:yt("indicator-slider"),style:i})])])}},genContent:function(){var t=this.$createElement,i=this.slots();if(this.skuRow.largeImageMode){var n=[],r=[];return i.forEach(function(a,s){var o=Math.floor(s/3)%2===0?n:r;o.push(a)}),t("div",{class:yt("scroller"),ref:"scroller"},[t("div",{class:yt("row"),ref:"row"},[n]),r.length?t("div",{class:yt("row")},[r]):null])}return i},centerItem:function(t){if(!(!this.skuRow.largeImageMode||!t)){var i=this.children,n=i===void 0?[]:i,r=this.$refs,a=r.scroller,s=r.row,o=n.find(function(u){return+u.skuValue.id==+t});if(a&&s&&o&&o.$el){var l=o.$el,c=l.offsetLeft-(a.offsetWidth-l.offsetWidth)/2;a.scrollLeft=c}}}},render:function(){var t=arguments[0];return t("div",{class:[yt(),me]},[this.genTitle(),this.genContent(),this.genIndicator()])}});var Ap=p("sku-row-item"),Rp=Ap[0];const jo=Rp({mixins:[X("vanSkuRows")],props:{lazyLoad:Boolean,skuValue:Object,skuKeyStr:String,skuEventBus:Object,selectedSku:Object,largeImageMode:Boolean,disableSoldoutSku:Boolean,skuList:{type:Array,default:function(){return[]}}},computed:{imgUrl:function(){var t=this.skuValue.imgUrl||this.skuValue.img_url;return this.largeImageMode?t||"https://img01.yzcdn.cn/upload_files/2020/06/24/FmKWDg0bN9rMcTp9ne8MXiQWGtLn.png":t},choosable:function(){return this.disableSoldoutSku?ar(this.skuList,this.selectedSku,{key:this.skuKeyStr,valueId:this.skuValue.id}):!0}},methods:{onSelect:function(){this.choosable&&this.skuEventBus.$emit("sku:select",m({},this.skuValue,{skuKeyStr:this.skuKeyStr}))},onPreviewImg:function(t){t.stopPropagation();var i=this.skuValue,n=this.skuKeyStr;this.skuEventBus.$emit("sku:previewImage",m({},i,{ks:n,imgUrl:i.imgUrl||i.img_url}))},genImage:function(t){var i=this.$createElement;if(this.imgUrl)return i(oe,{attrs:{fit:"cover",src:this.imgUrl,lazyLoad:this.lazyLoad},class:t+"-img"})}},render:function(){var t=arguments[0],i=this.skuValue.id===this.selectedSku[this.skuKeyStr],n=this.largeImageMode?yt("image-item"):yt("item");return t("span",{class:[n,i?n+"--active":"",this.choosable?"":n+"--disabled"],on:{click:this.onSelect}},[this.genImage(n),t("div",{class:n+"-name"},[this.largeImageMode?t("span",{class:{"van-multi-ellipsis--l2":this.largeImageMode}},[this.skuValue.name]):this.skuValue.name]),this.largeImageMode&&t(w,{attrs:{name:"enlarge"},class:n+"-img-icon",on:{click:this.onPreviewImg}})])}});var Vp=p("sku-row-prop-item"),zp=Vp[0];const Wo=zp({props:{skuValue:Object,skuKeyStr:String,skuEventBus:Object,selectedProp:Object,multiple:Boolean,disabled:Boolean},computed:{choosed:function(){var t=this.selectedProp,i=this.skuKeyStr,n=this.skuValue;return t&&t[i]?t[i].indexOf(n.id)>-1:!1}},methods:{onSelect:function(){this.disabled||this.skuEventBus.$emit("sku:propSelect",m({},this.skuValue,{skuKeyStr:this.skuKeyStr,multiple:this.multiple}))}},render:function(){var t=arguments[0];return t("span",{class:["van-sku-row__item",{"van-sku-row__item--active":this.choosed},{"van-sku-row__item--disabled":this.disabled}],on:{click:this.onSelect}},[t("span",{class:"van-sku-row__item-name"},[this.skuValue.name])])}});var Uo=p("stepper"),Fp=Uo[0],$i=Uo[1],Hp=600,jp=200;function wi(e,t){return String(e)===String(t)}const qo=Fp({mixins:[Lt],props:{value:null,theme:String,integer:Boolean,disabled:Boolean,allowEmpty:Boolean,inputWidth:[Number,String],buttonSize:[Number,String],asyncChange:Boolean,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,decimalLength:[Number,String],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},showInput:{type:Boolean,default:!0},longPress:{type:Boolean,default:!0}},data:function(){var t,i=(t=this.value)!=null?t:this.defaultValue,n=this.format(i);return wi(n,this.value)||this.$emit("input",n),{currentValue:n}},computed:{minusDisabled:function(){return this.disabled||this.disableMinus||this.currentValue<=+this.min},plusDisabled:function(){return this.disabled||this.disablePlus||this.currentValue>=+this.max},inputStyle:function(){var t={};return this.inputWidth&&(t.width=P(this.inputWidth)),this.buttonSize&&(t.height=P(this.buttonSize)),t},buttonStyle:function(){if(this.buttonSize){var t=P(this.buttonSize);return{width:t,height:t}}}},watch:{max:"check",min:"check",integer:"check",decimalLength:"check",value:function(t){wi(t,this.currentValue)||(this.currentValue=this.format(t))},currentValue:function(t){this.$emit("input",t),this.$emit("change",t,{name:this.name})}},methods:{check:function(){var t=this.format(this.currentValue);wi(t,this.currentValue)||(this.currentValue=t)},formatNumber:function(t){return Jr(String(t),!this.integer)},format:function(t){return this.allowEmpty&&t===""||(t=this.formatNumber(t),t=t===""?0:+t,t=Vi(t)?this.min:t,t=Math.max(Math.min(this.max,t),this.min),_(this.decimalLength)&&(t=t.toFixed(this.decimalLength))),t},onInput:function(t){var i=t.target.value,n=this.formatNumber(i);if(_(this.decimalLength)&&n.indexOf(".")!==-1){var r=n.split(".");n=r[0]+"."+r[1].slice(0,this.decimalLength)}wi(i,n)||(t.target.value=n),n===String(+n)&&(n=+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);return}var i=t==="minus"?-this.step:+this.step,n=this.format(Qr(+this.currentValue,i));this.emitChange(n),this.$emit(t)},onFocus:function(t){this.disableInput&&this.$refs.input?this.$refs.input.blur():this.$emit("focus",t)},onBlur:function(t){var i=this.format(t.target.value);t.target.value=i,this.emitChange(i),this.$emit("blur",t),ua()},longPressStep:function(){var t=this;this.longPressTimer=setTimeout(function(){t.onChange(),t.longPressStep(t.type)},jp)},onTouchStart:function(){var t=this;this.longPress&&(clearTimeout(this.longPressTimer),this.isLongPress=!1,this.longPressTimer=setTimeout(function(){t.isLongPress=!0,t.onChange(),t.longPressStep()},Hp))},onTouchEnd:function(t){this.longPress&&(clearTimeout(this.longPressTimer),this.isLongPress&&z(t))},onMousedown:function(t){this.disableInput&&t.preventDefault()}},render:function(){var t=this,i=arguments[0],n=function(a){return{on:{click:function(o){o.preventDefault(),t.type=a,t.onChange()},touchstart:function(){t.type=a,t.onTouchStart()},touchend:t.onTouchEnd,touchcancel:t.onTouchEnd}}};return i("div",{class:$i([this.theme])},[i("button",T([{directives:[{name:"show",value:this.showMinus}],attrs:{type:"button"},style:this.buttonStyle,class:$i("minus",{disabled:this.minusDisabled})},n("minus")])),i("input",{directives:[{name:"show",value:this.showInput}],ref:"input",attrs:{type:this.integer?"tel":"text",role:"spinbutton",disabled:this.disabled,readonly:this.disableInput,inputmode:this.integer?"numeric":"decimal",placeholder:this.placeholder,"aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.currentValue},class:$i("input"),domProps:{value:this.currentValue},style:this.inputStyle,on:{input:this.onInput,focus:this.onFocus,blur:this.onBlur,mousedown:this.onMousedown}}),i("button",T([{directives:[{name:"show",value:this.showPlus}],attrs:{type:"button"},style:this.buttonStyle,class:$i("plus",{disabled:this.plusDisabled})},n("plus")]))])}});var Ko=p("sku-stepper"),Wp=Ko[0],xi=Ko[2],Up=ki.QUOTA_LIMIT,Yo=ki.STOCK_LIMIT;const Xo=Wp({props:{stock:Number,skuEventBus:Object,skuStockNum:Number,selectedNum:Number,stepperTitle:String,disableStepperInput:Boolean,customStepperConfig:Object,hideQuotaText:Boolean,quota:{type:Number,default:0},quotaUsed:{type:Number,default:0},startSaleNum:{type:Number,default:1}},data:function(){return{currentNum:this.selectedNum,limitType:Yo}},watch:{currentNum:function(t){var i=parseInt(t,10);i>=this.stepperMinLimit&&i<=this.stepperLimit&&this.skuEventBus.$emit("sku:numChange",i)},stepperLimit:function(t){t<this.currentNum&&this.stepperMinLimit<=t&&(this.currentNum=t),this.checkState(this.stepperMinLimit,t)},stepperMinLimit:function(t){(t>this.currentNum||t>this.stepperLimit)&&(this.currentNum=t),this.checkState(t,this.stepperLimit)}},computed:{stepperLimit:function(){var t=this.quota-this.quotaUsed,i;return this.quota>0&&t<=this.stock?(i=t<0?0:t,this.limitType=Up):(i=this.stock,this.limitType=Yo),i},stepperMinLimit:function(){return this.startSaleNum<1?1:this.startSaleNum},quotaText:function(){var t=this.customStepperConfig,i=t.quotaText,n=t.hideQuotaText;if(n)return"";var r="";if(i)r=i;else{var a=[];this.startSaleNum>1&&a.push(xi("quotaStart",this.startSaleNum)),this.quota>0&&a.push(xi("quotaLimit",this.quota)),r=a.join(xi("comma"))}return r}},created:function(){this.checkState(this.stepperMinLimit,this.stepperLimit)},methods:{setCurrentNum:function(t){this.currentNum=t,this.checkState(this.stepperMinLimit,this.stepperLimit)},onOverLimit:function(t){this.skuEventBus.$emit("sku:overLimit",{action:t,limitType:this.limitType,quota:this.quota,quotaUsed:this.quotaUsed,startSaleNum:this.startSaleNum})},onChange:function(t){var i=parseInt(t,10),n=this.customStepperConfig.handleStepperChange;n&&n(i),this.$emit("change",i)},checkState:function(t,i){this.currentNum<t||t>i?this.currentNum=t:this.currentNum>i&&(this.currentNum=i),this.skuEventBus.$emit("sku:stepperState",{valid:t<=i,min:t,max:i,limitType:this.limitType,quota:this.quota,quotaUsed:this.quotaUsed,startSaleNum:this.startSaleNum})}},render:function(){var t=this,i=arguments[0];return i("div",{class:"van-sku-stepper-stock"},[i("div",{class:"van-sku__stepper-title"},[this.stepperTitle||xi("num")]),i(qo,{attrs:{integer:!0,min:this.stepperMinLimit,max:this.stepperLimit,disableInput:this.disableStepperInput},class:"van-sku__stepper",on:{overlimit:this.onOverLimit,change:this.onChange},model:{value:t.currentNum,callback:function(r){t.currentNum=r}}}),!this.hideQuotaText&&this.quotaText&&i("span",{class:"van-sku__stepper-quota"},["(",this.quotaText,")"])])}});function qp(e){var t=/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;return t.test(e.trim())}function Go(e){return Array.isArray(e)?e:[e]}function Zo(e,t){return new Promise(function(i){if(t==="file"){i(null);return}var n=new FileReader;n.onload=function(r){i(r.target.result)},t==="dataUrl"?n.readAsDataURL(e):t==="text"&&n.readAsText(e)})}function Jo(e,t){return Go(e).some(function(i){return i?ie(t)?t(i):i.size>t:!1})}var Kp=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;function Yp(e){return Kp.test(e)}function Qo(e){return e.isImage?!0:e.file&&e.file.type?e.file.type.indexOf("image")===0:e.url?Yp(e.url):e.content?e.content.indexOf("data:image")===0:!1}var tl=p("uploader"),Xp=tl[0],R=tl[1];const el=Xp({inheritAttrs:!1,mixins:[Lt],model:{prop:"fileList"},props:{disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,uploadText:String,afterRead:Function,beforeRead:Function,beforeDelete:Function,previewSize:[Number,String],previewOptions:Object,name:{type:[Number,String],default:""},accept:{type:String,default:"image/*"},fileList:{type:Array,default:function(){return[]}},maxSize:{type:[Number,String,Function],default:Number.MAX_VALUE},maxCount:{type:[Number,String],default:Number.MAX_VALUE},deletable:{type:Boolean,default:!0},showUpload:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},previewFullImage:{type:Boolean,default:!0},imageFit:{type:String,default:"cover"},resultType:{type:String,default:"dataUrl"},uploadIcon:{type:String,default:"photograph"}},computed:{previewSizeWithUnit:function(){return P(this.previewSize)},value:function(){return this.fileList}},created:function(){this.urls=[]},beforeDestroy:function(){this.urls.forEach(function(t){return URL.revokeObjectURL(t)})},methods:{getDetail:function(t){return t===void 0&&(t=this.fileList.length),{name:this.name,index:t}},onChange:function(t){var i=this,n=t.target.files;if(!(this.disabled||!n.length)){if(n=n.length===1?n[0]:[].slice.call(n),this.beforeRead){var r=this.beforeRead(n,this.getDetail());if(!r){this.resetInput();return}if(Re(r)){r.then(function(a){a?i.readFile(a):i.readFile(n)}).catch(this.resetInput);return}}this.readFile(n)}},readFile:function(t){var i=this,n=Jo(t,this.maxSize);if(Array.isArray(t)){var r=this.maxCount-this.fileList.length;t.length>r&&(t=t.slice(0,r)),Promise.all(t.map(function(a){return Zo(a,i.resultType)})).then(function(a){var s=t.map(function(o,l){var c={file:o,status:"",message:""};return a[l]&&(c.content=a[l]),c});i.onAfterRead(s,n)})}else Zo(t,this.resultType).then(function(a){var s={file:t,status:"",message:""};a&&(s.content=a),i.onAfterRead(s,n)})},onAfterRead:function(t,i){var n=this;this.resetInput();var r=t;if(i){var a=t;Array.isArray(t)?(a=[],r=[],t.forEach(function(o){o.file&&(Jo(o.file,n.maxSize)?a.push(o):r.push(o))})):r=null,this.$emit("oversize",a,this.getDetail())}var s=Array.isArray(r)?!!r.length:!!r;s&&(this.$emit("input",[].concat(this.fileList,Go(r))),this.afterRead&&this.afterRead(r,this.getDetail()))},onDelete:function(t,i){var n,r=this,a=(n=t.beforeDelete)!=null?n:this.beforeDelete;if(a){var s=a(t,this.getDetail(i));if(!s)return;if(Re(s)){s.then(function(){r.deleteFile(t,i)}).catch(pe);return}}this.deleteFile(t,i)},deleteFile:function(t,i){var n=this.fileList.slice(0);n.splice(i,1),this.$emit("input",n),this.$emit("delete",t,this.getDetail(i))},resetInput:function(){this.$refs.input&&(this.$refs.input.value="")},onClickUpload:function(t){this.$emit("click-upload",t)},onPreviewImage:function(t){var i=this;if(this.previewFullImage){var n=this.fileList.filter(function(a){return Qo(a)}),r=n.map(function(a){return a.file&&!a.url&&a.status!=="failed"&&(a.url=URL.createObjectURL(a.file),i.urls.push(a.url)),a.url});this.imagePreview=Hn(m({images:r,startPosition:n.indexOf(t),onClose:function(){i.$emit("close-preview")}},this.previewOptions))}},closeImagePreview:function(){this.imagePreview&&this.imagePreview.close()},chooseFile:function(){this.disabled||this.$refs.input&&this.$refs.input.click()},genPreviewMask:function(t){var i=this.$createElement,n=t.status,r=t.message;if(n==="uploading"||n==="failed"){var a=n==="failed"?i(w,{attrs:{name:"close"},class:R("mask-icon")}):i(ht,{class:R("loading")}),s=_(r)&&r!=="";return i("div",{class:R("mask")},[a,s&&i("div",{class:R("mask-message")},[r])])}},genPreviewItem:function(t,i){var n,r=this,a,s,o=this.$createElement,l=(n=t.deletable)!=null?n:this.deletable,c=t.status!=="uploading"&&l,u=c&&o("div",{class:R("preview-delete"),on:{click:function(b){b.stopPropagation(),r.onDelete(t,i)}}},[o(w,{attrs:{name:"cross"},class:R("preview-delete-icon")})]),h=this.slots("preview-cover",m({index:i},t)),d=h&&o("div",{class:R("preview-cover")},[h]),f=(a=t.previewSize)!=null?a:this.previewSize,v=(s=t.imageFit)!=null?s:this.imageFit,g=Qo(t)?o(oe,{attrs:{fit:v,src:t.content||t.url,width:f,height:f,lazyLoad:this.lazyLoad},class:R("preview-image"),on:{click:function(){r.onPreviewImage(t)}}},[d]):o("div",{class:R("file"),style:{width:this.previewSizeWithUnit,height:this.previewSizeWithUnit}},[o(w,{class:R("file-icon"),attrs:{name:"description"}}),o("div",{class:[R("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url]),d]);return o("div",{class:R("preview"),on:{click:function(){r.$emit("click-preview",t,r.getDetail(i))}}},[g,this.genPreviewMask(t),u])},genPreviewList:function(){if(this.previewImage)return this.fileList.map(this.genPreviewItem)},genUpload:function(){var t=this.$createElement;if(!(this.fileList.length>=this.maxCount)){var i=this.slots(),n=this.readonly?null:t("input",{attrs:m({},this.$attrs,{type:"file",accept:this.accept,disabled:this.disabled}),ref:"input",class:R("input"),on:{change:this.onChange}});if(i)return t("div",{class:R("input-wrapper"),key:"input-wrapper",on:{click:this.onClickUpload}},[i,n]);var r;if(this.previewSize){var a=this.previewSizeWithUnit;r={width:a,height:a}}return t("div",{directives:[{name:"show",value:this.showUpload}],class:R("upload",{readonly:this.readonly}),style:r,on:{click:this.onClickUpload}},[t(w,{attrs:{name:this.uploadIcon},class:R("upload-icon")}),this.uploadText&&t("span",{class:R("upload-text")},[this.uploadText]),n])}}},render:function(){var t=arguments[0];return t("div",{class:R()},[t("div",{class:R("wrapper",{disabled:this.disabled})},[this.genPreviewList(),this.genUpload()])])}});var il=p("sku-img-uploader"),Gp=il[0],cr=il[2];const Zp=Gp({props:{value:String,uploadImg:Function,customUpload:Function,maxSize:{type:Number,default:6}},data:function(){return{fileList:[]}},watch:{value:function(t){t?this.fileList=[{url:t,isImage:!0}]:this.fileList=[]}},methods:{afterReadFile:function(t){var i=this;t.status="uploading",t.message=cr("uploading"),this.uploadImg(t.file,t.content).then(function(n){t.status="done",i.$emit("input",n)}).catch(function(){t.status="failed",t.message=cr("fail")})},onOversize:function(){this.$toast(cr("oversize",this.maxSize))},onDelete:function(){this.$emit("input","")},onClickUpload:function(){var t=this;this.customUpload&&this.customUpload().then(function(i){t.fileList.push({url:i}),t.$emit("input",i)})}},render:function(){var t=this,i=arguments[0];return i(el,{attrs:{maxCount:1,readonly:!!this.customUpload,maxSize:this.maxSize*1024*1024,afterRead:this.afterReadFile},on:{oversize:this.onOversize,delete:this.onDelete,"click-upload":this.onClickUpload},model:{value:t.fileList,callback:function(r){t.fileList=r}}})}});function Jp(e){return e?new Date(e.replace(/-/g,"/")):null}function Qp(e,t){if(t===void 0&&(t="date"),!e)return"";var i=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),a=i+"-"+N(n)+"-"+N(r);if(t==="datetime"){var s=e.getHours(),o=e.getMinutes();a+=" "+N(s)+":"+N(o)}return a}var nl=p("sku-datetime-field"),tv=nl[0],rl=nl[2];const ev=tv({props:{value:String,label:String,required:Boolean,placeholder:String,type:{type:String,default:"date"}},data:function(){return{showDatePicker:!1,currentDate:this.type==="time"?"":new Date,minDate:new Date(new Date().getFullYear()-60,0,1)}},watch:{value:function(t){switch(this.type){case"time":this.currentDate=t;break;case"date":case"datetime":this.currentDate=Jp(t)||new Date;break}}},computed:{title:function(){return rl("title."+this.type)}},methods:{onClick:function(){this.showDatePicker=!0},onConfirm:function(t){var i=t;this.type!=="time"&&(i=Qp(t,this.type)),this.$emit("input",i),this.showDatePicker=!1},onCancel:function(){this.showDatePicker=!1},formatter:function(t,i){var n=rl("format."+t);return""+i+n}},render:function(){var t=this,i=arguments[0];return i(rt,{attrs:{readonly:!0,"is-link":!0,center:!0,value:this.value,label:this.label,required:this.required,placeholder:this.placeholder},on:{click:this.onClick}},[i(St,{attrs:{round:!0,position:"bottom",getContainer:"body"},slot:"extra",model:{value:t.showDatePicker,callback:function(r){t.showDatePicker=r}}},[i(_s,{attrs:{type:this.type,title:this.title,value:this.currentDate,minDate:this.minDate,formatter:this.formatter},on:{cancel:this.onCancel,confirm:this.onConfirm}})])])}});var ur=p("sku-messages"),iv=ur[0],he=ur[1],Qt=ur[2];const al=iv({props:{messageConfig:Object,goodsId:[Number,String],messages:{type:Array,default:function(){return[]}}},data:function(){return{messageValues:this.resetMessageValues(this.messages)}},watch:{messages:function(t){this.messageValues=this.resetMessageValues(t)}},methods:{resetMessageValues:function(t){var i=this.messageConfig,n=i.initialMessages,r=n===void 0?{}:n;return(t||[]).map(function(a){return{value:r[a.name]||""}})},getType:function(t){return+t.multiple==1?"textarea":t.type==="id_no"?"text":t.datetime>0?"datetime":t.type},getMessages:function(){var t={};return this.messageValues.forEach(function(i,n){t["message_"+n]=i.value}),t},getCartMessages:function(){var t=this,i={};return this.messageValues.forEach(function(n,r){var a=t.messages[r];i[a.name]=n.value}),i},getPlaceholder:function(t){var i=+t.multiple==1?"textarea":t.type,n=this.messageConfig.placeholderMap||{};return t.placeholder||n[i]||Qt("placeholder."+i)},validateMessages:function(){for(var t=this.messageValues,i=0;i<t.length;i++){var n=t[i].value,r=this.messages[i];if(n===""){if(String(r.required)==="1"){var a=Qt(r.type==="image"?"upload":"fill");return a+r.name}}else{if(r.type==="tel"&&!Ri(n))return Qt("invalid.tel");if(r.type==="mobile"&&!/^\d{6,20}$/.test(n))return Qt("invalid.mobile");if(r.type==="email"&&!qp(n))return Qt("invalid.email");if(r.type==="id_no"&&(n.length<15||n.length>18))return Qt("invalid.id_no")}}},getFormatter:function(t){return function(n){return t.type==="mobile"||t.type==="tel"?n.replace(/[^\d.]/g,""):n}},getExtraDesc:function(t){var i=this.$createElement,n=t.extraDesc;if(n)return i("div",{class:he("extra-message")},[n])},genMessage:function(t,i){var n=this,r=this.$createElement;if(t.type==="image")return r(q,{key:this.goodsId+"-"+i,attrs:{title:t.name,required:String(t.required)==="1",valueClass:he("image-cell-value")},class:he("image-cell")},[r(Zp,{attrs:{maxSize:this.messageConfig.uploadMaxSize,uploadImg:this.messageConfig.uploadImg,customUpload:this.messageConfig.customUpload},model:{value:n.messageValues[i].value,callback:function(o){n.$set(n.messageValues[i],"value",o)}}}),r("div",{class:he("image-cell-label")},[Qt("imageLabel")])]);var a=["date","time"].indexOf(t.type)>-1;return a?r(ev,{attrs:{label:t.name,required:String(t.required)==="1",placeholder:this.getPlaceholder(t),type:this.getType(t)},key:this.goodsId+"-"+i,model:{value:n.messageValues[i].value,callback:function(o){n.$set(n.messageValues[i],"value",o)}}}):r("div",{class:he("cell-block")},[r(rt,{attrs:{maxlength:"200",center:!t.multiple,label:t.name,required:String(t.required)==="1",placeholder:this.getPlaceholder(t),type:this.getType(t),formatter:this.getFormatter(t),border:!1},key:this.goodsId+"-"+i,model:{value:n.messageValues[i].value,callback:function(o){n.$set(n.messageValues[i],"value",o)}}}),this.getExtraDesc(t)])}},render:function(){var t=arguments[0];return t("div",{class:he()},[this.messages.map(this.genMessage)])}});var hr=p("sku-actions"),nv=hr[0],rv=hr[1],sl=hr[2];function ol(e,t,i,n){var r=function(s){return function(){t.skuEventBus.$emit(s)}};return e("div",T([{class:rv()},B(n)]),[t.showAddCartBtn&&e(F,{attrs:{size:"large",type:"warning",text:t.addCartText||sl("addCart")},on:{click:r("sku:addCart")}}),e(F,{attrs:{size:"large",type:"danger",text:t.buyText||sl("buy")},on:{click:r("sku:buy")}})])}ol.props={buyText:String,addCartText:String,skuEventBus:Object,showAddCartBtn:Boolean};const ll=nv(ol);var dr=p("sku"),av=dr[0],sv=dr[1],lt=dr[2],ov=ki.QUOTA_LIMIT;const bt=av({props:{sku:Object,goods:Object,value:Boolean,buyText:String,goodsId:[Number,String],priceTag:String,lazyLoad:Boolean,hideStock:Boolean,properties:Array,skuProperties:Array,addCartText:String,stepperTitle:String,getContainer:[String,Function],hideQuotaText:Boolean,hideSelectedText:Boolean,resetStepperOnHide:Boolean,customSkuValidator:Function,disableStepperInput:Boolean,resetSelectedSkuOnHide:Boolean,quota:{type:Number,default:0},quotaUsed:{type:Number,default:0},startSaleNum:{type:Number,default:1},initialSku:{type:Object,default:function(){return{}}},stockThreshold:{type:Number,default:50},showSoldoutSku:{type:Boolean,default:!0},showAddCartBtn:{type:Boolean,default:!0},disableSoldoutSku:{type:Boolean,default:!0},customStepperConfig:{type:Object,default:function(){return{}}},showHeaderImage:{type:Boolean,default:!0},previewOnClickImage:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},bodyOffsetTop:{type:Number,default:200},messageConfig:{type:Object,default:function(){return{initialMessages:{},placeholderMap:{},uploadImg:function(){return Promise.resolve()},uploadMaxSize:5}}}},data:function(){return{selectedSku:{},selectedProp:{},selectedNum:1,show:this.value,currentSkuProperties:[]}},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())},value:function(t){this.show=t},initialSku:function(){this.resetStepper(),this.resetSelectedSku()}},computed:{isSkuProperties:function(){return this.skuProperties&&this.skuProperties.length},skuGroupClass:function(){return["van-sku-group-container",{"van-sku-group-container--hide-soldout":!this.showSoldoutSku}]},bodyStyle:function(){if(!this.$isServer){var t=window.innerHeight-this.bodyOffsetTop;return{maxHeight:t+"px"}}},isSkuCombSelected:function(){var t=this;return this.hasSku&&!Do(this.skuTree,this.selectedSku)?!1:!this.propList.filter(function(i){return i.is_necessary!==!1}).some(function(i){return(t.selectedProp[i.k_id]||[]).length===0})},isSkuEmpty:function(){return Object.keys(this.sku).length===0},hasSku:function(){return!this.sku.none_sku},hasSkuOrAttr:function(){return this.hasSku||this.propList.length>0},selectedSkuComb:function(){var t=null;return(this.isSkuCombSelected||this.isSkuProperties)&&(this.hasSku?t=No(this.skuList,this.selectedSku):t={id:this.sku.collection_id,price:Math.round(this.sku.price*100),stock_num:this.sku.stock_num},this.setCurrentSkuProperties(t?t.id:null),t&&(t.properties=Ro(this.propList,this.selectedProp),t.property_price=this.selectedPropValues.reduce(function(i,n){return i+(n.price||0)},0))),t},selectedSkuValues:function(){return Mo(this.skuTree,this.selectedSku)},selectedPropValues:function(){return Ao(this.propList,this.selectedProp)},price:function(){return this.selectedSkuComb?((this.selectedSkuComb.price+this.selectedSkuComb.property_price)/100).toFixed(2):this.sku.price},originPrice:function(){return this.selectedSkuComb&&this.selectedSkuComb.origin_price?((this.selectedSkuComb.origin_price+this.selectedSkuComb.property_price)/100).toFixed(2):this.sku.origin_price},skuTree:function(){var t=this.sku.tree||[];return!t.length||!this.skuList.length?t:Lo(t,this.skuList,this.selectedSku)},skuList:function(){return this.sku.list||[]},propList:function(){return this.isSkuProperties?this.currentSkuProperties:this.properties||[]},imageList:function(){var t=[this.goods.picture];return this.skuTree.length>0&&this.skuTree.forEach(function(i){i.v&&i.v.forEach(function(n){var r=n.previewImgUrl||n.imgUrl||n.img_url;r&&t.indexOf(r)===-1&&t.push(r)})}),t},stock:function(){var t=this.customStepperConfig.stockNum;return t!==void 0?t:this.selectedSkuComb?this.selectedSkuComb.stock_num:this.sku.stock_num},stockText:function(){var t=this.$createElement,i=this.customStepperConfig.stockFormatter;return i?i(this.stock):[lt("stock")+" ",t("span",{class:sv("stock-num",{highlight:this.stock<this.stockThreshold})},[this.stock])," "+lt("stockUnit")]},selectedText:function(){var t=this;if(this.selectedSkuComb){var i=this.selectedSkuValues.concat(this.selectedPropValues);return lt("selected")+" "+i.map(function(a){return a.name}).join(" ")}var n=this.skuTree.filter(function(a){return t.selectedSku[a.k_s]===xt}).map(function(a){return a.k}),r=this.propList.filter(function(a){return(t.selectedProp[a.k_id]||[]).length<1}).map(function(a){return a.k});return lt("select")+" "+n.concat(r).join(" ")}},created:function(){var t=new $;this.skuEventBus=t,t.$on("sku:select",this.onSelect),t.$on("sku:propSelect",this.onPropSelect),t.$on("sku:numChange",this.onNumChange),t.$on("sku:previewImage",this.onPreviewImage),t.$on("sku:overLimit",this.onOverLimit),t.$on("sku:stepperState",this.onStepperState),t.$on("sku:addCart",this.onAddCart),t.$on("sku:buy",this.onBuy),this.resetStepper(),this.resetSelectedSku(),this.$emit("after-sku-create",t)},methods:{setCurrentSkuProperties:function(t){var i,n=((i=this.skuProperties)==null?void 0:i.find(function(r){return r.sku_id===t}))||{};this.currentSkuProperties=n.properties||[]},resetStepper:function(){var t=this.$refs.skuStepper,i=this.initialSku.selectedNum,n=i??this.startSaleNum;this.stepperError=null,t?t.setCurrentNum(n):this.selectedNum=n},resetSelectedSku:function(){var t=this;this.selectedSku={};var i=this.checkInitialSkuDisabled();if(i){this.resetSelectedProp();return}this.skuTree.forEach(function(r){t.selectedSku[r.k_s]=xt}),this.skuTree.forEach(function(r){var a=r.k_s,s=r.v.length===1?r.v[0].id:t.initialSku[a];if(s&&ar(t.skuList,t.selectedSku,{key:a,valueId:s})){var o=t.skuList.filter(function(c){return String(c[a])===String(s)}),l=o.some(function(c){return c.disable_status!==1});l&&(t.selectedSku[a]=s)}});var n=this.selectedSkuValues;n.length>0&&this.$nextTick(function(){t.$emit("sku-selected",{skuValue:n[n.length-1],selectedSku:t.selectedSku,selectedSkuComb:t.selectedSkuComb})}),this.resetSelectedProp(),this.$emit("sku-reset",{selectedSku:this.selectedSku,selectedProp:this.selectedProp,selectedSkuComb:this.selectedSkuComb}),this.centerInitialSku()},checkInitialSkuDisabled:function(){var t=this;if(Tr(this.initialSku)||!this.skuList.length)return!1;var i=["s1","s2","s3","s4","s5"],n=i.filter(function(a){return t.initialSku[a]!==void 0&&t.initialSku[a]!==xt&&t.initialSku[a]!==""});if(!n.length)return!1;var r=this.skuList.filter(function(a){return n.every(function(s){return String(a[s])===String(t.initialSku[s])})});return!r.length||r.every(function(a){return a.disable_status===1})},resetSelectedProp:function(){var t=this;this.selectedProp={};var i=this.initialSku.selectedProp,n=i===void 0?{}:i;this.propList.forEach(function(a){n[a.k_id]&&(t.selectedProp[a.k_id]=n[a.k_id])}),Tr(this.selectedProp)&&this.propList.forEach(function(a){var s;if((a==null||(s=a.v)==null?void 0:s.length)>0){var o=a.v,l=a.k_id,c=o.some(function(h){return+h.price!=0});if(!c){var u=o.find(function(h){return h.text_status!==0});u&&(t.selectedProp[l]=[u.id])}}});var r=this.selectedPropValues;r.length>0&&this.$emit("sku-prop-selected",{propValue:r[r.length-1],selectedProp:this.selectedProp,selectedSkuComb:this.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(this.selectedNum===0)return lt("unavailable");if(this.isSkuCombSelected)return this.validateSkuMessages();if(this.customSkuValidator){var t=this.customSkuValidator(this);if(t)return t}return lt("selectSku")},onSelect:function(t){var i=this,n=m({},this.selectedSku);n[t.skuKeyStr]===t.id?n[t.skuKeyStr]=xt:n[t.skuKeyStr]=t.id,this.selectedSku=n,this.isSkuProperties&&(this.selectedProp={},this.onPropClear()),this.$nextTick(function(){i.$emit("sku-selected",{skuValue:t,selectedSku:i.selectedSku,selectedSkuComb:i.selectedSkuComb})})},onPropClear:function(){this.$emit("sku-prop-clear")},onPropSelect:function(t){var i,n=this.selectedProp[t.skuKeyStr]||[],r=n.indexOf(t.id);r>-1?n.splice(r,1):t.multiple?n.push(t.id):n.splice(0,1,t.id),this.selectedProp=m({},this.selectedProp,(i={},i[t.skuKeyStr]=n,i)),this.$emit("sku-prop-selected",{propValue:t,selectedProp:this.selectedProp,selectedSkuComb:this.selectedSkuComb})},onNumChange:function(t){this.selectedNum=t},onPreviewImage:function(t){var i=this,n=this.imageList,r=0,a=n[0];t&&t.imgUrl&&(this.imageList.some(function(o,l){return o===t.imgUrl?(r=l,!0):!1}),a=t.imgUrl);var s=m({},t,{index:r,imageList:this.imageList,indexImage:a});this.$emit("open-preview",s),this.previewOnClickImage&&Hn({images:this.imageList,startPosition:r,onClose:function(){i.$emit("close-preview",s)}})},onOverLimit:function(t){var i=t.action,n=t.limitType,r=t.quota,a=t.quotaUsed,s=this.customStepperConfig.handleOverLimit;if(s){s(t);return}i==="minus"?this.startSaleNum>1?L(lt("minusStartTip",this.startSaleNum)):L(lt("minusTip")):i==="plus"&&(n===ov?a>0?L(lt("quotaUsedTip",r,a)):L(lt("quotaTip",r)):L(lt("soldout")))},onStepperState:function(t){this.stepperError=t.valid?null:m({},t,{action:"plus"})},onAddCart:function(){this.onBuyOrAddCart("add-cart")},onBuy:function(){this.onBuyOrAddCart("buy-clicked")},onBuyOrAddCart:function(t){if(this.stepperError)return this.onOverLimit(this.stepperError);var i=this.validateSku();i?L(i):this.$emit(t,this.getSkuData())},getSkuData:function(){return{goodsId:this.goodsId,messages:this.getSkuMessages(),selectedNum:this.selectedNum,cartMessages:this.getSkuCartMessages(),selectedSkuComb:this.selectedSkuComb}},onOpened:function(){this.centerInitialSku()},centerInitialSku:function(){var t=this;(this.$refs.skuRows||[]).forEach(function(i){var n=i.skuRow||{},r=n.k_s;i.centerItem(t.initialSku[r])})}},render:function(){var t=this,i=arguments[0];if(!this.isSkuEmpty){var n=this.sku,r=this.skuList,a=this.goods,s=this.price,o=this.lazyLoad,l=this.originPrice,c=this.skuEventBus,u=this.selectedSku,h=this.selectedProp,d=this.selectedNum,f=this.stepperTitle,v=this.selectedSkuComb,g=this.showHeaderImage,y=this.disableSoldoutSku,b={price:s,originPrice:l,selectedNum:d,skuEventBus:c,selectedSku:u,selectedSkuComb:v},S=function(U){return t.slots(U,b)},x=S("sku-header")||i(Fo,{attrs:{sku:n,goods:a,skuEventBus:c,selectedSku:u,showHeaderImage:g}},[i("template",{slot:"sku-header-image-extra"},[S("sku-header-image-extra")]),S("sku-header-price")||i("div",{class:"van-sku__goods-price"},[i("span",{class:"van-sku__price-symbol"},["¥"]),i("span",{class:"van-sku__price-num"},[s]),this.priceTag&&i("span",{class:"van-sku__price-tag"},[this.priceTag])]),S("sku-header-origin-price")||l&&i(Ci,[lt("originPrice")," ¥",l]),!this.hideStock&&i(Ci,[i("span",{class:"van-sku__stock"},[this.stockText])]),this.hasSkuOrAttr&&!this.hideSelectedText&&i(Ci,[this.selectedText]),S("sku-header-extra")]),k=S("sku-group")||this.hasSkuOrAttr&&i("div",{class:this.skuGroupClass},[this.skuTree.map(function(M){return i(lr,{attrs:{skuRow:M},ref:"skuRows",refInFor:!0},[M.v.map(function(U){return i(jo,{attrs:{skuList:r,lazyLoad:o,skuValue:U,skuKeyStr:M.k_s,selectedSku:u,skuEventBus:c,disableSoldoutSku:y,largeImageMode:M.largeImageMode}})})])}),this.propList.map(function(M){return i(lr,{attrs:{skuRow:M}},[M.v.map(function(U){return i(Wo,{attrs:{skuValue:U,skuKeyStr:M.k_id+"",selectedProp:h,skuEventBus:c,multiple:M.is_multiple,disabled:U.text_status===0}})})])})]),C=S("sku-stepper")||i(Xo,{ref:"skuStepper",attrs:{stock:this.stock,quota:this.quota,quotaUsed:this.quotaUsed,startSaleNum:this.startSaleNum,skuEventBus:c,selectedNum:d,stepperTitle:f,skuStockNum:n.stock_num,disableStepperInput:this.disableStepperInput,customStepperConfig:this.customStepperConfig,hideQuotaText:this.hideQuotaText},on:{change:function(U){t.$emit("stepper-change",U)}}}),O=S("sku-messages")||i(al,{ref:"skuMessages",attrs:{goodsId:this.goodsId,messageConfig:this.messageConfig,messages:n.messages}}),_t=S("sku-actions")||i(ll,{attrs:{buyText:this.buyText,skuEventBus:c,addCartText:this.addCartText,showAddCartBtn:this.showAddCartBtn}});return i(St,{attrs:{round:!0,closeable:!0,position:"bottom",getContainer:this.getContainer,closeOnClickOverlay:this.closeOnClickOverlay,safeAreaInsetBottom:this.safeAreaInsetBottom},class:"van-sku-container",on:{opened:this.onOpened},model:{value:t.show,callback:function(U){t.show=U}}},[x,i("div",{class:"van-sku-body",style:this.bodyStyle},[S("sku-body-top"),k,S("extra-sku-group"),C,S("before-sku-messages"),O,S("after-sku-messages")]),S("sku-actions-top"),_t])}}});Ai.add(Tp),bt.SkuActions=ll,bt.SkuHeader=Fo,bt.SkuHeaderItem=Ci,bt.SkuMessages=al,bt.SkuStepper=Xo,bt.SkuRow=lr,bt.SkuRowItem=jo,bt.SkuRowPropItem=Wo,bt.skuHelper=Op,bt.skuConstants=_p;var cl=p("slider"),lv=cl[0],Ti=cl[1],ul=function(t,i){return JSON.stringify(t)===JSON.stringify(i)};const cv=lv({mixins:[nt,Lt],props:{disabled:Boolean,vertical:Boolean,range:Boolean,barHeight:[Number,String],buttonSize:[Number,String],activeColor:String,inactiveColor:String,min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},step:{type:[Number,String],default:1},value:{type:[Number,Array],default:0}},data:function(){return{dragStatus:""}},computed:{scope:function(){return this.max-this.min},buttonStyle:function(){if(this.buttonSize){var t=P(this.buttonSize);return{width:t,height:t}}}},created:function(){this.updateValue(this.value)},mounted:function(){this.range?(this.bindTouchEvent(this.$refs.wrapper0),this.bindTouchEvent(this.$refs.wrapper1)):this.bindTouchEvent(this.$refs.wrapper)},methods:{onTouchStart:function(t){this.disabled||(this.touchStart(t),this.currentValue=this.value,this.range?this.startValue=this.value.map(this.format):this.startValue=this.format(this.value),this.dragStatus="start")},onTouchMove:function(t){if(!this.disabled){this.dragStatus==="start"&&this.$emit("drag-start"),z(t,!0),this.touchMove(t),this.dragStatus="draging";var i=this.$el.getBoundingClientRect(),n=this.vertical?this.deltaY:this.deltaX,r=this.vertical?i.height:i.width,a=n/r*this.scope;this.range?this.currentValue[this.index]=this.startValue[this.index]+a:this.currentValue=this.startValue+a,this.updateValue(this.currentValue)}},onTouchEnd:function(){this.disabled||(this.dragStatus==="draging"&&(this.updateValue(this.currentValue,!0),this.$emit("drag-end")),this.dragStatus="")},onClick:function(t){if(t.stopPropagation(),!this.disabled){var i=this.$el.getBoundingClientRect(),n=this.vertical?t.clientY-i.top:t.clientX-i.left,r=this.vertical?i.height:i.width,a=+this.min+n/r*this.scope;if(this.range){var s=this.value,o=s[0],l=s[1],c=(o+l)/2;a<=c?o=a:l=a,a=[o,l]}this.startValue=this.value,this.updateValue(a,!0)}},handleOverlap:function(t){return t[0]>t[1]?(t=ge(t),t.reverse()):t},updateValue:function(t,i){this.range?t=this.handleOverlap(t).map(this.format):t=this.format(t),ul(t,this.value)||this.$emit("input",t),i&&!ul(t,this.startValue)&&this.$emit("change",t)},format:function(t){var i=+this.min,n=+this.max,r=+this.step;t=W(t,i,n);var a=Math.round((t-i)/r)*r;return Qr(i,a)}},render:function(){var t,i=this,n,r=arguments[0],a=this.vertical,s=a?"height":"width",o=a?"width":"height",l=(t={background:this.inactiveColor},t[o]=P(this.barHeight),t),c=function(){var v=i.value,g=i.min,y=i.range,b=i.scope;return y?(v[1]-v[0])*100/b+"%":(v-g)*100/b+"%"},u=function(){var v=i.value,g=i.min,y=i.range,b=i.scope;return y?(v[0]-g)*100/b+"%":null},h=(n={},n[s]=c(),n.left=this.vertical?null:u(),n.top=this.vertical?u():null,n.background=this.activeColor,n);this.dragStatus&&(h.transition="none");var d=function(v){var g=["left","right"],y=typeof v=="number",b=y?i.value[v]:i.value,S=function(){return y?"button-wrapper-"+g[v]:"button-wrapper"},x=function(){return y?"wrapper"+v:"wrapper"},k=function(){if(y){var O=i.slots(v===0?"left-button":"right-button",{value:b});if(O)return O}return i.slots("button")?i.slots("button"):r("div",{class:Ti("button"),style:i.buttonStyle})};return r("div",{ref:x(),attrs:{role:"slider",tabindex:i.disabled?-1:0,"aria-valuemin":i.min,"aria-valuenow":i.value,"aria-valuemax":i.max,"aria-orientation":i.vertical?"vertical":"horizontal"},class:Ti(S()),on:{touchstart:function(){y&&(i.index=v)},click:function(O){return O.stopPropagation()}}},[k()])};return r("div",{style:l,class:Ti({disabled:this.disabled,vertical:a}),on:{click:this.onClick}},[r("div",{class:Ti("bar"),style:h},[this.range?[d(0),d(1)]:d()])])}});var hl=p("step"),uv=hl[0],jt=hl[1];const hv=uv({mixins:[X("vanSteps")],computed:{status:function(){if(this.index<this.parent.active)return"finish";if(this.index===+this.parent.active)return"process"},active:function(){return this.status==="process"},lineStyle:function(){var t=this.parent,i=t.activeColor,n=t.inactiveColor,r=t.center,a=t.direction,s={background:this.status==="finish"?i:n};return r&&a==="vertical"&&(s.top="50%"),s},circleContainerStyle:function(){if(this.parent.center&&this.parent.direction==="vertical")return{top:"50%"}},titleStyle:function(){if(this.active)return{color:this.parent.activeColor};if(!this.status)return{color:this.parent.inactiveColor}}},methods:{genCircle:function(){var t=this.$createElement,i=this.parent,n=i.activeIcon,r=i.iconPrefix,a=i.activeColor,s=i.finishIcon,o=i.inactiveIcon;if(this.active)return this.slots("active-icon")||t(w,{class:jt("icon","active"),attrs:{name:n,color:a,classPrefix:r}});var l=this.slots("finish-icon");if(this.status==="finish"&&(s||l))return l||t(w,{class:jt("icon","finish"),attrs:{name:s,color:a,classPrefix:r}});var c=this.slots("inactive-icon");return o||c?c||t(w,{class:jt("icon"),attrs:{name:o,classPrefix:r}}):t("i",{class:jt("circle"),style:this.lineStyle})},onClickStep:function(){this.parent.$emit("click-step",this.index)}},render:function(){var t,i=arguments[0],n=this.status,r=this.active,a=this.parent.direction;return i("div",{class:[ft,jt([a,(t={},t[n]=n,t)])]},[i("div",{class:jt("title",{active:r}),style:this.titleStyle,on:{click:this.onClickStep}},[this.slots()]),i("div",{class:jt("circle-container"),on:{click:this.onClickStep},style:this.circleContainerStyle},[this.genCircle()]),i("div",{class:jt("line"),style:this.lineStyle})])}});var dl=p("steps"),dv=dl[0],fl=dl[1];const fv=dv({mixins:[G("vanSteps")],props:{center:Boolean,iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String,active:{type:[Number,String],default:0},direction:{type:String,default:"horizontal"},activeIcon:{type:String,default:"checked"}},render:function(){var t=arguments[0];return t("div",{class:fl([this.direction])},[t("div",{class:fl("items")},[this.slots()])])}});var fr=p("submit-bar"),pv=fr[0],Tt=fr[1],vv=fr[2];function pl(e,t,i,n){var r=t.tip,a=t.price,s=t.tipIcon;function o(){if(typeof a=="number"){var c=(a/100).toFixed(t.decimalLength).split("."),u=t.decimalLength?"."+c[1]:"";return e("div",{style:{textAlign:t.textAlign?t.textAlign:""},class:Tt("text")},[e("span",[t.label||vv("label")]),e("span",{class:Tt("price")},[t.currency,e("span",{class:Tt("price","integer")},[c[0]]),u]),t.suffixLabel&&e("span",{class:Tt("suffix-label")},[t.suffixLabel])])}}function l(){if(i.tip||r)return e("div",{class:Tt("tip")},[s&&e(w,{class:Tt("tip-icon"),attrs:{name:s}}),r&&e("span",{class:Tt("tip-text")},[r]),i.tip&&i.tip()])}return e("div",T([{class:Tt({unfit:!t.safeAreaInsetBottom})},B(n)]),[i.top&&i.top(),l(),e("div",{class:Tt("bar")},[i.default&&i.default(),o(),i.button?i.button():e(F,{attrs:{round:!0,type:t.buttonType,text:t.loading?"":t.buttonText,color:t.buttonColor,loading:t.loading,disabled:t.disabled},class:Tt("button",t.buttonType),on:{click:function(){I(n,"submit")}}})])])}pl.props={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,disabled:Boolean,textAlign:String,buttonText:String,buttonColor:String,suffixLabel:String,safeAreaInsetBottom:{type:Boolean,default:!0},decimalLength:{type:[Number,String],default:2},currency:{type:String,default:"¥"},buttonType:{type:String,default:"danger"}};const mv=pv(pl);var vl=p("swipe-cell"),gv=vl[0],_i=vl[1],ml=.15;const yv=gv({mixins:[nt,Rn({event:"touchstart",method:"onClick"})],props:{onClose:Function,disabled:Boolean,leftWidth:[Number,String],rightWidth:[Number,String],beforeClose:Function,stopPropagation:Boolean,name:{type:[Number,String],default:""}},data:function(){return{offset:0,dragging:!1}},computed:{computedLeftWidth:function(){return+this.leftWidth||this.getWidthByRef("left")},computedRightWidth:function(){return+this.rightWidth||this.getWidthByRef("right")}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{getWidthByRef:function(t){if(this.$refs[t]){var i=this.$refs[t].getBoundingClientRect();return i.width}return 0},open:function(t){var i=t==="left"?this.computedLeftWidth:-this.computedRightWidth;this.opened=!0,this.offset=i,this.$emit("open",{position:t,name:this.name,detail:this.name})},close:function(t){this.offset=0,this.opened&&(this.opened=!1,this.$emit("close",{position:t,name:this.name}))},onTouchStart:function(t){this.disabled||(this.startOffset=this.offset,this.touchStart(t))},onTouchMove:function(t){if(!this.disabled&&(this.touchMove(t),this.direction==="horizontal")){this.dragging=!0,this.lockClick=!0;var i=!this.opened||this.deltaX*this.startOffset<0;i&&z(t,this.stopPropagation),this.offset=W(this.deltaX+this.startOffset,-this.computedRightWidth,this.computedLeftWidth)}},onTouchEnd:function(){var t=this;this.disabled||this.dragging&&(this.toggle(this.offset>0?"left":"right"),this.dragging=!1,setTimeout(function(){t.lockClick=!1},0))},toggle:function(t){var i=Math.abs(this.offset),n=this.opened?1-ml:ml,r=this.computedLeftWidth,a=this.computedRightWidth;a&&t==="right"&&i>a*n?this.open("right"):r&&t==="left"&&i>r*n?this.open("left"):this.close()},onClick:function(t){t===void 0&&(t="outside"),this.$emit("click",t),this.opened&&!this.lockClick&&(this.beforeClose?this.beforeClose({position:t,name:this.name,instance:this}):this.onClose?this.onClose(t,this,{name:this.name}):this.close(t))},getClickHandler:function(t,i){var n=this;return function(r){i&&r.stopPropagation(),n.onClick(t)}},genLeftPart:function(){var t=this.$createElement,i=this.slots("left");if(i)return t("div",{ref:"left",class:_i("left"),on:{click:this.getClickHandler("left",!0)}},[i])},genRightPart:function(){var t=this.$createElement,i=this.slots("right");if(i)return t("div",{ref:"right",class:_i("right"),on:{click:this.getClickHandler("right",!0)}},[i])}},render:function(){var t=arguments[0],i={transform:"translate3d("+this.offset+"px, 0, 0)",transitionDuration:this.dragging?"0s":".6s"};return t("div",{class:_i(),on:{click:this.getClickHandler("cell")}},[t("div",{class:_i("wrapper"),style:i},[this.genLeftPart(),this.slots(),this.genRightPart()])])}});var gl=p("switch-cell"),bv=gl[0],Sv=gl[1];function yl(e,t,i,n){return process.env.NODE_ENV==="development"&&console.warn('[Vant] "SwitchCell" component is deprecated, see: https://vant-ui.github.io/vant/v2/#/zh-CN/switch-cell.'),e(q,T([{attrs:{center:!0,size:t.cellSize,title:t.title,border:t.border},class:Sv([t.cellSize])},B(n)]),[e(Je,{props:m({},t),on:m({},n.listeners)})])}yl.props=m({},$a,{title:String,cellSize:String,border:{type:Boolean,default:!0},size:{type:String,default:"24px"}});const kv=bv(yl);var bl=p("tabbar"),Cv=bl[0],Sl=bl[1];const $v=Cv({mixins:[G("vanTabbar")],props:{route:Boolean,zIndex:[Number,String],placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,value:{type:[Number,String],default:0},border:{type:Boolean,default:!0},fixed:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:null}},data:function(){return{height:null}},computed:{fit:function(){return this.safeAreaInsetBottom!==null?this.safeAreaInsetBottom:this.fixed}},watch:{value:"setActiveItem",children:"setActiveItem"},mounted:function(){var t=this;if(this.placeholder&&this.fixed){var i=function(){t.height=t.$refs.tabbar.getBoundingClientRect().height};i(),setTimeout(i,100)}},methods:{setActiveItem:function(){var t=this;this.children.forEach(function(i,n){i.nameMatched=i.name===t.value||n===t.value})},triggerChange:function(t,i){var n=this;Ua({interceptor:this.beforeChange,args:[t],done:function(){n.$emit("input",t),n.$emit("change",t),i()}})},genTabbar:function(){var t,i=this.$createElement;return i("div",{ref:"tabbar",style:{zIndex:this.zIndex},class:[(t={},t[Ue]=this.border,t),Sl({unfit:!this.fit,fixed:this.fixed})]},[this.slots()])}},render:function(){var t=arguments[0];return this.placeholder&&this.fixed?t("div",{class:Sl("placeholder"),style:{height:this.height+"px"}},[this.genTabbar()]):this.genTabbar()}});var kl=p("tabbar-item"),wv=kl[0],pr=kl[1];const xv=wv({mixins:[X("vanTabbar")],props:m({},Mt,{dot:Boolean,icon:String,name:[Number,String],info:[Number,String],badge:[Number,String],iconPrefix:String}),data:function(){return{nameMatched:!1}},computed:{active:function(){var t=this.parent.route;if(t&&"$route"in this){var i=this.to,n=this.$route,r=ct(i)?i:{path:i};return!!n.matched.find(function(a){var s=a.path===""?"/":a.path,o=r.path===s,l=_(r.name)&&r.name===a.name;return o||l})}return this.nameMatched}},methods:{onClick:function(t){var i=this;this.active||this.parent.triggerChange(this.name||this.index,function(){Yt(i.$router,i)}),this.$emit("click",t)},genIcon:function(){var t=this.$createElement,i=this.slots("icon",{active:this.active});if(i)return i;if(this.icon)return t(w,{attrs:{name:this.icon,classPrefix:this.iconPrefix}})}},render:function(){var t,i=arguments[0],n=this.active,r=this.parent[n?"activeColor":"inactiveColor"];return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] TabbarItem: "info" prop is deprecated, use "badge" prop instead.'),i("div",{class:pr({active:n}),style:{color:r},on:{click:this.onClick}},[i("div",{class:pr("icon")},[this.genIcon(),i(Kt,{attrs:{dot:this.dot,info:(t=this.badge)!=null?t:this.info}})]),i("div",{class:pr("text")},[this.slots("default",{active:n})])])}});var Cl=p("tree-select"),Tv=Cl[0],de=Cl[1];function $l(e,t,i,n){var r=t.items,a=t.height,s=t.activeId,o=t.selectedIcon,l=t.mainActiveIndex;process.env.NODE_ENV==="development"&&(n.listeners.navclick&&console.warn('[Vant] TreeSelect: "navclick" event is deprecated, use "click-nav" instead.'),n.listeners.itemclick&&console.warn('[Vant] TreeSelect: "itemclick" event is deprecated, use "click-item" instead.'));var c=r[+l]||{},u=c.children||[],h=Array.isArray(s);function d(g){return h?s.indexOf(g)!==-1:s===g}var f=r.map(function(g){var y;return e(Io,{attrs:{dot:g.dot,info:(y=g.badge)!=null?y:g.info,title:g.text,disabled:g.disabled},class:[de("nav-item"),g.className]})});function v(){return i.content?i.content():u.map(function(g){return e("div",{key:g.id,class:["van-ellipsis",de("item",{active:d(g.id),disabled:g.disabled})],on:{click:function(){if(!g.disabled){var b=g.id;if(h){b=s.slice();var S=b.indexOf(g.id);S!==-1?b.splice(S,1):b.length<t.max&&b.push(g.id)}I(n,"update:active-id",b),I(n,"click-item",g),I(n,"itemclick",g)}}}},[g.text,d(g.id)&&e(w,{attrs:{name:o},class:de("selected")})])})}return e("div",T([{class:de(),style:{height:P(a)}},B(n)]),[e(To,{class:de("nav"),attrs:{activeKey:l},on:{change:function(y){I(n,"update:main-active-index",y),I(n,"click-nav",y),I(n,"navclick",y)}}},[f]),e("div",{class:de("content")},[v()])])}$l.props={max:{type:[Number,String],default:1/0},items:{type:Array,default:function(){return[]}},height:{type:[Number,String],default:300},activeId:{type:[Number,String,Array],default:0},selectedIcon:{type:String,default:"success"},mainActiveIndex:{type:[Number,String],default:0}};const _v=Tv($l);function Iv(e){var t=[Rc,ku,Bu,sa,Du,F,Yu,Zu,hh,q,es,ns,gh,kh,wh,_h,Ph,Eh,Nh,Ah,jh,En,Xh,Jh,_s,D,Ps,ld,ud,pd,rt,gd,Sa,en,bd,Cd,wd,w,oe,Hn,Nd,Ad,Kt,zd,ht,Ai,Hd,Wd,ot,Jd,Dr,tf,nf,af,Ji,tp,St,ip,sp,un,cn,cp,dp,vp,bp,To,Io,xp,bt,cv,hv,qo,fv,Ya,mv,zs,yv,Hs,Je,kv,ii,$v,xv,Sn,ti,L,_v,el];t.forEach(function(i){i.install?e.use(i):i.name&&e.component(i.name,i)})}typeof window<"u"&&window.Vue&&Iv(window.Vue);/**
|
|
6
|
+
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:mi(t.placement),variation:po(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,yo(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,yo(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var qf={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Uf,data:{}};function Kf(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var n=t.styles[i]||{},r=t.attributes[i]||{},a=t.elements[i];!gt(a)||!Et(a)||(Object.assign(a.style,n),Object.keys(r).forEach(function(s){var o=r[s];o===!1?a.removeAttribute(s):a.setAttribute(s,o===!0?"":o)}))})}function Yf(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(n){var r=t.elements[n],a=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:i[n]),o=s.reduce(function(l,c){return l[c]="",l},{});!gt(r)||!Et(r)||(Object.assign(r.style,o),Object.keys(a).forEach(function(l){r.removeAttribute(l)}))})}}var Xf={name:"applyStyles",enabled:!0,phase:"write",fn:Kf,effect:Yf,requires:["computeStyles"]},Gf=[zf,Hf,qf,Xf],Zf=Rf({defaultModifiers:Gf});function Jf(e,t,i){var n=mi(e),r=[Gt,ue].indexOf(n)>=0?-1:1,a=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,s=a[0],o=a[1];return s=s||0,o=(o||0)*r,[Gt,Ie].indexOf(n)>=0?{x:o,y:s}:{x:s,y:o}}function Qf(e){var t=e.state,i=e.options,n=e.name,r=i.offset,a=r===void 0?[0,0]:r,s=yf.reduce(function(u,h){return u[h]=Jf(h,t.rects,a),u},{}),o=s[t.placement],l=o.x,c=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=s}var tp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Qf},bo=p("popover"),ep=bo[0],Jt=bo[1];const ip=ep({mixins:[Rn({event:"touchstart",method:"onClickOutside"})],props:{value:Boolean,trigger:String,overlay:Boolean,offset:{type:Array,default:function(){return[0,8]}},theme:{type:String,default:"light"},actions:{type:Array,default:function(){return[]}},placement:{type:String,default:"bottom"},getContainer:{type:[String,Function],default:"body"},closeOnClickAction:{type:Boolean,default:!0}},watch:{value:"updateLocation",placement:"updateLocation"},mounted:function(){this.updateLocation()},beforeDestroy:function(){this.popper&&(K||(window.removeEventListener("animationend",this.updateLocation),window.removeEventListener("transitionend",this.updateLocation)),this.popper.destroy(),this.popper=null)},methods:{createPopper:function(){var t=Zf(this.$refs.wrapper,this.$refs.popover.$el,{placement:this.placement,modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},m({},tp,{options:{offset:this.offset}})]});return K||(window.addEventListener("animationend",this.updateLocation),window.addEventListener("transitionend",this.updateLocation)),t},updateLocation:function(){var t=this;this.$nextTick(function(){t.value&&(t.popper?t.popper.setOptions({placement:t.placement}):t.popper=t.createPopper())})},renderAction:function(t,i){var n=this,r=this.$createElement,a=t.icon,s=t.text,o=t.disabled,l=t.className;return r("div",{attrs:{role:"menuitem"},class:[Jt("action",{disabled:o,"with-icon":a}),l],on:{click:function(){return n.onClickAction(t,i)}}},[a&&r(w,{attrs:{name:a},class:Jt("action-icon")}),r("div",{class:[Jt("action-text"),me]},[s])])},onToggle:function(t){this.$emit("input",t)},onClickWrapper:function(){this.trigger==="click"&&this.onToggle(!this.value)},onTouchstart:function(t){t.stopPropagation(),this.$emit("touchstart",t)},onClickAction:function(t,i){t.disabled||(this.$emit("select",t,i),this.closeOnClickAction&&this.$emit("input",!1))},onClickOutside:function(){this.$emit("input",!1)},onOpen:function(){this.$emit("open")},onOpened:function(){this.$emit("opened")},onClose:function(){this.$emit("close")},onClosed:function(){this.$emit("closed")}},render:function(){var t=arguments[0];return t("span",{ref:"wrapper",class:Jt("wrapper"),on:{click:this.onClickWrapper}},[t(St,{ref:"popover",attrs:{value:this.value,overlay:this.overlay,position:null,transition:"van-popover-zoom",lockScroll:!1,getContainer:this.getContainer},class:Jt([this.theme]),on:{open:this.onOpen,close:this.onClose,input:this.onToggle,opened:this.onOpened,closed:this.onClosed},nativeOn:{touchstart:this.onTouchstart}},[t("div",{class:Jt("arrow")}),t("div",{class:Jt("content"),attrs:{role:"menu"}},[this.slots("default")||this.actions.map(this.renderAction)])]),this.slots("reference")])}});var So=p("progress"),np=So[0],tr=So[1];const rp=np({mixins:[ut(function(e){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0)})],props:{color:String,inactive:Boolean,pivotText:String,textColor:String,pivotColor:String,trackColor:String,strokeWidth:[Number,String],percentage:{type:[Number,String],required:!0,validator:function(t){return t>=0&&t<=100}},showPivot:{type:Boolean,default:!0}},data:function(){return{pivotWidth:0,progressWidth:0}},mounted:function(){this.resize()},watch:{showPivot:"resize",pivotText:"resize"},methods:{resize: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],i=this.pivotText,n=this.percentage,r=i??n+"%",a=this.showPivot&&r,s=this.inactive?"#cacaca":this.color,o={color:this.textColor,left:(this.progressWidth-this.pivotWidth)*n/100+"px",background:this.pivotColor||s},l={background:s,width:this.progressWidth*n/100+"px"},c={background:this.trackColor,height:P(this.strokeWidth)};return t("div",{class:tr(),style:c},[t("span",{class:tr("portion"),style:l},[a&&t("span",{ref:"pivot",style:o,class:tr("pivot")},[r])])])}});var er=p("pull-refresh"),ap=er[0],yi=er[1],sp=er[2],ko=50,op=["pulling","loosing","success"];const lp=ap({mixins:[nt],props:{disabled:Boolean,successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:[Number,String],value:{type:Boolean,required:!0},successDuration:{type:[Number,String],default:500},animationDuration:{type:[Number,String],default:300},headHeight:{type:[Number,String],default:ko}},data:function(){return{status:"normal",distance:0,duration:0}},computed:{touchable:function(){return this.status!=="loading"&&this.status!=="success"&&!this.disabled},headStyle:function(){if(this.headHeight!==ko)return{height:this.headHeight+"px"}}},watch:{value:function(t){this.duration=this.animationDuration,t?this.setStatus(+this.headHeight,!0):this.slots("success")||this.successText?this.showSuccessTip():this.setStatus(0,!1)}},mounted:function(){this.bindTouchEvent(this.$refs.track),this.scrollEl=Ut(this.$el)},methods:{checkPullStart:function(t){this.ceiling=qt(this.scrollEl)===0,this.ceiling&&(this.duration=0,this.touchStart(t))},onTouchStart:function(t){this.touchable&&this.checkPullStart(t)},onTouchMove:function(t){this.touchable&&(this.ceiling||this.checkPullStart(t),this.touchMove(t),this.ceiling&&this.deltaY>=0&&this.direction==="vertical"&&(z(t),this.setStatus(this.ease(this.deltaY))))},onTouchEnd:function(){var t=this;this.touchable&&this.ceiling&&this.deltaY&&(this.duration=this.animationDuration,this.status==="loosing"?(this.setStatus(+this.headHeight,!0),this.$emit("input",!0),this.$nextTick(function(){t.$emit("refresh")})):this.setStatus(0))},ease:function(t){var i=+(this.pullDistance||this.headHeight);return t>i&&(t<i*2?t=i+(t-i)/2:t=i*1.5+(t-i*2)/4),Math.round(t)},setStatus:function(t,i){var n;i?n="loading":t===0?n="normal":n=t<(this.pullDistance||this.headHeight)?"pulling":"loosing",this.distance=t,n!==this.status&&(this.status=n)},genStatus:function(){var t=this.$createElement,i=this.status,n=this.distance,r=this.slots(i,{distance:n});if(r)return r;var a=[],s=this[i+"Text"]||sp(i);return op.indexOf(i)!==-1&&a.push(t("div",{class:yi("text")},[s])),i==="loading"&&a.push(t(ht,{attrs:{size:"16"}},[s])),a},showSuccessTip:function(){var t=this;this.status="success",setTimeout(function(){t.setStatus(0)},this.successDuration)}},render:function(){var t=arguments[0],i={transitionDuration:this.duration+"ms",transform:this.distance?"translate3d(0,"+this.distance+"px, 0)":""};return t("div",{class:yi()},[t("div",{ref:"track",class:yi("track"),style:i},[t("div",{class:yi("head"),style:this.headStyle},[this.genStatus()]),this.slots()])])}});var Co=p("rate"),cp=Co[0],bi=Co[1];function up(e,t,i){return e>=t?"full":e+.5>=t&&i?"half":"void"}const hp=cp({mixins:[nt,Lt],props:{size:[Number,String],color:String,gutter:[Number,String],readonly:Boolean,disabled:Boolean,allowHalf:Boolean,voidColor:String,iconPrefix:String,disabledColor:String,value:{type:Number,default:0},icon:{type:String,default:"star"},voidIcon:{type:String,default:"star-o"},count:{type:[Number,String],default:5},touchable:{type:Boolean,default:!0}},computed:{list:function(){for(var t=[],i=1;i<=this.count;i++)t.push(up(this.value,i,this.allowHalf));return t},sizeWithUnit:function(){return P(this.size)},gutterWithUnit:function(){return P(this.gutter)}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{select:function(t){!this.disabled&&!this.readonly&&t!==this.value&&(this.$emit("input",t),this.$emit("change",t))},onTouchStart:function(t){var i=this;if(!(this.readonly||this.disabled||!this.touchable)){this.touchStart(t);var n=this.$refs.items.map(function(a){return a.getBoundingClientRect()}),r=[];n.forEach(function(a,s){i.allowHalf?r.push({score:s+.5,left:a.left},{score:s+1,left:a.left+a.width/2}):r.push({score:s+1,left:a.left})}),this.ranges=r}},onTouchMove:function(t){if(!(this.readonly||this.disabled||!this.touchable)&&(this.touchMove(t),this.direction==="horizontal")){z(t);var i=t.touches[0].clientX;this.select(this.getScoreByPosition(i))}},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,i){var n=this,r=this.$createElement,a=this.icon,s=this.color,o=this.count,l=this.voidIcon,c=this.disabled,u=this.voidColor,h=this.disabledColor,d=i+1,f=t==="full",v=t==="void",g;return this.gutterWithUnit&&d!==+o&&(g={paddingRight:this.gutterWithUnit}),r("div",{ref:"items",refInFor:!0,key:i,attrs:{role:"radio",tabindex:"0","aria-setsize":o,"aria-posinset":d,"aria-checked":String(!v)},style:g,class:bi("item")},[r(w,{attrs:{size:this.sizeWithUnit,name:f?a:l,color:c?h:f?s:u,classPrefix:this.iconPrefix,"data-score":d},class:bi("icon",{disabled:c,full:f}),on:{click:function(){n.select(d)}}}),this.allowHalf&&r(w,{attrs:{size:this.sizeWithUnit,name:v?l:a,color:c?h:v?u:s,classPrefix:this.iconPrefix,"data-score":d-.5},class:bi("icon",["half",{disabled:c,full:!v}]),on:{click:function(){n.select(d-.5)}}})])}},render:function(){var t=this,i=arguments[0];return i("div",{class:bi({readonly:this.readonly,disabled:this.disabled}),attrs:{tabindex:"0",role:"radiogroup"}},[this.list.map(function(n,r){return t.genStar(n,r)})])}});var $o=p("row"),dp=$o[0],fp=$o[1];const pp=dp({mixins:[G("vanRow")],props:{type:String,align:String,justify:String,tag:{type:String,default:"div"},gutter:{type:[Number,String],default:0}},computed:{spaces:function(){var t=Number(this.gutter);if(t){var i=[],n=[[]],r=0;return this.children.forEach(function(a,s){r+=Number(a.span),r>24?(n.push([s]),r-=24):n[n.length-1].push(s)}),n.forEach(function(a){var s=t*(a.length-1)/a.length;a.forEach(function(o,l){if(l===0)i.push({right:s});else{var c=t-i[o-1].right,u=s-c;i.push({left:c,right:u})}})}),i}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,i=arguments[0],n=this.align,r=this.justify,a=this.type==="flex";return i(this.tag,{class:fp((t={flex:a},t["align-"+n]=a&&n,t["justify-"+r]=a&&r,t)),on:{click:this.onClick}},[this.slots()])}});var ir=p("search"),vp=ir[0],Si=ir[1],mp=ir[2];function wo(e,t,i,n){function r(){if(i.label||t.label)return e("div",{class:Si("label")},[i.label?i.label():t.label])}function a(){if(!t.showAction)return;function l(){i.action||(I(n,"input",""),I(n,"cancel"))}return e("div",{class:Si("action"),attrs:{role:"button",tabindex:"0"},on:{click:l}},[i.action?i.action():t.actionText||mp("cancel")])}var s={attrs:n.data.attrs,on:m({},n.listeners,{keypress:function(c){c.keyCode===13&&(z(c),I(n,"search",t.value)),I(n,"keypress",c)}})},o=B(n);return o.attrs=void 0,e("div",T([{class:Si({"show-action":t.showAction}),style:{background:t.background}},o]),[i.left==null?void 0:i.left(),e("div",{class:Si("content",t.shape)},[r(),e(rt,T([{attrs:{type:"search",border:!1,value:t.value,leftIcon:t.leftIcon,rightIcon:t.rightIcon,clearable:t.clearable,clearTrigger:t.clearTrigger},scopedSlots:{"left-icon":i["left-icon"],"right-icon":i["right-icon"]}},s]))]),a()])}wo.props={value:String,label:String,rightIcon:String,actionText:String,background:String,showAction:Boolean,clearTrigger:String,shape:{type:String,default:"square"},clearable:{type:Boolean,default:!0},leftIcon:{type:String,default:"search"}};const gp=vp(wo);var yp=["qq","link","weibo","wechat","poster","qrcode","weapp-qrcode","wechat-moments"],nr=p("share-sheet"),bp=nr[0],wt=nr[1],Sp=nr[2];const kp=bp({props:m({},Fe,{title:String,duration:String,cancelText:String,description:String,getContainer:[String,Function],options:{type:Array,default:function(){return[]}},overlay:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}}),methods:{onCancel:function(){this.toggle(!1),this.$emit("cancel")},onSelect:function(t,i){this.$emit("select",t,i)},toggle:function(t){this.$emit("input",t)},getIconURL:function(t){return yp.indexOf(t)!==-1?"https://img01.yzcdn.cn/vant/share-sheet-"+t+".png":t},genHeader:function(){var t=this.$createElement,i=this.slots("title")||this.title,n=this.slots("description")||this.description;if(!(!i&&!n))return t("div",{class:wt("header")},[i&&t("h2",{class:wt("title")},[i]),n&&t("span",{class:wt("description")},[n])])},genOptions:function(t,i){var n=this,r=this.$createElement;return r("div",{class:wt("options",{border:i})},[t.map(function(a,s){return r("div",{attrs:{role:"button",tabindex:"0"},class:[wt("option"),a.className],on:{click:function(){n.onSelect(a,s)}}},[r("img",{attrs:{src:n.getIconURL(a.icon)},class:wt("icon")}),a.name&&r("span",{class:wt("name")},[a.name]),a.description&&r("span",{class:wt("option-description")},[a.description])])})])},genRows:function(){var t=this,i=this.options;return Array.isArray(i[0])?i.map(function(n,r){return t.genOptions(n,r!==0)}):this.genOptions(i)},genCancelText:function(){var t,i=this.$createElement,n=(t=this.cancelText)!=null?t:Sp("cancel");if(n)return i("button",{attrs:{type:"button"},class:wt("cancel"),on:{click:this.onCancel}},[n])},onClickOverlay:function(){this.$emit("click-overlay")}},render:function(){var t=arguments[0];return t(St,{attrs:{round:!0,value:this.value,position:"bottom",overlay:this.overlay,duration:this.duration,lazyRender:this.lazyRender,lockScroll:this.lockScroll,getContainer:this.getContainer,closeOnPopstate:this.closeOnPopstate,closeOnClickOverlay:this.closeOnClickOverlay,safeAreaInsetBottom:this.safeAreaInsetBottom},class:wt(),on:{input:this.toggle,"click-overlay":this.onClickOverlay}},[this.genHeader(),this.genRows(),this.genCancelText()])}});var xo=p("sidebar"),Cp=xo[0],$p=xo[1];const To=Cp({mixins:[G("vanSidebar")],model:{prop:"activeKey"},props:{activeKey:{type:[Number,String],default:0}},data:function(){return{index:+this.activeKey}},watch:{activeKey:function(){this.setIndex(+this.activeKey)}},methods:{setIndex:function(t){t!==this.index&&(this.index=t,this.$emit("change",t))}},render:function(){var t=arguments[0];return t("div",{class:$p()},[this.slots()])}});var _o=p("sidebar-item"),wp=_o[0],rr=_o[1];const Io=wp({mixins:[X("vanSidebar")],props:m({},Mt,{dot:Boolean,info:[Number,String],badge:[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.setIndex(this.index),Yt(this.$router,this))}},render:function(){var t,i,n=arguments[0];return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] SidebarItem: "info" prop is deprecated, use "badge" prop instead.'),n("a",{class:rr({select:this.select,disabled:this.disabled}),on:{click:this.onClick}},[n("div",{class:rr("text")},[(t=this.slots("title"))!=null?t:this.title,n(Kt,{attrs:{dot:this.dot,info:(i=this.badge)!=null?i:this.info},class:rr("info")})])])}});var Oo=p("skeleton"),xp=Oo[0],Oe=Oo[1],Po="100%",Tp="60%";function Bo(e,t,i,n){if(!t.loading)return i.default&&i.default();function r(){if(t.title)return e("h3",{class:Oe("title"),style:{width:P(t.titleWidth)}})}function a(){var o=[],l=t.rowWidth;function c(h){return l===Po&&h===+t.row-1?Tp:Array.isArray(l)?l[h]:l}for(var u=0;u<t.row;u++)o.push(e("div",{class:Oe("row"),style:{width:P(c(u))}}));return o}function s(){if(t.avatar){var o=P(t.avatarSize);return e("div",{class:Oe("avatar",t.avatarShape),style:{width:o,height:o}})}}return e("div",T([{class:Oe({animate:t.animate,round:t.round})},B(n)]),[s(),e("div",{class:Oe("content")},[r(),a()])])}Bo.props={title:Boolean,round:Boolean,avatar:Boolean,titleWidth:[Number,String],avatarSize:[Number,String],row:{type:[Number,String],default:0},loading:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},avatarShape:{type:String,default:"round"},rowWidth:{type:[Number,String,Array],default:Po}};const _p=xp(Bo),Ip={"zh-CN":{vanSku:{select:"请选择",selected:"已选",selectSku:"请先选择商品规格",soldout:"库存不足",originPrice:"原价",minusTip:"至少选择一件",minusStartTip:function(t){return t+"件起售"},unavailable:"商品已经无法购买啦",stock:"剩余",stockUnit:"件",quotaTip:function(t){return"每人限购"+t+"件"},quotaUsedTip:function(t,i){return"每人限购"+t+"件,你已购买"+i+"件"}},vanSkuActions:{buy:"立即购买",addCart:"加入购物车"},vanSkuImgUploader:{oversize:function(t){return"最大可上传图片为"+t+"MB,请尝试压缩图片尺寸"},fail:"上传失败",uploading:"上传中..."},vanSkuStepper:{quotaLimit:function(t){return"限购"+t+"件"},quotaStart:function(t){return t+"件起售"},comma:",",num:"购买数量"},vanSkuMessages:{fill:"请填写",upload:"请上传",imageLabel:"仅限一张",invalid:{tel:"请填写正确的数字格式留言",mobile:"手机号长度为6-20位数字",email:"请填写正确的邮箱",id_no:"请填写正确的身份证号码"},placeholder:{id_no:"请填写身份证号",text:"请填写留言",tel:"请填写数字",email:"请填写邮箱",date:"请选择日期",time:"请选择时间",textarea:"请填写留言",mobile:"请填写手机号"}},vanSkuRow:{multiple:"可多选"},vanSkuDatetimeField:{title:{date:"选择年月日",time:"选择时间",datetime:"选择日期时间"},format:{year:"年",month:"月",day:"日",hour:"时",minute:"分"}}}};var ki={QUOTA_LIMIT:0,STOCK_LIMIT:1},xt="";const Op={LIMIT_TYPE:ki,UNSELECTED_SKU_VALUE_ID:xt};var Eo=function(t){var i={};return t.forEach(function(n){i[n.k_s]=n.v}),i},Pp=function(t){var i={};return t.forEach(function(n){var r={};n.v.forEach(function(a){r[a.id]=a}),i[n.k_id]=r}),i},Do=function(t,i){var n=Object.keys(i).filter(function(r){return i[r]!==xt});return t.length===n.length},No=function(t,i){var n=t.filter(function(r){return Object.keys(i).every(function(a){return String(r[a])===String(i[a])})});return n[0]},Mo=function(t,i){var n=Eo(t);return Object.keys(i).reduce(function(r,a){var s=n[a]||[],o=i[a];if(o!==xt&&s.length>0){var l=s.filter(function(c){return c.id===o})[0];l&&r.push(l)}return r},[])},ar=function(t,i,n){var r,a=n.key,s=n.valueId,o=m({},i,(r={},r[a]=s,r)),l=Object.keys(o).filter(function(d){return o[d]!==xt}),c=t.filter(function(d){return l.every(function(f){return String(o[f])===String(d[f])})}),u=c.filter(function(d){return d.disable_status!==1}),h=u.reduce(function(d,f){return d+=f.stock_num,d},0);return h>0},Lo=function(t,i,n){if(n===void 0&&(n={}),!(i!=null&&i.length))return t;var r=JSON.parse(JSON.stringify(t)),a={};return r.forEach(function(s){var o=s.k_s;s.v.forEach(function(l){var c=l.id;a[o+"-"+c]=[]})}),i.forEach(function(s){for(var o=1;o<=5;o++){var l="s"+o,c=s[l];if(c&&c!=="0"){var u=l+"-"+c;a[u]&&a[u].push(s)}}}),r.filter(function(s){var o=s.k_s,l=n[o]&&n[o]!==xt;if(s.v=s.v.filter(function(u){var h=u.id,d=o+"-"+h,f=a[d]||[];if(f.length>0){var v=f.every(function(x){return x.disable_status===1});if(v)return!1}if(l&&String(h)===String(n[o]))return!0;var g=Object.entries(n).filter(function(x){var k=x[0],C=x[1];return C!==xt&&k!==o});if(g.length>0){var y={};g.forEach(function(x){var k=x[0],C=x[1];y[k]=C}),y[o]=String(h);var b=i.filter(function(x){return Object.entries(y).every(function(k){var C=k[0],O=k[1];return String(x[C])===String(O)})});if(b.length>0){var S=b.every(function(x){return x.disable_status===1});return!S}}return!0}),l){var c=s.v.some(function(u){return String(u.id)===String(n[o])});return c}return s.v.length>0})},Ao=function(t,i){var n=Pp(t);return Object.keys(i).reduce(function(r,a){return i[a].forEach(function(s){r.push(m({},n[a][s]))}),r},[])},Ro=function(t,i){var n=[];return(t||[]).forEach(function(r){if(i[r.k_id]&&i[r.k_id].length>0){var a=[];r.v.forEach(function(s){i[r.k_id].indexOf(s.id)>-1&&a.push(m({},s))}),n.push(m({},r,{v:a}))}}),n};const Bp={normalizeSkuTree:Eo,getSkuComb:No,getSelectedSkuValues:Mo,isAllSelected:Do,isSkuChoosable:ar,getSelectedPropValues:Ao,getSelectedProperties:Ro,filterDisabledSkuTree:Lo};var Vo=p("sku-header"),Ep=Vo[0],sr=Vo[1];function Dp(e,t){var i;return e.tree.some(function(n){var r=t[n.k_s];if(r&&n.v){var a=n.v.filter(function(o){return o.id===r})[0]||{},s=a.previewImgUrl||a.imgUrl||a.img_url;if(s)return i=m({},a,{ks:n.k_s,imgUrl:s}),!0}return!1}),i}function zo(e,t,i,n){var r,a=t.sku,s=t.goods,o=t.skuEventBus,l=t.selectedSku,c=t.showHeaderImage,u=c===void 0?!0:c,h=Dp(a,l),d=h?h.imgUrl:s.picture,f=function(){o.$emit("sku:previewImage",h)};return e("div",T([{class:[sr(),me]},B(n)]),[u&&e(oe,{attrs:{fit:"cover",src:d},class:sr("img-wrap"),on:{click:f}},[(r=i["sku-header-image-extra"])==null?void 0:r.call(i)]),e("div",{class:sr("goods-info")},[i.default==null?void 0:i.default()])])}zo.props={sku:Object,goods:Object,skuEventBus:Object,selectedSku:Object,showHeaderImage:Boolean};const Fo=Ep(zo);var Ho=p("sku-header-item"),Np=Ho[0],Mp=Ho[1];function Lp(e,t,i,n){return e("div",T([{class:Mp()},B(n)]),[i.default&&i.default()])}const Ci=Np(Lp);var or=p("sku-row"),Ap=or[0],yt=or[1],Rp=or[2];const lr=Ap({mixins:[G("vanSkuRows"),ut(function(e){this.scrollable&&this.$refs.scroller&&e(this.$refs.scroller,"scroll",this.onScroll)})],props:{skuRow:Object},data:function(){return{progress:0}},computed:{scrollable:function(){return this.skuRow.largeImageMode&&this.skuRow.v.length>6}},methods:{onScroll:function(){var t=this.$refs,i=t.scroller,n=t.row,r=n.offsetWidth-i.offsetWidth;this.progress=i.scrollLeft/r},genTitle:function(){var t=this.$createElement;return t("div",{class:yt("title")},[this.skuRow.k,this.skuRow.is_multiple&&t("span",{class:yt("title-multiple")},["(",Rp("multiple"),")"])])},genIndicator:function(){var t=this.$createElement;if(this.scrollable){var i={transform:"translate3d("+this.progress*20+"px, 0, 0)"};return t("div",{class:yt("indicator-wrapper")},[t("div",{class:yt("indicator")},[t("div",{class:yt("indicator-slider"),style:i})])])}},genContent:function(){var t=this.$createElement,i=this.slots();if(this.skuRow.largeImageMode){var n=[],r=[];return i.forEach(function(a,s){var o=Math.floor(s/3)%2===0?n:r;o.push(a)}),t("div",{class:yt("scroller"),ref:"scroller"},[t("div",{class:yt("row"),ref:"row"},[n]),r.length?t("div",{class:yt("row")},[r]):null])}return i},centerItem:function(t){if(!(!this.skuRow.largeImageMode||!t)){var i=this.children,n=i===void 0?[]:i,r=this.$refs,a=r.scroller,s=r.row,o=n.find(function(u){return+u.skuValue.id==+t});if(a&&s&&o&&o.$el){var l=o.$el,c=l.offsetLeft-(a.offsetWidth-l.offsetWidth)/2;a.scrollLeft=c}}}},render:function(){var t=arguments[0];return t("div",{class:[yt(),me]},[this.genTitle(),this.genContent(),this.genIndicator()])}});var Vp=p("sku-row-item"),zp=Vp[0];const jo=zp({mixins:[X("vanSkuRows")],props:{lazyLoad:Boolean,skuValue:Object,skuKeyStr:String,skuEventBus:Object,selectedSku:Object,largeImageMode:Boolean,disableSoldoutSku:Boolean,skuList:{type:Array,default:function(){return[]}}},computed:{imgUrl:function(){var t=this.skuValue.imgUrl||this.skuValue.img_url;return this.largeImageMode?t||"https://img01.yzcdn.cn/upload_files/2020/06/24/FmKWDg0bN9rMcTp9ne8MXiQWGtLn.png":t},choosable:function(){return this.disableSoldoutSku?ar(this.skuList,this.selectedSku,{key:this.skuKeyStr,valueId:this.skuValue.id}):!0}},methods:{onSelect:function(){this.choosable&&this.skuEventBus.$emit("sku:select",m({},this.skuValue,{skuKeyStr:this.skuKeyStr}))},onPreviewImg:function(t){t.stopPropagation();var i=this.skuValue,n=this.skuKeyStr;this.skuEventBus.$emit("sku:previewImage",m({},i,{ks:n,imgUrl:i.imgUrl||i.img_url}))},genImage:function(t){var i=this.$createElement;if(this.imgUrl)return i(oe,{attrs:{fit:"cover",src:this.imgUrl,lazyLoad:this.lazyLoad},class:t+"-img"})}},render:function(){var t=arguments[0],i=this.skuValue.id===this.selectedSku[this.skuKeyStr],n=this.largeImageMode?yt("image-item"):yt("item");return t("span",{class:[n,i?n+"--active":"",this.choosable?"":n+"--disabled"],on:{click:this.onSelect}},[this.genImage(n),t("div",{class:n+"-name"},[this.largeImageMode?t("span",{class:{"van-multi-ellipsis--l2":this.largeImageMode}},[this.skuValue.name]):this.skuValue.name]),this.largeImageMode&&t(w,{attrs:{name:"enlarge"},class:n+"-img-icon",on:{click:this.onPreviewImg}})])}});var Fp=p("sku-row-prop-item"),Hp=Fp[0];const Wo=Hp({props:{skuValue:Object,skuKeyStr:String,skuEventBus:Object,selectedProp:Object,multiple:Boolean,disabled:Boolean},computed:{choosed:function(){var t=this.selectedProp,i=this.skuKeyStr,n=this.skuValue;return t&&t[i]?t[i].indexOf(n.id)>-1:!1}},methods:{onSelect:function(){this.disabled||this.skuEventBus.$emit("sku:propSelect",m({},this.skuValue,{skuKeyStr:this.skuKeyStr,multiple:this.multiple}))}},render:function(){var t=arguments[0];return t("span",{class:["van-sku-row__item",{"van-sku-row__item--active":this.choosed},{"van-sku-row__item--disabled":this.disabled}],on:{click:this.onSelect}},[t("span",{class:"van-sku-row__item-name"},[this.skuValue.name])])}});var Uo=p("stepper"),jp=Uo[0],$i=Uo[1],Wp=600,Up=200;function wi(e,t){return String(e)===String(t)}const qo=jp({mixins:[Lt],props:{value:null,theme:String,integer:Boolean,disabled:Boolean,allowEmpty:Boolean,inputWidth:[Number,String],buttonSize:[Number,String],asyncChange:Boolean,placeholder:String,disablePlus:Boolean,disableMinus:Boolean,disableInput:Boolean,decimalLength:[Number,String],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},showInput:{type:Boolean,default:!0},longPress:{type:Boolean,default:!0}},data:function(){var t,i=(t=this.value)!=null?t:this.defaultValue,n=this.format(i);return wi(n,this.value)||this.$emit("input",n),{currentValue:n}},computed:{minusDisabled:function(){return this.disabled||this.disableMinus||this.currentValue<=+this.min},plusDisabled:function(){return this.disabled||this.disablePlus||this.currentValue>=+this.max},inputStyle:function(){var t={};return this.inputWidth&&(t.width=P(this.inputWidth)),this.buttonSize&&(t.height=P(this.buttonSize)),t},buttonStyle:function(){if(this.buttonSize){var t=P(this.buttonSize);return{width:t,height:t}}}},watch:{max:"check",min:"check",integer:"check",decimalLength:"check",value:function(t){wi(t,this.currentValue)||(this.currentValue=this.format(t))},currentValue:function(t){this.$emit("input",t),this.$emit("change",t,{name:this.name})}},methods:{check:function(){var t=this.format(this.currentValue);wi(t,this.currentValue)||(this.currentValue=t)},formatNumber:function(t){return Jr(String(t),!this.integer)},format:function(t){return this.allowEmpty&&t===""||(t=this.formatNumber(t),t=t===""?0:+t,t=Vi(t)?this.min:t,t=Math.max(Math.min(this.max,t),this.min),_(this.decimalLength)&&(t=t.toFixed(this.decimalLength))),t},onInput:function(t){var i=t.target.value,n=this.formatNumber(i);if(_(this.decimalLength)&&n.indexOf(".")!==-1){var r=n.split(".");n=r[0]+"."+r[1].slice(0,this.decimalLength)}wi(i,n)||(t.target.value=n),n===String(+n)&&(n=+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);return}var i=t==="minus"?-this.step:+this.step,n=this.format(Qr(+this.currentValue,i));this.emitChange(n),this.$emit(t)},onFocus:function(t){this.disableInput&&this.$refs.input?this.$refs.input.blur():this.$emit("focus",t)},onBlur:function(t){var i=this.format(t.target.value);t.target.value=i,this.emitChange(i),this.$emit("blur",t),ua()},longPressStep:function(){var t=this;this.longPressTimer=setTimeout(function(){t.onChange(),t.longPressStep(t.type)},Up)},onTouchStart:function(){var t=this;this.longPress&&(clearTimeout(this.longPressTimer),this.isLongPress=!1,this.longPressTimer=setTimeout(function(){t.isLongPress=!0,t.onChange(),t.longPressStep()},Wp))},onTouchEnd:function(t){this.longPress&&(clearTimeout(this.longPressTimer),this.isLongPress&&z(t))},onMousedown:function(t){this.disableInput&&t.preventDefault()}},render:function(){var t=this,i=arguments[0],n=function(a){return{on:{click:function(o){o.preventDefault(),t.type=a,t.onChange()},touchstart:function(){t.type=a,t.onTouchStart()},touchend:t.onTouchEnd,touchcancel:t.onTouchEnd}}};return i("div",{class:$i([this.theme])},[i("button",T([{directives:[{name:"show",value:this.showMinus}],attrs:{type:"button"},style:this.buttonStyle,class:$i("minus",{disabled:this.minusDisabled})},n("minus")])),i("input",{directives:[{name:"show",value:this.showInput}],ref:"input",attrs:{type:this.integer?"tel":"text",role:"spinbutton",disabled:this.disabled,readonly:this.disableInput,inputmode:this.integer?"numeric":"decimal",placeholder:this.placeholder,"aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.currentValue},class:$i("input"),domProps:{value:this.currentValue},style:this.inputStyle,on:{input:this.onInput,focus:this.onFocus,blur:this.onBlur,mousedown:this.onMousedown}}),i("button",T([{directives:[{name:"show",value:this.showPlus}],attrs:{type:"button"},style:this.buttonStyle,class:$i("plus",{disabled:this.plusDisabled})},n("plus")]))])}});var Ko=p("sku-stepper"),qp=Ko[0],xi=Ko[2],Kp=ki.QUOTA_LIMIT,Yo=ki.STOCK_LIMIT;const Xo=qp({props:{stock:Number,skuEventBus:Object,skuStockNum:Number,selectedNum:Number,stepperTitle:String,disableStepperInput:Boolean,customStepperConfig:Object,hideQuotaText:Boolean,quota:{type:Number,default:0},quotaUsed:{type:Number,default:0},startSaleNum:{type:Number,default:1}},data:function(){return{currentNum:this.selectedNum,limitType:Yo}},watch:{currentNum:function(t){var i=parseInt(t,10);i>=this.stepperMinLimit&&i<=this.stepperLimit&&this.skuEventBus.$emit("sku:numChange",i)},stepperLimit:function(t){t<this.currentNum&&this.stepperMinLimit<=t&&(this.currentNum=t),this.checkState(this.stepperMinLimit,t)},stepperMinLimit:function(t){(t>this.currentNum||t>this.stepperLimit)&&(this.currentNum=t),this.checkState(t,this.stepperLimit)}},computed:{stepperLimit:function(){var t=this.quota-this.quotaUsed,i;return this.quota>0&&t<=this.stock?(i=t<0?0:t,this.limitType=Kp):(i=this.stock,this.limitType=Yo),i},stepperMinLimit:function(){return this.startSaleNum<1?1:this.startSaleNum},quotaText:function(){var t=this.customStepperConfig,i=t.quotaText,n=t.hideQuotaText;if(n)return"";var r="";if(i)r=i;else{var a=[];this.startSaleNum>1&&a.push(xi("quotaStart",this.startSaleNum)),this.quota>0&&a.push(xi("quotaLimit",this.quota)),r=a.join(xi("comma"))}return r}},created:function(){this.checkState(this.stepperMinLimit,this.stepperLimit)},methods:{setCurrentNum:function(t){this.currentNum=t,this.checkState(this.stepperMinLimit,this.stepperLimit)},onOverLimit:function(t){this.skuEventBus.$emit("sku:overLimit",{action:t,limitType:this.limitType,quota:this.quota,quotaUsed:this.quotaUsed,startSaleNum:this.startSaleNum})},onChange:function(t){var i=parseInt(t,10),n=this.customStepperConfig.handleStepperChange;n&&n(i),this.$emit("change",i)},checkState:function(t,i){this.currentNum<t||t>i?this.currentNum=t:this.currentNum>i&&(this.currentNum=i),this.skuEventBus.$emit("sku:stepperState",{valid:t<=i,min:t,max:i,limitType:this.limitType,quota:this.quota,quotaUsed:this.quotaUsed,startSaleNum:this.startSaleNum})}},render:function(){var t=this,i=arguments[0];return i("div",{class:"van-sku-stepper-stock"},[i("div",{class:"van-sku__stepper-title"},[this.stepperTitle||xi("num")]),i(qo,{attrs:{integer:!0,min:this.stepperMinLimit,max:this.stepperLimit,disableInput:this.disableStepperInput},class:"van-sku__stepper",on:{overlimit:this.onOverLimit,change:this.onChange},model:{value:t.currentNum,callback:function(r){t.currentNum=r}}}),!this.hideQuotaText&&this.quotaText&&i("span",{class:"van-sku__stepper-quota"},["(",this.quotaText,")"])])}});function Yp(e){var t=/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;return t.test(e.trim())}function Go(e){return Array.isArray(e)?e:[e]}function Zo(e,t){return new Promise(function(i){if(t==="file"){i(null);return}var n=new FileReader;n.onload=function(r){i(r.target.result)},t==="dataUrl"?n.readAsDataURL(e):t==="text"&&n.readAsText(e)})}function Jo(e,t){return Go(e).some(function(i){return i?ie(t)?t(i):i.size>t:!1})}var Xp=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;function Gp(e){return Xp.test(e)}function Qo(e){return e.isImage?!0:e.file&&e.file.type?e.file.type.indexOf("image")===0:e.url?Gp(e.url):e.content?e.content.indexOf("data:image")===0:!1}var tl=p("uploader"),Zp=tl[0],R=tl[1];const el=Zp({inheritAttrs:!1,mixins:[Lt],model:{prop:"fileList"},props:{disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,uploadText:String,afterRead:Function,beforeRead:Function,beforeDelete:Function,previewSize:[Number,String],previewOptions:Object,name:{type:[Number,String],default:""},accept:{type:String,default:"image/*"},fileList:{type:Array,default:function(){return[]}},maxSize:{type:[Number,String,Function],default:Number.MAX_VALUE},maxCount:{type:[Number,String],default:Number.MAX_VALUE},deletable:{type:Boolean,default:!0},showUpload:{type:Boolean,default:!0},previewImage:{type:Boolean,default:!0},previewFullImage:{type:Boolean,default:!0},imageFit:{type:String,default:"cover"},resultType:{type:String,default:"dataUrl"},uploadIcon:{type:String,default:"photograph"}},computed:{previewSizeWithUnit:function(){return P(this.previewSize)},value:function(){return this.fileList}},created:function(){this.urls=[]},beforeDestroy:function(){this.urls.forEach(function(t){return URL.revokeObjectURL(t)})},methods:{getDetail:function(t){return t===void 0&&(t=this.fileList.length),{name:this.name,index:t}},onChange:function(t){var i=this,n=t.target.files;if(!(this.disabled||!n.length)){if(n=n.length===1?n[0]:[].slice.call(n),this.beforeRead){var r=this.beforeRead(n,this.getDetail());if(!r){this.resetInput();return}if(Re(r)){r.then(function(a){a?i.readFile(a):i.readFile(n)}).catch(this.resetInput);return}}this.readFile(n)}},readFile:function(t){var i=this,n=Jo(t,this.maxSize);if(Array.isArray(t)){var r=this.maxCount-this.fileList.length;t.length>r&&(t=t.slice(0,r)),Promise.all(t.map(function(a){return Zo(a,i.resultType)})).then(function(a){var s=t.map(function(o,l){var c={file:o,status:"",message:""};return a[l]&&(c.content=a[l]),c});i.onAfterRead(s,n)})}else Zo(t,this.resultType).then(function(a){var s={file:t,status:"",message:""};a&&(s.content=a),i.onAfterRead(s,n)})},onAfterRead:function(t,i){var n=this;this.resetInput();var r=t;if(i){var a=t;Array.isArray(t)?(a=[],r=[],t.forEach(function(o){o.file&&(Jo(o.file,n.maxSize)?a.push(o):r.push(o))})):r=null,this.$emit("oversize",a,this.getDetail())}var s=Array.isArray(r)?!!r.length:!!r;s&&(this.$emit("input",[].concat(this.fileList,Go(r))),this.afterRead&&this.afterRead(r,this.getDetail()))},onDelete:function(t,i){var n,r=this,a=(n=t.beforeDelete)!=null?n:this.beforeDelete;if(a){var s=a(t,this.getDetail(i));if(!s)return;if(Re(s)){s.then(function(){r.deleteFile(t,i)}).catch(pe);return}}this.deleteFile(t,i)},deleteFile:function(t,i){var n=this.fileList.slice(0);n.splice(i,1),this.$emit("input",n),this.$emit("delete",t,this.getDetail(i))},resetInput:function(){this.$refs.input&&(this.$refs.input.value="")},onClickUpload:function(t){this.$emit("click-upload",t)},onPreviewImage:function(t){var i=this;if(this.previewFullImage){var n=this.fileList.filter(function(a){return Qo(a)}),r=n.map(function(a){return a.file&&!a.url&&a.status!=="failed"&&(a.url=URL.createObjectURL(a.file),i.urls.push(a.url)),a.url});this.imagePreview=Hn(m({images:r,startPosition:n.indexOf(t),onClose:function(){i.$emit("close-preview")}},this.previewOptions))}},closeImagePreview:function(){this.imagePreview&&this.imagePreview.close()},chooseFile:function(){this.disabled||this.$refs.input&&this.$refs.input.click()},genPreviewMask:function(t){var i=this.$createElement,n=t.status,r=t.message;if(n==="uploading"||n==="failed"){var a=n==="failed"?i(w,{attrs:{name:"close"},class:R("mask-icon")}):i(ht,{class:R("loading")}),s=_(r)&&r!=="";return i("div",{class:R("mask")},[a,s&&i("div",{class:R("mask-message")},[r])])}},genPreviewItem:function(t,i){var n,r=this,a,s,o=this.$createElement,l=(n=t.deletable)!=null?n:this.deletable,c=t.status!=="uploading"&&l,u=c&&o("div",{class:R("preview-delete"),on:{click:function(b){b.stopPropagation(),r.onDelete(t,i)}}},[o(w,{attrs:{name:"cross"},class:R("preview-delete-icon")})]),h=this.slots("preview-cover",m({index:i},t)),d=h&&o("div",{class:R("preview-cover")},[h]),f=(a=t.previewSize)!=null?a:this.previewSize,v=(s=t.imageFit)!=null?s:this.imageFit,g=Qo(t)?o(oe,{attrs:{fit:v,src:t.content||t.url,width:f,height:f,lazyLoad:this.lazyLoad},class:R("preview-image"),on:{click:function(){r.onPreviewImage(t)}}},[d]):o("div",{class:R("file"),style:{width:this.previewSizeWithUnit,height:this.previewSizeWithUnit}},[o(w,{class:R("file-icon"),attrs:{name:"description"}}),o("div",{class:[R("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url]),d]);return o("div",{class:R("preview"),on:{click:function(){r.$emit("click-preview",t,r.getDetail(i))}}},[g,this.genPreviewMask(t),u])},genPreviewList:function(){if(this.previewImage)return this.fileList.map(this.genPreviewItem)},genUpload:function(){var t=this.$createElement;if(!(this.fileList.length>=this.maxCount)){var i=this.slots(),n=this.readonly?null:t("input",{attrs:m({},this.$attrs,{type:"file",accept:this.accept,disabled:this.disabled}),ref:"input",class:R("input"),on:{change:this.onChange}});if(i)return t("div",{class:R("input-wrapper"),key:"input-wrapper",on:{click:this.onClickUpload}},[i,n]);var r;if(this.previewSize){var a=this.previewSizeWithUnit;r={width:a,height:a}}return t("div",{directives:[{name:"show",value:this.showUpload}],class:R("upload",{readonly:this.readonly}),style:r,on:{click:this.onClickUpload}},[t(w,{attrs:{name:this.uploadIcon},class:R("upload-icon")}),this.uploadText&&t("span",{class:R("upload-text")},[this.uploadText]),n])}}},render:function(){var t=arguments[0];return t("div",{class:R()},[t("div",{class:R("wrapper",{disabled:this.disabled})},[this.genPreviewList(),this.genUpload()])])}});var il=p("sku-img-uploader"),Jp=il[0],cr=il[2];const Qp=Jp({props:{value:String,uploadImg:Function,customUpload:Function,maxSize:{type:Number,default:6}},data:function(){return{fileList:[]}},watch:{value:function(t){t?this.fileList=[{url:t,isImage:!0}]:this.fileList=[]}},methods:{afterReadFile:function(t){var i=this;t.status="uploading",t.message=cr("uploading"),this.uploadImg(t.file,t.content).then(function(n){t.status="done",i.$emit("input",n)}).catch(function(){t.status="failed",t.message=cr("fail")})},onOversize:function(){this.$toast(cr("oversize",this.maxSize))},onDelete:function(){this.$emit("input","")},onClickUpload:function(){var t=this;this.customUpload&&this.customUpload().then(function(i){t.fileList.push({url:i}),t.$emit("input",i)})}},render:function(){var t=this,i=arguments[0];return i(el,{attrs:{maxCount:1,readonly:!!this.customUpload,maxSize:this.maxSize*1024*1024,afterRead:this.afterReadFile},on:{oversize:this.onOversize,delete:this.onDelete,"click-upload":this.onClickUpload},model:{value:t.fileList,callback:function(r){t.fileList=r}}})}});function tv(e){return e?new Date(e.replace(/-/g,"/")):null}function ev(e,t){if(t===void 0&&(t="date"),!e)return"";var i=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),a=i+"-"+N(n)+"-"+N(r);if(t==="datetime"){var s=e.getHours(),o=e.getMinutes();a+=" "+N(s)+":"+N(o)}return a}var nl=p("sku-datetime-field"),iv=nl[0],rl=nl[2];const nv=iv({props:{value:String,label:String,required:Boolean,placeholder:String,type:{type:String,default:"date"}},data:function(){return{showDatePicker:!1,currentDate:this.type==="time"?"":new Date,minDate:new Date(new Date().getFullYear()-60,0,1)}},watch:{value:function(t){switch(this.type){case"time":this.currentDate=t;break;case"date":case"datetime":this.currentDate=tv(t)||new Date;break}}},computed:{title:function(){return rl("title."+this.type)}},methods:{onClick:function(){this.showDatePicker=!0},onConfirm:function(t){var i=t;this.type!=="time"&&(i=ev(t,this.type)),this.$emit("input",i),this.showDatePicker=!1},onCancel:function(){this.showDatePicker=!1},formatter:function(t,i){var n=rl("format."+t);return""+i+n}},render:function(){var t=this,i=arguments[0];return i(rt,{attrs:{readonly:!0,"is-link":!0,center:!0,value:this.value,label:this.label,required:this.required,placeholder:this.placeholder},on:{click:this.onClick}},[i(St,{attrs:{round:!0,position:"bottom",getContainer:"body"},slot:"extra",model:{value:t.showDatePicker,callback:function(r){t.showDatePicker=r}}},[i(_s,{attrs:{type:this.type,title:this.title,value:this.currentDate,minDate:this.minDate,formatter:this.formatter},on:{cancel:this.onCancel,confirm:this.onConfirm}})])])}});var ur=p("sku-messages"),rv=ur[0],he=ur[1],Qt=ur[2];const al=rv({props:{messageConfig:Object,goodsId:[Number,String],messages:{type:Array,default:function(){return[]}}},data:function(){return{messageValues:this.resetMessageValues(this.messages)}},watch:{messages:function(t){this.messageValues=this.resetMessageValues(t)}},methods:{resetMessageValues:function(t){var i=this.messageConfig,n=i.initialMessages,r=n===void 0?{}:n;return(t||[]).map(function(a){return{value:r[a.name]||""}})},getType:function(t){return+t.multiple==1?"textarea":t.type==="id_no"?"text":t.datetime>0?"datetime":t.type},getMessages:function(){var t={};return this.messageValues.forEach(function(i,n){t["message_"+n]=i.value}),t},getCartMessages:function(){var t=this,i={};return this.messageValues.forEach(function(n,r){var a=t.messages[r];i[a.name]=n.value}),i},getPlaceholder:function(t){var i=+t.multiple==1?"textarea":t.type,n=this.messageConfig.placeholderMap||{};return t.placeholder||n[i]||Qt("placeholder."+i)},validateMessages:function(){for(var t=this.messageValues,i=0;i<t.length;i++){var n=t[i].value,r=this.messages[i];if(n===""){if(String(r.required)==="1"){var a=Qt(r.type==="image"?"upload":"fill");return a+r.name}}else{if(r.type==="tel"&&!Ri(n))return Qt("invalid.tel");if(r.type==="mobile"&&!/^\d{6,20}$/.test(n))return Qt("invalid.mobile");if(r.type==="email"&&!Yp(n))return Qt("invalid.email");if(r.type==="id_no"&&(n.length<15||n.length>18))return Qt("invalid.id_no")}}},getFormatter:function(t){return function(n){return t.type==="mobile"||t.type==="tel"?n.replace(/[^\d.]/g,""):n}},getExtraDesc:function(t){var i=this.$createElement,n=t.extraDesc;if(n)return i("div",{class:he("extra-message")},[n])},genMessage:function(t,i){var n=this,r=this.$createElement;if(t.type==="image")return r(q,{key:this.goodsId+"-"+i,attrs:{title:t.name,required:String(t.required)==="1",valueClass:he("image-cell-value")},class:he("image-cell")},[r(Qp,{attrs:{maxSize:this.messageConfig.uploadMaxSize,uploadImg:this.messageConfig.uploadImg,customUpload:this.messageConfig.customUpload},model:{value:n.messageValues[i].value,callback:function(o){n.$set(n.messageValues[i],"value",o)}}}),r("div",{class:he("image-cell-label")},[Qt("imageLabel")])]);var a=["date","time"].indexOf(t.type)>-1;return a?r(nv,{attrs:{label:t.name,required:String(t.required)==="1",placeholder:this.getPlaceholder(t),type:this.getType(t)},key:this.goodsId+"-"+i,model:{value:n.messageValues[i].value,callback:function(o){n.$set(n.messageValues[i],"value",o)}}}):r("div",{class:he("cell-block")},[r(rt,{attrs:{maxlength:"200",center:!t.multiple,label:t.name,required:String(t.required)==="1",placeholder:this.getPlaceholder(t),type:this.getType(t),formatter:this.getFormatter(t),border:!1},key:this.goodsId+"-"+i,model:{value:n.messageValues[i].value,callback:function(o){n.$set(n.messageValues[i],"value",o)}}}),this.getExtraDesc(t)])}},render:function(){var t=arguments[0];return t("div",{class:he()},[this.messages.map(this.genMessage)])}});var hr=p("sku-actions"),av=hr[0],sv=hr[1],sl=hr[2];function ol(e,t,i,n){var r=function(s){return function(){t.skuEventBus.$emit(s)}};return e("div",T([{class:sv()},B(n)]),[t.showAddCartBtn&&e(F,{attrs:{size:"large",type:"warning",text:t.addCartText||sl("addCart")},on:{click:r("sku:addCart")}}),e(F,{attrs:{size:"large",type:"danger",text:t.buyText||sl("buy")},on:{click:r("sku:buy")}})])}ol.props={buyText:String,addCartText:String,skuEventBus:Object,showAddCartBtn:Boolean};const ll=av(ol);var dr=p("sku"),ov=dr[0],lv=dr[1],lt=dr[2],cv=ki.QUOTA_LIMIT;const bt=ov({props:{sku:Object,goods:Object,value:Boolean,buyText:String,goodsId:[Number,String],priceTag:String,lazyLoad:Boolean,hideStock:Boolean,properties:Array,skuProperties:Array,addCartText:String,stepperTitle:String,getContainer:[String,Function],hideQuotaText:Boolean,hideSelectedText:Boolean,resetStepperOnHide:Boolean,customSkuValidator:Function,disableStepperInput:Boolean,resetSelectedSkuOnHide:Boolean,quota:{type:Number,default:0},quotaUsed:{type:Number,default:0},startSaleNum:{type:Number,default:1},initialSku:{type:Object,default:function(){return{}}},stockThreshold:{type:Number,default:50},showSoldoutSku:{type:Boolean,default:!0},showAddCartBtn:{type:Boolean,default:!0},disableSoldoutSku:{type:Boolean,default:!0},customStepperConfig:{type:Object,default:function(){return{}}},showHeaderImage:{type:Boolean,default:!0},previewOnClickImage:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},bodyOffsetTop:{type:Number,default:200},messageConfig:{type:Object,default:function(){return{initialMessages:{},placeholderMap:{},uploadImg:function(){return Promise.resolve()},uploadMaxSize:5}}}},data:function(){return{selectedSku:{},selectedProp:{},selectedNum:1,show:this.value,currentSkuProperties:[]}},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())},value:function(t){this.show=t},initialSku:function(){this.resetStepper(),this.resetSelectedSku()}},computed:{isSkuProperties:function(){return this.skuProperties&&this.skuProperties.length},skuGroupClass:function(){return["van-sku-group-container",{"van-sku-group-container--hide-soldout":!this.showSoldoutSku}]},bodyStyle:function(){if(!this.$isServer){var t=window.innerHeight-this.bodyOffsetTop;return{maxHeight:t+"px"}}},isSkuCombSelected:function(){var t=this;return this.hasSku&&!Do(this.skuTree,this.selectedSku)?!1:!this.propList.filter(function(i){return i.is_necessary!==!1}).some(function(i){return(t.selectedProp[i.k_id]||[]).length===0})},isSkuEmpty:function(){return Object.keys(this.sku).length===0},hasSku:function(){return!this.sku.none_sku},hasSkuOrAttr:function(){return this.hasSku||this.propList.length>0},selectedSkuComb:function(){var t=null;return(this.isSkuCombSelected||this.isSkuProperties)&&(this.hasSku?t=No(this.skuList,this.selectedSku):t={id:this.sku.collection_id,price:Math.round(this.sku.price*100),stock_num:this.sku.stock_num},this.setCurrentSkuProperties(t?t.id:null),t&&(t.properties=Ro(this.propList,this.selectedProp),t.property_price=this.selectedPropValues.reduce(function(i,n){return i+(n.price||0)},0))),t},selectedSkuValues:function(){return Mo(this.skuTree,this.selectedSku)},selectedPropValues:function(){return Ao(this.propList,this.selectedProp)},price:function(){return this.selectedSkuComb?((this.selectedSkuComb.price+this.selectedSkuComb.property_price)/100).toFixed(2):this.sku.price},originPrice:function(){return this.selectedSkuComb&&this.selectedSkuComb.origin_price?((this.selectedSkuComb.origin_price+this.selectedSkuComb.property_price)/100).toFixed(2):this.sku.origin_price},skuTree:function(){var t=this.sku.tree||[];return!t.length||!this.skuList.length?t:Lo(t,this.skuList,this.selectedSku)},skuList:function(){return this.sku.list||[]},propList:function(){return this.isSkuProperties?this.currentSkuProperties:this.properties||[]},imageList:function(){var t=[this.goods.picture];return this.skuTree.length>0&&this.skuTree.forEach(function(i){i.v&&i.v.forEach(function(n){var r=n.previewImgUrl||n.imgUrl||n.img_url;r&&t.indexOf(r)===-1&&t.push(r)})}),t},stock:function(){var t=this.customStepperConfig.stockNum;return t!==void 0?t:this.selectedSkuComb?this.selectedSkuComb.stock_num:this.sku.stock_num},stockText:function(){var t=this.$createElement,i=this.customStepperConfig.stockFormatter;return i?i(this.stock):[lt("stock")+" ",t("span",{class:lv("stock-num",{highlight:this.stock<this.stockThreshold})},[this.stock])," "+lt("stockUnit")]},selectedText:function(){var t=this;if(this.selectedSkuComb){var i=this.selectedSkuValues.concat(this.selectedPropValues);return lt("selected")+" "+i.map(function(a){return a.name}).join(" ")}var n=this.skuTree.filter(function(a){return t.selectedSku[a.k_s]===xt}).map(function(a){return a.k}),r=this.propList.filter(function(a){return(t.selectedProp[a.k_id]||[]).length<1}).map(function(a){return a.k});return lt("select")+" "+n.concat(r).join(" ")}},created:function(){var t=new $;this.skuEventBus=t,t.$on("sku:select",this.onSelect),t.$on("sku:propSelect",this.onPropSelect),t.$on("sku:numChange",this.onNumChange),t.$on("sku:previewImage",this.onPreviewImage),t.$on("sku:overLimit",this.onOverLimit),t.$on("sku:stepperState",this.onStepperState),t.$on("sku:addCart",this.onAddCart),t.$on("sku:buy",this.onBuy),this.resetStepper(),this.resetSelectedSku(),this.$emit("after-sku-create",t)},methods:{setCurrentSkuProperties:function(t){var i,n=((i=this.skuProperties)==null?void 0:i.find(function(r){return r.sku_id===t}))||{};this.currentSkuProperties=n.properties||[]},resetStepper:function(){var t=this.$refs.skuStepper,i=this.initialSku.selectedNum,n=i??this.startSaleNum;this.stepperError=null,t?t.setCurrentNum(n):this.selectedNum=n},resetSelectedSku:function(){var t=this;this.selectedSku={};var i=this.checkInitialSkuDisabled();if(i){this.resetSelectedProp();return}this.skuTree.forEach(function(r){t.selectedSku[r.k_s]=xt}),this.skuTree.forEach(function(r){var a=r.k_s,s=r.v.length===1?r.v[0].id:t.initialSku[a];if(s&&ar(t.skuList,t.selectedSku,{key:a,valueId:s})){var o=t.skuList.filter(function(c){return String(c[a])===String(s)}),l=o.some(function(c){return c.disable_status!==1});l&&(t.selectedSku[a]=s)}});var n=this.selectedSkuValues;n.length>0&&this.$nextTick(function(){t.$emit("sku-selected",{skuValue:n[n.length-1],selectedSku:t.selectedSku,selectedSkuComb:t.selectedSkuComb})}),this.resetSelectedProp(),this.$emit("sku-reset",{selectedSku:this.selectedSku,selectedProp:this.selectedProp,selectedSkuComb:this.selectedSkuComb}),this.centerInitialSku()},checkInitialSkuDisabled:function(){var t=this;if(Tr(this.initialSku)||!this.skuList.length)return!1;var i=["s1","s2","s3","s4","s5"],n=i.filter(function(a){return t.initialSku[a]!==void 0&&t.initialSku[a]!==xt&&t.initialSku[a]!==""});if(!n.length)return!1;var r=this.skuList.filter(function(a){return n.every(function(s){return String(a[s])===String(t.initialSku[s])})});return!r.length||r.every(function(a){return a.disable_status===1})},resetSelectedProp:function(){var t=this;this.selectedProp={};var i=this.initialSku.selectedProp,n=i===void 0?{}:i;this.propList.forEach(function(a){n[a.k_id]&&(t.selectedProp[a.k_id]=n[a.k_id])}),Tr(this.selectedProp)&&this.propList.forEach(function(a){var s;if((a==null||(s=a.v)==null?void 0:s.length)>0){var o=a.v,l=a.k_id,c=o.some(function(h){return+h.price!=0});if(!c){var u=o.find(function(h){return h.text_status!==0});u&&(t.selectedProp[l]=[u.id])}}});var r=this.selectedPropValues;r.length>0&&this.$emit("sku-prop-selected",{propValue:r[r.length-1],selectedProp:this.selectedProp,selectedSkuComb:this.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(this.selectedNum===0)return lt("unavailable");if(this.isSkuCombSelected)return this.validateSkuMessages();if(this.customSkuValidator){var t=this.customSkuValidator(this);if(t)return t}return lt("selectSku")},onSelect:function(t){var i=this,n=m({},this.selectedSku);n[t.skuKeyStr]===t.id?n[t.skuKeyStr]=xt:n[t.skuKeyStr]=t.id,this.selectedSku=n,this.isSkuProperties&&(this.selectedProp={},this.onPropClear()),this.$nextTick(function(){i.$emit("sku-selected",{skuValue:t,selectedSku:i.selectedSku,selectedSkuComb:i.selectedSkuComb})})},onPropClear:function(){this.$emit("sku-prop-clear")},onPropSelect:function(t){var i,n=this.selectedProp[t.skuKeyStr]||[],r=n.indexOf(t.id);r>-1?n.splice(r,1):t.multiple?n.push(t.id):n.splice(0,1,t.id),this.selectedProp=m({},this.selectedProp,(i={},i[t.skuKeyStr]=n,i)),this.$emit("sku-prop-selected",{propValue:t,selectedProp:this.selectedProp,selectedSkuComb:this.selectedSkuComb})},onNumChange:function(t){this.selectedNum=t},onPreviewImage:function(t){var i=this,n=this.imageList,r=0,a=n[0];t&&t.imgUrl&&(this.imageList.some(function(o,l){return o===t.imgUrl?(r=l,!0):!1}),a=t.imgUrl);var s=m({},t,{index:r,imageList:this.imageList,indexImage:a});this.$emit("open-preview",s),this.previewOnClickImage&&Hn({images:this.imageList,startPosition:r,onClose:function(){i.$emit("close-preview",s)}})},onOverLimit:function(t){var i=t.action,n=t.limitType,r=t.quota,a=t.quotaUsed,s=this.customStepperConfig.handleOverLimit;if(s){s(t);return}i==="minus"?this.startSaleNum>1?M(lt("minusStartTip",this.startSaleNum)):M(lt("minusTip")):i==="plus"&&(n===cv?a>0?M(lt("quotaUsedTip",r,a)):M(lt("quotaTip",r)):M(lt("soldout")))},onStepperState:function(t){this.stepperError=t.valid?null:m({},t,{action:"plus"})},onAddCart:function(){this.onBuyOrAddCart("add-cart")},onBuy:function(){this.onBuyOrAddCart("buy-clicked")},onBuyOrAddCart:function(t){if(this.stepperError)return this.onOverLimit(this.stepperError);var i=this.validateSku();i?M(i):this.$emit(t,this.getSkuData())},getSkuData:function(){return{goodsId:this.goodsId,messages:this.getSkuMessages(),selectedNum:this.selectedNum,cartMessages:this.getSkuCartMessages(),selectedSkuComb:this.selectedSkuComb}},onOpened:function(){this.centerInitialSku()},centerInitialSku:function(){var t=this;(this.$refs.skuRows||[]).forEach(function(i){var n=i.skuRow||{},r=n.k_s;i.centerItem(t.initialSku[r])})}},render:function(){var t=this,i=arguments[0];if(!this.isSkuEmpty){var n=this.sku,r=this.skuList,a=this.goods,s=this.price,o=this.lazyLoad,l=this.originPrice,c=this.skuEventBus,u=this.selectedSku,h=this.selectedProp,d=this.selectedNum,f=this.stepperTitle,v=this.selectedSkuComb,g=this.showHeaderImage,y=this.disableSoldoutSku,b={price:s,originPrice:l,selectedNum:d,skuEventBus:c,selectedSku:u,selectedSkuComb:v},S=function(U){return t.slots(U,b)},x=S("sku-header")||i(Fo,{attrs:{sku:n,goods:a,skuEventBus:c,selectedSku:u,showHeaderImage:g}},[i("template",{slot:"sku-header-image-extra"},[S("sku-header-image-extra")]),S("sku-header-price")||i("div",{class:"van-sku__goods-price"},[i("span",{class:"van-sku__price-symbol"},["¥"]),i("span",{class:"van-sku__price-num"},[s]),this.priceTag&&i("span",{class:"van-sku__price-tag"},[this.priceTag])]),S("sku-header-origin-price")||l&&i(Ci,[lt("originPrice")," ¥",l]),!this.hideStock&&i(Ci,[i("span",{class:"van-sku__stock"},[this.stockText])]),this.hasSkuOrAttr&&!this.hideSelectedText&&i(Ci,[this.selectedText]),S("sku-header-extra")]),k=S("sku-group")||this.hasSkuOrAttr&&i("div",{class:this.skuGroupClass},[this.skuTree.map(function(L){return i(lr,{attrs:{skuRow:L},ref:"skuRows",refInFor:!0},[L.v.map(function(U){return i(jo,{attrs:{skuList:r,lazyLoad:o,skuValue:U,skuKeyStr:L.k_s,selectedSku:u,skuEventBus:c,disableSoldoutSku:y,largeImageMode:L.largeImageMode}})})])}),this.propList.map(function(L){return i(lr,{attrs:{skuRow:L}},[L.v.map(function(U){return i(Wo,{attrs:{skuValue:U,skuKeyStr:L.k_id+"",selectedProp:h,skuEventBus:c,multiple:L.is_multiple,disabled:U.text_status===0}})})])})]),C=S("sku-stepper")||i(Xo,{ref:"skuStepper",attrs:{stock:this.stock,quota:this.quota,quotaUsed:this.quotaUsed,startSaleNum:this.startSaleNum,skuEventBus:c,selectedNum:d,stepperTitle:f,skuStockNum:n.stock_num,disableStepperInput:this.disableStepperInput,customStepperConfig:this.customStepperConfig,hideQuotaText:this.hideQuotaText},on:{change:function(U){t.$emit("stepper-change",U)}}}),O=S("sku-messages")||i(al,{ref:"skuMessages",attrs:{goodsId:this.goodsId,messageConfig:this.messageConfig,messages:n.messages}}),_t=S("sku-actions")||i(ll,{attrs:{buyText:this.buyText,skuEventBus:c,addCartText:this.addCartText,showAddCartBtn:this.showAddCartBtn}});return i(St,{attrs:{round:!0,closeable:!0,position:"bottom",getContainer:this.getContainer,closeOnClickOverlay:this.closeOnClickOverlay,safeAreaInsetBottom:this.safeAreaInsetBottom},class:"van-sku-container",on:{opened:this.onOpened},model:{value:t.show,callback:function(U){t.show=U}}},[x,i("div",{class:"van-sku-body",style:this.bodyStyle},[S("sku-body-top"),k,S("extra-sku-group"),C,S("before-sku-messages"),O,S("after-sku-messages")]),S("sku-actions-top"),_t])}}});Ai.add(Ip),bt.SkuActions=ll,bt.SkuHeader=Fo,bt.SkuHeaderItem=Ci,bt.SkuMessages=al,bt.SkuStepper=Xo,bt.SkuRow=lr,bt.SkuRowItem=jo,bt.SkuRowPropItem=Wo,bt.skuHelper=Bp,bt.skuConstants=Op;var cl=p("slider"),uv=cl[0],Ti=cl[1],ul=function(t,i){return JSON.stringify(t)===JSON.stringify(i)};const hv=uv({mixins:[nt,Lt],props:{disabled:Boolean,vertical:Boolean,range:Boolean,barHeight:[Number,String],buttonSize:[Number,String],activeColor:String,inactiveColor:String,min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},step:{type:[Number,String],default:1},value:{type:[Number,Array],default:0}},data:function(){return{dragStatus:""}},computed:{scope:function(){return this.max-this.min},buttonStyle:function(){if(this.buttonSize){var t=P(this.buttonSize);return{width:t,height:t}}}},created:function(){this.updateValue(this.value)},mounted:function(){this.range?(this.bindTouchEvent(this.$refs.wrapper0),this.bindTouchEvent(this.$refs.wrapper1)):this.bindTouchEvent(this.$refs.wrapper)},methods:{onTouchStart:function(t){this.disabled||(this.touchStart(t),this.currentValue=this.value,this.range?this.startValue=this.value.map(this.format):this.startValue=this.format(this.value),this.dragStatus="start")},onTouchMove:function(t){if(!this.disabled){this.dragStatus==="start"&&this.$emit("drag-start"),z(t,!0),this.touchMove(t),this.dragStatus="draging";var i=this.$el.getBoundingClientRect(),n=this.vertical?this.deltaY:this.deltaX,r=this.vertical?i.height:i.width,a=n/r*this.scope;this.range?this.currentValue[this.index]=this.startValue[this.index]+a:this.currentValue=this.startValue+a,this.updateValue(this.currentValue)}},onTouchEnd:function(){this.disabled||(this.dragStatus==="draging"&&(this.updateValue(this.currentValue,!0),this.$emit("drag-end")),this.dragStatus="")},onClick:function(t){if(t.stopPropagation(),!this.disabled){var i=this.$el.getBoundingClientRect(),n=this.vertical?t.clientY-i.top:t.clientX-i.left,r=this.vertical?i.height:i.width,a=+this.min+n/r*this.scope;if(this.range){var s=this.value,o=s[0],l=s[1],c=(o+l)/2;a<=c?o=a:l=a,a=[o,l]}this.startValue=this.value,this.updateValue(a,!0)}},handleOverlap:function(t){return t[0]>t[1]?(t=ge(t),t.reverse()):t},updateValue:function(t,i){this.range?t=this.handleOverlap(t).map(this.format):t=this.format(t),ul(t,this.value)||this.$emit("input",t),i&&!ul(t,this.startValue)&&this.$emit("change",t)},format:function(t){var i=+this.min,n=+this.max,r=+this.step;t=W(t,i,n);var a=Math.round((t-i)/r)*r;return Qr(i,a)}},render:function(){var t,i=this,n,r=arguments[0],a=this.vertical,s=a?"height":"width",o=a?"width":"height",l=(t={background:this.inactiveColor},t[o]=P(this.barHeight),t),c=function(){var v=i.value,g=i.min,y=i.range,b=i.scope;return y?(v[1]-v[0])*100/b+"%":(v-g)*100/b+"%"},u=function(){var v=i.value,g=i.min,y=i.range,b=i.scope;return y?(v[0]-g)*100/b+"%":null},h=(n={},n[s]=c(),n.left=this.vertical?null:u(),n.top=this.vertical?u():null,n.background=this.activeColor,n);this.dragStatus&&(h.transition="none");var d=function(v){var g=["left","right"],y=typeof v=="number",b=y?i.value[v]:i.value,S=function(){return y?"button-wrapper-"+g[v]:"button-wrapper"},x=function(){return y?"wrapper"+v:"wrapper"},k=function(){if(y){var O=i.slots(v===0?"left-button":"right-button",{value:b});if(O)return O}return i.slots("button")?i.slots("button"):r("div",{class:Ti("button"),style:i.buttonStyle})};return r("div",{ref:x(),attrs:{role:"slider",tabindex:i.disabled?-1:0,"aria-valuemin":i.min,"aria-valuenow":i.value,"aria-valuemax":i.max,"aria-orientation":i.vertical?"vertical":"horizontal"},class:Ti(S()),on:{touchstart:function(){y&&(i.index=v)},click:function(O){return O.stopPropagation()}}},[k()])};return r("div",{style:l,class:Ti({disabled:this.disabled,vertical:a}),on:{click:this.onClick}},[r("div",{class:Ti("bar"),style:h},[this.range?[d(0),d(1)]:d()])])}});var hl=p("step"),dv=hl[0],jt=hl[1];const fv=dv({mixins:[X("vanSteps")],computed:{status:function(){if(this.index<this.parent.active)return"finish";if(this.index===+this.parent.active)return"process"},active:function(){return this.status==="process"},lineStyle:function(){var t=this.parent,i=t.activeColor,n=t.inactiveColor,r=t.center,a=t.direction,s={background:this.status==="finish"?i:n};return r&&a==="vertical"&&(s.top="50%"),s},circleContainerStyle:function(){if(this.parent.center&&this.parent.direction==="vertical")return{top:"50%"}},titleStyle:function(){if(this.active)return{color:this.parent.activeColor};if(!this.status)return{color:this.parent.inactiveColor}}},methods:{genCircle:function(){var t=this.$createElement,i=this.parent,n=i.activeIcon,r=i.iconPrefix,a=i.activeColor,s=i.finishIcon,o=i.inactiveIcon;if(this.active)return this.slots("active-icon")||t(w,{class:jt("icon","active"),attrs:{name:n,color:a,classPrefix:r}});var l=this.slots("finish-icon");if(this.status==="finish"&&(s||l))return l||t(w,{class:jt("icon","finish"),attrs:{name:s,color:a,classPrefix:r}});var c=this.slots("inactive-icon");return o||c?c||t(w,{class:jt("icon"),attrs:{name:o,classPrefix:r}}):t("i",{class:jt("circle"),style:this.lineStyle})},onClickStep:function(){this.parent.$emit("click-step",this.index)}},render:function(){var t,i=arguments[0],n=this.status,r=this.active,a=this.parent.direction;return i("div",{class:[ft,jt([a,(t={},t[n]=n,t)])]},[i("div",{class:jt("title",{active:r}),style:this.titleStyle,on:{click:this.onClickStep}},[this.slots()]),i("div",{class:jt("circle-container"),on:{click:this.onClickStep},style:this.circleContainerStyle},[this.genCircle()]),i("div",{class:jt("line"),style:this.lineStyle})])}});var dl=p("steps"),pv=dl[0],fl=dl[1];const vv=pv({mixins:[G("vanSteps")],props:{center:Boolean,iconPrefix:String,finishIcon:String,activeColor:String,inactiveIcon:String,inactiveColor:String,active:{type:[Number,String],default:0},direction:{type:String,default:"horizontal"},activeIcon:{type:String,default:"checked"}},render:function(){var t=arguments[0];return t("div",{class:fl([this.direction])},[t("div",{class:fl("items")},[this.slots()])])}});var fr=p("submit-bar"),mv=fr[0],Tt=fr[1],gv=fr[2];function pl(e,t,i,n){var r=t.tip,a=t.price,s=t.tipIcon;function o(){if(typeof a=="number"){var c=(a/100).toFixed(t.decimalLength).split("."),u=t.decimalLength?"."+c[1]:"";return e("div",{style:{textAlign:t.textAlign?t.textAlign:""},class:Tt("text")},[e("span",[t.label||gv("label")]),e("span",{class:Tt("price")},[t.currency,e("span",{class:Tt("price","integer")},[c[0]]),u]),t.suffixLabel&&e("span",{class:Tt("suffix-label")},[t.suffixLabel])])}}function l(){if(i.tip||r)return e("div",{class:Tt("tip")},[s&&e(w,{class:Tt("tip-icon"),attrs:{name:s}}),r&&e("span",{class:Tt("tip-text")},[r]),i.tip&&i.tip()])}return e("div",T([{class:Tt({unfit:!t.safeAreaInsetBottom})},B(n)]),[i.top&&i.top(),l(),e("div",{class:Tt("bar")},[i.default&&i.default(),o(),i.button?i.button():e(F,{attrs:{round:!0,type:t.buttonType,text:t.loading?"":t.buttonText,color:t.buttonColor,loading:t.loading,disabled:t.disabled},class:Tt("button",t.buttonType),on:{click:function(){I(n,"submit")}}})])])}pl.props={tip:String,label:String,price:Number,tipIcon:String,loading:Boolean,disabled:Boolean,textAlign:String,buttonText:String,buttonColor:String,suffixLabel:String,safeAreaInsetBottom:{type:Boolean,default:!0},decimalLength:{type:[Number,String],default:2},currency:{type:String,default:"¥"},buttonType:{type:String,default:"danger"}};const yv=mv(pl);var vl=p("swipe-cell"),bv=vl[0],_i=vl[1],ml=.15;const Sv=bv({mixins:[nt,Rn({event:"touchstart",method:"onClick"})],props:{onClose:Function,disabled:Boolean,leftWidth:[Number,String],rightWidth:[Number,String],beforeClose:Function,stopPropagation:Boolean,name:{type:[Number,String],default:""}},data:function(){return{offset:0,dragging:!1}},computed:{computedLeftWidth:function(){return+this.leftWidth||this.getWidthByRef("left")},computedRightWidth:function(){return+this.rightWidth||this.getWidthByRef("right")}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{getWidthByRef:function(t){if(this.$refs[t]){var i=this.$refs[t].getBoundingClientRect();return i.width}return 0},open:function(t){var i=t==="left"?this.computedLeftWidth:-this.computedRightWidth;this.opened=!0,this.offset=i,this.$emit("open",{position:t,name:this.name,detail:this.name})},close:function(t){this.offset=0,this.opened&&(this.opened=!1,this.$emit("close",{position:t,name:this.name}))},onTouchStart:function(t){this.disabled||(this.startOffset=this.offset,this.touchStart(t))},onTouchMove:function(t){if(!this.disabled&&(this.touchMove(t),this.direction==="horizontal")){this.dragging=!0,this.lockClick=!0;var i=!this.opened||this.deltaX*this.startOffset<0;i&&z(t,this.stopPropagation),this.offset=W(this.deltaX+this.startOffset,-this.computedRightWidth,this.computedLeftWidth)}},onTouchEnd:function(){var t=this;this.disabled||this.dragging&&(this.toggle(this.offset>0?"left":"right"),this.dragging=!1,setTimeout(function(){t.lockClick=!1},0))},toggle:function(t){var i=Math.abs(this.offset),n=this.opened?1-ml:ml,r=this.computedLeftWidth,a=this.computedRightWidth;a&&t==="right"&&i>a*n?this.open("right"):r&&t==="left"&&i>r*n?this.open("left"):this.close()},onClick:function(t){t===void 0&&(t="outside"),this.$emit("click",t),this.opened&&!this.lockClick&&(this.beforeClose?this.beforeClose({position:t,name:this.name,instance:this}):this.onClose?this.onClose(t,this,{name:this.name}):this.close(t))},getClickHandler:function(t,i){var n=this;return function(r){i&&r.stopPropagation(),n.onClick(t)}},genLeftPart:function(){var t=this.$createElement,i=this.slots("left");if(i)return t("div",{ref:"left",class:_i("left"),on:{click:this.getClickHandler("left",!0)}},[i])},genRightPart:function(){var t=this.$createElement,i=this.slots("right");if(i)return t("div",{ref:"right",class:_i("right"),on:{click:this.getClickHandler("right",!0)}},[i])}},render:function(){var t=arguments[0],i={transform:"translate3d("+this.offset+"px, 0, 0)",transitionDuration:this.dragging?"0s":".6s"};return t("div",{class:_i(),on:{click:this.getClickHandler("cell")}},[t("div",{class:_i("wrapper"),style:i},[this.genLeftPart(),this.slots(),this.genRightPart()])])}});var gl=p("switch-cell"),kv=gl[0],Cv=gl[1];function yl(e,t,i,n){return process.env.NODE_ENV==="development"&&console.warn('[Vant] "SwitchCell" component is deprecated, see: https://vant-ui.github.io/vant/v2/#/zh-CN/switch-cell.'),e(q,T([{attrs:{center:!0,size:t.cellSize,title:t.title,border:t.border},class:Cv([t.cellSize])},B(n)]),[e(Je,{props:m({},t),on:m({},n.listeners)})])}yl.props=m({},$a,{title:String,cellSize:String,border:{type:Boolean,default:!0},size:{type:String,default:"24px"}});const $v=kv(yl);var bl=p("tabbar"),wv=bl[0],Sl=bl[1];const xv=wv({mixins:[G("vanTabbar")],props:{route:Boolean,zIndex:[Number,String],placeholder:Boolean,activeColor:String,beforeChange:Function,inactiveColor:String,value:{type:[Number,String],default:0},border:{type:Boolean,default:!0},fixed:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:null}},data:function(){return{height:null}},computed:{fit:function(){return this.safeAreaInsetBottom!==null?this.safeAreaInsetBottom:this.fixed}},watch:{value:"setActiveItem",children:"setActiveItem"},mounted:function(){var t=this;if(this.placeholder&&this.fixed){var i=function(){t.height=t.$refs.tabbar.getBoundingClientRect().height};i(),setTimeout(i,100)}},methods:{setActiveItem:function(){var t=this;this.children.forEach(function(i,n){i.nameMatched=i.name===t.value||n===t.value})},triggerChange:function(t,i){var n=this;Ua({interceptor:this.beforeChange,args:[t],done:function(){n.$emit("input",t),n.$emit("change",t),i()}})},genTabbar:function(){var t,i=this.$createElement;return i("div",{ref:"tabbar",style:{zIndex:this.zIndex},class:[(t={},t[Ue]=this.border,t),Sl({unfit:!this.fit,fixed:this.fixed})]},[this.slots()])}},render:function(){var t=arguments[0];return this.placeholder&&this.fixed?t("div",{class:Sl("placeholder"),style:{height:this.height+"px"}},[this.genTabbar()]):this.genTabbar()}});var kl=p("tabbar-item"),Tv=kl[0],pr=kl[1];const _v=Tv({mixins:[X("vanTabbar")],props:m({},Mt,{dot:Boolean,icon:String,name:[Number,String],info:[Number,String],badge:[Number,String],iconPrefix:String}),data:function(){return{nameMatched:!1}},computed:{active:function(){var t=this.parent.route;if(t&&"$route"in this){var i=this.to,n=this.$route,r=ct(i)?i:{path:i};return!!n.matched.find(function(a){var s=a.path===""?"/":a.path,o=r.path===s,l=_(r.name)&&r.name===a.name;return o||l})}return this.nameMatched}},methods:{onClick:function(t){var i=this;this.active||this.parent.triggerChange(this.name||this.index,function(){Yt(i.$router,i)}),this.$emit("click",t)},genIcon:function(){var t=this.$createElement,i=this.slots("icon",{active:this.active});if(i)return i;if(this.icon)return t(w,{attrs:{name:this.icon,classPrefix:this.iconPrefix}})}},render:function(){var t,i=arguments[0],n=this.active,r=this.parent[n?"activeColor":"inactiveColor"];return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] TabbarItem: "info" prop is deprecated, use "badge" prop instead.'),i("div",{class:pr({active:n}),style:{color:r},on:{click:this.onClick}},[i("div",{class:pr("icon")},[this.genIcon(),i(Kt,{attrs:{dot:this.dot,info:(t=this.badge)!=null?t:this.info}})]),i("div",{class:pr("text")},[this.slots("default",{active:n})])])}});var Cl=p("tree-select"),Iv=Cl[0],de=Cl[1];function $l(e,t,i,n){var r=t.items,a=t.height,s=t.activeId,o=t.selectedIcon,l=t.mainActiveIndex;process.env.NODE_ENV==="development"&&(n.listeners.navclick&&console.warn('[Vant] TreeSelect: "navclick" event is deprecated, use "click-nav" instead.'),n.listeners.itemclick&&console.warn('[Vant] TreeSelect: "itemclick" event is deprecated, use "click-item" instead.'));var c=r[+l]||{},u=c.children||[],h=Array.isArray(s);function d(g){return h?s.indexOf(g)!==-1:s===g}var f=r.map(function(g){var y;return e(Io,{attrs:{dot:g.dot,info:(y=g.badge)!=null?y:g.info,title:g.text,disabled:g.disabled},class:[de("nav-item"),g.className]})});function v(){return i.content?i.content():u.map(function(g){return e("div",{key:g.id,class:["van-ellipsis",de("item",{active:d(g.id),disabled:g.disabled})],on:{click:function(){if(!g.disabled){var b=g.id;if(h){b=s.slice();var S=b.indexOf(g.id);S!==-1?b.splice(S,1):b.length<t.max&&b.push(g.id)}I(n,"update:active-id",b),I(n,"click-item",g),I(n,"itemclick",g)}}}},[g.text,d(g.id)&&e(w,{attrs:{name:o},class:de("selected")})])})}return e("div",T([{class:de(),style:{height:P(a)}},B(n)]),[e(To,{class:de("nav"),attrs:{activeKey:l},on:{change:function(y){I(n,"update:main-active-index",y),I(n,"click-nav",y),I(n,"navclick",y)}}},[f]),e("div",{class:de("content")},[v()])])}$l.props={max:{type:[Number,String],default:1/0},items:{type:Array,default:function(){return[]}},height:{type:[Number,String],default:300},activeId:{type:[Number,String,Array],default:0},selectedIcon:{type:String,default:"success"},mainActiveIndex:{type:[Number,String],default:0}};const Ov=Iv($l);function Pv(e){var t=[zc,$u,Du,sa,Mu,F,Gu,Qu,fh,q,es,ns,bh,$h,Th,Oh,Eh,Nh,Lh,Vh,Uh,En,Zh,td,_s,D,Ps,ud,dd,md,rt,bd,Sa,en,kd,wd,Td,w,oe,Hn,Ld,Vd,Kt,Hd,ht,Ai,Wd,qd,ot,tf,Dr,nf,af,of,Ji,ip,St,rp,lp,un,cn,hp,pp,gp,kp,To,Io,_p,bt,hv,fv,qo,vv,Ya,yv,zs,Sv,Hs,Je,$v,ii,xv,_v,Sn,ti,M,Ov,el];t.forEach(function(i){i.install?e.use(i):i.name&&e.component(i.name,i)})}typeof window<"u"&&window.Vue&&Pv(window.Vue);/**
|
|
7
7
|
* vue-class-component v7.2.6
|
|
8
8
|
* (c) 2015-present Evan You
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/function Ii(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ii=function(t){return typeof t}:Ii=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ii(e)}function Ov(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Pv(e){return Bv(e)||Ev(e)||Dv()}function Bv(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}function Ev(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Dv(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Nv(){return typeof Reflect<"u"&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function Mv(e,t){vr(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(i){vr(e.prototype,t.prototype,i)}),Object.getOwnPropertyNames(t).forEach(function(i){vr(e,t,i)})}function vr(e,t,i){var n=i?Reflect.getOwnMetadataKeys(t,i):Reflect.getOwnMetadataKeys(t);n.forEach(function(r){var a=i?Reflect.getOwnMetadata(r,t,i):Reflect.getOwnMetadata(r,t);i?Reflect.defineMetadata(r,a,e,i):Reflect.defineMetadata(r,a,e)})}var Lv={__proto__:[]},Av=Lv instanceof Array;function Oi(e){return function(t,i,n){var r=typeof t=="function"?t:t.constructor;r.__decorators__||(r.__decorators__=[]),typeof n!="number"&&(n=void 0),r.__decorators__.push(function(a){return e(a,i,n)})}}function Rv(e){var t=Ii(e);return e==null||t!=="object"&&t!=="function"}function wl(e){typeof console<"u"&&console.warn("[vue-class-component] "+e)}function Vv(e,t){var i=t.prototype._init;t.prototype._init=function(){var a=this,s=Object.getOwnPropertyNames(e);if(e.$options.props)for(var o in e.$options.props)e.hasOwnProperty(o)||s.push(o);s.forEach(function(l){Object.defineProperty(a,l,{get:function(){return e[l]},set:function(u){e[l]=u},configurable:!0})})};var n=new t;t.prototype._init=i;var r={};return Object.keys(n).forEach(function(a){n[a]!==void 0&&(r[a]=n[a])}),process.env.NODE_ENV!=="production"&&!(t.prototype instanceof $)&&Object.keys(r).length>0&&wl("Component class must inherit Vue or its descendant class when class property is used."),r}var mr=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function xl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var i=e.prototype;Object.getOwnPropertyNames(i).forEach(function(o){if(o!=="constructor"){if(mr.indexOf(o)>-1){t[o]=i[o];return}var l=Object.getOwnPropertyDescriptor(i,o);l.value!==void 0?typeof l.value=="function"?(t.methods||(t.methods={}))[o]=l.value:(t.mixins||(t.mixins=[])).push({data:function(){return Ov({},o,l.value)}}):(l.get||l.set)&&((t.computed||(t.computed={}))[o]={get:l.get,set:l.set})}}),(t.mixins||(t.mixins=[])).push({data:function(){return Vv(this,e)}});var n=e.__decorators__;n&&(n.forEach(function(o){return o(t)}),delete e.__decorators__);var r=Object.getPrototypeOf(e.prototype),a=r instanceof $?r.constructor:$,s=a.extend(t);return Hv(s,e,a),Nv()&&Mv(s,e),s}var zv=["cid","super","options","superOptions","extendOptions","sealedOptions","component","directive","filter"],Fv={prototype:!0,arguments:!0,callee:!0,caller:!0};function Hv(e,t,i){Object.getOwnPropertyNames(t).forEach(function(n){if(!Fv[n]){var r=Object.getOwnPropertyDescriptor(e,n);if(!(r&&!r.configurable)){var a=Object.getOwnPropertyDescriptor(t,n);if(!Av){if(n==="cid")return;var s=Object.getOwnPropertyDescriptor(i,n);if(!Rv(a.value)&&s&&s.value===a.value)return}process.env.NODE_ENV!=="production"&&zv.indexOf(n)>=0&&wl("Static property name '".concat(n,"' declared on class '").concat(t.name,"' ")+"conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."),Object.defineProperty(e,n,a)}}})}function Wt(e){return typeof e=="function"?xl(e):function(t){return xl(t,e)}}Wt.registerHooks=function(t){mr.push.apply(mr,Pv(t))},globalThis&&globalThis.__spreadArrays;function gr(e){return Oi(function(t,i){typeof t.inject>"u"&&(t.inject={}),Array.isArray(t.inject)||(t.inject[i]=e||i)})}function jv(e){return typeof e!="function"||!e.managed&&!e.managedReactive}function Wv(e){var t=function(){var i=this,n=typeof e=="function"?e.call(this):e;n=Object.create(n||null),n[Pe]=Object.create(this[Pe]||{});for(var r in t.managed)n[t.managed[r]]=this[r];var a=function(o){n[t.managedReactive[o]]=s[o],Object.defineProperty(n[Pe],t.managedReactive[o],{enumerable:!0,configurable:!0,get:function(){return i[o]}})},s=this;for(var r in t.managedReactive)a(r);return n};return t.managed={},t.managedReactive={},t}var Pe="__reactiveInject__";function Uv(e){Array.isArray(e.inject)||(e.inject=e.inject||{},e.inject[Pe]={from:Pe,default:{}})}var qv=typeof Reflect<"u"&&typeof Reflect.getMetadata<"u";function Kv(e,t,i){if(qv&&!Array.isArray(e)&&typeof e!="function"&&!e.hasOwnProperty("type")&&typeof e.type>"u"){var n=Reflect.getMetadata("design:type",t,i);n!==Object&&(e.type=n)}}function Be(e){return e===void 0&&(e={}),function(t,i){Kv(e,t,i),Oi(function(n,r){(n.props||(n.props={}))[r]=e})(t,i)}}function Yv(e){return Oi(function(t,i){var n=t.provide;Uv(t),jv(n)&&(n=t.provide=Wv(n)),n.managed[i]=e||i})}function Xv(e,t){t===void 0&&(t={});var i=t.deep,n=i===void 0?!1:i,r=t.immediate,a=r===void 0?!1:r;return Oi(function(s,o){typeof s.watch!="object"&&(s.watch=Object.create(null));var l=s.watch;typeof l[e]=="object"&&!Array.isArray(l[e])?l[e]=[l[e]]:typeof l[e]>"u"&&(l[e]=[]),l[e].push({handler:o,deep:n,immediate:a})})}const Ee=(e,t="请求失败")=>(D({title:t,message:e}),{status:!1,message:e}),yr=async(e,t,i="POST")=>new Promise((n,r)=>{const a=localStorage.getItem("AppToken")||"";if(!a)throw new Error("token 不存在");fetch(e,{method:i,headers:{AppToken:a,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(t).toString()}).then(async s=>{if(!s.ok){const o=await s.text();throw new Error(`HTTP ${s.status} ${s.statusText}: ${o}`)}try{return await s.json()}catch{r("解析 JSON 异常")}}).then(s=>{n(s)}).catch(s=>{let o=(s==null?void 0:s.message)||"未知异常";s.message.includes("404")?o="资源未找到":s.message.includes("500")?o="服务器错误":s instanceof TypeError&&s.message==="Failed to fetch"&&(o="网络连接失败"),r(o)})}),Gv=e=>({status:!0,message:"成功",data:e}),Zv=/LT-APP/.test(navigator.userAgent),Tl=(Hl=(Fl=$.prototype)==null?void 0:Fl.$jsBridge)==null?void 0:Hl.inApp,Jv=!!window.ReactNativeWebView,Qv=async e=>{const{id:t,key:i,value:n,prefix:r}=e;let a=location.origin+`/Payment/${r||""}Alipay`;const s=tm();if(a+=`?qrcode=${s}&id=${t}`,!(i&&n))return Ee("支付参数异常",`支付时缺少 key value 参数:${JSON.stringify(e)}`);if(a+=`&${i}=${n}`,!s)return location.href=a,Gv();const{Data:o,Status:l,Message:c}=await yr(a,{},"GET");if(!l)return Ee("支付请求失败",c||"请求支付结果异常");if(!o)return Ee("支付跳转地址不存在");if(Tl){$.prototype.$jsBridge.openLink(o);return}location.href=o};function tm(){return Zv||Tl||Jv}const em=async({channel:e,key:t,value:i,prefix:n})=>{const{type:r,id:a}=e,s=String(Number(i)/100);switch(r){case"alipay":return await Qv({id:a,key:t,value:s,prefix:n});default:L("暂不支持此渠道")}},im="orange",_l={name:"店铺余额",theme:"#4089ff",needId:!1,balance:{disabled:!1,key:"Money",api:"/AgentUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:800},{price:12800},{price:38800},{price:68800},{price:128800},{price:268800}]},channel:{api:"/SystemPayment/GetList"},pay:{key:"Money"}},nm={agent:_l,vip:{needId:!0,balance:{disabled:!0},price:{disabled:!0},channel:{api:"/SystemPayment/GetVipList"},pay:{key:"vipId"}}},rm=async(e,t)=>{const i=await yr(e);return t in i?i[t]:(Ee(JSON.stringify(i)||"解析数据异常",`余额数据中不存在 ${t}`),0)};var am=Object.defineProperty,sm=Object.getOwnPropertyDescriptor,Il=(e,t,i,n)=>{for(var r=n>1?void 0:n?sm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&am(t,i,r),r};let Pi=class extends ${constructor(){super(...arguments);E(this,"load");E(this,"loading",!0);E(this,"message","")}get showLoading(){return this.loading||this.message}async mounted(){await this.retry()}test(){this.loading=!0,setTimeout(()=>{this.loading=!1},100)}async retry(){this.message="",this.loading=!0;const i=await this.load().finally(()=>{this.loading=!1}).catch(n=>{this.message=n});i!=null&&this.$emit("done",i)}};Il([Be()],Pi.prototype,"load",2),Pi=Il([Wt],Pi);var om=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pay-error-container"},[i("div",{staticClass:"loading",style:{display:e.showLoading?"flex":"none"}},[e.message?i("van-tag",{attrs:{type:"danger"},on:{click:e.retry}},[e._v(" "+e._s(e.message)+" 点击重试 ")]):i("van-loading",{staticClass:"loading-icon",attrs:{size:"20",type:"spinner"}})],1),e._t("default")],2)},lm=[];const ng="";function te(e,t,i,n,r,a,s,o){var l=typeof e=="function"?e.options:e;t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a);var c;if(s?(c=function(d){d=d||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!d&&typeof __VUE_SSR_CONTEXT__<"u"&&(d=__VUE_SSR_CONTEXT__),r&&r.call(this,d),d&&d._registeredComponents&&d._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=o?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(f,v){return c.call(v),u(f,v)}}else{var h=l.beforeCreate;l.beforeCreate=h?[].concat(h,c):[c]}return{exports:e,options:l}}const Ol={};var cm=te(Pi,om,lm,!1,um,"0817c014",null,null);function um(e){for(let t in Ol)this[t]=Ol[t]}const br=function(){return cm.exports}();var hm=Object.defineProperty,dm=Object.getOwnPropertyDescriptor,Pl=(e,t,i,n)=>{for(var r=n>1?void 0:n?dm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&hm(t,i,r),r};let Bi=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"value",0)}load(){const{key:i,api:n}=this.config.balance;if(!n||!i)throw new Error("不存在 key 或 api");return rm(n,i)}onBalanceLoad(i){this.value=i/100,this.$emit("change",i)}};Pl([gr()],Bi.prototype,"config",2),Bi=Pl([Wt({components:{PayError:br}})],Bi);var fm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"root wechat-font"},[i("PayError",{attrs:{load:e.load},on:{done:e.onBalanceLoad}},[i("h1",[e._v(" "+e._s(e.value)+" ")])])],1)},pm=[];const rg="",Bl={};var vm=te(Bi,fm,pm,!1,mm,"75290345",null,null);function mm(e){for(let t in Bl)this[t]=Bl[t]}const gm=function(){return vm.exports}(),ym=async e=>(await yr(e)).map(({Id:i,PaymentValue:n,PaymentName:r,PaymentIcon:a})=>{const s=bm(n);return{id:i,name:n,icon:a,type:s}});function bm(e){return e.includes("支付宝")?"alipay":e.includes("微信")?"wechat":"unknow"}var Sm=Object.defineProperty,km=Object.getOwnPropertyDescriptor,El=(e,t,i,n)=>{for(var r=n>1?void 0:n?km(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Sm(t,i,r),r};let Ei=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"channels",[]);E(this,"select",0);E(this,"showPopover",!1)}get actions(){return this.channels.length?this.channels.map(({name:i,id:n,icon:r},a)=>({text:i,id:n,disabled:a==this.select})):[]}onSelect(i,n){this.select=n,this.$emit("change",this.channels[n])}get name(){let i=this.channels[this.select];return i?i.name:""}load(){return ym(this.config.channel.api)}onLoadChannels(i){this.channels=i,this.$emit("change",this.channels[0])}};El([gr()],Ei.prototype,"config",2),Ei=El([Wt({components:{PayError:br}})],Ei);var Cm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("van-popover",{attrs:{trigger:"click",actions:e.actions,placement:"top-end"},on:{select:e.onSelect},scopedSlots:e._u([{key:"reference",fn:function(){return[i("div",{staticClass:"cell"},[i("h5",[e._v("付款方式")]),i("PayError",{staticClass:"name",attrs:{load:e.load},on:{done:e.onLoadChannels}},[i("div",[e._v(" "+e._s(e.name)+" "),i("van-icon",{attrs:{name:"arrow"}})],1)])],1)]},proxy:!0}]),model:{value:e.showPopover,callback:function(n){e.showPopover=n},expression:"showPopover"}})},$m=[];const ag="",Dl={};var wm=te(Ei,Cm,$m,!1,xm,"be539772",null,null);function xm(e){for(let t in Dl)this[t]=Dl[t]}const Tm=function(){return wm.exports}();var _m=Object.defineProperty,Im=Object.getOwnPropertyDescriptor,Nl=(e,t,i,n)=>{for(var r=n>1?void 0:n?Im(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&_m(t,i,r),r};let Di=class extends ${constructor(){super(...arguments);E(this,"customPrice");E(this,"value",null)}onChange(i){this.$emit("input",Number(i))}};Nl([Be({default:null})],Di.prototype,"customPrice",2),Di=Nl([Wt],Di);var Om=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"custom-price"},[i("h5",[e._v("自定义金额")]),i("van-field",{staticClass:"input wechat-font",attrs:{type:"digit",placeholder:"请输入金额",clearable:""},on:{input:e.onChange},model:{value:e.value,callback:function(n){e.value=n},expression:"value"}})],1)},Pm=[];const sg="",Ml={};var Bm=te(Di,Om,Pm,!1,Em,"ea027830",null,null);function Em(e){for(let t in Ml)this[t]=Ml[t]}const Ll=function(){return Bm.exports}();var Dm=Object.defineProperty,Nm=Object.getOwnPropertyDescriptor,Al=(e,t,i,n)=>{for(var r=n>1?void 0:n?Nm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Dm(t,i,r),r};let Ni=class extends ${constructor(){super(...arguments);E(this,"price")}get realPrice(){return this.price.price/100}get onlyPrice(){return!this.price.count}};Al([Be({default:{}})],Ni.prototype,"price",2),Ni=Al([Wt],Ni);var Mm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"price-root wechat-font",class:{"only-price":e.onlyPrice}},[e.price.giftCount?i("span",{staticClass:"gift"},[e._v(" 赠"+e._s(e.price.giftCount)+" ")]):e._e(),e.price.count?i("span",{staticClass:"token-count"},[i("img",{attrs:{src:"https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/npdd/user/my-v3/imgs/niu-coin-top-up-icon.png"}}),e._v(" "+e._s(e.price.count)+" ")]):e._e(),i("span",{staticClass:"price"},[e._v("¥"+e._s(e.realPrice))])])},Lm=[];const og="",Rl={};var Am=te(Ni,Mm,Lm,!1,Rm,"68d98a5c",null,null);function Rm(e){for(let t in Rl)this[t]=Rl[t]}const Vm=function(){return Am.exports}();var zm=Object.defineProperty,Fm=Object.getOwnPropertyDescriptor,Sr=(e,t,i,n)=>{for(var r=n>1?void 0:n?Fm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&zm(t,i,r),r};let De=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"value",0);E(this,"prices",[]);E(this,"customPrice",0);E(this,"loading",!0);E(this,"message","")}async mounted(){}load(){const{load:i,prices:n}=this.config.price;if(i)return i;if(n)return new Promise(r=>r(n))}onLoadPrices(i){this.prices=i,this.changePrice(0)}changePrice(i){this.value=i,this.$emit("change",this.prices[i])}onCustomPriceChange(i){i?this.$emit("change",{price:i*100}):this.$emit("change",this.prices[this.value])}};Sr([gr()],De.prototype,"config",2),Sr([Xv("customPrice")],De.prototype,"onCustomPriceChange",1),De=Sr([Wt({components:{PriceItem:Vm,PayError:br,PriceCustom:Ll}})],De);var Hm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.config.price.disabled?e._e():i("div",{staticClass:"price-container"},[i("h5",[e._v("选择充值金额")]),i("PayError",{attrs:{load:e.load},on:{done:e.onLoadPrices}},[i("div",{staticClass:"content"},e._l(e.prices,function(n,r){return i("price-item",{key:r,staticClass:"price-item",class:{select:r==e.value},style:{backgroundColor:r==e.value?e.config.theme||"orange":""},attrs:{price:n},nativeOn:{click:function(a){return e.changePrice(r)}}})}),1)]),e.config.price.custom?[i("PriceCustom",{model:{value:e.customPrice,callback:function(n){e.customPrice=n},expression:"customPrice"}})]:e._e()],2)},jm=[];const lg="",Vl={};var Wm=te(De,Hm,jm,!1,Um,"76333b1f",null,null);function Um(e){for(let t in Vl)this[t]=Vl[t]}const qm=function(){return Wm.exports}();var Km=Object.defineProperty,Ym=Object.getOwnPropertyDescriptor,kr=(e,t,i,n)=>{for(var r=n>1?void 0:n?Ym(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Km(t,i,r),r};let Ne=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"id");E(this,"baseTheme",im);E(this,"visible",!1);E(this,"balance",0);E(this,"price",{price:0});E(this,"channel",null);E(this,"loading",{balance:!1,price:!1,channel:!1})}async mounted(){this.$nextTick(()=>{this.visible=!0,this.initLoad()})}initLoad(){this.loading.balance=this.config.balance.disabled,this.loading.price=this.config.price.disabled}onClose(){this.$emit("cancel")}async onTopup(){const{key:i,prefix:n}=this.config.pay,r=String(this.id||this.price.price);if(!this.channel){Ee("渠道不存在");return}await em({channel:this.channel,key:i,value:r,prefix:n})}onBanlanceChange(i){this.loading.balance=!0,console.log("余额变动",this.loading)}onChannelChange(i){this.channel=i,this.loading.channel=!0}onPriceChange(i){this.price=i,this.loading.price=!0}get finalPrice(){return this.price.price/100}get disable(){return!Object.values(this.loading).every(i=>i===!0)}get title(){return this.config.name}};kr([Yv("config"),Be({default:_l})],Ne.prototype,"config",2),kr([Be({default:void 0})],Ne.prototype,"id",2),Ne=kr([Wt({components:{Balance:gm,Divider:Ps,PriceContainer:qm,Button:F,PriceCustom:Ll,Channels:Tm}})],Ne);var Xm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("van-popup",{staticClass:"pay-popup",attrs:{position:"bottom",overlay:!0,round:""},on:{closed:e.onClose},model:{value:e.visible,callback:function(n){e.visible=n},expression:"visible"}},[i("h4",{staticClass:"title"},[e._v(" "+e._s(e.title)+" ")]),e.config.balance.disabled?e._e():[i("Balance",{on:{change:e.onBanlanceChange}}),i("Divider")],e.config.price.disabled?e._e():[i("PriceContainer",{on:{change:e.onPriceChange}}),i("Divider")],i("Channels",{on:{change:e.onChannelChange}}),i("Divider"),i("Button",{attrs:{disabled:e.disable,color:e.config.theme||e.baseTheme,block:""},on:{click:e.onTopup}},[e._v(" 立即支付 "+e._s(e.finalPrice)+" 元 ")])],2)},Gm=[];const cg="",zl={};var Zm=te(Ne,Xm,Gm,!1,Jm,"20ed35e0",null,null);function Jm(e){for(let t in zl)this[t]=zl[t]}const Qm=function(){return Zm.exports}(),tg={install(e){const t=(i,...n)=>{const r=nm[i],{needId:a}=r,s=n[0];if(a&&!s){D({title:"参数异常",message:`${i} 类型需要传入订单号 当前未传入!`});return}const o=$.extend(Qm),l=new o({propsData:{config:r,id:s}});l.$on("cancel",()=>{setTimeout(()=>{var c;l.$destroy(),(c=l.$el.parentNode)==null||c.removeChild(l.$el)},300)}),l.$mount(),document.body.appendChild(l.$el)};e.prototype.$pay={create:t}}};J.PayPlugin=tg,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
|
10
|
+
*/function Ii(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ii=function(t){return typeof t}:Ii=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ii(e)}function Bv(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ev(e){return Dv(e)||Nv(e)||Mv()}function Dv(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}function Nv(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Mv(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Lv(){return typeof Reflect<"u"&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function Av(e,t){vr(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(i){vr(e.prototype,t.prototype,i)}),Object.getOwnPropertyNames(t).forEach(function(i){vr(e,t,i)})}function vr(e,t,i){var n=i?Reflect.getOwnMetadataKeys(t,i):Reflect.getOwnMetadataKeys(t);n.forEach(function(r){var a=i?Reflect.getOwnMetadata(r,t,i):Reflect.getOwnMetadata(r,t);i?Reflect.defineMetadata(r,a,e,i):Reflect.defineMetadata(r,a,e)})}var Rv={__proto__:[]},Vv=Rv instanceof Array;function Oi(e){return function(t,i,n){var r=typeof t=="function"?t:t.constructor;r.__decorators__||(r.__decorators__=[]),typeof n!="number"&&(n=void 0),r.__decorators__.push(function(a){return e(a,i,n)})}}function zv(e){var t=Ii(e);return e==null||t!=="object"&&t!=="function"}function wl(e){typeof console<"u"&&console.warn("[vue-class-component] "+e)}function Fv(e,t){var i=t.prototype._init;t.prototype._init=function(){var a=this,s=Object.getOwnPropertyNames(e);if(e.$options.props)for(var o in e.$options.props)e.hasOwnProperty(o)||s.push(o);s.forEach(function(l){Object.defineProperty(a,l,{get:function(){return e[l]},set:function(u){e[l]=u},configurable:!0})})};var n=new t;t.prototype._init=i;var r={};return Object.keys(n).forEach(function(a){n[a]!==void 0&&(r[a]=n[a])}),process.env.NODE_ENV!=="production"&&!(t.prototype instanceof $)&&Object.keys(r).length>0&&wl("Component class must inherit Vue or its descendant class when class property is used."),r}var mr=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function xl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var i=e.prototype;Object.getOwnPropertyNames(i).forEach(function(o){if(o!=="constructor"){if(mr.indexOf(o)>-1){t[o]=i[o];return}var l=Object.getOwnPropertyDescriptor(i,o);l.value!==void 0?typeof l.value=="function"?(t.methods||(t.methods={}))[o]=l.value:(t.mixins||(t.mixins=[])).push({data:function(){return Bv({},o,l.value)}}):(l.get||l.set)&&((t.computed||(t.computed={}))[o]={get:l.get,set:l.set})}}),(t.mixins||(t.mixins=[])).push({data:function(){return Fv(this,e)}});var n=e.__decorators__;n&&(n.forEach(function(o){return o(t)}),delete e.__decorators__);var r=Object.getPrototypeOf(e.prototype),a=r instanceof $?r.constructor:$,s=a.extend(t);return Wv(s,e,a),Lv()&&Av(s,e),s}var Hv=["cid","super","options","superOptions","extendOptions","sealedOptions","component","directive","filter"],jv={prototype:!0,arguments:!0,callee:!0,caller:!0};function Wv(e,t,i){Object.getOwnPropertyNames(t).forEach(function(n){if(!jv[n]){var r=Object.getOwnPropertyDescriptor(e,n);if(!(r&&!r.configurable)){var a=Object.getOwnPropertyDescriptor(t,n);if(!Vv){if(n==="cid")return;var s=Object.getOwnPropertyDescriptor(i,n);if(!zv(a.value)&&s&&s.value===a.value)return}process.env.NODE_ENV!=="production"&&Hv.indexOf(n)>=0&&wl("Static property name '".concat(n,"' declared on class '").concat(t.name,"' ")+"conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."),Object.defineProperty(e,n,a)}}})}function Wt(e){return typeof e=="function"?xl(e):function(t){return xl(t,e)}}Wt.registerHooks=function(t){mr.push.apply(mr,Ev(t))},globalThis&&globalThis.__spreadArrays;function gr(e){return Oi(function(t,i){typeof t.inject>"u"&&(t.inject={}),Array.isArray(t.inject)||(t.inject[i]=e||i)})}function Uv(e){return typeof e!="function"||!e.managed&&!e.managedReactive}function qv(e){var t=function(){var i=this,n=typeof e=="function"?e.call(this):e;n=Object.create(n||null),n[Pe]=Object.create(this[Pe]||{});for(var r in t.managed)n[t.managed[r]]=this[r];var a=function(o){n[t.managedReactive[o]]=s[o],Object.defineProperty(n[Pe],t.managedReactive[o],{enumerable:!0,configurable:!0,get:function(){return i[o]}})},s=this;for(var r in t.managedReactive)a(r);return n};return t.managed={},t.managedReactive={},t}var Pe="__reactiveInject__";function Kv(e){Array.isArray(e.inject)||(e.inject=e.inject||{},e.inject[Pe]={from:Pe,default:{}})}var Yv=typeof Reflect<"u"&&typeof Reflect.getMetadata<"u";function Xv(e,t,i){if(Yv&&!Array.isArray(e)&&typeof e!="function"&&!e.hasOwnProperty("type")&&typeof e.type>"u"){var n=Reflect.getMetadata("design:type",t,i);n!==Object&&(e.type=n)}}function Be(e){return e===void 0&&(e={}),function(t,i){Xv(e,t,i),Oi(function(n,r){(n.props||(n.props={}))[r]=e})(t,i)}}function Gv(e){return Oi(function(t,i){var n=t.provide;Kv(t),Uv(n)&&(n=t.provide=qv(n)),n.managed[i]=e||i})}function Zv(e,t){t===void 0&&(t={});var i=t.deep,n=i===void 0?!1:i,r=t.immediate,a=r===void 0?!1:r;return Oi(function(s,o){typeof s.watch!="object"&&(s.watch=Object.create(null));var l=s.watch;typeof l[e]=="object"&&!Array.isArray(l[e])?l[e]=[l[e]]:typeof l[e]>"u"&&(l[e]=[]),l[e].push({handler:o,deep:n,immediate:a})})}const Ee=(e,t="请求失败")=>(D({title:t,message:e}),{status:!1,message:e}),yr=async(e,t,i="POST")=>new Promise((n,r)=>{const a=localStorage.getItem("AppToken")||"";if(!a)throw new Error("token 不存在");fetch(e,{method:i,headers:{AppToken:a,"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(t).toString()}).then(async s=>{if(!s.ok){const o=await s.text();throw new Error(`HTTP ${s.status} ${s.statusText}: ${o}`)}try{return await s.json()}catch{r("解析 JSON 异常")}}).then(s=>{n(s)}).catch(s=>{let o=(s==null?void 0:s.message)||"未知异常";s.message.includes("404")?o="资源未找到":s.message.includes("500")?o="服务器错误":s instanceof TypeError&&s.message==="Failed to fetch"&&(o="网络连接失败"),r(o)})}),Jv=e=>({status:!0,message:"成功",data:e}),Qv=/LT-APP/.test(navigator.userAgent),Tl=(Wl=(jl=$.prototype)==null?void 0:jl.$jsBridge)==null?void 0:Wl.inApp,tm=!!window.ReactNativeWebView,_l=async e=>{const{id:t,key:i,value:n,prefix:r}=e;let a=location.origin+`/Payment/${r||""}Alipay`;const s=em();if(a+=`?qrcode=${s}&id=${t}`,!(i&&n))return Ee("支付参数异常",`支付时缺少 key value 参数:${JSON.stringify(e)}`);if(a+=`&${i}=${n}`,!s)return location.href=a,Jv();const{Data:o,Status:l,Message:c}=await yr(a,{},"GET");if(!l)return Ee("支付请求失败",c||"请求支付结果异常");if(!o)return Ee("支付跳转地址不存在");if(Tl){$.prototype.$jsBridge.openLink(o);return}location.href=o};function em(){return Qv||Tl||tm}const Il={alipay:_l};function im(e){return e.filter(({type:t})=>{if(t in Il)return!0})}const nm=async({channel:e,key:t,value:i,prefix:n})=>{const{type:r,id:a}=e,s=String(Number(i)/100);switch(r in Il||M("暂不支持此渠道"),r){case"alipay":return await _l({id:a,key:t,value:s,prefix:n});default:M("暂不支持此渠道")}},rm="orange",Ol={needId:!1,name:"店铺余额",theme:"#4089ff",balance:{disabled:!1,key:"Money",api:"/AgentUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:800},{price:12800},{price:38800},{price:68800},{price:128800},{price:268800}]},channel:{api:"/SystemPayment/GetList"},pay:{key:"Money"}},am={agent:Ol,user:{theme:"#ff4f4f",name:"幸运币余额",needId:!1,balance:{disabled:!1,key:"PlaMoney",api:"/PlayerUser/GetMoney"},price:{disabled:!1,custom:!0,prices:[{price:200},{price:500},{price:1e3},{price:5e3},{price:1e4},{price:2e4}]},channel:{api:"/SystemPayment/GetList"},pay:{key:"Money"}}},sm=async(e,t)=>{const i=await yr(e);return t in i?i[t]:(Ee(JSON.stringify(i)||"解析数据异常",`余额数据中不存在 ${t}`),0)};var om=Object.defineProperty,lm=Object.getOwnPropertyDescriptor,Pl=(e,t,i,n)=>{for(var r=n>1?void 0:n?lm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&om(t,i,r),r};let Pi=class extends ${constructor(){super(...arguments);E(this,"load");E(this,"loading",!0);E(this,"message","")}get showLoading(){return this.loading||this.message}async mounted(){await this.retry()}test(){this.loading=!0,setTimeout(()=>{this.loading=!1},100)}async retry(){this.message="",this.loading=!0;const i=await this.load().finally(()=>{this.loading=!1}).catch(n=>{this.message=n});i!=null&&this.$emit("done",i)}};Pl([Be()],Pi.prototype,"load",2),Pi=Pl([Wt],Pi);var cm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pay-error-container"},[i("div",{staticClass:"loading",style:{display:e.showLoading?"flex":"none"}},[e.message?i("van-tag",{attrs:{type:"danger"},on:{click:e.retry}},[e._v(" "+e._s(e.message)+" 点击重试 ")]):i("van-loading",{staticClass:"loading-icon",attrs:{size:"20",type:"spinner"}})],1),e._t("default")],2)},um=[];const sg="";function te(e,t,i,n,r,a,s,o){var l=typeof e=="function"?e.options:e;t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a);var c;if(s?(c=function(d){d=d||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!d&&typeof __VUE_SSR_CONTEXT__<"u"&&(d=__VUE_SSR_CONTEXT__),r&&r.call(this,d),d&&d._registeredComponents&&d._registeredComponents.add(s)},l._ssrRegister=c):r&&(c=o?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(f,v){return c.call(v),u(f,v)}}else{var h=l.beforeCreate;l.beforeCreate=h?[].concat(h,c):[c]}return{exports:e,options:l}}const Bl={};var hm=te(Pi,cm,um,!1,dm,"0817c014",null,null);function dm(e){for(let t in Bl)this[t]=Bl[t]}const br=function(){return hm.exports}();var fm=Object.defineProperty,pm=Object.getOwnPropertyDescriptor,El=(e,t,i,n)=>{for(var r=n>1?void 0:n?pm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&fm(t,i,r),r};let Bi=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"value",0)}load(){const{key:i,api:n}=this.config.balance;if(!n||!i)throw new Error("不存在 key 或 api");return sm(n,i)}onBalanceLoad(i){this.value=i/100,this.$emit("change",i)}};El([gr()],Bi.prototype,"config",2),Bi=El([Wt({components:{PayError:br}})],Bi);var vm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"root wechat-font"},[i("PayError",{attrs:{load:e.load},on:{done:e.onBalanceLoad}},[i("h1",[e._v(" "+e._s(e.value)+" ")])])],1)},mm=[];const og="",Dl={};var gm=te(Bi,vm,mm,!1,ym,"75290345",null,null);function ym(e){for(let t in Dl)this[t]=Dl[t]}const bm=function(){return gm.exports}(),Sm=async e=>(await yr(e)).map(({Id:i,PaymentValue:n,PaymentName:r,PaymentIcon:a})=>{const s=km(n);return{id:i,name:n,icon:a,type:s}});function km(e){return e.includes("支付宝")?"alipay":e.includes("微信")?"wechat":"unknow"}var Cm=Object.defineProperty,$m=Object.getOwnPropertyDescriptor,Nl=(e,t,i,n)=>{for(var r=n>1?void 0:n?$m(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Cm(t,i,r),r};let Ei=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"channels",[]);E(this,"select",0);E(this,"showPopover",!1)}get actions(){return this.channels.length?this.channels.map(({name:i,id:n,icon:r},a)=>({text:i,id:n,disabled:a==this.select})):[]}onSelect(i,n){this.select=n,this.$emit("change",this.channels[n])}get name(){let i=this.channels[this.select];return i?i.name:""}load(){return Sm(this.config.channel.api)}onLoadChannels(i){this.channels=im(i),this.$emit("change",this.channels[0])}};Nl([gr()],Ei.prototype,"config",2),Ei=Nl([Wt({components:{PayError:br}})],Ei);var wm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("van-popover",{attrs:{trigger:"click",actions:e.actions,placement:"top-end"},on:{select:e.onSelect},scopedSlots:e._u([{key:"reference",fn:function(){return[i("div",{staticClass:"cell"},[i("h5",[e._v("付款方式")]),i("PayError",{staticClass:"name",attrs:{load:e.load},on:{done:e.onLoadChannels}},[i("div",[e._v(" "+e._s(e.name)+" "),i("van-icon",{attrs:{name:"arrow"}})],1)])],1)]},proxy:!0}]),model:{value:e.showPopover,callback:function(n){e.showPopover=n},expression:"showPopover"}})},xm=[];const lg="",Ml={};var Tm=te(Ei,wm,xm,!1,_m,"4e4c306e",null,null);function _m(e){for(let t in Ml)this[t]=Ml[t]}const Im=function(){return Tm.exports}();var Om=Object.defineProperty,Pm=Object.getOwnPropertyDescriptor,Ll=(e,t,i,n)=>{for(var r=n>1?void 0:n?Pm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Om(t,i,r),r};let Di=class extends ${constructor(){super(...arguments);E(this,"customPrice");E(this,"value",null)}onChange(i){this.$emit("input",Number(i))}};Ll([Be({default:null})],Di.prototype,"customPrice",2),Di=Ll([Wt],Di);var Bm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"custom-price"},[i("h5",[e._v("自定义金额")]),i("van-field",{staticClass:"input wechat-font",attrs:{type:"digit",placeholder:"请输入金额",clearable:""},on:{input:e.onChange},model:{value:e.value,callback:function(n){e.value=n},expression:"value"}})],1)},Em=[];const cg="",Al={};var Dm=te(Di,Bm,Em,!1,Nm,"ea027830",null,null);function Nm(e){for(let t in Al)this[t]=Al[t]}const Rl=function(){return Dm.exports}();var Mm=Object.defineProperty,Lm=Object.getOwnPropertyDescriptor,Vl=(e,t,i,n)=>{for(var r=n>1?void 0:n?Lm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Mm(t,i,r),r};let Ni=class extends ${constructor(){super(...arguments);E(this,"price")}get realPrice(){return this.price.price/100}get onlyPrice(){return!this.price.count}};Vl([Be({default:{}})],Ni.prototype,"price",2),Ni=Vl([Wt],Ni);var Am=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"price-root wechat-font",class:{"only-price":e.onlyPrice}},[e.price.giftCount?i("span",{staticClass:"gift"},[e._v(" 赠"+e._s(e.price.giftCount)+" ")]):e._e(),e.price.count?i("span",{staticClass:"token-count"},[i("img",{attrs:{src:"https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/npdd/user/my-v3/imgs/niu-coin-top-up-icon.png"}}),e._v(" "+e._s(e.price.count)+" ")]):e._e(),i("span",{staticClass:"price"},[e._v("¥"+e._s(e.realPrice))])])},Rm=[];const ug="",zl={};var Vm=te(Ni,Am,Rm,!1,zm,"68d98a5c",null,null);function zm(e){for(let t in zl)this[t]=zl[t]}const Fm=function(){return Vm.exports}();var Hm=Object.defineProperty,jm=Object.getOwnPropertyDescriptor,Sr=(e,t,i,n)=>{for(var r=n>1?void 0:n?jm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Hm(t,i,r),r};let De=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"value",0);E(this,"prices",[]);E(this,"customPrice",0);E(this,"loading",!0);E(this,"message","")}async mounted(){}load(){const{load:i,prices:n}=this.config.price;if(i)return i;if(n)return new Promise(r=>r(n))}onLoadPrices(i){this.prices=i,this.changePrice(0)}changePrice(i){this.value=i,this.$emit("change",this.prices[i])}onCustomPriceChange(i){i?this.$emit("change",{price:i*100}):this.$emit("change",this.prices[this.value])}};Sr([gr()],De.prototype,"config",2),Sr([Zv("customPrice")],De.prototype,"onCustomPriceChange",1),De=Sr([Wt({components:{PriceItem:Fm,PayError:br,PriceCustom:Rl}})],De);var Wm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.config.price.disabled?e._e():i("div",{staticClass:"price-container"},[i("h5",[e._v("选择充值金额")]),i("PayError",{attrs:{load:e.load},on:{done:e.onLoadPrices}},[i("div",{staticClass:"content"},e._l(e.prices,function(n,r){return i("price-item",{key:r,staticClass:"price-item",class:{select:r==e.value},style:{backgroundColor:r==e.value?e.config.theme||"orange":""},attrs:{price:n},nativeOn:{click:function(a){return e.changePrice(r)}}})}),1)]),e.config.price.custom?[i("PriceCustom",{model:{value:e.customPrice,callback:function(n){e.customPrice=n},expression:"customPrice"}})]:e._e()],2)},Um=[];const hg="",Fl={};var qm=te(De,Wm,Um,!1,Km,"76333b1f",null,null);function Km(e){for(let t in Fl)this[t]=Fl[t]}const Ym=function(){return qm.exports}();var Xm=Object.defineProperty,Gm=Object.getOwnPropertyDescriptor,kr=(e,t,i,n)=>{for(var r=n>1?void 0:n?Gm(t,i):t,a=e.length-1,s;a>=0;a--)(s=e[a])&&(r=(n?s(t,i,r):s(r))||r);return n&&r&&Xm(t,i,r),r};let Ne=class extends ${constructor(){super(...arguments);E(this,"config");E(this,"id");E(this,"baseTheme",rm);E(this,"visible",!1);E(this,"balance",0);E(this,"price",{price:0});E(this,"channel",null);E(this,"loading",{balance:!1,price:!1,channel:!1})}async mounted(){this.$nextTick(()=>{this.visible=!0,this.initLoad()})}initLoad(){this.loading.balance=this.config.balance.disabled,this.loading.price=this.config.price.disabled}onClose(){this.$emit("onClose")}onClosed(){this.$emit("onClosed"),console.log("触发onClosed事件")}async onTopup(){const{key:i,prefix:n}=this.config.pay,r=String(this.id||this.price.price);if(!this.channel){Ee("渠道不存在");return}await nm({channel:this.channel,key:i,value:r,prefix:n})}onBanlanceChange(i){this.loading.balance=!0,console.log("余额变动",this.loading)}onChannelChange(i){this.channel=i,this.loading.channel=!0}onPriceChange(i){this.price=i,this.loading.price=!0}get finalPrice(){return this.price.price/100}get disable(){return!Object.values(this.loading).every(i=>i===!0)}get title(){return this.config.name}};kr([Gv("config"),Be({default:Ol})],Ne.prototype,"config",2),kr([Be({default:void 0})],Ne.prototype,"id",2),Ne=kr([Wt({components:{Balance:bm,Divider:Ps,PriceContainer:Ym,Button:F,PriceCustom:Rl,Channels:Im}})],Ne);var Zm=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("van-popup",{staticClass:"pay-popup",attrs:{position:"bottom",overlay:!0,round:""},on:{closed:e.onClosed,close:e.onClose},model:{value:e.visible,callback:function(n){e.visible=n},expression:"visible"}},[i("h4",{staticClass:"title"},[e._v(" "+e._s(e.title)+" ")]),e.config.balance.disabled?e._e():[i("Balance",{on:{change:e.onBanlanceChange}}),i("Divider")],e.config.price.disabled?e._e():[i("PriceContainer",{on:{change:e.onPriceChange}}),i("Divider")],i("Channels",{on:{change:e.onChannelChange}}),i("Divider"),i("Button",{attrs:{disabled:e.disable,color:e.config.theme||e.baseTheme,block:""},on:{click:e.onTopup}},[e._v(" 立即支付 "+e._s(e.finalPrice)+" 元 ")])],2)},Jm=[];const dg="",Hl={};var Qm=te(Ne,Zm,Jm,!1,tg,"c1cac5f0",null,null);function tg(e){for(let t in Hl)this[t]=Hl[t]}const eg=function(){return Qm.exports}(),ig={install(e){const t=(i,...n)=>new Promise((r,a)=>{const s=am[i],{needId:o}=s,l=n[0];if(o&&!l){D({title:"参数异常",message:`${i} 类型需要传入订单号 当前未传入!`});return}const c=$.extend(eg),u=new c({propsData:{config:s,id:l}});u.$on("onClosed",()=>{console.log("接收onClosed事件 调用 promise rej"),r(),setTimeout(()=>{var h;u.$destroy(),(h=u.$el.parentNode)==null||h.removeChild(u.$el)},300)}),u.$mount(),document.body.appendChild(u.$el)});e.prototype.$pay={create:t}}};J.PayPlugin=ig,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|