index.aa1a3442.js 12 KB

1
  1. import{i as Ee,a as be,b as Be,e as Se,f as x,g as G,h as xe,j as we,r as f,k as Ce,l as L,m as Pe,n as $e,o as Z,p as I,q,d as w,s as O,c,t as W,v as J,w as Q,x as Oe,y as ee,z as De,A as F,B as Ae,T as te,C as ne,D as oe,E as Ie,F as Fe,G as Te,H as ze,I as Re,J as _e}from"./index.be733de2.js";const ae=null,v=[Number,String],S={type:Boolean,default:!0},Lt=e=>({type:e,required:!0}),Nt=e=>({type:Number,default:e}),jt=e=>({type:v,default:e}),B=e=>({type:String,default:e});function ke(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function N(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function se(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function Le(e){N(window,e),N(document.body,e)}function Mt(e,t){if(e===window)return 0;const n=t?ke(t):se();return Be(e).top+n}const Ne=Ee();function Vt(){Ne&&Le(se())}const je=e=>e.stopPropagation();function re(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&je(e)}function Yt(e){const t=Se(e);if(!t)return!1;const n=window.getComputedStyle(t),o=n.display==="none",a=t.offsetParent===null&&n.position!=="fixed";return o||a}const{width:Me,height:Ve}=be();function y(e){if(x(e))return G(e)?`${e}px`:String(e)}function Ye(e){if(x(e)){if(Array.isArray(e))return{width:y(e[0]),height:y(e[1])};const t=y(e);return{width:t,height:t}}}function Ke(e){const t={};return e!==void 0&&(t.zIndex=+e),t}let z;function He(){if(!z){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;z=parseFloat(t)}return z}function Xe(e){return e=e.replace(/rem/g,""),+e*He()}function Ue(e){return e=e.replace(/vw/g,""),+e*Me.value/100}function Ge(e){return e=e.replace(/vh/g,""),+e*Ve.value/100}function Kt(e){if(typeof e=="number")return e;if(xe){if(e.includes("rem"))return Xe(e);if(e.includes("vw"))return Ue(e);if(e.includes("vh"))return Ge(e)}return parseFloat(e)}const Ze=/-(\w)/g,ue=e=>e.replace(Ze,(t,n)=>n.toUpperCase()),qe=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,""),Ht=(e,t,n)=>Math.min(Math.max(e,t),n);function j(e,t,n){const o=e.indexOf(t);return o===-1?e:t==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(n,"")}function Xt(e,t=!0,n=!0){t?e=j(e,".",/\./g):e=e.split(".")[0],n?e=j(e,"-",/-/g):e=e.replace(/-/,"");const o=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}const{hasOwnProperty:We}=Object.prototype;function Je(e,t,n){const o=t[n];!x(o)||(!We.call(e,n)||!we(o)?e[n]=o:e[n]=ce(Object(e[n]),o))}function ce(e,t){return Object.keys(t).forEach(n=>{Je(e,t,n)}),e}var Qe={name:"\u59D3\u540D",tel:"\u7535\u8BDD",save:"\u4FDD\u5B58",confirm:"\u786E\u8BA4",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",loading:"\u52A0\u8F7D\u4E2D...",noCoupon:"\u6682\u65E0\u4F18\u60E0\u5238",nameEmpty:"\u8BF7\u586B\u5199\u59D3\u540D",addContact:"\u6DFB\u52A0\u8054\u7CFB\u4EBA",telInvalid:"\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",vanCalendar:{end:"\u7ED3\u675F",start:"\u5F00\u59CB",title:"\u65E5\u671F\u9009\u62E9",weekdays:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],monthTitle:(e,t)=>`${e}\u5E74${t}\u6708`,rangePrompt:e=>`\u6700\u591A\u9009\u62E9 ${e} \u5929`},vanCascader:{select:"\u8BF7\u9009\u62E9"},vanPagination:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875"},vanPullRefresh:{pulling:"\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",loosing:"\u91CA\u653E\u5373\u53EF\u5237\u65B0..."},vanSubmitBar:{label:"\u5408\u8BA1:"},vanCoupon:{unlimited:"\u65E0\u95E8\u69DB",discount:e=>`${e}\u6298`,condition:e=>`\u6EE1${e}\u5143\u53EF\u7528`},vanCouponCell:{title:"\u4F18\u60E0\u5238",count:e=>`${e}\u5F20\u53EF\u7528`},vanCouponList:{exchange:"\u5151\u6362",close:"\u4E0D\u4F7F\u7528",enable:"\u53EF\u7528",disabled:"\u4E0D\u53EF\u7528",placeholder:"\u8F93\u5165\u4F18\u60E0\u7801"},vanAddressEdit:{area:"\u5730\u533A",postal:"\u90AE\u653F\u7F16\u7801",areaEmpty:"\u8BF7\u9009\u62E9\u5730\u533A",addressEmpty:"\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",postalEmpty:"\u90AE\u653F\u7F16\u7801\u4E0D\u6B63\u786E",addressDetail:"\u8BE6\u7EC6\u5730\u5740",defaultAddress:"\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"},vanAddressList:{add:"\u65B0\u589E\u5730\u5740"}};const M=f("zh-CN"),V=Ce({"zh-CN":Qe}),et={messages(){return V[M.value]},use(e,t){M.value=e,this.add({[e]:t})},add(e={}){ce(V,e)}};var tt=et;function nt(e){const t=ue(e)+".";return(n,...o)=>{const a=tt.messages(),r=L(a,t+n)||L(a,n);return Pe(r)?r(...o):r}}function R(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((n,o)=>n+R(e,o),""):Object.keys(t).reduce((n,o)=>n+(t[o]?R(e,o):""),""):""}function ot(e){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${e}__${t}`:e,`${t}${R(t,n)}`)}function C(e){const t=`van-${e}`;return[t,ot(t),nt(t)]}const _="van-hairline",Ut=`${_}--top`,Gt=`${_}--surround`,Zt=`${_}--top-bottom`,at="van-haptics-feedback",qt=Symbol("van-form");function st(e,{args:t=[],done:n,canceled:o}){if(e){const a=e.apply(null,t);$e(a)?a.then(r=>{r?n():o&&o()}).catch(Z):a?n():o&&o()}else n()}function D(e){return e.install=t=>{const{name:n}=e;t.component(n,e),t.component(ue(`-${n}`),e)},e}function rt(e){const t=q();t&&I(t.proxy,e)}const Wt={to:[String,Object],url:String,replace:Boolean};function ut({to:e,url:t,replace:n,$router:o}){e&&o?o[n?"replace":"push"](e):t&&(n?location.replace(t):location.href=t)}function Jt(){const e=q().proxy;return()=>ut(e)}const[ct,Y]=C("badge"),it={dot:Boolean,max:v,tag:B("div"),color:String,offset:Array,content:v,showZero:S,position:B("top-right")};var lt=w({name:ct,props:it,setup(e,{slots:t}){const n=()=>{if(t.content)return!0;const{content:s,showZero:u}=e;return x(s)&&s!==""&&(u||s!==0)},o=()=>{const{dot:s,max:u,content:i}=e;if(!s&&n())return t.content?t.content():x(u)&&G(i)&&+i>u?`${u}+`:i},a=O(()=>{const s={background:e.color};if(e.offset){const[u,i]=e.offset;t.default?(s.top=y(i),typeof u=="number"?s.right=y(-u):s.right=u.startsWith("-")?u.replace("-",""):`-${u}`):(s.marginTop=y(i),s.marginLeft=y(u))}return s}),r=()=>{if(n()||e.dot)return c("div",{class:Y([e.position,{dot:e.dot,fixed:!!t.default}]),style:a.value},[o()])};return()=>{if(t.default){const{tag:s}=e;return c(s,{class:Y("wrapper")},{default:()=>[t.default(),r()]})}return r()}}});const dt=D(lt),[ie,ft]=C("config-provider"),le=Symbol(ie),vt={tag:B("div"),themeVars:Object,iconPrefix:String};function mt(e){const t={};return Object.keys(e).forEach(n=>{t[`--van-${qe(n)}`]=e[n]}),t}w({name:ie,props:vt,setup(e,{slots:t}){const n=O(()=>{if(e.themeVars)return mt(e.themeVars)});return W(le,e),()=>c(e.tag,{class:ft(),style:n.value},{default:()=>{var o;return[(o=t.default)==null?void 0:o.call(t)]}})}});const[gt,K]=C("icon"),pt=e=>e==null?void 0:e.includes("/"),yt={dot:Boolean,tag:B("i"),name:String,size:v,badge:v,color:String,badgeProps:Object,classPrefix:String};var ht=w({name:gt,props:yt,setup(e,{slots:t}){const n=J(le,null),o=O(()=>e.classPrefix||(n==null?void 0:n.iconPrefix)||K());return()=>{const{tag:a,dot:r,name:s,size:u,badge:i,color:h}=e,E=pt(s);return c(dt,Q({dot:r,tag:a,class:[o.value,E?"":`${o.value}-${s}`],style:{color:h,fontSize:y(u)},content:i},e.badgeProps),{default:()=>{var d;return[(d=t.default)==null?void 0:d.call(t),E&&c("img",{class:K("image"),src:s},null)]}})}}});const Et=D(ht),[bt,$]=C("loading"),Bt=Array(12).fill(null).map((e,t)=>c("i",{class:$("line",String(t+1))},null)),St=c("svg",{class:$("circular"),viewBox:"25 25 50 50"},[c("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),xt={size:v,type:B("circular"),color:String,vertical:Boolean,textSize:v,textColor:String};var wt=w({name:bt,props:xt,setup(e,{slots:t}){const n=O(()=>I({color:e.color},Ye(e.size))),o=()=>{var a;if(t.default)return c("span",{class:$("text"),style:{fontSize:y(e.textSize),color:(a=e.textColor)!=null?a:e.color}},[t.default()])};return()=>{const{type:a,vertical:r}=e;return c("div",{class:$([a,{vertical:r}]),"aria-live":"polite","aria-busy":!0},[c("span",{class:$("spinner",a),style:n.value},[a==="spinner"?Bt:St]),o()])}}});const Qt=D(wt),Ct={show:Boolean,zIndex:v,overlay:S,duration:v,teleport:[String,Object],lockScroll:S,lazyRender:S,beforeClose:Function,overlayStyle:Object,overlayClass:ae,transitionAppear:Boolean,closeOnClickOverlay:S};function Pt(e,t){return e>t?"horizontal":t>e?"vertical":""}function $t(){const e=f(0),t=f(0),n=f(0),o=f(0),a=f(0),r=f(0),s=f(""),u=()=>s.value==="vertical",i=()=>s.value==="horizontal",h=()=>{n.value=0,o.value=0,a.value=0,r.value=0,s.value=""};return{move:m=>{const g=m.touches[0];n.value=(g.clientX<0?0:g.clientX)-e.value,o.value=g.clientY-t.value,a.value=Math.abs(n.value),r.value=Math.abs(o.value);const p=10;(!s.value||a.value<p&&r.value<p)&&(s.value=Pt(a.value,r.value))},start:m=>{h(),e.value=m.touches[0].clientX,t.value=m.touches[0].clientY},reset:h,startX:e,startY:t,deltaX:n,deltaY:o,offsetX:a,offsetY:r,direction:s,isVertical:u,isHorizontal:i}}let P=0;const H="van-overflow-hidden";function Ot(e,t){const n=$t(),o=i=>{n.move(i);const h=n.deltaY.value>0?"10":"01",E=Ae(i.target,e.value),{scrollHeight:d,offsetHeight:m,scrollTop:g}=E;let p="11";g===0?p=m>=d?"00":"01":g+m>=d&&(p="10"),p!=="11"&&n.isVertical()&&!(parseInt(p,2)&parseInt(h,2))&&re(i,!0)},a=()=>{document.addEventListener("touchstart",n.start),document.addEventListener("touchmove",o,{passive:!1}),P||document.body.classList.add(H),P++},r=()=>{P&&(document.removeEventListener("touchstart",n.start),document.removeEventListener("touchmove",o),P--,P||document.body.classList.remove(H))},s=()=>t()&&a(),u=()=>t()&&r();Oe(s),ee(u),De(u),F(t,i=>{i?a():r()})}function de(e){const t=f(!1);return F(e,n=>{n&&(t.value=n)},{immediate:!0}),n=>()=>t.value?n():null}const fe=Symbol();function en(e){const t=J(fe,null);t&&F(t,n=>{n&&e()})}const[Dt,At]=C("overlay"),It={show:Boolean,zIndex:v,duration:v,className:ae,lockScroll:S,lazyRender:S,customStyle:Object};var Ft=w({name:Dt,props:It,setup(e,{slots:t}){const n=de(()=>e.show||!e.lazyRender),o=r=>{re(r,!0)},a=n(()=>{var r;const s=I(Ke(e.zIndex),e.customStyle);return x(e.duration)&&(s.animationDuration=`${e.duration}s`),ne(c("div",{style:s,class:[At(),e.className],onTouchmove:e.lockScroll?o:Z},[(r=t.default)==null?void 0:r.call(t)]),[[oe,e.show]])});return()=>c(te,{name:"van-fade",appear:!0},{default:a})}});const Tt=D(Ft),zt=I({},Ct,{round:Boolean,position:B("center"),closeIcon:B("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:B("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Rt,X]=C("popup");let U=2e3;var _t=w({name:Rt,inheritAttrs:!1,props:zt,emits:["open","close","opened","closed","keydown","update:show","click-overlay","click-close-icon"],setup(e,{emit:t,attrs:n,slots:o}){let a,r;const s=f(),u=f(),i=de(()=>e.show||!e.lazyRender),h=O(()=>{const l={zIndex:s.value};if(x(e.duration)){const b=e.position==="center"?"animationDuration":"transitionDuration";l[b]=`${e.duration}s`}return l}),E=()=>{a||(e.zIndex!==void 0&&(U=+e.zIndex),a=!0,s.value=++U,t("open"))},d=()=>{a&&st(e.beforeClose,{done(){a=!1,t("close"),t("update:show",!1)}})},m=l=>{t("click-overlay",l),e.closeOnClickOverlay&&d()},g=()=>{if(e.overlay)return c(Tt,{show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,onClick:m},{default:o["overlay-content"]})},p=l=>{t("click-close-icon",l),d()},ve=()=>{if(e.closeable)return c(Et,{role:"button",tabindex:0,name:e.closeIcon,class:[X("close-icon",e.closeIconPosition),at],classPrefix:e.iconPrefix,onClick:p},null)},me=()=>t("opened"),ge=()=>t("closed"),pe=l=>t("keydown",l),ye=i(()=>{var l;const{round:b,position:A,safeAreaInsetTop:T,safeAreaInsetBottom:he}=e;return ne(c("div",Q({ref:u,style:h.value,class:[X({round:b,[A]:A}),{"van-safe-area-top":T,"van-safe-area-bottom":he}],onKeydown:pe},n),[(l=o.default)==null?void 0:l.call(o),ve()]),[[oe,e.show]])}),k=()=>{const{position:l,transition:b,transitionAppear:A}=e,T=l==="center"?"van-fade":`van-popup-slide-${l}`;return c(te,{name:b||T,appear:A,onAfterEnter:me,onAfterLeave:ge},{default:ye})};return F(()=>e.show,l=>{l&&!a&&(E(),n.tabindex===0&&Ie(()=>{var b;(b=u.value)==null||b.focus()})),!l&&a&&(a=!1,t("close"))}),rt({popupRef:u}),Ot(u,()=>e.show&&e.lockScroll),Fe("popstate",()=>{e.closeOnPopstate&&(d(),r=!1)}),Te(()=>{e.show&&E()}),ze(()=>{r&&(t("update:show",!0),r=!1)}),ee(()=>{e.show&&e.teleport&&(d(),r=!0)}),W(fe,()=>e.show),()=>e.teleport?c(Re,{to:e.teleport},{default:()=>[g(),k()]}):c(_e,null,[g(),k()])}});const tn=D(_t);export{Ht as A,dt as B,Jt as C,Gt as D,Nt as E,Ut as F,_ as G,at as H,Et as I,se as J,qt as K,Qt as L,Xt as M,Vt as N,tn as P,Ke as a,jt as b,C as c,Lt as d,Me as e,rt as f,ke as g,y as h,Yt as i,Zt as j,Le as k,Mt as l,B as m,v as n,en as o,st as p,Wt as q,ut as r,N as s,S as t,Kt as u,ae as v,D as w,$t as x,Ve as y,re as z};