index-legacy-77fbc220.js 7.3 KB

1
  1. !function(){function t(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,r,u,o,i=[],l=!0,c=!1;try{if(u=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=u.call(n)).done)&&(i.push(a.value),i.length!==e);l=!0);}catch(s){c=!0,r=s}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return i}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}System.register(["./index-legacy-85bfc26f.js","./index-legacy-ff3ef2bb.js"],(function(e,n){"use strict";var a,r,u,o,i,l,c,s,f,d,m,h,g,v,p,y,D,x,V,w,_,b,S,T,k,A,F,Y,j;return{setters:[function(t){a=t.p,r=t.P},function(t){u=t.a9,o=t.ah,i=t.cG,l=t._,c=t.c,s=t.cH,f=t.d,d=t.r,m=t.e,h=t.w,g=t.cI,v=t.a,p=t.h,y=t.ae,D=t.k,x=t.b,V=t.n,w=t.cJ,_=t.x,b=t.u,S=t.Y,T=t.L,k=t.z,A=t.cK,F=t.p,Y=t.F,j=t.A}],execute:function(){var n=document.createElement("style");n.textContent="._animateWrap_1kuq9_1{width:1.46667rem!important;height:1.46667rem!important}._loading_1kuq9_5{height:1.46667rem!important}._loading_1kuq9_5 img{height:.8rem;width:3.2rem;margin-top:.53333rem}._pullRefresh_1kuq9_13 .van-pull-refresh__track{min-height:inherit}.lottie-animation-container{width:var(--lottie-animation-container-width);height:var(--lottie-animation-container-height);background-color:var(--lottie-animation-container-background-color);overflow:hidden;margin:0 auto}\n",document.head.appendChild(n);var H=u({},a,{modelValue:o(),filter:Function,formatter:{type:Function,default:function(t,e){return e}}}),M=Object.keys(a);var C=function(t,e,n,a,r,u){var o=function(t,e){if(t<0)return[];for(var n=Array(t),a=-1;++a<t;)n[a]=e(a);return n}(e-t+1,(function(e){var r=i(t+e);return a(n,{text:r,value:r})}));return r?r(n,o,u):o},O=(new Date).getFullYear(),q=t(c("date-picker"),1)[0],I=u({},H,{columnsType:{type:Array,default:function(){return["year","month","day"]}},minDate:{type:Date,default:function(){return new Date(O-10,0,1)},validator:s},maxDate:{type:Date,default:function(){return new Date(O+10,11,31)},validator:s}}),B=f({name:q,props:I,emits:["confirm","cancel","change","update:modelValue"],setup:function(t,e){var n=e.emit,a=e.slots,u=d(t.modelValue),o=d(!1),c=function(e){return e===t.minDate.getFullYear()},s=function(e){return e===t.maxDate.getFullYear()},f=function(e){var n=t.minDate,a=t.columnsType.indexOf(e),r=o.value?t.modelValue[a]:u.value[a];if(r)return+r;switch(e){case"year":return n.getFullYear();case"month":return n.getMonth()+1;case"day":return n.getDate()}},D=function(){var e=f("year"),n=f("month"),a=c(e)&&function(e){return e===t.minDate.getMonth()+1}(n)?t.minDate.getDate():1,r=s(e)&&function(e){return e===t.maxDate.getMonth()+1}(n)?t.maxDate.getDate():function(t,e){return 32-new Date(t,e-1,32).getDate()}(e,n);return C(a,r,"day",t.formatter,t.filter)},x=m((function(){return t.columnsType.map((function(e){switch(e){case"year":return u=t.minDate.getFullYear(),o=t.maxDate.getFullYear(),C(u,o,"year",t.formatter,t.filter);case"month":return n=f("year"),a=c(n)?t.minDate.getMonth()+1:1,r=s(n)?t.maxDate.getMonth()+1:12,C(a,r,"month",t.formatter,t.filter);case"day":return D();default:return[]}var n,a,r,u,o}))}));h(u,(function(e){g(e,t.modelValue)||n("update:modelValue",e)})),h((function(){return t.modelValue}),(function(t,e){o.value=g(e,u.value),t=function(t,e){return t.map((function(t,n){var a=e[n];if(a.length){var r=+a[0].value,u=+a[a.length-1].value;return i(l(+t,r,u))}return t}))}(t,x.value),g(t,u.value)||(u.value=t),o.value=!1}),{immediate:!0});var V=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return n.apply(void 0,["change"].concat(e))},w=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return n.apply(void 0,["cancel"].concat(e))},_=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];return n.apply(void 0,["confirm"].concat(e))};return function(){return v(r,p({modelValue:u.value,"onUpdate:modelValue":function(t){return u.value=t},columns:x.value,onChange:V,onCancel:w,onConfirm:_},y(t,M)),a)}}}),R=(e("D",D(B)),t(c("pull-refresh"),3)),U=R[0],E=R[1],P=R[2],z=["pulling","loosing","success"],G={disabled:Boolean,modelValue:Boolean,headHeight:x(50),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:V,successDuration:x(500),animationDuration:x(300)},J=f({name:U,props:G,emits:["change","refresh","update:modelValue"],setup:function(t,e){var n,a=e.emit,r=e.slots,u=d(),o=d(),i=w(u),l=_({status:"normal",distance:0,duration:0}),c=b(),s=function(){if(50!==t.headHeight)return{height:"".concat(t.headHeight,"px")}},f=function(){return"loading"!==l.status&&"success"!==l.status&&!t.disabled},m=function(e,n){var r=+(t.pullDistance||t.headHeight);l.distance=e,l.status=n?"loading":0===e?"normal":e<r?"pulling":"loosing",a("change",{status:l.status,distance:e})},g=function(){var e=l.status;return"normal"===e?"":t["".concat(e,"Text")]||P(e)},p=function(){var t=l.status,e=l.distance;if(r[t])return r[t]({distance:e});var n=[];return z.includes(t)&&n.push(v("div",{class:E("text")},[g()])),"loading"===t&&n.push(v(T,{class:E("loading")},{default:g})),n},y=function(t){(n=0===A(i.value))&&(l.duration=0,c.start(t))},D=function(t){f()&&y(t)},x=function(){n&&c.deltaY.value&&f()&&(l.duration=+t.animationDuration,"loosing"===l.status?(m(+t.headHeight,!0),a("update:modelValue",!0),k((function(){return a("refresh")}))):m(0))};return h((function(){return t.modelValue}),(function(e){l.duration=+t.animationDuration,e?m(+t.headHeight,!0):r.success||t.successText?(l.status="success",setTimeout((function(){m(0)}),+t.successDuration)):m(0,!1)})),S("touchmove",(function(e){if(f()){n||y(e);var a=c.deltaY;c.move(e),n&&a.value>=0&&c.isVertical()&&(F(e),m((r=a.value,u=+(t.pullDistance||t.headHeight),r>u&&(r=r<2*u?u+(r-u)/2:1.5*u+(r-2*u)/4),Math.round(r))))}var r,u}),{target:o}),function(){var t,e={transitionDuration:"".concat(l.duration,"ms"),transform:l.distance?"translate3d(0,".concat(l.distance,"px, 0)"):""};return v("div",{ref:u,class:E()},[v("div",{ref:o,class:E("track"),style:e,onTouchstartPassive:D,onTouchend:x,onTouchcancel:x},[v("div",{class:E("head"),style:s()},[p()]),null==(t=r.default)?void 0:t.call(r)])])}}}),K=D(J),L="_pullRefresh_1kuq9_13";e("M",f({name:"m-full-refresh",props:{title:String,modelValue:{type:Boolean,default:!1}},emits:["refresh","update:modelValue"],setup:function(t,e){var n=e.emit,a=e.slots,r=_({fullState:!1});return h((function(){return t.modelValue}),(function(t){r.fullState=t})),h((function(){return r.fullState}),(function(t){n("update:modelValue",t)})),function(){return v(K,{modelValue:r.fullState,"onUpdate:modelValue":function(t){return r.fullState=t},onRefresh:function(){return n("refresh")},loadingText:" ",class:L},{default:function(){return v(Y,null,[j(" "),a.default&&a.default()])}})}}}))}}}))}();