Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sums-components

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sums-components - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

lib/sums-components.umd.min.js

@@ -1,2 +0,2 @@

(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["sums-components"]=e():t["sums-components"]=e()})("undefined"!==typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({"8bbf":function(t,e){t.exports=require("vue")},da72:function(t,e){t.exports=require("chinese-lunar_fix")},dc65:function(t,e){t.exports=require("current-script-polyfill")},e986:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAACB1BMVEVHcEwQruMRr+MAqtQAzP8Qr+IQreIQr+IUresRruEA//8PruIQruIAv/8PreIQruIQr+MQruQQreIPr+QPreIPr+ERseQQr+MRqt0RruIQreEQruMQr+MQruIVquoQruIQr+MAs+YNs+YQr+QQruMQruMPruIRr+IQruIRruEAf/8Pr+IQruEAqv8PreIQruIQruMQr+MQr+MNruQRsOMQr+MQr+IPruMPruILsekQruMPruIAAP8PruQPr+IQruIQseUOruMQruMMsOcQr+MPruMRquUOrOIAougUsdgPrOEQruIRreEQruIQr+IPr+IQruIPr+MQruIRreIQruMPr+IQr+IOsucRruIRr+MRsOIQreQRruMRruIAmcwQr+IQruISsOUPruIQruISsucPruITsOMPruMQruEPr+MQruIOquMQruMQruIQruIas+YQr+EQr+ISruQPruISreIPr+EPr+QSrOEPreAQruIQruIPruIPruMQruIQr+IRr+MQruQNruQTs+MQr+QOreIQruEPr+MAquMPr+QQr+MQruIQreIPruARruEOseMQruIQruMRseUQruIPr+EQruUQruMSsOcQruIPr+MPr+IQr+QQruMQr+IQruIPr+IQr+EPruIMsOEQseIPr+IQr+IRruIQreMPruIQr+IPreESpNsRr+MQruJD99h3AAAArHRSTlMAbmwGBWD9+BlMAef+BJbErJ6fQ+dDS5IPmKyrnO8M0X8KFF38/dZpYTwCpvIGuPC++0ATLeHC6fcXm4QBQkbuTkiUKp3XHkcLDSL9Z+XV6NBTjXryqbI11plqQYhoBXPiHfjNK/k3h1/YyhLa5PsKknw5hVeJVisy9vPHxqHuiS85G3A1bnYJef6qr0KKJLr7O+ZWT6MqT8iWg8Cgv5V/uSo+I1AsUdnxVA5JYy5PGgAAAddJREFUOMtjYGBgEBbgZluDE7BxCwgzgACz0BqCQIgZqFBwDRFAkIFBdA1RQJRBijiF0gwi6EIBDmJiYn7ooiIMGP7lA/mQH8PvDGuIU7iGdgqXc8CABEghLwsUNKErNOWEAROQwtWsUNCK22pJkEIzItxIUKEeEwQYgRSuZISASiwKZzFgggpsJhqyo4AVq4AKi/G5EQq6QSZmEqGwDKjOBItnJokvW7p44SKNXoMqMD9XF6hQHEOhvjoz3AO8RQrJPGvigSyJEHSFpn1A0YlTlmgaQxUnRskBSQX0cDRsYejpnwDidarVl8ONlpNFV1jL0MyDEMnKiIOqdAt2RVVo1KCC4uGEWLip4eLmSArzS1FDxjsQKXJ47SL9oQrzGCRR1Kn6gOQ1POFqtTRj5HlAJiopI6tLUgZJyqyxt7ZEMlgJpLCEuQahLicNKMzlBGJaWDnDFXKBFFZzGXdBldUVKgJFFbWhXB49RxskhWvaGBimzdeeu2Dm5HaQYIo8kkvU1D0gSsHO79BCuCY7PRU1EGSDvGAK16yZMV0XYkNjgQ5mSlIJc+eCFyk6s+fMm2qgjyvVRWAWUtiBL4M0cQpDiS1Io4ksmmWILOxdIBmAUPUhZQtUBACgEA5W+hZaOgAAAABJRU5ErkJggg=="},f230:function(t,e){t.exports=require("html2canvas")},fb15:function(t,e,i){"use strict";var n;(i.r(e),"undefined"!==typeof window)&&(i("dc65"),(n=window.document.currentScript)&&(n=n.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(i.p=n[1]));var s,r,o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("van-popup",{staticClass:"s-calendar-box",attrs:{value:t.value,position:"bottom"},on:{input:function(e){return t.$emit("input",e)}}},[i("div",{staticClass:"s-calendar"},[i("div",{staticClass:"s-calendar-header"},[0===t.type?i("div",{staticClass:"s-calendar-header--date"},[t._v("\n "+t._s(t.currentSolar[0].hans)+"年"+t._s(t.currentSolar[1].hans)+"月"+t._s(t.currentSolar[2].hans)+"日\n ")]):i("div",{staticClass:"s-calendar-header--date"},[t._v("\n "+t._s(t.currentLunar[0].hans)+t._s(t.currentLunar[1]?t.currentLunar[1].hans:"")+"\n "+t._s(t.currentLunar[2]?t.currentLunar[2].hans:"")+"\n ")]),i("div",{staticClass:"s-calendar-header--btn-group"},t._l(t.dateList,function(e,n){return i("div",{key:n,staticClass:"s-calendar-header--btn",class:["s-calendar-header--btn__"+n],style:[n===t.type?{color:"#fff",background:t.color,borderColor:t.color}:{}],on:{click:function(e){return e.stopPropagation(),t.handleCalendarChange(n)}}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),i("div",{staticClass:"s-calendar-content"},[0===t.type?i("picker-view",{staticClass:"s-calendar-content--picker",attrs:{value:t.solarTime,"indicator-class":"s-calendar-indicator","mask-style":"opacity:0.5"},on:{change:t.handleSolarDateChange}},[i("picker-view-column",t._l(t.solarYears,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[0]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"年\n ")])}),0),i("picker-view-column",t._l(t.solarMonths,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[1]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"月\n ")])}),0),i("picker-view-column",t._l(t.solarDates,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[2]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"日\n ")])}),0),t.hasDateTime?[i("picker-view-column",t._l(t.hours,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[3]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0),i("picker-view-column",t._l(t.minutes,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[4]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0)]:t._e()],2):i("picker-view",{staticClass:"s-calendar-content--picker",attrs:{value:t.lunarTime,"indicator-class":"s-calendar-indicator","mask-style":"opacity:0.5"},on:{change:t.handleLunarDateChange}},[i("picker-view-column",t._l(t.lunarYears,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[0]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e.hans)+"\n ")])}),0),i("picker-view-column",t._l(t.lunarMonths,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[1]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e.hans)+"\n ")])}),0),i("picker-view-column",t._l(t.lunarDates,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[2]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e.hans)+"\n ")])}),0),t.hasDateTime?[i("picker-view-column",t._l(t.hours,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[3]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0),i("picker-view-column",t._l(t.minutes,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[4]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0)]:t._e()],2)],1),i("div",{staticClass:"s-calendar-footer"},[i("div",{staticClass:"s-calendar-footer--btn s-calendar-footer--cancel",on:{click:t.handleCancel}},[t._v("\n 取消\n ")]),i("div",{staticClass:"s-calendar-footer--btn",style:{background:t.color,color:"#fff",borderColor:t.color},on:{click:t.handleSubmit}},[t._v("\n 确定\n ")])])])])},a=[],h=i("da72"),l={name:"SResizeSensor",props:{initial:{type:[Boolean,String],default:!1}},data(){return{size:{width:-1,height:-1}}},watch:{size:{deep:!0,handler(t){this.$emit("resize",Object.assign({},t))}}},mounted(){!0===this.initial&&this.$nextTick(this.update),this.$el.offsetParent!==this.$el.parentNode&&(this.$el.parentNode.style.position="relative"),"AnimationEvent"in window||this.reset()},methods:{reset(){const t=this.$el.firstChild,e=this.$el.lastChild;t.scrollLeft=1e5,t.scrollTop=1e5,e.scrollLeft=1e5,e.scrollTop=1e5},update(){this.size.width=this.$el.offsetWidth,this.size.height=this.$el.offsetHeight,this.reset()}},render(t){return t("div",{on:{"~animationstart":this.update},class:"s-resize-sensor"},[t("div",{on:{scroll:this.update}},[t("div")]),t("div",{on:{scroll:this.update}},[t("div")])])}},c=l;function u(t,e,i,n,s,r,o,a){var h,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),o?(h=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):s&&(h=a?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(l.functional){l._injectStyles=h;var c=l.render;l.render=function(t,e){return h.call(e),c(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,h):[h]}return{exports:t,options:l}}var d=u(c,s,r,!1,null,null,null),p=d.exports;p.install=function(t){t.component(p.name,p)};var _,f,m=p,g={name:"SPickerView",components:{ResizeSensor:m},props:{value:{type:Array,default(){return[]},validator(t){return Array.isArray(t)&&t.filter(t=>"number"===typeof t).length===t.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}},data(){return{valueSync:[...this.value],height:34,items:[],changeSource:""}},watch:{value(t){this.valueSync.length=t.length,t.forEach((t,e)=>{t!==this.valueSync[e]&&this.$set(this.valueSync,e,t)})},valueSync:{deep:!0,handler(t){if(""===this.changeSource)this._valueChanged(t);else{this.changeSource="";const e=[...t];this.$emit("update:value",e),this.$emit("change",e)}}}},methods:{getItemIndex(t){return this.items.indexOf(t)},getItemValue(t){return this.valueSync[this.getItemIndex(t.$vnode)]||0},setItemValue(t,e){const i=this.getItemIndex(t.$vnode),n=this.valueSync[i];n!==e&&(this.changeSource="touch",this.$set(this.valueSync,i,e))},_valueChanged(t){this.items.forEach((e,i)=>{e.componentInstance.setCurrent(t[i]||0)})},_resize({height:t}){this.height=t}},render(t){const e=[];return this.$slots.default&&this.$slots.default.forEach(t=>{t.componentOptions&&"picker-view-column"===t.componentOptions.tag&&e.push(t)}),this.items=e,t("div",{on:this.$listeners,class:"s-picker-view"},[t("resize-sensor",{attrs:{initial:!0},on:{resize:this._resize}}),t("div",{ref:"wrapper",class:"s-picker-view-wrapper"},e)])}},y=g,v=u(y,_,f,!1,null,null,null),T=v.exports;T.install=function(t){t.component(T.name,T)};var x=T,S=function(t,e,i){t.addEventListener(e,t=>{"function"===typeof i&&!1===i(t)&&(t.preventDefault(),t.stopPropagation())},{passive:!1})},M={methods:{touchtrack:function(t,e,i){var n=this,s=0,r=0,o=0,a=0,h=function(t,i,h,l){if(!1===n[e]({target:t.target,currentTarget:t.currentTarget,preventDefault:t.preventDefault.bind(t),stopPropagation:t.stopPropagation.bind(t),touches:t.touches,changedTouches:t.changedTouches,detail:{state:i,x0:h,y0:l,dx:h-s,dy:l-r,ddx:h-o,ddy:l-a,timeStamp:t.timeStamp}}))return!1},l=null;S(t,"touchstart",function(t){if(1===t.touches.length&&!l)return l=t,s=o=t.touches[0].pageX,r=a=t.touches[0].pageY,h(t,"start",s,r)}),S(t,"touchmove",function(t){if(1===t.touches.length&&l){var e=h(t,"move",t.touches[0].pageX,t.touches[0].pageY);return o=t.touches[0].pageX,a=t.touches[0].pageY,e}}),S(t,"touchend",function(t){if(0===t.touches.length&&l)return l=null,h(t,"end",t.changedTouches[0].pageX,t.changedTouches[0].pageY)}),S(t,"touchcancel",function(t){if(l){var e=l;return l=null,h(t,i?"cancel":"end",e.touches[0].pageX,e.touches[0].pageY)}})}}};function b(t){this._drag=t,this._dragLog=Math.log(t),this._x=0,this._v=0,this._startTime=0}function w(t,e,i){return t>e-i&&t<e+i}function k(t,e){return w(t,0,e)}function I(t,e,i){this._m=t,this._k=e,this._c=i,this._solution=null,this._endPosition=0,this._startTime=0}function C(t,e,i){this._extent=t,this._friction=e||new b(.01),this._spring=i||new I(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}function E(t,e,i){function n(t,e,i,s){if(!t||!t.cancelled){i(e);var r=e.done();r||t.cancelled||(t.id=requestAnimationFrame(n.bind(null,t,e,i,s))),r&&s&&s(e)}}function s(t){t&&t.id&&cancelAnimationFrame(t.id),t&&(t.cancelled=!0)}var r={id:0,cancelled:!1};return n(r,t,e,i),{cancel:s.bind(null,r),model:t}}function Q(t,e){e=e||{},this._element=t,this._options=e,this._enableSnap=e.enableSnap||!1,this._itemSize=e.itemSize||0,this._enableX=e.enableX||!1,this._enableY=e.enableY||!1,this._shouldDispatchScrollEvent=!!e.onScroll,this._enableX?(this._extent=(e.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=e.scrollWidth):(this._extent=(e.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=e.scrollHeight),this._position=0,this._scroll=new C(this._extent,e.friction,e.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}b.prototype.set=function(t,e){this._x=t,this._v=e,this._startTime=(new Date).getTime()},b.prototype.setVelocityByEnd=function(t){this._v=(t-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)},b.prototype.x=function(t){var e;return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),e=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t),this._dt=t,this._x+this._v*e/this._dragLog-this._v/this._dragLog},b.prototype.dx=function(t){var e;return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),e=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t),this._dt=t,this._v*e},b.prototype.done=function(){return Math.abs(this.dx())<3},b.prototype.reconfigure=function(t){var e=this.x(),i=this.dx();this._drag=t,this._dragLog=Math.log(t),this.set(e,i)},b.prototype.configuration=function(){var t=this;return[{label:"Friction",read:function(){return t._drag},write:function(e){t.reconfigure(e)},min:.001,max:.1,step:.001}]},I.prototype._solve=function(t,e){var i=this._c,n=this._m,s=this._k,r=i*i-4*n*s;if(0===r){let s=-i/(2*n),r=t,o=e/(s*t);return{x:function(t){return(r+o*t)*Math.pow(Math.E,s*t)},dx:function(t){var e=Math.pow(Math.E,s*t);return s*(r+o*t)*e+o*e}}}if(r>0){let s=(-i-Math.sqrt(r))/(2*n),o=(-i+Math.sqrt(r))/(2*n),a=(e-s*t)/(o-s),h=t-a;return{x:function(t){let e,i;return t===this._t&&(e=this._powER1T,i=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,s*t)),i||(i=this._powER2T=Math.pow(Math.E,o*t)),h*e+a*i},dx:function(t){let e,i;return t===this._t&&(e=this._powER1T,i=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,s*t)),i||(i=this._powER2T=Math.pow(Math.E,o*t)),h*s*e+a*o*i}}}var o=Math.sqrt(4*n*s-i*i)/(2*n),a=-i/2*n,h=t,l=(e-a*t)/o;return{x:function(t){return Math.pow(Math.E,a*t)*(h*Math.cos(o*t)+l*Math.sin(o*t))},dx:function(t){var e=Math.pow(Math.E,a*t),i=Math.cos(o*t),n=Math.sin(o*t);return e*(l*o*i-h*o*n)+a*e*(l*n+h*i)}}},I.prototype.x=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(t):0},I.prototype.dx=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(t):0},I.prototype.setEnd=function(t,e,i){if(i||(i=(new Date).getTime()),t!==this._endPosition||!k(e,.4)){e=e||0;var n=this._endPosition;this._solution&&(k(e,.4)&&(e=this._solution.dx((i-this._startTime)/1e3)),n=this._solution.x((i-this._startTime)/1e3),k(e,.4)&&(e=0),k(n,.4)&&(n=0),n+=this._endPosition),this._solution&&k(n-t,.4)&&k(e,.4)||(this._endPosition=t,this._solution=this._solve(n-this._endPosition,e),this._startTime=i)}},I.prototype.snap=function(t){this._startTime=(new Date).getTime(),this._endPosition=t,this._solution={x:function(){return 0},dx:function(){return 0}}},I.prototype.done=function(t){return t||(t=(new Date).getTime()),w(this.x(),this._endPosition,.4)&&k(this.dx(),.4)},I.prototype.reconfigure=function(t,e,i){this._m=t,this._k=e,this._c=i,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},I.prototype.springConstant=function(){return this._k},I.prototype.damping=function(){return this._c},I.prototype.configuration=function(){function t(t,e){t.reconfigure(1,e,t.damping())}function e(t,e){t.reconfigure(1,t.springConstant(),e)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:t.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:e.bind(this,this),min:1,max:500}]},C.prototype.snap=function(t,e){this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(e)},C.prototype.set=function(t,e){this._friction.set(t,e),t>0&&e>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(0)):t<-this._extent&&e<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()},C.prototype.x=function(t){if(!this._startTime)return 0;if(t||(t=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;var e=this._friction.x(t),i=this.dx(t);return(e>0&&i>=0||e<-this._extent&&i<=0)&&(this._springing=!0,this._spring.setEnd(0,i),e<-this._extent?this._springOffset=-this._extent:this._springOffset=0,e=this._spring.x()+this._springOffset),e},C.prototype.dx=function(t){var e=0;return e=this._lastTime===t?this._lastDx:this._springing?this._spring.dx(t):this._friction.dx(t),this._lastTime=t,this._lastDx=e,e},C.prototype.done=function(){return this._springing?this._spring.done():this._friction.done()},C.prototype.setVelocityByEnd=function(t){this._friction.setVelocityByEnd(t)},C.prototype.configuration=function(){var t=this._friction.configuration();return t.push.apply(t,this._spring.configuration()),t},Q.prototype.onTouchStart=function(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()},Q.prototype.onTouchMove=function(t,e){var i=this._startPosition;this._enableX?i+=t:this._enableY&&(i+=e),i>0?i*=.5:i<-this._extent&&(i=.5*(i+this._extent)-this._extent),this._position=i,this.updatePosition(),this.dispatchScroll()},Q.prototype.onTouchEnd=function(t,e,i){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(e)<this._itemSize&&Math.abs(i.y)<300||Math.abs(i.y)<150))return void this.snap();if(this._enableX&&(Math.abs(t)<this._itemSize&&Math.abs(i.x)<300||Math.abs(i.x)<150))return void this.snap()}if(this._enableX?this._scroll.set(this._position,i.x):this._enableY&&this._scroll.set(this._position,i.y),this._enableSnap){var n=this._scroll._friction.x(100),s=n%this._itemSize,r=Math.abs(s)>this._itemSize/2?n-(this._itemSize-Math.abs(s)):n-s;r<=0&&r>=-this._extent&&this._scroll.setVelocityByEnd(r)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=E(this._scroll,()=>{var t=Date.now(),e=(t-this._scroll._startTime)/1e3,i=this._scroll.x(e);this._position=i,this.updatePosition();var n=this._scroll.dx(e);this._shouldDispatchScrollEvent&&t-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/n),this._lastTime=t)},()=>{this._enableSnap&&(r<=0&&r>=-this._extent&&(this._position=r,this.updatePosition()),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1})},Q.prototype.onTransitionEnd=function(){this._element.style.transition="",this._element.style.webkitTransition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._element.removeEventListener("webkitTransitionEnd",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()},Q.prototype.snap=function(){var t=this._itemSize,e=this._position%t,i=Math.abs(e)>this._itemSize/2?this._position-(t-Math.abs(e)):this._position-e;this._position!==i&&(this._snapping=!0,this.scrollTo(-i),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))},Q.prototype.scrollTo=function(t,e){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"===typeof t&&(this._position=-t),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0),this._element.style.transition="transform "+(e||.2)+"s ease-out",this._element.style.webkitTransition="-webkit-transform "+(e||.2)+"s ease-out",this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd),this._element.addEventListener("webkitTransitionEnd",this._onTransitionEnd)},Q.prototype.dispatchScroll=function(){if("function"===typeof this._options.onScroll&&Math.floor(this._lastPos)!==Math.floor(this._position)){this._lastPos=this._position;var t={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(t)}},Q.prototype.update=function(t,e,i){var n=0,s=this._position;this._enableX?(n=this._element.childNodes.length?(e||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=e):(n=this._element.childNodes.length?(e||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=e),"number"===typeof t&&(this._position=-t),this._position<-n?this._position=-n:this._position>0&&(this._position=0),this._itemSize=i||this._itemSize,this.updatePosition(),s!==this._position&&(this.dispatchScroll(),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=n,this._scroll._extent=n},Q.prototype.updatePosition=function(){var t="";this._enableX?t="translateX("+this._position+"px) translateZ(0)":this._enableY&&(t="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=t,this._element.style.transform=t},Q.prototype.isScrolling=function(){return this._scrolling||this._snapping};var D={methods:{initScroller:function(t,e){this._touchInfo={trackingID:-1,maxDy:0,maxDx:0},this._scroller=new Q(t,e),this.__handleTouchStart=this._handleTouchStart.bind(this),this.__handleTouchMove=this._handleTouchMove.bind(this),this.__handleTouchEnd=this._handleTouchEnd.bind(this),this._initedScroller=!0},_findDelta:function(t){var e=this._touchInfo;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:t.screenX-e.x,y:t.screenY-e.y}},_handleTouchStart:function(t){var e=this._touchInfo,i=this._scroller;i&&("start"===t.detail.state?(e.trackingID="touch",e.x=t.detail.x,e.y=t.detail.y):(e.trackingID="mouse",e.x=t.screenX,e.y=t.screenY),e.maxDx=0,e.maxDy=0,e.historyX=[0],e.historyY=[0],e.historyTime=[t.detail.timeStamp],e.listener=i,i.onTouchStart&&i.onTouchStart())},_handleTouchMove:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var i=this._findDelta(t);if(i){for(e.maxDy=Math.max(e.maxDy,Math.abs(i.y)),e.maxDx=Math.max(e.maxDx,Math.abs(i.x)),e.historyX.push(i.x),e.historyY.push(i.y),e.historyTime.push(t.detail.timeStamp);e.historyTime.length>10;)e.historyTime.shift(),e.historyX.shift(),e.historyY.shift();e.listener&&e.listener.onTouchMove&&e.listener.onTouchMove(i.x,i.y,t.detail.timeStamp)}}},_handleTouchEnd:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var i=this._findDelta(t);if(i){var n=e.listener;e.trackingID=-1,e.listener=null;var s=e.historyTime.length,r={x:0,y:0};if(s>2)for(var o=e.historyTime.length-1,a=e.historyTime[o],h=e.historyX[o],l=e.historyY[o];o>0;){o--;var c=e.historyTime[o],u=a-c;if(u>30&&u<50){r.x=(h-e.historyX[o])/(u/1e3),r.y=(l-e.historyY[o])/(u/1e3);break}}e.historyTime=[],e.historyX=[],e.historyY=[],n&&n.onTouchEnd&&n.onTouchEnd(i.x,i.y,r)}}}}};function P(t,e){const i=20,n=navigator.maxTouchPoints;let s=0,r=0;t.addEventListener(n?"touchstart":"mousedown",t=>{const e=n?t.changedTouches[0]:t;s=e.clientX,r=e.clientY}),t.addEventListener(n?"touchend":"mouseup",t=>{const o=n?t.changedTouches[0]:t;Math.abs(o.clientX-s)<i&&Math.abs(o.clientY-r)<i&&e(o)})}var A,$,O={name:"SPickerViewColumn",mixins:[M,D],components:{ResizeSensor:m},data(){return{scope:`picker-view-column-${Date.now()}`,inited:!1,indicatorStyle:"",indicatorClass:"",indicatorHeight:34,maskStyle:"",maskClass:"",current:this.$parent.getItemValue(this),length:0}},computed:{height(){return this.$parent.height},maskSize(){return(this.height-this.indicatorHeight)/2}},watch:{indicatorHeight(t){this._setItemHeight(t),this.inited&&this.update()},current(t){this.$parent.setItemValue(this,t)},length(t){this.inited&&this.update(t)}},created(){const t=this.$parent;this.indicatorStyle=t.indicatorStyle,this.indicatorClass=t.indicatorClass,this.maskStyle=t.maskStyle,this.maskClass=t.maskClass,this.deltaY=0},async mounted(){this.touchtrack(this.$refs.main,"_handleTrack",!0),this.setCurrent(this.current),this.$nextTick(()=>{this.init(),this.update()}),P(this.$el,this._handleTap.bind(this))},methods:{_setItemHeight(t){const e=document.createElement("style");e.innerText=`.s-picker-view-content.${this.scope}>*{height: ${t}px;line-height: ${t}px;overflow: hidden;}`,document.head.appendChild(e)},_handleTrack(t){if(this._scroller)switch(t.detail.state){case"start":this._handleTouchStart(t);break;case"move":this._handleTouchMove(t);break;case"end":case"cancel":this._handleTouchEnd(t)}},_handleTap({clientY:t}){if(!this._scroller.isScrolling()){const e=this.$el.getBoundingClientRect(),i=t-e.top-this.height/2,n=this.indicatorHeight/2;if(!(Math.abs(i)<=n)){const t=Math.ceil((Math.abs(i)-n)/this.indicatorHeight),e=i<0?-t:t;let s=Math.min(this.current+e,this.length-1);this.current=s=Math.max(s,0),this._scroller.scrollTo(s*this.indicatorHeight)}}},_handleWheel(t){const e=this.deltaY+t.deltaY;if(Math.abs(e)>10){this.deltaY=0;let t=Math.min(this.current+(e<0?-1:1),this.length-1);this.current=t=Math.max(t,0),this._scroller.scrollTo(t*this.indicatorHeight)}else this.deltaY=e;t.preventDefault()},setCurrent(t){t!==this.current&&(this.current=t,this.inited&&this.update())},init(){this.initScroller(this.$refs.content,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:this.indicatorHeight,friction:new b(1e-4),spring:new I(2,90,20),onSnap:t=>{isNaN(t)||t===this.current||(this.current=t)}}),this.inited=!0},update(){this.$nextTick(()=>{let t=Math.min(this.current,this.length-1);t=Math.max(t,0),this._scroller.update(t*this.indicatorHeight,void 0,this.indicatorHeight)})},_resize({height:t}){this.indicatorHeight=t}},render(t){return this.length=this.$slots.default&&this.$slots.default.length||0,t("div",{on:{wheel:this._handleWheel},class:"s-picker-view-column"},[t("div",{ref:"main",staticClass:"s-picker-view-group"},[t("div",{ref:"mask",staticClass:"s-picker-view-mask",class:this.maskClass,style:`background-size: 100% ${this.maskSize}px;${this.maskStyle}`}),t("div",{ref:"indicator",staticClass:"s-picker-view-indicator",class:this.indicatorClass,style:this.indicatorStyle},[t("resize-sensor",{attrs:{initial:!0},on:{resize:this._resize}})]),t("div",{ref:"content",staticClass:"s-picker-view-content",class:this.scope,style:`padding: ${this.maskSize}px 0;`},[this.$slots.default])])])}},Y=O,R=u(Y,A,$,!1,null,null,null),L=R.exports;L.install=function(t){t.component(L.name,L)};var z=L;const V=(t,e)=>["未知",...new Array(t).fill().map((t,i)=>`${i}${e}`)];function X(t,e,i){const n=864e5,s=Object(h["lunarToSolar"])(t,e,1,i),r=Object(h["leapMonthOfYear"])(t);r!==e||i?12===e?(t+=1,e=1):(i=!1,e+=1):i=!0;const o=Object(h["lunarToSolar"])(t,e,1,i);return(o.valueOf()-s.valueOf())/n}function H(t){const e="〇一二三四五六七八九";let i="";while(t>0)i=e[t%10]+i,t=Math.floor(t/10);return i}function W(){const t=new Date,e=t.getFullYear(),i=[];for(let n=1930;n<=e;n++)i.push(n);return i}function B(t,e){const i=[0,31,0,31,30,31,30,31,31,30,31,30,31];return 2!==e?i[e]:t%400?t%100?t%4?28:29:28:29}function j(t){const e=Number(Object(h["solarToLunar"])(new Date(t[0],0,1),"y")),i=Number(Object(h["solarToLunar"])(new Date(t[t.length-1],11,31),"y")),n=[];for(let s=e;s<=i;s+=1)n.push({year:s,hans:H(s)});return n}function q(t){const e=Object(h["leapMonthOfYear"])(t);let i=[...Array(12)].map((t,e)=>({month:e+1,leap:!1}));return e&&(i=i.concat({month:e,leap:!0}).sort((t,e)=>t.month-e.month)),i.map(t=>Object.assign({},t,{hans:Object(h["monthName"])(t.month,!0,t.leap)}))}function U(t,e,i){const n=X(t,e,i),s=[];for(let r=1;r<=n;r+=1)s.push({date:r,hans:Object(h["dayName"])(r)});return s}function N(t){return t<10?`0${t}`:`${t}`}const F=V(24,"时"),J=V(60,"分"),K=W(),G=j(K);var Z={name:"SCalendar",components:{PickerView:x,PickerViewColumn:z},props:{defaultDate:{type:Array,required:!1,default:()=>{const t=new Date,e=t.getFullYear(),i=t.getMonth()+1,n=t.getDate();return[e,i,n,1,1]}},defaultTime:{type:Array,required:!1,default:()=>[-1,-1]},isLunar:{type:Boolean,required:!1,dafault:!0},value:{type:Boolean,default:!1},defaultType:{type:Number,default:0},color:{type:String,default:"#522273"},dateType:{type:String,default:"date"}},data(){return{solarValue:[-1,-1,-1],solarYears:K,solarMonths:12,solarDates:31,lunarValue:[-1,-1,-1],lunarYears:G,lunarMonths:[],lunarDates:[],type:0,hours:F,minutes:J,dateList:["公历","农历"],currentTime:[-1,-1]}},computed:{solarTime(){const[t=0,e=0]=this.currentTime;return this.solarValue.concat(t,e)},lunarTime(){const[t=0,e=0]=this.currentTime;return this.lunarValue.concat(t,e)},currentSolar(){const[t,e,i]=this.solarValue,n=this.solarYears[t]||this.solarYears[0],s=e+1,r=i+1;return[{hans:N(n),year:n},{hans:N(s),month:s},{hans:N(r),date:r}]},currentLunar(){const[t,e,i]=this.lunarValue,n=this.lunarYears[t]||this.lunarYears[0],s=this.lunarMonths[e]||this.lunarMonths[0],r=this.lunarDates[i]||this.lunarDates[0];return[n,s,r]},hasDateTime(){return"datetime"===this.dateType}},mounted(){this.currentTime=this.defaultTime,this.initDate()},methods:{cancal(){this.$emit("input",!1)},handleSubmit(){const t={solar:this.currentSolar,lunar:this.currentLunar,type:this.type};if(this.hasDateTime){let[e=0,i=0]=this.currentTime;0===e&&(e=1),0===i&&(i=1),t.time=[e-1,i-1]}this.cancal(),this.$emit("change",t)},handleCancel(){this.cancal(),this.$emit("cancel")},initDate(){const[t,e,i]=this.defaultDate;this.type=this.defaultType;const n=this.solarYears.findIndex(e=>e===t);this.handleSolarDateChange([n,e-1,i-1],!0)},handleCalendarChange(t){this.type=t},handleSolarDateChange(t,e=!1,i=!0){const[n,s,r,o,a]=t,[h,l,c]=this.solarValue;if(e||n!==h||s!==l){const t=this.solarYears[n],e=s+1;this.solarDates=B(t,e)}this.$nextTick().then(()=>{this.solarValue=[n,s,r],this.currentTime=[o,a]}),!i||n===h&&s===l&&r===c||this.$nextTick().then(()=>{const[{year:t},{month:e},{date:i}]=this.currentSolar;this.findLunarValue(t,e,i)})},handleLunarDateChange(t,e=!1,i=!0){const[n,s,r,o,a]=t,[h,l,c]=this.lunarValue;if((e||n!==h)&&(this.lunarMonths=q(this.lunarYears[n].year)),e||n!==h||s!==l){const{year:t}=this.lunarYears[n],{month:e,leap:i}=this.lunarMonths[s];this.lunarDates=U(t,e,i)}this.$nextTick().then(()=>{this.lunarValue=[n,s,r],this.currentTime=[o,a]}),!i||n===h&&s===l&&r===c||this.$nextTick().then(()=>{const[{year:t=1989}={},{month:e=12,leap:i=!1}={},{date:n=5}={}]=this.currentLunar;this.findSolarValue(t,e,n,i)})},findSolarValue(t,e,i,n){const s=Object(h["lunarToSolar"])(t,e,i,n),r=s.getFullYear(),o=s.getMonth(),a=s.getDate()-1,l=this.solarYears.findIndex(t=>t===r);this.handleSolarDateChange([l,o,a,...this.currentTime],!0,!1)},findLunarValue(t,e,i){const{leap:n,year:s,month:r,day:o,leapMonth:a}=Object(h["solarToLunar"])(new Date(t,e-1,i,0,0,0)),l=this.lunarYears.findIndex(({year:t})=>t===s),c=a&&(n||r>a)?r:r-1,u=o-1;this.handleLunarDateChange([l,c,u,...this.currentTime],!0,!1)}}},tt=Z,et=u(tt,o,a,!1,null,null,null),it=et.exports;it.install=function(t){t.component(it.name,it)};var nt=it,st=i("8bbf"),rt=i.n(st),ot=i("f230"),at=i.n(ot),ht={name:"SCanvasImg",render(t){return t("div",{class:"s-canvas-image"},this.$slots.default)},methods:{draw(){const t=this.$el,e=document.createElement("canvas"),i=t.offsetWidth,n=t.offsetHeight,s=2;e.width=i*s,e.height=n*s,e.style.width=`${i}px`,e.style.height=`${n}px`,at()(t,{width:i,height:n,scale:s,useCORS:!0,canvas:e,scrollX:0,scrollY:0,imageTimeout:0}).then(t=>{const e=t.toDataURL("image/jpeg",1);this.$emit("drawed",e)}).catch(t=>{console.error(t),this.$emit("drawed",null)})}}};const lt=rt.a.extend();var ct=function(t,e,i=!1){return new Promise(n=>{const s=new lt({el:document.createElement("div"),render(s){return s(ht,{ref:"canvasImage",class:{"s-canvas-to-imgae--debug":i},staticClass:"s-canvas-to-image",on:{drawed:t=>{n(t),this.$destroy(),document.body.removeChild(this.$el)}}},[s(t,{props:e})])}});document.body.appendChild(s.$el),i||s.$refs.canvasImage.draw()})};ct.install=function(t){t.prototype.$genImage=ct};var ut=ct,dt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("van-popup",{staticClass:"s-pay",attrs:{value:t.value,position:"bottom"},on:{input:function(e){return t.$emit("input",e)}}},[i("div",{staticClass:"s-pay-title"},[t._v("选择支付方式")]),i("van-radio-group",{model:{value:t.payType,callback:function(e){t.payType=e},expression:"payType"}},t._l(t.payList,function(e,n){return i("div",{key:n,staticClass:"s-pay-item",on:{click:function(i){t.payType=e.value}}},[i("div",{staticClass:"s-pay-item-left"},[i("img",{staticClass:"s-pay-item-left-icon",attrs:{src:e.icon}}),i("p",[t._v(t._s(e.name))])]),i("van-radio",{attrs:{"checked-color":"#39AC6E",name:e.value}})],1)}),0),i("div",{staticClass:"s-pay-bootom"},[i("div",{staticClass:"s-pay-money"},[i("span",[t._v("合计: ")]),i("span",{staticClass:"s-pay-money-value"},[t._v("¥"+t._s(t.info.money))])]),i("div",{staticClass:"s-pay-btn",on:{click:t.handlePay}},[t._v("去支付")])])],1)},pt=[],_t={name:"SH5Pay",props:{value:{type:Boolean,default:!1},info:{type:Object,default:()=>({})}},data(){return{payType:1,payList:[{name:"支付宝支付",value:1,icon:i("e986")}]}},methods:{async handlePay(){this.$toast.success("支付成功")}}},ft=_t,mt=u(ft,dt,pt,!1,null,null,null),gt=mt.exports;gt.install=function(t){t.component(gt.name,gt)};var yt=gt;const vt="0.1.2",Tt=[nt,ut,yt,x,z,m],xt=t=>{Tt.forEach(e=>{t.use(e)})};"undefined"!==typeof window&&window.Vue&&xt(window.Vue);var St={install:xt,version:vt,Calendar:nt,CanvasImage:ut,H5Pay:yt,PickerView:x,PickerViewColumn:z,ResizeSensor:m};e["default"]=St}})});
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["sums-components"]=e():t["sums-components"]=e()})("undefined"!==typeof self?self:this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({"8bbf":function(t,e){t.exports=require("vue")},da72:function(t,e){t.exports=require("chinese-lunar_fix")},dc65:function(t,e){t.exports=require("current-script-polyfill")},e986:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAACB1BMVEVHcEwQruMRr+MAqtQAzP8Qr+IQreIQr+IUresRruEA//8PruIQruIAv/8PreIQruIQr+MQruQQreIPr+QPreIPr+ERseQQr+MRqt0RruIQreEQruMQr+MQruIVquoQruIQr+MAs+YNs+YQr+QQruMQruMPruIRr+IQruIRruEAf/8Pr+IQruEAqv8PreIQruIQruMQr+MQr+MNruQRsOMQr+MQr+IPruMPruILsekQruMPruIAAP8PruQPr+IQruIQseUOruMQruMMsOcQr+MPruMRquUOrOIAougUsdgPrOEQruIRreEQruIQr+IPr+IQruIPr+MQruIRreIQruMPr+IQr+IOsucRruIRr+MRsOIQreQRruMRruIAmcwQr+IQruISsOUPruIQruISsucPruITsOMPruMQruEPr+MQruIOquMQruMQruIQruIas+YQr+EQr+ISruQPruISreIPr+EPr+QSrOEPreAQruIQruIPruIPruMQruIQr+IRr+MQruQNruQTs+MQr+QOreIQruEPr+MAquMPr+QQr+MQruIQreIPruARruEOseMQruIQruMRseUQruIPr+EQruUQruMSsOcQruIPr+MPr+IQr+QQruMQr+IQruIPr+IQr+EPruIMsOEQseIPr+IQr+IRruIQreMPruIQr+IPreESpNsRr+MQruJD99h3AAAArHRSTlMAbmwGBWD9+BlMAef+BJbErJ6fQ+dDS5IPmKyrnO8M0X8KFF38/dZpYTwCpvIGuPC++0ATLeHC6fcXm4QBQkbuTkiUKp3XHkcLDSL9Z+XV6NBTjXryqbI11plqQYhoBXPiHfjNK/k3h1/YyhLa5PsKknw5hVeJVisy9vPHxqHuiS85G3A1bnYJef6qr0KKJLr7O+ZWT6MqT8iWg8Cgv5V/uSo+I1AsUdnxVA5JYy5PGgAAAddJREFUOMtjYGBgEBbgZluDE7BxCwgzgACz0BqCQIgZqFBwDRFAkIFBdA1RQJRBijiF0gwi6EIBDmJiYn7ooiIMGP7lA/mQH8PvDGuIU7iGdgqXc8CABEghLwsUNKErNOWEAROQwtWsUNCK22pJkEIzItxIUKEeEwQYgRSuZISASiwKZzFgggpsJhqyo4AVq4AKi/G5EQq6QSZmEqGwDKjOBItnJokvW7p44SKNXoMqMD9XF6hQHEOhvjoz3AO8RQrJPGvigSyJEHSFpn1A0YlTlmgaQxUnRskBSQX0cDRsYejpnwDidarVl8ONlpNFV1jL0MyDEMnKiIOqdAt2RVVo1KCC4uGEWLip4eLmSArzS1FDxjsQKXJ47SL9oQrzGCRR1Kn6gOQ1POFqtTRj5HlAJiopI6tLUgZJyqyxt7ZEMlgJpLCEuQahLicNKMzlBGJaWDnDFXKBFFZzGXdBldUVKgJFFbWhXB49RxskhWvaGBimzdeeu2Dm5HaQYIo8kkvU1D0gSsHO79BCuCY7PRU1EGSDvGAK16yZMV0XYkNjgQ5mSlIJc+eCFyk6s+fMm2qgjyvVRWAWUtiBL4M0cQpDiS1Io4ksmmWILOxdIBmAUPUhZQtUBACgEA5W+hZaOgAAAABJRU5ErkJggg=="},f230:function(t,e){t.exports=require("html2canvas")},fb15:function(t,e,i){"use strict";var n;(i.r(e),"undefined"!==typeof window)&&(i("dc65"),(n=window.document.currentScript)&&(n=n.src.match(/(.+\/)[^\/]+\.js(\?.*)?$/))&&(i.p=n[1]));var s,r,o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("van-popup",{staticClass:"s-calendar-box",attrs:{value:t.value,position:"bottom"},on:{input:function(e){return t.$emit("input",e)}}},[i("div",{staticClass:"s-calendar"},[i("div",{staticClass:"s-calendar-header"},[0===t.type?i("div",{staticClass:"s-calendar-header--date"},[t._v("\n "+t._s(t.currentSolar[0].hans)+"年"+t._s(t.currentSolar[1].hans)+"月"+t._s(t.currentSolar[2].hans)+"日\n ")]):i("div",{staticClass:"s-calendar-header--date"},[t._v("\n "+t._s(t.currentLunar[0].hans)+t._s(t.currentLunar[1]?t.currentLunar[1].hans:"")+"\n "+t._s(t.currentLunar[2]?t.currentLunar[2].hans:"")+"\n ")]),i("div",{staticClass:"s-calendar-header--btn-group"},t._l(t.dateList,function(e,n){return i("div",{key:n,staticClass:"s-calendar-header--btn",class:["s-calendar-header--btn__"+n],style:[n===t.type?{color:"#fff",background:t.color,borderColor:t.color}:{}],on:{click:function(e){return e.stopPropagation(),t.handleCalendarChange(n)}}},[t._v("\n "+t._s(e)+"\n ")])}),0)]),i("div",{staticClass:"s-calendar-content"},[0===t.type?i("picker-view",{staticClass:"s-calendar-content--picker",attrs:{value:t.solarTime,"indicator-class":"s-calendar-indicator","mask-style":"opacity:0.5"},on:{change:t.handleSolarDateChange}},[i("picker-view-column",t._l(t.solarYears,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[0]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"年\n ")])}),0),i("picker-view-column",t._l(t.solarMonths,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[1]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"月\n ")])}),0),i("picker-view-column",t._l(t.solarDates,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[2]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"日\n ")])}),0),t.hasDateTime?[i("picker-view-column",t._l(t.hours,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[3]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0),i("picker-view-column",t._l(t.minutes,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.solarTime[4]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0)]:t._e()],2):i("picker-view",{staticClass:"s-calendar-content--picker",attrs:{value:t.lunarTime,"indicator-class":"s-calendar-indicator","mask-style":"opacity:0.5"},on:{change:t.handleLunarDateChange}},[i("picker-view-column",t._l(t.lunarYears,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[0]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e.hans)+"\n ")])}),0),i("picker-view-column",t._l(t.lunarMonths,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[1]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e.hans)+"\n ")])}),0),i("picker-view-column",t._l(t.lunarDates,function(e,n){return i("div",{key:n,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[2]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e.hans)+"\n ")])}),0),t.hasDateTime?[i("picker-view-column",t._l(t.hours,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[3]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0),i("picker-view-column",t._l(t.minutes,function(e,n){return i("div",{key:e,staticClass:"s-calendar-content--picker-item",style:[n===t.lunarTime[4]?{color:t.color,fontWeight:600}:{}]},[t._v("\n "+t._s(e)+"\n ")])}),0)]:t._e()],2)],1),i("div",{staticClass:"s-calendar-footer"},[i("div",{staticClass:"s-calendar-footer--btn s-calendar-footer--cancel",on:{click:t.handleCancel}},[t._v("\n 取消\n ")]),i("div",{staticClass:"s-calendar-footer--btn",style:{background:t.color,color:"#fff",borderColor:t.color},on:{click:t.handleSubmit}},[t._v("\n 确定\n ")])])])])},a=[],h=i("da72"),l={name:"SResizeSensor",props:{initial:{type:[Boolean,String],default:!1}},data(){return{size:{width:-1,height:-1}}},watch:{size:{deep:!0,handler(t){this.$emit("resize",Object.assign({},t))}}},mounted(){!0===this.initial&&this.$nextTick(this.update),this.$el.offsetParent!==this.$el.parentNode&&(this.$el.parentNode.style.position="relative"),"AnimationEvent"in window||this.reset()},methods:{reset(){const t=this.$el.firstChild,e=this.$el.lastChild;t.scrollLeft=1e5,t.scrollTop=1e5,e.scrollLeft=1e5,e.scrollTop=1e5},update(){this.size.width=this.$el.offsetWidth,this.size.height=this.$el.offsetHeight,this.reset()}},render(t){return t("div",{on:{"~animationstart":this.update},class:"s-resize-sensor"},[t("div",{on:{scroll:this.update}},[t("div")]),t("div",{on:{scroll:this.update}},[t("div")])])}},c=l;function u(t,e,i,n,s,r,o,a){var h,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),o?(h=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):s&&(h=a?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(l.functional){l._injectStyles=h;var c=l.render;l.render=function(t,e){return h.call(e),c(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,h):[h]}return{exports:t,options:l}}var d=u(c,s,r,!1,null,null,null),p=d.exports;p.install=function(t){t.component(p.name,p)};var _,f,m=p,g={name:"SPickerView",components:{ResizeSensor:m},props:{value:{type:Array,default(){return[]},validator(t){return Array.isArray(t)&&t.filter(t=>"number"===typeof t).length===t.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}},data(){return{valueSync:[...this.value],height:34,items:[],changeSource:""}},watch:{value(t){this.valueSync.length=t.length,t.forEach((t,e)=>{t!==this.valueSync[e]&&this.$set(this.valueSync,e,t)})},valueSync:{deep:!0,handler(t){if(""===this.changeSource)this._valueChanged(t);else{this.changeSource="";const e=[...t];this.$emit("update:value",e),this.$emit("change",e)}}}},methods:{getItemIndex(t){return this.items.indexOf(t)},getItemValue(t){return this.valueSync[this.getItemIndex(t.$vnode)]||0},setItemValue(t,e){const i=this.getItemIndex(t.$vnode),n=this.valueSync[i];n!==e&&(this.changeSource="touch",this.$set(this.valueSync,i,e))},_valueChanged(t){this.items.forEach((e,i)=>{e.componentInstance.setCurrent(t[i]||0)})},_resize({height:t}){this.height=t}},render(t){const e=[];return this.$slots.default&&this.$slots.default.forEach(t=>{t.componentOptions&&"picker-view-column"===t.componentOptions.tag&&e.push(t)}),this.items=e,t("div",{on:this.$listeners,class:"s-picker-view"},[t("resize-sensor",{attrs:{initial:!0},on:{resize:this._resize}}),t("div",{ref:"wrapper",class:"s-picker-view-wrapper"},e)])}},y=g,v=u(y,_,f,!1,null,null,null),T=v.exports;T.install=function(t){t.component(T.name,T)};var x=T,S=function(t,e,i){t.addEventListener(e,t=>{"function"===typeof i&&!1===i(t)&&(t.preventDefault(),t.stopPropagation())},{passive:!1})},M={methods:{touchtrack:function(t,e,i){var n=this,s=0,r=0,o=0,a=0,h=function(t,i,h,l){if(!1===n[e]({target:t.target,currentTarget:t.currentTarget,preventDefault:t.preventDefault.bind(t),stopPropagation:t.stopPropagation.bind(t),touches:t.touches,changedTouches:t.changedTouches,detail:{state:i,x0:h,y0:l,dx:h-s,dy:l-r,ddx:h-o,ddy:l-a,timeStamp:t.timeStamp}}))return!1},l=null;S(t,"touchstart",function(t){if(1===t.touches.length&&!l)return l=t,s=o=t.touches[0].pageX,r=a=t.touches[0].pageY,h(t,"start",s,r)}),S(t,"touchmove",function(t){if(1===t.touches.length&&l){var e=h(t,"move",t.touches[0].pageX,t.touches[0].pageY);return o=t.touches[0].pageX,a=t.touches[0].pageY,e}}),S(t,"touchend",function(t){if(0===t.touches.length&&l)return l=null,h(t,"end",t.changedTouches[0].pageX,t.changedTouches[0].pageY)}),S(t,"touchcancel",function(t){if(l){var e=l;return l=null,h(t,i?"cancel":"end",e.touches[0].pageX,e.touches[0].pageY)}})}}};function b(t){this._drag=t,this._dragLog=Math.log(t),this._x=0,this._v=0,this._startTime=0}function w(t,e,i){return t>e-i&&t<e+i}function k(t,e){return w(t,0,e)}function I(t,e,i){this._m=t,this._k=e,this._c=i,this._solution=null,this._endPosition=0,this._startTime=0}function C(t,e,i){this._extent=t,this._friction=e||new b(.01),this._spring=i||new I(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}function E(t,e,i){function n(t,e,i,s){if(!t||!t.cancelled){i(e);var r=e.done();r||t.cancelled||(t.id=requestAnimationFrame(n.bind(null,t,e,i,s))),r&&s&&s(e)}}function s(t){t&&t.id&&cancelAnimationFrame(t.id),t&&(t.cancelled=!0)}var r={id:0,cancelled:!1};return n(r,t,e,i),{cancel:s.bind(null,r),model:t}}function Q(t,e){e=e||{},this._element=t,this._options=e,this._enableSnap=e.enableSnap||!1,this._itemSize=e.itemSize||0,this._enableX=e.enableX||!1,this._enableY=e.enableY||!1,this._shouldDispatchScrollEvent=!!e.onScroll,this._enableX?(this._extent=(e.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=e.scrollWidth):(this._extent=(e.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=e.scrollHeight),this._position=0,this._scroll=new C(this._extent,e.friction,e.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}b.prototype.set=function(t,e){this._x=t,this._v=e,this._startTime=(new Date).getTime()},b.prototype.setVelocityByEnd=function(t){this._v=(t-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)},b.prototype.x=function(t){var e;return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),e=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t),this._dt=t,this._x+this._v*e/this._dragLog-this._v/this._dragLog},b.prototype.dx=function(t){var e;return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),e=t===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,t),this._dt=t,this._v*e},b.prototype.done=function(){return Math.abs(this.dx())<3},b.prototype.reconfigure=function(t){var e=this.x(),i=this.dx();this._drag=t,this._dragLog=Math.log(t),this.set(e,i)},b.prototype.configuration=function(){var t=this;return[{label:"Friction",read:function(){return t._drag},write:function(e){t.reconfigure(e)},min:.001,max:.1,step:.001}]},I.prototype._solve=function(t,e){var i=this._c,n=this._m,s=this._k,r=i*i-4*n*s;if(0===r){let s=-i/(2*n),r=t,o=e/(s*t);return{x:function(t){return(r+o*t)*Math.pow(Math.E,s*t)},dx:function(t){var e=Math.pow(Math.E,s*t);return s*(r+o*t)*e+o*e}}}if(r>0){let s=(-i-Math.sqrt(r))/(2*n),o=(-i+Math.sqrt(r))/(2*n),a=(e-s*t)/(o-s),h=t-a;return{x:function(t){let e,i;return t===this._t&&(e=this._powER1T,i=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,s*t)),i||(i=this._powER2T=Math.pow(Math.E,o*t)),h*e+a*i},dx:function(t){let e,i;return t===this._t&&(e=this._powER1T,i=this._powER2T),this._t=t,e||(e=this._powER1T=Math.pow(Math.E,s*t)),i||(i=this._powER2T=Math.pow(Math.E,o*t)),h*s*e+a*o*i}}}var o=Math.sqrt(4*n*s-i*i)/(2*n),a=-i/2*n,h=t,l=(e-a*t)/o;return{x:function(t){return Math.pow(Math.E,a*t)*(h*Math.cos(o*t)+l*Math.sin(o*t))},dx:function(t){var e=Math.pow(Math.E,a*t),i=Math.cos(o*t),n=Math.sin(o*t);return e*(l*o*i-h*o*n)+a*e*(l*n+h*i)}}},I.prototype.x=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(t):0},I.prototype.dx=function(t){return void 0===t&&(t=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(t):0},I.prototype.setEnd=function(t,e,i){if(i||(i=(new Date).getTime()),t!==this._endPosition||!k(e,.4)){e=e||0;var n=this._endPosition;this._solution&&(k(e,.4)&&(e=this._solution.dx((i-this._startTime)/1e3)),n=this._solution.x((i-this._startTime)/1e3),k(e,.4)&&(e=0),k(n,.4)&&(n=0),n+=this._endPosition),this._solution&&k(n-t,.4)&&k(e,.4)||(this._endPosition=t,this._solution=this._solve(n-this._endPosition,e),this._startTime=i)}},I.prototype.snap=function(t){this._startTime=(new Date).getTime(),this._endPosition=t,this._solution={x:function(){return 0},dx:function(){return 0}}},I.prototype.done=function(t){return t||(t=(new Date).getTime()),w(this.x(),this._endPosition,.4)&&k(this.dx(),.4)},I.prototype.reconfigure=function(t,e,i){this._m=t,this._k=e,this._c=i,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())},I.prototype.springConstant=function(){return this._k},I.prototype.damping=function(){return this._c},I.prototype.configuration=function(){function t(t,e){t.reconfigure(1,e,t.damping())}function e(t,e){t.reconfigure(1,t.springConstant(),e)}return[{label:"Spring Constant",read:this.springConstant.bind(this),write:t.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:e.bind(this,this),min:1,max:500}]},C.prototype.snap=function(t,e){this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(e)},C.prototype.set=function(t,e){this._friction.set(t,e),t>0&&e>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(0)):t<-this._extent&&e<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(t),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()},C.prototype.x=function(t){if(!this._startTime)return 0;if(t||(t=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;var e=this._friction.x(t),i=this.dx(t);return(e>0&&i>=0||e<-this._extent&&i<=0)&&(this._springing=!0,this._spring.setEnd(0,i),e<-this._extent?this._springOffset=-this._extent:this._springOffset=0,e=this._spring.x()+this._springOffset),e},C.prototype.dx=function(t){var e=0;return e=this._lastTime===t?this._lastDx:this._springing?this._spring.dx(t):this._friction.dx(t),this._lastTime=t,this._lastDx=e,e},C.prototype.done=function(){return this._springing?this._spring.done():this._friction.done()},C.prototype.setVelocityByEnd=function(t){this._friction.setVelocityByEnd(t)},C.prototype.configuration=function(){var t=this._friction.configuration();return t.push.apply(t,this._spring.configuration()),t},Q.prototype.onTouchStart=function(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()},Q.prototype.onTouchMove=function(t,e){var i=this._startPosition;this._enableX?i+=t:this._enableY&&(i+=e),i>0?i*=.5:i<-this._extent&&(i=.5*(i+this._extent)-this._extent),this._position=i,this.updatePosition(),this.dispatchScroll()},Q.prototype.onTouchEnd=function(t,e,i){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(e)<this._itemSize&&Math.abs(i.y)<300||Math.abs(i.y)<150))return void this.snap();if(this._enableX&&(Math.abs(t)<this._itemSize&&Math.abs(i.x)<300||Math.abs(i.x)<150))return void this.snap()}if(this._enableX?this._scroll.set(this._position,i.x):this._enableY&&this._scroll.set(this._position,i.y),this._enableSnap){var n=this._scroll._friction.x(100),s=n%this._itemSize,r=Math.abs(s)>this._itemSize/2?n-(this._itemSize-Math.abs(s)):n-s;r<=0&&r>=-this._extent&&this._scroll.setVelocityByEnd(r)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=E(this._scroll,()=>{var t=Date.now(),e=(t-this._scroll._startTime)/1e3,i=this._scroll.x(e);this._position=i,this.updatePosition();var n=this._scroll.dx(e);this._shouldDispatchScrollEvent&&t-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/n),this._lastTime=t)},()=>{this._enableSnap&&(r<=0&&r>=-this._extent&&(this._position=r,this.updatePosition()),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1})},Q.prototype.onTransitionEnd=function(){this._element.style.transition="",this._element.style.webkitTransition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._element.removeEventListener("webkitTransitionEnd",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()},Q.prototype.snap=function(){var t=this._itemSize,e=this._position%t,i=Math.abs(e)>this._itemSize/2?this._position-(t-Math.abs(e)):this._position-e;this._position!==i&&(this._snapping=!0,this.scrollTo(-i),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))},Q.prototype.scrollTo=function(t,e){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"===typeof t&&(this._position=-t),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0),this._element.style.transition="transform "+(e||.2)+"s ease-out",this._element.style.webkitTransition="-webkit-transform "+(e||.2)+"s ease-out",this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd),this._element.addEventListener("webkitTransitionEnd",this._onTransitionEnd)},Q.prototype.dispatchScroll=function(){if("function"===typeof this._options.onScroll&&Math.floor(this._lastPos)!==Math.floor(this._position)){this._lastPos=this._position;var t={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(t)}},Q.prototype.update=function(t,e,i){var n=0,s=this._position;this._enableX?(n=this._element.childNodes.length?(e||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=e):(n=this._element.childNodes.length?(e||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=e),"number"===typeof t&&(this._position=-t),this._position<-n?this._position=-n:this._position>0&&(this._position=0),this._itemSize=i||this._itemSize,this.updatePosition(),s!==this._position&&(this.dispatchScroll(),"function"===typeof this._options.onSnap&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=n,this._scroll._extent=n},Q.prototype.updatePosition=function(){var t="";this._enableX?t="translateX("+this._position+"px) translateZ(0)":this._enableY&&(t="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=t,this._element.style.transform=t},Q.prototype.isScrolling=function(){return this._scrolling||this._snapping};var D={methods:{initScroller:function(t,e){this._touchInfo={trackingID:-1,maxDy:0,maxDx:0},this._scroller=new Q(t,e),this.__handleTouchStart=this._handleTouchStart.bind(this),this.__handleTouchMove=this._handleTouchMove.bind(this),this.__handleTouchEnd=this._handleTouchEnd.bind(this),this._initedScroller=!0},_findDelta:function(t){var e=this._touchInfo;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:t.screenX-e.x,y:t.screenY-e.y}},_handleTouchStart:function(t){var e=this._touchInfo,i=this._scroller;i&&("start"===t.detail.state?(e.trackingID="touch",e.x=t.detail.x,e.y=t.detail.y):(e.trackingID="mouse",e.x=t.screenX,e.y=t.screenY),e.maxDx=0,e.maxDy=0,e.historyX=[0],e.historyY=[0],e.historyTime=[t.detail.timeStamp],e.listener=i,i.onTouchStart&&i.onTouchStart())},_handleTouchMove:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var i=this._findDelta(t);if(i){for(e.maxDy=Math.max(e.maxDy,Math.abs(i.y)),e.maxDx=Math.max(e.maxDx,Math.abs(i.x)),e.historyX.push(i.x),e.historyY.push(i.y),e.historyTime.push(t.detail.timeStamp);e.historyTime.length>10;)e.historyTime.shift(),e.historyX.shift(),e.historyY.shift();e.listener&&e.listener.onTouchMove&&e.listener.onTouchMove(i.x,i.y,t.detail.timeStamp)}}},_handleTouchEnd:function(t){var e=this._touchInfo;if(-1!==e.trackingID){t.preventDefault();var i=this._findDelta(t);if(i){var n=e.listener;e.trackingID=-1,e.listener=null;var s=e.historyTime.length,r={x:0,y:0};if(s>2)for(var o=e.historyTime.length-1,a=e.historyTime[o],h=e.historyX[o],l=e.historyY[o];o>0;){o--;var c=e.historyTime[o],u=a-c;if(u>30&&u<50){r.x=(h-e.historyX[o])/(u/1e3),r.y=(l-e.historyY[o])/(u/1e3);break}}e.historyTime=[],e.historyX=[],e.historyY=[],n&&n.onTouchEnd&&n.onTouchEnd(i.x,i.y,r)}}}}};function P(t,e){const i=20,n=navigator.maxTouchPoints;let s=0,r=0;t.addEventListener(n?"touchstart":"mousedown",t=>{const e=n?t.changedTouches[0]:t;s=e.clientX,r=e.clientY}),t.addEventListener(n?"touchend":"mouseup",t=>{const o=n?t.changedTouches[0]:t;Math.abs(o.clientX-s)<i&&Math.abs(o.clientY-r)<i&&e(o)})}var A,$,O={name:"SPickerViewColumn",mixins:[M,D],components:{ResizeSensor:m},data(){return{scope:`picker-view-column-${Date.now()}`,inited:!1,indicatorStyle:"",indicatorClass:"",indicatorHeight:34,maskStyle:"",maskClass:"",current:this.$parent.getItemValue(this),length:0}},computed:{height(){return this.$parent.height},maskSize(){return(this.height-this.indicatorHeight)/2}},watch:{indicatorHeight(t){this._setItemHeight(t),this.inited&&this.update()},current(t){this.$parent.setItemValue(this,t)},length(t){this.inited&&this.update(t)}},created(){const t=this.$parent;this.indicatorStyle=t.indicatorStyle,this.indicatorClass=t.indicatorClass,this.maskStyle=t.maskStyle,this.maskClass=t.maskClass,this.deltaY=0},async mounted(){this.touchtrack(this.$refs.main,"_handleTrack",!0),this.setCurrent(this.current),this.$nextTick(()=>{this.init(),this.update()}),P(this.$el,this._handleTap.bind(this))},methods:{_setItemHeight(t){const e=document.createElement("style");e.innerText=`.s-picker-view-content.${this.scope}>*{height: ${t}px;line-height: ${t}px;overflow: hidden;}`,document.head.appendChild(e)},_handleTrack(t){if(this._scroller)switch(t.detail.state){case"start":this._handleTouchStart(t);break;case"move":this._handleTouchMove(t);break;case"end":case"cancel":this._handleTouchEnd(t)}},_handleTap({clientY:t}){if(!this._scroller.isScrolling()){const e=this.$el.getBoundingClientRect(),i=t-e.top-this.height/2,n=this.indicatorHeight/2;if(!(Math.abs(i)<=n)){const t=Math.ceil((Math.abs(i)-n)/this.indicatorHeight),e=i<0?-t:t;let s=Math.min(this.current+e,this.length-1);this.current=s=Math.max(s,0),this._scroller.scrollTo(s*this.indicatorHeight)}}},_handleWheel(t){const e=this.deltaY+t.deltaY;if(Math.abs(e)>10){this.deltaY=0;let t=Math.min(this.current+(e<0?-1:1),this.length-1);this.current=t=Math.max(t,0),this._scroller.scrollTo(t*this.indicatorHeight)}else this.deltaY=e;t.preventDefault()},setCurrent(t){t!==this.current&&(this.current=t,this.inited&&this.update())},init(){this.initScroller(this.$refs.content,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:this.indicatorHeight,friction:new b(1e-4),spring:new I(2,90,20),onSnap:t=>{isNaN(t)||t===this.current||(this.current=t)}}),this.inited=!0},update(){this.$nextTick(()=>{let t=Math.min(this.current,this.length-1);t=Math.max(t,0),this._scroller.update(t*this.indicatorHeight,void 0,this.indicatorHeight)})},_resize({height:t}){this.indicatorHeight=t}},render(t){return this.length=this.$slots.default&&this.$slots.default.length||0,t("div",{on:{wheel:this._handleWheel},class:"s-picker-view-column"},[t("div",{ref:"main",staticClass:"s-picker-view-group"},[t("div",{ref:"mask",staticClass:"s-picker-view-mask",class:this.maskClass,style:`background-size: 100% ${this.maskSize}px;${this.maskStyle}`}),t("div",{ref:"indicator",staticClass:"s-picker-view-indicator",class:this.indicatorClass,style:this.indicatorStyle},[t("resize-sensor",{attrs:{initial:!0},on:{resize:this._resize}})]),t("div",{ref:"content",staticClass:"s-picker-view-content",class:this.scope,style:`padding: ${this.maskSize}px 0;`},[this.$slots.default])])])}},Y=O,R=u(Y,A,$,!1,null,null,null),L=R.exports;L.install=function(t){t.component(L.name,L)};var z=L;const V=(t,e)=>["未知",...new Array(t).fill().map((t,i)=>`${i}${e}`)];function X(t,e,i){const n=864e5,s=Object(h["lunarToSolar"])(t,e,1,i),r=Object(h["leapMonthOfYear"])(t);r!==e||i?12===e?(t+=1,e=1):(i=!1,e+=1):i=!0;const o=Object(h["lunarToSolar"])(t,e,1,i);return(o.valueOf()-s.valueOf())/n}function H(t){const e="〇一二三四五六七八九";let i="";while(t>0)i=e[t%10]+i,t=Math.floor(t/10);return i}function W(){const t=new Date,e=t.getFullYear(),i=[];for(let n=1930;n<=e;n++)i.push(n);return i}function B(t,e){const i=[0,31,0,31,30,31,30,31,31,30,31,30,31];return 2!==e?i[e]:t%400?t%100?t%4?28:29:28:29}function j(t){const e=Number(Object(h["solarToLunar"])(new Date(t[0],0,1),"y")),i=Number(Object(h["solarToLunar"])(new Date(t[t.length-1],11,31),"y")),n=[];for(let s=e;s<=i;s+=1)n.push({year:s,hans:H(s)});return n}function q(t){const e=Object(h["leapMonthOfYear"])(t);let i=[...Array(12)].map((t,e)=>({month:e+1,leap:!1}));return e&&(i=i.concat({month:e,leap:!0}).sort((t,e)=>t.month-e.month)),i.map(t=>Object.assign({},t,{hans:Object(h["monthName"])(t.month,!0,t.leap)}))}function U(t,e,i){const n=X(t,e,i),s=[];for(let r=1;r<=n;r+=1)s.push({date:r,hans:Object(h["dayName"])(r)});return s}function N(t){return t<10?`0${t}`:`${t}`}const F=V(24,"时"),J=V(60,"分"),K=W(),G=j(K);var Z={name:"SCalendar",components:{PickerView:x,PickerViewColumn:z},props:{defaultDate:{type:Array,required:!1,default:()=>{const t=new Date,e=t.getFullYear(),i=t.getMonth()+1,n=t.getDate();return[e,i,n,1,1]}},defaultTime:{type:Array,required:!1,default:()=>[-1,-1]},isLunar:{type:Boolean,required:!1,dafault:!0},value:{type:Boolean,default:!1},defaultType:{type:Number,default:0},color:{type:String,default:"#522273"},dateType:{type:String,default:"date"}},data(){return{solarValue:[-1,-1,-1],solarYears:K,solarMonths:12,solarDates:31,lunarValue:[-1,-1,-1],lunarYears:G,lunarMonths:[],lunarDates:[],type:0,hours:F,minutes:J,dateList:["公历","农历"],currentTime:[-1,-1]}},computed:{solarTime(){const[t=0,e=0]=this.currentTime;return this.solarValue.concat(t,e)},lunarTime(){const[t=0,e=0]=this.currentTime;return this.lunarValue.concat(t,e)},currentSolar(){const[t,e,i]=this.solarValue,n=this.solarYears[t]||this.solarYears[0],s=e+1,r=i+1;return[{hans:N(n),year:n},{hans:N(s),month:s},{hans:N(r),date:r}]},currentLunar(){const[t,e,i]=this.lunarValue,n=this.lunarYears[t]||this.lunarYears[0],s=this.lunarMonths[e]||this.lunarMonths[0],r=this.lunarDates[i]||this.lunarDates[0];return[n,s,r]},hasDateTime(){return"datetime"===this.dateType}},mounted(){this.currentTime=this.defaultTime,this.initDate()},methods:{cancal(){this.$emit("input",!1)},handleSubmit(){const t={solar:this.currentSolar,lunar:this.currentLunar,type:this.type};if(this.hasDateTime){let[e=0,i=0]=this.currentTime;0===e&&(e=1),0===i&&(i=1),t.time=[e-1,i-1]}this.cancal(),this.$emit("change",t)},handleCancel(){this.cancal(),this.$emit("cancel")},initDate(){const[t,e,i]=this.defaultDate;this.type=this.defaultType;const n=this.solarYears.findIndex(e=>e===t);this.handleSolarDateChange([n,e-1,i-1],!0)},handleCalendarChange(t){this.type=t},handleSolarDateChange(t,e=!1,i=!0){const[n,s,r,o,a]=t,[h,l,c]=this.solarValue;if(e||n!==h||s!==l){const t=this.solarYears[n],e=s+1;this.solarDates=B(t,e)}this.$nextTick().then(()=>{this.solarValue=[n,s,r],this.currentTime=[o,a]}),!i||n===h&&s===l&&r===c||this.$nextTick().then(()=>{const[{year:t},{month:e},{date:i}]=this.currentSolar;this.findLunarValue(t,e,i)})},handleLunarDateChange(t,e=!1,i=!0){const[n,s,r,o,a]=t,[h,l,c]=this.lunarValue;if((e||n!==h)&&(this.lunarMonths=q(this.lunarYears[n].year)),e||n!==h||s!==l){const{year:t}=this.lunarYears[n],{month:e,leap:i}=this.lunarMonths[s];this.lunarDates=U(t,e,i)}this.$nextTick().then(()=>{this.lunarValue=[n,s,r],this.currentTime=[o,a]}),!i||n===h&&s===l&&r===c||this.$nextTick().then(()=>{const[{year:t=1989}={},{month:e=12,leap:i=!1}={},{date:n=5}={}]=this.currentLunar;this.findSolarValue(t,e,n,i)})},findSolarValue(t,e,i,n){const s=Object(h["lunarToSolar"])(t,e,i,n),r=s.getFullYear(),o=s.getMonth(),a=s.getDate()-1,l=this.solarYears.findIndex(t=>t===r);this.handleSolarDateChange([l,o,a,...this.currentTime],!0,!1)},findLunarValue(t,e,i){const{leap:n,year:s,month:r,day:o,leapMonth:a}=Object(h["solarToLunar"])(new Date(t,e-1,i,0,0,0)),l=this.lunarYears.findIndex(({year:t})=>t===s),c=a&&(n||r>a)?r:r-1,u=o-1;this.handleLunarDateChange([l,c,u,...this.currentTime],!0,!1)}}},tt=Z,et=u(tt,o,a,!1,null,null,null),it=et.exports;it.install=function(t){t.component(it.name,it)};var nt=it,st=i("8bbf"),rt=i.n(st),ot=i("f230"),at=i.n(ot),ht={name:"SCanvasImg",render(t){return t("div",{class:"s-canvas-image"},this.$slots.default)},methods:{draw(){const t=this.$el,e=document.createElement("canvas"),i=t.offsetWidth,n=t.offsetHeight,s=2;e.width=i*s,e.height=n*s,e.style.width=`${i}px`,e.style.height=`${n}px`,at()(t,{width:i,height:n,scale:s,useCORS:!0,canvas:e,scrollX:0,scrollY:0,imageTimeout:0}).then(t=>{const e=t.toDataURL("image/jpeg",1);this.$emit("drawed",e)}).catch(t=>{console.error(t),this.$emit("drawed",null)})}}};const lt=rt.a.extend();var ct=function(t,e,i=!1){return new Promise(n=>{const s=new lt({el:document.createElement("div"),render(s){return s(ht,{ref:"canvasImage",class:{"s-canvas-to-imgae--debug":i},staticClass:"s-canvas-to-image",on:{drawed:t=>{n(t),this.$destroy(),document.body.removeChild(this.$el)}}},[s(t,{props:e})])}});document.body.appendChild(s.$el),i||s.$refs.canvasImage.draw()})};ct.install=function(t){t.prototype.$genImage=ct};var ut=ct,dt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("van-popup",{staticClass:"s-pay",attrs:{value:t.value,position:"bottom"},on:{input:function(e){return t.$emit("input",e)}}},[i("div",{staticClass:"s-pay-title"},[t._v("选择支付方式")]),i("van-radio-group",{model:{value:t.payType,callback:function(e){t.payType=e},expression:"payType"}},t._l(t.payList,function(e,n){return i("div",{key:n,staticClass:"s-pay-item",on:{click:function(i){t.payType=e.value}}},[i("div",{staticClass:"s-pay-item-left"},[i("img",{staticClass:"s-pay-item-left-icon",attrs:{src:e.icon}}),i("p",[t._v(t._s(e.name))])]),i("van-radio",{attrs:{"checked-color":"#39AC6E",name:e.value}})],1)}),0),i("div",{staticClass:"s-pay-bootom"},[i("div",{staticClass:"s-pay-money"},[i("span",[t._v("合计: ")]),i("span",{staticClass:"s-pay-money-value"},[t._v("¥"+t._s(t.info.money))])]),i("div",{staticClass:"s-pay-btn",on:{click:t.handlePay}},[t._v("去支付")])])],1)},pt=[],_t={name:"SH5Pay",props:{value:{type:Boolean,default:!1},info:{type:Object,default:()=>({})}},data(){return{payType:1,payList:[{name:"支付宝支付",value:1,icon:i("e986")}]}},methods:{async handlePay(){this.$toast.success("支付成功")}}},ft=_t,mt=u(ft,dt,pt,!1,null,null,null),gt=mt.exports;gt.install=function(t){t.component(gt.name,gt)};var yt=gt;const vt="0.1.3",Tt=[nt,ut,yt,x,z,m],xt=t=>{Tt.forEach(e=>{t.use(e)})};"undefined"!==typeof window&&window.Vue&&xt(window.Vue);var St={install:xt,version:vt,Calendar:nt,CanvasImage:ut,H5Pay:yt,PickerView:x,PickerViewColumn:z,ResizeSensor:m};e["default"]=St}})});
//# sourceMappingURL=sums-components.umd.min.js.map
{
"name": "sums-components",
"version": "0.1.2",
"version": "0.1.3",
"private": false,

@@ -17,9 +17,4 @@ "main": "lib/sums-ui.umd.min.js",

"axios": "^0.19.0",
"core-js": "^2.6.5",
"fs-extra": "^8.1.0",
"highlight.js": "^9.15.10",
"lib-flexible": "^0.3.2",
"lodash": "^4.17.15",
"path-to-regexp": "^3.0.0",
"uppercamelcase": "^3.0.0",
"vant": "^2.1.5",

@@ -65,3 +60,7 @@ "vue": "^2.6.10",

"webpack-cli": "^3.3.7",
"webpack-node-externals": "^1.7.2"
"webpack-node-externals": "^1.7.2",
"core-js": "^2.6.5",
"fs-extra": "^8.1.0",
"highlight.js": "^9.15.10",
"uppercamelcase": "^3.0.0"
},

@@ -68,0 +67,0 @@ "files": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc