jingcai-html-dist/public/seller/assets/index.668a3713.js

2 lines
15 KiB
JavaScript

import{i as be,v as Te,a as m,r as p,u as N,P as Se,bk as Ve,w as x,F as X,g as ne,d as We,o as j,T as ie,O as xe,bO as Ue,bI as H,H as E,f as Ke}from"./index.816d8fc2.js";const k=e=>e!=null,Q=e=>typeof e=="function",ae=e=>e!==null&&typeof e=="object",Ze=e=>ae(e)&&Q(e.then)&&Q(e.catch),Wt=e=>Object.prototype.toString.call(e)==="[object Date]"&&!Number.isNaN(e.getTime()),Be=e=>typeof e=="number"||/^\d+(\.\d+)?$/.test(e),qe=()=>Oe?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function Ge(){}const Ce=Object.assign,Oe=typeof window!="undefined";function de(e,t){const n=t.split(".");let a=e;return n.forEach(o=>{var i;a=ae(a)&&(i=a[o])!=null?i:""}),a}function Ut(e,t,n){return t.reduce((a,o)=>((!n||e[o]!==void 0)&&(a[o]=e[o]),a),{})}const Kt=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Zt=null,B=[Number,String],F={type:Boolean,default:!0},qt=e=>({type:e,required:!0}),Gt=()=>({type:Array,default:()=>[]}),Z=e=>({type:B,default:e}),ee=e=>({type:String,default:e});var D=typeof window!="undefined";function ve(e){return D?requestAnimationFrame(e):-1}function Jt(e){D&&cancelAnimationFrame(e)}function I(e){ve(()=>ve(e))}var Je=e=>e===window,he=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),Qe=e=>{const t=X(e);if(Je(t)){const n=t.innerWidth,a=t.innerHeight;return he(n,a)}return t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():he(0,0)};function et(e){const t=be(e,null);if(t){const n=ne(),{link:a,unlink:o,internalChildren:i}=t;a(n),Te(()=>o(n));const d=m(()=>i.indexOf(n));return{parent:t,index:d}}return{parent:null,index:p(-1)}}function tt(e){const t=[],n=a=>{Array.isArray(a)&&a.forEach(o=>{var i;Ue(o)&&(t.push(o),(i=o.component)!=null&&i.subTree&&(t.push(o.component.subTree),n(o.component.subTree.children)),o.children&&n(o.children))})};return n(e),t}var ge=(e,t)=>{const n=e.indexOf(t);return n===-1?e.findIndex(a=>t.key!==void 0&&t.key!==null&&a.type===t.type&&a.key===t.key):n};function nt(e,t,n){const a=tt(e.subTree.children);n.sort((i,d)=>ge(a,i.vnode)-ge(a,d.vnode));const o=n.map(i=>i.proxy);t.sort((i,d)=>{const u=o.indexOf(i),l=o.indexOf(d);return u-l})}function it(e){const t=N([]),n=N([]),a=ne();return{children:t,linkChildren:i=>{We(e,Object.assign({link:l=>{l.proxy&&(n.push(l),t.push(l.proxy),nt(a,t,n))},unlink:l=>{const c=n.indexOf(l);t.splice(c,1),n.splice(c,1)},children:t,internalChildren:n},i))}}}function at(e){let t;j(()=>{e(),ie(()=>{t=!0})}),xe(()=>{t&&e()})}function ot(e,t,n={}){if(!D)return;const{target:a=window,passive:o=!1,capture:i=!1}=n;let d=!1,u;const l=v=>{if(d)return;const f=X(v);f&&!u&&(f.addEventListener(e,t,{capture:i,passive:o}),u=!0)},c=v=>{if(d)return;const f=X(v);f&&u&&(f.removeEventListener(e,t,i),u=!1)};Te(()=>c(a)),Se(()=>c(a)),at(()=>l(a));let s;return Ve(a)&&(s=x(a,(v,f)=>{c(f),l(v)})),()=>{s==null||s(),c(a),d=!0}}var M,q;function ut(){if(!M&&(M=p(0),q=p(0),D)){const e=()=>{M.value=window.innerWidth,q.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:M,height:q}}var rt=/scroll|auto|overlay/i,Ae=D?window:void 0;function st(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function ct(e,t=Ae){let n=e;for(;n&&n!==t&&st(n);){const{overflowY:a}=window.getComputedStyle(n);if(rt.test(a))return n;n=n.parentNode}return t}function Qt(e,t=Ae){const n=p();return j(()=>{e.value&&(n.value=ct(e.value,t))}),n}var L;function lt(){if(!L&&(L=p("visible"),D)){const e=()=>{L.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return L}function ft(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function pe(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function dt(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function en(e){pe(window,e),pe(document.body,e)}function tn(e,t){if(e===window)return 0;const n=t?ft(t):dt();return Qe(e).top+n}qe();const vt=e=>e.stopPropagation();function ht(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&vt(e)}function me(e){const t=X(e);if(!t)return!1;const n=window.getComputedStyle(t),a=n.display==="none",o=t.offsetParent===null&&n.position!=="fixed";return a||o}const{width:De,height:Pe}=ut();function T(e){if(k(e))return Be(e)?`${e}px`:String(e)}function gt(e){if(k(e)){if(Array.isArray(e))return{width:T(e[0]),height:T(e[1])};const t=T(e);return{width:t,height:t}}}function nn(e){const t={};return e!==void 0&&(t.zIndex=+e),t}let G;function pt(){if(!G){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;G=parseFloat(t)}return G}function mt(e){return e=e.replace(/rem/g,""),+e*pt()}function wt(e){return e=e.replace(/vw/g,""),+e*De.value/100}function Et(e){return e=e.replace(/vh/g,""),+e*Pe.value/100}function an(e){if(typeof e=="number")return e;if(Oe){if(e.includes("rem"))return mt(e);if(e.includes("vw"))return wt(e);if(e.includes("vh"))return Et(e)}return parseFloat(e)}const yt=/-(\w)/g,$e=e=>e.replace(yt,(t,n)=>n.toUpperCase()),on=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^-/,"");function un(e,t=2){let n=e+"";for(;n.length<t;)n="0"+n;return n}const J=(e,t,n)=>Math.min(Math.max(e,t),n),{hasOwnProperty:bt}=Object.prototype;function Tt(e,t,n){const a=t[n];!k(a)||(!bt.call(e,n)||!ae(a)?e[n]=a:e[n]=_e(Object(e[n]),a))}function _e(e,t){return Object.keys(t).forEach(n=>{Tt(e,t,n)}),e}var St={name:"\u59D3\u540D",tel:"\u7535\u8BDD",save:"\u4FDD\u5B58",clear:"\u6E05\u7A7A",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",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",areaEmpty:"\u8BF7\u9009\u62E9\u5730\u533A",addressEmpty:"\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",addressDetail:"\u8BE6\u7EC6\u5730\u5740",defaultAddress:"\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"},vanAddressList:{add:"\u65B0\u589E\u5730\u5740"}};const we=p("zh-CN"),Ee=N({"zh-CN":St}),xt={messages(){return Ee[we.value]},use(e,t){we.value=e,this.add({[e]:t})},add(e={}){_e(Ee,e)}};var Bt=xt;function Ct(e){const t=$e(e)+".";return(n,...a)=>{const o=Bt.messages(),i=de(o,t+n)||de(o,n);return Q(i)?i(...a):i}}function te(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((n,a)=>n+te(e,a),""):Object.keys(t).reduce((n,a)=>n+(t[a]?te(e,a):""),""):""}function Ot(e){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${e}__${t}`:e,`${t}${te(t,n)}`)}function V(e){const t=`van-${e}`;return[t,Ot(t),Ct(t)]}const Fe="van-hairline",rn=`${Fe}--top-bottom`,sn=`${Fe}-unset--top-bottom`,cn="van-haptics-feedback",ln=500;function fn(e,{args:t=[],done:n,canceled:a}){if(e){const o=e.apply(null,t);Ze(o)?o.then(i=>{i?n():a&&a()}).catch(Ge):o?n():a&&a()}else n()}function W(e){return e.install=t=>{const{name:n}=e;n&&(t.component(n,e),t.component($e(`-${n}`),e))},e}const At=Symbol();function Dt(e){const t=be(At,null);t&&x(t,n=>{n&&e()})}function Re(e){const t=ne();t&&Ce(t.proxy,e)}const[Pt,ye]=V("badge"),$t={dot:Boolean,max:B,tag:ee("div"),color:String,offset:Array,content:B,showZero:F,position:ee("top-right")};var _t=H({name:Pt,props:$t,setup(e,{slots:t}){const n=()=>{if(t.content)return!0;const{content:u,showZero:l}=e;return k(u)&&u!==""&&(l||u!==0&&u!=="0")},a=()=>{const{dot:u,max:l,content:c}=e;if(!u&&n())return t.content?t.content():k(l)&&Be(c)&&+c>+l?`${l}+`:c},o=u=>u.startsWith("-")?u.replace("-",""):`-${u}`,i=m(()=>{const u={background:e.color};if(e.offset){const[l,c]=e.offset,{position:s}=e,[v,f]=s.split("-");t.default?(typeof c=="number"?u[v]=T(v==="top"?c:-c):u[v]=v==="top"?T(c):o(c),typeof l=="number"?u[f]=T(f==="left"?l:-l):u[f]=f==="left"?T(l):o(l)):(u.marginTop=T(c),u.marginLeft=T(l))}return u}),d=()=>{if(n()||e.dot)return E("div",{class:ye([e.position,{dot:e.dot,fixed:!!t.default}]),style:i.value},[a()])};return()=>{if(t.default){const{tag:u}=e;return E(u,{class:ye("wrapper")},{default:()=>[t.default(),d()]})}return d()}}});const dn=W(_t),[Ft,R]=V("loading"),Rt=Array(12).fill(null).map((e,t)=>E("i",{class:R("line",String(t+1))},null)),Nt=E("svg",{class:R("circular"),viewBox:"25 25 50 50"},[E("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),kt={size:B,type:ee("circular"),color:String,vertical:Boolean,textSize:B,textColor:String};var zt=H({name:Ft,props:kt,setup(e,{slots:t}){const n=m(()=>Ce({color:e.color},gt(e.size))),a=()=>{const i=e.type==="spinner"?Rt:Nt;return E("span",{class:R("spinner",e.type),style:n.value},[t.icon?t.icon():i])},o=()=>{var i;if(t.default)return E("span",{class:R("text"),style:{fontSize:T(e.textSize),color:(i=e.textColor)!=null?i:e.color}},[t.default()])};return()=>{const{type:i,vertical:d}=e;return E("div",{class:R([i,{vertical:d}]),"aria-live":"polite","aria-busy":!0},[a(),o()])}}});const vn=W(zt);function It(e,t){return e>t?"horizontal":t>e?"vertical":""}function Mt(){const e=p(0),t=p(0),n=p(0),a=p(0),o=p(0),i=p(0),d=p(""),u=()=>d.value==="vertical",l=()=>d.value==="horizontal",c=()=>{n.value=0,a.value=0,o.value=0,i.value=0,d.value=""};return{move:f=>{const b=f.touches[0];n.value=(b.clientX<0?0:b.clientX)-e.value,a.value=b.clientY-t.value,o.value=Math.abs(n.value),i.value=Math.abs(a.value);const C=10;(!d.value||o.value<C&&i.value<C)&&(d.value=It(o.value,i.value))},start:f=>{c(),e.value=f.touches[0].clientX,t.value=f.touches[0].clientY},reset:c,startX:e,startY:t,deltaX:n,deltaY:a,offsetX:o,offsetY:i,direction:d,isVertical:u,isHorizontal:l}}const[Ne,Y]=V("swipe"),Lt={loop:F,width:B,height:B,vertical:Boolean,autoplay:Z(0),duration:Z(500),touchable:F,lazyRender:Boolean,initialSwipe:Z(0),indicatorColor:String,showIndicators:F,stopPropagation:F},ke=Symbol(Ne);var Yt=H({name:Ne,props:Lt,emits:["change","dragStart","dragEnd"],setup(e,{emit:t,slots:n}){const a=p(),o=p(),i=N({rect:null,width:0,height:0,offset:0,active:0,swiping:!1});let d=!1;const u=Mt(),{children:l,linkChildren:c}=it(ke),s=m(()=>l.length),v=m(()=>i[e.vertical?"height":"width"]),f=m(()=>e.vertical?u.deltaY.value:u.deltaX.value),b=m(()=>i.rect?(e.vertical?i.rect.height:i.rect.width)-v.value*s.value:0),C=m(()=>v.value?Math.ceil(Math.abs(b.value)/v.value):s.value),U=m(()=>s.value*v.value),O=m(()=>(i.active+s.value)%s.value),oe=m(()=>{const r=e.vertical?"vertical":"horizontal";return u.direction.value===r}),ze=m(()=>{const r={transitionDuration:`${i.swiping?0:e.duration}ms`,transform:`translate${e.vertical?"Y":"X"}(${i.offset}px)`};if(v.value){const g=e.vertical?"height":"width",h=e.vertical?"width":"height";r[g]=`${U.value}px`,r[h]=e[h]?`${e[h]}px`:""}return r}),Ie=r=>{const{active:g}=i;return r?e.loop?J(g+r,-1,s.value):J(g+r,0,C.value):g},ue=(r,g=0)=>{let h=r*v.value;e.loop||(h=Math.min(h,-b.value));let y=g-h;return e.loop||(y=J(y,b.value,0)),y},S=({pace:r=0,offset:g=0,emitChange:h})=>{if(s.value<=1)return;const{active:y}=i,w=Ie(r),_=ue(w,g);if(e.loop){if(l[0]&&_!==b.value){const K=_<b.value;l[0].setOffset(K?U.value:0)}if(l[s.value-1]&&_!==0){const K=_>0;l[s.value-1].setOffset(K?-U.value:0)}}i.active=w,i.offset=_,h&&w!==y&&t("change",O.value)},z=()=>{i.swiping=!0,i.active<=-1?S({pace:s.value}):i.active>=s.value&&S({pace:-s.value})},Me=()=>{z(),u.reset(),I(()=>{i.swiping=!1,S({pace:-1,emitChange:!0})})},re=()=>{z(),u.reset(),I(()=>{i.swiping=!1,S({pace:1,emitChange:!0})})};let se;const P=()=>clearTimeout(se),$=()=>{P(),+e.autoplay>0&&s.value>1&&(se=setTimeout(()=>{re(),$()},+e.autoplay))},A=(r=+e.initialSwipe)=>{if(!a.value)return;const g=()=>{var h,y;if(!me(a)){const w={width:a.value.offsetWidth,height:a.value.offsetHeight};i.rect=w,i.width=+((h=e.width)!=null?h:w.width),i.height=+((y=e.height)!=null?y:w.height)}s.value&&(r=Math.min(s.value-1,r),r===-1&&(r=s.value-1)),i.active=r,i.swiping=!0,i.offset=ue(r),l.forEach(w=>{w.setOffset(0)}),$()};me(a)?ie().then(g):g()},ce=()=>A(i.active);let le;const Le=r=>{!e.touchable||r.touches.length>1||(u.start(r),d=!1,le=Date.now(),P(),z())},Ye=r=>{e.touchable&&i.swiping&&(u.move(r),oe.value&&(!e.loop&&(i.active===0&&f.value>0||i.active===s.value-1&&f.value<0)||(ht(r,e.stopPropagation),S({offset:f.value}),d||(t("dragStart",{index:O.value}),d=!0))))},fe=()=>{if(!e.touchable||!i.swiping)return;const r=Date.now()-le,g=f.value/r;if((Math.abs(g)>.25||Math.abs(f.value)>v.value/2)&&oe.value){const y=e.vertical?u.offsetY.value:u.offsetX.value;let w=0;e.loop?w=y>0?f.value>0?-1:1:0:w=-Math[f.value>0?"ceil":"floor"](f.value/v.value),S({pace:w,emitChange:!0})}else f.value&&S({pace:0});d=!1,i.swiping=!1,t("dragEnd",{index:O.value}),$()},Xe=(r,g={})=>{z(),u.reset(),I(()=>{let h;e.loop&&r===s.value?h=i.active===0?0:r:h=r%s.value,g.immediate?I(()=>{i.swiping=!1}):i.swiping=!1,S({pace:h-i.active,emitChange:!0})})},je=(r,g)=>{const h=g===O.value,y=h?{backgroundColor:e.indicatorColor}:void 0;return E("i",{style:y,class:Y("indicator",{active:h})},null)},He=()=>{if(n.indicator)return n.indicator({active:O.value,total:s.value});if(e.showIndicators&&s.value>1)return E("div",{class:Y("indicators",{vertical:e.vertical})},[Array(s.value).fill("").map(je)])};return Re({prev:Me,next:re,state:i,resize:ce,swipeTo:Xe}),c({size:v,props:e,count:s,activeIndicator:O}),x(()=>e.initialSwipe,r=>A(+r)),x(s,()=>A(i.active)),x(()=>e.autoplay,$),x([De,Pe,()=>e.width,()=>e.height],ce),x(lt(),r=>{r==="visible"?$():P()}),j(A),xe(()=>A(i.active)),Dt(()=>A(i.active)),Se(P),Ke(P),ot("touchmove",Ye,{target:o}),()=>{var r;return E("div",{ref:a,class:Y()},[E("div",{ref:o,style:ze.value,class:Y("track",{vertical:e.vertical}),onTouchstartPassive:Le,onTouchend:fe,onTouchcancel:fe},[(r=n.default)==null?void 0:r.call(n)]),He()])}}});const hn=W(Yt),[Xt,jt]=V("swipe-item");var Ht=H({name:Xt,setup(e,{slots:t}){let n;const a=N({offset:0,inited:!1,mounted:!1}),{parent:o,index:i}=et(ke);if(!o)return;const d=m(()=>{const c={},{vertical:s}=o.props;return o.size.value&&(c[s?"height":"width"]=`${o.size.value}px`),a.offset&&(c.transform=`translate${s?"Y":"X"}(${a.offset}px)`),c}),u=m(()=>{const{loop:c,lazyRender:s}=o.props;if(!s||n)return!0;if(!a.mounted)return!1;const v=o.activeIndicator.value,f=o.count.value-1,b=v===0&&c?f:v-1,C=v===f&&c?0:v+1;return n=i.value===v||i.value===b||i.value===C,n}),l=c=>{a.offset=c};return j(()=>{ie(()=>{a.mounted=!0})}),Re({setOffset:l}),()=>{var c;return E("div",{class:jt(),style:d.value},[u.value?(c=t.default)==null?void 0:c.call(t):null])}}});const gn=W(Ht);export{De as A,dn as B,Pe as C,Ut as D,hn as E,et as F,Jt as G,cn as H,ft as I,pe as J,Qt as K,vn as L,an as M,me as N,it as O,At as P,Dt as Q,rn as R,gn as S,en as T,tn as U,I as V,Kt as W,sn as X,un as Y,Wt as Z,T as a,Mt as b,V as c,ot as d,Ce as e,nn as f,ct as g,k as h,Oe as i,Re as j,on as k,fn as l,ee as m,B as n,at as o,ht as p,qt as q,J as r,ve as s,F as t,Zt as u,Qe as v,W as w,ln as x,Gt as y,Z as z};