r?r:o.activeWidth;var a=t.area[0],s=t.height-t.area[2];i.beginPath(),i.setFillStyle(f(o.activeBgColor,o.activeBgOpacity)),i.rect(e-o.activeWidth/2,a,o.activeWidth,s-a),i.closePath(),i.fill(),i.setFillStyle("#FFFFFF")}function Re(e,t,n,i,r){var o=u({},{activeBgColor:"#000000",activeBgOpacity:.08},t.extra.bar),a=t.area[3],s=t.width-t.area[1];i.beginPath(),i.setFillStyle(f(o.activeBgColor,o.activeBgOpacity)),i.rect(a,e-r/2,s-a,r),i.closePath(),i.fill(),i.setFillStyle("#FFFFFF")}function Ke(e,t,n,i,r,o,a){var s=u({},{showBox:!0,showArrow:!0,showCategory:!1,bgColor:"#000000",bgOpacity:.7,borderColor:"#000000",borderWidth:0,borderRadius:0,borderOpacity:.7,fontColor:"#FFFFFF",splitLine:!0},n.extra.tooltip);1==s.showCategory&&n.categories&&e.unshift({text:n.categories[n.tooltip.index],color:null});var c=4*n.pix,l=5*n.pix,d=s.showArrow?8*n.pix:0,h=!1;"line"!=n.type&&"mount"!=n.type&&"area"!=n.type&&"candle"!=n.type&&"mix"!=n.type||1==s.splitLine&&Ie(n.tooltip.offset.x,n,i,r),t=u({x:0,y:0},t),t.y-=8*n.pix;var p=e.map((function(e){return S(e.text,i.fontSize,r)})),g=c+l+4*i.toolTipPadding+Math.max.apply(null,p),v=2*i.toolTipPadding+e.length*i.toolTipLineHeight;if(0!=s.showBox){t.x-Math.abs(n._scrollDistance_||0)+d+g>n.width&&(h=!0),v+t.y>n.height&&(t.y=n.height-v),r.beginPath(),r.setFillStyle(f(s.bgColor||i.toolTipBackground,s.bgOpacity||i.toolTipOpacity)),r.setLineWidth(s.borderWidth*n.pix),r.setStrokeStyle(f(s.borderColor,s.borderOpacity));var y=s.borderRadius;h?(s.showArrow&&(r.moveTo(t.x,t.y+10*n.pix),r.lineTo(t.x-d,t.y+10*n.pix+5*n.pix)),r.arc(t.x-d-y,t.y+v-y,y,0,Math.PI/2,!1),r.arc(t.x-d-Math.round(g)+y,t.y+v-y,y,Math.PI/2,Math.PI,!1),r.arc(t.x-d-Math.round(g)+y,t.y+y,y,-Math.PI,-Math.PI/2,!1),r.arc(t.x-d-y,t.y+y,y,-Math.PI/2,0,!1),s.showArrow&&(r.lineTo(t.x-d,t.y+10*n.pix-5*n.pix),r.lineTo(t.x,t.y+10*n.pix))):(s.showArrow&&(r.moveTo(t.x,t.y+10*n.pix),r.lineTo(t.x+d,t.y+10*n.pix-5*n.pix)),r.arc(t.x+d+y,t.y+y,y,-Math.PI,-Math.PI/2,!1),r.arc(t.x+d+Math.round(g)-y,t.y+y,y,-Math.PI/2,0,!1),r.arc(t.x+d+Math.round(g)-y,t.y+v-y,y,0,Math.PI/2,!1),r.arc(t.x+d+y,t.y+v-y,y,Math.PI/2,Math.PI,!1),s.showArrow&&(r.lineTo(t.x+d,t.y+10*n.pix+5*n.pix),r.lineTo(t.x,t.y+10*n.pix))),r.closePath(),r.fill(),s.borderWidth>0&&r.stroke(),e.forEach((function(e,n){if(null!==e.color){r.beginPath(),r.setFillStyle(e.color);var o=t.x+d+2*i.toolTipPadding,a=t.y+(i.toolTipLineHeight-i.fontSize)/2+i.toolTipLineHeight*n+i.toolTipPadding+1;h&&(o=t.x-g-d+2*i.toolTipPadding),r.fillRect(o,a,c,i.fontSize),r.closePath()}})),e.forEach((function(e,n){var o=t.x+d+2*i.toolTipPadding+c+l;h&&(o=t.x-g-d+2*i.toolTipPadding+ +c+l);var a=t.y+(i.toolTipLineHeight-i.fontSize)/2+i.toolTipLineHeight*n+i.toolTipPadding;r.beginPath(),r.setFontSize(i.fontSize),r.setFillStyle(s.fontColor),r.fillText(e.text,o,a+i.fontSize),r.closePath(),r.stroke()}))}}function je(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=u({},{type:"group",width:c/2,meterBorder:4,meterFillColor:"#FFFFFF",barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.column),d=[];r.save();var h=-2,p=s.length+2;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),h=Math.floor(-t._scrollDistance_/c)-2,p=h+t.xAxis.itemCount+4),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===o&&Me(t.tooltip.offset.x,t,n,r,c),l.customColor=w(l.linearType,l.customColor,e,n),e.forEach((function(a,u){var g,v,y;g=[].concat(t.chartData.yAxisData.ranges[a.index]),v=g.pop(),y=g.shift();var m=a.data;switch(l.type){case"group":var x=pe(m,v,y,s,c,t,n,o),A=ye(m,v,y,s,c,t,n,u,e,o);d.push(A),x=se(x,c,e.length,u,n,t);for(var b=0;bh&&bK?K:L,D=D>K?K:D,M=M>K?K:M,R=R>K?K:R,L=L<0?0:L,D=D<0?0:D,M=M<0?0:M,R=R<0?0:R,r.arc(P+L,C+L,L,-Math.PI,-Math.PI/2),r.arc(P+E-D,C+D,D,-Math.PI/2,0),r.arc(P+E-M,C+F-M,M,0,Math.PI/2),r.arc(P+R,C+F-R,R,Math.PI/2,Math.PI)}else r.moveTo(k,w.y),r.lineTo(k+w.width,w.y),r.lineTo(k+w.width,t.height-t.area[2]),r.lineTo(k,t.height-t.area[2]),r.lineTo(k,w.y),r.setLineWidth(1),r.setStrokeStyle(O);r.setFillStyle(T),r.closePath(),r.fill()}}break;case"stack":x=ye(m,v,y,s,c,t,n,u,e,o);d.push(x),x=ue(x,c,e.length,u,n,t,e);for(var j=0;jh&&j0&&(S-=U),r.setFillStyle(T),r.moveTo(k,z.y),r.fillRect(k,z.y,z.width,S),r.closePath(),r.fill()}}break;case"meter":x=pe(m,v,y,s,c,t,n,o);d.push(x),x=le(x,c,e.length,u,n,t,l.meterBorder);for(var B=0;Bh&&B0&&(r.setStrokeStyle(a.color),r.setLineWidth(l.meterBorder*t.pix)),0==u?r.setFillStyle(l.meterFillColor):r.setFillStyle(N.color||a.color);k=N.x-N.width/2,S=t.height-N.y-t.area[2];if(l.barBorderRadius&&4===l.barBorderRadius.length||!0===l.barBorderCircle){var W=k,H=N.y,Z=N.width,V=t.height-t.area[2]-N.y;l.barBorderCircle&&(l.barBorderRadius=[Z/2,Z/2,0,0]);var q=i(l.barBorderRadius,4),J=q[0],X=q[1],G=q[2],Q=q[3],Y=Math.min(Z/2,V/2);J=J>Y?Y:J,X=X>Y?Y:X,G=G>Y?Y:G,Q=Q>Y?Y:Q,J=J<0?0:J,X=X<0?0:X,G=G<0?0:G,Q=Q<0?0:Q,r.arc(W+J,H+J,J,-Math.PI,-Math.PI/2),r.arc(W+Z-X,H+X,X,-Math.PI/2,0),r.arc(W+Z-G,H+V-G,G,0,Math.PI/2),r.arc(W+Q,H+V-Q,Q,Math.PI/2,Math.PI),r.fill()}else r.moveTo(k,N.y),r.lineTo(k+N.width,N.y),r.lineTo(k+N.width,t.height-t.area[2]),r.lineTo(k,t.height-t.area[2]),r.lineTo(k,N.y),r.fill();0==u&&l.meterBorder>0&&(r.closePath(),r.stroke())}}break}})),!1!==t.dataLabel&&1===o&&e.forEach((function(i,a){var u,d,f;u=[].concat(t.chartData.yAxisData.ranges[i.index]),d=u.pop(),f=u.shift();var h=i.data;switch(l.type){case"group":var p=pe(h,d,f,s,c,t,n,o);p=se(p,c,e.length,a,n,t),Oe(p,i,n,r,t);break;case"stack":p=ye(h,d,f,s,c,t,n,a,e,o);Oe(p,i,n,r,t);break;case"meter":p=pe(h,d,f,s,c,t,n,o);Oe(p,i,n,r,t);break}})),r.restore(),{xAxisPoints:s,calPoints:d,eachSpacing:c}}function ze(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=u({},{type:"mount",widthRatio:1,borderWidth:1,barBorderCircle:!1,barBorderRadius:[],linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mount);l.widthRatio=l.widthRatio<=0?0:l.widthRatio,l.widthRatio=l.widthRatio>=2?2:l.widthRatio;r.save();var d,h,p,g=-2,v=s.length+2;t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),g=Math.floor(-t._scrollDistance_/c)-2,v=g+t.xAxis.itemCount+4),l.customColor=w(l.linearType,l.customColor,e,n),d=[].concat(t.chartData.yAxisData.ranges[0]),h=d.pop(),p=d.shift();var y=ge(e,h,p,s,c,t,l,o);switch(l.type){case"bar":for(var m=0;mg&&mM?M:F,I=I>M?M:I,L=L>M?M:L,D=D>M?M:D,F=F<0?0:F,I=I<0?0:I,L=L<0?0:L,D=D<0?0:D,r.arc(O+F,_+F,F,-Math.PI,-Math.PI/2),r.arc(O+P-I,_+I,I,-Math.PI/2,0),r.arc(O+P-L,_+C-L,L,0,Math.PI/2),r.arc(O+D,_+C-D,D,Math.PI/2,Math.PI)}else r.moveTo(A,x.y),r.lineTo(A+x.width,x.y),r.lineTo(A+x.width,t.height-t.area[2]),r.lineTo(A,t.height-t.area[2]),r.lineTo(A,x.y);r.setStrokeStyle(S),r.setFillStyle(k),l.borderWidth>0&&(r.setLineWidth(l.borderWidth*t.pix),r.closePath(),r.stroke()),r.fill()}}break;case"triangle":for(var R=0;Rg&&R0&&(r.setLineWidth(l.borderWidth*t.pix),r.stroke()),r.fill()}}break;case"mount":for(var j=0;jg&&j0&&(r.setLineWidth(l.borderWidth*t.pix),r.stroke()),r.fill()}}break;case"sharp":for(var U=0;Ug&&U0&&(r.setLineWidth(l.borderWidth*t.pix),r.stroke()),r.fill()}}break}if(!1!==t.dataLabel&&1===o){var N,W,H;N=[].concat(t.chartData.yAxisData.ranges[0]),W=N.pop(),H=N.shift();y=ge(e,W,H,s,c,t,l,o);_e(y,e,n,r,t)}return r.restore(),{xAxisPoints:s,calPoints:y,eachSpacing:c}}function Ue(e,t,n,r){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=[],s=(t.height-t.area[0]-t.area[2])/t.categories.length,c=0;ch&&bK?K:L,D=D>K?K:D,M=M>K?K:M,R=R>K?K:R,L=L<0?0:L,D=D<0?0:D,M=M<0?0:M,R=R<0?0:R,r.arc(P+R,E+R,R,-Math.PI,-Math.PI/2),r.arc(w.x-L,E+L,L,-Math.PI/2,0),r.arc(w.x-D,E+C-D,D,0,Math.PI/2),r.arc(P+M,E+C-M,M,Math.PI/2,Math.PI)}else r.moveTo(k,S),r.lineTo(w.x,S),r.lineTo(w.x,S+w.width),r.lineTo(k,S+w.width),r.lineTo(k,S),r.setLineWidth(1),r.setStrokeStyle(O);r.setFillStyle(T),r.closePath(),r.fill()}}break;case"stack":x=me(m,v,y,a,s,t,n,u,e,o);d.push(x),x=de(x,s,e.length,u,n,t,e);for(var j=0;jh&&j5&&void 0!==arguments[5]?arguments[5]:1,a=u({},{color:{},average:{}},n.extra.candle);a.color=u({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},a.color),a.average=u({},{show:!1,name:[],day:[],color:i.color},a.average),n.extra.candle=a;var s=n.chartData.xAxisData,c=s.xAxisPoints,l=s.eachSpacing,d=[];r.save();var f=-2,h=c.length+2,p=0,g=n.width+l;return n._scrollDistance_&&0!==n._scrollDistance_&&!0===n.enableScroll&&(r.translate(n._scrollDistance_,0),f=Math.floor(-n._scrollDistance_/l)-2,h=f+n.xAxis.itemCount+4,p=-n._scrollDistance_-2*l+n.area[3],g=p+(n.xAxis.itemCount+4)*l),(a.average.show||t)&&t.forEach((function(e,t){var a,s,u;a=[].concat(n.chartData.yAxisData.ranges[e.index]),s=a.pop(),u=a.shift();for(var d=e.data,f=pe(d,s,u,c,l,n,i,o),h=q(f,e),v=0;vp&&(r.moveTo(b.x,b.y),x=1),A>0&&b.x>p&&b.xf&&m0?(r.setStrokeStyle(a.color.upLine),r.setFillStyle(a.color.upFill),r.setLineWidth(1*n.pix),r.moveTo(x[3].x,x[3].y),r.lineTo(x[1].x,x[1].y),r.lineTo(x[1].x-l/4,x[1].y),r.lineTo(x[0].x-l/4,x[0].y),r.lineTo(x[0].x,x[0].y),r.lineTo(x[2].x,x[2].y),r.lineTo(x[0].x,x[0].y),r.lineTo(x[0].x+l/4,x[0].y),r.lineTo(x[1].x+l/4,x[1].y),r.lineTo(x[1].x,x[1].y),r.moveTo(x[3].x,x[3].y)):(r.setStrokeStyle(a.color.downLine),r.setFillStyle(a.color.downFill),r.setLineWidth(1*n.pix),r.moveTo(x[3].x,x[3].y),r.lineTo(x[0].x,x[0].y),r.lineTo(x[0].x-l/4,x[0].y),r.lineTo(x[1].x-l/4,x[1].y),r.lineTo(x[1].x,x[1].y),r.lineTo(x[2].x,x[2].y),r.lineTo(x[1].x,x[1].y),r.lineTo(x[1].x+l/4,x[1].y),r.lineTo(x[0].x+l/4,x[0].y),r.lineTo(x[0].x,x[0].y),r.moveTo(x[3].x,x[3].y)),r.closePath(),r.fill(),r.stroke()}})),r.restore(),{xAxisPoints:c,calPoints:d,eachSpacing:l}}function Ne(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},t.extra.area),a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=t.height-t.area[2],d=[];i.save();var h=0,p=t.width+c;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),h=-t._scrollDistance_-2*c+t.area[3],p=h+(t.xAxis.itemCount+4)*c),e.forEach((function(e,a){var u,g,v;u=[].concat(t.chartData.yAxisData.ranges[e.index]),g=u.pop(),v=u.shift();var m=e.data,x=pe(m,g,v,s,c,t,n,r);d.push(x);for(var A=q(x,e),b=0;b1){var S=w[0],T=w[w.length-1];i.moveTo(S.x,S.y);var O=0;if("curve"===o.type)for(var _=0;_h&&(i.moveTo(P.x,P.y),O=1),_>0&&P.x>h&&P.xh&&(i.moveTo(F.x,F.y),O=1),E>0&&F.x>h&&F.x
h&&(i.moveTo(L.x,L.y),O=1),I>0&&L.x>h&&L.x
h&&(i.moveTo(j.x,j.y),R=1),K>0&&j.x>h&&j.x
h&&(i.moveTo(B.x,B.y),R=1),U>0&&B.x>h&&B.x
h&&(i.moveTo(W.x,W.y),R=1),N>0&&W.x>h&&W.x
4&&void 0!==arguments[4]?arguments[4]:1,o=(u({},{type:"circle"},t.extra.scatter),t.chartData.xAxisData),a=o.xAxisPoints,s=o.eachSpacing,c=[];i.save();var l=0;t.width;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),l=-t._scrollDistance_-2*s+t.area[3],l+(t.xAxis.itemCount+4)*s),e.forEach((function(e,o){var c,l,u;c=[].concat(t.chartData.yAxisData.ranges[e.index]),l=c.pop(),u=c.shift();var d=e.data,f=pe(d,l,u,a,s,t,n,r);i.beginPath(),i.setStrokeStyle(e.color),i.setFillStyle(e.color),i.setLineWidth(1*t.pix);var h=e.pointShape;if("diamond"===h)f.forEach((function(e,t){null!==e&&(i.moveTo(e.x,e.y-4.5),i.lineTo(e.x-4.5,e.y),i.lineTo(e.x,e.y+4.5),i.lineTo(e.x+4.5,e.y),i.lineTo(e.x,e.y-4.5))}));else if("circle"===h)f.forEach((function(e,n){null!==e&&(i.moveTo(e.x+2.5*t.pix,e.y),i.arc(e.x,e.y,3*t.pix,0,2*Math.PI,!1))}));else if("square"===h)f.forEach((function(e,t){null!==e&&(i.moveTo(e.x-3.5,e.y-3.5),i.rect(e.x-3.5,e.y-3.5,7,7))}));else if("triangle"===h)f.forEach((function(e,t){null!==e&&(i.moveTo(e.x,e.y-4.5),i.lineTo(e.x-4.5,e.y+4.5),i.lineTo(e.x+4.5,e.y+4.5),i.lineTo(e.x,e.y-4.5))}));else if("triangle"===h)return;i.closePath(),i.fill(),i.stroke()})),!1!==t.dataLabel&&1===r&&e.forEach((function(e,o){var c,l,u;c=[].concat(t.chartData.yAxisData.ranges[e.index]),l=c.pop(),u=c.shift();var d=e.data,f=pe(d,l,u,a,s,t,n,r);Oe(f,e,n,i,t)})),i.restore(),{xAxisPoints:a,calPoints:c,eachSpacing:s}}function He(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{opacity:1,border:2},t.extra.bubble),a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=[];i.save();var d=0;t.width;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),d=-t._scrollDistance_-2*c+t.area[3],d+(t.xAxis.itemCount+4)*c),e.forEach((function(a,l){var u,d,h;u=[].concat(t.chartData.yAxisData.ranges[a.index]),d=u.pop(),h=u.shift();var p=a.data,g=pe(p,d,h,s,c,t,n,r);i.beginPath(),i.setStrokeStyle(a.color),i.setLineWidth(o.border*t.pix),i.setFillStyle(f(a.color,o.opacity)),g.forEach((function(e,n){i.moveTo(e.x+e.r,e.y),i.arc(e.x,e.y,e.r*t.pix,0,2*Math.PI,!1)})),i.closePath(),i.fill(),i.stroke(),!1!==t.dataLabel&&1===r&&g.forEach((function(r,o){i.beginPath();var a=e.textSize*t.pix||n.fontSize;i.setFontSize(a),i.setFillStyle(e.textColor||"#FFFFFF"),i.setTextAlign("center"),i.fillText(String(r.t),r.x,r.y+a/2),i.closePath(),i.stroke(),i.setTextAlign("left")}))})),i.restore(),{xAxisPoints:s,calPoints:l,eachSpacing:c}}function Ze(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"straight",width:2},t.extra.line);o.width*=t.pix;var a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=[];i.save();var d=0,f=t.width+c;return t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(i.translate(t._scrollDistance_,0),d=-t._scrollDistance_-2*c+t.area[3],f=d+(t.xAxis.itemCount+4)*c),e.forEach((function(e,a){var u,h,p;u=[].concat(t.chartData.yAxisData.ranges[e.index]),h=u.pop(),p=u.shift();var g=e.data,v=pe(g,h,p,s,c,t,n,r);l.push(v);var m=q(v,e);if("dash"==e.lineType){var x=e.dashLength?e.dashLength:8;x*=t.pix,i.setLineDash([x,x])}i.beginPath(),i.setStrokeStyle(e.color),i.setLineWidth(o.width),m.forEach((function(e,t){if(1===e.length)i.moveTo(e[0].x,e[0].y),i.arc(e[0].x,e[0].y,1,0,2*Math.PI);else{i.moveTo(e[0].x,e[0].y);var n=0;if("curve"===o.type)for(var r=0;rd&&(i.moveTo(a.x,a.y),n=1),r>0&&a.x>d&&a.xd&&(i.moveTo(l.x,l.y),n=1),c>0&&l.x>d&&l.xd&&(i.moveTo(h.x,h.y),n=1),u>0&&h.x>d&&h.x4&&void 0!==arguments[4]?arguments[4]:1,a=t.chartData.xAxisData,s=a.xAxisPoints,c=a.eachSpacing,l=u({},{width:c/2,barBorderCircle:!1,barBorderRadius:[],seriesGap:2,linearType:"none",linearOpacity:1,customColor:[],colorStop:0},t.extra.mix.column),d=u({},{opacity:.2,gradient:!1},t.extra.mix.area),h=t.height-t.area[2],p=[],g=0,v=0;e.forEach((function(e,t){"column"==e.type&&(v+=1)})),r.save();var m=-2,x=s.length+2,A=0,b=t.width+c;if(t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&(r.translate(t._scrollDistance_,0),m=Math.floor(-t._scrollDistance_/c)-2,x=m+t.xAxis.itemCount+4,A=-t._scrollDistance_-2*c+t.area[3],b=A+(t.xAxis.itemCount+4)*c),l.customColor=w(l.linearType,l.customColor,e,n),e.forEach((function(e,a){var u,w,k;u=[].concat(t.chartData.yAxisData.ranges[e.index]),w=u.pop(),k=u.shift();var S=e.data,T=pe(S,w,k,s,c,t,n,o);if(p.push(T),"column"==e.type){T=se(T,c,v,g,n,t);for(var O=0;Om&&OB?B:K,j=j>B?B:j,z=z>B?B:z,U=U>B?B:U,K=K<0?0:K,j=j<0?0:j,z=z<0?0:z,U=U<0?0:U,r.arc(I+K,L+K,K,-Math.PI,-Math.PI/2),r.arc(I+D-j,L+j,j,-Math.PI/2,0),r.arc(I+D-z,L+M-z,z,0,Math.PI/2),r.arc(I+U,L+M-U,U,Math.PI/2,Math.PI)}else r.moveTo(P,_.y),r.lineTo(P+_.width,_.y),r.lineTo(P+_.width,t.height-t.area[2]),r.lineTo(P,t.height-t.area[2]),r.lineTo(P,_.y),r.setLineWidth(1),r.setStrokeStyle(E);r.setFillStyle(C),r.closePath(),r.fill()}}g+=1}if("area"==e.type)for(var N=q(T,e),W=0;W1){var V=H[0],J=H[H.length-1];r.moveTo(V.x,V.y);var X=0;if("curve"===e.style)for(var G=0;GA&&(r.moveTo(Q.x,Q.y),X=1),G>0&&Q.x>A&&Q.xA&&(r.moveTo(ee.x,ee.y),X=1),$>0&&ee.x>A&&ee.xA&&(r.moveTo(c.x,c.y),a=1),s>0&&c.x>A&&c.xA&&(r.moveTo(d.x,d.y),a=1),u>0&&d.x>A&&d.x1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),p+=(t.extra.mount.widthRatio-1)*c);var g=h*h/p,v=0;t._scrollDistance_&&(v=-t._scrollDistance_*h/p),i.beginPath(),i.setLineCap("round"),i.setLineWidth(6*t.pix),i.setStrokeStyle(t.xAxis.scrollBackgroundColor||"#EFEBEF"),i.moveTo(a,f),i.lineTo(s,f),i.stroke(),i.closePath(),i.beginPath(),i.setLineCap("round"),i.setLineWidth(6*t.pix),i.setStrokeStyle(t.xAxis.scrollColor||"#A6A6A6"),i.moveTo(a+v,f),i.lineTo(a+v+g,f),i.stroke(),i.closePath(),i.setLineCap("butt")}if(i.save(),t._scrollDistance_&&0!==t._scrollDistance_&&i.translate(t._scrollDistance_,0),!0===t.xAxis.calibration&&(i.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),i.setLineCap("butt"),i.setLineWidth(1*t.pix),o.forEach((function(e,n){n>0&&(i.beginPath(),i.moveTo(e-c/2,u),i.lineTo(e-c/2,u+3*t.pix),i.closePath(),i.stroke())}))),!0!==t.xAxis.disableGrid&&(i.setStrokeStyle(t.xAxis.gridColor||"#cccccc"),i.setLineCap("butt"),i.setLineWidth(1*t.pix),"dash"==t.xAxis.gridType&&i.setLineDash([t.xAxis.dashLength*t.pix,t.xAxis.dashLength*t.pix]),t.xAxis.gridEval=t.xAxis.gridEval||1,o.forEach((function(e,n){n%t.xAxis.gridEval==0&&(i.beginPath(),i.moveTo(e,u),i.lineTo(e,d),i.stroke())})),i.setLineDash([])),!0!==t.xAxis.disabled){var y=e.length;t.xAxis.labelCount&&(y=t.xAxis.itemCount?Math.ceil(e.length/t.xAxis.itemCount*t.xAxis.labelCount):t.xAxis.labelCount,y-=1);for(var m=Math.ceil(e.length/y),x=[],A=e.length,b=0;b1&&(t.extra.mount.widthRatio>2&&(t.extra.mount.widthRatio=2),l+=(t.extra.mount.widthRatio-1)*c);var u=a+l,d=[],f=1;!1===t.xAxis.axisLine&&(f=0);for(var h=f;h4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,ringWidth:30,customRadius:0,border:!1,borderWidth:2,borderColor:"#FFFFFF",centerColor:"#FFFFFF",linearType:"none",customColor:[]},"pie"==t.type?t.extra.pie:t.extra.ring),a={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2};0==n.pieChartLinePadding&&(n.pieChartLinePadding=o.activeRadius*t.pix);var s=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);s=s<10?10:s,o.customRadius>0&&(s=o.customRadius*t.pix),e=$(e,s,r);var c=o.activeRadius*t.pix;if(o.customColor=w(o.linearType,o.customColor,e,n),e=e.map((function(e){return e._start_+=o.offsetAngle*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(i.beginPath(),i.setFillStyle(f(e.color,o.activeOpacity||.5)),i.moveTo(a.x,a.y),i.arc(a.x,a.y,e._radius_+c,e._start_,e._start_+2*e._proportion_*Math.PI),i.closePath(),i.fill()),i.beginPath(),i.setLineWidth(o.borderWidth*t.pix),i.lineJoin="round",i.setStrokeStyle(o.borderColor);var r,s=e.color;"custom"==o.linearType&&(r=i.createCircularGradient?i.createCircularGradient(a.x,a.y,e._radius_):i.createRadialGradient(a.x,a.y,0,a.x,a.y,e._radius_),r.addColorStop(0,f(o.customColor[e.linearIndex],1)),r.addColorStop(1,f(e.color,1)),s=r);i.setFillStyle(s),i.moveTo(a.x,a.y),i.arc(a.x,a.y,e._radius_,e._start_,e._start_+2*e._proportion_*Math.PI),i.closePath(),i.fill(),1==o.border&&i.stroke()})),"ring"===t.type){var l=.6*s;"number"===typeof o.ringWidth&&o.ringWidth>0&&(l=Math.max(0,s-o.ringWidth*t.pix)),i.beginPath(),i.setFillStyle(o.centerColor),i.moveTo(a.x,a.y),i.arc(a.x,a.y,l,0,2*Math.PI),i.closePath(),i.fill()}return!1!==t.dataLabel&&1===r&&Fe(e,t,n,i,s,a),1===r&&"ring"===t.type&&Te(t,n,i,a),{center:a,radius:s,series:e}}function $e(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"area",activeOpacity:.5,activeRadius:10,offsetAngle:0,labelWidth:15,border:!1,borderWidth:2,borderColor:"#FFFFFF",linearType:"none",customColor:[]},t.extra.rose);0==n.pieChartLinePadding&&(n.pieChartLinePadding=o.activeRadius*t.pix);var a={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},s=Math.min((t.width-t.area[1]-t.area[3])/2-n.pieChartLinePadding-n.pieChartTextPadding-n._pieTextMaxLength_,(t.height-t.area[0]-t.area[2])/2-n.pieChartLinePadding-n.pieChartTextPadding);s=s<10?10:s;var c=o.minRadius||.5*s;e=te(e,o.type,c,s,r);var l=o.activeRadius*t.pix;return o.customColor=w(o.linearType,o.customColor,e,n),e=e.map((function(e){return e._start_+=(o.offsetAngle||0)*Math.PI/180,e})),e.forEach((function(e,n){t.tooltip&&t.tooltip.index==n&&(i.beginPath(),i.setFillStyle(f(e.color,o.activeOpacity||.5)),i.moveTo(a.x,a.y),i.arc(a.x,a.y,l+e._radius_,e._start_,e._start_+2*e._rose_proportion_*Math.PI),i.closePath(),i.fill()),i.beginPath(),i.setLineWidth(o.borderWidth*t.pix),i.lineJoin="round",i.setStrokeStyle(o.borderColor);var r,s=e.color;"custom"==o.linearType&&(r=i.createCircularGradient?i.createCircularGradient(a.x,a.y,e._radius_):i.createRadialGradient(a.x,a.y,0,a.x,a.y,e._radius_),r.addColorStop(0,f(o.customColor[e.linearIndex],1)),r.addColorStop(1,f(e.color,1)),s=r);i.setFillStyle(s),i.moveTo(a.x,a.y),i.arc(a.x,a.y,e._radius_,e._start_,e._start_+2*e._rose_proportion_*Math.PI),i.closePath(),i.fill(),1==o.border&&i.stroke()})),!1!==t.dataLabel&&1===r&&Fe(e,t,n,i,s,a),{center:a,radius:s,series:e}}function et(e,t,n,i){var r,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=u({},{startAngle:.75,endAngle:.25,type:"default",lineCap:"round",width:12,gap:2,linearType:"none",customColor:[]},t.extra.arcbar);e=ne(e,s,a),r=s.centerX||s.centerY?{x:s.centerX?s.centerX:t.width/2,y:s.centerY?s.centerY:t.height/2}:{x:t.width/2,y:t.height/2},s.radius?o=s.radius:(o=Math.min(r.x,r.y),o-=5*t.pix,o-=s.width/2),o=o<10?10:o,s.customColor=w(s.linearType,s.customColor,e,n);for(var c=0;c5&&void 0!==arguments[5]?arguments[5]:1,a=u({},{type:"default",startAngle:.75,endAngle:.25,width:15,labelOffset:13,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},n.extra.gauge);void 0==a.oldAngle&&(a.oldAngle=a.startAngle),void 0==a.oldData&&(a.oldData=0),e=re(e,a.startAngle,a.endAngle);var s={x:n.width/2,y:n.height/2},c=Math.min(s.x,s.y);c-=5*n.pix,c-=a.width/2,c=c<10?10:c;var l=c-a.width,d=0;if("progress"==a.type){var h=c-3*a.width;r.beginPath();var p=r.createLinearGradient(s.x,s.y-h,s.x,s.y+h);p.addColorStop("0",f(t[0].color,.3)),p.addColorStop("1.0",f("#FFFFFF",.1)),r.setFillStyle(p),r.arc(s.x,s.y,h,0,2*Math.PI,!1),r.fill(),r.setLineWidth(a.width),r.setStrokeStyle(f(t[0].color,.3)),r.setLineCap("round"),r.beginPath(),r.arc(s.x,s.y,l,a.startAngle*Math.PI,a.endAngle*Math.PI,!1),r.stroke(),d=a.startAngle-a.endAngle+1;a.splitLine.splitNumber;var g=d/a.splitLine.splitNumber/a.splitLine.childNumber,v=-c-.5*a.width-a.splitLine.fixRadius,y=-c-a.width-a.splitLine.fixRadius+a.splitLine.width;r.save(),r.translate(s.x,s.y),r.rotate((a.startAngle-1)*Math.PI);for(var m=a.splitLine.splitNumber*a.splitLine.childNumber+1,x=t[0].data*o,A=0;AA/m?r.setStrokeStyle(f(t[0].color,1)):r.setStrokeStyle(f(t[0].color,.3)),r.setLineWidth(3*n.pix),r.moveTo(v,0),r.lineTo(y,0),r.stroke(),r.rotate(g*Math.PI);r.restore(),t=ie(t,a,o),r.setLineWidth(a.width),r.setStrokeStyle(t[0].color),r.setLineCap("round"),r.beginPath(),r.arc(s.x,s.y,l,a.startAngle*Math.PI,t[0]._proportion_*Math.PI,!1),r.stroke();var b=c-2.5*a.width;r.save(),r.translate(s.x,s.y),r.rotate((t[0]._proportion_-1)*Math.PI),r.beginPath(),r.setLineWidth(a.width/3);var w=r.createLinearGradient(0,.6*-b,0,.6*b);w.addColorStop("0",f("#FFFFFF",0)),w.addColorStop("0.5",f(t[0].color,1)),w.addColorStop("1.0",f("#FFFFFF",0)),r.setStrokeStyle(w),r.arc(0,0,b,.85*Math.PI,1.15*Math.PI,!1),r.stroke(),r.beginPath(),r.setLineWidth(1),r.setStrokeStyle(t[0].color),r.setFillStyle(t[0].color),r.moveTo(-b-a.width/3/2,-4),r.lineTo(-b-a.width/3/2-4,0),r.lineTo(-b-a.width/3/2,4),r.lineTo(-b-a.width/3/2,-4),r.stroke(),r.fill(),r.restore()}else{r.setLineWidth(a.width),r.setLineCap("butt");for(var k=0;k4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{gridColor:"#cccccc",gridType:"radar",gridEval:1,axisLabel:!1,axisLabelTofix:0,labelColor:"#666666",labelPointShow:!1,labelPointRadius:3,labelPointColor:"#cccccc",opacity:.2,gridCount:3,border:!1,borderWidth:2,linearType:"none",customColor:[]},t.extra.radar),a=E(t.categories.length),s={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.area[0]+(t.height-t.area[0]-t.area[2])/2},c=(t.width-t.area[1]-t.area[3])/2,l=(t.height-t.area[0]-t.area[2])/2,d=Math.min(c-(C(t.categories,n.fontSize,i)+n.radarLabelTextMargin),l-n.radarLabelTextMargin);d-=n.radarLabelTextMargin*t.pix,d=d<10?10:d,i.beginPath(),i.setLineWidth(1*t.pix),i.setStrokeStyle(o.gridColor),a.forEach((function(e,t){var n=m(d*Math.cos(e),d*Math.sin(e),s);i.moveTo(s.x,s.y),t%o.gridEval==0&&i.lineTo(n.x,n.y)})),i.stroke(),i.closePath();for(var h=function(e){var n={};if(i.beginPath(),i.setLineWidth(1*t.pix),i.setStrokeStyle(o.gridColor),"radar"==o.gridType)a.forEach((function(t,r){var a=m(d/o.gridCount*e*Math.cos(t),d/o.gridCount*e*Math.sin(t),s);0===r?(n=a,i.moveTo(a.x,a.y)):i.lineTo(a.x,a.y)})),i.lineTo(n.x,n.y);else{var r=m(d/o.gridCount*e*Math.cos(1.5),d/o.gridCount*e*Math.sin(1.5),s);i.arc(s.x,s.y,s.y-r.y,0,2*Math.PI,!1)}i.stroke(),i.closePath()},p=1;p<=o.gridCount;p++)h(p);o.customColor=w(o.linearType,o.customColor,e,n);var g=Y(a,s,d,e,t,r);if(g.forEach((function(n,r){i.beginPath(),i.setLineWidth(o.borderWidth*t.pix),i.setStrokeStyle(n.color);var a,c=f(n.color,o.opacity);"custom"==o.linearType&&(a=i.createCircularGradient?i.createCircularGradient(s.x,s.y,d):i.createRadialGradient(s.x,s.y,0,s.x,s.y,d),a.addColorStop(0,f(o.customColor[e[r].linearIndex],o.opacity)),a.addColorStop(1,f(n.color,o.opacity)),c=a);if(i.setFillStyle(c),n.data.forEach((function(e,t){0===t?i.moveTo(e.position.x,e.position.y):i.lineTo(e.position.x,e.position.y)})),i.closePath(),i.fill(),!0===o.border&&i.stroke(),i.closePath(),!1!==t.dataPointShape){var l=n.data.map((function(e){return e.position}));Se(l,n.color,n.pointShape,i,t)}})),!0===o.axisLabel){var v=Math.max(o.max,Math.max.apply(null,T(e))),y=d/o.gridCount,x=t.fontSize*t.pix;i.setFontSize(x),i.setFillStyle(t.fontColor),i.setTextAlign("left");for(p=0;pl.x?n.xMax:l.x,n.yMin=n.yMinl.y?n.yMax:l.y}}return n}function ot(e,t,n,i,r,o){return{x:(t-n.xMin)*i+r,y:(n.yMax-e)*i+o}}function at(e,t,n,i,r,o){return{x:(t-r)/i+n.xMin,y:n.yMax-(e-o)/i}}function st(e,t,n){if(t[1]==n[1])return!1;if(t[1]>e[1]&&n[1]>e[1])return!1;if(t[1]e[1])return!1;if(n[1]==e[1]&&t[1]>e[1])return!1;if(t[0]t[o].area[2]||e[1]>t[o].area[3]||e[2]n||e[3]>i){r=!0;break}r=!1}return r}function ft(e,t,n){var i=e.series;switch(t){case"normal":for(var r=0;r.7},p=0;p4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"normal",autoColors:!0},t.extra.word);t.chartData.wordCloudData||(t.chartData.wordCloudData=ft(t,o.type,i)),i.beginPath(),i.setFillStyle(t.background),i.rect(0,0,t.width,t.height),i.fill(),i.save();var a=t.chartData.wordCloudData;i.translate(t.width/2,t.height/2);for(var s=0;s0&&(t.tooltip&&t.tooltip.index==s?i.strokeText(c,(a[s].areav[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].areav[1]+5+l-t.height/2)*r):i.fillText(c,(a[s].areav[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].areav[1]+5+l-t.height/2)*r)):a[s].area[0]>0&&(t.tooltip&&t.tooltip.index==s?i.strokeText(c,(a[s].area[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].area[1]+5+l-t.height/2)*r):i.fillText(c,(a[s].area[0]+5-t.width/2)*r-d*(1-r)/2,(a[s].area[1]+5+l-t.height/2)*r)),i.stroke(),i.restore()}i.restore()}function pt(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=u({},{type:"funnel",activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right",linearType:"none",customColor:[]},t.extra.funnel),a=(t.height-t.area[0]-t.area[2])/e.length,s={x:t.area[3]+(t.width-t.area[1]-t.area[3])/2,y:t.height-t.area[2]},c=o.activeWidth*t.pix,l=Math.min((t.width-t.area[1]-t.area[3])/2-c,(t.height-t.area[0]-t.area[2])/2-c);if(e=ee(e,l,o.type,a,r),i.save(),i.translate(s.x,s.y),o.customColor=w(o.linearType,o.customColor,e,n),"pyramid"==o.type)for(var d=0;d0?m[T].width+t.yAxis.padding*t.pix:m[T].width,S+=1):"right"==m[T].position&&(t.area[1]+=k>0?m[T].width+t.yAxis.padding*t.pix:m[T].width,k+=1)}else n.yAxisWidth=m;if(t.chartData.yAxisData=y,t.categories&&t.categories.length&&"radar"!==t.type&&"gauge"!==t.type&&"bar"!==t.type){t.chartData.xAxisData=fe(t.categories,t,n);var O=X(t.categories,t,n,t.chartData.xAxisData.eachSpacing,i),_=O.xAxisHeight,P=O.angle;n.xAxisHeight=_,n._xAxisTextAngle_=P,t.area[2]+=_,t.chartData.categoriesData=O}else if("line"===t.type||"area"===t.type||"scatter"===t.type||"bubble"===t.type||"bar"===t.type){t.chartData.xAxisData=Q(o,t,n,i),a=t.chartData.xAxisData.rangesFormat;var C=X(a,t,n,t.chartData.xAxisData.eachSpacing,i),E=C.xAxisHeight,F=C.angle;n.xAxisHeight=E,n._xAxisTextAngle_=F,t.area[2]+=E,t.chartData.categoriesData=C}else t.chartData.xAxisData={xAxisPoints:[]};if(t.enableScroll&&"right"==t.xAxis.scrollAlign&&void 0===t._scrollDistance_){var I=0,L=t.chartData.xAxisData.xAxisPoints,M=t.chartData.xAxisData.startX,R=t.chartData.xAxisData.endX,K=t.chartData.xAxisData.eachSpacing,j=K*(L.length-1),z=R-M;I=z-j,r.scrollOption.currentOffset=I,r.scrollOption.startTouchX=I,r.scrollOption.distance=0,r.scrollOption.lastMoveTime=0,t._scrollDistance_=I}switch("pie"!==e&&"ring"!==e&&"rose"!==e||(n._pieTextMaxLength_=!1===t.dataLabel?0:ae(l,n,i,t)),e){case"word":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),ht(o,t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"map":i.clearRect(0,0,t.width,t.height),lt(o,t,n,i);break;case"funnel":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.funnelData=pt(o,t,n,i,e),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"line":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=Ze(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"scatter":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=We(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"bubble":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=He(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"mix":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=Ve(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"column":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=je(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"mount":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=ze(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"bar":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Je(a,t,n,i);var r=Ue(o,t,n,i,e),s=r.yAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.yAxisPoints=s,t.chartData.xAxisPoints=t.chartData.xAxisData.xAxisPoints,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"area":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=Ne(o,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,l=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=l,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e,l,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"ring":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.pieData=Ye(o,t,n,i,e),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"pie":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.pieData=Ye(o,t,n,i,e),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"rose":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.pieData=$e(o,t,n,i,e),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"radar":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.radarData=nt(o,t,n,i,e),Qe(t.series,t,n,i,t.chartData),qe(t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.arcbarData=et(o,t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),t.chartData.gaugeData=tt(a,o,t,n,i,e),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break;case"candle":this.animationInstance=new mt({timing:t.timing,duration:c,onProcess:function(e){i.clearRect(0,0,t.width,t.height),t.rotate&&ke(i,t),Xe(a,t,n,i),Je(a,t,n,i);var r=Be(o,l,t,n,i,e),s=r.xAxisPoints,c=r.calPoints,u=r.eachSpacing;t.chartData.xAxisPoints=s,t.chartData.calPoints=c,t.chartData.eachSpacing=u,Ge(o,t,n,i),!1!==t.enableMarkLine&&1===e&&Le(t,n,i),Qe(l||t.series,t,n,i,t.chartData),qe(t,n,i,e,u,s),vt(t,i)},onAnimationFinish:function(){r.uevent.trigger("renderComplete")}});break}}function At(){this.events={}}mt.prototype.stop=function(){this.isStop=!0},At.prototype.addEventListener=function(e,t){this.events[e]=this.events[e]||[],this.events[e].push(t)},At.prototype.delEventListener=function(e){this.events[e]=[]},At.prototype.trigger=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.opts=u({},this.opts,e),this.opts.updateData=!0;var t=e.scrollPosition||"current";switch(t){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":var n=Ae(this.opts.series,this.opts,this.config,this.context),i=n.yAxisWidth;this.config.yAxisWidth=i;var r=0,o=fe(this.opts.categories,this.opts,this.config),a=o.xAxisPoints,s=o.startX,c=o.endX,l=o.eachSpacing,d=l*(a.length-1),f=c-s;r=f-d,this.scrollOption={currentOffset:r,startTouchX:r,distance:0,lastMoveTime:0},this.opts._scrollDistance_=r;break}xt.call(this,this.opts.type,this.opts,this.config,this.context)},bt.prototype.zoom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var t=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=e.itemCount;var n=Ae(this.opts.series,this.opts,this.config,this.context),i=n.yAxisWidth;this.config.yAxisWidth=i;var r=0,o=fe(this.opts.categories,this.opts,this.config),a=o.xAxisPoints,s=o.startX,c=o.endX,l=o.eachSpacing,u=l*t,d=c-s,f=d-l*(a.length-1);r=d/2-u,r>0&&(r=0),r=this.opts.categories.length?this.opts.categories.length:d,this.opts.animation=!1,this.opts.xAxis.itemCount=d;var f=0,h=fe(this.opts.categories,this.opts,this.config),p=h.xAxisPoints,v=h.startX,y=h.endX,m=h.eachSpacing,x=m*this.scrollOption.moveCurrent1,A=y-v,b=A-m*(p.length-1);f=-x+Math.min(i[0].x,i[1].x)-this.opts.area[3]-m,f>0&&(f=0),f1&&void 0!==arguments[1]?arguments[1]:{},n=null;if(n=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],n){_(n,this.opts,e);var i=this.getLegendDataIndex(e);i>=0&&("candle"==this.opts.type?this.opts.seriesMA[i].show=!this.opts.seriesMA[i].show:this.opts.series[i].show=!this.opts.series[i].show,this.opts.animation=!!t.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,xt.call(this,this.opts.type,this.opts,this.config,this.context))}},bt.prototype.showToolTip=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null;i=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0],i||console.log("[uCharts] 未获取到event坐标信息");var r=_(i,this.opts,e),o=this.scrollOption.currentOffset,a=u({},this.opts,{_scrollDistance_:o,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type||"scatter"===this.opts.type||"bubble"===this.opts.type){var s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1||c.length>0){var l=P(this.opts.series,c,s.group);if(0!==l.length){var d=F(l,this.opts,c,s.group,this.opts.categories,n),f=d.textList,h=d.offset;h.y=r.y,a.tooltip={textList:void 0!==n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("mount"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e).index:n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},a._series_[c]),f=[{text:n.formatter?n.formatter(l,void 0,c,a):l.name+": "+l.data,color:l.color}],h={x:a.chartData.calPoints[c].x,y:r.y};a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}xt.call(this,a.type,a,this.config,this.context)}if("bar"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1||c.length>0){l=P(this.opts.series,c,s.group);if(0!==l.length){d=F(l,this.opts,c,s.group,this.opts.categories,n),f=d.textList,h=d.offset;h.x=r.x,a.tooltip={textList:void 0!==n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("mix"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1){o=this.scrollOption.currentOffset,a=u({},this.opts,{_scrollDistance_:o,animation:!1}),l=P(this.opts.series,c);if(0!==l.length){var p=I(l,this.opts,c,this.opts.categories,n);f=p.textList,h=p.offset;h.y=r.y,a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("candle"===this.opts.type){s=this.getCurrentDataIndex(e),c=void 0==n.index?s.index:n.index;if(c>-1){o=this.scrollOption.currentOffset,a=u({},this.opts,{_scrollDistance_:o,animation:!1}),l=P(this.opts.series,c);if(0!==l.length){d=L(this.opts.series[0].data,l,this.opts,c,this.opts.categories,this.opts.extra.candle,n),f=d.textList,h=d.offset;h.y=r.y,a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},a._series_[c]),f=[{text:n.formatter?n.formatter(l,void 0,c,a):l.name+": "+l.data,color:l.color}],h={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}xt.call(this,a.type,a,this.config,this.context)}if("map"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},this.opts.series[c]);l.name=l.properties.name;f=[{text:n.formatter?n.formatter(l,void 0,c,this.opts):l.name,color:l.color}],h={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}a.updateData=!1,xt.call(this,a.type,a,this.config,this.context)}if("word"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=u({},this.opts.series[c]),f=[{text:n.formatter?n.formatter(l,void 0,c,this.opts):l.name,color:l.color}],h={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}a.updateData=!1,xt.call(this,a.type,a,this.config,this.context)}if("radar"===this.opts.type){c=void 0==n.index?this.getCurrentDataIndex(e):n.index;if(c>-1){a=u({},this.opts,{animation:!1}),l=P(this.opts.series,c);if(0!==l.length){f=l.map((function(e){return{text:n.formatter?n.formatter(e,t.opts.categories[c],c,t.opts):e.name+": "+e.data,color:e.color}})),h={x:r.x,y:r.y};a.tooltip={textList:n.textList?n.textList:f,offset:void 0!==n.offset?n.offset:h,option:n,index:c}}}xt.call(this,a.type,a,this.config,this.context)}},bt.prototype.translate=function(e){this.scrollOption={currentOffset:e,startTouchX:e,distance:0,lastMoveTime:0};var t=u({},this.opts,{_scrollDistance_:e,animation:!1});xt.call(this,this.opts.type,t,this.config,this.context)},bt.prototype.scrollStart=function(e){var t=null;t=e.changedTouches?e.changedTouches[0]:e.mp.changedTouches[0];var n=_(t,this.opts,e);t&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=n.x)},bt.prototype.scroll=function(e){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var t=this.opts.touchMoveLimit||60,n=Date.now(),i=n-this.scrollOption.lastMoveTime;if(!(ie.length)&&(t=e.length);for(var n=0,i=new Array(t);n-1},e.prototype.uniIDHasPermission=function(e){var t=k(),n=t.permission;return this.uniIDHasRole("admin")||n.indexOf(e)>-1},e.prototype.uniIDTokenValid=function(){var e=k(),t=e.tokenExpired;return t>Date.now()}}i="function"!==typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!b.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,i,r="",o=0;o>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}:atob;var T=Object.prototype.toString,O=Object.prototype.hasOwnProperty;function _(e){return"function"===typeof e}function P(e){return"string"===typeof e}function C(e){return"[object Object]"===T.call(e)}function E(e,t){return O.call(e,t)}function F(){}function I(e){var t=Object.create(null);return function(n){var i=t[n];return i||(t[n]=e(n))}}var L=/-(\w)/g,D=I((function(e){return e.replace(L,(function(e,t){return t?t.toUpperCase():""}))}));function M(e){var t={};return C(e)&&Object.keys(e).sort().forEach((function(n){t[n]=e[n]})),Object.keys(t)?t:e}var R=["invoke","success","fail","complete","returnValue"],K={},j={};function z(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?U(n):n}function U(e){for(var t=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return["success","fail","complete"].forEach((function(n){if(Array.isArray(e[n])){var i=t[n];t[n]=function(t){J(e[n],t).then((function(e){return _(i)&&i(e)||e}))}}})),t}function G(e,t){var n=[];Array.isArray(K.returnValue)&&n.push.apply(n,p(K.returnValue));var i=j[e];return i&&Array.isArray(i.returnValue)&&n.push.apply(n,p(i.returnValue)),n.forEach((function(e){t=e(t)||t})),t}function Q(e){var t=Object.create(null);Object.keys(K).forEach((function(e){"returnValue"!==e&&(t[e]=K[e].slice())}));var n=j[e];return n&&Object.keys(n).forEach((function(e){"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Y(e,t,n){for(var i=arguments.length,r=new Array(i>3?i-3:0),o=3;o0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length,r=new Array(i>1?i-1:0),o=1;o-1?xe:e.indexOf("-hant")>-1||Ee(e,["-tw","-hk","-mo","-cht"])?Ae:xe;var n=Fe(e,[be,we,ke]);return n||void 0}}function Le(){var e=getApp({allowDefault:!0});return e&&e.$vm?e.$vm.$locale:Ie(wx.getSystemInfoSync().language)||be}function De(e){var t=getApp();if(!t)return!1;var n=t.$vm.$locale;return n!==e&&(t.$vm.$locale=e,Me.forEach((function(t){return t({locale:e})})),!0)}var Me=[];function Re(e){-1===Me.indexOf(e)&&Me.push(e)}"undefined"!==typeof e&&(e.getLocale=Le);var Ke={promiseInterceptor:$},je=Object.freeze({__proto__:null,upx2px:ye,getLocale:Le,setLocale:De,onLocaleChange:Re,addInterceptor:H,removeInterceptor:Z,interceptors:Ke});function ze(e){var t=getCurrentPages(),n=t.length;while(n--){var i=t[n];if(i.$page&&i.$page.fullPath===e)return n}return-1}var Ue,Be={name:function(e){return"back"===e.exists&&e.delta?"navigateBack":"redirectTo"},args:function(e){if("back"===e.exists&&e.url){var t=ze(e.url);if(-1!==t){var n=getCurrentPages().length-1-t;n>0&&(e.delta=n)}}}},Ne={args:function(e){var t=parseInt(e.current);if(!isNaN(t)){var n=e.urls;if(Array.isArray(n)){var i=n.length;if(i)return t<0?t=0:t>=i&&(t=i-1),t>0?(e.current=n[t],e.urls=n.filter((function(e,i){return!(i2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(C(t)){var o=!0===r?t:{};for(var a in _(n)&&(n=n(t,o)||{}),t)if(E(n,a)){var s=n[a];_(s)&&(s=s(t[a],t,o)),s?P(s)?o[s]=t[a]:C(s)&&(o[s.name?s.name:a]=s.value):console.warn("The '".concat(e,"' method of platform '微信小程序' does not support option '").concat(a,"'"))}else-1!==at.indexOf(a)?_(t[a])&&(o[a]=st(e,t[a],i)):r||(o[a]=t[a]);return o}return _(t)&&(t=st(e,t,i)),t}function lt(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return _(it.returnValue)&&(t=it.returnValue(e,t)),ct(e,t,n,{},i)}function ut(e,t){if(E(it,e)){var n=it[e];return n?function(t,i){var r=n;_(n)&&(r=n(t)),t=ct(e,t,r.args,r.returnValue);var o=[t];"undefined"!==typeof i&&o.push(i),_(r.name)?e=r.name(t):P(r.name)&&(e=r.name);var a=wx[e].apply(wx,o);return ae(e)?lt(e,a,r.returnValue,oe(e)):a}:function(){console.error("Platform '微信小程序' does not support '".concat(e,"'."))}}return t}var dt=Object.create(null),ft=["onTabBarMidButtonTap","subscribePush","unsubscribePush","onPush","offPush","share"];function ht(e){return function(t){var n=t.fail,i=t.complete,r={errMsg:"".concat(e,":fail method '").concat(e,"' not supported")};_(n)&&n(r),_(i)&&i(r)}}ft.forEach((function(e){dt[e]=ht(e)}));var pt={oauth:["weixin"],share:["weixin"],payment:["wxpay"],push:["weixin"]};function gt(e){var t=e.service,n=e.success,i=e.fail,r=e.complete,o=!1;pt[t]?(o={errMsg:"getProvider:ok",service:t,provider:pt[t]},_(n)&&n(o)):(o={errMsg:"getProvider:fail service not found"},_(i)&&i(o)),_(r)&&r(o)}var vt=Object.freeze({__proto__:null,getProvider:gt}),yt=function(){var e;return function(){return e||(e=new o.default),e}}();function mt(e,t,n){return e[t].apply(e,n)}function xt(){return mt(yt(),"$on",Array.prototype.slice.call(arguments))}function At(){return mt(yt(),"$off",Array.prototype.slice.call(arguments))}function bt(){return mt(yt(),"$once",Array.prototype.slice.call(arguments))}function wt(){return mt(yt(),"$emit",Array.prototype.slice.call(arguments))}var kt,St,Tt,Ot=Object.freeze({__proto__:null,$on:xt,$off:At,$once:bt,$emit:wt});function _t(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}function Pt(e){var t={};for(var n in e){var i=e[n];_(i)&&(t[n]=_t(i),delete e[n])}return t}function Ct(e){try{return JSON.parse(e)}catch(t){}return e}function Et(e){if("enabled"===e.type)Tt=!0;else if("clientId"===e.type)kt=e.cid,St=e.errMsg,It(kt,e.errMsg);else if("pushMsg"===e.type)for(var t={type:"receive",data:Ct(e.message)},n=0;n-1&&Dt.splice(t,1)}else Dt.length=0},Kt=Object.freeze({__proto__:null,getPushClientId:Lt,onPushMessage:Mt,offPushMessage:Rt,invokePushCallback:Et}),jt=Page,zt=Component,Ut=/:/g,Bt=I((function(e){return D(e.replace(Ut,"-"))}));function Nt(e){var t=e.triggerEvent,n=function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return Wt("onLoad",e),jt(e)},Page.after=jt.after,Component=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Wt("created",e),zt(e)});var Ht=["onPullDownRefresh","onReachBottom","onAddToFavorites","onShareTimeline","onShareAppMessage","onPageScroll","onResize","onTabItemTap"];function Zt(e,t){var n=e.$mp[e.mpType];t.forEach((function(t){E(n,t)&&(e[t]=n[t])}))}function Vt(e,t){if(!t)return!0;if(o.default.options&&Array.isArray(o.default.options[e]))return!0;if(t=t.default||t,_(t))return!!_(t.extendOptions[e])||!!(t.super&&t.super.options&&Array.isArray(t.super.options[e]));if(_(t[e]))return!0;var n=t.mixins;return Array.isArray(n)?!!n.find((function(t){return Vt(e,t)})):void 0}function qt(e,t,n){t.forEach((function(t){Vt(t,n)&&(e[t]=function(e){return this.$vm&&this.$vm.__call_hook(t,e)})}))}function Jt(e,t){var n;return t=t.default||t,n=_(t)?t:e.extend(t),t=n.options,[n,t]}function Xt(e,t){if(Array.isArray(t)&&t.length){var n=Object.create(null);t.forEach((function(e){n[e]=!0})),e.$scopedSlots=e.$slots=n}}function Gt(e,t){e=(e||"").split(",");var n=e.length;1===n?t._$vueId=e[0]:2===n&&(t._$vueId=e[0],t._$vuePid=e[1])}function Qt(e,t){var n=e.data||{},i=e.methods||{};if("function"===typeof n)try{n=n.call(t)}catch(r){Object({VUE_APP_NAME:"Jinan_app",VUE_APP_PLATFORM:"mp-weixin",NODE_ENV:"development",BASE_URL:"/"}).VUE_APP_DEBUG&&console.warn("根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。",n)}else try{n=JSON.parse(JSON.stringify(n))}catch(r){}return C(n)||(n={}),Object.keys(i).forEach((function(e){-1!==t.__lifecycle_hooks__.indexOf(e)||E(n,e)||(n[e]=i[e])})),n}var Yt=[String,Number,Boolean,Object,Array,null];function $t(e){return function(t,n){this.$vm&&(this.$vm[e]=t)}}function en(e,t){var n=e.behaviors,i=e.extends,r=e.mixins,o=e.props;o||(e.props=o=[]);var a=[];return Array.isArray(n)&&n.forEach((function(e){a.push(e.replace("uni://","wx".concat("://"))),"uni://form-field"===e&&(Array.isArray(o)?(o.push("name"),o.push("value")):(o.name={type:String,default:""},o.value={type:[String,Number,Boolean,Array,Object,Date],default:""}))})),C(i)&&i.props&&a.push(t({properties:nn(i.props,!0)})),Array.isArray(r)&&r.forEach((function(e){C(e)&&e.props&&a.push(t({properties:nn(e.props,!0)}))})),a}function tn(e,t,n,i){return Array.isArray(t)&&1===t.length?t[0]:t}function nn(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>3?arguments[3]:void 0,i={};return t||(i.vueId={type:String,value:""},n.virtualHost&&(i.virtualHostStyle={type:null,value:""},i.virtualHostClass={type:null,value:""}),i.scopedSlotsCompiler={type:String,value:""},i.vueSlots={type:null,value:[],observer:function(e,t){var n=Object.create(null);e.forEach((function(e){n[e]=!0})),this.setData({$slots:n})}}),Array.isArray(e)?e.forEach((function(e){i[e]={type:null,observer:$t(e)}})):C(e)&&Object.keys(e).forEach((function(t){var n=e[t];if(C(n)){var r=n.default;_(r)&&(r=r()),n.type=tn(t,n.type),i[t]={type:-1!==Yt.indexOf(n.type)?n.type:null,value:r,observer:$t(t)}}else{var o=tn(t,n);i[t]={type:-1!==Yt.indexOf(o)?o:null,observer:$t(t)}}})),i}function rn(e){try{e.mp=JSON.parse(JSON.stringify(e))}catch(t){}return e.stopPropagation=F,e.preventDefault=F,e.target=e.target||{},E(e,"detail")||(e.detail={}),E(e,"markerId")&&(e.detail="object"===typeof e.detail?e.detail:{},e.detail.markerId=e.markerId),C(e.detail)&&(e.target=Object.assign({},e.target,e.detail)),e}function on(e,t){var n=e;return t.forEach((function(t){var i=t[0],r=t[2];if(i||"undefined"!==typeof r){var o,a=t[1],s=t[3];Number.isInteger(i)?o=i:i?"string"===typeof i&&i&&(o=0===i.indexOf("#s#")?i.substr(3):e.__get_value(i,n)):o=n,Number.isInteger(o)?n=r:a?Array.isArray(o)?n=o.find((function(t){return e.__get_value(a,t)===r})):C(o)?n=Object.keys(o).find((function(t){return e.__get_value(a,o[t])===r})):console.error("v-for 暂不支持循环数据:",o):n=o[r],s&&(n=e.__get_value(s,n))}})),n}function an(e,t,n){var i={};return Array.isArray(t)&&t.length&&t.forEach((function(t,r){"string"===typeof t?t?"$event"===t?i["$"+r]=n:"arguments"===t?n.detail&&n.detail.__args__?i["$"+r]=n.detail.__args__:i["$"+r]=[n]:0===t.indexOf("$event.")?i["$"+r]=e.__get_value(t.replace("$event.",""),n):i["$"+r]=e.__get_value(t):i["$"+r]=e:i["$"+r]=on(e,t)})),i}function sn(e){for(var t={},n=1;n2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=!1;if(r&&(a=t.currentTarget&&t.currentTarget.dataset&&"wx"===t.currentTarget.dataset.comType,!n.length))return a?[t]:t.detail.__args__||t.detail;var s=an(e,i,t),c=[];return n.forEach((function(e){"$event"===e?"__set_model"!==o||r?r&&!a?c.push(t.detail.__args__[0]):c.push(t):c.push(t.target.value):Array.isArray(e)&&"o"===e[0]?c.push(sn(e)):"string"===typeof e&&E(s,e)?c.push(s[e]):c.push(e)})),c}var ln="~",un="^";function dn(e,t){return e===t||"regionchange"===t&&("begin"===e||"end"===e)}function fn(e){var t=e.$parent;while(t&&t.$parent&&(t.$options.generic||t.$parent.$options.generic||t.$scope._$vuePid))t=t.$parent;return t&&t.$parent}function hn(e){var t=this;e=rn(e);var n=(e.currentTarget||e.target).dataset;if(!n)return console.warn("事件信息不存在");var i=n.eventOpts||n["event-opts"];if(!i)return console.warn("事件信息不存在");var r=e.type,o=[];return i.forEach((function(n){var i=n[0],a=n[1],s=i.charAt(0)===un;i=s?i.slice(1):i;var c=i.charAt(0)===ln;i=c?i.slice(1):i,a&&dn(r,i)&&a.forEach((function(n){var i=n[0];if(i){var r=t.$vm;if(r.$options.generic&&(r=fn(r)||r),"$emit"===i)return void r.$emit.apply(r,cn(t.$vm,e,n[1],n[2],s,i));var a=r[i];if(!_(a)){var l="page"===t.$vm.mpType?"Page":"Component",u=t.route||t.is;throw new Error("".concat(l,' "').concat(u,'" does not have a method "').concat(i,'"'))}if(c){if(a.once)return;a.once=!0}var d=cn(t.$vm,e,n[1],n[2],s,i);d=Array.isArray(d)?d:[],/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(a.toString())&&(d=d.concat([,,,,,,,,,,e])),o.push(a.apply(r,d))}}))})),"input"===r&&1===o.length&&"undefined"!==typeof o[0]?o[0]:void 0}var pn={},gn=[];function vn(e){if(e){var t=pn[e];return delete pn[e],t}return gn.shift()}var yn=["onShow","onHide","onError","onPageNotFound","onThemeChange","onUnhandledRejection"];function mn(){o.default.prototype.getOpenerEventChannel=function(){return this.$scope.getOpenerEventChannel()};var e=o.default.prototype.__call_hook;o.default.prototype.__call_hook=function(t,n){return"onLoad"===t&&n&&n.__id__&&(this.__eventChannel__=vn(n.__id__),delete n.__id__),e.call(this,t,n)}}function xn(){var e={},t={};o.default.prototype.$hasScopedSlotsParams=function(n){var i=e[n];return i||(t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))),i},o.default.prototype.$getScopedSlotsParams=function(n,i,r){var o=e[n];if(o){var a=o[i]||{};return r?a[r]:a}t[n]=this,this.$on("hook:destroyed",(function(){delete t[n]}))},o.default.prototype.$setScopedSlotsParams=function(n,i){var r=this.$options.propsData.vueId;if(r){var o=r.split(",")[0],a=e[o]=e[o]||{};a[n]=i,t[o]&&t[o].$forceUpdate()}},o.default.mixin({destroyed:function(){var n=this.$options.propsData,i=n&&n.vueId;i&&(delete e[i],delete t[i])}})}function An(e,t){var n=t.mocks,i=t.initRefs;mn(),xn(),e.$options.store&&(o.default.prototype.$store=e.$options.store),S(o.default),o.default.prototype.mpHost="mp-weixin",o.default.mixin({beforeCreate:function(){if(this.$options.mpType){if(this.mpType=this.$options.mpType,this.$mp=h({data:{}},this.mpType,this.$options.mpInstance),this.$scope=this.$options.mpInstance,delete this.$options.mpType,delete this.$options.mpInstance,"page"===this.mpType&&"function"===typeof getApp){var e=getApp();e.$vm&&e.$vm.$i18n&&(this._i18n=e.$vm.$i18n)}"app"!==this.mpType&&(i(this),Zt(this,n))}}});var r={onLaunch:function(t){this.$vm||(wx.canIUse&&!wx.canIUse("nextTick")&&console.error("当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上"),this.$vm=e,this.$vm.$mp={app:this},this.$vm.$scope=this,this.$vm.globalData=this.globalData,this.$vm._isMounted=!0,this.$vm.__call_hook("mounted",t),this.$vm.__call_hook("onLaunch",t))}};r.globalData=e.$options.globalData||{};var a=e.$options.methods;return a&&Object.keys(a).forEach((function(e){r[e]=a[e]})),Pe(o.default,e,Ie(wx.getSystemInfoSync().language)||be),qt(r,yn),r}var bn=["__route__","__wxExparserNodeId__","__wxWebviewId__"];function wn(e,t){for(var n,i=e.$children,r=i.length-1;r>=0;r--){var o=i[r];if(o.$scope._$vueId===t)return o}for(var a=i.length-1;a>=0;a--)if(n=wn(i[a],t),n)return n}function kn(e){return Behavior(e)}function Sn(){return!!this.route}function Tn(e){this.triggerEvent("__l",e)}function On(e,t,n){var i=e.selectAllComponents(t);i.forEach((function(e){var i=e.dataset.ref;n[i]=e.$vm||e,"scoped"===e.dataset.vueGeneric&&e.selectAllComponents(".scoped-ref").forEach((function(e){On(e,t,n)}))}))}function _n(e){var t=e.$scope;Object.defineProperty(e,"$refs",{get:function(){var e={};On(t,".vue-ref",e);var n=t.selectAllComponents(".vue-ref-in-for");return n.forEach((function(t){var n=t.dataset.ref;e[n]||(e[n]=[]),e[n].push(t.$vm||t)})),e}})}function Pn(e){var t,n=e.detail||e.value,i=n.vuePid,r=n.vueOptions;i&&(t=wn(this.$vm,i)),t||(t=this.$vm),r.parent=t}function Cn(e){return An(e,{mocks:bn,initRefs:_n})}function En(e){return App(Cn(e)),e}var Fn=/[!'()*]/g,In=function(e){return"%"+e.charCodeAt(0).toString(16)},Ln=/%2C/g,Dn=function(e){return encodeURIComponent(e).replace(Fn,In).replace(Ln,",")};function Mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dn,n=e?Object.keys(e).map((function(n){var i=e[n];if(void 0===i)return"";if(null===i)return t(n);if(Array.isArray(i)){var r=[];return i.forEach((function(e){void 0!==e&&(null===e?r.push(t(n)):r.push(t(n)+"="+t(e)))})),r.join("&")}return t(n)+"="+t(i)})).filter((function(e){return e.length>0})).join("&"):null;return n?"?".concat(n):""}function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isPage,i=t.initRelation,r=Jt(o.default,e),a=l(r,2),s=a[0],u=a[1],d=c({multipleSlots:!0,addGlobalClass:!0},u.options||{});u["mp-weixin"]&&u["mp-weixin"].options&&Object.assign(d,u["mp-weixin"].options);var f={options:d,data:Qt(u,o.default.prototype),behaviors:en(u,kn),properties:nn(u.props,!1,u.__file,d),lifetimes:{attached:function(){var e=this.properties,t={mpType:n.call(this)?"page":"component",mpInstance:this,propsData:e};Gt(e.vueId,this),i.call(this,{vuePid:this._$vuePid,vueOptions:t}),this.$vm=new s(t),Xt(this.$vm,e.vueSlots),this.$vm.$mount()},ready:function(){this.$vm&&(this.$vm._isMounted=!0,this.$vm.__call_hook("mounted"),this.$vm.__call_hook("onReady"))},detached:function(){this.$vm&&this.$vm.$destroy()}},pageLifetimes:{show:function(e){this.$vm&&this.$vm.__call_hook("onPageShow",e)},hide:function(){this.$vm&&this.$vm.__call_hook("onPageHide")},resize:function(e){this.$vm&&this.$vm.__call_hook("onPageResize",e)}},methods:{__l:Pn,__e:hn}};return u.externalClasses&&(f.externalClasses=u.externalClasses),Array.isArray(u.wxsCallMethods)&&u.wxsCallMethods.forEach((function(e){f.methods[e]=function(t){return this.$vm[e](t)}})),n?f:[f,s]}function Kn(e){return Rn(e,{isPage:Sn,initRelation:Tn})}var jn=["onShow","onHide","onUnload"];function zn(e,t){t.isPage,t.initRelation;var n=Kn(e);return qt(n.methods,jn,e),n.methods.onLoad=function(e){this.options=e;var t=Object.assign({},e);delete t.__id__,this.$page={fullPath:"/"+(this.route||this.is)+Mn(t)},this.$vm.$mp.query=e,this.$vm.__call_hook("onLoad",e)},n}function Un(e){return zn(e,{isPage:Sn,initRelation:Tn})}function Bn(e){return Component(Un(e))}function Nn(e){return Component(Kn(e))}function Wn(e){var t=Cn(e),n=getApp({allowDefault:!0});e.$scope=n;var i=n.globalData;if(i&&Object.keys(t.globalData).forEach((function(e){E(i,e)||(i[e]=t.globalData[e])})),Object.keys(t).forEach((function(e){E(n,e)||(n[e]=t[e])})),_(t.onShow)&&wx.onAppShow&&wx.onAppShow((function(){for(var t=arguments.length,n=new Array(t),i=0;i=2)e.mixin({beforeCreate:i});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[i].concat(e.init):i,n.call(this,e)}}function i(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var i="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},r=i.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(e){r&&(e._devtoolHook=r,r.emit("vuex:init",e),r.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){r.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){r.emit("vuex:action",e,t)}),{prepend:!0}))}function a(e,t){return e.filter(t)[0]}function s(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=a(t,(function(t){return t.original===e}));if(n)return n.copy;var i=Array.isArray(e)?[]:{};return t.push({original:e,copy:i}),Object.keys(e).forEach((function(n){i[n]=s(e[n],t)})),i}function c(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function l(e){return null!==e&&"object"===typeof e}function u(e){return e&&"function"===typeof e.then}function d(e,t){if(!e)throw new Error("[vuex] "+t)}function f(e,t){return function(){return e(t)}}var h=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},h.prototype.addChild=function(e,t){this._children[e]=t},h.prototype.removeChild=function(e){delete this._children[e]},h.prototype.getChild=function(e){return this._children[e]},h.prototype.hasChild=function(e){return e in this._children},h.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},h.prototype.forEachChild=function(e){c(this._children,e)},h.prototype.forEachGetter=function(e){this._rawModule.getters&&c(this._rawModule.getters,e)},h.prototype.forEachAction=function(e){this._rawModule.actions&&c(this._rawModule.actions,e)},h.prototype.forEachMutation=function(e){this._rawModule.mutations&&c(this._rawModule.mutations,e)},Object.defineProperties(h.prototype,p);var g=function(e){this.register([],e,!1)};function v(e,t,n){if(b(e,n),t.update(n),n.modules)for(var i in n.modules){if(!t.getChild(i))return void console.warn("[vuex] trying to add a new module '"+i+"' on hot reloading, manual reload is needed");v(e.concat(i),t.getChild(i),n.modules[i])}}g.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},g.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},g.prototype.update=function(e){v([],this.root,e)},g.prototype.register=function(e,t,n){var i=this;void 0===n&&(n=!0),b(e,t);var r=new h(t,n);if(0===e.length)this.root=r;else{var o=this.get(e.slice(0,-1));o.addChild(e[e.length-1],r)}t.modules&&c(t.modules,(function(t,r){i.register(e.concat(r),t,n)}))},g.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],i=t.getChild(n);i?i.runtime&&t.removeChild(n):console.warn("[vuex] trying to unregister module '"+n+"', which is not registered")},g.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var y,m={assert:function(e){return"function"===typeof e},expected:"function"},x={assert:function(e){return"function"===typeof e||"object"===typeof e&&"function"===typeof e.handler},expected:'function or object with "handler" function'},A={getters:m,mutations:m,actions:x};function b(e,t){Object.keys(A).forEach((function(n){if(t[n]){var i=A[n];c(t[n],(function(t,r){d(i.assert(t),w(e,n,r,t,i.expected))}))}}))}function w(e,t,n,i,r){var o=t+" should be "+r+' but "'+t+"."+n+'"';return e.length>0&&(o+=' in module "'+e.join(".")+'"'),o+=" is "+JSON.stringify(i)+".",o}var k=function e(t){var n=this;void 0===t&&(t={}),!y&&"undefined"!==typeof window&&window.Vue&&K(window.Vue),d(y,"must call Vue.use(Vuex) before creating a store instance."),d("undefined"!==typeof Promise,"vuex requires a Promise polyfill in this browser."),d(this instanceof e,"store must be called with the new operator.");var i=t.plugins;void 0===i&&(i=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new g(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new y,this._makeLocalGettersCache=Object.create(null);var a=this,s=this,c=s.dispatch,l=s.commit;this.dispatch=function(e,t){return c.call(a,e,t)},this.commit=function(e,t,n){return l.call(a,e,t,n)},this.strict=r;var u=this._modules.root.state;P(this,u,[],this._modules.root),_(this,u),i.forEach((function(e){return e(n)}));var f=void 0!==t.devtools?t.devtools:y.config.devtools;f&&o(this)},S={state:{configurable:!0}};function T(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function O(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;P(e,n,[],e._modules.root,!0),_(e,n,t)}function _(e,t,n){var i=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,o={};c(r,(function(t,n){o[n]=f(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var a=y.config.silent;y.config.silent=!0,e._vm=new y({data:{$$state:t},computed:o}),y.config.silent=a,e.strict&&D(e),i&&(n&&e._withCommit((function(){i._data.$$state=null})),y.nextTick((function(){return i.$destroy()})))}function P(e,t,n,i,r){var o=!n.length,a=e._modules.getNamespace(n);if(i.namespaced&&(e._modulesNamespaceMap[a]&&console.error("[vuex] duplicate namespace "+a+" for the namespaced module "+n.join("/")),e._modulesNamespaceMap[a]=i),!o&&!r){var s=M(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){c in s&&console.warn('[vuex] state field "'+c+'" was overridden by a module with the same name at "'+n.join(".")+'"'),y.set(s,c,i.state)}))}var l=i.context=C(e,a,n);i.forEachMutation((function(t,n){var i=a+n;F(e,i,t,l)})),i.forEachAction((function(t,n){var i=t.root?n:a+n,r=t.handler||t;I(e,i,r,l)})),i.forEachGetter((function(t,n){var i=a+n;L(e,i,t,l)})),i.forEachChild((function(i,o){P(e,t,n.concat(o),i,r)}))}function C(e,t,n){var i=""===t,r={dispatch:i?e.dispatch:function(n,i,r){var o=R(n,i,r),a=o.payload,s=o.options,c=o.type;if(s&&s.root||(c=t+c,e._actions[c]))return e.dispatch(c,a);console.error("[vuex] unknown local action type: "+o.type+", global type: "+c)},commit:i?e.commit:function(n,i,r){var o=R(n,i,r),a=o.payload,s=o.options,c=o.type;s&&s.root||(c=t+c,e._mutations[c])?e.commit(c,a,s):console.error("[vuex] unknown local mutation type: "+o.type+", global type: "+c)}};return Object.defineProperties(r,{getters:{get:i?function(){return e.getters}:function(){return E(e,t)}},state:{get:function(){return M(e.state,n)}}}),r}function E(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Object.keys(e.getters).forEach((function(r){if(r.slice(0,i)===t){var o=r.slice(i);Object.defineProperty(n,o,{get:function(){return e.getters[r]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function F(e,t,n,i){var r=e._mutations[t]||(e._mutations[t]=[]);r.push((function(t){n.call(e,i.state,t)}))}function I(e,t,n,i){var r=e._actions[t]||(e._actions[t]=[]);r.push((function(t){var r=n.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},t);return u(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}function L(e,t,n,i){e._wrappedGetters[t]?console.error("[vuex] duplicate getter key: "+t):e._wrappedGetters[t]=function(e){return n(i.state,i.getters,e.state,e.getters)}}function D(e){e._vm.$watch((function(){return this._data.$$state}),(function(){d(e._committing,"do not mutate vuex store state outside mutation handlers.")}),{deep:!0,sync:!0})}function M(e,t){return t.reduce((function(e,t){return e[t]}),e)}function R(e,t,n){return l(e)&&e.type&&(n=t,t=e,e=e.type),d("string"===typeof e,"expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}function K(e){y&&e===y?console.error("[vuex] already installed. Vue.use(Vuex) should be called only once."):(y=e,n(y))}S.state.get=function(){return this._vm._data.$$state},S.state.set=function(e){d(!1,"use store.replaceState() to explicit replace store state.")},k.prototype.commit=function(e,t,n){var i=this,r=R(e,t,n),o=r.type,a=r.payload,s=r.options,c={type:o,payload:a},l=this._mutations[o];l?(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(c,i.state)})),s&&s.silent&&console.warn("[vuex] mutation type: "+o+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+o)},k.prototype.dispatch=function(e,t){var n=this,i=R(e,t),r=i.type,o=i.payload,a={type:r,payload:o},s=this._actions[r];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(l){console.warn("[vuex] error in before action subscribers: "),console.error(l)}var c=s.length>1?Promise.all(s.map((function(e){return e(o)}))):s[0](o);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(l){console.warn("[vuex] error in after action subscribers: "),console.error(l)}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(l){console.warn("[vuex] error in error action subscribers: "),console.error(l)}t(e)}))}))}console.error("[vuex] unknown action type: "+r)},k.prototype.subscribe=function(e,t){return T(e,this._subscribers,t)},k.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return T(n,this._actionSubscribers,t)},k.prototype.watch=function(e,t,n){var i=this;return d("function"===typeof e,"store.watch only accepts a function."),this._watcherVM.$watch((function(){return e(i.state,i.getters)}),t,n)},k.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},k.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),d(Array.isArray(e),"module path must be a string or an Array."),d(e.length>0,"cannot register the root module by using registerModule."),this._modules.register(e,t),P(this,this.state,e,this._modules.get(e),n.preserveState),_(this,this.state)},k.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),d(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit((function(){var n=M(t.state,e.slice(0,-1));y.delete(n,e[e.length-1])})),O(this)},k.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),d(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},k.prototype[[104,111,116,85,112,100,97,116,101].map((function(e){return String.fromCharCode(e)})).join("")]=function(e){this._modules.update(e),O(this,!0)},k.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(k.prototype,S);var j=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;n[i]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var i=V(this.$store,"mapState",e);if(!i)return;t=i.context.state,n=i.context.getters}return"function"===typeof r?r.call(this,t,n):t[r]},n[i].vuex=!0})),n})),z=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;n[i]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var i=this.$store.commit;if(e){var o=V(this.$store,"mapMutations",e);if(!o)return;i=o.context.commit}return"function"===typeof r?r.apply(this,[i].concat(t)):i.apply(this.$store,[r].concat(t))}})),n})),U=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapGetters: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;r=e+r,n[i]=function(){if(!e||V(this.$store,"mapGetters",e)){if(r in this.$store.getters)return this.$store.getters[r];console.error("[vuex] unknown getter: "+r)}},n[i].vuex=!0})),n})),B=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapActions: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;n[i]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var i=this.$store.dispatch;if(e){var o=V(this.$store,"mapActions",e);if(!o)return;i=o.context.dispatch}return"function"===typeof r?r.apply(this,[i].concat(t)):i.apply(this.$store,[r].concat(t))}})),n})),N=function(e){return{mapState:j.bind(null,e),mapGetters:U.bind(null,e),mapMutations:z.bind(null,e),mapActions:B.bind(null,e)}};function W(e){return H(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function H(e){return Array.isArray(e)||l(e)}function Z(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function V(e,t,n){var i=e._modulesNamespaceMap[n];return i||console.error("[vuex] module namespace not found in "+t+"(): "+n),i}function q(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var i=e.transformer;void 0===i&&(i=function(e){return e});var r=e.mutationTransformer;void 0===r&&(r=function(e){return e});var o=e.actionFilter;void 0===o&&(o=function(e,t){return!0});var a=e.actionTransformer;void 0===a&&(a=function(e){return e});var c=e.logMutations;void 0===c&&(c=!0);var l=e.logActions;void 0===l&&(l=!0);var u=e.logger;return void 0===u&&(u=console),function(e){var d=s(e.state);"undefined"!==typeof u&&(c&&e.subscribe((function(e,o){var a=s(o);if(n(e,d,a)){var c=G(),l=r(e),f="mutation "+e.type+c;J(u,f,t),u.log("%c prev state","color: #9E9E9E; font-weight: bold",i(d)),u.log("%c mutation","color: #03A9F4; font-weight: bold",l),u.log("%c next state","color: #4CAF50; font-weight: bold",i(a)),X(u)}d=a})),l&&e.subscribeAction((function(e,n){if(o(e,n)){var i=G(),r=a(e),s="action "+e.type+i;J(u,s,t),u.log("%c action","color: #03A9F4; font-weight: bold",r),X(u)}})))}}function J(e,t,n){var i=n?e.groupCollapsed:e.group;try{i.call(e,t)}catch(r){e.log(t)}}function X(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function G(){var e=new Date;return" @ "+Y(e.getHours(),2)+":"+Y(e.getMinutes(),2)+":"+Y(e.getSeconds(),2)+"."+Y(e.getMilliseconds(),3)}function Q(e,t){return new Array(t+1).join(e)}function Y(e,t){return Q("0",t-e.toString().length)+e}var $={Store:k,install:K,version:"3.6.2",mapState:j,mapMutations:z,mapGetters:U,mapActions:B,createNamespacedHelpers:N,createLogger:q};e.exports=$}).call(this,n(2))},15:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(16)),r=s(n(19)),o=s(n(20)),a=s(n(13));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){c(o,i,r,a,s,"next",e)}function s(e){c(o,i,r,a,s,"throw",e)}a(void 0)}))}}var u={getToken:function(){var t=a.default.state.token;t&&this.post("/api/Accounts/RefreshToken",{token:t.token,refreshToken:t.refreshToken},(function(t,n){a.default.commit("saveToken",n),e.setStorageSync("token",n)}))},uploadFile:function(t,n){var i=a.default.state.token||{};console.log(t,n,2222222),e.uploadFile({url:r.default.domain+"/api/Objects/integration/xxx",filePath:t,name:"file",header:{Authorization:"Bearer "+i.token||!1},success:function(e){console.log(e,333333);var t=JSON.parse(e.data);-100==t.status?o.default.askLogin():-1==t.status?o.default.showError(t.msg):n(t.data,t)}})},uploadFile2:function(t,n,i){var s=a.default.state.user||{};if(!s.lawyerInfo)return o.default.askLogin();console.log("1111111111111"+t),console.log("2222222222222"+n),console.log("3333333333333"+i),e.uploadFile({url:r.default.domain+"/file/uploadFile2",filePath:t,name:"file",formData:n,header:{token:s.lawyerInfo.token||"",login_type:s.login_type||0,who:s.who},success:function(e){console.log(e);var t=JSON.parse(e.data);-100==t.status?o.default.askLogin():-1==t.status?o.default.showError(t.msg):i(t.data,t)}})},get:function(t,n,s){var c=this;return l(i.default.mark((function l(){var u;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return c.getToken(),u=a.default.state.token||{},i.next=4,e.request({url:r.default.api+t,method:"GET",data:n,header:{Authorization:"Bearer "+u.token||!1,"content-type":"application/json"},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?o.default.showError(t.msg):s(t.data,t)}});case 4:case"end":return i.stop()}}),l)})))()},post:function(t,n,i){"/api/Accounts/RefreshToken"!=t&&s!={}&&this.getToken();var s=a.default.state.token||{};try{e.request({url:r.default.api+t,method:"POST",data:n,header:{Authorization:"Bearer "+s.token||!1},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?(o.default.showError(t.msg),i(t.data,t)):i(t.data,t)},fail:function(e){console.error(e,8877897)}})}catch(c){console.log(c)}},patch:function(t,n,i){"/api/Accounts/RefreshToken"!=t&&s!={}&&this.getToken();var s=a.default.state.token||{};try{e.request({url:r.default.api+t,method:"PATCH",data:n,header:{Authorization:"Bearer "+s.token||!1},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?(o.default.showError(t.msg),i(t.data,t)):i(t.data,t)},fail:function(e){console.error(e,8877897)}})}catch(c){console.log(c)}},get2:function(t,n,i){var s=a.default.state.user||{};e.request({url:r.default.domain+t,method:"GET",data:n,header:{token:s.token||"",login_type:s.login_type||0},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?o.default.showError(t.msg):i(t.data,t)}})},post2:function(t,n,i){var s=a.default.state.user||{};try{e.request({url:r.default.domain+t,method:"POST",data:n,header:{token:s.lawyerInfo.token||"",login_type:s.login_type||0,who:s.who},success:function(e){var t=e.data;console.log(t,"------------- 请求返回的数据 -------------"),-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?(o.default.showError(t.msg),i(t.data,t)):i(t.data,t)},fail:function(e){console.error(e,8877897)}})}catch(c){console.log(c)}}},d=u;t.default=d}).call(this,n(1)["default"])},16:function(e,t,n){e.exports=n(17)},17:function(e,t,n){var i=function(){return this||"object"===typeof self&&self}()||Function("return this")(),r=i.regeneratorRuntime&&Object.getOwnPropertyNames(i).indexOf("regeneratorRuntime")>=0,o=r&&i.regeneratorRuntime;if(i.regeneratorRuntime=void 0,e.exports=n(18),r)i.regeneratorRuntime=o;else try{delete i.regeneratorRuntime}catch(a){i.regeneratorRuntime=void 0}},18:function(e,t){!function(t){"use strict";var n,i=Object.prototype,r=i.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag",l="object"===typeof e,u=t.regeneratorRuntime;if(u)l&&(e.exports=u);else{u=t.regeneratorRuntime=l?e.exports:{},u.wrap=A;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",g={},v={};v[a]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(I([])));m&&m!==i&&r.call(m,a)&&(v=m);var x=S.prototype=w.prototype=Object.create(v);k.prototype=x.constructor=S,S.constructor=k,S[c]=k.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(x),e},u.awrap=function(e){return{__await:e}},T(O.prototype),O.prototype[s]=function(){return this},u.AsyncIterator=O,u.async=function(e,t,n,i){var r=new O(A(e,t,n,i));return u.isGeneratorFunction(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},T(x),x[c]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){while(t.length){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},u.values=I,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,r){return s.type="throw",s.arg=e,t.next=i,r&&(t.method="next",t.arg=n),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:I(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=n),g}}}function A(e,t,n,i){var r=t&&t.prototype instanceof w?t:w,o=Object.create(r.prototype),a=new F(i||[]);return o._invoke=_(e,n,a),o}function b(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(i){return{type:"throw",arg:i}}}function w(){}function k(){}function S(){}function T(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function O(e){function t(n,i,o,a){var s=b(e[n],e,i);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,o,a)}),(function(e){t("throw",e,o,a)})):Promise.resolve(l).then((function(e){c.value=e,o(c)}),(function(e){return t("throw",e,o,a)}))}a(s.arg)}var n;function i(e,i){function r(){return new Promise((function(n,r){t(e,i,n,r)}))}return n=n?n.then(r,r):r()}this._invoke=i}function _(e,t,n){var i=d;return function(r,o){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===r)throw o;return L()}n.method=r,n.arg=o;while(1){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var c=b(e,t,n);if("normal"===c.type){if(i=n.done?p:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}function P(e,t){var i=e.iterator[t.method];if(i===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,P(e,t),"throw"===t.method))return g;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=b(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,g;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,g):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[a];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function t(){while(++i0?_+O:""}},23:function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){var t;while(e.length){var n=e.pop();if(t=n.obj[n.prop],Array.isArray(t)){for(var i=[],r=0;r=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(i):o<128?n+=r[o]:o<2048?n+=r[192|o>>6]+r[128|63&o]:o<55296||o>=57344?n+=r[224|o>>12]+r[128|o>>6&63]+r[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(i)),n+=r[240|o>>18]+r[128|o>>12&63]+r[128|o>>6&63]+r[128|63&o])}return n},d=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i=0;--r){var o,a=e[r];if("[]"===a)o=[],o=o.concat(i);else{o=n.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(s,10);!isNaN(c)&&a!==s&&String(c)===s&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[],o[c]=i):o[s]=i}i=o}return i},c=function(e,t,n){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=o.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}var d=0;while(null!==(c=a.exec(i))&&d0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.baseUrl=e.baseUrl||"",this.url=e.url||"",this.method="GET",this.data=null,this.header=e.header||{},this.beforeRequest=null,this.afterRequest=null}return r(t,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.method="GET",this.url=this.baseUrl+e,this.data=t,this._()}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.method="POST",this.url=this.baseUrl+e,this.data=t,this._()}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.method="PUT",this.url=this.baseUrl+e,this.data=t,this._()}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.method="DELETE",this.url=this.baseUrl+e,this.data=t,this._()}},{key:"_",value:function(){var t=this;return this.header={},this.beforeRequest&&"function"===typeof this.beforeRequest&&this.beforeRequest(this),new Promise((function(n,i){var r=wx;"undefined"!==typeof e&&(r=e),r.request({url:t.url,method:t.method,data:t.data,header:t.header,success:function(e){n(e)},fail:function(e){i(e)},complete:function(e){t.afterRequest&&"function"===typeof t.afterRequest&&t.afterRequest(e)}})}))}}]),t}(),a=new o;t.$http=a}).call(this,n(1)["default"])},3:function(e,t,n){"use strict";(function(e,n){function i(e,t){return c(e)||s(e,t)||o(e,t)||r()}function r(){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 o(e,t){if(e){if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:p;if(!t)return[e];var i=this._caches[e];return i||(i=m(e,n),this._caches[e]=i),x(i,t)}}]),e}();t.Formatter=g;var v=/^(?:\d)+/,y=/^(?:\w)+/;function m(e,t){var n=i(t,2),r=n[0],o=n[1],a=[],s=0,c="";while(s-1?A:e.indexOf("-hant")>-1||P(e,["-tw","-hk","-mo","-cht"])?b:A;var n=C(e,[w,k,S]);return n||void 0}}var F=function(){function e(t){var n=t.locale,i=t.fallbackLocale,r=t.messages,o=t.watcher,a=t.formater;l(this,e),this.locale=w,this.fallbackLocale=w,this.message={},this.messages={},this.watchers=[],i&&(this.fallbackLocale=i),this.formater=a||_,this.messages=r||{},this.setLocale(n||w),o&&this.watchLocale(o)}return d(e,[{key:"setLocale",value:function(e){var t=this,n=this.locale;this.locale=E(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],n!==this.locale&&this.watchers.forEach((function(e){e(t.locale,n)}))}},{key:"getLocale",value:function(){return this.locale}},{key:"watchLocale",value:function(e){var t=this,n=this.watchers.push(e)-1;return function(){t.watchers.splice(n,1)}}},{key:"add",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.messages[e];i?n?Object.assign(i,t):Object.keys(t).forEach((function(e){O(i,e)||(i[e]=t[e])})):this.messages[e]=t}},{key:"f",value:function(e,t,n){return this.formater.interpolate(e,t,n).join("")}},{key:"t",value:function(e,t,n){var i=this.message;return"string"===typeof t?(t=E(t,this.messages),t&&(i=this.messages[t])):n=t,O(i,e)?this.formater.interpolate(i[e],n).join(""):(console.warn("Cannot translate the value of keypath ".concat(e,". Use the value of keypath as default.")),e)}}]),e}();function I(e,t){e.$watchLocale?e.$watchLocale((function(e){t.setLocale(e)})):e.$watch((function(){return e.$locale}),(function(e){t.setLocale(e)}))}function L(){return"undefined"!==typeof e&&e.getLocale?e.getLocale():"undefined"!==typeof n&&n.getLocale?n.getLocale():w}function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if("string"!==typeof e){var r=[t,e];e=r[0],t=r[1]}"string"!==typeof e&&(e=L()),"string"!==typeof n&&(n="undefined"!==typeof __uniConfig&&__uniConfig.fallbackLocale||w);var o=new F({locale:e,fallbackLocale:n,messages:t,watcher:i}),a=function(e,t){if("function"!==typeof getApp)a=function(e,t){return o.t(e,t)};else{var n=!1;a=function(e,t){var i=getApp().$vm;return i&&(i.$locale,n||(n=!0,I(i,o))),o.t(e,t)}}return a(e,t)};return{i18n:o,f:function(e,t,n){return o.f(e,t,n)},t:function(e,t){return a(e,t)},add:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return o.add(e,t,n)},watch:function(e){return o.watchLocale(e)},getLocale:function(){return o.getLocale()},setLocale:function(e){return o.setLocale(e)}}}t.I18n=F;var M,R=function(e){return"string"===typeof e};function K(e,t){return M||(M=new g),H(e,(function(e,n){var i=e[n];return R(i)?!!U(i,t)||void 0:K(i,t)}))}function j(e,t,n){return M||(M=new g),H(e,(function(e,i){var r=e[i];R(r)?U(r,n)&&(e[i]=B(r,t,n)):j(r,t,n)})),e}function z(e,t){var n=t.locale,i=t.locales,r=t.delimiters;if(!U(e,r))return e;M||(M=new g);var o=[];Object.keys(i).forEach((function(e){e!==n&&o.push({locale:e,values:i[e]})})),o.unshift({locale:n,values:i[n]});try{return JSON.stringify(W(JSON.parse(e),o,r),null,2)}catch(a){}return e}function U(e,t){return e.indexOf(t[0])>-1}function B(e,t,n){return M.interpolate(e,t,n).join("")}function N(e,t,n,i){var r=e[t];if(R(r)){if(U(r,i)&&(e[t]=B(r,n[0].values,i),n.length>1)){var o=e[t+"Locales"]={};n.forEach((function(e){o[e.locale]=B(r,e.values,i)}))}}else W(r,n,i)}function W(e,t,n){return H(e,(function(e,i){N(e,i,t,n)})),e}function H(e,t){if(f(e)){for(var n=0;n-1}))):t}}function V(e){var t=[],n=e.split("-");while(n.length)t.push(n.join("-")),n.pop();return t}t.isString=R}).call(this,n(1)["default"],n(2))},31:function(e,t){e.exports="/static/login/banner.jpg"},32:function(e,t){e.exports="/static/login/title.png"},4:function(e,t,n){"use strict";n.r(t),function(e){
+function n(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:i});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[i].concat(e.init):i,n.call(this,e)}}function i(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var i="undefined"!==typeof window?window:"undefined"!==typeof t?t:{},r=i.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(e){r&&(e._devtoolHook=r,r.emit("vuex:init",e),r.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){r.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){r.emit("vuex:action",e,t)}),{prepend:!0}))}function a(e,t){return e.filter(t)[0]}function s(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=a(t,(function(t){return t.original===e}));if(n)return n.copy;var i=Array.isArray(e)?[]:{};return t.push({original:e,copy:i}),Object.keys(e).forEach((function(n){i[n]=s(e[n],t)})),i}function c(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function l(e){return null!==e&&"object"===typeof e}function u(e){return e&&"function"===typeof e.then}function d(e,t){if(!e)throw new Error("[vuex] "+t)}function f(e,t){return function(){return e(t)}}var h=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},h.prototype.addChild=function(e,t){this._children[e]=t},h.prototype.removeChild=function(e){delete this._children[e]},h.prototype.getChild=function(e){return this._children[e]},h.prototype.hasChild=function(e){return e in this._children},h.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},h.prototype.forEachChild=function(e){c(this._children,e)},h.prototype.forEachGetter=function(e){this._rawModule.getters&&c(this._rawModule.getters,e)},h.prototype.forEachAction=function(e){this._rawModule.actions&&c(this._rawModule.actions,e)},h.prototype.forEachMutation=function(e){this._rawModule.mutations&&c(this._rawModule.mutations,e)},Object.defineProperties(h.prototype,p);var g=function(e){this.register([],e,!1)};function v(e,t,n){if(b(e,n),t.update(n),n.modules)for(var i in n.modules){if(!t.getChild(i))return void console.warn("[vuex] trying to add a new module '"+i+"' on hot reloading, manual reload is needed");v(e.concat(i),t.getChild(i),n.modules[i])}}g.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},g.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},g.prototype.update=function(e){v([],this.root,e)},g.prototype.register=function(e,t,n){var i=this;void 0===n&&(n=!0),b(e,t);var r=new h(t,n);if(0===e.length)this.root=r;else{var o=this.get(e.slice(0,-1));o.addChild(e[e.length-1],r)}t.modules&&c(t.modules,(function(t,r){i.register(e.concat(r),t,n)}))},g.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],i=t.getChild(n);i?i.runtime&&t.removeChild(n):console.warn("[vuex] trying to unregister module '"+n+"', which is not registered")},g.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var y,m={assert:function(e){return"function"===typeof e},expected:"function"},x={assert:function(e){return"function"===typeof e||"object"===typeof e&&"function"===typeof e.handler},expected:'function or object with "handler" function'},A={getters:m,mutations:m,actions:x};function b(e,t){Object.keys(A).forEach((function(n){if(t[n]){var i=A[n];c(t[n],(function(t,r){d(i.assert(t),w(e,n,r,t,i.expected))}))}}))}function w(e,t,n,i,r){var o=t+" should be "+r+' but "'+t+"."+n+'"';return e.length>0&&(o+=' in module "'+e.join(".")+'"'),o+=" is "+JSON.stringify(i)+".",o}var k=function e(t){var n=this;void 0===t&&(t={}),!y&&"undefined"!==typeof window&&window.Vue&&K(window.Vue),d(y,"must call Vue.use(Vuex) before creating a store instance."),d("undefined"!==typeof Promise,"vuex requires a Promise polyfill in this browser."),d(this instanceof e,"store must be called with the new operator.");var i=t.plugins;void 0===i&&(i=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new g(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new y,this._makeLocalGettersCache=Object.create(null);var a=this,s=this,c=s.dispatch,l=s.commit;this.dispatch=function(e,t){return c.call(a,e,t)},this.commit=function(e,t,n){return l.call(a,e,t,n)},this.strict=r;var u=this._modules.root.state;P(this,u,[],this._modules.root),_(this,u),i.forEach((function(e){return e(n)}));var f=void 0!==t.devtools?t.devtools:y.config.devtools;f&&o(this)},S={state:{configurable:!0}};function T(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function O(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;P(e,n,[],e._modules.root,!0),_(e,n,t)}function _(e,t,n){var i=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,o={};c(r,(function(t,n){o[n]=f(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var a=y.config.silent;y.config.silent=!0,e._vm=new y({data:{$$state:t},computed:o}),y.config.silent=a,e.strict&&D(e),i&&(n&&e._withCommit((function(){i._data.$$state=null})),y.nextTick((function(){return i.$destroy()})))}function P(e,t,n,i,r){var o=!n.length,a=e._modules.getNamespace(n);if(i.namespaced&&(e._modulesNamespaceMap[a]&&console.error("[vuex] duplicate namespace "+a+" for the namespaced module "+n.join("/")),e._modulesNamespaceMap[a]=i),!o&&!r){var s=M(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){c in s&&console.warn('[vuex] state field "'+c+'" was overridden by a module with the same name at "'+n.join(".")+'"'),y.set(s,c,i.state)}))}var l=i.context=C(e,a,n);i.forEachMutation((function(t,n){var i=a+n;F(e,i,t,l)})),i.forEachAction((function(t,n){var i=t.root?n:a+n,r=t.handler||t;I(e,i,r,l)})),i.forEachGetter((function(t,n){var i=a+n;L(e,i,t,l)})),i.forEachChild((function(i,o){P(e,t,n.concat(o),i,r)}))}function C(e,t,n){var i=""===t,r={dispatch:i?e.dispatch:function(n,i,r){var o=R(n,i,r),a=o.payload,s=o.options,c=o.type;if(s&&s.root||(c=t+c,e._actions[c]))return e.dispatch(c,a);console.error("[vuex] unknown local action type: "+o.type+", global type: "+c)},commit:i?e.commit:function(n,i,r){var o=R(n,i,r),a=o.payload,s=o.options,c=o.type;s&&s.root||(c=t+c,e._mutations[c])?e.commit(c,a,s):console.error("[vuex] unknown local mutation type: "+o.type+", global type: "+c)}};return Object.defineProperties(r,{getters:{get:i?function(){return e.getters}:function(){return E(e,t)}},state:{get:function(){return M(e.state,n)}}}),r}function E(e,t){if(!e._makeLocalGettersCache[t]){var n={},i=t.length;Object.keys(e.getters).forEach((function(r){if(r.slice(0,i)===t){var o=r.slice(i);Object.defineProperty(n,o,{get:function(){return e.getters[r]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function F(e,t,n,i){var r=e._mutations[t]||(e._mutations[t]=[]);r.push((function(t){n.call(e,i.state,t)}))}function I(e,t,n,i){var r=e._actions[t]||(e._actions[t]=[]);r.push((function(t){var r=n.call(e,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:e.getters,rootState:e.state},t);return u(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}function L(e,t,n,i){e._wrappedGetters[t]?console.error("[vuex] duplicate getter key: "+t):e._wrappedGetters[t]=function(e){return n(i.state,i.getters,e.state,e.getters)}}function D(e){e._vm.$watch((function(){return this._data.$$state}),(function(){d(e._committing,"do not mutate vuex store state outside mutation handlers.")}),{deep:!0,sync:!0})}function M(e,t){return t.reduce((function(e,t){return e[t]}),e)}function R(e,t,n){return l(e)&&e.type&&(n=t,t=e,e=e.type),d("string"===typeof e,"expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}function K(e){y&&e===y?console.error("[vuex] already installed. Vue.use(Vuex) should be called only once."):(y=e,n(y))}S.state.get=function(){return this._vm._data.$$state},S.state.set=function(e){d(!1,"use store.replaceState() to explicit replace store state.")},k.prototype.commit=function(e,t,n){var i=this,r=R(e,t,n),o=r.type,a=r.payload,s=r.options,c={type:o,payload:a},l=this._mutations[o];l?(this._withCommit((function(){l.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(c,i.state)})),s&&s.silent&&console.warn("[vuex] mutation type: "+o+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+o)},k.prototype.dispatch=function(e,t){var n=this,i=R(e,t),r=i.type,o=i.payload,a={type:r,payload:o},s=this._actions[r];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(l){console.warn("[vuex] error in before action subscribers: "),console.error(l)}var c=s.length>1?Promise.all(s.map((function(e){return e(o)}))):s[0](o);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(a,n.state)}))}catch(l){console.warn("[vuex] error in after action subscribers: "),console.error(l)}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(l){console.warn("[vuex] error in error action subscribers: "),console.error(l)}t(e)}))}))}console.error("[vuex] unknown action type: "+r)},k.prototype.subscribe=function(e,t){return T(e,this._subscribers,t)},k.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return T(n,this._actionSubscribers,t)},k.prototype.watch=function(e,t,n){var i=this;return d("function"===typeof e,"store.watch only accepts a function."),this._watcherVM.$watch((function(){return e(i.state,i.getters)}),t,n)},k.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},k.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),d(Array.isArray(e),"module path must be a string or an Array."),d(e.length>0,"cannot register the root module by using registerModule."),this._modules.register(e,t),P(this,this.state,e,this._modules.get(e),n.preserveState),_(this,this.state)},k.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),d(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit((function(){var n=M(t.state,e.slice(0,-1));y.delete(n,e[e.length-1])})),O(this)},k.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),d(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},k.prototype[[104,111,116,85,112,100,97,116,101].map((function(e){return String.fromCharCode(e)})).join("")]=function(e){this._modules.update(e),O(this,!0)},k.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(k.prototype,S);var j=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;n[i]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var i=V(this.$store,"mapState",e);if(!i)return;t=i.context.state,n=i.context.getters}return"function"===typeof r?r.call(this,t,n):t[r]},n[i].vuex=!0})),n})),z=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;n[i]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var i=this.$store.commit;if(e){var o=V(this.$store,"mapMutations",e);if(!o)return;i=o.context.commit}return"function"===typeof r?r.apply(this,[i].concat(t)):i.apply(this.$store,[r].concat(t))}})),n})),U=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapGetters: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;r=e+r,n[i]=function(){if(!e||V(this.$store,"mapGetters",e)){if(r in this.$store.getters)return this.$store.getters[r];console.error("[vuex] unknown getter: "+r)}},n[i].vuex=!0})),n})),B=Z((function(e,t){var n={};return H(t)||console.error("[vuex] mapActions: mapper parameter must be either an Array or an Object"),W(t).forEach((function(t){var i=t.key,r=t.val;n[i]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var i=this.$store.dispatch;if(e){var o=V(this.$store,"mapActions",e);if(!o)return;i=o.context.dispatch}return"function"===typeof r?r.apply(this,[i].concat(t)):i.apply(this.$store,[r].concat(t))}})),n})),N=function(e){return{mapState:j.bind(null,e),mapGetters:U.bind(null,e),mapMutations:z.bind(null,e),mapActions:B.bind(null,e)}};function W(e){return H(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function H(e){return Array.isArray(e)||l(e)}function Z(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function V(e,t,n){var i=e._modulesNamespaceMap[n];return i||console.error("[vuex] module namespace not found in "+t+"(): "+n),i}function q(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var i=e.transformer;void 0===i&&(i=function(e){return e});var r=e.mutationTransformer;void 0===r&&(r=function(e){return e});var o=e.actionFilter;void 0===o&&(o=function(e,t){return!0});var a=e.actionTransformer;void 0===a&&(a=function(e){return e});var c=e.logMutations;void 0===c&&(c=!0);var l=e.logActions;void 0===l&&(l=!0);var u=e.logger;return void 0===u&&(u=console),function(e){var d=s(e.state);"undefined"!==typeof u&&(c&&e.subscribe((function(e,o){var a=s(o);if(n(e,d,a)){var c=G(),l=r(e),f="mutation "+e.type+c;J(u,f,t),u.log("%c prev state","color: #9E9E9E; font-weight: bold",i(d)),u.log("%c mutation","color: #03A9F4; font-weight: bold",l),u.log("%c next state","color: #4CAF50; font-weight: bold",i(a)),X(u)}d=a})),l&&e.subscribeAction((function(e,n){if(o(e,n)){var i=G(),r=a(e),s="action "+e.type+i;J(u,s,t),u.log("%c action","color: #03A9F4; font-weight: bold",r),X(u)}})))}}function J(e,t,n){var i=n?e.groupCollapsed:e.group;try{i.call(e,t)}catch(r){e.log(t)}}function X(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function G(){var e=new Date;return" @ "+Y(e.getHours(),2)+":"+Y(e.getMinutes(),2)+":"+Y(e.getSeconds(),2)+"."+Y(e.getMilliseconds(),3)}function Q(e,t){return new Array(t+1).join(e)}function Y(e,t){return Q("0",t-e.toString().length)+e}var $={Store:k,install:K,version:"3.6.2",mapState:j,mapMutations:z,mapGetters:U,mapActions:B,createNamespacedHelpers:N,createLogger:q};e.exports=$}).call(this,n(2))},15:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=s(n(16)),r=s(n(19)),o=s(n(20)),a=s(n(13));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){c(o,i,r,a,s,"next",e)}function s(e){c(o,i,r,a,s,"throw",e)}a(void 0)}))}}var u={getToken:function(){var t=a.default.state.token;t&&this.post("/api/Accounts/RefreshToken",{token:t.token,refreshToken:t.refreshToken},(function(t,n){a.default.commit("saveToken",n),e.setStorageSync("token",n)}))},uploadFile:function(t,n){var i=a.default.state.token||{};console.log(t,n,2222222),e.uploadFile({url:r.default.domain+"/api/Objects/integration/xxx",filePath:t,name:"file",header:{Authorization:"Bearer "+i.token||!1},success:function(e){console.log(e,333333);var t=JSON.parse(e.data);-100==t.status?o.default.askLogin():-1==t.status?o.default.showError(t.msg):n(t.data,t)}})},uploadFile2:function(t,n,i){var s=a.default.state.user||{};if(!s.lawyerInfo)return o.default.askLogin();console.log("1111111111111"+t),console.log("2222222222222"+n),console.log("3333333333333"+i),e.uploadFile({url:r.default.domain+"/file/uploadFile2",filePath:t,name:"file",formData:n,header:{token:s.lawyerInfo.token||"",login_type:s.login_type||0,who:s.who},success:function(e){console.log(e);var t=JSON.parse(e.data);-100==t.status?o.default.askLogin():-1==t.status?o.default.showError(t.msg):i(t.data,t)}})},get:function(t,n,s){var c=this;return l(i.default.mark((function l(){var u;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return c.getToken(),u=a.default.state.token||{},i.next=4,e.request({url:r.default.api+t,method:"GET",data:n,header:{Authorization:"Bearer "+u.token||!1,"content-type":"application/json"},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?o.default.showError(t.msg):s(t.data,t)}});case 4:case"end":return i.stop()}}),l)})))()},post:function(t,n,i){"/api/Accounts/RefreshToken"!=t&&s!={}&&this.getToken();var s=a.default.state.token||{};try{e.request({url:r.default.api+t,method:"POST",data:n,header:{Authorization:"Bearer "+s.token||!1},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?(o.default.showError(t.msg),i(t.data,t)):i(t.data,t)},fail:function(e){console.error(e,8877897)}})}catch(c){console.log(c)}},patch:function(t,n,i){"/api/Accounts/RefreshToken"!=t&&s!={}&&this.getToken();var s=a.default.state.token||{};try{e.request({url:r.default.api+t,method:"PATCH",data:n,header:{Authorization:"Bearer "+s.token||!1},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?(o.default.showError(t.msg),i(t.data,t)):i(t.data,t)},fail:function(e){console.error(e,8877897)}})}catch(c){console.log(c)}},get2:function(t,n,i){var s=a.default.state.user||{};e.request({url:r.default.domain+t,method:"GET",data:n,header:{token:s.token||"",login_type:s.login_type||0},success:function(e){var t=e.data;-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?o.default.showError(t.msg):i(t.data,t)}})},post2:function(t,n,i){var s=a.default.state.user||{};try{e.request({url:r.default.domain+t,method:"POST",data:n,header:{token:s.lawyerInfo.token||"",login_type:s.login_type||0,who:s.who},success:function(e){var t=e.data;console.log(t,"------------- 请求返回的数据 -------------"),-100==t.status?(console.log("没有登录"),o.default.askLogin()):-1==t.status?(o.default.showError(t.msg),i(t.data,t)):i(t.data,t)},fail:function(e){console.error(e,8877897)}})}catch(c){console.log(c)}}},d=u;t.default=d}).call(this,n(1)["default"])},153:function(e,t,n){"use strict";(function(e,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(16)),o=n(3),a=s(n(154));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,i,r,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(i,r)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function a(e){c(o,i,r,a,s,"next",e)}function s(e){c(o,i,r,a,s,"throw",e)}a(void 0)}))}}function u(e){return h(e)||f(e)||g(e)||d()}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function h(e){if(Array.isArray(e))return v(e)}function p(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=g(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function g(e,t){if(e){if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n>>2]>>>24-o%4*8&255;t[i+o>>>2]|=a<<24-(i+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,i=[],r=function(t){t=t;var n=987654321,i=4294967295;return function(){var r=((n=36969*(65535&n)+(n>>16)&i)<<16)+(t=18e3*(65535&t)+(t>>16)&i)&i;return r/=4294967296,(r+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new a.init(n,t/2)}},l=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new a.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=r.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,o=this.blockSize,s=r/(4*o),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.min(4*c,r);if(c){for(var u=0;u>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],m=e[t+7],x=e[t+8],A=e[t+9],b=e[t+10],w=e[t+11],k=e[t+12],S=e[t+13],T=e[t+14],O=e[t+15],_=o[0],P=o[1],C=o[2],E=o[3];_=l(_,P,C,E,a,7,s[0]),E=l(E,_,P,C,c,12,s[1]),C=l(C,E,_,P,h,17,s[2]),P=l(P,C,E,_,p,22,s[3]),_=l(_,P,C,E,g,7,s[4]),E=l(E,_,P,C,v,12,s[5]),C=l(C,E,_,P,y,17,s[6]),P=l(P,C,E,_,m,22,s[7]),_=l(_,P,C,E,x,7,s[8]),E=l(E,_,P,C,A,12,s[9]),C=l(C,E,_,P,b,17,s[10]),P=l(P,C,E,_,w,22,s[11]),_=l(_,P,C,E,k,7,s[12]),E=l(E,_,P,C,S,12,s[13]),C=l(C,E,_,P,T,17,s[14]),_=u(_,P=l(P,C,E,_,O,22,s[15]),C,E,c,5,s[16]),E=u(E,_,P,C,y,9,s[17]),C=u(C,E,_,P,w,14,s[18]),P=u(P,C,E,_,a,20,s[19]),_=u(_,P,C,E,v,5,s[20]),E=u(E,_,P,C,b,9,s[21]),C=u(C,E,_,P,O,14,s[22]),P=u(P,C,E,_,g,20,s[23]),_=u(_,P,C,E,A,5,s[24]),E=u(E,_,P,C,T,9,s[25]),C=u(C,E,_,P,p,14,s[26]),P=u(P,C,E,_,x,20,s[27]),_=u(_,P,C,E,S,5,s[28]),E=u(E,_,P,C,h,9,s[29]),C=u(C,E,_,P,m,14,s[30]),_=d(_,P=u(P,C,E,_,k,20,s[31]),C,E,v,4,s[32]),E=d(E,_,P,C,x,11,s[33]),C=d(C,E,_,P,w,16,s[34]),P=d(P,C,E,_,T,23,s[35]),_=d(_,P,C,E,c,4,s[36]),E=d(E,_,P,C,g,11,s[37]),C=d(C,E,_,P,m,16,s[38]),P=d(P,C,E,_,b,23,s[39]),_=d(_,P,C,E,S,4,s[40]),E=d(E,_,P,C,a,11,s[41]),C=d(C,E,_,P,p,16,s[42]),P=d(P,C,E,_,y,23,s[43]),_=d(_,P,C,E,A,4,s[44]),E=d(E,_,P,C,k,11,s[45]),C=d(C,E,_,P,O,16,s[46]),_=f(_,P=d(P,C,E,_,h,23,s[47]),C,E,a,6,s[48]),E=f(E,_,P,C,m,10,s[49]),C=f(C,E,_,P,T,15,s[50]),P=f(P,C,E,_,v,21,s[51]),_=f(_,P,C,E,k,6,s[52]),E=f(E,_,P,C,p,10,s[53]),C=f(C,E,_,P,b,15,s[54]),P=f(P,C,E,_,c,21,s[55]),_=f(_,P,C,E,x,6,s[56]),E=f(E,_,P,C,O,10,s[57]),C=f(C,E,_,P,y,15,s[58]),P=f(P,C,E,_,S,21,s[59]),_=f(_,P,C,E,g,6,s[60]),E=f(E,_,P,C,w,10,s[61]),C=f(C,E,_,P,h,15,s[62]),P=f(P,C,E,_,A,21,s[63]),o[0]=o[0]+_|0,o[1]=o[1]+P|0,o[2]=o[2]+C|0,o[3]=o[3]+E|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;n[r>>>5]|=128<<24-r%32;var o=e.floor(i/4294967296),a=i;n[15+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,i,r,o,a){var s=e+(t&n|~t&i)+r+a;return(s<>>32-o)+t}function u(e,t,n,i,r,o,a){var s=e+(t&i|n&~i)+r+a;return(s<>>32-o)+t}function d(e,t,n,i,r,o,a){var s=e+(t^n^i)+r+a;return(s<>>32-o)+t}function f(e,t,n,i,r,o,a){var s=e+(n^(t|~i))+r+a;return(s<>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),n.MD5)})),D((function(e,t){var n,i,r;e.exports=(i=(n=M).lib.Base,r=n.enc.Utf8,void(n.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,c=a.words,l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t=Q,n=e,Object.prototype.hasOwnProperty.call(t,n)||(Q[e]=i),Q[e]}"app"===W&&(Q=i._globalUniCloudObj?i._globalUniCloudObj:i._globalUniCloudObj={});var $=["invoke","success","fail","complete"],ee=Y("_globalUniCloudInterceptor");function te(e,t){ee[e]||(ee[e]={}),B(t)&&Object.keys(t).forEach((function(n){$.indexOf(n)>-1&&function(e,t,n){var i=ee[e][t];i||(i=ee[e][t]=[]),-1===i.indexOf(n)&&"function"==typeof n&&i.push(n)}(e,n,t[n])}))}function ne(e,t){ee[e]||(ee[e]={}),B(t)?Object.keys(t).forEach((function(n){$.indexOf(n)>-1&&function(e,t,n){var i=ee[e][t];if(i){var r=i.indexOf(n);r>-1&&i.splice(r,1)}}(e,n,t[n])})):delete ee[e]}function ie(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function re(e,t){return ee[e]&&ee[e][t]||[]}var oe=Y("_globalUniCloudListener"),ae="response",se="needLogin",ce="refreshToken",le="clientdb",ue="cloudfunction",de="cloudobject";function fe(e){return oe[e]||(oe[e]=[]),oe[e]}function he(e,t){var n=fe(e);n.includes(t)||n.push(t)}function pe(e,t){var n=fe(e),i=n.indexOf(t);-1!==i&&n.splice(i,1)}function ge(e,t){for(var n=fe(e),i=0;i-1)return;var n=i.getLaunchOptionsSync(),r=n.scene,o=n.channel;e=o,t=r}}catch(e){}return{channel:e,scene:t}}function Ae(){var e=i.getLocale&&i.getLocale()||"en";if(ye)return A(A({},ye),{},{locale:e,LOCALE:e});for(var t=i.getSystemInfoSync(),n=t.deviceId,r=t.osName,o=t.uniPlatform,a=t.appId,s=["pixelRatio","brand","model","system","language","version","platform","host","SDKVersion","swanNativeVersion","app","AppPlatform","fontSizeSetting"],c=0;c=400)return i(new me({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var r=e.data;if(r.error)return i(new me({code:r.error.code,message:r.error.message,requestId:t}));r.result=r.data,r.requestId=t,delete r.data,n(r)}}))}))}},ke={request:function(e){return i.request(e)},uploadFile:function(e){return i.uploadFile(e)},setStorageSync:function(e,t){return i.setStorageSync(e,t)},getStorageSync:function(e){return i.getStorageSync(e)},removeStorageSync:function(e){return i.removeStorageSync(e)},clearStorageSync:function(){return i.clearStorageSync()}},Se={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},Te=(0,o.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:Se,fr:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},es:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ja:Se},"zh-Hans"),Oe=Te.t,_e=function(){function e(t){w(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(Oe("uniCloud.init.paramRequired",{param:e}))})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=ke,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return m(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return we.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return Promise.resolve().then((function(){return n.hasAccessToken?t?n.requestWrapped(e):n.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):n.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=we.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),i={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,i["x-basement-token"]=this.accessToken),i["x-serverless-sign"]=we.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:i}}},{key:"getAccessToken",value:function(){var e=this;return"pending"===this._getAccessTokenPromiseStatus||(this._getAccessTokenPromiseStatus="pending",this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(t){return new Promise((function(n,i){t.result&&t.result.accessToken?(e.setAccessToken(t.result.accessToken),e._getAccessTokenPromiseStatus="fulfilled",n(e.accessToken)):(e._getAccessTokenPromiseStatus="rejected",i(new me({code:"AUTH_FAILED",message:"获取accessToken失败"})))}))}),(function(t){return e._getAccessTokenPromiseStatus="rejected",Promise.reject(t)}))),this._getAccessTokenPromise}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,i=e.formData,r=e.name,o=e.filePath,a=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:i,name:r,filePath:o,fileType:a,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):c(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new me({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(e){var t=this,n=e.filePath,i=e.cloudPath,r=e.fileType,o=void 0===r?"image":r,a=e.onUploadProgress,s=e.config;if("string"!==U(i))throw new me({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(i=i.trim()))throw new me({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});if(/:\/\//.test(i))throw new me({code:"INVALID_PARAM",message:"cloudPath不合法"});var c,l,u=s&&s.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:u,filename:i}).then((function(e){var i=e.result;c=i.id,l="https://"+i.cdnDomain+"/"+i.ossPath;var r={url:"https://"+i.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:i.accessKeyId,Signature:i.signature,host:i.host,id:c,key:i.ossPath,policy:i.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:o};return t.uploadFileToOSS(Object.assign({},r,{onUploadProgress:a}))})).then((function(){return t.reportOSSUpload({id:c})})).then((function(e){return new Promise((function(t,i){e.success?t({success:!0,filePath:n,fileID:l}):i(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:t[0]})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new me({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),Pe={init:function(e){var t=new _e(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},Ce="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(be||(be={}));var Ee,Fe=function(){},Ie=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new me({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,i){return e?n(e):t(i)}}));return e.promise=n,e};function Le(e){return void 0===e}function De(e){return"[object Null]"===Object.prototype.toString.call(e)}function Me(e){var t,n,i=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),r=p(i);try{for(r.s();!(n=r.n()).done;){var o=n.value,a=o.isMatch,s=o.genAdapter,c=o.runtime;if(a())return{adapter:s(),runtime:c}}}catch(l){r.e(l)}finally{r.f()}}!function(e){e.WEB="web",e.WX_MP="wx_mp"}(Ee||(Ee={}));var Re={adapter:null,runtime:void 0},Ke=["anonymousUuidKey"],je=function(e){k(n,e);var t=S(n);function n(){var e;return w(this,n),e=t.call(this),Re.adapter.root.tcbObject||(Re.adapter.root.tcbObject={}),e}return m(n,[{key:"setItem",value:function(e,t){Re.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return Re.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete Re.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete Re.adapter.root.tcbObject}}]),n}(Fe);function ze(e,t){switch(e){case"local":return t.localStorage||new je;case"none":return new je;default:return t.sessionStorage||new je}}var Ue=function(){function e(t){if(w(this,e),!this._storage){this._persistence=Re.adapter.primaryStorage||t.persistence,this._storage=ze(this._persistence,Re.adapter);var n="access_token_".concat(t.env),i="access_token_expire_".concat(t.env),r="refresh_token_".concat(t.env),o="anonymous_uuid_".concat(t.env),a="login_type_".concat(t.env),s="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:i,refreshTokenKey:r,anonymousUuidKey:o,loginTypeKey:a,userInfoKey:s}}}return m(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=ze(e,Re.adapter);for(var i in this.keys){var r=this.keys[i];if(!t||!Ke.includes(i)){var o=this._storage.getItem(r);Le(o)||De(o)||(n.setItem(r,o),this._storage.removeItem(r))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var i={version:n||"localCachev1",content:t},r=JSON.stringify(i);try{this._storage.setItem(e,r)}catch(e){throw e}}}},{key:"getStore",value:function(e,t){try{if(!this._storage)return}catch(e){return""}t=t||"localCachev1";var n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}},{key:"removeStore",value:function(e){this._storage.removeItem(e)}}]),e}(),Be={},Ne={};function We(e){return Be[e]}var He=function e(t,n){w(this,e),this.data=n||null,this.name=t},Ze=function(e){k(n,e);var t=S(n);function n(e,i){var r;return w(this,n),r=t.call(this,"error",{error:e,data:i}),r.error=e,r}return n}(He),Ve=new(function(){function e(){w(this,e),this._listeners={}}return m(e,[{key:"on",value:function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}},{key:"off",value:function(e,t){return function(e,t,n){if(n&&n[e]){var i=n[e].indexOf(t);-1!==i&&n[e].splice(i,1)}}(e,t,this._listeners),this}},{key:"fire",value:function(e,t){if(e instanceof Ze)return console.error(e.error),this;var n="string"==typeof e?new He(e,t||{}):e,i=n.name;if(this._listens(i)){n.target=this;var r,o=this._listeners[i]?u(this._listeners[i]):[],a=p(o);try{for(a.s();!(r=a.n()).done;){var s=r.value;s.call(this,n)}}catch(c){a.e(c)}finally{a.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function qe(e,t){Ve.on(e,t)}function Je(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ve.fire(e,t)}function Xe(e,t){Ve.off(e,t)}var Ge,Qe="loginStateChanged",Ye="loginStateExpire",$e="loginTypeChanged",et="anonymousConverted",tt="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Ge||(Ge={}));var nt=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],it={"X-SDK-Version":"1.3.5"};function rt(e,t,n){var i=e[t];e[t]=function(t){var r={},o={};n.forEach((function(n){var i=n.call(e,t),a=i.data,s=i.headers;Object.assign(r,a),Object.assign(o,s)}));var a=t.data;return a&&function(){var e;if(e=a,"[object FormData]"!==Object.prototype.toString.call(e))t.data=A(A({},a),r);else for(var n in r)a.append(n,r[n])}(),t.headers=A(A({},t.headers||{}),o),i.call(e,t)}}function ot(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:A(A({},it),{},{"x-seqid":e})}}var at=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,e),this.config=n,this._reqClass=new Re.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=We(this.config.env),this._localCache=(t=this.config.env,Ne[t]),rt(this._reqClass,"post",[ot]),rt(this._reqClass,"upload",[ot]),rt(this._reqClass,"download",[ot])}return m(e,[{key:"post",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.post(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"upload",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.upload(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"download",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.download(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refreshAccessToken",value:function(){var e=l(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),e.prev=1,e.next=4,this._refreshAccessTokenPromise;case 4:t=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),n=e.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!n){e.next=12;break}throw n;case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"_refreshAccessToken",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s,c,l,u,d,f,h,p;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,o=t.refreshTokenKey,a=t.loginTypeKey,s=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(i),c=this._cache.getStore(o),c){e.next=5;break}throw new me({message:"未登录CloudBase"});case 5:return l={refresh_token:c},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",l);case 8:if(u=e.sent,!u.data.code){e.next=21;break}if(d=u.data.code,"SIGN_PARAM_INVALID"!==d&&"REFRESH_TOKEN_EXPIRED"!==d&&"INVALID_REFRESH_TOKEN"!==d){e.next=20;break}if(this._cache.getStore(a)!==Ge.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==d){e.next=19;break}return f=this._cache.getStore(s),h=this._cache.getStore(o),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:f,refresh_token:h});case 17:return p=e.sent,e.abrupt("return",(this.setRefreshToken(p.refresh_token),this._refreshAccessToken()));case 19:Je(Ye),this._cache.removeStore(o);case 20:throw new me({code:u.data.code,message:"刷新access token失败:".concat(u.data.code)});case 21:if(!u.data.access_token){e.next=23;break}return e.abrupt("return",(Je(tt),this._cache.setStore(n,u.data.access_token),this._cache.setStore(i,u.data.access_token_expire+Date.now()),{accessToken:u.data.access_token,accessTokenExpire:u.data.access_token_expire}));case 23:u.data.refresh_token&&(this._cache.removeStore(o),this._cache.setStore(o,u.data.refresh_token),this._refreshAccessToken());case 24:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAccessToken",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,o=t.refreshTokenKey,this._cache.getStore(o)){e.next=3;break}throw new me({message:"refresh token不存在,登录状态异常"});case 3:if(a=this._cache.getStore(n),s=this._cache.getStore(i),c=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(a,s);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}c=!1;case 12:return e.abrupt("return",(!a||!s||s2&&void 0!==arguments[2]?arguments[2]:{},i=/\?/.test(t),r="";for(var o in n)""===r?!i&&(t+="?"):r+="&",r+="".concat(o,"=").concat(encodeURIComponent(n[o]));return/^http(s)?\:\/\//.test(t+=r)?t:"".concat(e).concat(t)}(Ce,"//tcb-api.tencentcloudapi.com/web",y),v&&(m+=v),e.next=22,this.post(A({url:m,data:l},f));case 22:if(x=e.sent,b=x.header&&x.header["x-tcb-trace"],b&&this._localCache.setStore(o,b),(200===Number(x.status)||200===Number(x.statusCode))&&x.data){e.next=26;break}throw new me({code:"NETWORK_ERROR",message:"network request error"});case 26:return e.abrupt("return",x);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,i){return e.apply(this,arguments)}return t}()},{key:"send",value:function(){var e=l(r.default.mark((function e(t){var n,i,o,a=arguments;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 3:if(i=e.sent,"ACCESS_TOKEN_EXPIRED"!==i.data.code||-1!==nt.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(o=e.sent,!o.data.code){e.next=12;break}throw new me({code:o.data.code,message:o.data.message});case 12:return e.abrupt("return",o.data);case 13:if(!i.data.code){e.next=15;break}throw new me({code:i.data.code,message:i.data.message});case 15:return e.abrupt("return",i.data);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,r=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(i),this._cache.setStore(r,e)}}]),e}(),st={};function ct(e){return st[e]}var lt=function(){function e(t){w(this,e),this.config=t,this._cache=We(t.env),this._request=ct(t.env)}return m(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,i=t.accessTokenExpireKey,r=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(i),this._cache.setStore(r,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,i=n.accessTokenKey,r=n.accessTokenExpireKey;this._cache.setStore(i,e),this._cache.setStore(r,t)}},{key:"refreshUserInfo",value:function(){var e=l(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e)}}]),e}(),ut=function(){function e(t){if(w(this,e),!t)throw new me({code:"PARAM_ERROR",message:"envId is not defined"});this._envId=t,this._cache=We(this._envId),this._request=ct(this._envId),this.setUserInfo()}return m(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new me({code:"PARAM_ERROR",message:"ticket must be string"});return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new me({code:"PARAM_ERROR",message:"username must be a string"});return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,i=!1,o=n.users,e.abrupt("return",(o.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(i=!0)})),{users:o,hasPrimaryUid:i}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setPrimaryUid",value:function(e){return this._request.send("auth.setPrimaryUid",{uid:e})}},{key:"unlink",value:function(e){return this._request.send("auth.unlink",{platform:e})}},{key:"update",value:function(){var e=l(r.default.mark((function e(t){var n,i,o,a,s,c,l,u;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,i=t.gender,o=t.avatarUrl,a=t.province,s=t.country,c=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:i,avatarUrl:o,province:a,country:s,city:c});case 8:l=e.sent,u=l.data,this.setLocalUserInfo(u);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refresh",value:function(){var e=l(r.default.mark((function e(){var t,n;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setUserInfo",value:function(){var e=this,t=this._cache.keys.userInfoKey,n=this._cache.getStore(t);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(t){e[t]=n[t]})),this.location={country:n.country,province:n.province,city:n.city}}},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e),this.setUserInfo()}}]),e}(),dt=function(){function e(t){if(w(this,e),!t)throw new me({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=We(t);var n=this._cache.keys,i=n.refreshTokenKey,r=n.accessTokenKey,o=n.accessTokenExpireKey,a=this._cache.getStore(i),s=this._cache.getStore(r),c=this._cache.getStore(o);this.credential={refreshToken:a,accessToken:s,accessTokenExpire:c},this.user=new ut(t)}return m(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===Ge.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===Ge.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===Ge.WECHAT||this.loginType===Ge.WECHAT_OPEN||this.loginType===Ge.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),ft=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,i=t.refreshTokenKey,o=this._cache.getStore(n)||void 0,a=this._cache.getStore(i)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:o,refresh_token:a});case 8:if(s=e.sent,!s.uuid||!s.refresh_token){e.next=20;break}return this._setAnonymousUUID(s.uuid),this.setRefreshToken(s.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return Je(Qe),Je($e,{env:this.config.env,loginType:Ge.ANONYMOUS,persistence:"local"}),c=new dt(this.config.env),e.next=19,c.user.refresh();case 19:return e.abrupt("return",c);case 20:throw new me({message:"匿名登录失败"});case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=l(r.default.mark((function e(t){var n,i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,i=n.anonymousUuidKey,o=n.refreshTokenKey,a=this._cache.getStore(i),s=this._cache.getStore(o),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:a,refresh_token:s,ticket:t});case 7:if(c=e.sent,!c.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(c.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return Je(et,{env:this.config.env}),Je($e,{loginType:Ge.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:c.refresh_token}});case 16:throw new me({message:"匿名转化失败"});case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_setAnonymousUUID",value:function(e){var t=this._cache.keys,n=t.anonymousUuidKey,i=t.loginTypeKey;this._cache.removeStore(n),this._cache.setStore(n,e),this._cache.setStore(i,Ge.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(lt),ht=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({param:"PARAM_ERROR",message:"ticket must be a string"});case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(i=e.sent,!i.refresh_token){e.next=15;break}return this.setRefreshToken(i.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return Je(Qe),Je($e,{env:this.config.env,loginType:Ge.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new dt(this.config.env));case 15:throw new me({message:"自定义登录失败"});case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),n}(lt),pt=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(t,n){var i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({code:"PARAM_ERROR",message:"email must be a string"});case 2:return i=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(i)||""});case 5:if(o=e.sent,a=o.refresh_token,s=o.access_token,c=o.access_token_expire,!a){e.next=22;break}if(this.setRefreshToken(a),!s||!c){e.next=15;break}this.setAccessToken(s,c),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return Je(Qe),Je($e,{env:this.config.env,loginType:Ge.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new dt(this.config.env));case 22:throw o.code?new me({code:o.code,message:"邮箱登录失败: ".concat(o.message)}):new me({message:"邮箱登录失败"});case 23:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"activate",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.activateEndUserMail",{token:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetPasswordWithToken",value:function(){var e=l(r.default.mark((function e(t,n){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:t,newPassword:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(lt),gt=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"signIn",value:function(){var e=l(r.default.mark((function e(t,n){var i,o,a,s,c;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({code:"PARAM_ERROR",message:"username must be a string"});case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),i=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:Ge.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(i)||""});case 6:if(o=e.sent,a=o.refresh_token,s=o.access_token_expire,c=o.access_token,!a){e.next=23;break}if(this.setRefreshToken(a),!c||!s){e.next=16;break}this.setAccessToken(c,s),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return Je(Qe),Je($e,{env:this.config.env,loginType:Ge.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new dt(this.config.env));case 23:throw o.code?new me({code:o.code,message:"用户名密码登录失败: ".concat(o.message)}):new me({message:"用户名密码登录失败"});case 24:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(lt),vt=function(){function e(t){w(this,e),this.config=t,this._cache=We(t.env),this._request=ct(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),qe($e,this._onLoginTypeChanged)}return m(e,[{key:"anonymousAuthProvider",value:function(){return new ft(this.config)}},{key:"customAuthProvider",value:function(){return new ht(this.config)}},{key:"emailAuthProvider",value:function(){return new pt(this.config)}},{key:"usernameAuthProvider",value:function(){return new gt(this.config)}},{key:"signInAnonymously",value:function(){var e=l(r.default.mark((function e(){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new ft(this.config).signIn());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signInWithEmailAndPassword",value:function(){var e=l(r.default.mark((function e(t,n){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new pt(this.config).signIn(t,n));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"signInWithUsernameAndPassword",value:function(e,t){return new gt(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new ft(this.config)),qe(et,this._onAnonymousConverted),e.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"signOut",value:function(){var e=l(r.default.mark((function e(){var t,n,i,o,a,s;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==Ge.ANONYMOUS){e.next=2;break}throw new me({message:"匿名用户不支持登出操作"});case 2:if(t=this._cache.keys,n=t.refreshTokenKey,i=t.accessTokenKey,o=t.accessTokenExpireKey,a=this._cache.getStore(n),a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this._request.send("auth.logout",{refresh_token:a});case 7:return s=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(i),this._cache.removeStore(o),Je(Qe),Je($e,{env:this.config.env,loginType:Ge.NULL,persistence:this.config.persistence}),s));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signUpWithEmailAndPassword",value:function(){var e=l(r.default.mark((function e(t,n){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:t,password:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"sendPasswordResetEmail",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onLoginStateChanged",value:function(e){var t=this;qe(Qe,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){qe(Ye,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){qe(tt,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){qe(et,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;qe($e,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=l(r.default.mark((function e(){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.getAccessToken();case 2:return e.t0=e.sent.accessToken,e.t1=this.config.env,e.abrupt("return",{accessToken:e.t0,env:e.t1});case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"hasLoginState",value:function(){var e=this._cache.keys.refreshTokenKey;return this._cache.getStore(e)?new dt(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=l(r.default.mark((function e(t){var n,i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new me({code:"PARAM_ERROR",message:"username must be a string"});case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,i=n.data,e.abrupt("return",i&&i.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var e=l(r.default.mark((function e(t){return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new ht(this.config).signIn(t));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"shouldRefreshAccessToken",value:function(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(e){return e.code?e:A(A({},e.data),{},{requestId:e.seqId})}))}},{key:"getAuthHeader",value:function(){var e=this._cache.keys,t=e.refreshTokenKey,n=e.accessTokenKey,i=this._cache.getStore(t);return{"x-cloudbase-credentials":this._cache.getStore(n)+"/@@/"+i}}},{key:"_onAnonymousConverted",value:function(e){var t=e.data.env;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(e){var t=e.data,n=t.loginType,i=t.persistence,r=t.env;r===this.config.env&&(this._cache.updatePersistence(i),this._cache.setStore(this._cache.keys.loginTypeKey,n))}},{key:"currentUser",get:function(){var e=this.hasLoginState();return e&&e.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),yt=function(e,t){t=t||Ie();var n=ct(this.config.env),i=e.cloudPath,r=e.filePath,o=e.onUploadProgress,a=e.fileType,s=void 0===a?"image":a;return n.send("storage.getUploadMetadata",{path:i}).then((function(e){var a=e.data,c=a.url,l=a.authorization,u=a.token,d=a.fileId,f=a.cosFileId,h=e.requestId,p={key:i,signature:l,"x-cos-meta-fileid":f,success_action_status:"201","x-cos-security-token":u};n.upload({url:c,data:p,file:r,name:i,fileType:s,onUploadProgress:o}).then((function(e){201===e.statusCode?t(null,{fileID:d,requestId:h}):t(new me({code:"STORAGE_REQUEST_FAIL",message:"STORAGE_REQUEST_FAIL: ".concat(e.data)}))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},mt=function(e,t){t=t||Ie();var n=ct(this.config.env),i=e.cloudPath;return n.send("storage.getUploadMetadata",{path:i}).then((function(e){t(null,e)})).catch((function(e){t(e)})),t.promise},xt=function(e,t){var n=e.fileList;if(t=t||Ie(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var i,r=p(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(!o||"string"!=typeof o)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(s){r.e(s)}finally{r.f()}var a={fileid_list:n};return ct(this.config.env).send("storage.batchDeleteFile",a).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},At=function(e,t){var n=e.fileList;t=t||Ie(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var i,r=[],o=p(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;"object"==typeof a?(a.hasOwnProperty("fileID")&&a.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),r.push({fileid:a.fileID,max_age:a.maxAge})):"string"==typeof a?r.push({fileid:a}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(c){o.e(c)}finally{o.f()}var s={file_list:r};return ct(this.config.env).send("storage.batchGetDownloadUrl",s).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},bt=function(){var e=l(r.default.mark((function e(t,n){var i,o,a,s;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.fileID,e.next=3,At.call(this,{fileList:[{fileID:i,maxAge:600}]});case 3:if(o=e.sent.fileList[0],"SUCCESS"===o.code){e.next=6;break}return e.abrupt("return",n?n(o):new Promise((function(e){e(o)})));case 6:if(a=ct(this.config.env),s=o.download_url,s=encodeURI(s),n){e.next=10;break}return e.abrupt("return",a.download({url:s}));case 10:return e.t0=n,e.next=13,a.download({url:s});case 13:e.t1=e.sent,(0,e.t0)(e.t1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),wt=function(e,t){var n,i=e.name,r=e.data,o=e.query,a=e.parse,s=e.search,c=t||Ie();try{n=r?JSON.stringify(r):""}catch(i){return Promise.reject(i)}if(!i)return Promise.reject(new me({code:"PARAM_ERROR",message:"函数名不能为空"}));var l={inQuery:o,parse:a,search:s,function_name:i,request_data:n};return ct(this.config.env).send("functions.invokeFunction",l).then((function(e){if(e.code)c(null,e);else{var t=e.data.response_data;if(a)c(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),c(null,{result:t,requestId:e.requestId})}catch(e){c(new me({message:"response data must be json"}))}}return c.promise})).catch((function(e){c(e)})),c.promise},kt={timeout:15e3,persistence:"session"},St={},Tt=function(){function e(t){w(this,e),this.config=t||this.config,this.authObj=void 0}return m(e,[{key:"init",value:function(t){switch(Re.adapter||(this.requestClient=new Re.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=A(A({},kt),t),!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new e(this.config)}},{key:"auth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.persistence;if(this.authObj)return this.authObj;var n,i=t||Re.adapter.primaryStorage||kt.persistence;return i!==this.config.persistence&&(this.config.persistence=i),function(e){var t=e.env;Be[t]=new Ue(e),Ne[t]=new Ue(A(A({},e),{},{persistence:"local"}))}(this.config),n=this.config,st[n.env]=new at(n),this.authObj=new vt(this.config),this.authObj}},{key:"on",value:function(e,t){return qe.apply(this,[e,t])}},{key:"off",value:function(e,t){return Xe.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return wt.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return xt.apply(this,[e,t])}},{key:"getTempFileURL",value:function(e,t){return At.apply(this,[e,t])}},{key:"downloadFile",value:function(e,t){return bt.apply(this,[e,t])}},{key:"uploadFile",value:function(e,t){return yt.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return mt.apply(this,[e,t])}},{key:"registerExtension",value:function(e){St[e.name]=e}},{key:"invokeExtension",value:function(){var e=l(r.default.mark((function e(t,n){var i;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=St[t],i){e.next=3;break}throw new me({message:"扩展".concat(t," 必须先注册")});case 3:return e.next=5,i.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"useAdapters",value:function(e){var t=Me(e)||{},n=t.adapter,i=t.runtime;n&&(Re.adapter=n),i&&(Re.runtime=i)}}]),e}(),Ot=new Tt;function _t(e,t,n){void 0===n&&(n={});var i=/\?/.test(t),r="";for(var o in n)""===r?!i&&(t+="?"):r+="&",r+=o+"="+encodeURIComponent(n[o]);return/^http(s)?:\/\//.test(t+=r)?t:""+e+t}var Pt=function(){function e(){w(this,e)}return m(e,[{key:"post",value:function(e){var t=e.url,n=e.data,i=e.headers;return new Promise((function(e,r){ke.request({url:_t("https:",t),data:n,method:"POST",header:i,success:function(t){e(t)},fail:function(e){r(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var i=e.url,r=e.file,o=e.data,a=e.headers,s=e.fileType,c=ke.uploadFile({url:_t("https:",i),name:"file",formData:Object.assign({},o),filePath:r,fileType:s,header:a,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&o.success_action_status&&(n.statusCode=parseInt(o.success_action_status,10)),t(n)},fail:function(e){H&&"mp-alipay"===W&&console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"),n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),Ct={setItem:function(e,t){ke.setStorageSync(e,t)},getItem:function(e){return ke.getStorageSync(e)},removeItem:function(e){ke.removeStorageSync(e)},clear:function(){ke.clearStorageSync()}},Et={genAdapter:function(){return{root:{},reqClass:Pt,localStorage:Ct,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};Ot.useAdapters(Et);var Ft=Ot,It=Ft.init;Ft.init=function(e){e.env=e.spaceId;var t=It.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;var n=t.auth;return t.auth=function(e){var t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(e){t[e]=ve(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var Lt=Ft;function Dt(){return{token:ke.getStorageSync("uni_id_token")||ke.getStorageSync("uniIdToken"),tokenExpired:ke.getStorageSync("uni_id_token_expired")}}function Mt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&ke.setStorageSync("uni_id_token",t),n&&ke.setStorageSync("uni_id_token_expired",n)}function Rt(){H&&"web"===W&&i.getStorageSync("__LAST_DCLOUD_APPID")!==X&&(i.setStorageSync("__LAST_DCLOUD_APPID",X),console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"),ke.removeStorageSync("uni_id_token"),ke.removeStorageSync("uniIdToken"),ke.removeStorageSync("uni_id_token_expired"))}var Kt=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"getAccessToken",value:function(){var e=this;return new Promise((function(t,n){var i="Anonymous_Access_token";e.setAccessToken(i),t(i)}))}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),i={"Content-Type":"application/json"};"auth"!==t&&(n.token=this.accessToken,i["x-basement-token"]=this.accessToken),i["x-serverless-sign"]=we.sign(n,this.config.clientSecret);var r=Ae();i["x-client-info"]=encodeURIComponent(JSON.stringify(r));var o=Dt(),a=o.token;return i["x-client-token"]=a,{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:JSON.parse(JSON.stringify(i))}}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,i=e.formData,r=e.name,o=e.filePath,a=e.fileType,s=e.onUploadProgress;return new Promise((function(e,c){var l=t.adapter.uploadFile({url:n,formData:i,name:r,filePath:o,fileType:a,success:function(t){t&&t.statusCode<400?e(t):c(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){c(new me({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&l&&"function"==typeof l.onProgressUpdate&&l.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,i=e.filePath,r=e.cloudPath,o=e.fileType,a=void 0===o?"image":o,s=e.onUploadProgress;if(!r)throw new me({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:r}).then((function(e){var r=e.result,o=r.url,c=r.formData,l=r.name;t=e.result.fileUrl;var u={url:o,formData:c,name:l,filePath:i,fileType:a};return n.uploadFileToOSS(Object.assign({},u,{onUploadProgress:s}))})).then((function(){return n.reportOSSUpload({cloudPath:r})})).then((function(e){return new Promise((function(n,r){e.success?n({success:!0,filePath:i,fileID:t}):r(new me({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList,n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}}]),n}(_e),jt={init:function(e){var t=new Kt(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function zt(e){var t,n=e.data;t=Ae();var i=JSON.parse(JSON.stringify(n||{}));if(Object.assign(i,{clientInfo:t}),!i.uniIdToken){var r=Dt(),o=r.token;o&&(i.uniIdToken=o)}return i}function Ut(e){var t=this,n=e.name,i=e.data,r=this.localAddress,o=this.localPort,a={aliyun:"aliyun",tencent:"tcb"}[this.config.provider],s=this.config.spaceId,c="http://".concat(r,":").concat(o,"/system/check-function"),l="http://".concat(r,":").concat(o,"/cloudfunctions/").concat(n);return new Promise((function(e,t){ke.request({method:"POST",url:c,data:{name:n,platform:W,provider:a,spaceId:s},timeout:3e3,success:function(t){e(t)},fail:function(){e({data:{code:"NETWORK_ERROR",message:"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"}})}})})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data,n=t||{},i=n.code,r=n.message;return{code:0===i?0:i||"SYS_ERR",message:r||"SYS_ERR"}})).then((function(e){var r=e.code,o=e.message;if(0!==r){switch(r){case"MODULE_ENCRYPTED":console.error("此云函数(".concat(n,")依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数"));break;case"FUNCTION_ENCRYPTED":console.error("此云函数(".concat(n,")已加密不可本地调试,自动切换为云端已部署的云函数"));break;case"ACTION_ENCRYPTED":console.error(o||"需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case"NETWORK_ERROR":var s="连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(s),new Error(s);case"SWITCH_TO_CLOUD":break;default:var c="检测本地调试服务出现错误:".concat(o,",请检查网络环境或重启客户端再试");throw console.error(c),new Error(c)}return t._originCallFunction({name:n,data:i})}return new Promise((function(e,n){var r=zt.call(t,{data:i});ke.request({method:"POST",url:l,data:{provider:a,platform:W,param:r},success:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.statusCode,r=t.data;return!i||i>=400?n(new me({code:r.code||"SYS_ERR",message:r.message||"request:fail"})):e({result:r})},fail:function(e){n(new me({code:e.code||e.errCode||"SYS_ERR",message:e.message||e.errMsg||"request:fail"}))}})}))}))}var Bt=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],Nt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(Nt.source);function Ht(e,t,n){return e.replace(new RegExp((i=t)&&Wt.test(i)?i.replace(Nt,"\\$&"):i,"g"),n);var i}function Zt(e){var t=e.functionName,n=e.result,i=e.logPvd;if(this.config.debugLog&&n&&n.requestId){var r=JSON.stringify({spaceId:this.config.spaceId,functionName:t,requestId:n.requestId});console.log("[".concat(i,"-request]").concat(r,"[/").concat(i,"-request]"))}}function Vt(e){var t=e.callFunction,n=function(n){var i=this,r=n.name;n.data=zt.call(e,{data:n.data});var o={aliyun:"aliyun",tencent:"tcb",tcb:"tcb"}[this.config.provider];return t.call(this,n).then((function(e){return e.errCode=0,Zt.call(i,{functionName:r,result:e,logPvd:o}),Promise.resolve(e)}),(function(e){return Zt.call(i,{functionName:r,result:e,logPvd:o}),e&&e.message&&(e.message=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=void 0===t?"":t,i=e.extraInfo,r=void 0===i?{}:i,o=e.formatter,a=void 0===o?[]:o,s=0;s-1||e[t].push(n)},off:function(t,n){e[t]=e[t]||[];var i=e[t].indexOf(n);-1!==i&&e[t].splice(i,1)}}}var Gt=["db.Geo","db.command","command.aggregate"];function Qt(e,t){return Gt.indexOf("".concat(e,".").concat(t))>-1}function Yt(e){switch(U(e)){case"array":return e.map((function(e){return Yt(e)}));case"object":return e._internalType===qt||Object.keys(e).forEach((function(t){e[t]=Yt(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function $t(e){return e&&e.content&&e.content.$method}var en=function(){function e(t,n,i){w(this,e),this.content=t,this.prevStage=n||null,this.udb=null,this._database=i}return m(e,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:Yt(e.$param)}}))}}},{key:"getAction",value:function(){var e=this.toJSON().$db.find((function(e){return"action"===e.$method}));return e&&e.$param&&e.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(e){return"action"!==e.$method}))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",value:function(){return this._send("add",Array.from(arguments))}},{key:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"_send",value:function(e,t){var n=this.getAction(),i=this.getCommand();if(i.$db.push({$method:e,$param:Yt(t)}),H){var r=i.$db.find((function(e){return"collection"===e.$method})),o=r&&r.$param;o&&1===o.length&&"string"==typeof r.$param[0]&&r.$param[0].indexOf(",")>-1&&console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。")}return this._database._callCloudFunction({action:n,command:i})}},{key:"isAggregate",get:function(){for(var e=this;e;){var t=$t(e),n=$t(e.prevStage);if("aggregate"===t&&"collection"===n||"pipeline"===t)return!0;e=e.prevStage}return!1}},{key:"isCommand",get:function(){for(var e=this;e;){if("command"===$t(e))return!0;e=e.prevStage}return!1}},{key:"isAggregateCommand",get:function(){for(var e=this;e;){var t=$t(e),n=$t(e.prevStage);if("aggregate"===t&&"command"===n)return!0;e=e.prevStage}return!1}},{key:"count",get:function(){if(!this.isAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return tn({$method:"count",$param:Yt(Array.from(arguments))},e,this._database)}}},{key:"remove",get:function(){if(!this.isCommand)return function(){return this._send("remove",Array.from(arguments))};var e=this;return function(){return tn({$method:"remove",$param:Yt(Array.from(arguments))},e,this._database)}}},{key:"set",get:function(){if(!this.isCommand)return function(){throw new Error("JQL禁止使用set方法")};var e=this;return function(){return tn({$method:"set",$param:Yt(Array.from(arguments))},e,this._database)}}}]),e}();function tn(e,t,n){return Jt(new en(e,t,n),{get:function(e,t){var i="db";return e&&e.content&&(i=e.content.$method),Qt(i,t)?tn({$method:t},e,n):function(){return tn({$method:t,$param:Yt(Array.from(arguments))},e,n)}}})}function nn(e){var t=e.path,n=e.method;return function(){function e(){w(this,e),this.param=Array.from(arguments)}return m(e,[{key:"toJSON",value:function(){return{$newDb:[].concat(u(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}}]),e}()}var rn=function(e){k(n,e);var t=S(n);function n(){return w(this,n),t.apply(this,arguments)}return m(n,[{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,i=e.command,r=e.multiCommand,o=e.queryList;function a(e,t){if(r&&o)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,i=void 0===n?{}:n;w(this,e),this._uniClient=i,this._authCallBacks={},this._dbCallBacks={},i.isDefault&&(this._dbCallBacks=Y("_globalUniCloudDatabaseCallback")),this.auth=Xt(this._authCallBacks),Object.assign(this,Xt(this._dbCallBacks)),this.env=Jt({},{get:function(e,t){return{$env:t}}}),this.Geo=Jt({},{get:function(e,t){return nn({path:["Geo"],method:t})}}),this.serverDate=nn({path:[],method:"serverDate"}),this.RegExp=nn({path:[],method:"RegExp"})}return m(e,[{key:"getCloudEnv",value:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}},{key:"_callback",value:function(e,t){var n=this._dbCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,u(t))}))}},{key:"_callbackAuth",value:function(e,t){var n=this._authCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,u(t))}))}},{key:"multiSend",value:function(){var e=Array.from(arguments),t=e.map((function(e){var t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}]),e}());function on(e){e.database=function(t){if(t&&Object.keys(t).length>0)return e.init(t).database();if(this._database)return this._database;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Jt(new e(t),{get:function(e,t){return Qt("db",t)?tn({$method:t},null,e):function(){return tn({$method:t,$param:Yt(Array.from(arguments))},null,e)}}})}(rn,{uniClient:e});return this._database=n,n}}var an="token无效,跳转登录页面",sn="token过期,跳转登录页面",cn={TOKEN_INVALID_TOKEN_EXPIRED:sn,TOKEN_INVALID_INVALID_CLIENTID:an,TOKEN_INVALID:an,TOKEN_INVALID_WRONG_TOKEN:an,TOKEN_INVALID_ANONYMOUS_USER:an},ln={"uni-id-token-expired":sn,"uni-id-check-token-failed":an,"uni-id-token-not-exist":an,"uni-id-check-device-feature-failed":an};function un(e,t){var n="";return n=e?"".concat(e,"/").concat(t):t,n.replace(/^\//,"")}function dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],i=[];return e.forEach((function(e){!0===e.needLogin?n.push(un(t,e.path)):!1===e.needLogin&&i.push(un(t,e.path))})),{needLoginPage:n,notNeedLoginPage:i}}function fn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;var n=t.list,i=e.split("?")[0].replace(/^\//,"");return n.some((function(e){return e.pagePath===i}))}var hn,pn=!!a.default.uniIdRouter,gn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.default,t=e.pages,n=void 0===t?[]:t,i=e.subPackages,r=void 0===i?[]:i,o=e.uniIdRouter,s=void 0===o?{}:o,c=e.tabBar,l=void 0===c?{}:c,d=s.loginPage,f=s.needLogin,h=void 0===f?[]:f,p=s.resToLogin,g=void 0===p||p,v=dn(n),y=v.needLoginPage,m=v.notNeedLoginPage,x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=[];return e.forEach((function(e){var i=e.root,r=e.pages,o=void 0===r?[]:r,a=dn(o,i),s=a.needLoginPage,c=a.notNeedLoginPage;t.push.apply(t,u(s)),n.push.apply(n,u(c))})),{needLoginPage:t,notNeedLoginPage:n}}(r),A=x.needLoginPage,b=x.notNeedLoginPage;return{loginPage:d,routerNeedLogin:h,resToLogin:g,needLoginPage:[].concat(u(y),u(A)),notNeedLoginPage:[].concat(u(m),u(b)),loginPageInTabBar:fn(d,l)}}(),vn=gn.loginPage,yn=gn.routerNeedLogin,mn=gn.resToLogin,xn=gn.needLoginPage,An=gn.notNeedLoginPage,bn=gn.loginPageInTabBar;function wn(e){var t=function(e){var t=getCurrentPages(),n=t[t.length-1].route,i=e.charAt(0),r=e.split("?")[0];if("/"===i)return r;var o=r.replace(/^\//,"").split("/"),a=n.split("/");a.pop();for(var s=0;s-1)&&(xn.indexOf(t)>-1||yn.some((function(t){return function(e,t){return new RegExp(t).test(e)}(e,t)})))}function kn(e,t){return"/"!==e.charAt(0)&&(e="/"+e),t?e.indexOf("?")>-1?e+"&uniIdRedirectUrl=".concat(encodeURIComponent(t)):e+"?uniIdRedirectUrl=".concat(encodeURIComponent(t)):e}function Sn(){for(var e=["navigateTo","redirectTo","reLaunch","switchTab"],t=function(t){var n=e[t];i.addInterceptor(n,{invoke:function(e){var t,r=Dt(),o=r.token,a=r.tokenExpired;if(o){if(a0)return setTimeout((function(){ge(se,t)}),0),e.url="",!1;if(!vn)return e;var l=kn(vn,t.uniIdRedirectUrl);if(bn){if("navigateTo"===n||"redirectTo"===n)return setTimeout((function(){i.switchTab({url:l})})),!1}else if("switchTab"===n)return setTimeout((function(){i.navigateTo({url:l})})),!1;e.url=l}return e}})},n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=fe(se),n=getCurrentPages(),r=n[n.length-1],o=r&&r.$page&&r.$page.fullPath;if(t.length>0)return ge(se,Object.assign({uniIdRedirectUrl:o},e));vn&&i.navigateTo({url:kn(vn,o)})}(n)}))}function On(e){e.onNeedLogin=function(e){he(se,e)},e.offNeedLogin=function(e){pe(se,e)},pn&&(Y("uni-cloud-status").needLoginInit||(Y("uni-cloud-status").needLoginInit=!0,function t(){var n=getCurrentPages();n&&n[0]?Sn.call(e):setTimeout((function(){t()}),30)}(),mn&&Tn.call(e)))}function _n(e){!function(e){e.onResponse=function(e){he(ae,e)},e.offResponse=function(e){pe(ae,e)}}(e),On(e),function(e){e.onRefreshToken=function(e){he(ce,e)},e.offRefreshToken=function(e){pe(ce,e)}}(e)}var Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Cn=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function En(){var e,t,n=Dt().token||"",i=n.split(".");if(!n||3!==i.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=i[1],decodeURIComponent(hn(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}return e.tokenExpired=1e3*e.exp,delete e.exp,delete e.iat,e}hn="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Cn.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,i,r="",o=0;o>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return r}:atob;var Fn=D((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",r="chooseAndUploadFile:fail";function o(e,t){return e.tempFiles.forEach((function(e,n){e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((function(e){return e.path}))),e}function a(e,t,i){var r=i.onChooseFile,o=i.onUploadProgress;return t.then((function(e){if(r){var t=r(e);if(void 0!==t)return Promise.resolve(t).then((function(t){return void 0===t?e:t}))}return e})).then((function(t){return!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var o=t.tempFiles,a=o.length,s=0;return new Promise((function(n){for(;s=a)!o.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var l=o[i];e.uploadFile({filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,onUploadProgress:function(e){e.index=i,e.tempFile=l,e.tempFilePath=l.path,r&&r(e)}}).then((function(e){l.url=e.fileID,i0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?a(e,function(e){var t=e.count,n=e.sizeType,a=e.sourceType,s=void 0===a?["album","camera"]:a,c=e.extension;return new Promise((function(e,a){i.chooseImage({count:t,sizeType:n,sourceType:s,extension:c,success:function(t){e(o(t,"image"))},fail:function(e){a({errMsg:e.errMsg.replace("chooseImage:fail",r)})}})}))}(t),t):"video"===t.type?a(e,function(e){var t=e.camera,n=e.compressed,a=e.maxDuration,s=e.sourceType,c=void 0===s?["album","camera"]:s,l=e.extension;return new Promise((function(e,s){i.chooseVideo({camera:t,compressed:n,maxDuration:a,sourceType:c,extension:l,success:function(t){var n=t.tempFilePath,i=t.duration,r=t.size,a=t.height,s=t.width;e(o({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:r,type:t.tempFile&&t.tempFile.type||"",width:s,height:a,duration:i,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){s({errMsg:e.errMsg.replace("chooseVideo:fail",r)})}})}))}(t),t):a(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,a){var s=i.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(s=wx.chooseMessageFile),"function"!=typeof s)return a({errMsg:r+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});s({type:"all",count:t,extension:n,success:function(t){e(o(t))},fail:function(e){a({errMsg:e.errMsg.replace("chooseFile:fail",r)})}})}))}(t),t)}}})),In=L(Fn),Ln="manual";function Dn(e){return{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},spaceInfo:{type:Object,default:function(){return{}}},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){if(e.loadtime!==Ln){for(var i=!1,r=[],o=2;o0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,i=void 0!==n&&n,r=t.success,o=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,o=n.data,a=n.count;e.getcount&&(e.mixinDatacomPage.count=a),e.mixinDatacomHasMore=o.length0&&void 0!==arguments[0]?arguments[0]:{},i=e.database(this.spaceInfo),r=n.action||this.action;r&&(i=i.action(r));var o=n.collection||this.collection;i=Array.isArray(o)?(t=i).collection.apply(t,u(o)):i.collection(o);var a=n.where||this.where;a&&Object.keys(a).length&&(i=i.where(a));var s=n.field||this.field;s&&(i=i.field(s));var c=n.foreignKey||this.foreignKey;c&&(i=i.foreignKey(c));var l=n.groupby||this.groupby;l&&(i=i.groupBy(l));var d=n.groupField||this.groupField;d&&(i=i.groupField(d)),!0===(void 0!==n.distinct?n.distinct:this.distinct)&&(i=i.distinct());var f=n.orderby||this.orderby;f&&(i=i.orderBy(f));var h=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,p=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,g=void 0!==n.getcount?n.getcount:this.getcount,v=void 0!==n.gettree?n.gettree:this.gettree,y=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,m={getCount:g},x={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return v&&(m.getTree=x),y&&(m.getTreePath=x),i=i.skip(p*(h-1)).limit(p).get(m),i}}}}function Mn(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.customUI=t.customUI||e.customUI,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);var o=n,a=o.customUI,s=o.loadingOptions,c=o.errorOptions,u=!a;return new Proxy({},{get:function(n,o){return function(){var n=l(r.default.mark((function n(){var d,f,h,p,g,v,y,m,x,b,w,k=arguments;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:for(u&&i.showLoading({title:s.title,mask:s.mask}),f=k.length,h=new Array(f),p=0;p0&&void 0!==l[0]?l[0]:{},n=t.title,o=t.content,a=t.showCancel,s=t.cancelText,c=t.confirmText,e.abrupt("return",new Promise((function(e,t){i.showModal({title:n,content:o,showCancel:a,cancelText:s,confirmText:c,success:function(t){e(t)},fail:function(){e({confirm:!1,cancel:!0})}})})));case 2:case"end":return e.stop()}}),e)})))({title:"提示",content:y,showCancel:c.retry,cancelText:"取消",confirmText:c.retry?"重试":"确定"});case 22:if(x=n.sent,b=x.confirm,!c.retry||!b){n.next=26;break}return n.abrupt("return",a.apply(void 0,h));case 26:throw w=new me({code:v,message:y,requestId:d.requestId}),w.detail=d.result,ge(ae,{type:de,content:w}),w;case 28:return n.abrupt("return",(ge(ae,{type:de,content:d.result}),d.result));case 29:case"end":return n.stop()}}),n,null,[[2,8]])})));function a(){return n.apply(this,arguments)}return a}()}})}}function Rn(e,t){return Kn.apply(this,arguments)}function Kn(){return Kn=l(r.default.mark((function e(t,n){var i,o,a;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i="http://".concat(t,":").concat(n,"/system/ping"),e.prev=1,e.next=4,a={url:i,timeout:500},new Promise((function(e,t){ke.request(A(A({},a),{},{success:function(t){e(t)},fail:function(e){t(e)}}))}));case 4:return o=e.sent,e.abrupt("return",!(!o.data||0!==o.data.code));case 8:return e.prev=8,e.t0=e["catch"](1),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),Kn.apply(this,arguments)}function jn(e){if(!e.initUniCloudStatus||"rejected"===e.initUniCloudStatus){var t,n=Promise.resolve();t=1,n=new Promise((function(e,n){setTimeout((function(){e()}),t)})),e.isReady=!1,e.isDefault=!1;var o=e.auth();e.initUniCloudStatus="pending",e.initUniCloud=n.then((function(){return o.getLoginState()})).then((function(e){return e?Promise.resolve():o.signInAnonymously()})).then((function(){if(!H)return Promise.resolve();if("app"===W&&"ios"===i.getSystemInfoSync().osName){var t=i.getSystemInfoSync(),n=t.osName,o=t.osVersion;"ios"===n&&function(e){if(!e||"string"!=typeof e)return 0;var t=e.match(/^(\d+)./);return t&&t[1]?parseInt(t[1]):0}(o)>=14&&console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)")}if(H&&e.debugInfo){var a=e.debugInfo,s=a.address,c=a.servePort;return function(){var e=l(r.default.mark((function e(t,n){var i,o,a;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:o=0;case 1:if(!(o0&&void 0!==arguments[0]?arguments[0]:{},n=t.address,i=t.port;if(!H)return Promise.resolve();var r=console["app"===W?"error":"warn"];if(n)e.localAddress=n,e.localPort=i;else if(e.debugInfo){var o="";"remote"===e.debugInfo.initialLaunchType?(e.debugInfo.forceRemote=!0,o="当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs"):o="无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs","web"===W&&(o+="\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"),0===W.indexOf("mp-")&&(o+="\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"),r(o)}})).then((function(){Rt(),e.isReady=!0,e.initUniCloudStatus="fulfilled"})).catch((function(t){console.error(t),e.initUniCloudStatus="rejected"}))}}var zn=new(function(){function e(){w(this,e)}return m(e,[{key:"init",value:function(e){var t={},n=H&&("web"===W&&navigator.userAgent.indexOf("HBuilderX")>0||"app"===W);switch(e.provider){case"tcb":case"tencent":t=Lt.init(Object.assign(e,{debugLog:n}));break;case"aliyun":t=Pe.init(Object.assign(e,{debugLog:n}));break;case"private":t=jt.init(Object.assign(e,{debugLog:n}));break;default:throw new Error("未提供正确的provider参数")}var i=V;return H&&i&&!i.code&&(t.debugInfo=i),jn(t),t.reInit=function(){jn(this)},Vt(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),on(t),function(e){e.getCurrentUserInfo=En,e.chooseAndUploadFile=In.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Dn(e)}}),e.importObject=Mn(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(e){if(t[e]){var n=t[e];t[e]=function(){return t.reInit(),n.apply(t,Array.from(arguments))},t[e]=ve(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=q,t={};if(1===e.length)t=e[0],zn=zn.init(t),zn.isDefault=!0;else{var n,i=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":J?"应用未关联服务空间,请在uniCloud目录右键关联服务空间":"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间",i.forEach((function(e){zn[e]=function(){return console.error(n),Promise.reject(new me({code:"SYS_ERR",message:n}))}}))}Object.assign(zn,{get mixinDatacom(){return Dn(zn)}}),_n(zn),zn.addInterceptor=te,zn.removeInterceptor=ne,H&&"web"===W&&(window.uniCloud=zn)})();var Un=zn;t.default=Un}).call(this,n(2),n(1)["default"])},154:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={pages:[{path:"pages/login/login",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/index/index",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/user/user",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"",navigationBarTextStyle:"white"}},{path:"pages/task/taskreceive",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/task/taskapply",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/demo/demo",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#317AFF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/dadui/jiancha/jiancha",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}},{path:"pages/dadui/jiuyuan/jiuyuan",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}}],subPackages:[{root:"pages/changePassword",pages:[{path:"changePassword",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}}]},{root:"pages/task_jian",pages:[{path:"implement",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}}]},{root:"pages/task_jian",pages:[{path:"details",style:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#57B5FF",navigationBarTitleText:"消防一体化综合治理平台",navigationBarTextStyle:"white"}}]}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},tabBar:{color:"#353535",selectedColor:"#5187FF",list:[{pagePath:"pages/index/index",iconPath:"static/tab/43251.png",selectedIconPath:"static/tab/4325.png",text:"工作任务"},{pagePath:"pages/task/taskapply",iconPath:"static/tab/43281.png",selectedIconPath:"static/tab/4328.png",text:"申请"},{pagePath:"pages/task/taskreceive",iconPath:"static/tab/43281.png",selectedIconPath:"static/tab/4328.png",text:"领取"},{pagePath:"pages/user/user",iconPath:"static/tab/user.png",selectedIconPath:"static/tab/user1.png",text:"我的"}]}};t.default=i},155:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={appid:"__UNI__915967A"};t.default=i},156:function(e,t,n){"use strict";function i(e,t){return c(e)||s(e,t)||o(e,t)||r()}function r(){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 o(e,t){if(e){if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n1?t-1:0),i=1;ie.end.x||t.end.xe.start.y||t.start.y1&&(r.extra.mount.widthRatio>2&&(r.extra.mount.widthRatio=2),a+=(r.extra.mount.widthRatio-1)*n.eachSpacing);var s=t;return t>=0?(s=0,e.uevent.trigger("scrollLeft"),e.scrollOption.position="left",r.xAxis.scrollPosition="left"):Math.abs(t)>=a-o?(s=o-a,e.uevent.trigger("scrollRight"),e.scrollOption.position="right",r.xAxis.scrollPosition="right"):(e.scrollOption.position=t,r.xAxis.scrollPosition=t),s}function v(e,t,n){function i(e){while(e<0)e+=2*Math.PI;while(e>2*Math.PI)e-=2*Math.PI;return e}return e=i(e),t=i(t),n=i(n),t>n&&(n+=2*Math.PI,e=t&&e<=n}function y(e,t){function n(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].y>=Math.max(e[t-1].y,e[t+1].y)||e[t].y<=Math.min(e[t-1].y,e[t+1].y))}function i(e,t){return!(!e[t-1]||!e[t+1])&&(e[t].x>=Math.max(e[t-1].x,e[t+1].x)||e[t].x<=Math.min(e[t-1].x,e[t+1].x))}var r=.2,o=.2,a=null,s=null,c=null,l=null;if(t<1?(a=e[0].x+(e[1].x-e[0].x)*r,s=e[0].y+(e[1].y-e[0].y)*r):(a=e[t].x+(e[t+1].x-e[t-1].x)*r,s=e[t].y+(e[t+1].y-e[t-1].y)*r),t>e.length-3){var u=e.length-1;c=e[u].x-(e[u].x-e[u-1].x)*o,l=e[u].y-(e[u].y-e[u-1].y)*o}else c=e[t+1].x-(e[t+2].x-e[t].x)*o,l=e[t+1].y-(e[t+2].y-e[t].y)*o;return n(e,t+1)&&(l=e[t+1].y),n(e,t)&&(s=e[t].y),i(e,t+1)&&(c=e[t+1].x),i(e,t)&&(a=e[t].x),(s>=Math.max(e[t].y,e[t+1].y)||s<=Math.min(e[t].y,e[t+1].y))&&(s=e[t].y),(l>=Math.max(e[t].y,e[t+1].y)||l<=Math.min(e[t].y,e[t+1].y))&&(l=e[t+1].y),(a>=Math.max(e[t].x,e[t+1].x)||a<=Math.min(e[t].x,e[t+1].x))&&(a=e[t].x),(c>=Math.max(e[t].x,e[t+1].x)||c<=Math.min(e[t].x,e[t+1].x))&&(c=e[t+1].x),{ctrA:{x:a,y:s},ctrB:{x:c,y:l}}}function m(e,t,n){return{x:n.x+e,y:n.y-t}}function x(e,t){if(t)while(d.isCollision(e,t))e.start.x>0?e.start.y--:e.start.x<0||e.start.y>0?e.start.y++:e.start.y--;return e}function A(e,t,n){var i=[];if(e.length>0&&e[0].data.constructor.toString().indexOf("Array")>-1){t._pieSeries_=e;for(var r=e[0].data,o=0;o=1e4?1e3:i>=1e3?100:i>=100?10:i>=10?5:i>=1?1:i>=.1?.1:i>=.01?.01:i>=.001?.001:i>=1e-4?1e-4:i>=1e-5?1e-5:1e-6,{minRange:h(e,"lower",n),maxRange:h(t,"upper",n)}}function S(e,t,n){var i=0;if(e=String(e),!1!==n&&void 0!==n&&n.setFontSize&&n.measureText)return n.setFontSize(t),n.measureText(e).width;e=e.split("");for(var r=0;r-1;if(o)for(var a=D(e),s=0;s5&&void 0!==arguments[5]?arguments[5]:{},a=t.chartData.calPoints?t.chartData.calPoints:[],s={};if(i.length>0){for(var c=[],l=0;l0&&(i=r[n]),{text:o.formatter?o.formatter(e,i,n,t):e.name+": "+e.data,color:e.color}})),f={x:Math.round(s.x),y:Math.round(s.y)};return{textList:d,offset:f}}function I(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.chartData.xAxisPoints[n]+t.chartData.eachSpacing/2,a=e.map((function(e){return{text:r.formatter?r.formatter(e,i[n],n,t):e.name+": "+e.data,color:e.color,disableLegend:!!e.disableLegend}}));a=a.filter((function(e){if(!0!==e.disableLegend)return e}));var s={x:Math.round(o),y:0};return{textList:a,offset:s}}function L(e,t,n,i,r,o){var a=n.chartData.calPoints,s=o.color.upFill,c=o.color.downFill,l=[s,s,c,s],u=[];t.map((function(t){0==i?t.data[1]-t.data[0]<0?l[1]=c:l[1]=s:(t.data[0]