(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-home-sign"],{"0a90":function(t,e,n){var r=n("a2c1");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("4f06").default;i("723d5c88",r,!0,{sourceMap:!1,shadowMode:!1})},"0b16":function(t,e,n){"use strict";var r=n("1985"),i=n("35e8");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),h=["%","/","?",";","#"].concat(l),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n("b383");function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?A+="x":A+=R[M];if(!A.match(d)){var N=L.slice(0,C),U=L.slice(C+1),F=R.match(p);F&&(N.push(F[1]),U.unshift(F[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var I=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+I,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[_])for(C=0,P=l.length;C0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var O=S.slice(-1)[0],C=(n.host||t.host||S.length>1)&&("."===O||".."===O)||""===O,T=0,j=S.length;j>=0;j--)O=S[j],"."===O?S.splice(j,1):".."===O?(S.splice(j,1),T++):T&&(S.splice(j,1),T--);if(!x&&!_)for(;T--;T)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),C&&"/"!==S.join("/").substr(-1)&&S.push("");var L=""===S[0]||S[0]&&"/"===S[0].charAt(0);if(E){n.hostname=n.host=L?"":S.length?S.shift():"";k=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");k&&(n.auth=k.shift(),n.host=n.hostname=k.shift())}return x=x||n.host&&S.length,x&&!L&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},1:function(t,e){},1904:function(t,e,n){"use strict";n.r(e);var r=n("627a"),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},1985:function(t,e,n){(function(t,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */(function(o){e&&e.nodeType,t&&t.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function v(t){throw new RangeError(f[t])}function g(t,e){var n=t.length,r=[];while(n--)r[n]=e(t[n]);return r}function y(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(h,".");var i=t.split("."),o=g(i,e).join(".");return r+o}function m(t){var e,n,r=[],i=0,o=t.length;while(i=55296&&e<=56319&&i65535&&(t-=65536,e+=p(t>>>10&1023|55296),t=56320|1023&t),e+=p(t),e})).join("")}function w(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,n){var r=0;for(t=n?d(t/700):t>>1,t+=d(t/e);t>455;r+=36)t=d(t/35);return d(r+36*t/(t+38))}function S(t){var e,n,r,i,o,a,s,c,l,h,f=[],p=t.length,g=0,y=128,m=72;for(n=t.lastIndexOf("-"),n<0&&(n=0),r=0;r=128&&v("not-basic"),f.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=p&&v("invalid-input"),c=w(t.charCodeAt(i++)),(c>=36||c>d((u-g)/a))&&v("overflow"),g+=c*a,l=s<=m?1:s>=m+26?26:s-m,cd(u/h)&&v("overflow"),a*=h}e=f.length+1,m=_(g-o,e,0==o),d(g/e)>u-y&&v("overflow"),y+=d(g/e),g%=e,f.splice(g++,0,y)}return b(f)}function E(t){var e,n,r,i,o,a,s,c,l,h,f,g,y,b,w,S=[];for(t=m(t),g=t.length,e=128,n=0,o=72,a=0;a=e&&fd((u-n)/y)&&v("overflow"),n+=(s-e)*y,e=s,a=0;au&&v("overflow"),f==e){for(c=n,l=36;;l+=36){if(h=l<=o?1:l>=o+26?26:l-o,c=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}})),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function c(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&S(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return y(i)||(i=l(t,i,r)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(y(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),_(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(n);if(0===a.length){if(S(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return t.stylize(Date.prototype.toString.call(n),"date");if(_(n))return h(n)}var c,w="",E=!1,k=["{","}"];if(d(n)&&(E=!0,k=["[","]"]),S(n)){var O=n.name?": "+n.name:"";w=" [Function"+O+"]"}return b(n)&&(w=" "+RegExp.prototype.toString.call(n)),x(n)&&(w=" "+Date.prototype.toUTCString.call(n)),_(n)&&(w=" "+h(n)),0!==a.length||E&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=E?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,w,k)):k[0]+w+k[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,n,r,i,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},u.get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=v(n)?l(t,u.value,null):l(t,u.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n"))):s=t.stylize("[Circular]","special")),m(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function v(t){return null===t}function g(t){return"number"===typeof t}function y(t){return"string"===typeof t}function m(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===E(t)}function w(t){return"object"===typeof t&&null!==t}function x(t){return w(t)&&"[object Date]"===E(t)}function _(t){return w(t)&&("[object Error]"===E(t)||t instanceof Error)}function S(t){return"function"===typeof t}function E(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(m(o)&&(o=Object({NODE_ENV:"production",VUE_APP_DARK_MODE:"false",VUE_APP_NAME:"电商模板,纯前端模板,可直接使用",VUE_APP_PLATFORM:"h5",VUE_APP_INDEX_CSS_HASH:"97465e7b",VUE_APP_INDEX_DARK_CSS_HASH:"e6047db7",BASE_URL:"/"}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=y,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=m,e.isRegExp=b,e.isObject=w,e.isDate=x,e.isError=_,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n("d60a");var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),O[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=n("3fb5"),e._extend=function(t,e){if(!e||!w(e))return t;var n=Object.keys(e),r=n.length;while(r--)t[n[r]]=e[n[r]];return t};var j="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(j&&t[j]){var e=t[j];if("function"!==typeof e)throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return r.post("/api/sms/send",t,e)};e.smsCheck=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.post("/api/sms/check",t,e)};e.userRegister=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.post("/api/user/register",t,e)};e.loginApi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.post("/api/user/login",t,e)};e.privacyPolicy=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.post("/addons/shopro/data.richtext/index",t,e)};e.forgetPsw=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.post("/api/user/resetpwd",t,e)};e.getUserInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserinfo",t,e)};e.getAddrList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.address/index",t,e)};e.getArea=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/data.area/index",t,e)};e.addAddr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.address/add",t,e)};e.editAddr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.address/edit",t,e)};e.deleteAddr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.address/delete",t,e)};e.getAddrDesc=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.address/detail",t,e)};e.changePassword=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.user/changePassword",t,e)};e.logout=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/logout",t,e)};e.updateUserInfo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/updateUserInfo",t,e)};e.couponList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/addons/shopro/user.coupon/index",t,e)};e.getUserCommissionStatistic=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserCommissionStatistic",t,e)};e.getUserCommissionApi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserCommission",t,e)};e.getUserCommissionList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserCommissionList",t,e)};e.getUserFansStatistic=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserFansStatistic",t,e)};e.getUserFansList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserFansList",t,e)};e.getUserFansOrderStatistic=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserFansOrderStatistic",t,e)};e.getUserFansOrderList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserFansOrderList",t,e)};e.getUserProfitStatistic=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserProfitStatistic",t,e)};e.getUserProfitList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/getUserProfitList",t,e)};e.getWarehouseList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/order/getWarehouseList",t,e)};e.getGoodsList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/order/getGoodsList",t,e)};e.getgoodsDetail=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.get("/api/order/goodsDetail",{params:t},e)};e.getBuyerOrderList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.get("/api/order/getBuyerOrderList",{params:t},e)};e.getSellerOrderList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.get("/api/order/getSellerOrderList",{params:t},e)};e.createOrder=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/order/createOrder",t,e)};e.cancelOrder=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/order/cancelOrder",t,e)};e.orderDetail=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.get("/api/order/orderDetail",{params:t},e)};e.orderPay=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/order/orderPay",t,e)};e.bindInvitor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/bindInvitor",t,e)};e.payUpGoods=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/order/payUpGoods",t,e)};e.incomeDetail=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.get("/api/user/getUserIncomeAndExpandList",{params:t},e)};e.submitPingzheng=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/submitPay",t,e)};e.confirmPay=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/confirmPay",t,e)};e.confirmSign=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/updateUserInfo",t,e)};e.recharge=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/recharge",t,e)};e.withdraw=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/withdraw",t,e)};e.getWithdrawList=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{custom:{auth:!0}};return r.post("/api/user/withdrawList",t,e)}},"53a8":function(t,e){t.exports=function(){for(var t={},e=0;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";var e=this.head,n=""+e.data;while(e=e.next)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;var e=r.allocUnsafe(t>>>0),n=this.head,i=0;while(n)o(n.data,e,i),i+=n.data.length,n=n.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},"627a":function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("ac1f"),n("466d"),n("d401"),n("81b2"),n("0eb6"),n("b7ef"),n("8bd4"),n("ace4"),n("d3b7"),n("5cc6"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("986a"),n("1d02"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("b39a"),n("72f7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861");var r=n("5d56"),i=n("4838"),o=(n("96d8"),{data:function(){return{title:"Hello",penColor:"#000000",penSize:5,picurl:"",landscape:!0,openSmooth:!1}},methods:{base64toBlob:function(t){var e=t.split(","),n=e[0].match(/:(.*?);/)[1],r=atob(e[1]),i=r.length,o=new Uint8Array(i);while(i--)o[i]=r.charCodeAt(i);return new Blob([o],{type:n})},onClick:function(t){var e=this;"openSmooth"!=t?"save"!=t?this.$refs.signatureRef&&this.$refs.signatureRef[t]():this.$refs.signatureRef.canvasToTempFilePath({success:function(t){if(t.isEmpty)uni.$u.toast("请签名");else{var n=URL.createObjectURL(e.base64toBlob(t.tempFilePath));uni.uploadFile({url:e.baseUrl+"api/common/upload",filePath:n,name:"file",header:{token:(0,r.getToken)()},formData:{},success:function(t){console.log(JSON.parse(t.data),"00"),1==JSON.parse(t.data).code?setTimeout((function(){e.saveSignPic(JSON.parse(t.data).data.url)}),1e3):uni.$u.toast(JSON.parse(t.data).msg)},fail:function(t){console.log(t,"rrr")}})}}}):this.openSmooth=!this.openSmooth},saveSignPic:function(t){console.log(t),(0,i.updateUserInfo)({sign_image:t}).then((function(t){console.log(t,"ooooo"),1==t.code&&uni.switchTab({url:"/pages/qianggou/qianggou"})}))}}});e.default=o},6604:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 主要颜色 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.lime-signature[data-v-65d7357f],\n.lime-signature__canvas[data-v-65d7357f]{width:100%;height:100%}.offscreen[data-v-65d7357f]{position:fixed;top:0;left:9999px}',""]),t.exports=e},"6ac2":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r}));var r={lSignature:n("cf55").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"sign"},[n("v-uni-view",{staticStyle:{width:"100vw",height:"100vh"}},[n("l-signature",{ref:"signatureRef",attrs:{disableScroll:!0,backgroundColor:"#ddd",penColor:t.penColor,penSize:t.penSize,landscape:!0,openSmooth:t.openSmooth}})],1),n("v-uni-view",{staticClass:"btn"},[n("v-uni-button",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClick("clear")}}},[t._v("清空")]),n("v-uni-button",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClick("undo")}}},[t._v("撤消")]),n("v-uni-button",{on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onClick("save")}}},[t._v("保存")])],1)],1)},o=[]},"726a":function(t,e,n){"use strict";n("7a82");var r=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n("c9aa")),o=i.default;e.default=o},"780f":function(t,e,n){"use strict";t.exports=o;var r=n("27bf"),i=Object.create(n("3a7c"));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n("3fb5"),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},"7b6d":function(t,e,n){n("d3b7"),n("159b"),n("c975"),n("ac1f"),n("5319"),n("498a"),n("14d9"),n("4d63"),n("c607"),n("2c3e"),n("25f0"),n("00b4");var r=n("ca3d");t.exports=function(t,e){if(null===t)return function(){return!0};if(""===t||r.isArray(t)&&!t.length)return function(){return!1};r.isString(t)&&(t=[t]);var n=[],i=[],o=e?"i":"";return t.forEach((function(t){var e=0===t.indexOf("!");t=t.replace(/^!/,"").replace(/\*(?![\/*])/,"[^/]*?").replace("**/","([^/]+/)*").replace(/\{([^\}]+)\}/g,(function(t,e){var n=e.split(","),r=n.length,i="(?:";return n.forEach((function(t,e){i+="("+t.trim()+")",e+1!==r&&(i+="|")})),i+=")",i})).replace(/([\/\.])/g,"\\$1"),t="(^"+t+"$)",e?i.push(t):n.push(t)})),n=n.length?new RegExp(n.join("|"),o):null,i=i.length?new RegExp(i.join("|"),o):null,function(t){return t=r.path.unixifyPath(t),(!i||!i.test(t))&&!(!n||!n.test(t))}}},"7cd7":function(t,e,n){"use strict";n("7a82");var r=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.uniContext=e.toDataURL=e.createImage=void 0,e.useCurrentPage=function(){var t=getCurrentPages();return t[t.length-1]};var i=r(n("5530")),o=r(n("d4ec")),a=r(n("bee2"));n("99af"),n("d3b7");e.uniContext=function(t,e){var n=uni.createCanvasContext(t,e);return n.uniDrawImage||(n.uniDrawImage=n.drawImage,n.drawImage=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,o){var a=n.canavs,s=(0,i.default)((0,i.default)({},n),{},{canvasId:t,success:function(t){r(t.tempFilePath)},fail:function(t){o(t)}});a&&a.toTempFilePath?a.toTempFilePath(s):uni.canvasToTempFilePath(s,e)}))}},"7d72":function(t,e,n){"use strict";var r=n("8707").Buffer,i=r.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";var e;while(1)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(t.lastNeed=i-1),i;if(--r=0)return i>0&&(t.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},8707:function(t,e,n){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var r=n("b639"),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"===typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!==typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"===typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},"8c05":function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},"8c19":function(t,e,n){"use strict";n.r(e);var r=n("e1b7"),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},"8d7a":function(t,e,n){(function(e){n("e9c4"),n("14d9"),n("99af"),n("d401"),n("d3b7"),n("25f0"),n("ac1f"),n("5319");var r=n("9490"),i=n("ca3d"),o=n("0b16"),a=n("df7c"),s=n("b383"),u=n("3ccc");function c(t,n){var a={headers:{"Content-Type":"application/json"},method:"GET",encoding:"utf8",isBuffer:!1,json:!1};i.isString(t)?a.url=t:i.extend(a,t),a.data&&("GET"===a.method?a.url+="?"+s.stringify(a.data):(a.data=JSON.stringify(a.data),a.headers["Content-Length"]=new e(a.data).length)),i.extend(a,i.pick(o.parse(a.url),"hostname","port","path","auth")),delete a.url;var u=r.request(a,(function(t){var r=[],i=0;t.on("data",(function(t){r.push(t),i+=t.length})),t.on("end",(function(){var o="";if(a.isBuffer)o=e.concat(r,i);else{for(var s=new e(i),u=0,c=0,l=r.length;u0&&c>u&&(c=u);for(var l=0;l=0?(h=v.substr(0,g),f=v.substr(g+1)):(h=v,f=""),d=decodeURIComponent(h),p=decodeURIComponent(f),r(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},"925e":function(t,e,n){(function(e,r,i){var o=n("a9f1"),a=n("3fb5"),s=n("c90b"),u=n("e372"),c=n("d938"),l=s.IncomingMessage,h=s.readyStates;var f=t.exports=function(t){var n,r=this;u.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){r.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,n=!0;else if("prefer-streaming"===t.mode)n=!1;else if("allow-wrong-content-type"===t.mode)n=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");n=!0}r._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":o.vbArray&&t?"text:vbarray":"text"}(n,i),r._fetchTimer=null,r.on("finish",(function(){r._onFinish()}))};a(f,u.Writable),f.prototype.setHeader=function(t,e){var n=t.toLowerCase();-1===d.indexOf(n)&&(this._headers[n]={name:t,value:e})},f.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},f.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},f.prototype._onFinish=function(){var t=this;if(!t._destroyed){var n=t._opts,a=t._headers,s=null;"GET"!==n.method&&"HEAD"!==n.method&&(s=o.arraybuffer?c(e.concat(t._body)):o.blobConstructor?new r.Blob(t._body.map((function(t){return c(t)})),{type:(a["content-type"]||{}).value||""}):e.concat(t._body).toString());var u=[];if(Object.keys(a).forEach((function(t){var e=a[t].name,n=a[t].value;Array.isArray(n)?n.forEach((function(t){u.push([e,t])})):u.push([e,n])})),"fetch"===t._mode){var l=null;if(o.abortController){var f=new AbortController;l=f.signal,t._fetchAbortController=f,"requestTimeout"in n&&0!==n.requestTimeout&&(t._fetchTimer=r.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),n.requestTimeout))}r.fetch(t._opts.url,{method:t._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){r.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var d=t._xhr=new r.XMLHttpRequest;try{d.open(t._opts.method,t._opts.url,!0)}catch(p){return void i.nextTick((function(){t.emit("error",p)}))}"responseType"in d&&(d.responseType=t._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!n.withCredentials),"text"===t._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(d.timeout=n.requestTimeout,d.ontimeout=function(){t.emit("requestTimeout")}),u.forEach((function(t){d.setRequestHeader(t[0],t[1])})),t._response=null,d.onreadystatechange=function(){switch(d.readyState){case h.LOADING:case h.DONE:t._onXHRProgress();break}},"moz-chunked-arraybuffer"===t._mode&&(d.onprogress=function(){t._onXHRProgress()}),d.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{d.send(s)}catch(p){return void i.nextTick((function(){t.emit("error",p)}))}}}},f.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(n){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},f.prototype._connect=function(){var t=this;t._destroyed||(t._response=new l(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},f.prototype._write=function(t,e,n){this._body.push(t),n()},f.prototype.abort=f.prototype.destroy=function(){this._destroyed=!0,r.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},f.prototype.end=function(t,e,n){"function"===typeof t&&(n=t,t=void 0),u.Writable.prototype.end.call(this,t,e,n)},f.prototype.flushHeaders=function(){},f.prototype.setTimeout=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n("b639").Buffer,n("c8ba"),n("4362"))},9490:function(t,e,n){(function(t){var r=n("925e"),i=n("c90b"),o=n("53a8"),a=n("8c05"),s=n("0b16"),u=e;u.request=function(e,n){e="string"===typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new r(e);return n&&h.on("response",n),h},u.get=function(t,e){var n=u.request(t,e);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n("c8ba"))},"966d":function(t,e,n){"use strict";(function(e){"undefined"===typeof e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:o=new Array(s-1),a=0;while(a1&&void 0!==arguments[1]?arguments[1]:{},n="boundingClientRect",r=e.context,i=e.type,o=void 0===i?n:i;return new Promise((function(e,i){var a=uni.createSelectorQuery().in(r).select(t),s=function(t){t?e(t):i()};o==n?a[o](s).exec():a[o]({node:!0,size:!0,rect:!0},s).exec()}))},e.requestAnimationFrame=void 0,e.sleep=function(t){return new Promise((function(e){return setTimeout(e,t)}))},e.wrapEvent=void 0;var i=r(n("3835"));function o(t,e){t=t.split("."),e=e.split(".");var n=Math.max(t.length,e.length);while(t.lengtho)return 1;if(i0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):x(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?x(t,a,e,!1):k(t,a)):x(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){d("emit readable"),t.emit("readable"),j(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(O,t,e))}function O(t,e){var n=e.length;while(!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),t-=a,0===t){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;while(r=r.next){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),t-=a,0===t){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function A(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):S(this),null;if(t=_(t,e),0===t&&e.ended)return 0===e.length&&P(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?L(t,e):null,null===r?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&P(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t);break}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr,c=u?h:w;function l(e,r){d("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,function(){d("cleanup"),t.removeListener("close",m),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",y),t.removeListener("unpipe",l),n.removeListener("end",h),n.removeListener("end",w),n.removeListener("data",g),p=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}())}function h(){d("onend"),t.end()}o.endEmitted?i.nextTick(c):n.once("end",c),t.on("unpipe",l);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,j(t))}}(n);t.on("drain",f);var p=!1;var v=!1;function g(e){d("ondata"),v=!1;var r=t.write(e);!1!==r||v||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==A(o.pipes,t))&&!p&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,v=!0),n.pause())}function y(e){d("onerror",e),w(),t.removeListener("error",y),0===s(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",b),w()}function b(){d("onfinish"),t.removeListener("close",m),w()}function w(){d("unpipe"),n.unpipe(t)}return n.on("data",g),function(t,e,n){if("function"===typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",y),t.once("close",m),t.once("finish",b),t.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;oe;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t){return s="function"==typeof Symbol&&"symbol"==(0,i.default)(Symbol.iterator)?function(t){return(0,i.default)(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":(0,i.default)(t)},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function v(t,e){if(e&&("object"==(0,i.default)(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d(t);if(e){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v(this,n)}}n("b64b"),n("a4d3"),n("4de4"),n("d3b7"),n("e439"),n("14d9"),n("159b"),n("dbb4"),n("1d1c"),n("7a82"),n("e01a"),n("d28b"),n("3ca3"),n("ddb0"),n("d9e2"),n("d401"),n("131a"),n("3410"),n("f8c9"),n("4ae1"),n("a434"),n("acd8"),n("a9e3"),n("cb29"),n("fb6a");var y=function(t){var e=s(t);return null!==t&&"object"===e||"function"===e},m={}.toString,b=function(t,e){return m.call(t)==="[object "+e+"]"},w=function(t){return b(t,"String")},x=function(t){return b(t,"Number")},_=function(t){return b(t,"Function")},S=function(){function t(){u(this,t),this.__events=void 0,this.__events={}}return l(t,[{key:"on",value:function(t,e){if(t&&e){var n=this.__events[t]||[];n.push(e),this.__events[t]=n}}},{key:"emit",value:function(t,e){var n=this;if(y(t)&&(t=(e=t)&&e.type),t){var r=this.__events[t];r&&r.length&&r.forEach((function(t){t.call(n,e)}))}}},{key:"off",value:function(t,e){var n=this.__events,r=n[t];if(r&&r.length)if(e)for(var i=0,o=r.length;o>i;i++)r[i]===e&&(r.splice(i,1),i--);else delete n[t]}},{key:"getEvents",value:function(){return this.__events}}]),t}(),E=function(t){f(n,S);var e=g(n);function n(t,r){var i;return u(this,n),(i=e.call(this)).context=void 0,i.canvas=void 0,i.attrs=void 0,i.isCanvasElement=void 0,i.context=t,i.canvas=r.canvas||t.canvas||{width:r.width||0,height:r.height||0},i.attrs=r||{},i.isCanvasElement=!0,i}return l(n,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}},{key:"getContext",value:function(){return this.context}},{key:"getBoundingClientRect",value:function(){var t=this.attrs||{},e=t.top,n=t.right,r=t.width,i=t.height,o=t.left,a=t.bottom;return{top:void 0===e?0:e,width:void 0===r?0:r,right:void 0===n?0:n,height:void 0===i?0:i,bottom:void 0===a?0:a,left:void 0===o?0:o}}},{key:"setAttribute",value:function(t,e){this.attrs[t]=e}},{key:"addEventListener",value:function(t,e){this.on(t,e)}},{key:"removeEventListener",value:function(t,e){this.off(t,e)}},{key:"dispatchEvent",value:function(t,e){this.emit(t,e)}}]),n}();function k(t,e){try{return t.currentStyle?t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}catch(t){return{width:300,height:150}[e]}}function O(t,e){var n=e.get("el");if(!n)return t;var r=n.getBoundingClientRect(),i=r.top,o=void 0===i?0:i,a=r.left,s=void 0===a?0:a,u=parseFloat(k(n,"padding-left"))||0,c=parseFloat(k(n,"padding-top"))||0;return{x:t.x-s-u,y:t.y-o-c}}function C(t,e){var n=e.get("landscape");if(!n)return t;if(_(n))return n(t,e);var r=e.get("height");return{x:t.y,y:r-t.x}}var T=function(t,e){var n=t.touches;if(!n||!n.length)return[C(O({x:t.clientX,y:t.clientY},e),e)];n.length||(n=t.changedTouches||[]);for(var r=[],i=0,o=n.length;o>i;i++){var a,s=n[i],u=s.x,c=s.y,l=s.clientX,h=s.clientY;a=x(u)||x(c)?{x:u,y:c}:O({x:l,y:h},e),r.push(C(a,e))}return r},j=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.abs(n)>Math.abs(r)?n>0?"right":"left":r>0?"down":"up"},L=function(t,e){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.sqrt(n*n+r*r)},P=function(){function t(e){var n=this,r=e.canvas,i=e.el;u(this,t),this.processEvent=void 0,this.canvas=void 0,this.startTime=0,this.endTime=0,this.startPoints=null,this.startDistance=0,this.center=null,this.pressTimeout=void 0,this.eventType=null,this.direction=null,this.lastMoveTime=0,this.prevMovePoints=null,this.prevMoveTime=0,this.lastMovePoints=null,this.pinch=!1,this._click=function(t){var e=T(t,n.canvas);t.points=e,n.emitEvent("click",t)},this._start=function(t){var e,r,i=T(t,n.canvas);i&&(t.points=i,n.emitEvent("touchstart",t),n.reset(),n.startTime=Date.now(),n.startPoints=i,i.length>1?(n.startDistance=L(i[0],i[1]),n.center={x:(e=i[0]).x+((r=i[1]).x-e.x)/2,y:e.y+(r.y-e.y)/2}):n.pressTimeout=setTimeout((function(){var e="press",r="none";t.direction=r,n.emitStart(e,t),n.emitEvent(e,t),n.eventType=e,n.direction=r}),250))},this._move=function(t){var e=T(t,n.canvas);if(e){t.points=e,n.emitEvent("touchmove",t);var r=n.startPoints;if(r)if(e.length>1){var i=n.startDistance,o=L(e[0],e[1]);t.zoom=o/i,t.center=n.center,n.emitStart("pinch",t),n.emitEvent("pinch",t)}else{var a=e[0].x-r[0].x,s=e[0].y-r[0].y,u=n.direction||j(r[0],e[0]);n.direction=u;var c=n.getEventType(e);t.direction=u,t.deltaX=a,t.deltaY=s,n.emitStart(c,t),n.emitEvent(c,t);var l=n.lastMoveTime,h=Date.now();h-l>0&&(n.prevMoveTime=l,n.prevMovePoints=n.lastMovePoints,n.lastMoveTime=h,n.lastMovePoints=e)}}},this._end=function(t){var e=T(t,n.canvas);t.points=e,n.emitEnd(t),n.emitEvent("touchend",t);var r=n.lastMoveTime;if(100>Date.now()-r){var i=r-(n.prevMoveTime||n.startTime);if(i>0){var o=n.prevMovePoints||n.startPoints,a=n.lastMovePoints;if(!o||!a)return;var s=L(o[0],a[0])/i;s>.3&&(t.velocity=s,t.direction=j(o[0],a[0]),n.emitEvent("swipe",t))}}n.reset();var u=t.touches;u&&u.length>0&&n._start(t)},this._cancel=function(t){n.emitEvent("touchcancel",t),n.reset()},this.canvas=r,this.delegateEvent(i),this.processEvent={}}return l(t,[{key:"delegateEvent",value:function(t){t.addEventListener("click",this._click),t.addEventListener("touchstart",this._start),t.addEventListener("touchmove",this._move),t.addEventListener("touchend",this._end),t.addEventListener("touchcancel",this._cancel)}},{key:"emitEvent",value:function(t,e){this.canvas.emit(t,e)}},{key:"getEventType",value:function(t){var e,n=this.eventType,r=this.startTime,i=this.startPoints;if(n)return n;var o=this.canvas.__events.pan;if(o&&o.length){var a=Date.now();if(!i)return;e=a-r>250&&10>L(i[0],t[0])?"press":"pan"}else e="press";return this.eventType=e,e}},{key:"enable",value:function(t){this.processEvent[t]=!0}},{key:"isProcess",value:function(t){return this.processEvent[t]}},{key:"emitStart",value:function(t,e){this.isProcess(t)||(this.enable(t),this.emitEvent("".concat(t,"start"),e))}},{key:"emitEnd",value:function(t){}},{key:"clearPressTimeout",value:function(){this.pressTimeout&&(clearTimeout(this.pressTimeout),this.pressTimeout=null)}},{key:"reset",value:function(){this.clearPressTimeout(),this.startTime=0,this.startPoints=null,this.startDistance=0,this.direction=null,this.eventType=null,this.pinch=!1,this.prevMoveTime=0,this.prevMovePoints=null,this.lastMoveTime=0,this.lastMovePoints=null}}]),t}(),R=function(t){f(n,S);var e=g(n);function n(t){var r;return u(this,n),(r=e.call(this))._attrs={},r._isWindow=void 0,r._attrs=Object.assign({},t),r._isWindow="undefined"!=typeof window,r._initPixelRatio(),r._initCanvas(),["createImage","toDataURL","requestAnimationFrame"].forEach((function(e){r._initAttrs(e,t.canvas||r.get("el"))})),r}return l(n,[{key:"get",value:function(t){return this._attrs[t]}},{key:"set",value:function(t,e){this._attrs[t]=e}},{key:"_initAttrs",value:function(t,e){var n=this;this.get(t)||this.set(t,(function(){return e[t]?e[t].apply(e,arguments):n._isWindow?window[t]?(r=window)[t].apply(r,arguments):"createImage"==t?new Image:null:void 0;var r}))}},{key:"_initCanvas",value:function(){var t,e,n=this.get("el"),r=this.get("context");if(!n&&!r)throw Error("请指定 id、el 或 context!");t=n?w(n)?(e=n)?document.getElementById(e):null:n:function(t,e){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new E(t,e):null}(r,this._attrs),r&&t&&!t.getContext&&(t.getContext=function(){return r});var i=this.get("width")||function(t){var e=k(t,"width");return"auto"===e&&(e=t.offsetWidth),parseFloat(e)}(t)||t.width,o=this.get("height")||function(t){var e=k(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t)||t.height;this.set("canvas",this),this.set("el",t),this.set("context",r||t.getContext("2d")),this.changeSize(i,o);var a=new P({canvas:this,el:t,parent:this.get("parent")});this.set("eventController",a)}},{key:"_initPixelRatio",value:function(){this.get("pixelRatio")||this.set("pixelRatio",window&&window.devicePixelRatio||1)}},{key:"changeSize",value:function(t,e){var n,r=this.get("pixelRatio"),i=this.get("el");i.style&&(i.style.width=t+"px",i.style.height=e+"px"),(n=i)&&"object"===s(n)&&(1===n.nodeType&&n.nodeName||n.isCanvasElement)&&(i.width=t*r,i.height=e*r,1!==r&&this.get("context").scale(r,r)),this.set("width",t),this.set("height",e)}},{key:"destroy",value:function(){if(!this.get("destroyed")){var t=this.get("el");t.width=0,t.height=0,this.clear(),this._attrs={},this.set("destroyed",!0)}}},{key:"clear",value:function(){}},{key:"isDestroyed",value:function(){return this.get("destroyed")}}]),n}(),A={penColor:"black",backgroundColor:"",openSmooth:!0,penSize:2,minLineWidth:2,maxLineWidth:6,minSpeed:1.5,maxWidthDiffRate:20,maxHistoryLength:20},M=null,D=function(){function t(e){var n=this;u(this,t),this.canAddHistory=!0,this.points=[],this.historyList=[],this.canvas=void 0,this._isEmpty=!0,this.active=!1,this.getLineWidth=function(t){var e=n.get("options"),r=e.minSpeed,i=e.minLineWidth,o=n.getMaxLineWidth();return Math.min(Math.max(o-(o-i)*t/Math.max(Math.min(r,10),1),i),o)},this.drawTrapezoid=function(t,e,r,i){var o=n.get("context");o.beginPath(),o.moveTo(Number(t.x.toFixed(1)),Number(t.y.toFixed(1))),o.lineTo(Number(e.x.toFixed(1)),Number(e.y.toFixed(1))),o.lineTo(Number(r.x.toFixed(1)),Number(r.y.toFixed(1))),o.lineTo(Number(i.x.toFixed(1)),Number(i.y.toFixed(1))),o.fillStyle=n.get("options").penColor,o.fill(),o.draw&&o.draw(!0)},this.drawNoSmoothLine=function(t,e){e.lastX=t.x+.5*(e.x-t.x),e.lastY=t.y+.5*(e.y-t.y),"number"==typeof t.lastX&&n.drawCurveLine(t.lastX,t.lastY,t.x,t.y,e.lastX,e.lastY,n.getMaxLineWidth())},this.drawCurveLine=function(t,e,r,i,o,a,s){s=Number(s.toFixed(1));var u=n.get("context");u.lineWidth=s,u.beginPath(),u.moveTo(Number(t.toFixed(1)),Number(e.toFixed(1))),u.quadraticCurveTo(Number(r.toFixed(1)),Number(i.toFixed(1)),Number(o.toFixed(1)),Number(a.toFixed(1))),u.stroke(),u.draw&&u.draw(!0)},this.getRadianData=function(t,e,n,r){var i=n-t,o=r-e;if(0===i)return{val:0,pos:-1};if(0===o)return{val:0,pos:1};var a=Math.abs(Math.atan(o/i));return n>t&&e>r||t>n&&r>e?{val:a,pos:1}:{val:a,pos:-1}},this.getRadianPoints=function(t,e,n,r){if(0===t.val)return 1===t.pos?[{x:e,y:n+r},{x:e,y:n-r}]:[{y:n,x:e+r},{y:n,x:e-r}];var i=Math.sin(t.val)*r,o=Math.cos(t.val)*r;return 1===t.pos?[{x:e+i,y:n+o},{x:e-i,y:n-o}]:[{x:e+i,y:n-o},{x:e-i,y:n+o}]},this.drawSmoothLine=function(t,e){var r=e.x-t.x,i=e.y-t.y;if(Math.abs(r)+Math.abs(i)>2?(e.lastX1=t.x+.3*r,e.lastY1=t.y+.3*i,e.lastX2=t.x+.7*r,e.lastY2=t.y+.7*i):(e.lastX1=e.lastX2=t.x+.5*r,e.lastY1=e.lastY2=t.y+.5*i),e.perLineWidth=(t.lineWidth+e.lineWidth)/2,"number"==typeof t.lastX1){if(n.drawCurveLine(t.lastX2,t.lastY2,t.x,t.y,e.lastX1,e.lastY1,e.perLineWidth),t.isFirstPoint)return;if(t.lastX1===t.lastX2&&t.lastY1===t.lastY2)return;var o=n.getRadianData(t.lastX1,t.lastY1,t.lastX2,t.lastY2),a=n.getRadianPoints(o,t.lastX1,t.lastY1,t.perLineWidth/2),s=n.getRadianPoints(o,t.lastX2,t.lastY2,e.perLineWidth/2);n.drawTrapezoid(a[0],s[0],s[1],a[1])}else e.isFirstPoint=!0},this.addHistory=function(){var t=n.get("options").maxHistoryLength;if(t&&n.canAddHistory)if(n.canAddHistory=!1,n.get("createImage")){var e=null;e=n.get("createImage")();var r=n.get("toDataURL")&&n.get("toDataURL")();w(r)?e.src=r:r.then((function(t){e.src=t})),e.onload=function(){var r=M;M=e,n.historyList.push(r),n.historyList=n.historyList.slice(-t)}}else n.historyList.length++},this.drawByImage=function(t){var e=n.get("context"),r=n.get("width"),i=n.get("height");e.clearRect(0,0,r,i);try{t&&e.drawImage(t,0,0,r,i),e.draw&&e.draw(!0)}catch(t){n.historyList.length=0}},this.isEmpty=function(){return n.get("options").maxHistoryLength>0?0===n.historyList.length:n._isEmpty},this.clear=function(){var t=n.get("context");t.clearRect(0,0,n.get("width"),n.get("height")),t.draw&&t.draw(),n._isEmpty=!0,M=null,n.historyList.length=0},this.undo=function(){if(0===n.get("options").maxHistoryLength&&n.clear(),n.get("createImage")&&n.historyList.length){var t=n.historyList.splice(-1)[0];n.drawByImage(t),0===n.historyList.length&&n.clear()}},this.canvas=e,this.canvas.set("pen",A),this.init()}return l(t,[{key:"getOption",value:function(){}},{key:"setOption",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=a({},t),n=e.maxLineWidth;if(n&&t.penSize&&n==A.maxLineWidth){var r=Math.max(n,t.penSize);e.maxLineWidth=r}this.canvas.set("pen",Object.assign({},A,e))}},{key:"get",value:function(t){return this.canvas.get("options"==t?"pen":t)}},{key:"init",value:function(){var t=this;this.get("context").lineCap="round",this.canvas.on("touchstart",(function(e){return t.onDrawStart(e)})),this.canvas.on("touchmove",(function(e){return t.onDrawMove(e)})),this.canvas.on("touchend",(function(e){return t.onDrawEnd(e)}))}},{key:"drawBackground",value:function(){var t=this.get("context"),e=this.get("width"),n=this.get("height"),r=this.get("options"),i=r.backgroundColor,o=r.backgroundImage;i&&(t.fillStyle=i,t.fillRect(0,0,e,n),t.draw&&t.draw(!0)),o&&this.drawByImage(o)}},{key:"getContentBoundingBox",value:function(t){var e=this.get("pixelRatio"),n=this.get("width"),r=this.get("height"),i=this.get("el"),o="CANVAS"===i.nodeName,a=o?n:i.width,s=o?r:i.height;e=o?1:e;var u=function(n){for(var r=a,i=s,o=0,u=0,c=0;n.length>c;c+=4)if(n[c+3]>0){var l=c/4%a,h=Math.floor(c/4/a);r=Math.min(r,l),i=Math.min(i,h),o=Math.max(o,l),u=Math.max(u,h)}var f={width:(o-r+1)/e,height:(u-i+1)/e,startX:r/e,startY:i/e};return t&&t(f),f};if("CANVAS"===i.nodeName){var c=document.createElement("canvas");c.width=n,c.height=r;var l=c.getContext("2d");l.drawImage(i,0,0,n,r);var h=l.getImageData(0,0,n,r).data;return u(h)}var f,d=this.get("context").getImageData(0,0,a,s);return y(f=d)&&_(f.then)&&_(f.catch)?(d.then((function(t){return u(t.data)})),null):u(d.data)}},{key:"remove",value:function(){var t=this;this.canvas.off("touchstart",(function(e){return t.onDrawStart(e)})),this.canvas.off("touchmove",(function(e){return t.onDrawMove(e)})),this.canvas.off("touchend",(function(e){return t.onDrawEnd(e)}))}},{key:"disableScroll",value:function(t){t.preventDefault&&this.get("options").disableScroll&&t.preventDefault()}},{key:"onDrawStart",value:function(t){this.disableScroll(t);var e=t.points;if(this.active){this.canAddHistory=!0,this.get("context").strokeStyle=this.get("options").penColor;var n=e[0];this.initPoint(n.x,n.y)}}},{key:"onDrawMove",value:function(t){if(this.disableScroll(t),this.active){var e=t.points[0];this.initPoint(e.x,e.y),this.onDraw()}}},{key:"onDrawEnd",value:function(t){this.active&&(this.addHistory(),this.canAddHistory=!0,this.points=[])}},{key:"onDraw",value:function(){var t=this,e=this.get("context");if(this.points.length>=2){e.lineWidth=this.get("options").penSize||2;var n=this.points.slice(-1)[0],r=this.points.slice(-2,-1)[0],i=function(){t._isEmpty=!1,t.get("options").openSmooth?t.drawSmoothLine(r,n):t.drawNoSmoothLine(r,n)},o=this.get("el").canvas;o&&o.requestAnimationFrame?o.requestAnimationFrame((function(){return i()})):"function"==typeof requestAnimationFrame?requestAnimationFrame((function(){return i()})):i()}}},{key:"getMaxLineWidth",value:function(){var t=this.get("options");return Math.min(t.penSize,t.maxLineWidth)}},{key:"initPoint",value:function(t,e){var n={x:t,y:e,t:Date.now()},r=this.points.slice(-1)[0];if(!r||r.t!==n.t&&(r.x!==t||r.y!==e)){if(this.get("options").openSmooth&&r){var i=this.points.slice(-2,-1)[0];if(n.distance=Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2)),n.speed=n.distance/(n.t-r.t||.1),n.lineWidth=this.getLineWidth(n.speed),i&&i.lineWidth&&r.lineWidth){var o=(n.lineWidth-r.lineWidth)/r.lineWidth,a=this.get("options").maxWidthDiffRate/100;a=a>1?1:.01>a?.01:a,Math.abs(o)>a&&(n.lineWidth=r.lineWidth*(1+(o>0?a:-a)))}}this.points.push(n),this.points=this.points.slice(-3)}}}]),t}(),N=function(){function t(e){u(this,t),this.canvas=void 0,this._ee=void 0,this.pen=void 0;var n=new R(e);n.set("parent",this),this.canvas=n,this._ee=new S,this.pen=new D(n),this.init()}return l(t,[{key:"init",value:function(){this.pen.active=!0}},{key:"destroy",value:function(){this.canvas.destroy()}},{key:"clear",value:function(){this.pen.clear()}},{key:"undo",value:function(){this.pen.undo()}},{key:"save",value:function(){}},{key:"getContentBoundingBox",value:function(t){return this.pen.getContentBoundingBox(t)}},{key:"isEmpty",value:function(){return this.pen.isEmpty()}},{key:"on",value:function(t,e){this._ee.on(t,e)}},{key:"emit",value:function(t,e){this._ee.emit(t,e)}},{key:"off",value:function(t,e){this._ee.off(t,e)}}]),t}();e.Signature=N;var U=N;e.default=U},c90b:function(t,e,n){(function(t,r,i){var o=n("a9f1"),a=n("3fb5"),s=n("e372"),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=e.IncomingMessage=function(e,n,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){t.nextTick((function(){c.emit("close")}))})),"fetch"===a){if(c._fetchResponse=n,c.url=n.url,c.statusCode=n.status,c.statusMessage=n.statusText,n.headers.forEach((function(t,e){c.headers[e.toLowerCase()]=t,c.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return new Promise((function(e,n){c._destroyed?n():c.push(new r(t))?e():c._resumeFetch=e}))},close:function(){i.clearTimeout(u),c._destroyed||c.push(null)},abort:function(t){c._destroyed||c.emit("error",t)}});try{return void n.body.pipeTo(l).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))}catch(v){}}var h=n.body.getReader();(function t(){h.read().then((function(e){if(!c._destroyed){if(e.done)return i.clearTimeout(u),void c.push(null);c.push(new r(e.value)),t()}})).catch((function(t){i.clearTimeout(u),c._destroyed||c.emit("error",t)}))})()}else{c._xhr=e,c._pos=0,c.url=e.responseURL,c.statusCode=e.status,c.statusMessage=e.statusText;var f=e.getAllResponseHeaders().split(/\r?\n/);if(f.forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var n=e[1].toLowerCase();"set-cookie"===n?(void 0===c.headers[n]&&(c.headers[n]=[]),c.headers[n].push(e[2])):void 0!==c.headers[n]?c.headers[n]+=", "+e[2]:c.headers[n]=e[2],c.rawHeaders.push(e[1],e[2])}})),c._charset="x-user-defined",!o.overrideMimeType){var d=c.rawHeaders["mime-type"];if(d){var p=d.match(/;\s*charset=([^;])(;|$)/);p&&(c._charset=p[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},c.prototype._onXHRProgress=function(){var t=this,e=t._xhr,n=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{n=new i.VBArray(e.responseBody).toArray()}catch(l){}if(null!==n){t.push(new r(n));break}case"text":try{n=e.responseText}catch(l){t._mode="text:vbarray";break}if(n.length>t._pos){var o=n.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new r(o.length),s=0;st._pos&&(t.push(new r(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(n);break}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,n("4362"),n("b639").Buffer,n("c8ba"))},c9aa:function(t,e){},ca3d:function(t,e,n){(function(t){n("d3b7"),n("fb6a"),n("159b"),n("c975"),n("14d9"),n("ac1f"),n("5319");var r=n("3022"),i=Object.prototype.toString,o="win32"===t.platform;function a(t){return"[object Object]"===i.call(t)}function s(t,e){var n;for(var r in e)n=e[r],Array.isArray(n)?(Array.isArray(t[r])||(t[r]=[]),s(t[r],n)):a(n)?(a(t[r])||(t[r]={}),s(t[r],n)):t[r]=n;return t}if(["Function","String","Number","Date","RegExp"].forEach((function(t){e["is"+t]=function(e){return i.call(e)==="[object "+t+"]"}})),s(e,r),e.isObject=a,e.extend=function(){var t=Array.prototype.slice.call(arguments,0),e=t.shift();return t.forEach((function(t){s(e,t)})),e},e.isArray=Array.isArray,e.isUndefined=function(t){return"undefined"==typeof t},e.noop=function(){},e.unique=function(t){var e=[];return t.forEach((function(t){-1==e.indexOf(t)&&e.push(t)})),e},e.escape=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")},e.unescape=function(t){return String(t).replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},e.hrtime=function(e){if(e){var n=t.hrtime(e);return n=1e3*(n[0]+n[1]/1e9)+"ms",n}return t.hrtime()},e.pick=function(t,n){var r={};if(e.isFunction(n))for(var i in t){var o=t[i];n(o,i,t)&&(r[i]=o)}else{var a=Array.prototype.slice.call(arguments,1);a.forEach((function(e){e in t&&(r[e]=t[e])}))}return r},e.path={},o){var u=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;e.path.isAbsolute=function(t){var e=u.exec(t),n=e[1]||"",r=!!n&&":"!==n.charAt(1);return!!e[2]||r},e.path.unixifyPath=function(t){return t.replace(/\\/g,"/")}}else e.path.isAbsolute=function(t){return"/"===t.charAt(0)},e.path.unixifyPath=function(t){return t}}).call(this,n("4362"))},cb29:function(t,e,n){var r=n("23e7"),i=n("81d5"),o=n("44d2");r({target:"Array",proto:!0},{fill:i}),o("fill")},cf55:function(t,e,n){"use strict";n.r(e);var r=n("3866"),i=n("a136");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n("8c19");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("27fc");var s=n("f0c5");i["default"].__module="sign";var u=Object(s["a"])(a["default"],r["b"],r["c"],!1,null,"65d7357f",null,!1,r["a"],i["default"]);e["default"]=u.exports},d60a:function(t,e){t.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},d711:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("a9e3");var r={styles:String,disableScroll:{type:Boolean,default:!0},type:{type:String,default:"2d"},penColor:{type:String,default:"black"},penSize:{type:Number,default:2},backgroundColor:String,openSmooth:Boolean,minLineWidth:{type:Number,default:2},maxLineWidth:{type:Number,default:6},minSpeed:{type:Number,default:1.5},maxWidthDiffRate:{type:Number,default:20},maxHistoryLength:{type:Number,default:20},beforeDelay:{type:Number,default:0},landscape:{type:Boolean},boundingBox:{type:Boolean}};e.default=r},d938:function(t,e,n){var r=n("b639").Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"===typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(r.isBuffer(t)){for(var e=new Uint8Array(t.length),n=t.length,i=0;i-1?setImmediate:i.nextTick;y.WritableState=g;var u=Object.create(n("3a7c"));u.inherits=n("3fb5");var c={deprecate:n("b7d1")},l=n("429b"),h=n("8707").Buffer,f=r.Uint8Array||function(){};var d,p=n("4681");function v(){}function g(t,e){a=a||n("b19a"),t=t||{};var r=e instanceof a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){(function(t,e){var n=t._writableState,r=n.sync,o=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)(function(t,e,n,r,o){--e.pendingcb,n?(i.nextTick(o,r),i.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(o(r),t._writableState.errorEmitted=!0,t.emit("error",r),S(t,e))})(t,n,r,e,o);else{var a=x(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),r?s(b,t,n,a,o):b(t,n,a,o)}})(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(t){if(a=a||n("b19a"),!d.call(y,this)&&!(this instanceof a))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),l.call(this)}function m(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function b(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),a=e.corkedRequestsFree;a.entry=n;var s=0,u=!0;while(n)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,m(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{while(n){var c=n.chunk,l=n.encoding,h=n.callback,f=e.objectMode?1:c.length;if(m(t,e,!1,f,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function _(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var n=x(e);return n&&(function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(_,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}u.inherits(y,l),g.prototype.getBuffer=function(){var t=this.bufferedRequest,e=[];while(t)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===y&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var r=this._writableState,o=!1,a=!r.objectMode&&function(t){return h.isBuffer(t)||t instanceof f}(t);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"===typeof e&&(n=e,e=null),a?e="buffer":e||(e=r.defaultEncoding),"function"!==typeof n&&(n=v),r.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),i.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),i.nextTick(r,a),o=!1),o}(this,r,t,n))&&(r.pendingcb++,o=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=h.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var r=this._writableState;"function"===typeof t?(n=t,t=null,e=null):"function"===typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,S(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n("4362"),n("c8ba"))},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var o=e.isAbsolute(t),a="/"===i(t,-1);return t=n(r(t.split("/"),(function(t){return!!t})),!o).join("/"),t||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u=1;--o)if(e=t.charCodeAt(o),47===e){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!==typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){n=a+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e099:function(t,e,n){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,s){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"===typeof t?o(a(t),(function(a){var s=encodeURIComponent(r(a))+n;return i(t[a])?o(t[a],(function(t){return s+encodeURIComponent(r(t))})).join(e):s+encodeURIComponent(r(t[a]))})).join(e):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,function(t){console&&console.warn&&console.warn(t)}(s)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):v.call(t,e)},s.prototype.listenerCount=v,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}]);