Version Description
- Added: New option to set prefix/postfix on counter values.
- Added: New option to support storing data in wp postmeta table. (+ Migrate option) [PRO]
- Improved: Unit convertor functionality. (Shorten long numbers to K/M/B)
- Updated: All js/css libraries.
- Fixed: Update status issue for hidden counters.
- Fixed: Notification display issue.
- Fixed: Some other small issues.
Download this release
Release Info
Developer | alimir |
Plugin | WP ULike |
Version | 4.4.4 |
Comparing to | |
See all releases |
Code changes from version 4.4.3 to 4.4.4
- admin/admin-hooks.php +2 -2
- admin/assets/js/plugins.js +154 -9
- admin/assets/js/solo/dist/statistics.dev.js +195 -0
- admin/assets/js/solo/vue/vue.js +10716 -9698
- admin/assets/js/solo/vue/vue.min.js +3 -3
admin/admin-hooks.php
CHANGED
@@ -264,7 +264,7 @@ function wp_ulike_go_pro_admin_menu( $submenus ){
|
|
264 |
|
265 |
return $submenus;
|
266 |
}
|
267 |
-
add_filter( 'wp_ulike_admin_pages', 'wp_ulike_go_pro_admin_menu',
|
268 |
|
269 |
/**
|
270 |
* Disable admin notices
|
@@ -276,7 +276,7 @@ function wp_ulike_hide_admin_notifications( $notice_list ){
|
|
276 |
$hide_admin_notice = wp_ulike_get_option( 'disable_admin_notice', false );
|
277 |
return wp_ulike_is_true( $hide_admin_notice ) && strpos( $screen->base, WP_ULIKE_SLUG ) === false ? array() : $notice_list;
|
278 |
}
|
279 |
-
add_filter( 'wp_ulike_admin_notices_instances', 'wp_ulike_hide_admin_notifications',
|
280 |
|
281 |
|
282 |
/**
|
264 |
|
265 |
return $submenus;
|
266 |
}
|
267 |
+
add_filter( 'wp_ulike_admin_pages', 'wp_ulike_go_pro_admin_menu', 10, 1 );
|
268 |
|
269 |
/**
|
270 |
* Disable admin notices
|
276 |
$hide_admin_notice = wp_ulike_get_option( 'disable_admin_notice', false );
|
277 |
return wp_ulike_is_true( $hide_admin_notice ) && strpos( $screen->base, WP_ULIKE_SLUG ) === false ? array() : $notice_list;
|
278 |
}
|
279 |
+
add_filter( 'wp_ulike_admin_notices_instances', 'wp_ulike_hide_admin_notifications', 20, 1 );
|
280 |
|
281 |
|
282 |
/**
|
admin/assets/js/plugins.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*! WP ULike - v4.4.
|
2 |
* https://wpulike.com
|
3 |
* TechnoWich 2020;
|
4 |
*/
|
@@ -8,15 +8,160 @@
|
|
8 |
|
9 |
|
10 |
/*!
|
11 |
-
* Chart.js
|
12 |
-
*
|
13 |
-
*
|
14 |
-
*
|
15 |
-
* Copyright 2017 Nick Downie
|
16 |
-
* Released under the MIT license
|
17 |
-
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
|
18 |
*/
|
19 |
-
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function t(e,n,i){function a(r,l){if(!n[r]){if(!e[r]){var s="function"==typeof require&&require;if(!l&&s)return s(r,!0);if(o)return o(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[r]={exports:{}};e[r][0].call(d.exports,function(t){var n=e[r][1][t];return a(n||t)},d,d.exports,t,e,n,i)}return n[r].exports}for(var o="function"==typeof require&&require,r=0;r<i.length;r++)a(i[r]);return a}({1:[function(t,e,n){},{}],2:[function(t,e,n){function i(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3})$/i);if(i){i=i[1];for(a=0;a<e.length;a++)e[a]=parseInt(i[a]+i[a],16)}else if(i=t.match(/^#([a-fA-F0-9]{6})$/i)){i=i[1];for(a=0;a<e.length;a++)e[a]=parseInt(i.slice(2*a,2*a+2),16)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=parseInt(i[a+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=Math.round(2.55*parseFloat(i[a+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=c[i[1]]))return}for(var a=0;a<e.length;a++)e[a]=u(e[a],0,255);return n=n||0==n?u(n,0,1):1,e[3]=n,e}}function a(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[u(parseInt(e[1]),0,360),u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(n)?1:n,0,1)]}}}function o(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[u(parseInt(e[1]),0,360),u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(n)?1:n,0,1)]}}}function r(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function s(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function u(t,e,n){return Math.min(Math.max(e,t),n)}function d(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var c=t(6);e.exports={getRgba:i,getHsla:a,getRgb:function(t){var e=i(t);return e&&e.slice(0,3)},getHsl:function(t){var e=a(t);return e&&e.slice(0,3)},getHwb:o,getAlpha:function(t){var e=i(t);return e?e[3]:(e=a(t))?e[3]:(e=o(t))?e[3]:void 0},hexString:function(t){return"#"+d(t[0])+d(t[1])+d(t[2])},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?r(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:r,percentString:function(t,e){return e<1||t[3]&&t[3]<1?l(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:l,hslString:function(t,e){return e<1||t[3]&&t[3]<1?s(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:s,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return h[t.slice(0,3)]}};var h={};for(var f in c)h[c[f]]=f},{6:6}],3:[function(t,e,n){var i=t(5),a=t(2),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;"string"==typeof t?(e=a.getRgba(t))?this.setValues("rgb",e):(e=a.getHsla(t))?this.setValues("hsl",e):(e=a.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e))};o.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return a.hexString(this.values.rgb)},rgbString:function(){return a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return a.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,a=void 0===e?.5:e,o=2*a-1,r=n.alpha()-i.alpha(),l=((o*r==-1?o:(o+r)/(1+o*r))+1)/2,s=1-l;return this.rgb(l*n.red()+s*i.red(),l*n.green()+s*i.green(),l*n.blue()+s*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new o,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},o.prototype.setValues=function(t,e){var n,a=this.values,o=this.spaces,r=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[o[t][0]]){var s=o[t];for(n=0;n<t.length;n++)a[t][n]=e[s[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;var u;for(n=0;n<t.length;n++)u=Math.max(0,Math.min(r[t][n],a[t][n])),a[t][n]=Math.round(u);for(var d in o)d!==t&&(a[d]=i[t][d](a[t]));return!0},o.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},o.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=o),e.exports=o},{2:2,5:5}],4:[function(t,e,n){function i(t){var e,n,i,a=t[0]/255,o=t[1]/255,r=t[2]/255,l=Math.min(a,o,r),s=Math.max(a,o,r),u=s-l;return s==l?e=0:a==s?e=(o-r)/u:o==s?e=2+(r-a)/u:r==s&&(e=4+(a-o)/u),(e=Math.min(60*e,360))<0&&(e+=360),i=(l+s)/2,n=s==l?0:i<=.5?u/(s+l):u/(2-s-l),[e,100*n,100*i]}function a(t){var e,n,i,a=t[0],o=t[1],r=t[2],l=Math.min(a,o,r),s=Math.max(a,o,r),u=s-l;return n=0==s?0:u/s*1e3/10,s==l?e=0:a==s?e=(o-r)/u:o==s?e=2+(r-a)/u:r==s&&(e=4+(a-o)/u),(e=Math.min(60*e,360))<0&&(e+=360),i=s/255*1e3/10,[e,n,i]}function o(t){var e=t[0],n=t[1],a=t[2];return[i(t)[0],100*(1/255*Math.min(e,Math.min(n,a))),100*(a=1-1/255*Math.max(e,Math.max(n,a)))]}function l(t){var e,n,i,a,o=t[0]/255,r=t[1]/255,l=t[2]/255;return a=Math.min(1-o,1-r,1-l),e=(1-o-a)/(1-a)||0,n=(1-r-a)/(1-a)||0,i=(1-l-a)/(1-a)||0,[100*e,100*n,100*i,100*a]}function s(t){return C[JSON.stringify(t)]}function u(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]}function d(t){var e,n,i,a=u(t),o=a[0],r=a[1],l=a[2];return o/=95.047,r/=100,l/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,l=l>.008856?Math.pow(l,1/3):7.787*l+16/116,e=116*r-16,n=500*(o-r),i=200*(r-l),[e,n,i]}function c(t){var e,n,i,a,o,r=t[0]/360,l=t[1]/100,s=t[2]/100;if(0==l)return o=255*s,[o,o,o];e=2*s-(n=s<.5?s*(1+l):s+l-s*l),a=[0,0,0];for(var u=0;u<3;u++)(i=r+1/3*-(u-1))<0&&i++,i>1&&i--,o=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*o;return a}function h(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,o=e-Math.floor(e),r=255*i*(1-n),l=255*i*(1-n*o),s=255*i*(1-n*(1-o)),i=255*i;switch(a){case 0:return[i,s,r];case 1:return[l,i,r];case 2:return[r,i,s];case 3:return[r,l,i];case 4:return[s,r,i];case 5:return[i,r,l]}}function f(t){var e,n,i,a,o=t[0]/360,l=t[1]/100,s=t[2]/100,u=l+s;switch(u>1&&(l/=u,s/=u),e=Math.floor(6*o),n=1-s,i=6*o-e,0!=(1&e)&&(i=1-i),a=l+i*(n-l),e){default:case 6:case 0:r=n,g=a,b=l;break;case 1:r=a,g=n,b=l;break;case 2:r=l,g=n,b=a;break;case 3:r=l,g=a,b=n;break;case 4:r=a,g=l,b=n;break;case 5:r=n,g=l,b=a}return[255*r,255*g,255*b]}function p(t){var e,n,i,a=t[0]/100,o=t[1]/100,r=t[2]/100,l=t[3]/100;return e=1-Math.min(1,a*(1-l)+l),n=1-Math.min(1,o*(1-l)+l),i=1-Math.min(1,r*(1-l)+l),[255*e,255*n,255*i]}function v(t){var e,n,i,a=t[0]/100,o=t[1]/100,r=t[2]/100;return e=3.2406*a+-1.5372*o+-.4986*r,n=-.9689*a+1.8758*o+.0415*r,i=.0557*a+-.204*o+1.057*r,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,e=Math.min(Math.max(0,e),1),n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),[255*e,255*n,255*i]}function m(t){var e,n,i,a=t[0],o=t[1],r=t[2];return a/=95.047,o/=100,r/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*o-16,n=500*(a-o),i=200*(o-r),[e,n,i]}function x(t){var e,n,i,a,o=t[0],r=t[1],l=t[2];return o<=8?a=(n=100*o/903.3)/100*7.787+16/116:(n=100*Math.pow((o+16)/116,3),a=Math.pow(n/100,1/3)),e=e/95.047<=.008856?e=95.047*(r/500+a-16/116)/7.787:95.047*Math.pow(r/500+a,3),i=i/108.883<=.008859?i=108.883*(a-l/200-16/116)/7.787:108.883*Math.pow(a-l/200,3),[e,n,i]}function y(t){var e,n,i,a=t[0],o=t[1],r=t[2];return e=Math.atan2(r,o),(n=360*e/2/Math.PI)<0&&(n+=360),i=Math.sqrt(o*o+r*r),[a,i,n]}function k(t){return v(x(t))}function w(t){var e,n,i,a=t[0],o=t[1];return i=t[2]/360*2*Math.PI,e=o*Math.cos(i),n=o*Math.sin(i),[a,e,n]}function M(t){return S[t]}e.exports={rgb2hsl:i,rgb2hsv:a,rgb2hwb:o,rgb2cmyk:l,rgb2keyword:s,rgb2xyz:u,rgb2lab:d,rgb2lch:function(t){return y(d(t))},hsl2rgb:c,hsl2hsv:function(t){var e,n,i=t[0],a=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,a*=o<=1?o:2-o,n=(o+a)/2,e=2*a/(o+a),[i,100*e,100*n])},hsl2hwb:function(t){return o(c(t))},hsl2cmyk:function(t){return l(c(t))},hsl2keyword:function(t){return s(c(t))},hsv2rgb:h,hsv2hsl:function(t){var e,n,i=t[0],a=t[1]/100,o=t[2]/100;return n=(2-a)*o,e=a*o,e/=n<=1?n:2-n,e=e||0,n/=2,[i,100*e,100*n]},hsv2hwb:function(t){return o(h(t))},hsv2cmyk:function(t){return l(h(t))},hsv2keyword:function(t){return s(h(t))},hwb2rgb:f,hwb2hsl:function(t){return i(f(t))},hwb2hsv:function(t){return a(f(t))},hwb2cmyk:function(t){return l(f(t))},hwb2keyword:function(t){return s(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return i(p(t))},cmyk2hsv:function(t){return a(p(t))},cmyk2hwb:function(t){return o(p(t))},cmyk2keyword:function(t){return s(p(t))},keyword2rgb:M,keyword2hsl:function(t){return i(M(t))},keyword2hsv:function(t){return a(M(t))},keyword2hwb:function(t){return o(M(t))},keyword2cmyk:function(t){return l(M(t))},keyword2lab:function(t){return d(M(t))},keyword2xyz:function(t){return u(M(t))},xyz2rgb:v,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:x,lab2rgb:k,lab2lch:y,lch2lab:w,lch2xyz:function(t){return x(w(t))},lch2rgb:function(t){return k(w(t))}};var S={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},C={};for(var _ in S)C[JSON.stringify(S[_])]=_},{}],5:[function(t,e,n){var i=t(4),a=function(){return new u};for(var o in i){a[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(o);var r=/(\w+)2(\w+)/.exec(o),l=r[1],s=r[2];(a[l]=a[l]||{})[s]=a[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var n=i[t](e);if("string"==typeof n||void 0===n)return n;for(var a=0;a<n.length;a++)n[a]=Math.round(n[a]);return n}}(o)}var u=function(){this.convs={}};u.prototype.routeSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n))},u.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},u.prototype.getValues=function(t){var e=this.convs[t];if(!e){var n=this.space,i=this.convs[n];e=a[n][t](i),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){u.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=a},{4:4}],6:[function(t,e,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,n){var i=t(29)();i.helpers=t(45),t(27)(i),i.defaults=t(25),i.Element=t(26),i.elements=t(40),i.Interaction=t(28),i.platform=t(48),t(31)(i),t(22)(i),t(23)(i),t(24)(i),t(30)(i),t(33)(i),t(32)(i),t(35)(i),t(54)(i),t(52)(i),t(53)(i),t(55)(i),t(56)(i),t(57)(i),t(15)(i),t(16)(i),t(17)(i),t(18)(i),t(19)(i),t(20)(i),t(21)(i),t(8)(i),t(9)(i),t(10)(i),t(11)(i),t(12)(i),t(13)(i),t(14)(i);var a=[];a.push(t(49)(i),t(50)(i),t(51)(i)),i.plugins.register(a),i.platform.initialize(),e.exports=i,"undefined"!=typeof window&&(window.Chart=i),i.canvasHelpers=i.helpers.canvas},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,35:35,40:40,45:45,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,8:8,9:9}],8:[function(t,e,n){"use strict";e.exports=function(t){t.Bar=function(e,n){return n.type="bar",new t(e,n)}}},{}],9:[function(t,e,n){"use strict";e.exports=function(t){t.Bubble=function(e,n){return n.type="bubble",new t(e,n)}}},{}],10:[function(t,e,n){"use strict";e.exports=function(t){t.Doughnut=function(e,n){return n.type="doughnut",new t(e,n)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t){t.Line=function(e,n){return n.type="line",new t(e,n)}}},{}],12:[function(t,e,n){"use strict";e.exports=function(t){t.PolarArea=function(e,n){return n.type="polarArea",new t(e,n)}}},{}],13:[function(t,e,n){"use strict";e.exports=function(t){t.Radar=function(e,n){return n.type="radar",new t(e,n)}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t){t.Scatter=function(e,n){return n.type="scatter",new t(e,n)}}},{}],15:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),i._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var n="";return t.length>0&&(t[0].yLabel?n=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(n=e.labels[t[0].index])),n},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var e,n=this;t.DatasetController.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0},update:function(t){var e,n,i=this,a=i.getMeta().data;for(i._ruler=i.getRuler(),e=0,n=a.length;e<n;++e)i.updateElement(a[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getMeta(),l=i.getDataset(),s=t.custom||{},u=a.options.elements.rectangle;t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={datasetLabel:l.label,label:a.data.labels[e],borderSkipped:s.borderSkipped?s.borderSkipped:u.borderSkipped,backgroundColor:s.backgroundColor?s.backgroundColor:o.valueAtIndexOrDefault(l.backgroundColor,e,u.backgroundColor),borderColor:s.borderColor?s.borderColor:o.valueAtIndexOrDefault(l.borderColor,e,u.borderColor),borderWidth:s.borderWidth?s.borderWidth:o.valueAtIndexOrDefault(l.borderWidth,e,u.borderWidth)},i.updateElementGeometry(t,e,n),t.pivot()},updateElementGeometry:function(t,e,n){var i=this,a=t._model,o=i.getValueScale(),r=o.getBasePixel(),l=o.isHorizontal(),s=i._ruler||i.getRuler(),u=i.calculateBarValuePixels(i.index,e),d=i.calculateBarIndexPixels(i.index,e,s);a.horizontal=l,a.base=n?r:u.base,a.x=l?n?r:u.head:d.center,a.y=l?d.center:n?r:u.head,a.height=l?d.size:void 0,a.width=l?void 0:d.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},getStackCount:function(t){var e,n,i=this,a=i.chart,o=i.getIndexScale().options.stacked,r=void 0===t?a.data.datasets.length:t+1,l=[];for(e=0;e<r;++e)(n=a.getDatasetMeta(e)).bar&&a.isDatasetVisible(e)&&(!1===o||!0===o&&-1===l.indexOf(n.stack)||void 0===o&&(void 0===n.stack||-1===l.indexOf(n.stack)))&&l.push(n.stack);return l.length},getStackIndex:function(t){return this.getStackCount(t)-1},getRuler:function(){var t,e,n=this,i=n.getIndexScale(),a=n.getStackCount(),o=n.index,r=[],l=i.isHorizontal(),s=l?i.left:i.top,u=s+(l?i.width:i.height);for(t=0,e=n.getMeta().data.length;t<e;++t)r.push(i.getPixelForValue(null,t,o));return{pixels:r,start:s,end:u,stackCount:a,scale:i}},calculateBarValuePixels:function(t,e){var n,i,a,o,r,l,s=this,u=s.chart,d=s.getMeta(),c=s.getValueScale(),h=u.data.datasets,f=c.getRightValue(h[t].data[e]),g=c.options.stacked,p=d.stack,v=0;if(g||void 0===g&&void 0!==p)for(n=0;n<t;++n)(i=u.getDatasetMeta(n)).bar&&i.stack===p&&i.controller.getValueScaleId()===c.id&&u.isDatasetVisible(n)&&(a=c.getRightValue(h[n].data[e]),(f<0&&a<0||f>=0&&a>0)&&(v+=a));return o=c.getPixelForValue(v),r=c.getPixelForValue(v+f),l=(r-o)/2,{size:l,base:o,head:r,center:r+l/2}},calculateBarIndexPixels:function(t,e,n){var i,a,r,l,s,u,d=this,c=n.scale.options,h=d.getStackIndex(t),f=n.pixels,g=f[e],p=f.length,v=n.start,m=n.end;return 1===p?(i=g>v?g-v:m-g,a=g<m?m-g:g-v):(e>0&&(i=(g-f[e-1])/2,e===p-1&&(a=i)),e<p-1&&(a=(f[e+1]-g)/2,0===e&&(i=a))),r=i*c.categoryPercentage,l=a*c.categoryPercentage,s=(r+l)/n.stackCount,u=s*c.barPercentage,u=Math.min(o.valueOrDefault(c.barThickness,u),o.valueOrDefault(c.maxBarThickness,1/0)),g-=r,g+=s*h,g+=(s-u)/2,{size:u,base:g,head:g+u,center:g+u/2}},draw:function(){var t=this,e=t.chart,n=t.getValueScale(),i=t.getMeta().data,a=t.getDataset(),r=i.length,l=0;for(o.canvas.clipArea(e.ctx,e.chartArea);l<r;++l)isNaN(n.getRightValue(a.data[l]))||i[l].draw();o.canvas.unclipArea(e.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model;a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:o.valueAtIndexOrDefault(e.hoverBackgroundColor,n,o.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:o.valueAtIndexOrDefault(e.hoverBorderColor,n,o.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:o.valueAtIndexOrDefault(e.hoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=this.chart.options.elements.rectangle;a.backgroundColor=i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(e.backgroundColor,n,r.backgroundColor),a.borderColor=i.borderColor?i.borderColor:o.valueAtIndexOrDefault(e.borderColor,n,r.borderColor),a.borderWidth=i.borderWidth?i.borderWidth:o.valueAtIndexOrDefault(e.borderWidth,n,r.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(t){var e=this,n=e.getMeta().data;o.each(n,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var i=this,a=i.getMeta(),o=t.custom||{},r=i.getScaleForId(a.xAxisID),l=i.getScaleForId(a.yAxisID),s=i._resolveElementOptions(t,e),u=i.getDataset().data[e],d=i.index,c=n?r.getPixelForDecimal(.5):r.getPixelForValue("object"==typeof u?u:NaN,e,d),h=n?l.getBasePixel():l.getPixelForValue(u,e,d);t._xScale=r,t._yScale=l,t._options=s,t._datasetIndex=d,t._index=e,t._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,radius:n?0:s.radius,skip:o.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options;e.backgroundColor=o.valueOrDefault(n.hoverBackgroundColor,o.getHoverColor(n.backgroundColor)),e.borderColor=o.valueOrDefault(n.hoverBorderColor,o.getHoverColor(n.borderColor)),e.borderWidth=o.valueOrDefault(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},removeHoverStyle:function(t){var e=t._model,n=t._options;e.backgroundColor=n.backgroundColor,e.borderColor=n.borderColor,e.borderWidth=n.borderWidth,e.radius=n.radius},_resolveElementOptions:function(t,e){var n,i,a,r=this,l=r.chart,s=l.data.datasets[r.index],u=t.custom||{},d=l.options.elements.point,c=o.options.resolve,h=s.data[e],f={},g={chart:l,dataIndex:e,dataset:s,datasetIndex:r.index},p=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(n=0,i=p.length;n<i;++n)f[a=p[n]]=c([u[a],s[a],d[a]],g,e);return f.radius=c([u.radius,h?h.r:void 0,s.radius,d.radius],g,e),f}})}},{25:25,40:40,45:45}],17:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var o=0;o<i[0].data.length;++o)e.push('<li><span style="background-color:'+i[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],l=a.data[i],s=l&&l.custom||{},u=o.valueAtIndexOrDefault,d=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:u(r.backgroundColor,i,d.backgroundColor),strokeStyle:s.borderColor?s.borderColor:u(r.borderColor,i,d.borderColor),lineWidth:s.borderWidth?s.borderWidth:u(r.borderWidth,i,d.borderWidth),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n<i;++n)(a=r.getDatasetMeta(n)).data[o]&&(a.data[o].hidden=!a.data[o].hidden);r.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return o.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}}),i._set("pie",o.clone(i.doughnut)),i._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:a.Arc,linkScales:o.noop,getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e=this,n=e.chart,i=n.chartArea,a=n.options,r=a.elements.arc,l=i.right-i.left-r.borderWidth,s=i.bottom-i.top-r.borderWidth,u=Math.min(l,s),d={x:0,y:0},c=e.getMeta(),h=a.cutoutPercentage,f=a.circumference;if(f<2*Math.PI){var g=a.rotation%(2*Math.PI),p=(g+=2*Math.PI*(g>=Math.PI?-1:g<-Math.PI?1:0))+f,v={x:Math.cos(g),y:Math.sin(g)},m={x:Math.cos(p),y:Math.sin(p)},b=g<=0&&p>=0||g<=2*Math.PI&&2*Math.PI<=p,x=g<=.5*Math.PI&&.5*Math.PI<=p||g<=2.5*Math.PI&&2.5*Math.PI<=p,y=g<=-Math.PI&&-Math.PI<=p||g<=Math.PI&&Math.PI<=p,k=g<=.5*-Math.PI&&.5*-Math.PI<=p||g<=1.5*Math.PI&&1.5*Math.PI<=p,w=h/100,M={x:y?-1:Math.min(v.x*(v.x<0?1:w),m.x*(m.x<0?1:w)),y:k?-1:Math.min(v.y*(v.y<0?1:w),m.y*(m.y<0?1:w))},S={x:b?1:Math.max(v.x*(v.x>0?1:w),m.x*(m.x>0?1:w)),y:x?1:Math.max(v.y*(v.y>0?1:w),m.y*(m.y>0?1:w))},C={width:.5*(S.x-M.x),height:.5*(S.y-M.y)};u=Math.min(l/C.width,s/C.height),d={x:-.5*(S.x+M.x),y:-.5*(S.y+M.y)}}n.borderWidth=e.getMaxBorderWidth(c.data),n.outerRadius=Math.max((u-n.borderWidth)/2,0),n.innerRadius=Math.max(h?n.outerRadius/100*h:0,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),n.offsetX=d.x*n.outerRadius,n.offsetY=d.y*n.outerRadius,c.total=e.calculateTotal(),e.outerRadius=n.outerRadius-n.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-n.radiusLength,0),o.each(c.data,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,l=a.options,s=l.animation,u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,c=l.rotation,h=l.rotation,f=i.getDataset(),g=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(f.data[e])*(l.circumference/(2*Math.PI)),p=n&&s.animateScale?0:i.innerRadius,v=n&&s.animateScale?0:i.outerRadius,m=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:i.index,_index:e,_model:{x:u+a.offsetX,y:d+a.offsetY,startAngle:c,endAngle:h,circumference:g,outerRadius:v,innerRadius:p,label:m(f.label,e,a.data.labels[e])}});var b=t._model;this.removeHoverStyle(t),n&&s.animateRotate||(b.startAngle=0===e?l.rotation:i.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return o.each(n.data,function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))}),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,n,i=0,a=this.index,o=t.length,r=0;r<o;r++)e=t[r]._model?t[r]._model.borderWidth:0,i=(n=t[r]._chart?t[r]._chart.config.data.datasets[a].hoverBorderWidth:0)>(i=e>i?e:i)?n:i;return i}})}},{25:25,40:40,45:45}],18:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var n,i,a,r=this,l=r.getMeta(),s=l.dataset,u=l.data||[],d=r.chart.options,c=d.elements.line,h=r.getScaleForId(l.yAxisID),f=r.getDataset(),g=e(f,d);for(g&&(a=s.custom||{},void 0!==f.tension&&void 0===f.lineTension&&(f.lineTension=f.tension),s._scale=h,s._datasetIndex=r.index,s._children=u,s._model={spanGaps:f.spanGaps?f.spanGaps:d.spanGaps,tension:a.tension?a.tension:o.valueOrDefault(f.lineTension,c.tension),backgroundColor:a.backgroundColor?a.backgroundColor:f.backgroundColor||c.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:f.borderWidth||c.borderWidth,borderColor:a.borderColor?a.borderColor:f.borderColor||c.borderColor,borderCapStyle:a.borderCapStyle?a.borderCapStyle:f.borderCapStyle||c.borderCapStyle,borderDash:a.borderDash?a.borderDash:f.borderDash||c.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:f.borderDashOffset||c.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:f.borderJoinStyle||c.borderJoinStyle,fill:a.fill?a.fill:void 0!==f.fill?f.fill:c.fill,steppedLine:a.steppedLine?a.steppedLine:o.valueOrDefault(f.steppedLine,c.stepped),cubicInterpolationMode:a.cubicInterpolationMode?a.cubicInterpolationMode:o.valueOrDefault(f.cubicInterpolationMode,c.cubicInterpolationMode)},s.pivot()),n=0,i=u.length;n<i;++n)r.updateElement(u[n],n,t);for(g&&0!==s._model.tension&&r.updateBezierControlPoints(),n=0,i=u.length;n<i;++n)u[n].pivot()},getPointBackgroundColor:function(t,e){var n=this.chart.options.elements.point.backgroundColor,i=this.getDataset(),a=t.custom||{};return a.backgroundColor?n=a.backgroundColor:i.pointBackgroundColor?n=o.valueAtIndexOrDefault(i.pointBackgroundColor,e,n):i.backgroundColor&&(n=i.backgroundColor),n},getPointBorderColor:function(t,e){var n=this.chart.options.elements.point.borderColor,i=this.getDataset(),a=t.custom||{};return a.borderColor?n=a.borderColor:i.pointBorderColor?n=o.valueAtIndexOrDefault(i.pointBorderColor,e,n):i.borderColor&&(n=i.borderColor),n},getPointBorderWidth:function(t,e){var n=this.chart.options.elements.point.borderWidth,i=this.getDataset(),a=t.custom||{};return isNaN(a.borderWidth)?!isNaN(i.pointBorderWidth)||o.isArray(i.pointBorderWidth)?n=o.valueAtIndexOrDefault(i.pointBorderWidth,e,n):isNaN(i.borderWidth)||(n=i.borderWidth):n=a.borderWidth,n},updateElement:function(t,e,n){var i,a,r=this,l=r.getMeta(),s=t.custom||{},u=r.getDataset(),d=r.index,c=u.data[e],h=r.getScaleForId(l.yAxisID),f=r.getScaleForId(l.xAxisID),g=r.chart.options.elements.point;void 0!==u.radius&&void 0===u.pointRadius&&(u.pointRadius=u.radius),void 0!==u.hitRadius&&void 0===u.pointHitRadius&&(u.pointHitRadius=u.hitRadius),i=f.getPixelForValue("object"==typeof c?c:NaN,e,d),a=n?h.getBasePixel():r.calculatePointY(c,e,d),t._xScale=f,t._yScale=h,t._datasetIndex=d,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:s.radius||o.valueAtIndexOrDefault(u.pointRadius,e,g.radius),pointStyle:s.pointStyle||o.valueAtIndexOrDefault(u.pointStyle,e,g.pointStyle),backgroundColor:r.getPointBackgroundColor(t,e),borderColor:r.getPointBorderColor(t,e),borderWidth:r.getPointBorderWidth(t,e),tension:l.dataset._model?l.dataset._model.tension:0,steppedLine:!!l.dataset._model&&l.dataset._model.steppedLine,hitRadius:s.hitRadius||o.valueAtIndexOrDefault(u.pointHitRadius,e,g.hitRadius)}},calculatePointY:function(t,e,n){var i,a,o,r=this,l=r.chart,s=r.getMeta(),u=r.getScaleForId(s.yAxisID),d=0,c=0;if(u.options.stacked){for(i=0;i<n;i++)if(a=l.data.datasets[i],"line"===(o=l.getDatasetMeta(i)).type&&o.yAxisID===u.id&&l.isDatasetVisible(i)){var h=Number(u.getRightValue(a.data[e]));h<0?c+=h||0:d+=h||0}var f=Number(u.getRightValue(t));return f<0?u.getPixelForValue(c+f):u.getPixelForValue(d+f)}return u.getPixelForValue(t)},updateBezierControlPoints:function(){function t(t,e,n){return Math.max(Math.min(t,n),e)}var e,n,i,a,r=this,l=r.getMeta(),s=r.chart.chartArea,u=l.data||[];if(l.dataset._model.spanGaps&&(u=u.filter(function(t){return!t._model.skip})),"monotone"===l.dataset._model.cubicInterpolationMode)o.splineCurveMonotone(u);else for(e=0,n=u.length;e<n;++e)i=u[e]._model,a=o.splineCurve(o.previousItem(u,e)._model,i,o.nextItem(u,e)._model,l.dataset._model.tension),i.controlPointPreviousX=a.previous.x,i.controlPointPreviousY=a.previous.y,i.controlPointNextX=a.next.x,i.controlPointNextY=a.next.y;if(r.chart.options.elements.line.capBezierPoints)for(e=0,n=u.length;e<n;++e)(i=u[e]._model).controlPointPreviousX=t(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=t(i.controlPointPreviousY,s.top,s.bottom),i.controlPointNextX=t(i.controlPointNextX,s.left,s.right),i.controlPointNextY=t(i.controlPointNextY,s.top,s.bottom)},draw:function(){var t=this,n=t.chart,i=t.getMeta(),a=i.data||[],r=n.chartArea,l=a.length,s=0;for(o.canvas.clipArea(n.ctx,r),e(t.getDataset(),n.options)&&i.dataset.draw(),o.canvas.unclipArea(n.ctx);s<l;++s)a[s].draw(r)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model;a.radius=i.hoverRadius||o.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor||o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,o.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor||o.valueAtIndexOrDefault(e.pointHoverBorderColor,n,o.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth||o.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this,n=e.chart.data.datasets[t._datasetIndex],i=t._index,a=t.custom||{},r=t._model;void 0!==n.radius&&void 0===n.pointRadius&&(n.pointRadius=n.radius),r.radius=a.radius||o.valueAtIndexOrDefault(n.pointRadius,i,e.chart.options.elements.point.radius),r.backgroundColor=e.getPointBackgroundColor(t,i),r.borderColor=e.getPointBorderColor(t,i),r.borderWidth=e.getPointBorderWidth(t,i)}})}},{25:25,40:40,45:45}],19:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var o=0;o<i[0].data.length;++o)e.push('<li><span style="background-color:'+i[0].backgroundColor[o]+'"></span>'),a[o]&&e.push(a[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],l=a.data[i].custom||{},s=o.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:s(r.backgroundColor,i,u.backgroundColor),strokeStyle:l.borderColor?l.borderColor:s(r.borderColor,i,u.borderColor),lineWidth:l.borderWidth?l.borderWidth:s(r.borderWidth,i,u.borderWidth),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,a,o=e.index,r=this.chart;for(n=0,i=(r.data.datasets||[]).length;n<i;++n)(a=r.getDatasetMeta(n)).data[o].hidden=!a.data[o].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:a.Arc,linkScales:o.noop,update:function(t){var e=this,n=e.chart,i=n.chartArea,a=e.getMeta(),r=n.options,l=r.elements.arc,s=Math.min(i.right-i.left,i.bottom-i.top);n.outerRadius=Math.max((s-l.borderWidth/2)/2,0),n.innerRadius=Math.max(r.cutoutPercentage?n.outerRadius/100*r.cutoutPercentage:1,0),n.radiusLength=(n.outerRadius-n.innerRadius)/n.getVisibleDatasetCount(),e.outerRadius=n.outerRadius-n.radiusLength*e.index,e.innerRadius=e.outerRadius-n.radiusLength,a.count=e.countVisibleElements(),o.each(a.data,function(n,i){e.updateElement(n,i,t)})},updateElement:function(t,e,n){for(var i=this,a=i.chart,r=i.getDataset(),l=a.options,s=l.animation,u=a.scale,d=a.data.labels,c=i.calculateCircumference(r.data[e]),h=u.xCenter,f=u.yCenter,g=0,p=i.getMeta(),v=0;v<e;++v)isNaN(r.data[v])||p.data[v].hidden||++g;var m=l.startAngle,b=t.hidden?0:u.getDistanceFromCenterForValue(r.data[e]),x=m+c*g,y=x+(t.hidden?0:c),k=s.animateScale?0:u.getDistanceFromCenterForValue(r.data[e]);o.extend(t,{_datasetIndex:i.index,_index:e,_scale:u,_model:{x:h,y:f,innerRadius:0,outerRadius:n?k:b,startAngle:n&&s.animateRotate?m:x,endAngle:n&&s.animateRotate?m:y,label:o.valueAtIndexOrDefault(d,e,d[e])}}),i.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return o.each(e.data,function(e,i){isNaN(t.data[i])||e.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:o.noop,update:function(t){var e=this,n=e.getMeta(),i=n.dataset,a=n.data,r=i.custom||{},l=e.getDataset(),s=e.chart.options.elements.line,u=e.chart.scale;void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o.extend(n.dataset,{_datasetIndex:e.index,_scale:u,_children:a,_loop:!0,_model:{tension:r.tension?r.tension:o.valueOrDefault(l.lineTension,s.tension),backgroundColor:r.backgroundColor?r.backgroundColor:l.backgroundColor||s.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:l.borderWidth||s.borderWidth,borderColor:r.borderColor?r.borderColor:l.borderColor||s.borderColor,fill:r.fill?r.fill:void 0!==l.fill?l.fill:s.fill,borderCapStyle:r.borderCapStyle?r.borderCapStyle:l.borderCapStyle||s.borderCapStyle,borderDash:r.borderDash?r.borderDash:l.borderDash||s.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:l.borderDashOffset||s.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:l.borderJoinStyle||s.borderJoinStyle}}),n.dataset.pivot(),o.each(a,function(n,i){e.updateElement(n,i,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),l=i.chart.scale,s=i.chart.options.elements.point,u=l.getPointPositionForValue(e,r.data[e]);void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),void 0!==r.hitRadius&&void 0===r.pointHitRadius&&(r.pointHitRadius=r.hitRadius),o.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{x:n?l.xCenter:u.x,y:n?l.yCenter:u.y,tension:a.tension?a.tension:o.valueOrDefault(r.lineTension,i.chart.options.elements.line.tension),radius:a.radius?a.radius:o.valueAtIndexOrDefault(r.pointRadius,e,s.radius),backgroundColor:a.backgroundColor?a.backgroundColor:o.valueAtIndexOrDefault(r.pointBackgroundColor,e,s.backgroundColor),borderColor:a.borderColor?a.borderColor:o.valueAtIndexOrDefault(r.pointBorderColor,e,s.borderColor),borderWidth:a.borderWidth?a.borderWidth:o.valueAtIndexOrDefault(r.pointBorderWidth,e,s.borderWidth),pointStyle:a.pointStyle?a.pointStyle:o.valueAtIndexOrDefault(r.pointStyle,e,s.pointStyle),hitRadius:a.hitRadius?a.hitRadius:o.valueAtIndexOrDefault(r.pointHitRadius,e,s.hitRadius)}}),t._model.skip=a.skip?a.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(n,i){var a=n._model,r=o.splineCurve(o.previousItem(e.data,i,!0)._model,a,o.nextItem(e.data,i,!0)._model,a.tension);a.controlPointPreviousX=Math.max(Math.min(r.previous.x,t.right),t.left),a.controlPointPreviousY=Math.max(Math.min(r.previous.y,t.bottom),t.top),a.controlPointNextX=Math.max(Math.min(r.next.x,t.right),t.left),a.controlPointNextY=Math.max(Math.min(r.next.y,t.bottom),t.top),n.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model;a.radius=n.hoverRadius?n.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t.custom||{},i=t._index,a=t._model,r=this.chart.options.elements.point;a.radius=n.radius?n.radius:o.valueAtIndexOrDefault(e.pointRadius,i,r.radius),a.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,i,r.backgroundColor),a.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,i,r.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,i,r.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,n){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,n,i){var a,o,r=this.animations;for(e.chart=t,i||(t.animating=!0),a=0,o=r.length;a<o;++a)if(r[a].chart===t)return void(r[a]=e);r.push(e),1===r.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=o.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=o.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),n=0;t.dropFrames>1&&(n=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+n);var i=Date.now();t.dropFrames+=(i-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,n,i=this.animations,a=0;a<i.length;)n=(e=i[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),o.callback(e.render,[n,e],n),o.callback(e.onAnimationProgress,[e],n),e.currentStep>=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var i=t(25),a=t(45),o=t(28),r=t(48);e.exports=function(t){function e(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=a.configMerge(i.global,i[t.type],t.options||{}),t}function n(t){var e=t.options;e.scale?t.scale.options=e.scale:e.scales&&e.scales.xAxes.concat(e.scales.yAxes).forEach(function(e){t.scales[e.id].options=e}),t.tooltip._options=e.tooltips}function l(t){return"top"===t||"bottom"===t}var s=t.plugins;t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(n,i){var o=this;i=e(i);var l=r.acquireContext(n,i),s=l&&l.canvas,u=s&&s.height,d=s&&s.width;o.id=a.uid(),o.ctx=l,o.canvas=s,o.config=i,o.width=d,o.height=u,o.aspectRatio=u?d/u:null,o.options=i.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),l&&s?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return s.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),s.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(a.getMaximumWidth(i))),l=Math.max(0,Math.floor(o?r/o:a.getMaximumHeight(i)));if((e.width!==r||e.height!==l)&&(i.width=e.width=r,i.height=e.height=l,i.style.width=r+"px",i.style.height=l+"px",a.retinaScale(e,n.devicePixelRatio),!t)){var u={width:r,height:l};s.notify(e,"resize",[u]),e.options.onResize&&e.options.onResize(e,u),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildScales:function(){var e=this,n=e.options,i=e.scales={},o=[];n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,function(n){var o=n.options,r=a.valueOrDefault(o.type,n.dtype),s=t.scaleService.getScaleConstructor(r);if(s){l(o.position)!==l(n.dposition)&&(o.position=n.dposition);var u=new s({id:o.id,options:o,ctx:e.ctx,chart:e});i[u.id]=u,u.mergeTicksOptions(),n.isDefault&&(e.scale=u)}}),t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return a.each(e.data.datasets,function(a,o){var r=e.getDatasetMeta(o),l=a.type||e.config.type;if(r.type&&r.type!==l&&(e.destroyDatasetMeta(o),r=e.getDatasetMeta(o)),r.type=l,n.push(r.type),r.controller)r.controller.updateIndex(o);else{var s=t.controllers[r.type];if(void 0===s)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new s(e,o),i.push(r.controller)}},e),i},resetElements:function(){var t=this;a.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n(e),!1!==s.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var i=e.buildOrUpdateControllers();a.each(e.data.datasets,function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()},e),e.updateLayout(),a.each(i,function(t){t.reset()}),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],s.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var e=this;!1!==s.notify(e,"beforeLayout")&&(t.layoutService.update(this,this.width,this.height),s.notify(e,"afterScaleUpdate"),s.notify(e,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==s.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);s.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),i={meta:n,index:t};!1!==s.notify(e,"beforeDatasetUpdate",[i])&&(n.controller.update(),s.notify(e,"afterDatasetUpdate",[i]))},render:function(e){var n=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var i=e.duration,o=e.lazy;if(!1!==s.notify(n,"beforeRender")){var r=n.options.animation,l=function(t){s.notify(n,"afterRender"),a.callback(r&&r.onComplete,[t],n)};if(r&&(void 0!==i&&0!==i||void 0===i&&0!==r.duration)){var u=new t.Animation({numSteps:(i||r.duration)/16.66,easing:e.easing||r.easing,render:function(t,e){var n=a.easing.effects[e.easing],i=e.currentStep,o=i/e.numSteps;t.draw(n(o),o,i)},onAnimationProgress:r.onProgress,onAnimationComplete:l});t.animationService.addAnimation(n,u,i,o)}else n.draw(),l(new t.Animation({numSteps:0,chart:n}));return n}},draw:function(t){var e=this;e.clear(),a.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==s.notify(e,"beforeDraw",[t])&&(a.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),s.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=this,n=0,i=(e.data.datasets||[]).length;n<i;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==s.notify(e,"beforeDatasetsDraw",[t])){for(var n=(e.data.datasets||[]).length-1;n>=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);s.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i=n.getDatasetMeta(t),a={meta:i,index:t,easingValue:e};!1!==s.notify(n,"beforeDatasetDraw",[a])&&(i.controller.draw(e),s.notify(n,"afterDatasetDraw",[a]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==s.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),s.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=o.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var e,n,i=this,o=i.canvas;for(i.stop(),e=0,n=i.data.datasets.length;e<n;++e)i.destroyDatasetMeta(e);o&&(i.unbindEvents(),a.canvas.clear(i),r.releaseContext(i.ctx),i.canvas=null,i.ctx=null),s.notify(i,"destroy"),delete t.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};a.each(t.options.events,function(i){r.addEventListener(t,i,n),e[i]=n}),t.options.responsive&&(n=function(){t.resize()},r.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,a.each(e,function(e,n){r.removeEventListener(t,n,e)}))},updateHoverStyle:function(t,e,n){var i,a,o,r=n?"setHoverStyle":"removeHoverStyle";for(a=0,o=t.length;a<o;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[r](i)},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==s.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);i|=n&&n.handleEvent(t),s.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e=this,n=e.options||{},i=n.hover,o=!1;return e.lastActive=e.lastActive||[],"mouseout"===t.type?e.active=[]:e.active=e.getElementsAtEventForMode(t,i.mode,i),a.callback(n.onHover||n.hover.onHover,[t.native,e.active],e),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(e,t.native,e.active),e.lastActive.length&&e.updateHoverStyle(e.lastActive,i.mode,!1),e.active.length&&i.mode&&e.updateHoverStyle(e.active,i.mode,!0),o=!a.arrayEquals(e.active,e.lastActive),e.lastActive=e.active,o}}),t.Controller=t}},{25:25,28:28,45:45,48:48}],24:[function(t,e,n){"use strict";var i=t(45);e.exports=function(t){function e(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),a.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),a=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),o=a.apply(this,e);return i.each(t._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),o}})}))}function n(t,e){var n=t._chartjs;if(n){var i=n.listeners,o=i.indexOf(e);-1!==o&&i.splice(o,1),i.length>0||(a.forEach(function(e){delete t[e]}),delete t._chartjs)}}var a=["push","pop","shift","splice","unshift"];t.DatasetController=function(t,e){this.initialize(t,e)},i.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null===e.xAxisID&&(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null===e.yAxisID&&(e.yAxisID=n.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],o=i.data;for(t=0,e=a.length;t<e;++t)o[t]=o[t]||n.createMetaData(t);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t=this,i=t.getDataset(),a=i.data||(i.data=[]);t._data!==a&&(t._data&&n(t._data,t),e(a,t),t._data=a),t.resyncElements()},update:i.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},removeHoverStyle:function(t,e){var n=this.chart.data.datasets[t._datasetIndex],a=t._index,o=t.custom||{},r=i.valueAtIndexOrDefault,l=t._model;l.backgroundColor=o.backgroundColor?o.backgroundColor:r(n.backgroundColor,a,e.backgroundColor),l.borderColor=o.borderColor?o.borderColor:r(n.borderColor,a,e.borderColor),l.borderWidth=o.borderWidth?o.borderWidth:r(n.borderWidth,a,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},o=i.valueAtIndexOrDefault,r=i.getHoverColor,l=t._model;l.backgroundColor=a.hoverBackgroundColor?a.hoverBackgroundColor:o(e.hoverBackgroundColor,n,r(l.backgroundColor)),l.borderColor=a.hoverBorderColor?a.hoverBorderColor:o(e.hoverBorderColor,n,r(l.borderColor)),l.borderWidth=a.hoverBorderWidth?a.hoverBorderWidth:o(e.hoverBorderWidth,n,l.borderWidth)},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,i=e.data.length,a=n.length;a<i?e.data.splice(a,i-a):a>i&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=i.inherits}},{45:45}],25:[function(t,e,n){"use strict";var i=t(45);e.exports={_set:function(t,e){return i.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,n){"use strict";function i(t,e,n,i){var o,r,l,s,u,d,c,h,f,g=Object.keys(n);for(o=0,r=g.length;o<r;++o)if(l=g[o],d=n[l],e.hasOwnProperty(l)||(e[l]=d),(s=e[l])!==d&&"_"!==l[0]){if(t.hasOwnProperty(l)||(t[l]=s),u=t[l],(c=typeof d)===typeof u)if("string"===c){if((h=a(u)).valid&&(f=a(d)).valid){e[l]=f.mix(h,i).rgbString();continue}}else if("number"===c&&isFinite(u)&&isFinite(d)){e[l]=u+(d-u)*i;continue}e[l]=d}}var a=t(3),o=t(45),r=function(t){o.extend(this,t),this.initialize.apply(this,arguments)};o.extend(r.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=o.clone(t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,a=e._start,o=e._view;return n&&1!==t?(o||(o=e._view={}),a||(a=e._start={}),i(a,o,n,t),e):(e._view=n,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return o.isNumber(this._model.x)&&o.isNumber(this._model.y)}}),r.extend=o.inherits,e.exports=r},{3:3,45:45}],27:[function(t,e,n){"use strict";var i=t(3),a=t(25),o=t(45);e.exports=function(t){function e(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function n(t){return void 0!==t&&null!==t&&"none"!==t}function r(t,i,a){var o=document.defaultView,r=t.parentNode,l=o.getComputedStyle(t)[i],s=o.getComputedStyle(r)[i],u=n(l),d=n(s),c=Number.POSITIVE_INFINITY;return u||d?Math.min(u?e(l,t,a):c,d?e(s,r,a):c):"none"}o.configMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,n,i,a){var r=n[e]||{},l=i[e];"scales"===e?n[e]=o.scaleMerge(r,l):"scale"===e?n[e]=o.merge(r,[t.scaleService.getScaleDefaults(l.type),l]):o._merger(e,n,i,a)}})},o.scaleMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,n,i,a){if("xAxes"===e||"yAxes"===e){var r,l,s,u=i[e].length;for(n[e]||(n[e]=[]),r=0;r<u;++r)s=i[e][r],l=o.valueOrDefault(s.type,"xAxes"===e?"category":"linear"),r>=n[e].length&&n[e].push({}),!n[e][r].type||s.type&&s.type!==n[e][r].type?o.merge(n[e][r],[t.scaleService.getScaleDefaults(l),s]):o.merge(n[e][r],s)}else o._merger(e,n,i,a)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return o.each(t,function(t){e(t)&&n.push(t)}),n},o.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},o.findNextWhere=function(t,e,n){o.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},o.findPreviousWhere=function(t,e,n){o.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,n){return Math.abs(t-e)<n},o.almostWhole=function(t,e){var n=Math.round(t);return n-e<t&&n+e>t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),o=Math.atan2(i,n);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:a}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,n,i){var a=t.skip?e:t,o=e,r=n.skip?e:n,l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),s=Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),u=l/(l+s),d=s/(l+s),c=i*(u=isNaN(u)?0:u),h=i*(d=isNaN(d)?0:d);return{previous:{x:o.x-c*(r.x-a.x),y:o.y-c*(r.y-a.y)},next:{x:o.x+h*(r.x-a.x),y:o.y+h*(r.y-a.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,n,i,a,r=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),l=r.length;for(e=0;e<l;++e)if(!(i=r[e]).model.skip){if(n=e>0?r[e-1]:null,(a=e<l-1?r[e+1]:null)&&!a.model.skip){var s=a.model.x-i.model.x;i.deltaK=0!==s?(a.model.y-i.model.y)/s:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}var u,d,c,h;for(e=0;e<l-1;++e)i=r[e],a=r[e+1],i.model.skip||a.model.skip||(o.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(u=i.mK/i.deltaK,d=a.mK/i.deltaK,(h=Math.pow(u,2)+Math.pow(d,2))<=9||(c=3/Math.sqrt(h),i.mK=u*c*i.deltaK,a.mK=d*c*i.deltaK)));var f;for(e=0;e<l;++e)(i=r[e]).model.skip||(n=e>0?r[e-1]:null,a=e<l-1?r[e+1]:null,n&&!n.model.skip&&(f=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-f,i.model.controlPointPreviousY=i.model.y-f*i.mK),a&&!a.model.skip&&(f=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+f,i.model.controlPointNextY=i.model.y+f*i.mK))},o.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var n=Math.floor(o.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},o.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},o.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.currentTarget||t.srcElement,l=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var u=parseFloat(o.getStyle(r,"padding-left")),d=parseFloat(o.getStyle(r,"padding-top")),c=parseFloat(o.getStyle(r,"padding-right")),h=parseFloat(o.getStyle(r,"padding-bottom")),f=l.right-l.left-u-c,g=l.bottom-l.top-d-h;return n=Math.round((n-l.left-u)/f*r.width/e.currentDevicePixelRatio),i=Math.round((i-l.top-d)/g*r.height/e.currentDevicePixelRatio),{x:n,y:i}},o.getConstraintWidth=function(t){return r(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return r(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var n=parseInt(o.getStyle(e,"padding-left"),10),i=parseInt(o.getStyle(e,"padding-right"),10),a=e.clientWidth-n-i,r=o.getConstraintWidth(t);return isNaN(r)?a:Math.min(a,r)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var n=parseInt(o.getStyle(e,"padding-top"),10),i=parseInt(o.getStyle(e,"padding-bottom"),10),a=e.clientHeight-n-i,r=o.getConstraintHeight(t);return isNaN(r)?a:Math.min(a,r)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,o=t.width;i.height=a*n,i.width=o*n,t.ctx.scale(n,n),i.style.height=a+"px",i.style.width=o+"px"}},o.fontString=function(t,e,n){return e+" "+t+"px "+n},o.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var l=0;o.each(n,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?l=o.measureText(t,a,r,l,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(l=o.measureText(t,a,r,l,e))})});var s=r.length/2;if(s>n.length){for(var u=0;u<s;u++)delete a[r[u]];r.splice(0,s)}return l},o.measureText=function(t,e,n,i,a){var o=e[a];return o||(o=e[a]=t.measureText(a).width,n.push(a)),o>i&&(i=o),i},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,n){"use strict";function i(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function a(t,e){var n,i,a,o,r;for(i=0,o=t.data.datasets.length;i<o;++i)if(t.isDatasetVisible(i))for(a=0,r=(n=t.getDatasetMeta(i)).data.length;a<r;++a){var l=n.data[a];l._view.skip||e(l)}}function o(t,e){var n=[];return a(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function r(t,e,n,i){var o=Number.POSITIVE_INFINITY,r=[];return a(t,function(t){if(!n||t.inRange(e.x,e.y)){var a=t.getCenterPoint(),l=i(e,a);l<o?(r=[t],o=l):l===o&&r.push(t)}}),r}function l(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,o=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function s(t,e,n){var a=i(e,t);n.axis=n.axis||"x";var s=l(n.axis),u=n.intersect?o(t,a):r(t,a,!1,s),d=[];return u.length?(t.data.datasets.forEach(function(e,n){if(t.isDatasetVisible(n)){var i=t.getDatasetMeta(n).data[u[0]._index];i&&!i._view.skip&&d.push(i)}}),d):[]}var u=t(45);e.exports={modes:{single:function(t,e){var n=i(e,t),o=[];return a(t,function(t){if(t.inRange(n.x,n.y))return o.push(t),o}),o.slice(0,1)},label:s,index:s,dataset:function(t,e,n){var a=i(e,t);n.axis=n.axis||"xy";var s=l(n.axis),u=n.intersect?o(t,a):r(t,a,!1,s);return u.length>0&&(u=t.getDatasetMeta(u[0]._datasetIndex).data),u},"x-axis":function(t,e){return s(t,e,{intersect:!1})},point:function(t,e){return o(t,i(e,t))},nearest:function(t,e,n){var a=i(e,t);n.axis=n.axis||"xy";var o=l(n.axis),s=r(t,a,n.intersect,o);return s.length>1&&s.sort(function(t,e){var n=t.getArea()-e.getArea();return 0===n&&(n=t._datasetIndex-e._datasetIndex),n}),s.slice(0,1)},x:function(t,e,n){var o=i(e,t),r=[],l=!1;return a(t,function(t){t.inXRange(o.x)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),n.intersect&&!l&&(r=[]),r},y:function(t,e,n){var o=i(e,t),r=[],l=!1;return a(t,function(t){t.inYRange(o.y)&&r.push(t),t.inRange(o.x,o.y)&&(l=!0)}),n.intersect&&!l&&(r=[]),r}}}},{45:45}],29:[function(t,e,n){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,n){"use strict";var i=t(45);e.exports=function(t){function e(t,e){return i.where(t,function(t){return t.position===e})}function n(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i._tmpIndex_-a._tmpIndex_:i.weight-a.weight}),t.forEach(function(t){delete t._tmpIndex_})}t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],o=a.length,r=0;r<o;++r)i=a[r],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,a,o){function r(t){var e=i.findNextWhere(_,function(e){return e.box===t});if(e)if(t.isHorizontal()){var n={left:Math.max(T,D),right:Math.max(F,I),top:0,bottom:0};t.update(t.fullWidth?x:S,y/2,n)}else t.update(e.minSize.width,C)}function l(t){t.isHorizontal()?(t.left=t.fullWidth?d:T,t.right=t.fullWidth?a-c:T+S,t.top=V,t.bottom=V+t.height,V=t.bottom):(t.left=N,t.right=N+t.width,t.top=O,t.bottom=O+C,N=t.right)}if(t){var s=t.options.layout||{},u=i.options.toPadding(s.padding),d=u.left,c=u.right,h=u.top,f=u.bottom,g=e(t.boxes,"left"),p=e(t.boxes,"right"),v=e(t.boxes,"top"),m=e(t.boxes,"bottom"),b=e(t.boxes,"chartArea");n(g,!0),n(p,!1),n(v,!0),n(m,!1);var x=a-d-c,y=o-h-f,k=y/2,w=(a-x/2)/(g.length+p.length),M=(o-k)/(v.length+m.length),S=x,C=y,_=[];i.each(g.concat(p,v,m),function(t){var e,n=t.isHorizontal();n?(e=t.update(t.fullWidth?x:S,M),C-=e.height):(e=t.update(w,k),S-=e.width),_.push({horizontal:n,minSize:e,box:t})});var D=0,I=0,P=0,A=0;i.each(v.concat(m),function(t){if(t.getPadding){var e=t.getPadding();D=Math.max(D,e.left),I=Math.max(I,e.right)}}),i.each(g.concat(p),function(t){if(t.getPadding){var e=t.getPadding();P=Math.max(P,e.top),A=Math.max(A,e.bottom)}});var T=d,F=c,O=h,R=f;i.each(g.concat(p),r),i.each(g,function(t){T+=t.width}),i.each(p,function(t){F+=t.width}),i.each(v.concat(m),r),i.each(v,function(t){O+=t.height}),i.each(m,function(t){R+=t.height}),i.each(g.concat(p),function(t){var e=i.findNextWhere(_,function(e){return e.box===t}),n={left:0,right:0,top:O,bottom:R};e&&t.update(e.minSize.width,C,n)}),T=d,F=c,O=h,R=f,i.each(g,function(t){T+=t.width}),i.each(p,function(t){F+=t.width}),i.each(v,function(t){O+=t.height}),i.each(m,function(t){R+=t.height});var L=Math.max(D-T,0);T+=L,F+=Math.max(I-F,0);var z=Math.max(P-O,0);O+=z,R+=Math.max(A-R,0);var B=o-O-R,W=a-T-F;W===S&&B===C||(i.each(g,function(t){t.height=B}),i.each(p,function(t){t.height=B}),i.each(v,function(t){t.fullWidth||(t.width=W)}),i.each(m,function(t){t.fullWidth||(t.width=W)}),C=B,S=W);var N=d+L,V=h+z;i.each(g.concat(v),l),N+=S,V+=C,i.each(p,l),i.each(m,l),t.chartArea={left:T,top:O,right:T+S,bottom:O+C},i.each(b,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(S,C)})}}}}},{45:45}],31:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{plugins:{}}),e.exports=function(t){t.plugins={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,o,r,l,s=this.descriptors(t),u=s.length;for(i=0;i<u;++i)if(a=s[i],o=a.plugin,"function"==typeof(l=o[e])&&((r=[t].concat(n||[])).push(a.options),!1===l.apply(o,r)))return!1;return!0},descriptors:function(t){var e=t._plugins||(t._plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],a=[],r=t&&t.config||{},l=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var e=t.id,r=l[e];!1!==r&&(!0===r&&(r=o.clone(i.global.plugins[e])),n.push(t),a.push({plugin:t,options:r||{}}))}}),e.descriptors=a,e.id=this._cacheId,a}},t.pluginService=t.plugins,t.PluginBase=a.extend({})}},{25:25,26:26,45:45}],32:[function(t,e,n){"use strict";function i(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(t[e].label);return i}function a(t,e,n){var i=t.getPixelForTick(e);return n&&(i-=0===e?(t.getPixelForTick(1)-i)/2:(i-t.getPixelForTick(e-1))/2),i}var o=t(25),r=t(26),l=t(45),s=t(34);o._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:s.formatters.values,minor:{},major:{}}}),e.exports=function(t){function e(t,e,n){return l.isArray(e)?l.longestText(t,n,e):t.measureText(e).width}function n(t){var e=l.valueOrDefault,n=o.global,i=e(t.fontSize,n.defaultFontSize),a=e(t.fontStyle,n.defaultFontStyle),r=e(t.fontFamily,n.defaultFontFamily);return{size:i,style:a,family:r,font:l.fontString(i,a,r)}}function s(t){return l.options.toLineHeight(l.valueOrDefault(t.lineHeight,1.2),l.valueOrDefault(t.fontSize,o.global.defaultFontSize))}t.Scale=r.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1});for(var e in t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){l.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,o,r,s,u,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=l.extend({left:0,right:0,top:0,bottom:0},n),d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),s=d.buildTicks()||[],d.afterBuildTicks(),d.beforeTickToLabelConversion(),o=d.convertTicksToLabels(s)||d.ticks,d.afterTickToLabelConversion(),d.ticks=o,i=0,a=o.length;i<a;++i)r=o[i],(u=s[i])?u.label=r:s.push(u={label:r,major:!1});return d._ticks=s,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){l.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){l.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){l.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){l.callback(this.options.beforeDataLimits,[this])},determineDataLimits:l.noop,afterDataLimits:function(){l.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){l.callback(this.options.beforeBuildTicks,[this])},buildTicks:l.noop,afterBuildTicks:function(){l.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){l.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){l.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){l.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,a=t.options.ticks,o=i(t._ticks),r=n(a);e.font=r.font;var s=a.minRotation||0;if(o.length&&t.options.display&&t.isHorizontal())for(var u,d=l.longestText(e,r.font,o,t.longestTextCache),c=d,h=t.getPixelForTick(1)-t.getPixelForTick(0)-6;c>h&&s<a.maxRotation;){var f=l.toRadians(s);if(u=Math.cos(f),Math.sin(f)*d>t.maxHeight){s--;break}s++,c=u*d}t.labelRotation=s},afterCalculateTickRotation:function(){l.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){l.callback(this.options.beforeFit,[this])},fit:function(){var t=this,a=t.minSize={width:0,height:0},o=i(t._ticks),r=t.options,u=r.ticks,d=r.scaleLabel,c=r.gridLines,h=r.display,f=t.isHorizontal(),g=n(u),p=r.gridLines.tickMarkLength;if(a.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&c.drawTicks?p:0,a.height=f?h&&c.drawTicks?p:0:t.maxHeight,d.display&&h){var v=s(d)+l.options.toPadding(d.padding).height;f?a.height+=v:a.width+=v}if(u.display&&h){var m=l.longestText(t.ctx,g.font,o,t.longestTextCache),b=l.numberOfLabelLines(o),x=.5*g.size,y=t.options.ticks.padding;if(f){t.longestLabelWidth=m;var k=l.toRadians(t.labelRotation),w=Math.cos(k),M=Math.sin(k)*m+g.size*b+x*(b-1)+x;a.height=Math.min(t.maxHeight,a.height+M+y),t.ctx.font=g.font;var S=e(t.ctx,o[0],g.font),C=e(t.ctx,o[o.length-1],g.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?w*S+3:w*x+3,t.paddingRight="bottom"===r.position?w*x+3:w*C+3):(t.paddingLeft=S/2+3,t.paddingRight=C/2+3)}else u.mirror?m=0:m+=y+x,a.width=Math.min(t.maxWidth,a.width+m),t.paddingTop=g.size/2,t.paddingBottom=g.size/2}t.handleMargins(),t.width=a.width,t.height=a.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){l.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(l.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:l.noop,getPixelForValue:l.noop,getValueForPixel:l.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);var o=e.left+Math.round(a);return o+=e.isFullWidth()?e.margins.left:0}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,i,a,o=this,r=o.isHorizontal(),s=o.options.ticks.minor,u=t.length,d=l.toRadians(o.labelRotation),c=Math.cos(d),h=o.longestLabelWidth*c,f=[];for(s.maxTicksLimit&&(a=s.maxTicksLimit),r&&(e=!1,(h+s.autoSkipPadding)*u>o.width-(o.paddingLeft+o.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*u/(o.width-(o.paddingLeft+o.paddingRight)))),a&&u>a&&(e=Math.max(e,Math.floor(u/a)))),n=0;n<u;n++)i=t[n],(e>1&&n%e>0||n%e==0&&n+e>=u)&&n!==u-1&&delete i.label,f.push(i);return f},draw:function(t){var e=this,i=e.options;if(i.display){var r=e.ctx,u=o.global,d=i.ticks.minor,c=i.ticks.major||d,h=i.gridLines,f=i.scaleLabel,g=0!==e.labelRotation,p=e.isHorizontal(),v=d.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),m=l.valueOrDefault(d.fontColor,u.defaultFontColor),b=n(d),x=l.valueOrDefault(c.fontColor,u.defaultFontColor),y=n(c),k=h.drawTicks?h.tickMarkLength:0,w=l.valueOrDefault(f.fontColor,u.defaultFontColor),M=n(f),S=l.options.toPadding(f.padding),C=l.toRadians(e.labelRotation),_=[],D="right"===i.position?e.left:e.right-k,I="right"===i.position?e.left+k:e.right,P="bottom"===i.position?e.top:e.bottom-k,A="bottom"===i.position?e.top+k:e.bottom;if(l.each(v,function(n,o){if(!l.isNullOrUndef(n.label)){var r,s,c,f,m=n.label;o===e.zeroLineIndex&&i.offset===h.offsetGridLines?(r=h.zeroLineWidth,s=h.zeroLineColor,c=h.zeroLineBorderDash,f=h.zeroLineBorderDashOffset):(r=l.valueAtIndexOrDefault(h.lineWidth,o),s=l.valueAtIndexOrDefault(h.color,o),c=l.valueOrDefault(h.borderDash,u.borderDash),f=l.valueOrDefault(h.borderDashOffset,u.borderDashOffset));var b,x,y,w,M,S,T,F,O,R,L="middle",z="middle",B=d.padding;if(p){var W=k+B;"bottom"===i.position?(z=g?"middle":"top",L=g?"right":"center",R=e.top+W):(z=g?"middle":"bottom",L=g?"left":"center",R=e.bottom-W);var N=a(e,o,h.offsetGridLines&&v.length>1);N<e.left&&(s="rgba(0,0,0,0)"),N+=l.aliasPixel(r),O=e.getPixelForTick(o)+d.labelOffset,b=y=M=T=N,x=P,w=A,S=t.top,F=t.bottom}else{var V,E="left"===i.position;d.mirror?(L=E?"left":"right",V=B):(L=E?"right":"left",V=k+B),O=E?e.right-V:e.left+V;var H=a(e,o,h.offsetGridLines&&v.length>1);H<e.top&&(s="rgba(0,0,0,0)"),H+=l.aliasPixel(r),R=e.getPixelForTick(o)+d.labelOffset,b=D,y=I,M=t.left,T=t.right,x=w=S=F=H}_.push({tx1:b,ty1:x,tx2:y,ty2:w,x1:M,y1:S,x2:T,y2:F,labelX:O,labelY:R,glWidth:r,glColor:s,glBorderDash:c,glBorderDashOffset:f,rotation:-1*C,label:m,major:n.major,textBaseline:z,textAlign:L})}}),l.each(_,function(t){if(h.display&&(r.save(),r.lineWidth=t.glWidth,r.strokeStyle=t.glColor,r.setLineDash&&(r.setLineDash(t.glBorderDash),r.lineDashOffset=t.glBorderDashOffset),r.beginPath(),h.drawTicks&&(r.moveTo(t.tx1,t.ty1),r.lineTo(t.tx2,t.ty2)),h.drawOnChartArea&&(r.moveTo(t.x1,t.y1),r.lineTo(t.x2,t.y2)),r.stroke(),r.restore()),d.display){r.save(),r.translate(t.labelX,t.labelY),r.rotate(t.rotation),r.font=t.major?y.font:b.font,r.fillStyle=t.major?x:m,r.textBaseline=t.textBaseline,r.textAlign=t.textAlign;var e=t.label;if(l.isArray(e))for(var n=0,i=0;n<e.length;++n)r.fillText(""+e[n],0,i),i+=1.5*b.size;else r.fillText(e,0,0);r.restore()}}),f.display){var T,F,O=0,R=s(f)/2;if(p)T=e.left+(e.right-e.left)/2,F="bottom"===i.position?e.bottom-R-S.bottom:e.top+R+S.top;else{var L="left"===i.position;T=L?e.left+R+S.top:e.right-R-S.top,F=e.top+(e.bottom-e.top)/2,O=L?-.5*Math.PI:.5*Math.PI}r.save(),r.translate(T,F),r.rotate(O),r.textAlign="center",r.textBaseline="middle",r.fillStyle=w,r.font=M.font,r.fillText(f.labelString,0,0),r.restore()}if(h.drawBorder){r.lineWidth=l.valueAtIndexOrDefault(h.lineWidth,0),r.strokeStyle=l.valueAtIndexOrDefault(h.color,0);var z=e.left,B=e.right,W=e.top,N=e.bottom,V=l.aliasPixel(r.lineWidth);p?(W=N="top"===i.position?e.bottom:e.top,W+=V,N+=V):(z=B="left"===i.position?e.right:e.left,z+=V,B+=V),r.beginPath(),r.moveTo(z,W),r.lineTo(B,N),r.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,n){"use strict";var i=t(25),a=t(45);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=a.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?a.merge({},[i.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=a.extend(n.defaults[t],e))},addScalesToLayout:function(e){a.each(e.scales,function(n){n.fullWidth=n.options.fullWidth,n.position=n.options.position,n.weight=n.options.weight,t.layoutService.addBox(e,n)})}}}},{25:25,45:45}],34:[function(t,e,n){"use strict";var i=t(45);e.exports={generators:{linear:function(t,e){var n,a=[];if(t.stepSize&&t.stepSize>0)n=t.stepSize;else{var o=i.niceNum(e.max-e.min,!1);n=i.niceNum(o/(t.maxTicks-1),!0)}var r=Math.floor(e.min/n)*n,l=Math.ceil(e.max/n)*n;t.min&&t.max&&t.stepSize&&i.almostWhole((t.max-t.min)/t.stepSize,n/1e3)&&(r=t.min,l=t.max);var s=(l-r)/n;s=i.almostEquals(s,Math.round(s),n/1e3)?Math.round(s):Math.ceil(s),a.push(void 0!==t.min?t.min:r);for(var u=1;u<s;++u)a.push(r+u*n);return a.push(void 0!==t.max?t.max:l),a},logarithmic:function(t,e){var n,a,o=[],r=i.valueOrDefault,l=r(t.min,Math.pow(10,Math.floor(i.log10(e.min)))),s=Math.floor(i.log10(e.max)),u=Math.ceil(e.max/Math.pow(10,s));0===l?(n=Math.floor(i.log10(e.minNotZero)),a=Math.floor(e.minNotZero/Math.pow(10,n)),o.push(l),l=a*Math.pow(10,n)):(n=Math.floor(i.log10(l)),a=Math.floor(l/Math.pow(10,n)));do{o.push(l),10===++a&&(a=1,++n),l=a*Math.pow(10,n)}while(n<s||n===s&&a<u);var d=r(t.max,l);return o.push(d),o}},formatters:{values:function(t){return i.isArray(t)?t:""+t},linear:function(t,e,n){var a=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(a)>1&&t!==Math.floor(t)&&(a=t-Math.floor(t));var o=i.log10(Math.abs(a)),r="";if(0!==t){var l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var a=t/Math.pow(10,Math.floor(i.log10(t)));return 0===t?"0":1===a||2===a||5===a||0===e||e===n.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var o=t[0];o.xLabel?n=o.xLabel:a>0&&o.index<a&&(n=i[o.index])}return n},afterTitle:o.noop,beforeBody:o.noop,beforeLabel:o.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),n+=t.yLabel},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:o.noop,afterBody:o.noop,beforeFooter:o.noop,footer:o.noop,afterFooter:o.noop}}}),e.exports=function(t){function e(t,e){var n=o.color(t);return n.alpha(e*n.alpha()).rgbaString()}function n(t,e){return e&&(o.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function r(t){var e=t._xScale,n=t._yScale||t._scale,i=t._index,a=t._datasetIndex;return{xLabel:e?e.getLabelForIndex(i,a):"",yLabel:n?n.getLabelForIndex(i,a):"",index:i,datasetIndex:a,x:t._model.x,y:t._model.y}}function l(t){var e=i.global,n=o.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:n(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:n(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:n(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:n(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:n(t.titleFontStyle,e.defaultFontStyle),titleFontSize:n(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:n(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:n(t.footerFontStyle,e.defaultFontStyle),footerFontSize:n(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function s(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,l=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);l+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,u=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,h=e.footerFontSize;i+=s*d,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=l*c,i+=l?(l-1)*e.bodySpacing:0,i+=u?e.footerMarginTop:0,i+=u*h,i+=u?(u-1)*e.footerSpacing:0;var f=0,g=function(t){a=Math.max(a,n.measureText(t).width+f)};return n.font=o.fontString(d,e._titleFontStyle,e._titleFontFamily),o.each(e.title,g),n.font=o.fontString(c,e._bodyFontStyle,e._bodyFontFamily),o.each(e.beforeBody.concat(e.afterBody),g),f=e.displayColors?c+2:0,o.each(r,function(t){o.each(t.before,g),o.each(t.lines,g),o.each(t.after,g)}),f=0,n.font=o.fontString(h,e._footerFontStyle,e._footerFontFamily),o.each(e.footer,g),a+=2*e.xPadding,{width:a,height:i}}function u(t,e){var n=t._model,i=t._chart,a=t._chart.chartArea,o="center",r="center";n.y<e.height?r="top":n.y>i.height-e.height&&(r="bottom");var l,s,u,d,c,h=(a.left+a.right)/2,f=(a.top+a.bottom)/2;"center"===r?(l=function(t){return t<=h},s=function(t){return t>h}):(l=function(t){return t<=e.width/2},s=function(t){return t>=i.width-e.width/2}),u=function(t){return t+e.width>i.width},d=function(t){return t-e.width<0},c=function(t){return t<=f?"top":"bottom"},l(n.x)?(o="left",u(n.x)&&(o="center",r=c(n.y))):s(n.x)&&(o="right",d(n.x)&&(o="center",r=c(n.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:o,yAlign:g.yAlign?g.yAlign:r}}function d(t,e,n){var i=t.x,a=t.y,o=t.caretSize,r=t.caretPadding,l=t.cornerRadius,s=n.xAlign,u=n.yAlign,d=o+r,c=l+r;return"right"===s?i-=e.width:"center"===s&&(i-=e.width/2),"top"===u?a+=d:a-="bottom"===u?e.height+d:e.height/2,"center"===u?"left"===s?i+=d:"right"===s&&(i-=d):"left"===s?i-=c:"right"===s&&(i+=c),{x:i,y:a}}t.Tooltip=a.extend({initialize:function(){this._model=l(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,i=e.beforeTitle.apply(t,arguments),a=e.title.apply(t,arguments),o=e.afterTitle.apply(t,arguments),r=[];return r=n(r,i),r=n(r,a),r=n(r,o)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var i=this,a=i._options.callbacks,r=[];return o.each(t,function(t){var o={before:[],lines:[],after:[]};n(o.before,a.beforeLabel.call(i,t,e)),n(o.lines,a.label.call(i,t,e)),n(o.after,a.afterLabel.call(i,t,e)),r.push(o)}),r},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this,e=t._options.callbacks,i=e.beforeFooter.apply(t,arguments),a=e.footer.apply(t,arguments),o=e.afterFooter.apply(t,arguments),r=[];return r=n(r,i),r=n(r,a),r=n(r,o)},update:function(e){var n,i,a=this,c=a._options,h=a._model,f=a._model=l(c),g=a._active,p=a._data,v={xAlign:h.xAlign,yAlign:h.yAlign},m={x:h.x,y:h.y},b={width:h.width,height:h.height},x={x:h.caretX,y:h.caretY};if(g.length){f.opacity=1;var y=[],k=[];x=t.Tooltip.positioners[c.position].call(a,g,a._eventPosition);var w=[];for(n=0,i=g.length;n<i;++n)w.push(r(g[n]));c.filter&&(w=w.filter(function(t){return c.filter(t,p)})),c.itemSort&&(w=w.sort(function(t,e){return c.itemSort(t,e,p)})),o.each(w,function(t){y.push(c.callbacks.labelColor.call(a,t,a._chart)),k.push(c.callbacks.labelTextColor.call(a,t,a._chart))}),f.title=a.getTitle(w,p),f.beforeBody=a.getBeforeBody(w,p),f.body=a.getBody(w,p),f.afterBody=a.getAfterBody(w,p),f.footer=a.getFooter(w,p),f.x=Math.round(x.x),f.y=Math.round(x.y),f.caretPadding=c.caretPadding,f.labelColors=y,f.labelTextColors=k,f.dataPoints=w,m=d(f,b=s(this,f),v=u(this,b))}else f.opacity=0;return f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=m.x,f.y=m.y,f.width=b.width,f.height=b.height,f.caretX=x.x,f.caretY=x.y,a._model=f,e&&c.custom&&c.custom.call(a,f),a},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,o,r,l,s,u=n.caretSize,d=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,g=t.y,p=e.width,v=e.height;if("center"===h)l=g+v/2,"left"===c?(a=(i=f)-u,o=i,r=l+u,s=l-u):(a=(i=f+p)+u,o=i,r=l-u,s=l+u);else if("left"===c?(i=(a=f+d+u)-u,o=a+u):"right"===c?(i=(a=f+p-d-u)-u,o=a+u):(i=(a=f+p/2)-u,o=a+u),"top"===h)l=(r=g)-u,s=r;else{l=(r=g+v)+u,s=r;var m=o;o=i,i=m}return{x1:i,x2:a,x3:o,y1:r,y2:l,y3:s}},drawTitle:function(t,n,i,a){var r=n.title;if(r.length){i.textAlign=n._titleAlign,i.textBaseline="top";var l=n.titleFontSize,s=n.titleSpacing;i.fillStyle=e(n.titleFontColor,a),i.font=o.fontString(l,n._titleFontStyle,n._titleFontFamily);var u,d;for(u=0,d=r.length;u<d;++u)i.fillText(r[u],t.x,t.y),t.y+=l+s,u+1===r.length&&(t.y+=n.titleMarginBottom-s)}},drawBody:function(t,n,i,a){var r=n.bodyFontSize,l=n.bodySpacing,s=n.body;i.textAlign=n._bodyAlign,i.textBaseline="top",i.font=o.fontString(r,n._bodyFontStyle,n._bodyFontFamily);var u=0,d=function(e){i.fillText(e,t.x+u,t.y),t.y+=r+l};i.fillStyle=e(n.bodyFontColor,a),o.each(n.beforeBody,d);var c=n.displayColors;u=c?r+2:0,o.each(s,function(l,s){var u=e(n.labelTextColors[s],a);i.fillStyle=u,o.each(l.before,d),o.each(l.lines,function(o){c&&(i.fillStyle=e(n.legendColorBackground,a),i.fillRect(t.x,t.y,r,r),i.lineWidth=1,i.strokeStyle=e(n.labelColors[s].borderColor,a),i.strokeRect(t.x,t.y,r,r),i.fillStyle=e(n.labelColors[s].backgroundColor,a),i.fillRect(t.x+1,t.y+1,r-2,r-2),i.fillStyle=u),d(o)}),o.each(l.after,d)}),u=0,o.each(n.afterBody,d),t.y-=l},drawFooter:function(t,n,i,a){var r=n.footer;r.length&&(t.y+=n.footerMarginTop,i.textAlign=n._footerAlign,i.textBaseline="top",i.fillStyle=e(n.footerFontColor,a),i.font=o.fontString(n.footerFontSize,n._footerFontStyle,n._footerFontFamily),o.each(r,function(e){i.fillText(e,t.x,t.y),t.y+=n.footerFontSize+n.footerSpacing}))},drawBackground:function(t,n,i,a,o){i.fillStyle=e(n.backgroundColor,o),i.strokeStyle=e(n.borderColor,o),i.lineWidth=n.borderWidth;var r=n.xAlign,l=n.yAlign,s=t.x,u=t.y,d=a.width,c=a.height,h=n.cornerRadius;i.beginPath(),i.moveTo(s+h,u),"top"===l&&this.drawCaret(t,a),i.lineTo(s+d-h,u),i.quadraticCurveTo(s+d,u,s+d,u+h),"center"===l&&"right"===r&&this.drawCaret(t,a),i.lineTo(s+d,u+c-h),i.quadraticCurveTo(s+d,u+c,s+d-h,u+c),"bottom"===l&&this.drawCaret(t,a),i.lineTo(s+h,u+c),i.quadraticCurveTo(s,u+c,s,u+c-h),"center"===l&&"left"===r&&this.drawCaret(t,a),i.lineTo(s,u+h),i.quadraticCurveTo(s,u,s+h,u),i.closePath(),i.fill(),n.borderWidth>0&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(i,e,t,n,a),i.x+=e.xPadding,i.y+=e.yPadding,this.drawTitle(i,e,t,a),this.drawBody(i,e,t,a),this.drawFooter(i,e,t,a))}},handleEvent:function(t){var e=this,n=e._options,i=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),!(i=!o.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,n.enabled||n.custom){e._eventPosition={x:t.x,y:t.y};var a=e._model;e.update(!0),e.pivot(),i|=a.x!==e._model.x||a.y!==e._model.y}return i}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,o=0;for(e=0,n=t.length;e<n;++e){var r=t[e];if(r&&r.hasValue()){var l=r.tooltipPosition();i+=l.x,a+=l.y,++o}}return{x:Math.round(i/o),y:Math.round(a/o)}},nearest:function(t,e){var n,i,a,r=e.x,l=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var u=t[n];if(u&&u.hasValue()){var d=u.getCenterPoint(),c=o.distanceBetweenPoints(e,d);c<s&&(s=c,a=u)}}if(a){var h=a.tooltipPosition();r=h.x,l=h.y}return{x:r,y:l}}}}},{25:25,26:26,45:45}],36:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{elements:{arc:{backgroundColor:i.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=o.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,l=n.startAngle,s=n.endAngle;s<l;)s+=2*Math.PI;for(;a>s;)a-=2*Math.PI;for(;a<l;)a+=2*Math.PI;var u=a>=l&&a<=s,d=r>=n.innerRadius&&r<=n.outerRadius;return u&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45),r=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:r.defaultColor,borderWidth:3,borderColor:r.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this,l=a._view,s=a._chart.ctx,u=l.spanGaps,d=a._children.slice(),c=r.elements.line,h=-1;for(a._loop&&d.length&&d.push(d[0]),s.save(),s.lineCap=l.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(l.borderDash||c.borderDash),s.lineDashOffset=l.borderDashOffset||c.borderDashOffset,s.lineJoin=l.borderJoinStyle||c.borderJoinStyle,s.lineWidth=l.borderWidth||c.borderWidth,s.strokeStyle=l.borderColor||r.defaultColor,s.beginPath(),h=-1,t=0;t<d.length;++t)e=d[t],n=o.previousItem(d,t),i=e._view,0===t?i.skip||(s.moveTo(i.x,i.y),h=t):(n=-1===h?n:d[h],i.skip||(h!==t-1&&!u||-1===h?s.moveTo(i.x,i.y):o.canvas.lineTo(s,n._view,e._view),h=t));s.stroke(),s.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,n){"use strict";function i(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)}var a=t(25),o=t(26),r=t(45),l=a.global.defaultColor;a._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:l,borderColor:l,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=o.extend({inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:i,inXRange:i,inYRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.y,2)<Math.pow(e.radius+e.hitRadius,2)},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._model,i=this._chart.ctx,o=e.pointStyle,s=e.radius,u=e.x,d=e.y,c=r.color,h=0;e.skip||(i.strokeStyle=e.borderColor||l,i.lineWidth=r.valueOrDefault(e.borderWidth,a.global.elements.point.borderWidth),i.fillStyle=e.backgroundColor||l,void 0!==t&&(n.x<t.left||1.01*t.right<n.x||n.y<t.top||1.01*t.bottom<n.y)&&(n.x<t.left?h=(u-n.x)/(t.left-n.x):1.01*t.right<n.x?h=(n.x-u)/(n.x-t.right):n.y<t.top?h=(d-n.y)/(t.top-n.y):1.01*t.bottom<n.y&&(h=(n.y-d)/(n.y-t.bottom)),h=Math.round(100*h)/100,i.strokeStyle=c(i.strokeStyle).alpha(h).rgbString(),i.fillStyle=c(i.fillStyle).alpha(h).rgbString()),r.canvas.drawPoint(i,o,s,u,d))}})},{25:25,26:26,45:45}],39:[function(t,e,n){"use strict";function i(t){return void 0!==t._view.width}function a(t){var e,n,a,o,r=t._view;if(i(t)){var l=r.width/2;e=r.x-l,n=r.x+l,a=Math.min(r.y,r.base),o=Math.max(r.y,r.base)}else{var s=r.height/2;e=Math.min(r.x,r.base),n=Math.max(r.x,r.base),a=r.y-s,o=r.y+s}return{left:e,top:a,right:n,bottom:o}}var o=t(25),r=t(26);o._set("global",{elements:{rectangle:{backgroundColor:o.global.defaultColor,borderColor:o.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=r.extend({draw:function(){function t(t){return m[(b+t)%4]}var e,n,i,a,o,r,l,s=this._chart.ctx,u=this._view,d=u.borderWidth;if(u.horizontal?(e=u.base,n=u.x,i=u.y-u.height/2,a=u.y+u.height/2,o=n>e?1:-1,r=1,l=u.borderSkipped||"left"):(e=u.x-u.width/2,n=u.x+u.width/2,i=u.y,o=1,r=(a=u.base)>i?1:-1,l=u.borderSkipped||"bottom"),d){var c=Math.min(Math.abs(e-n),Math.abs(i-a)),h=(d=d>c?c:d)/2,f=e+("left"!==l?h*o:0),g=n+("right"!==l?-h*o:0),p=i+("top"!==l?h*r:0),v=a+("bottom"!==l?-h*r:0);f!==g&&(i=p,a=v),p!==v&&(e=f,n=g)}s.beginPath(),s.fillStyle=u.backgroundColor,s.strokeStyle=u.borderColor,s.lineWidth=d;var m=[[e,a],[e,i],[n,i],[n,a]],b=["bottom","left","top","right"].indexOf(l,0);-1===b&&(b=0);var x=t(0);s.moveTo(x[0],x[1]);for(var y=1;y<4;y++)x=t(y),s.lineTo(x[0],x[1]);s.fill(),d&&s.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var n=!1;if(this._view){var i=a(this);n=t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){var n=this;if(!n._view)return!1;var o=a(n);return i(n)?t>=o.left&&t<=o.right:e>=o.top&&e<=o.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return i(this)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";var i=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,o){if(o){var r=Math.min(o,i/2),l=Math.min(o,a/2);t.moveTo(e+r,n),t.lineTo(e+i-r,n),t.quadraticCurveTo(e+i,n,e+i,n+l),t.lineTo(e+i,n+a-l),t.quadraticCurveTo(e+i,n+a,e+i-r,n+a),t.lineTo(e+r,n+a),t.quadraticCurveTo(e,n+a,e,n+a-l),t.lineTo(e,n+l),t.quadraticCurveTo(e,n,e+r,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var o,r,l,s,u,d;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(r=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-r/2,a+u/3),t.lineTo(i+r/2,a+u/3),t.lineTo(i,a-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-d,a-d,2*d,2*d),t.strokeRect(i-d,a-d,2*d,2*d);break;case"rectRounded":var c=n/Math.SQRT2,h=i-c,f=a-c,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,h,f,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-d,a),t.lineTo(i,a+d),t.lineTo(i+d,a),t.lineTo(i,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),l=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-l,a-s),t.lineTo(i+l,a+s),t.moveTo(i-l,a+s),t.lineTo(i+l,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),l=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-l,a-s),t.lineTo(i+l,a+s),t.moveTo(i-l,a+s),t.lineTo(i+l,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i={noop:function(){},uid:function(){var t=0;return function(){return t++}}(),isNullOrUndef:function(t){return null===t||void 0===t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return i.valueOrDefault(i.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,a){var o,r,l;if(i.isArray(t))if(r=t.length,a)for(o=r-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;o<r;o++)e.call(n,t[o],o);else if(i.isObject(t))for(r=(l=Object.keys(t)).length,o=0;o<r;o++)e.call(n,t[l[o]],l[o])},arrayEquals:function(t,e){var n,a,o,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,a=t.length;n<a;++n)if(o=t[n],r=e[n],o instanceof Array&&r instanceof Array){if(!i.arrayEquals(o,r))return!1}else if(o!==r)return!1;return!0},clone:function(t){if(i.isArray(t))return t.map(i.clone);if(i.isObject(t)){for(var e={},n=Object.keys(t),a=n.length,o=0;o<a;++o)e[n[o]]=i.clone(t[n[o]]);return e}return t},_merger:function(t,e,n,a){var o=e[t],r=n[t];i.isObject(o)&&i.isObject(r)?i.merge(o,r,a):e[t]=i.clone(r)},_mergerIf:function(t,e,n){var a=e[t],o=n[t];i.isObject(a)&&i.isObject(o)?i.mergeIf(a,o):e.hasOwnProperty(t)||(e[t]=i.clone(o))},merge:function(t,e,n){var a,o,r,l,s,u=i.isArray(e)?e:[e],d=u.length;if(!i.isObject(t))return t;for(a=(n=n||{}).merger||i._merger,o=0;o<d;++o)if(e=u[o],i.isObject(e))for(s=0,l=(r=Object.keys(e)).length;s<l;++s)a(r[s],t,e,n);return t},mergeIf:function(t,e){return i.merge(t,e,{merger:i._mergerIf})},extend:function(t){for(var e=1,n=arguments.length;e<n;++e)i.each(arguments[e],function(e,n){t[n]=e});return t},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=n};return a.prototype=e.prototype,n.prototype=new a,n.extend=i.inherits,t&&i.extend(n.prototype,t),n.__super__=e.prototype,n}};e.exports=i,i.callCallback=i.callback,i.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},i.getValueOrDefault=i.valueOrDefault,i.getValueAtIndexOrDefault=i.valueAtIndexOrDefault},{}],43:[function(t,e,n){"use strict";var i=t(42),a={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-a.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},i.easingEffects=a},{42:42}],44:[function(t,e,n){"use strict";var i=t(42);e.exports={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,a,o;return i.isObject(t)?(e=+t.top||0,n=+t.right||0,a=+t.bottom||0,o=+t.left||0):e=n=a=o=+t||0,{top:e,right:n,bottom:a,left:o,height:e+a,width:o+n}},resolve:function(t,e,n){var a,o,r;for(a=0,o=t.length;a<o;++a)if(void 0!==(r=t[a])&&(void 0!==e&&"function"==typeof r&&(r=r(e)),void 0!==n&&i.isArray(r)&&(r=r[n]),void 0!==r))return r}}},{42:42}],45:[function(t,e,n){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,n){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,n){"use strict";function i(t,e){var n=v.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}function a(t,e){var n=t.style,a=t.getAttribute("height"),o=t.getAttribute("width");if(t[m]={initial:{height:a,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var r=i(t,"width");void 0!==r&&(t.width=r)}if(null===a||""===a)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var l=i(t,"height");void 0!==r&&(t.height=l)}return t}function o(t,e,n){t.addEventListener(e,n,M)}function r(t,e,n){t.removeEventListener(e,n,M)}function l(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function s(t,e){var n=w[t.type]||t.type,i=v.getRelativePosition(t,e);return l(n,e,i.x,i.y,t)}function u(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,v.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}function d(t){var e=document.createElement("div"),n=b+"size-monitor",i="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=i,e.className=n,e.innerHTML='<div class="'+n+'-expand" style="'+i+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+n+'-shrink" style="'+i+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a=e.childNodes[0],r=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var l=function(){e._reset(),t()};return o(a,"scroll",l.bind(a,"expand")),o(r,"scroll",l.bind(r,"shrink")),e}function c(t,e){var n=t[m]||(t[m]={}),i=n.renderProxy=function(t){t.animationName===y&&e()};v.each(k,function(e){o(t,e,i)}),n.reflow=!!t.offsetParent,t.classList.add(x)}function h(t){var e=t[m]||{},n=e.renderProxy;n&&(v.each(k,function(e){r(t,e,n)}),delete e.renderProxy),t.classList.remove(x)}function f(t,e,n){var i=t[m]||(t[m]={}),a=i.resizer=d(u(function(){if(i.resizer)return e(l("resize",n))}));c(t,function(){if(i.resizer){var e=t.parentNode;e&&e!==a.parentNode&&e.insertBefore(a,e.firstChild),a._reset()}})}function g(t){var e=t[m]||{},n=e.resizer;delete e.resizer,h(t),n&&n.parentNode&&n.parentNode.removeChild(n)}function p(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}var v=t(45),m="$chartjs",b="chartjs-",x=b+"render-monitor",y=b+"render-animation",k=["animationstart","webkitAnimationStart"],w={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},M=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";p(this,"@-webkit-keyframes "+y+"{"+t+"}@keyframes "+y+"{"+t+"}."+x+"{-webkit-animation:"+y+" 0.001s;animation:"+y+" 0.001s;}")},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(a(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[m]){var n=e[m].initial;["height","width"].forEach(function(t){var i=n[t];v.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),v.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[m]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[m]||(n[m]={});o(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(s(e,t))})}else f(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[m]||{}).proxies||{})[t.id+"_"+e];a&&r(i,e,a)}else g(i)}},v.addEvent=o,v.removeEvent=r},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),o=t(47),r=o._enabled?o:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},r)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";var i=t(25),a=t(40),o=t(45);i._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){function t(t,e,n){var i,a=t._model||{},o=a.fill;if(void 0===o&&(o=!!a.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(i=parseFloat(o,10),isFinite(i)&&Math.floor(i)===i)return"-"!==o[0]&&"+"!==o[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function e(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,o=null;if(isFinite(a))return null;if("start"===a?o=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?o=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?o=n.scaleZero:i.getBasePosition?o=i.getBasePosition():i.getBasePixel&&(o=i.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return e=i.isHorizontal(),{x:e?o:null,y:e?null:o}}return null}function n(t,e,n){var i,a=t[e].fill,o=[e];if(!n)return a;for(;!1!==a&&-1===o.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;o.push(a),a=i.fill}return!1}function r(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),d[n](t))}function l(t){return t&&!t.skip}function s(t,e,n,i,a){var r;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)o.canvas.lineTo(t,e[r-1],e[r]);for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)o.canvas.lineTo(t,n[r],n[r-1],!0)}}function u(t,e,n,i,a,o){var r,u,d,c,h,f,g,p=e.length,v=i.spanGaps,m=[],b=[],x=0,y=0;for(t.beginPath(),r=0,u=p+!!o;r<u;++r)h=n(c=e[d=r%p]._view,d,i),f=l(c),g=l(h),f&&g?(x=m.push(c),y=b.push(h)):x&&y&&(v?(f&&m.push(c),g&&b.push(h)):(s(t,m,b,x,y),x=y=0,m=[],b=[]));s(t,m,b,x,y),t.closePath(),t.fillStyle=a,t.fill()}var d={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],o=a.length||0;return o?function(t,e){return e<o&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};return{id:"filler",afterDatasetsUpdate:function(i,o){var l,s,u,d,c=(i.data.datasets||[]).length,h=o.propagate,f=[];for(s=0;s<c;++s)d=null,(u=(l=i.getDatasetMeta(s)).dataset)&&u._model&&u instanceof a.Line&&(d={visible:i.isDatasetVisible(s),fill:t(u,s,c),chart:i,el:u}),l.$filler=d,f.push(d);for(s=0;s<c;++s)(d=f[s])&&(d.fill=n(f,s,h),d.boundary=e(d),d.mapper=r(d))},beforeDatasetDraw:function(t,e){var n=e.meta.$filler;if(n){var a=t.ctx,r=n.el,l=r._view,s=r._children||[],d=n.mapper,c=l.backgroundColor||i.global.defaultColor;d&&c&&s.length&&(o.canvas.clipArea(a,t.chartArea),u(a,s,d,l,c,r._loop),o.canvas.unclipArea(a))}}}}},{25:25,40:40,45:45}],50:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return o.isArray(e.datasets)?e.datasets.map(function(e,n){return{text:e.label,fillStyle:o.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:n}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var n=0;n<t.data.datasets.length;n++)e.push('<li><span style="background-color:'+t.data.datasets[n].backgroundColor+'"></span>'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("</li>");return e.push("</ul>"),e.join("")}}),e.exports=function(t){function e(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function n(e,n){var i=new t.Legend({ctx:e.ctx,options:n,chart:e});r.configure(e,i,n),r.addBox(e,i),e.legend=i}var r=t.layoutService,l=o.noop;return t.Legend=a.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:l,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:l,beforeSetDimensions:l,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:l,beforeBuildLabels:l,buildLabels:function(){var t=this,e=t.options.labels||{},n=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:l,beforeFit:l,fit:function(){var t=this,n=t.options,a=n.labels,r=n.display,l=t.ctx,s=i.global,u=o.valueOrDefault,d=u(a.fontSize,s.defaultFontSize),c=u(a.fontStyle,s.defaultFontStyle),h=u(a.fontFamily,s.defaultFontFamily),f=o.fontString(d,c,h),g=t.legendHitBoxes=[],p=t.minSize,v=t.isHorizontal();if(v?(p.width=t.maxWidth,p.height=r?10:0):(p.width=r?10:0,p.height=t.maxHeight),r)if(l.font=f,v){var m=t.lineWidths=[0],b=t.legendItems.length?d+a.padding:0;l.textAlign="left",l.textBaseline="top",o.each(t.legendItems,function(n,i){var o=e(a,d)+d/2+l.measureText(n.text).width;m[m.length-1]+o+a.padding>=t.width&&(b+=d+a.padding,m[m.length]=t.left),g[i]={left:0,top:0,width:o,height:d},m[m.length-1]+=o+a.padding}),p.height+=b}else{var x=a.padding,y=t.columnWidths=[],k=a.padding,w=0,M=0,S=d+x;o.each(t.legendItems,function(t,n){var i=e(a,d)+d/2+l.measureText(t.text).width;M+S>p.height&&(k+=w+a.padding,y.push(w),w=0,M=0),w=Math.max(w,i),M+=S,g[n]={left:0,top:0,width:i,height:d}}),k+=w,y.push(w),p.width+=k}t.width=p.width,t.height=p.height},afterFit:l,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,n=t.options,a=n.labels,r=i.global,l=r.elements.line,s=t.width,u=t.lineWidths;if(n.display){var d,c=t.ctx,h=o.valueOrDefault,f=h(a.fontColor,r.defaultFontColor),g=h(a.fontSize,r.defaultFontSize),p=h(a.fontStyle,r.defaultFontStyle),v=h(a.fontFamily,r.defaultFontFamily),m=o.fontString(g,p,v);c.textAlign="left",c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=m;var b=e(a,g),x=t.legendHitBoxes,y=function(t,e,i){if(!(isNaN(b)||b<=0)){c.save(),c.fillStyle=h(i.fillStyle,r.defaultColor),c.lineCap=h(i.lineCap,l.borderCapStyle),c.lineDashOffset=h(i.lineDashOffset,l.borderDashOffset),c.lineJoin=h(i.lineJoin,l.borderJoinStyle),c.lineWidth=h(i.lineWidth,l.borderWidth),c.strokeStyle=h(i.strokeStyle,r.defaultColor);var a=0===h(i.lineWidth,l.borderWidth);if(c.setLineDash&&c.setLineDash(h(i.lineDash,l.borderDash)),n.labels&&n.labels.usePointStyle){var s=g*Math.SQRT2/2,u=s/Math.SQRT2,d=t+u,f=e+u;o.canvas.drawPoint(c,i.pointStyle,s,d,f)}else a||c.strokeRect(t,e,b,g),c.fillRect(t,e,b,g);c.restore()}},k=function(t,e,n,i){var a=g/2,o=b+a+t,r=e+a;c.fillText(n.text,o,r),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(o,r),c.lineTo(o+i,r),c.stroke())},w=t.isHorizontal();d=w?{x:t.left+(s-u[0])/2,y:t.top+a.padding,line:0}:{x:t.left+a.padding,y:t.top+a.padding,line:0};var M=g+a.padding;o.each(t.legendItems,function(e,n){var i=c.measureText(e.text).width,o=b+g/2+i,r=d.x,l=d.y;w?r+o>=s&&(l=d.y+=M,d.line++,r=d.x=t.left+(s-u[d.line])/2):l+M>t.bottom&&(r=d.x=r+t.columnWidths[d.line]+a.padding,l=d.y=t.top+a.padding,d.line++),y(r,l,e),x[n].left=r,x[n].top=l,k(r,l,e,i),w?d.x+=o+a.padding:d.y+=M})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var o=t.x,r=t.y;if(o>=e.left&&o<=e.right&&r>=e.top&&r<=e.bottom)for(var l=e.legendHitBoxes,s=0;s<l.length;++s){var u=l[s];if(o>=u.left&&o<=u.left+u.width&&r>=u.top&&r<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[s]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[s]),a=!0;break}}}return a}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&n(t,e)},beforeUpdate:function(t){var e=t.options.legend,a=t.legend;e?(o.mergeIf(e,i.global.legend),a?(r.configure(t,a,e),a.options=e):n(t,e)):a&&(r.removeBox(t,a),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,n){"use strict";var i=t(25),a=t(26),o=t(45);i._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(t){function e(e,i){var a=new t.Title({ctx:e.ctx,options:i,chart:e});n.configure(e,a,i),n.addBox(e,a),e.titleBlock=a}var n=t.layoutService,r=o.noop;return t.Title=a.extend({initialize:function(t){var e=this;o.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:r,beforeSetDimensions:r,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:r,beforeBuildLabels:r,buildLabels:r,afterBuildLabels:r,beforeFit:r,fit:function(){var t=this,e=o.valueOrDefault,n=t.options,a=n.display,r=e(n.fontSize,i.global.defaultFontSize),l=t.minSize,s=o.isArray(n.text)?n.text.length:1,u=o.options.toLineHeight(n.lineHeight,r),d=a?s*u+2*n.padding:0;t.isHorizontal()?(l.width=t.maxWidth,l.height=d):(l.width=d,l.height=t.maxHeight),t.width=l.width,t.height=l.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=o.valueOrDefault,a=t.options,r=i.global;if(a.display){var l,s,u,d=n(a.fontSize,r.defaultFontSize),c=n(a.fontStyle,r.defaultFontStyle),h=n(a.fontFamily,r.defaultFontFamily),f=o.fontString(d,c,h),g=o.options.toLineHeight(a.lineHeight,d),p=g/2+a.padding,v=0,m=t.top,b=t.left,x=t.bottom,y=t.right;e.fillStyle=n(a.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(s=b+(y-b)/2,u=m+p,l=y-b):(s="left"===a.position?b+p:y-p,u=m+(x-m)/2,l=x-m,v=Math.PI*("left"===a.position?-.5:.5)),e.save(),e.translate(s,u),e.rotate(v),e.textAlign="center",e.textBaseline="middle";var k=a.text;if(o.isArray(k))for(var w=0,M=0;M<k.length;++M)e.fillText(k[M],0,w,l),w+=g;else e.fillText(k,0,0,l);e.restore()}}}),{id:"title",beforeInit:function(t){var n=t.options.title;n&&e(t,n)},beforeUpdate:function(a){var r=a.options.title,l=a.titleBlock;r?(o.mergeIf(r,i.global.title),l?(n.configure(a,l,r),l.options=r):e(a,r)):l&&(t.layoutService.removeBox(a,l),delete a.titleBlock)}}}},{25:25,26:26,45:45}],52:[function(t,e,n){"use strict";e.exports=function(t){var e=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t=this,e=t.getLabels();t.minIndex=0,t.maxIndex=e.length-1;var n;void 0!==t.options.ticks.min&&(n=e.indexOf(t.options.ticks.min),t.minIndex=-1!==n?n:t.minIndex),void 0!==t.options.ticks.max&&(n=e.indexOf(t.options.ticks.max),t.maxIndex=-1!==n?n:t.maxIndex),t.min=e[t.minIndex],t.max=e[t.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart.data,a=n.isHorizontal();return i.yLabels&&!a?n.getRightValue(i.datasets[e].data[t]):n.ticks[t-n.minIndex]},getPixelForValue:function(t,e){var n,i=this,a=i.options.offset,o=Math.max(i.maxIndex+1-i.minIndex-(a?0:1),1);if(void 0!==t&&null!==t&&(n=i.isHorizontal()?t.x:t.y),void 0!==n||void 0!==t&&isNaN(e)){var r=i.getLabels();t=n||t;var l=r.indexOf(t);e=-1!==l?l:e}if(i.isHorizontal()){var s=i.width/o,u=s*(e-i.minIndex);return a&&(u+=s/2),i.left+Math.round(u)}var d=i.height/o,c=d*(e-i.minIndex);return a&&(c+=d/2),i.top+Math.round(c)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,n=e.options.offset,i=Math.max(e._ticks.length-(n?0:1),1),a=e.isHorizontal(),o=(a?e.width:e.height)/i;return t-=a?e.left:e.top,n&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",e,{position:"bottom"})}},{}],53:[function(t,e,n){"use strict";var i=t(25),a=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.linear}},n=t.LinearScaleBase.extend({determineDataLimits:function(){function t(t){return r?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,i=e.chart,o=i.data.datasets,r=e.isHorizontal();e.min=null,e.max=null;var l=n.stacked;if(void 0===l&&a.each(o,function(e,n){if(!l){var a=i.getDatasetMeta(n);i.isDatasetVisible(n)&&t(a)&&void 0!==a.stack&&(l=!0)}}),n.stacked||l){var s={};a.each(o,function(o,r){var l=i.getDatasetMeta(r),u=[l.type,void 0===n.stacked&&void 0===l.stack?r:"",l.stack].join(".");void 0===s[u]&&(s[u]={positiveValues:[],negativeValues:[]});var d=s[u].positiveValues,c=s[u].negativeValues;i.isDatasetVisible(r)&&t(l)&&a.each(o.data,function(t,i){var a=+e.getRightValue(t);isNaN(a)||l.data[i].hidden||(d[i]=d[i]||0,c[i]=c[i]||0,n.relativePoints?d[i]=100:a<0?c[i]+=a:d[i]+=a)})}),a.each(s,function(t){var n=t.positiveValues.concat(t.negativeValues),i=a.min(n),o=a.max(n);e.min=null===e.min?i:Math.min(e.min,i),e.max=null===e.max?o:Math.max(e.max,o)})}else a.each(o,function(n,o){var r=i.getDatasetMeta(o);i.isDatasetVisible(o)&&t(r)&&a.each(n.data,function(t,n){var i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||(null===e.min?e.min=i:i<e.min&&(e.min=i),null===e.max?e.max=i:i>e.max&&(e.max=i))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this,n=e.options.ticks;if(e.isHorizontal())t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.width/50));else{var o=a.valueOrDefault(n.fontSize,i.global.defaultFontSize);t=Math.min(n.maxTicksLimit?n.maxTicksLimit:11,Math.ceil(e.height/(2*o)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,n=this,i=n.start,a=+n.getRightValue(t),o=n.end-i;return n.isHorizontal()?(e=n.left+n.width/o*(a-i),Math.round(e)):(e=n.bottom-n.height/o*(a-i),Math.round(e))},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,a=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],54:[function(t,e,n){"use strict";var i=t(45),a=t(34);e.exports=function(t){var e=i.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),a=i.sign(t.max);n<0&&a<0?t.max=0:n>0&&a>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==r&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=a.generators.linear(o,t);t.handleDirectionalChanges(),t.max=i.max(r),t.min=i.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{34:34,45:45}],55:[function(t,e,n){"use strict";var i=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},n=t.Scale.extend({determineDataLimits:function(){function t(t){return s?t.xAxisID===e.id:t.yAxisID===e.id}var e=this,n=e.options,a=n.ticks,o=e.chart,r=o.data.datasets,l=i.valueOrDefault,s=e.isHorizontal();e.min=null,e.max=null,e.minNotZero=null;var u=n.stacked;if(void 0===u&&i.each(r,function(e,n){if(!u){var i=o.getDatasetMeta(n);o.isDatasetVisible(n)&&t(i)&&void 0!==i.stack&&(u=!0)}}),n.stacked||u){var d={};i.each(r,function(a,r){var l=o.getDatasetMeta(r),s=[l.type,void 0===n.stacked&&void 0===l.stack?r:"",l.stack].join(".");o.isDatasetVisible(r)&&t(l)&&(void 0===d[s]&&(d[s]=[]),i.each(a.data,function(t,i){var a=d[s],o=+e.getRightValue(t);isNaN(o)||l.data[i].hidden||(a[i]=a[i]||0,n.relativePoints?a[i]=100:a[i]+=o)}))}),i.each(d,function(t){var n=i.min(t),a=i.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?a:Math.max(e.max,a)})}else i.each(r,function(n,a){var r=o.getDatasetMeta(a);o.isDatasetVisible(a)&&t(r)&&i.each(n.data,function(t,n){var i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||(null===e.min?e.min=i:i<e.min&&(e.min=i),null===e.max?e.max=i:i>e.max&&(e.max=i),0!==i&&(null===e.minNotZero||i<e.minNotZero)&&(e.minNotZero=i))})});e.min=l(a.min,e.min),e.max=l(a.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(i.log10(e.min))-1),e.max=Math.pow(10,Math.floor(i.log10(e.max))+1)):(e.min=1,e.max=10))},buildTicks:function(){var t=this,e=t.options.ticks,n={min:e.min,max:e.max},o=t.ticks=a.generators.logarithmic(n,t);t.isHorizontal()||o.reverse(),t.max=i.max(o),t.min=i.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var e,n,a,o=this,r=o.start,l=+o.getRightValue(t),s=o.options.ticks;return o.isHorizontal()?(a=i.log10(o.end)-i.log10(r),0===l?n=o.left:(e=o.width,n=o.left+e/a*(i.log10(l)-i.log10(r)))):(e=o.height,0!==r||s.reverse?0===o.end&&s.reverse?(a=i.log10(o.start)-i.log10(o.minNotZero),n=l===o.end?o.top:l===o.minNotZero?o.top+.02*e:o.top+.02*e+.98*e/a*(i.log10(l)-i.log10(o.minNotZero))):0===l?n=s.reverse?o.top:o.bottom:(a=i.log10(o.end)-i.log10(r),e=o.height,n=o.bottom-e/a*(i.log10(l)-i.log10(r))):(a=i.log10(o.end)-i.log10(o.minNotZero),n=l===r?o.bottom:l===o.minNotZero?o.bottom-.02*e:o.bottom-.02*e-.98*e/a*(i.log10(l)-i.log10(o.minNotZero)))),n},getValueForPixel:function(t){var e,n,a=this,o=i.log10(a.end)-i.log10(a.start);return a.isHorizontal()?(n=a.width,e=a.start*Math.pow(10,(t-a.left)*o/n)):(n=a.height,e=Math.pow(10,(a.bottom-t)*o/n)/a.start),e}});t.scaleService.registerScaleType("logarithmic",n,e)}},{34:34,45:45}],56:[function(t,e,n){"use strict";var i=t(25),a=t(45),o=t(34);e.exports=function(t){function e(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function n(t){var e=t.options.pointLabels,n=a.valueOrDefault(e.fontSize,v.defaultFontSize),i=a.valueOrDefault(e.fontStyle,v.defaultFontStyle),o=a.valueOrDefault(e.fontFamily,v.defaultFontFamily);return{size:n,style:i,family:o,font:a.fontString(n,i,o)}}function r(t,e,n){return a.isArray(n)?{w:a.longestText(t,t.font,n),h:n.length*e+1.5*(n.length-1)*e}:{w:t.measureText(n).width,h:e}}function l(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n-5,end:e}:{start:e,end:e+n+5}}function s(t){var i,o,s,u=n(t),d=Math.min(t.height/2,t.width/2),c={r:t.width,l:0,t:t.height,b:0},h={};t.ctx.font=u.font,t._pointLabelSizes=[];var f=e(t);for(i=0;i<f;i++){s=t.getPointPosition(i,d),o=r(t.ctx,u.size,t.pointLabels[i]||""),t._pointLabelSizes[i]=o;var g=t.getIndexAngle(i),p=a.toDegrees(g)%360,v=l(p,s.x,o.w,0,180),m=l(p,s.y,o.h,90,270);v.start<c.l&&(c.l=v.start,h.l=g),v.end>c.r&&(c.r=v.end,h.r=g),m.start<c.t&&(c.t=m.start,h.t=g),m.end>c.b&&(c.b=m.end,h.b=g)}t.setReductions(d,c,h)}function u(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function d(t){return 0===t||180===t?"center":t<180?"left":"right"}function c(t,e,n,i){if(a.isArray(e))for(var o=n.y,r=1.5*i,l=0;l<e.length;++l)t.fillText(e[l],n.x,o),o+=r;else t.fillText(e,n.x,n.y)}function h(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function f(t){var i=t.ctx,o=a.valueOrDefault,r=t.options,l=r.angleLines,s=r.pointLabels;i.lineWidth=l.lineWidth,i.strokeStyle=l.color;var u=t.getDistanceFromCenterForValue(r.ticks.reverse?t.min:t.max),f=n(t);i.textBaseline="top";for(var g=e(t)-1;g>=0;g--){if(l.display){var p=t.getPointPosition(g,u);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(p.x,p.y),i.stroke(),i.closePath()}if(s.display){var m=t.getPointPosition(g,u+5),b=o(s.fontColor,v.defaultFontColor);i.font=f.font,i.fillStyle=b;var x=t.getIndexAngle(g),y=a.toDegrees(x);i.textAlign=d(y),h(y,t._pointLabelSizes[g],m),c(i,t.pointLabels[g]||"",m,f.size)}}}function g(t,n,i,o){var r=t.ctx;if(r.strokeStyle=a.valueAtIndexOrDefault(n.color,o-1),r.lineWidth=a.valueAtIndexOrDefault(n.lineWidth,o-1),t.options.gridLines.circular)r.beginPath(),r.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),r.closePath(),r.stroke();else{var l=e(t);if(0===l)return;r.beginPath();var s=t.getPointPosition(0,i);r.moveTo(s.x,s.y);for(var u=1;u<l;u++)s=t.getPointPosition(u,i),r.lineTo(s.x,s.y);r.closePath(),r.stroke()}}function p(t){return a.isNumber(t)?t:0}var v=i.global,m={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:o.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}},b=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,n=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var i=a.min([t.height,t.width]),o=a.valueOrDefault(n.fontSize,v.defaultFontSize);t.drawingArea=e.display?i/2-(o/2+n.backdropPaddingY):i/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;a.each(e.data.datasets,function(o,r){if(e.isDatasetVisible(r)){var l=e.getDatasetMeta(r);a.each(o.data,function(e,a){var o=+t.getRightValue(e);isNaN(o)||l.data[a].hidden||(n=Math.min(o,n),i=Math.max(o,i))})}}),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=a.valueOrDefault(t.fontSize,v.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.pointLabels.display?s(this):u(this)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),o=Math.max(e.r-i.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),l=-Math.max(e.b-i.height,0)/Math.cos(n.b);a=p(a),o=p(o),r=p(r),l=p(l),i.drawingArea=Math.min(Math.round(t-(a+o)/2),Math.round(t-(r+l)/2)),i.setCenterPoint(a,o,r,l)},setCenterPoint:function(t,e,n,i){var a=this,o=a.width-e-a.drawingArea,r=t+a.drawingArea,l=n+a.drawingArea,s=a.height-i-a.drawingArea;a.xCenter=Math.round((r+o)/2+a.left),a.yCenter=Math.round((l+s)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+n.xCenter,y:Math.round(Math.sin(i)*e)+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,i=e.ticks,o=a.valueOrDefault;if(e.display){var r=t.ctx,l=this.getIndexAngle(0),s=o(i.fontSize,v.defaultFontSize),u=o(i.fontStyle,v.defaultFontStyle),d=o(i.fontFamily,v.defaultFontFamily),c=a.fontString(s,u,d);a.each(t.ticks,function(e,a){if(a>0||i.reverse){var u=t.getDistanceFromCenterForValue(t.ticksAsNumbers[a]);if(n.display&&0!==a&&g(t,n,u,a),i.display){var d=o(i.fontColor,v.defaultFontColor);if(r.font=c,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(l),i.showLabelBackdrop){var h=r.measureText(e).width;r.fillStyle=i.backdropColor,r.fillRect(-h/2-i.backdropPaddingX,-u-s/2-i.backdropPaddingY,h+2*i.backdropPaddingX,s+2*i.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.fillText(e,0,-u),r.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&f(t)}}});t.scaleService.registerScaleType("radialLinear",b,m)}},{25:25,34:34,45:45}],57:[function(t,e,n){"use strict";function i(t,e){return t-e}function a(t){var e,n,i,a={},o=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,o.push(i));return o}function o(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,o,r,l,s,u=[],d=[e];for(a=0,o=t.length;a<o;++a)(l=t[a])>e&&l<n&&d.push(l);for(d.push(n),a=0,o=d.length;a<o;++a)s=d[a+1],r=d[a-1],l=d[a],void 0!==r&&void 0!==s&&Math.round((s+r)/2)===l||u.push({time:l,pos:a/(o-1)});return u}function r(t,e,n){for(var i,a,o,r=0,l=t.length-1;r>=0&&r<=l;){if(i=r+l>>1,a=t[i-1]||null,o=t[i],!a)return{lo:null,hi:o};if(o[e]<n)r=i+1;else{if(!(a[e]>n))return{lo:a,hi:o};l=i-1}}return{lo:o,hi:null}}function l(t,e,n,i){var a=r(t,e,n),o=a.lo?a.hi?a.lo:t[t.length-2]:t[0],l=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=l[e]-o[e],u=s?(n-o[e])/s:0,d=(l[i]-o[i])*u;return o[i]+d}function s(t,e){var n=e.parser,i=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof i?m(t,i):(t instanceof m||(t=m(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function u(t,e){if(x.isNullOrUndef(t))return null;var n=e.options.time,i=s(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function d(t,e,n,i){var a,o,r,l=e-t,s=w[n],u=s.size,d=s.steps;if(!d)return Math.ceil(l/((i||1)*u));for(a=0,o=d.length;a<o&&(r=d[a],!(Math.ceil(l/(u*r))<=i));++a);return r}function c(t,e,n,i){var a,o,r,l=M.length;for(a=M.indexOf(t);a<l-1;++a)if(o=w[M[a]],r=o.steps?o.steps[o.steps.length-1]:k,o.common&&Math.ceil((n-e)/(r*o.size))<=i)return M[a];return M[l-1]}function h(t,e,n,i){var a,o,r=m.duration(m(i).diff(m(n)));for(a=M.length-1;a>=M.indexOf(e);a--)if(o=M[a],w[o].common&&r.as(o)>=t.length)return o;return M[e?M.indexOf(e):0]}function f(t){for(var e=M.indexOf(t)+1,n=M.length;e<n;++e)if(w[M[e]].common)return M[e]}function g(t,e,n,i){var a,o=i.time,r=o.unit||c(o.minUnit,t,e,n),l=f(r),s=x.valueOrDefault(o.stepSize,o.unitStepSize),u="week"===r&&o.isoWeekday,h=i.ticks.major.enabled,g=w[r],p=m(t),v=m(e),b=[];for(s||(s=d(t,e,r,n)),u&&(p=p.isoWeekday(u),v=v.isoWeekday(u)),p=p.startOf(u?"day":r),(v=v.startOf(u?"day":r))<e&&v.add(1,r),a=m(p),h&&l&&!u&&!o.round&&(a.startOf(l),a.add(~~((p-a)/(g.size*s))*s,r));a<v;a.add(s,r))b.push(+a);return b.push(+a),b}function p(t,e,n,i,a){var o,r,s=0,u=0;return a.offset&&e.length&&(a.time.min||(o=e.length>1?e[1]:i,r=e[0],s=(l(t,"time",o,"pos")-l(t,"time",r,"pos"))/2),a.time.max||(o=e[e.length-1],r=e.length>1?e[e.length-2]:n,u=(l(t,"time",o,"pos")-l(t,"time",r,"pos"))/2)),{left:s,right:u}}function v(t,e){var n,i,a,o,r=[];for(n=0,i=t.length;n<i;++n)a=t[n],o=!!e&&a===+m(a).startOf(e),r.push({value:a,major:o});return r}var m=t(1);m="function"==typeof m?m:window.moment;var b=t(25),x=t(45),y=Number.MIN_SAFE_INTEGER||-9007199254740991,k=Number.MAX_SAFE_INTEGER||9007199254740991,w={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},M=Object.keys(w);e.exports=function(t){var e=t.Scale.extend({initialize:function(){if(!m)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var e=this,n=e.options;return n.time&&n.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),t.Scale.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var t,e,n,o,r,l,s=this,d=s.chart,c=s.options.time,h=k,f=y,g=[],p=[],v=[];for(t=0,n=d.data.labels.length;t<n;++t)v.push(u(d.data.labels[t],s));for(t=0,n=(d.data.datasets||[]).length;t<n;++t)if(d.isDatasetVisible(t))if(r=d.data.datasets[t].data,x.isObject(r[0]))for(p[t]=[],e=0,o=r.length;e<o;++e)l=u(r[e],s),g.push(l),p[t][e]=l;else g.push.apply(g,v),p[t]=v.slice(0);else p[t]=[];v.length&&(v=a(v).sort(i),h=Math.min(h,v[0]),f=Math.max(f,v[v.length-1])),g.length&&(g=a(g).sort(i),h=Math.min(h,g[0]),f=Math.max(f,g[g.length-1])),h=u(c.min,s)||h,f=u(c.max,s)||f,h=h===k?+m().startOf("day"):h,f=f===y?+m().endOf("day")+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._horizontal=s.isHorizontal(),s._table=[],s._timestamps={data:g,datasets:p,labels:v}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,l=i.options,s=l.time,d=[],c=[];switch(l.ticks.source){case"data":d=i._timestamps.data;break;case"labels":d=i._timestamps.labels;break;case"auto":default:d=g(a,r,i.getLabelCapacity(a),l)}for("ticks"===l.bounds&&d.length&&(a=d[0],r=d[d.length-1]),a=u(s.min,i)||a,r=u(s.max,i)||r,t=0,e=d.length;t<e;++t)(n=d[t])>=a&&n<=r&&c.push(n);return i.min=a,i.max=r,i._unit=s.unit||h(c,s.minUnit,i.min,i.max),i._majorUnit=f(i._unit),i._table=o(i._timestamps.data,a,r,l.distribution),i._offsets=p(i._table,c,a,r,l),v(c,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n.chart.data,a=n.options.time,o=i.labels&&t<i.labels.length?i.labels[t]:"",r=i.datasets[e].data[t];return x.isObject(r)&&(o=n.getRightValue(r)),a.tooltipFormat&&(o=s(o,a).format(a.tooltipFormat)),o},tickFormatFunction:function(t,e,n,i){var a=this,o=a.options,r=t.valueOf(),l=o.time.displayFormats,s=l[a._unit],u=a._majorUnit,d=l[u],c=t.clone().startOf(u).valueOf(),h=o.ticks.major,f=h.enabled&&u&&d&&r===c,g=t.format(i||(f?d:s)),p=f?h:o.ticks.minor,v=x.valueOrDefault(p.callback,p.userCallback);return v?v(g,e,n):g},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(m(t[e].value),e,t));return i},getPixelForOffset:function(t){var e=this,n=e._horizontal?e.width:e.height,i=e._horizontal?e.left:e.top,a=l(e._table,"time",t,"pos");return i+n*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,n){var i=this,a=null;if(void 0!==e&&void 0!==n&&(a=i._timestamps.datasets[n][e]),null===a&&(a=u(t,i)),null!==a)return i.getPixelForOffset(a)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._horizontal?e.width:e.height,i=e._horizontal?e.left:e.top,a=(n?(t-i)/n:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,o=l(e._table,"pos",a,"time");return m(o)},getLabelWidth:function(t){var e=this,n=e.options.ticks,i=e.ctx.measureText(t).width,a=x.toRadians(n.maxRotation),o=Math.cos(a),r=Math.sin(a);return i*o+x.valueOrDefault(n.fontSize,b.global.defaultFontSize)*r},getLabelCapacity:function(t){var e=this,n=e.options.time.displayFormats.millisecond,i=e.tickFormatFunction(m(t),0,[],n),a=e.getLabelWidth(i),o=e.isHorizontal()?e.width:e.height;return Math.floor(o/a)}});t.scaleService.registerScaleType("time",e,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{1:1,25:25,45:45}]},{},[7])(7)});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
|
22 |
/* ================== admin/assets/js/src/plugins/jquery.matchHeight-min.js =================== */
|
1 |
+
/*! WP ULike - v4.4.4
|
2 |
* https://wpulike.com
|
3 |
* TechnoWich 2020;
|
4 |
*/
|
8 |
|
9 |
|
10 |
/*!
|
11 |
+
* Chart.js v2.9.4
|
12 |
+
* https://www.chartjs.org
|
13 |
+
* (c) 2020 Chart.js Contributors
|
14 |
+
* Released under the MIT License
|
|
|
|
|
|
|
15 |
*/
|
16 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var i=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)i.unshift(e[o].parent),r=a(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=i,r}var o={};Object.keys(n).forEach((function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:n[t].channels}),Object.defineProperty(o[t],"labels",{value:n[t].labels});var e=function(t){for(var e=i(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i=e[n];o[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),o[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=l[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var x in l)b[l[x]]=x;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=s[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=y);var _=y;function k(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var w,M={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return M.valueOrDefault(M.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(M.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(M.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!M.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(M.isArray(t))return t.map(M.clone);if(M.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=M.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){if(k(t)){var a=e[t],r=n[t];M.isObject(a)&&M.isObject(r)?M.merge(a,r,i):e[t]=M.clone(r)}},_mergerIf:function(t,e,n){if(k(t)){var i=e[t],a=n[t];M.isObject(i)&&M.isObject(a)?M.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=M.clone(a))}},merge:function(t,e,n){var i,a,r,o,s,l=M.isArray(e)?e:[e],u=l.length;if(!M.isObject(t))return t;for(i=(n=n||{}).merger||M._merger,a=0;a<u;++a)if(e=l[a],M.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return M.merge(t,e,{merger:M._mergerIf})},extend:Object.assign||function(t){return M.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=M.inherits,t&&M.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},S=M;M.callCallback=M.callback,M.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var C={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}},P={effects:C};S.easingEffects=C;var A=Math.PI,D=A/180,T=2*A,I=A/2,F=A/4,O=2*A/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-A,-I),t.arc(u,l,o,-I,0),t.arc(u,d,o,0,I),t.arc(s,d,o,I,A)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-I,I),t.arc(s,l,o,I,A+I)):l<d?(t.arc(s,l,o,-A,0),t.arc(s,d,o,0,A)):t.arc(s,l,o,-A,A),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*D;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,T),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=O,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=O,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+F)*u,l=Math.sin(h+F)*u,t.arc(i-s,a-l,d,h-A,h-I),t.arc(i+l,a-s,d,h-I,h),t.arc(i+s,a+l,d,h,h+I),t.arc(i-l,a+s,d,h+I,h+A),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=F;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=F;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=F,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},R=L;S.clear=L.clear,S.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var z={_set:function(t,e){return S.merge(this[t]||(this[t]={}),e)}};z._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var N=z,B=S.valueOrDefault;var E={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return S.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=N.global,n=B(t.fontSize,e.defaultFontSize),i={family:B(t.fontFamily,e.defaultFontFamily),lineHeight:S.options.toLineHeight(B(t.lineHeight,e.defaultLineHeight),n),size:n,style:B(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||S.isNullOrUndef(t.size)||S.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&S.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},W={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},V=W;S.log10=W.log10;var H=S,j=P,q=R,U=E,Y=V,G={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};H.easing=j,H.canvas=q,H.options=U,H.math=Y,H.rtl=G;var X=function(t){H.extend(this,t),this.initialize.apply(this,arguments)};H.extend(X.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=H.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)===typeof(l=t[o]))if("string"===d){if((h=_(l)).valid&&(c=_(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(H.isFinite(l)&&H.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=H.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return H.isNumber(this._model.x)&&H.isNumber(this._model.y)}}),X.extend=H.inherits;var K=X,Z=K.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),$=Z;Object.defineProperty(Z.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Z.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:H.noop,onComplete:H.noop}});var J={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=H.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=H.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),H.callback(t.render,[e,t],e),H.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(H.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},Q=H.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(tt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};H.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&et(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&et(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tt.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return H.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){this._config=H.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&H._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:H.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=Q([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},H.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=Q([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=Q([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){H.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=H.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=Q([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=Q([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=Q([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=H.inherits;var it=nt,at=2*Math.PI;function rt(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+at,rt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+at),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&rt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var st=K.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=H.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=at;for(;a>s;)a-=at;for(;a<o;)a+=at;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+at,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%at}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&ot(e,n,a),e.restore()}}),lt=H.valueOrDefault,ut=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:ut,borderWidth:3,borderColor:ut,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var dt=K.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=N.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=H.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=lt(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=lt(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?H.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):H.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),ht=H.valueOrDefault,ct=N.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ct,borderColor:ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=K.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ft,inXRange:ft,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=N.global,u=l.defaultColor;e.skip||(void 0===t||H.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ht(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,H.canvas.drawPoint(n,i,r,o,s,a))}}),pt=N.global.defaultColor;function mt(t){return t&&void 0!==t.width}function vt(t){var e,n,i,a,r;return mt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function bt(t,e,n){return t===e?n:t===n?e:t}function xt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=bt(e,"left","right")):t.base<t.y&&(e=bt(e,"bottom","top")),n[e]=!0,n):n}(t);return H.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function yt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&vt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var _t=K.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=vt(t),n=e.right-e.left,i=e.bottom-e.top,a=xt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return yt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?yt(n,t,null):yt(n,null,e)},inXRange:function(t){return yt(this._view,t,null)},inYRange:function(t){return yt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),kt={},wt=st,Mt=dt,St=gt,Ct=_t;kt.Arc=wt,kt.Line=Mt,kt.Point=St,kt.Rectangle=Ct;var Pt=H._deprecated,At=H.valueOrDefault;function Dt(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=H.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return H.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Tt=it.extend({dataElementType:kt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;it.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Pt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Pt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Pt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Pt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Pt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},H.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):Dt(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(At(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(H.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}H.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=H.extend({},it.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=At(n.barPercentage,e.barPercentage),e.barThickness=At(n.barThickness,e.barThickness),e.categoryPercentage=At(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=At(n.maxBarThickness,e.maxBarThickness),e.minBarLength=At(i.minBarLength,e.minBarLength),e}}),It=H.valueOrDefault,Ft=H.options.resolve;N._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ot=it.extend({dataElementType:kt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;H.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=It(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=It(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=It(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=it.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=H.extend({},s)),s.radius=Ft([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=H.valueOrDefault,Rt=Math.PI,zt=2*Rt,Nt=Rt/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Nt,circumference:zt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return H.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Bt=it.extend({dataElementType:kt.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<zt){var b=l.rotation%zt,x=(b+=b>=Rt?-zt:b<-Rt?zt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=zt,S=b<=Nt&&x>=Nt||x>=zt+Nt,C=b<=-Nt&&x>=-Nt||x>=Rt+Nt,P=b===-Rt||x>=Rt?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/zt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};H.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:H.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return H.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?zt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Et=Tt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Wt=H.valueOrDefault,Vt=H.options.resolve,Ht=H.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function qt(t,e,n){var i=n/2,a=jt(t,i),r=jt(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Ut(t){var e,n,i,a;return H.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}N._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Yt=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Wt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Wt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=it.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Wt(n.spanGaps,a.spanGaps),o.tension=Wt(n.lineTension,r.tension),o.steppedLine=Vt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=Ut(Wt(n.clip,qt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)H.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=H.splineCurve(H.previousItem(l,t)._model,n,H.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Ht(n,s)&&(t>0&&Ht(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Ht(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,H.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),H.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Wt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Wt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Wt(n.hoverBorderWidth,n.borderWidth),e.radius=Wt(n.hoverRadius,n.radius)}}),Gt=H.options.resolve;N._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Xt=it.extend({dataElementType:kt.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};H.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:H.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return H.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor,a=H.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Gt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});N._set("pie",H.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Kt=Bt,Zt=H.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var $t=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,linkScales:H.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Zt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=it.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Zt(e.spanGaps,n.spanGaps),i.tension=Zt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=H.splineCurve(H.previousItem(o,t,!0)._model,n,H.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Zt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Zt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Zt(n.hoverBorderWidth,n.borderWidth),e.radius=Zt(n.hoverRadius,n.radius)}});N._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var Jt={bar:Tt,bubble:Ot,doughnut:Bt,horizontalBar:Et,line:Yt,polarArea:Xt,pie:Kt,radar:$t,scatter:Yt};function Qt(t,e){return t.native?{x:t.x,y:t.y}:H.getRelativePosition(t,e)}function te(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function ee(t,e){var n=[];return te(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ne(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return te(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ie(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ae(t,e,n){var i=Qt(e,t);n.axis=n.axis||"x";var a=ie(n.axis),r=n.intersect?ee(t,i):ne(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var re={modes:{single:function(t,e){var n=Qt(e,t),i=[];return te(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ae,index:ae,dataset:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||"xy";var a=ie(n.axis),r=n.intersect?ee(t,i):ne(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ae(t,e,{intersect:!1})},point:function(t,e){return ee(t,Qt(e,t))},nearest:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||"xy";var a=ie(n.axis);return ne(t,i,n.intersect,a)},x:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},oe=H.extend;function se(t,e){return H.where(t,(function(t){return t.pos===e}))}function le(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function ue(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function de(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-ue(o,t,"left","right"),a=e.outerHeight-ue(o,t,"top","bottom"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function he(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function ce(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,he(r.horizontal,e)),de(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&ce(u,e,n)||l}function fe(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ge,pe={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=H.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=le(se(e,"left"),!0),i=le(se(e,"right")),a=le(se(e,"top"),!0),r=le(se(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:se(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=oe({maxPadding:oe({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),ce(l,h,d),ce(u,h,d)&&ce(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),fe(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,fe(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},H.each(s.chartArea,(function(e){var n=e.box;oe(n,t.chartArea),n.update(h.w,h.h)}))}}},me=(ge=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ge.default||ge,ve="$chartjs",be="chartjs-size-monitor",xe="chartjs-render-monitor",ye="chartjs-render-animation",_e=["animationstart","webkitAnimationStart"],ke={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function we(t,e){var n=H.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Me=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Se(t,e,n){t.addEventListener(e,n,Me)}function Ce(t,e,n){t.removeEventListener(e,n,Me)}function Pe(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Ae(t){var e=document.createElement("div");return e.className=t||"",e}function De(t,e,n){var i,a,r,o,s=t[ve]||(t[ve]={}),l=s.resizer=function(t){var e=Ae(be),n=Ae(be+"-expand"),i=Ae(be+"-shrink");n.appendChild(Ae()),i.appendChild(Ae()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Se(n,"scroll",a.bind(n,"expand")),Se(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Pe("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Pe("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,H.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t[ve]||(t[ve]={}),i=n.renderProxy=function(t){t.animationName===ye&&e()};H.each(_e,(function(e){Se(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(xe)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function Te(t){var e=t[ve]||{},n=e.resizer;delete e.resizer,function(t){var e=t[ve]||{},n=e.renderProxy;n&&(H.each(_e,(function(e){Ce(t,e,n)})),delete e.renderProxy),t.classList.remove(xe)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Ie={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[ve]||(t[ve]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,me)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[ve]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=we(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=we(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[ve]){var n=e[ve].initial;["height","width"].forEach((function(t){var i=n[t];H.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),H.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[ve]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[ve]||(n[ve]={});Se(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=ke[t.type]||t.type,i=H.getRelativePosition(t,e);return Pe(n,e,i.x,i.y,t)}(e,t))})}else De(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[ve]||{}).proxies||{})[t.id+"_"+e];a&&Ce(i,e,a)}else Te(i)}};H.addEvent=Se,H.removeEvent=Ce;var Fe=Ie._enabled?Ie:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Oe=H.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Fe);N._set("global",{plugins:{}});var Le={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=H.clone(N.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Re={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=H.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?H.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=H.extend(this.defaults[t],e))},addScalesToLayout:function(t){H.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pe.addBox(t,e)}))}},ze=H.valueOrDefault,Ne=H.rtl.getRtlAdapter;N._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:H.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:H.noop,beforeBody:H.noop,beforeLabel:H.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),H.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:H.noop,afterBody:H.noop,beforeFooter:H.noop,footer:H.noop,afterFooter:H.noop}}});var Be={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=H.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Ee(t,e){return e&&(H.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function We(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ve(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:ze(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:ze(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:ze(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:ze(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:ze(t.titleFontStyle,e.defaultFontStyle),titleFontSize:ze(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:ze(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:ze(t.footerFontStyle,e.defaultFontStyle),footerFontSize:ze(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function He(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ee([],We(t))}var qe=K.extend({initialize:function(){this._model=Ve(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Ee(o,We(i)),o=Ee(o,We(a)),o=Ee(o,We(r))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return H.each(t,(function(t){var r={before:[],lines:[],after:[]};Ee(r.before,We(i.beforeLabel.call(n,t,e))),Ee(r.lines,i.label.call(n,t,e)),Ee(r.after,We(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return je(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Ee(r,We(n)),r=Ee(r,We(i)),r=Ee(r,We(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Ve(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Be[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,m)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,m)}))),H.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=H.fontString(u,e._titleFontStyle,e._titleFontFamily),H.each(e.title,f),n.font=H.fontString(d,e._bodyFontStyle,e._bodyFontFamily),H.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,H.each(r,(function(t){H.each(t.before,f),H.each(t.lines,f),H.each(t.after,f)})),c=0,n.font=H.fontString(h,e._footerFontStyle,e._footerFontFamily),H.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=H.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?He(e,"left"):0,b=Ne(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=H.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=He(e,y),n.fillStyle=e.bodyFontColor,H.each(e.beforeBody,x),m=p&&"right"!==y?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,H.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}H.each(i.after,x)}m=0,H.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=H.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,H.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),H.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!H.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ue=Be,Ye=qe;Ye.positioners=Ue;var Ge=H.valueOrDefault;function Xe(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ge(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?H.merge(e[t][a],[Re.getScaleDefaults(r),o]):H.merge(e[t][a],o)}else H._merger(t,e,n,i)}})}function Ke(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=Xe(a,r):"scale"===t?e[t]=H.merge(a,[Re.getScaleDefaults(r.type),r]):H._merger(t,e,n,i)}})}function Ze(t){var e=t.options;H.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Ke(N.global,N[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function $e(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(H.findIndex(t,a)>=0);return i}function Je(t){return"top"===t||"bottom"===t}function Qe(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var tn=function(t,e){return this.construct(t,e),this};H.extend(tn.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ke(N.global,N[t.type],t.options||{}),t}(e);var i=Oe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=H.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,tn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),H.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return H.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(H.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:H.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",H.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;H.each(e.xAxes,(function(t,n){t.id||(t.id=$e(e.xAxes,"x-axis-",n))})),H.each(e.yAxes,(function(t,n){t.id||(t.id=$e(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),H.each(i,(function(e){var i=e.options,r=i.id,o=Ge(i.type,e.dtype);Je(i.position)!==Je(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Re.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),H.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Re.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Jt[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;H.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ze(i),Le._invalidate(i),!1!==Le.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&H.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Le.notify(i,"afterUpdate"),i._layers.sort(Qe("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Le.notify(t,"beforeLayout")&&(pe.update(this,this.width,this.height),t._layers=[],H.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Le.notify(t,"afterScaleUpdate"),Le.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Le.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Le.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Le.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Le.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ge(t.duration,n&&n.duration),a=t.lazy;if(!1!==Le.notify(e,"beforeRender")){var r=function(t){Le.notify(e,"afterRender"),H.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new $({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=H.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});J.addAnimation(e,o,i,a)}else e.draw(),r(new $({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),H.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Le.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Le.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(Qe("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Le.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return re.modes.single(this,t)},getElementsAtEvent:function(t){return re.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return re.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=re.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return re.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),H.canvas.clear(n),Oe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Le.notify(n,"destroy"),delete tn.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ye({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};H.each(t.options.events,(function(i){Oe.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Oe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,H.each(e,(function(e,n){Oe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Le.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Le.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),H.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!H.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),tn.instances={};var en=tn;tn.Controller=tn,tn.types={},H.configMerge=Ke,H.scaleMerge=Xe;function nn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function an(t){this.options=t||{}}H.extend(an.prototype,{formats:nn,parse:nn,format:nn,add:nn,diff:nn,startOf:nn,endOf:nn,_create:function(t){return t}}),an.override=function(t){H.extend(an.prototype,t)};var rn={_date:an},on={formatters:{values:function(t){return H.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=H.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=H.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(H.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},sn=H.isArray,ln=H.isNullOrUndef,un=H.valueOrDefault,dn=H.valueAtIndexOrDefault;function hn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function cn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[],_=0,k=0;for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,ln(s)||sn(s)){if(sn(s))for(r=0,o=s.length;r<o;++r)g=s[r],ln(g)||sn(g)||(c=H.measureText(t,d.data,d.gc,c,g),f+=h)}else c=H.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2),_=Math.max(c,_),k=Math.max(f,k)}function w(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){H.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),p=b.indexOf(_),m=x.indexOf(k),{first:w(0),last:w(v-1),widest:w(p),highest:w(m)}}function fn(t){return t.drawTicks?t.tickMarkLength:0}function gn(t){var e,n;return t.display?(e=H.options._parseFont(t),n=H.options.toPadding(t.padding),e.lineHeight+n.height):0}function pn(t,e){return H.extend(H.options._parseFont({fontFamily:un(e.fontFamily,t.fontFamily),fontSize:un(e.fontSize,t.fontSize),fontStyle:un(e.fontStyle,t.fontStyle),lineHeight:un(e.lineHeight,t.lineHeight)}),{color:H.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function mn(t){var e=pn(t,t.minor);return{minor:e,major:t.major.enabled?pn(t,t.major):e}}function vn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function bn(t,e,n,i){var a,r,o,s,l=un(n,0),u=Math.min(un(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}N._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:on.formatters.values,minor:{},major:{}}});var xn=K.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){H.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=H.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){H.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){H.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){H.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){H.callback(this.options.beforeDataLimits,[this])},determineDataLimits:H.noop,afterDataLimits:function(){H.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){H.callback(this.options.beforeBuildTicks,[this])},buildTicks:H.noop,afterBuildTicks:function(t){var e=this;return sn(t)&&t.length?H.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=H.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){H.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){H.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){H.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-fn(l.gridLines)-u.padding-gn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=H.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=fn(o)+gn(r)),u?s&&(e.height=fn(o)+gn(r)):e.height=t.maxHeight,a.display&&s){var d=mn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=H.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ln(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=cn(t.ctx,mn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return sn(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:H.noop,getPixelForValue:H.noop,getValueForPixel:H.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),vn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=H.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)bn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,bn(t,i,H.isNullOrUndef(a)?0:d-a,d),bn(t,i,h,H.isNullOrUndef(a)?t.length:h+a),vn(t)}return bn(t,i),vn(t)},_tickSize:function(){var t=this.options.ticks,e=H.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=fn(_),A=[],D=_.drawBorder?dn(_.lineWidth,0,0):0,T=D/2,I=H._alignPixel,F=function(t){return I(x,t,D)};for("top"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):"bottom"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):"left"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},ln(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=dn(_.lineWidth,n,1),p=dn(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=hn(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=mn(g),y=g.padding,_=fn(f.gridLines),k=-H.toRadians(c.labelRotation),w=[];for("top"===p?(r=c.bottom-_-y,o=k?"left":"center"):"bottom"===p?(r=c.top+_+y,o=k?"right":"center"):"left"===p?(a=c.right-(m?0:_)-y,o=m?"left":"right"):(a=c.left+(m?0:_)+y,o=m?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,ln(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=sn(i)?i.length:1,v?(a=s,h="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=H._alignPixel,h=n.drawBorder?dn(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=dn(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=dn(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,sn(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=un(i.fontColor,N.global.defaultFontColor),s=H.options._parseFont(i),l=H.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});xn.prototype._draw=xn.prototype.draw;var yn=xn,_n=H.isNullOrUndef,kn=yn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;yn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return _n(e)||_n(n)||(t=o.chart.data.datasets[n].data[e]),_n(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=H.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),wn={position:"bottom"};kn._defaults=wn;var Mn=H.noop,Sn=H.isNullOrUndef;var Cn=yn.extend({getRightValue:function(t){return"string"==typeof t?+t:yn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=H.sign(t.min),i=H.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Mn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:H.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=H.niceNum((g-f)/u/l)*l;if(p<1e-14&&Sn(d)&&Sn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=H.niceNum(r*p/u/l)*l),s||Sn(c)?n=Math.pow(10,H._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Sn(d)&&H.almostWhole(d/p,p/1e3)&&(i=d),!Sn(h)&&H.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=H.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Sn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(Sn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=H.max(a),t.min=H.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),yn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;yn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Pn={position:"left",ticks:{callback:on.formatters.linear}};function An(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function Dn(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Tn=Cn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?An(a,u,e,n):Dn(a,e,n);H.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,H.min(i)),a.max=Math.max(a.max,H.max(i))})),a.min=H.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=H.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=H.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),In=Pn;Tn._defaults=In;var Fn=H.valueOrDefault,On=H.math.log10;var Ln={position:"left",ticks:{callback:on.formatters.logarithmic}};function Rn(t,e){return H.isFinite(t)&&t>=0?t:e}var zn=yn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}H.each(f,(function(t){if(t.length>0){var e=H.min(t),n=H.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=H.isFinite(o.min)?o.min:null,o.max=H.isFinite(o.max)?o.max:null,o.minNotZero=H.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Rn(e.min,t.min),t.max=Rn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(On(t.min))-1),t.max=Math.pow(10,Math.floor(On(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(On(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(On(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(On(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Rn(e.min),max:Rn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=Fn(t.min,Math.pow(10,Math.floor(On(e.min)))),o=Math.floor(On(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(On(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(On(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=Fn(t.max,r);return a.push(u),a}(i,t);t.max=H.max(a),t.min=H.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),yn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(On(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;yn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Fn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=On(e),t._valueOffset=n,t._valueRange=(On(t.max)-On(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(On(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Nn=Ln;zn._defaults=Nn;var Bn=H.valueOrDefault,En=H.valueAtIndexOrDefault,Wn=H.options.resolve,Vn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:on.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Hn(t){var e=t.ticks;return e.display&&t.display?Bn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function jn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function qn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Un(t,e,n,i){var a,r,o=n.y+i/2;if(H.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Yn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Gn(t){return H.isNumber(t)?t:0}var Xn=Cn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Hn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;H.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);H.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Hn(this.options))},convertTicksToLabels:function(){var t=this;Cn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=H.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=H.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=H.isArray(u)?{w:H.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=H.toDegrees(h)%360,f=jn(c,i.x,n.w,0,180),g=jn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Gn(a),r=Gn(r),o=Gn(o),s=Gn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(H.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Bn(s.lineWidth,o.lineWidth),u=Bn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Hn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=H.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=En(i.fontColor,s,N.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=H.toDegrees(h);e.textAlign=qn(c),Yn(c,t._pointLabelSizes[s],u),Un(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&H.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=En(e.color,i-1),u=En(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Wn([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Wn([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=H.options._parseFont(n),s=Bn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",H.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:H.noop}),Kn=Vn;Xn._defaults=Kn;var Zn=H._deprecated,$n=H.options.resolve,Jn=H.valueOrDefault,Qn=Number.MIN_SAFE_INTEGER||-9007199254740991,ti=Number.MAX_SAFE_INTEGER||9007199254740991,ei={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ni=Object.keys(ei);function ii(t,e){return t-e}function ai(t){return H.valueOrDefault(t.time.min,t.ticks.min)}function ri(t){return H.valueOrDefault(t.time.max,t.ticks.max)}function oi(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function si(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),H.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),H.isFinite(o)||(o=n.parse(o))),o)}function li(t,e){if(H.isNullOrUndef(e))return null;var n=t.options.time,i=si(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function ui(t,e,n,i){var a,r,o,s=ni.length;for(a=ni.indexOf(t);a<s-1;++a)if(o=(r=ei[ni[a]]).steps?r.steps:ti,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ni[a];return ni[s-1]}function di(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var hi=yn.extend({initialize:function(){this.mergeTicksOptions(),yn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new rn._date(e.adapters.date);return Zn("time scale",n.format,"time.format","time.parser"),Zn("time scale",n.min,"time.min","ticks.min"),Zn("time scale",n.max,"time.max","ticks.max"),H.mergeIf(n.displayFormats,i.formats()),yn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),yn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=ti,f=Qn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(li(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,H.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=li(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ii):g.sort(ii),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=li(s,ai(d))||c,f=li(s,ri(d))||f,c=c===ti?+u.startOf(Date.now(),h):c,f=f===Qn?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||ui(s.minUnit,e,n,i),u=$n([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=li(i,ai(o))||a,r=li(i,ri(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?ui(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ni.length-1;r>=ni.indexOf(n);r--)if(o=ni[r],ei[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ni[n?ni.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ni.indexOf(t)+1,n=ni.length;e<n;++e)if(ei[ni[e]].common)return ni[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=oi(t,"time",e[0],"pos"),s=1===e.length?1-r:(oi(t,"time",e[1],"pos")-r)/2,o=oi(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-oi(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),di(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return H.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(si(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(si(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=$n([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=oi(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=li(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=oi(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=H.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=Jn(e.fontSize,N.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,di(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),ci={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};hi._defaults=ci;var fi={category:kn,linear:Tn,logarithmic:zn,radialLinear:Xn,time:hi},gi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};rn._date.override("function"==typeof t?{_id:"moment",formats:function(){return gi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var pi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return H.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function mi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function vi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(H.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function bi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function xi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),pi[n](t))}function yi(t){return t&&!t.skip}function _i(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)H.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)H.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function ki(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=yi(u),c=yi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(_i(t,m,v,b,x),b=x=0,m=[],v=[]));_i(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var wi={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof kt.Line&&(r={visible:t.isDatasetVisible(i),fill:mi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=bi(l,i,s),r.boundary=vi(r),r.mapper=xi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||N.global.defaultColor,o&&s&&r.length&&(H.canvas.clipArea(u,t.chartArea),ki(u,r,o,a,s,i._loop),H.canvas.unclipArea(u)))}},Mi=H.rtl.getRtlAdapter,Si=H.noop,Ci=H.valueOrDefault;function Pi(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Ai=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Si,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Si,beforeSetDimensions:Si,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Si,beforeBuildLabels:Si,buildLabels:function(){var t=this,e=t.options.labels||{},n=H.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Si,beforeFit:Si,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=H.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Si,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=N.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=Mi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Ci(n.fontColor,i.defaultFontColor),g=H.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Pi(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},H.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;H.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Ci(i.lineWidth,r.borderWidth);if(c.fillStyle=Ci(i.fillStyle,a),c.lineCap=Ci(i.lineCap,r.borderCapStyle),c.lineDashOffset=Ci(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Ci(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Ci(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Ci(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;H.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),H.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Di(t,e){var n=new Ai({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Ti={id:"legend",_element:Ai,beforeInit:function(t){var e=t.options.legend;e&&Di(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(H.mergeIf(e,N.global.legend),n?(pe.configure(t,n,e),n.options=e):Di(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ii=H.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Fi=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ii,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ii,beforeSetDimensions:Ii,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ii,beforeBuildLabels:Ii,buildLabels:Ii,afterBuildLabels:Ii,beforeFit:Ii,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(H.isArray(n.text)?n.text.length:1)*H.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ii,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=H.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=H.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(H.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Oi(t,e){var n=new Fi({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.titleBlock=n}var Li={},Ri=wi,zi=Ti,Ni={id:"title",_element:Fi,beforeInit:function(t){var e=t.options.title;e&&Oi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(H.mergeIf(e,N.global.title),n?(pe.configure(t,n,e),n.options=e):Oi(t,e)):n&&(pe.removeBox(t,n),delete t.titleBlock)}};for(var Bi in Li.filler=Ri,Li.legend=zi,Li.title=Ni,en.helpers=H,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=H._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}H.where=function(t,e){if(H.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return H.each(t,(function(t){e(t)&&n.push(t)})),n},H.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},H.findNextWhere=function(t,e,n){H.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},H.findPreviousWhere=function(t,e,n){H.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},H.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},H.almostEquals=function(t,e,n){return Math.abs(t-e)<n},H.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},H.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},H.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},H.toRadians=function(t){return t*(Math.PI/180)},H.toDegrees=function(t){return t*(180/Math.PI)},H._decimalPlaces=function(t){if(H.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},H.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},H.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},H.aliasPixel=function(t){return t%2==0?0:.5},H._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},H.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(H.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},H.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},H.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},H.niceNum=function(t,e){var n=Math.floor(H.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},H.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},H.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(H.getStyle(r,"padding-left")),u=parseFloat(H.getStyle(r,"padding-top")),d=parseFloat(H.getStyle(r,"padding-right")),h=parseFloat(H.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},H.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},H.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},H._calculatePadding=function(t,e,n){return(e=H.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},H._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},H.getMaximumWidth=function(t){var e=H._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-H._calculatePadding(e,"padding-left",n)-H._calculatePadding(e,"padding-right",n),a=H.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},H.getMaximumHeight=function(t){var e=H._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-H._calculatePadding(e,"padding-top",n)-H._calculatePadding(e,"padding-bottom",n),a=H.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},H.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},H.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},H.fontString=function(t,e,n){return e+" "+t+"px "+n},H.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==H.isArray(u))h=H.measureText(t,a,r,h,u);else if(H.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||H.isArray(d)||(h=H.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},H.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},H.numberOfLabelLines=function(t){var e=1;return H.each(t,(function(t){H.isArray(t)&&t.length>e&&(e=t.length)})),e},H.color=_?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},H.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:H.color(t).saturate(.5).darken(.1).rgbString()}}(),en._adapters=rn,en.Animation=$,en.animationService=J,en.controllers=Jt,en.DatasetController=it,en.defaults=N,en.Element=K,en.elements=kt,en.Interaction=re,en.layouts=pe,en.platform=Oe,en.plugins=Le,en.Scale=yn,en.scaleService=Re,en.Ticks=on,en.Tooltip=Ye,en.helpers.each(fi,(function(t,e){en.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Bi)&&en.plugins.register(Li[Bi]);en.platform.initialize();var Ei=en;return"undefined"!=typeof window&&(window.Chart=en),en.Chart=en,en.Legend=Li.legend._element,en.Title=Li.title._element,en.pluginService=en.plugins,en.PluginBase=en.Element.extend({}),en.canvasHelpers=en.helpers.canvas,en.layoutService=en.layouts,en.LinearScaleBase=Cn,en.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){en[t]=function(e,n){return new en(e,en.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ei}));
|
17 |
+
|
18 |
+
|
19 |
+
/* ================== admin/assets/js/src/plugins/dist/jquery.matchHeight-min.dev.js =================== */
|
20 |
+
|
21 |
+
|
22 |
+
"use strict";
|
23 |
+
|
24 |
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
25 |
+
|
26 |
+
/*
|
27 |
+
* jquery-match-height 0.7.2 by @liabru
|
28 |
+
* http://brm.io/jquery-match-height/
|
29 |
+
* License MIT
|
30 |
+
*/
|
31 |
+
!function (t) {
|
32 |
+
"use strict";
|
33 |
+
|
34 |
+
"function" == typeof define && define.amd ? define(["jquery"], t) : "undefined" != typeof module && module.exports ? module.exports = t(require("jquery")) : t(jQuery);
|
35 |
+
}(function (t) {
|
36 |
+
var e = -1,
|
37 |
+
o = -1,
|
38 |
+
n = function n(t) {
|
39 |
+
return parseFloat(t) || 0;
|
40 |
+
},
|
41 |
+
a = function a(e) {
|
42 |
+
var o = 1,
|
43 |
+
a = t(e),
|
44 |
+
i = null,
|
45 |
+
r = [];
|
46 |
+
return a.each(function () {
|
47 |
+
var e = t(this),
|
48 |
+
a = e.offset().top - n(e.css("margin-top")),
|
49 |
+
s = r.length > 0 ? r[r.length - 1] : null;
|
50 |
+
null === s ? r.push(e) : Math.floor(Math.abs(i - a)) <= o ? r[r.length - 1] = s.add(e) : r.push(e), i = a;
|
51 |
+
}), r;
|
52 |
+
},
|
53 |
+
i = function i(e) {
|
54 |
+
var o = {
|
55 |
+
byRow: !0,
|
56 |
+
property: "height",
|
57 |
+
target: null,
|
58 |
+
remove: !1
|
59 |
+
};
|
60 |
+
return "object" == _typeof(e) ? t.extend(o, e) : ("boolean" == typeof e ? o.byRow = e : "remove" === e && (o.remove = !0), o);
|
61 |
+
},
|
62 |
+
r = t.fn.matchHeight = function (e) {
|
63 |
+
var o = i(e);
|
64 |
+
|
65 |
+
if (o.remove) {
|
66 |
+
var n = this;
|
67 |
+
return this.css(o.property, ""), t.each(r._groups, function (t, e) {
|
68 |
+
e.elements = e.elements.not(n);
|
69 |
+
}), this;
|
70 |
+
}
|
71 |
+
|
72 |
+
return this.length <= 1 && !o.target ? this : (r._groups.push({
|
73 |
+
elements: this,
|
74 |
+
options: o
|
75 |
+
}), r._apply(this, o), this);
|
76 |
+
};
|
77 |
+
|
78 |
+
r.version = "0.7.2", r._groups = [], r._throttle = 80, r._maintainScroll = !1, r._beforeUpdate = null, r._afterUpdate = null, r._rows = a, r._parse = n, r._parseOptions = i, r._apply = function (e, o) {
|
79 |
+
var s = i(o),
|
80 |
+
h = t(e),
|
81 |
+
l = [h],
|
82 |
+
c = t(window).scrollTop(),
|
83 |
+
p = t("html").outerHeight(!0),
|
84 |
+
u = h.parents().filter(":hidden");
|
85 |
+
return u.each(function () {
|
86 |
+
var e = t(this);
|
87 |
+
e.data("style-cache", e.attr("style"));
|
88 |
+
}), u.css("display", "block"), s.byRow && !s.target && (h.each(function () {
|
89 |
+
var e = t(this),
|
90 |
+
o = e.css("display");
|
91 |
+
"inline-block" !== o && "flex" !== o && "inline-flex" !== o && (o = "block"), e.data("style-cache", e.attr("style")), e.css({
|
92 |
+
display: o,
|
93 |
+
"padding-top": "0",
|
94 |
+
"padding-bottom": "0",
|
95 |
+
"margin-top": "0",
|
96 |
+
"margin-bottom": "0",
|
97 |
+
"border-top-width": "0",
|
98 |
+
"border-bottom-width": "0",
|
99 |
+
height: "100px",
|
100 |
+
overflow: "hidden"
|
101 |
+
});
|
102 |
+
}), l = a(h), h.each(function () {
|
103 |
+
var e = t(this);
|
104 |
+
e.attr("style", e.data("style-cache") || "");
|
105 |
+
})), t.each(l, function (e, o) {
|
106 |
+
var a = t(o),
|
107 |
+
i = 0;
|
108 |
+
if (s.target) i = s.target.outerHeight(!1);else {
|
109 |
+
if (s.byRow && a.length <= 1) return void a.css(s.property, "");
|
110 |
+
a.each(function () {
|
111 |
+
var e = t(this),
|
112 |
+
o = e.attr("style"),
|
113 |
+
n = e.css("display");
|
114 |
+
"inline-block" !== n && "flex" !== n && "inline-flex" !== n && (n = "block");
|
115 |
+
var a = {
|
116 |
+
display: n
|
117 |
+
};
|
118 |
+
a[s.property] = "", e.css(a), e.outerHeight(!1) > i && (i = e.outerHeight(!1)), o ? e.attr("style", o) : e.css("display", "");
|
119 |
+
});
|
120 |
+
}
|
121 |
+
a.each(function () {
|
122 |
+
var e = t(this),
|
123 |
+
o = 0;
|
124 |
+
s.target && e.is(s.target) || ("border-box" !== e.css("box-sizing") && (o += n(e.css("border-top-width")) + n(e.css("border-bottom-width")), o += n(e.css("padding-top")) + n(e.css("padding-bottom"))), e.css(s.property, i - o + "px"));
|
125 |
+
});
|
126 |
+
}), u.each(function () {
|
127 |
+
var e = t(this);
|
128 |
+
e.attr("style", e.data("style-cache") || null);
|
129 |
+
}), r._maintainScroll && t(window).scrollTop(c / p * t("html").outerHeight(!0)), this;
|
130 |
+
}, r._applyDataApi = function () {
|
131 |
+
var e = {};
|
132 |
+
t("[data-match-height], [data-mh]").each(function () {
|
133 |
+
var o = t(this),
|
134 |
+
n = o.attr("data-mh") || o.attr("data-match-height");
|
135 |
+
n in e ? e[n] = e[n].add(o) : e[n] = o;
|
136 |
+
}), t.each(e, function () {
|
137 |
+
this.matchHeight(!0);
|
138 |
+
});
|
139 |
+
};
|
140 |
+
|
141 |
+
var s = function s(e) {
|
142 |
+
r._beforeUpdate && r._beforeUpdate(e, r._groups), t.each(r._groups, function () {
|
143 |
+
r._apply(this.elements, this.options);
|
144 |
+
}), r._afterUpdate && r._afterUpdate(e, r._groups);
|
145 |
+
};
|
146 |
+
|
147 |
+
r._update = function (n, a) {
|
148 |
+
if (a && "resize" === a.type) {
|
149 |
+
var i = t(window).width();
|
150 |
+
if (i === e) return;
|
151 |
+
e = i;
|
152 |
+
}
|
153 |
+
|
154 |
+
n ? o === -1 && (o = setTimeout(function () {
|
155 |
+
s(a), o = -1;
|
156 |
+
}, r._throttle)) : s(a);
|
157 |
+
}, t(r._applyDataApi);
|
158 |
+
var h = t.fn.on ? "on" : "bind";
|
159 |
+
t(window)[h]("load", function (t) {
|
160 |
+
r._update(!1, t);
|
161 |
+
}), t(window)[h]("resize orientationchange", function (t) {
|
162 |
+
r._update(!0, t);
|
163 |
+
});
|
164 |
+
});
|
165 |
|
166 |
|
167 |
/* ================== admin/assets/js/src/plugins/jquery.matchHeight-min.js =================== */
|
admin/assets/js/solo/dist/statistics.dev.js
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use strict";
|
2 |
+
|
3 |
+
/**
|
4 |
+
* wp ulike admin statistics
|
5 |
+
*/
|
6 |
+
(function ($) {
|
7 |
+
$(".wp_ulike_delete").click(function (e) {
|
8 |
+
e.preventDefault();
|
9 |
+
var parent = $(this).closest("tr");
|
10 |
+
var value = $(this).data("id");
|
11 |
+
var table = $(this).data("table");
|
12 |
+
var nonce = $(this).data("nonce");
|
13 |
+
var r = confirm(wp_ulike_admin.logs_notif);
|
14 |
+
|
15 |
+
if (r === true) {
|
16 |
+
jQuery.ajax({
|
17 |
+
type: "POST",
|
18 |
+
url: ajaxurl,
|
19 |
+
data: {
|
20 |
+
action: "ulikelogs",
|
21 |
+
id: value,
|
22 |
+
nonce: nonce,
|
23 |
+
table: table
|
24 |
+
},
|
25 |
+
beforeSend: function beforeSend() {
|
26 |
+
parent.css("background-color", "#fff59d");
|
27 |
+
},
|
28 |
+
success: function success(response) {
|
29 |
+
if (response.success) {
|
30 |
+
parent.fadeOut(300);
|
31 |
+
} else {
|
32 |
+
parent.css("background-color", "#ef9a9a");
|
33 |
+
}
|
34 |
+
}
|
35 |
+
});
|
36 |
+
}
|
37 |
+
});
|
38 |
+
|
39 |
+
$.fn.WpUlikeAjaxStats = function () {
|
40 |
+
// local var
|
41 |
+
var theResponse = null; // jQuery ajax
|
42 |
+
|
43 |
+
$.ajax({
|
44 |
+
type: "POST",
|
45 |
+
dataType: "json",
|
46 |
+
url: ajaxurl,
|
47 |
+
async: false,
|
48 |
+
data: {
|
49 |
+
action: "wp_ulike_ajax_stats",
|
50 |
+
nonce: wp_ulike_admin.nonce_field
|
51 |
+
},
|
52 |
+
success: function success(response) {
|
53 |
+
if (response.success) {
|
54 |
+
theResponse = JSON.parse(response.data);
|
55 |
+
} else {
|
56 |
+
theResponse = null;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}); // Return the response text
|
60 |
+
|
61 |
+
return theResponse;
|
62 |
+
}; // Charts stack array to save data
|
63 |
+
|
64 |
+
|
65 |
+
window.wpUlikechartsInfo = [];
|
66 |
+
|
67 |
+
if (wp_ulike_admin.hook_address.indexOf("wp-ulike-statistics") !== -1) {
|
68 |
+
// Get all tables data
|
69 |
+
window.wpUlikeAjaxDataset = $.fn.WpUlikeAjaxStats();
|
70 |
+
|
71 |
+
if (window.wpUlikeAjaxDataset === null) {
|
72 |
+
return;
|
73 |
+
} // Get single var component
|
74 |
+
|
75 |
+
|
76 |
+
Vue.component("get-var", {
|
77 |
+
props: ["dataset"],
|
78 |
+
data: function data() {
|
79 |
+
return {
|
80 |
+
output: "..."
|
81 |
+
};
|
82 |
+
},
|
83 |
+
mounted: function mounted() {
|
84 |
+
this.output = this.fetchData(); // Remove spinner class
|
85 |
+
|
86 |
+
this.$nextTick(function () {
|
87 |
+
this.removeClass(this.$el.offsetParent);
|
88 |
+
});
|
89 |
+
},
|
90 |
+
methods: {
|
91 |
+
fetchData: function fetchData() {
|
92 |
+
return window.wpUlikeAjaxDataset[this.dataset];
|
93 |
+
},
|
94 |
+
removeClass: function removeClass(element) {
|
95 |
+
element.classList.remove("wp-ulike-is-loading");
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}); // Get charts object component
|
99 |
+
|
100 |
+
Vue.component("get-chart", {
|
101 |
+
props: ["dataset", "identify", "type"],
|
102 |
+
mounted: function mounted() {
|
103 |
+
if (this.type == "line") {
|
104 |
+
this.planetChartData = this.fetchData();
|
105 |
+
this.createLineChart(this.planetChartData);
|
106 |
+
} else {
|
107 |
+
this.createPieChart();
|
108 |
+
} // Remove spinner class
|
109 |
+
|
110 |
+
|
111 |
+
this.$nextTick(function () {
|
112 |
+
this.removeClass(this.$el.offsetParent);
|
113 |
+
});
|
114 |
+
},
|
115 |
+
methods: {
|
116 |
+
fetchData: function fetchData() {
|
117 |
+
return window.wpUlikeAjaxDataset[this.dataset];
|
118 |
+
},
|
119 |
+
createLineChart: function createLineChart(chartData) {
|
120 |
+
// Push data stats in dataset options
|
121 |
+
chartData.options["data"] = chartData.data; // And finally draw it
|
122 |
+
|
123 |
+
this.drawChart({
|
124 |
+
// The type of chart we want to create
|
125 |
+
type: "line",
|
126 |
+
// The data for our dataset
|
127 |
+
data: {
|
128 |
+
labels: chartData.label,
|
129 |
+
datasets: [chartData.options]
|
130 |
+
}
|
131 |
+
}); // Set info for this canvas
|
132 |
+
|
133 |
+
this.setInfo(chartData);
|
134 |
+
},
|
135 |
+
createPieChart: function createPieChart() {
|
136 |
+
// Define stack variables
|
137 |
+
var pieData = [],
|
138 |
+
pieBackground = [],
|
139 |
+
pieLabels = []; // Get the info of each chart
|
140 |
+
|
141 |
+
window.wpUlikechartsInfo.forEach(function (value, key) {
|
142 |
+
pieData.push(value.sum);
|
143 |
+
pieBackground.push(value.background);
|
144 |
+
pieLabels.push(value.label);
|
145 |
+
}); // And finally draw it
|
146 |
+
|
147 |
+
this.drawChart({
|
148 |
+
// The type of chart we want to create
|
149 |
+
type: "pie",
|
150 |
+
// The data for our dataset
|
151 |
+
data: {
|
152 |
+
datasets: [{
|
153 |
+
data: pieData,
|
154 |
+
backgroundColor: pieBackground
|
155 |
+
}],
|
156 |
+
// These labels appear in the legend and in the tooltips when hovering different arcs
|
157 |
+
labels: pieLabels
|
158 |
+
}
|
159 |
+
});
|
160 |
+
},
|
161 |
+
drawChart: function drawChart(chartArgs) {
|
162 |
+
// Get canvas element
|
163 |
+
var ctx = document.getElementById(this.identify); // Draw Chart
|
164 |
+
|
165 |
+
var chart = new Chart(ctx, chartArgs);
|
166 |
+
},
|
167 |
+
setInfo: function setInfo(chartData) {
|
168 |
+
var sumStack = 0; // Get the sum of total likes
|
169 |
+
|
170 |
+
chartData.data.forEach(function (num) {
|
171 |
+
sumStack += parseFloat(num) || 0;
|
172 |
+
}); // Upgrade wpUlikechartsInfo array
|
173 |
+
|
174 |
+
window.wpUlikechartsInfo.push({
|
175 |
+
type: this.identify,
|
176 |
+
sum: sumStack,
|
177 |
+
label: chartData.options.label,
|
178 |
+
background: chartData.options.backgroundColor
|
179 |
+
});
|
180 |
+
},
|
181 |
+
removeClass: function removeClass(element) {
|
182 |
+
element.classList.remove("wp-ulike-is-loading");
|
183 |
+
}
|
184 |
+
}
|
185 |
+
});
|
186 |
+
new Vue({
|
187 |
+
el: "#wp-ulike-stats-app"
|
188 |
+
});
|
189 |
+
} // on document ready
|
190 |
+
|
191 |
+
|
192 |
+
$(function () {
|
193 |
+
$(".wp-ulike-match-height").matchHeight();
|
194 |
+
});
|
195 |
+
})(jQuery);
|
admin/assets/js/solo/vue/vue.js
CHANGED
@@ -1,4544 +1,3559 @@
|
|
1 |
/*!
|
2 |
-
* Vue.js v2.
|
3 |
-
* (c) 2014-
|
4 |
* Released under the MIT License.
|
5 |
*/
|
6 |
(function (global, factory) {
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
}(this,
|
11 |
|
12 |
-
/* */
|
13 |
|
14 |
-
var emptyObject = Object.freeze({});
|
15 |
|
16 |
-
//
|
17 |
-
// explicitness and function inlining
|
18 |
-
function isUndef (v) {
|
19 |
-
|
20 |
-
}
|
21 |
-
|
22 |
-
function isDef (v) {
|
23 |
-
return v !== undefined && v !== null
|
24 |
-
}
|
25 |
-
|
26 |
-
function isTrue (v) {
|
27 |
-
return v === true
|
28 |
-
}
|
29 |
-
|
30 |
-
function isFalse (v) {
|
31 |
-
return v === false
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Check if value is primitive
|
36 |
-
*/
|
37 |
-
function isPrimitive (value) {
|
38 |
-
return (
|
39 |
-
typeof value === 'string' ||
|
40 |
-
typeof value === 'number' ||
|
41 |
-
// $flow-disable-line
|
42 |
-
typeof value === 'symbol' ||
|
43 |
-
typeof value === 'boolean'
|
44 |
-
)
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Quick object check - this is primarily used to tell
|
49 |
-
* Objects from primitive values when we know the value
|
50 |
-
* is a JSON-compliant type.
|
51 |
-
*/
|
52 |
-
function isObject (obj) {
|
53 |
-
return obj !== null && typeof obj === 'object'
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Get the raw type string of a value e.g. [object Object]
|
58 |
-
*/
|
59 |
-
var _toString = Object.prototype.toString;
|
60 |
-
|
61 |
-
function toRawType (value) {
|
62 |
-
return _toString.call(value).slice(8, -1)
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Strict object type check. Only returns true
|
67 |
-
* for plain JavaScript objects.
|
68 |
-
*/
|
69 |
-
function isPlainObject (obj) {
|
70 |
-
return _toString.call(obj) === '[object Object]'
|
71 |
-
}
|
72 |
-
|
73 |
-
function isRegExp (v) {
|
74 |
-
return _toString.call(v) === '[object RegExp]'
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Check if val is a valid array index.
|
79 |
-
*/
|
80 |
-
function isValidArrayIndex (val) {
|
81 |
-
var n = parseFloat(String(val));
|
82 |
-
return n >= 0 && Math.floor(n) === n && isFinite(val)
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Convert a value to a string that is actually rendered.
|
87 |
-
*/
|
88 |
-
function toString (val) {
|
89 |
-
return val == null
|
90 |
-
? ''
|
91 |
-
: typeof val === 'object'
|
92 |
-
? JSON.stringify(val, null, 2)
|
93 |
-
: String(val)
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Convert a input value to a number for persistence.
|
98 |
-
* If the conversion fails, return original string.
|
99 |
-
*/
|
100 |
-
function toNumber (val) {
|
101 |
-
var n = parseFloat(val);
|
102 |
-
return isNaN(n) ? val : n
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Make a map and return a function for checking if a key
|
107 |
-
* is in that map.
|
108 |
-
*/
|
109 |
-
function makeMap (
|
110 |
-
str,
|
111 |
-
expectsLowerCase
|
112 |
-
) {
|
113 |
-
var map = Object.create(null);
|
114 |
-
var list = str.split(',');
|
115 |
-
for (var i = 0; i < list.length; i++) {
|
116 |
-
map[list[i]] = true;
|
117 |
-
}
|
118 |
-
return expectsLowerCase
|
119 |
-
? function (val) { return map[val.toLowerCase()]; }
|
120 |
-
: function (val) { return map[val]; }
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Check if a tag is a built-in tag.
|
125 |
-
*/
|
126 |
-
var isBuiltInTag = makeMap('slot,component', true);
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Check if a attribute is a reserved attribute.
|
130 |
-
*/
|
131 |
-
var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
|
132 |
-
|
133 |
-
/**
|
134 |
-
* Remove an item from an array
|
135 |
-
*/
|
136 |
-
function remove (arr, item) {
|
137 |
-
if (arr.length) {
|
138 |
-
var index = arr.indexOf(item);
|
139 |
-
if (index > -1) {
|
140 |
-
return arr.splice(index, 1)
|
141 |
-
}
|
142 |
}
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Check whether the object has the property.
|
147 |
-
*/
|
148 |
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
149 |
-
function hasOwn (obj, key) {
|
150 |
-
return hasOwnProperty.call(obj, key)
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Create a cached version of a pure function.
|
155 |
-
*/
|
156 |
-
function cached (fn) {
|
157 |
-
var cache = Object.create(null);
|
158 |
-
return (function cachedFn (str) {
|
159 |
-
var hit = cache[str];
|
160 |
-
return hit || (cache[str] = fn(str))
|
161 |
-
})
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Camelize a hyphen-delimited string.
|
166 |
-
*/
|
167 |
-
var camelizeRE = /-(\w)/g;
|
168 |
-
var camelize = cached(function (str) {
|
169 |
-
return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
|
170 |
-
});
|
171 |
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
var capitalize = cached(function (str) {
|
176 |
-
return str.charAt(0).toUpperCase() + str.slice(1)
|
177 |
-
});
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
var hyphenateRE = /\B([A-Z])/g;
|
183 |
-
var hyphenate = cached(function (str) {
|
184 |
-
return str.replace(hyphenateRE, '-$1').toLowerCase()
|
185 |
-
});
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Simple bind polyfill for environments that do not support it... e.g.
|
189 |
-
* PhantomJS 1.x. Technically we don't need this anymore since native bind is
|
190 |
-
* now more performant in most browsers, but removing it would be breaking for
|
191 |
-
* code that was able to run in PhantomJS 1.x, so this must be kept for
|
192 |
-
* backwards compatibility.
|
193 |
-
*/
|
194 |
|
195 |
-
|
196 |
-
|
197 |
-
function boundFn (a) {
|
198 |
-
var l = arguments.length;
|
199 |
-
return l
|
200 |
-
? l > 1
|
201 |
-
? fn.apply(ctx, arguments)
|
202 |
-
: fn.call(ctx, a)
|
203 |
-
: fn.call(ctx)
|
204 |
}
|
205 |
|
206 |
-
|
207 |
-
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
213 |
|
214 |
-
|
215 |
-
|
216 |
-
|
|
|
217 |
|
218 |
-
|
219 |
-
|
220 |
-
*/
|
221 |
-
function toArray (list, start) {
|
222 |
-
start = start || 0;
|
223 |
-
var i = list.length - start;
|
224 |
-
var ret = new Array(i);
|
225 |
-
while (i--) {
|
226 |
-
ret[i] = list[i + start];
|
227 |
-
}
|
228 |
-
return ret
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Mix properties into target object.
|
233 |
-
*/
|
234 |
-
function extend (to, _from) {
|
235 |
-
for (var key in _from) {
|
236 |
-
to[key] = _from[key];
|
237 |
}
|
238 |
-
return to
|
239 |
-
}
|
240 |
|
241 |
-
/**
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
if (arr[i]) {
|
248 |
-
extend(res, arr[i]);
|
249 |
-
}
|
250 |
}
|
251 |
-
return res
|
252 |
-
}
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
* with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
|
258 |
-
*/
|
259 |
-
function noop (a, b, c) {}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Always return false.
|
263 |
-
*/
|
264 |
-
var no = function (a, b, c) { return false; };
|
265 |
|
266 |
-
/**
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
}, []).join(',')
|
278 |
-
}
|
279 |
-
|
280 |
-
/**
|
281 |
-
* Check if two values are loosely equal - that is,
|
282 |
-
* if they are plain objects, do they have the same shape?
|
283 |
-
*/
|
284 |
-
function looseEqual (a, b) {
|
285 |
-
if (a === b) { return true }
|
286 |
-
var isObjectA = isObject(a);
|
287 |
-
var isObjectB = isObject(b);
|
288 |
-
if (isObjectA && isObjectB) {
|
289 |
-
try {
|
290 |
-
var isArrayA = Array.isArray(a);
|
291 |
-
var isArrayB = Array.isArray(b);
|
292 |
-
if (isArrayA && isArrayB) {
|
293 |
-
return a.length === b.length && a.every(function (e, i) {
|
294 |
-
return looseEqual(e, b[i])
|
295 |
-
})
|
296 |
-
} else if (!isArrayA && !isArrayB) {
|
297 |
-
var keysA = Object.keys(a);
|
298 |
-
var keysB = Object.keys(b);
|
299 |
-
return keysA.length === keysB.length && keysA.every(function (key) {
|
300 |
-
return looseEqual(a[key], b[key])
|
301 |
-
})
|
302 |
-
} else {
|
303 |
-
/* istanbul ignore next */
|
304 |
-
return false
|
305 |
-
}
|
306 |
-
} catch (e) {
|
307 |
-
/* istanbul ignore next */
|
308 |
-
return false
|
309 |
-
}
|
310 |
-
} else if (!isObjectA && !isObjectB) {
|
311 |
-
return String(a) === String(b)
|
312 |
-
} else {
|
313 |
-
return false
|
314 |
}
|
315 |
-
}
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
}
|
321 |
-
return -1
|
322 |
-
}
|
323 |
|
324 |
-
/**
|
325 |
-
* Ensure a function is called only once.
|
326 |
-
*/
|
327 |
-
function once (fn) {
|
328 |
-
var called = false;
|
329 |
-
return function () {
|
330 |
-
if (!called) {
|
331 |
-
called = true;
|
332 |
-
fn.apply(this, arguments);
|
333 |
-
}
|
334 |
-
}
|
335 |
-
}
|
336 |
-
|
337 |
-
var SSR_ATTR = 'data-server-rendered';
|
338 |
-
|
339 |
-
var ASSET_TYPES = [
|
340 |
-
'component',
|
341 |
-
'directive',
|
342 |
-
'filter'
|
343 |
-
];
|
344 |
-
|
345 |
-
var LIFECYCLE_HOOKS = [
|
346 |
-
'beforeCreate',
|
347 |
-
'created',
|
348 |
-
'beforeMount',
|
349 |
-
'mounted',
|
350 |
-
'beforeUpdate',
|
351 |
-
'updated',
|
352 |
-
'beforeDestroy',
|
353 |
-
'destroyed',
|
354 |
-
'activated',
|
355 |
-
'deactivated',
|
356 |
-
'errorCaptured'
|
357 |
-
];
|
358 |
-
|
359 |
-
/* */
|
360 |
-
|
361 |
-
var config = ({
|
362 |
/**
|
363 |
-
*
|
|
|
364 |
*/
|
365 |
-
|
366 |
-
|
|
|
|
|
367 |
|
368 |
/**
|
369 |
-
*
|
|
|
370 |
*/
|
371 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
|
373 |
/**
|
374 |
-
*
|
375 |
*/
|
376 |
-
|
377 |
|
378 |
/**
|
379 |
-
*
|
380 |
*/
|
381 |
-
|
382 |
|
383 |
/**
|
384 |
-
*
|
385 |
*/
|
386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
|
388 |
/**
|
389 |
-
*
|
390 |
*/
|
391 |
-
|
|
|
|
|
|
|
392 |
|
393 |
/**
|
394 |
-
*
|
395 |
*/
|
396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
|
398 |
/**
|
399 |
-
*
|
400 |
*/
|
401 |
-
|
|
|
|
|
|
|
402 |
|
403 |
/**
|
404 |
-
*
|
405 |
*/
|
406 |
-
|
407 |
-
|
|
|
408 |
|
409 |
/**
|
410 |
-
*
|
411 |
-
* component. This is platform-dependent and may be overwritten.
|
412 |
*/
|
413 |
-
|
|
|
|
|
|
|
414 |
|
415 |
/**
|
416 |
-
*
|
417 |
-
*
|
|
|
|
|
|
|
418 |
*/
|
419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
|
421 |
/**
|
422 |
-
*
|
423 |
-
* Platform-dependent.
|
424 |
*/
|
425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
|
427 |
/**
|
428 |
-
*
|
429 |
*/
|
430 |
-
|
|
|
|
|
|
|
|
|
|
|
431 |
|
432 |
/**
|
433 |
-
*
|
434 |
*/
|
435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
436 |
|
437 |
/**
|
438 |
-
*
|
439 |
-
*
|
|
|
440 |
*/
|
441 |
-
|
442 |
|
443 |
/**
|
444 |
-
*
|
445 |
*/
|
446 |
-
|
447 |
-
})
|
448 |
|
449 |
-
/*
|
450 |
|
451 |
-
/**
|
452 |
-
|
453 |
-
|
454 |
-
function
|
455 |
-
var c = (str + '').charCodeAt(0);
|
456 |
-
return c === 0x24 || c === 0x5F
|
457 |
-
}
|
458 |
|
459 |
-
/**
|
460 |
-
|
461 |
-
|
462 |
-
function
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
configurable: true
|
468 |
-
});
|
469 |
-
}
|
470 |
|
471 |
-
/**
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
function
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
}
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
501 |
-
var isEdge = UA && UA.indexOf('edge/') > 0;
|
502 |
-
var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
|
503 |
-
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
|
504 |
-
var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
|
505 |
-
|
506 |
-
// Firefox has a "watch" function on Object.prototype...
|
507 |
-
var nativeWatch = ({}).watch;
|
508 |
-
|
509 |
-
var supportsPassive = false;
|
510 |
-
if (inBrowser) {
|
511 |
-
try {
|
512 |
-
var opts = {};
|
513 |
-
Object.defineProperty(opts, 'passive', ({
|
514 |
-
get: function get () {
|
515 |
/* istanbul ignore next */
|
516 |
-
|
517 |
-
}
|
518 |
-
})
|
519 |
-
|
520 |
-
} catch (e) {}
|
521 |
-
}
|
522 |
-
|
523 |
-
// this needs to be lazy-evaled because vue may be required before
|
524 |
-
// vue-server-renderer can set VUE_ENV
|
525 |
-
var _isServer;
|
526 |
-
var isServerRendering = function () {
|
527 |
-
if (_isServer === undefined) {
|
528 |
-
/* istanbul ignore if */
|
529 |
-
if (!inBrowser && !inWeex && typeof global !== 'undefined') {
|
530 |
-
// detect presence of vue-server-renderer and avoid
|
531 |
-
// Webpack shimming the process
|
532 |
-
_isServer = global['process'].env.VUE_ENV === 'server';
|
533 |
} else {
|
534 |
-
|
535 |
}
|
536 |
}
|
537 |
-
return _isServer
|
538 |
-
};
|
539 |
|
540 |
-
|
541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
|
543 |
-
|
544 |
-
function
|
545 |
-
|
546 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
|
548 |
-
var
|
549 |
-
typeof Symbol !== 'undefined' && isNative(Symbol) &&
|
550 |
-
typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
|
551 |
|
552 |
-
var
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
} else {
|
558 |
-
// a non-standard Set polyfill that only works with primitive keys.
|
559 |
-
_Set = (function () {
|
560 |
-
function Set () {
|
561 |
-
this.set = Object.create(null);
|
562 |
-
}
|
563 |
-
Set.prototype.has = function has (key) {
|
564 |
-
return this.set[key] === true
|
565 |
-
};
|
566 |
-
Set.prototype.add = function add (key) {
|
567 |
-
this.set[key] = true;
|
568 |
-
};
|
569 |
-
Set.prototype.clear = function clear () {
|
570 |
-
this.set = Object.create(null);
|
571 |
-
};
|
572 |
|
573 |
-
|
574 |
-
|
575 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
|
577 |
-
/* */
|
578 |
|
579 |
-
var warn = noop;
|
580 |
-
var tip = noop;
|
581 |
-
var generateComponentTrace = (noop); // work around flow check
|
582 |
-
var formatComponentName = (noop);
|
583 |
|
584 |
-
{
|
585 |
-
var hasConsole = typeof console !== 'undefined';
|
586 |
-
var classifyRE = /(?:^|[-_])(\w)/g;
|
587 |
-
var classify = function (str) { return str
|
588 |
-
.replace(classifyRE, function (c) { return c.toUpperCase(); })
|
589 |
-
.replace(/[-_]/g, ''); };
|
590 |
|
591 |
-
|
592 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
|
594 |
-
|
595 |
-
config.warnHandler.call(null, msg, vm, trace);
|
596 |
-
} else if (hasConsole && (!config.silent)) {
|
597 |
-
console.error(("[Vue warn]: " + msg + trace));
|
598 |
-
}
|
599 |
-
};
|
600 |
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
};
|
608 |
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
var
|
614 |
-
|
615 |
-
|
616 |
-
? vm.$options || vm.constructor.options
|
617 |
-
: vm || {};
|
618 |
-
var name = options.name || options._componentTag;
|
619 |
-
var file = options.__file;
|
620 |
-
if (!name && file) {
|
621 |
-
var match = file.match(/([^/\\]+)\.vue$/);
|
622 |
-
name = match && match[1];
|
623 |
-
}
|
624 |
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
|
|
637 |
}
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
var tree = [];
|
644 |
-
var currentRecursiveSequence = 0;
|
645 |
-
while (vm) {
|
646 |
-
if (tree.length > 0) {
|
647 |
-
var last = tree[tree.length - 1];
|
648 |
-
if (last.constructor === vm.constructor) {
|
649 |
-
currentRecursiveSequence++;
|
650 |
-
vm = vm.$parent;
|
651 |
-
continue
|
652 |
-
} else if (currentRecursiveSequence > 0) {
|
653 |
-
tree[tree.length - 1] = [last, currentRecursiveSequence];
|
654 |
-
currentRecursiveSequence = 0;
|
655 |
-
}
|
656 |
-
}
|
657 |
-
tree.push(vm);
|
658 |
-
vm = vm.$parent;
|
659 |
}
|
660 |
-
return
|
661 |
-
.map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
|
662 |
-
? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
|
663 |
-
: formatComponentName(vm))); })
|
664 |
-
.join('\n')
|
665 |
-
} else {
|
666 |
-
return ("\n\n(found in " + (formatComponentName(vm)) + ")")
|
667 |
}
|
668 |
-
}
|
669 |
-
}
|
670 |
|
671 |
-
/* */
|
672 |
|
|
|
|
|
673 |
|
674 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
|
676 |
-
|
677 |
-
|
678 |
-
* directives subscribing to it.
|
679 |
-
*/
|
680 |
-
var Dep = function Dep () {
|
681 |
-
this.id = uid++;
|
682 |
-
this.subs = [];
|
683 |
-
};
|
684 |
-
|
685 |
-
Dep.prototype.addSub = function addSub (sub) {
|
686 |
-
this.subs.push(sub);
|
687 |
-
};
|
688 |
-
|
689 |
-
Dep.prototype.removeSub = function removeSub (sub) {
|
690 |
-
remove(this.subs, sub);
|
691 |
-
};
|
692 |
-
|
693 |
-
Dep.prototype.depend = function depend () {
|
694 |
-
if (Dep.target) {
|
695 |
-
Dep.target.addDep(this);
|
696 |
-
}
|
697 |
-
};
|
698 |
-
|
699 |
-
Dep.prototype.notify = function notify () {
|
700 |
-
// stabilize the subscriber list first
|
701 |
-
var subs = this.subs.slice();
|
702 |
-
for (var i = 0, l = subs.length; i < l; i++) {
|
703 |
-
subs[i].update();
|
704 |
-
}
|
705 |
-
};
|
706 |
-
|
707 |
-
// the current target watcher being evaluated.
|
708 |
-
// this is globally unique because there could be only one
|
709 |
-
// watcher being evaluated at any time.
|
710 |
-
Dep.target = null;
|
711 |
-
var targetStack = [];
|
712 |
-
|
713 |
-
function pushTarget (_target) {
|
714 |
-
if (Dep.target) { targetStack.push(Dep.target); }
|
715 |
-
Dep.target = _target;
|
716 |
-
}
|
717 |
-
|
718 |
-
function popTarget () {
|
719 |
-
Dep.target = targetStack.pop();
|
720 |
-
}
|
721 |
-
|
722 |
-
/* */
|
723 |
-
|
724 |
-
var VNode = function VNode (
|
725 |
-
tag,
|
726 |
-
data,
|
727 |
-
children,
|
728 |
-
text,
|
729 |
-
elm,
|
730 |
-
context,
|
731 |
-
componentOptions,
|
732 |
-
asyncFactory
|
733 |
-
) {
|
734 |
-
this.tag = tag;
|
735 |
-
this.data = data;
|
736 |
-
this.children = children;
|
737 |
-
this.text = text;
|
738 |
-
this.elm = elm;
|
739 |
-
this.ns = undefined;
|
740 |
-
this.context = context;
|
741 |
-
this.fnContext = undefined;
|
742 |
-
this.fnOptions = undefined;
|
743 |
-
this.fnScopeId = undefined;
|
744 |
-
this.key = data && data.key;
|
745 |
-
this.componentOptions = componentOptions;
|
746 |
-
this.componentInstance = undefined;
|
747 |
-
this.parent = undefined;
|
748 |
-
this.raw = false;
|
749 |
-
this.isStatic = false;
|
750 |
-
this.isRootInsert = true;
|
751 |
-
this.isComment = false;
|
752 |
-
this.isCloned = false;
|
753 |
-
this.isOnce = false;
|
754 |
-
this.asyncFactory = asyncFactory;
|
755 |
-
this.asyncMeta = undefined;
|
756 |
-
this.isAsyncPlaceholder = false;
|
757 |
-
};
|
758 |
-
|
759 |
-
var prototypeAccessors = { child: { configurable: true } };
|
760 |
-
|
761 |
-
// DEPRECATED: alias for componentInstance for backwards compat.
|
762 |
-
/* istanbul ignore next */
|
763 |
-
prototypeAccessors.child.get = function () {
|
764 |
-
return this.componentInstance
|
765 |
-
};
|
766 |
-
|
767 |
-
Object.defineProperties( VNode.prototype, prototypeAccessors );
|
768 |
-
|
769 |
-
var createEmptyVNode = function (text) {
|
770 |
-
if ( text === void 0 ) text = '';
|
771 |
-
|
772 |
-
var node = new VNode();
|
773 |
-
node.text = text;
|
774 |
-
node.isComment = true;
|
775 |
-
return node
|
776 |
-
};
|
777 |
-
|
778 |
-
function createTextVNode (val) {
|
779 |
-
return new VNode(undefined, undefined, undefined, String(val))
|
780 |
-
}
|
781 |
-
|
782 |
-
// optimized shallow clone
|
783 |
-
// used for static nodes and slot nodes because they may be reused across
|
784 |
-
// multiple renders, cloning them avoids errors when DOM manipulations rely
|
785 |
-
// on their elm reference.
|
786 |
-
function cloneVNode (vnode) {
|
787 |
-
var cloned = new VNode(
|
788 |
-
vnode.tag,
|
789 |
-
vnode.data,
|
790 |
-
vnode.children,
|
791 |
-
vnode.text,
|
792 |
-
vnode.elm,
|
793 |
-
vnode.context,
|
794 |
-
vnode.componentOptions,
|
795 |
-
vnode.asyncFactory
|
796 |
-
);
|
797 |
-
cloned.ns = vnode.ns;
|
798 |
-
cloned.isStatic = vnode.isStatic;
|
799 |
-
cloned.key = vnode.key;
|
800 |
-
cloned.isComment = vnode.isComment;
|
801 |
-
cloned.fnContext = vnode.fnContext;
|
802 |
-
cloned.fnOptions = vnode.fnOptions;
|
803 |
-
cloned.fnScopeId = vnode.fnScopeId;
|
804 |
-
cloned.isCloned = true;
|
805 |
-
return cloned
|
806 |
-
}
|
807 |
-
|
808 |
-
/*
|
809 |
-
* not type checking this file because flow doesn't play well with
|
810 |
-
* dynamically accessing methods on Array prototype
|
811 |
-
*/
|
812 |
|
813 |
-
var
|
814 |
-
|
815 |
-
|
816 |
-
var
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
/**
|
827 |
-
* Intercept mutating methods and emit events
|
828 |
-
*/
|
829 |
-
methodsToPatch.forEach(function (method) {
|
830 |
-
// cache original method
|
831 |
-
var original = arrayProto[method];
|
832 |
-
def(arrayMethods, method, function mutator () {
|
833 |
-
var args = [], len = arguments.length;
|
834 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
835 |
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
|
|
|
|
847 |
}
|
848 |
-
|
849 |
-
|
850 |
-
ob.dep.notify();
|
851 |
-
return result
|
852 |
-
});
|
853 |
-
});
|
854 |
-
|
855 |
-
/* */
|
856 |
|
857 |
-
|
|
|
858 |
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
var shouldObserve = true;
|
864 |
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
*/
|
875 |
-
var Observer = function Observer (value) {
|
876 |
-
this.value = value;
|
877 |
-
this.dep = new Dep();
|
878 |
-
this.vmCount = 0;
|
879 |
-
def(value, '__ob__', this);
|
880 |
-
if (Array.isArray(value)) {
|
881 |
-
var augment = hasProto
|
882 |
-
? protoAugment
|
883 |
-
: copyAugment;
|
884 |
-
augment(value, arrayMethods, arrayKeys);
|
885 |
-
this.observeArray(value);
|
886 |
} else {
|
887 |
-
|
888 |
-
|
889 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
890 |
|
891 |
-
|
892 |
-
|
893 |
-
* getter/setters. This method should only be called when
|
894 |
-
* value type is Object.
|
895 |
-
*/
|
896 |
-
Observer.prototype.walk = function walk (obj) {
|
897 |
-
var keys = Object.keys(obj);
|
898 |
-
for (var i = 0; i < keys.length; i++) {
|
899 |
-
defineReactive(obj, keys[i]);
|
900 |
}
|
901 |
-
};
|
902 |
|
903 |
-
|
904 |
-
* Observe a list of Array items.
|
905 |
-
*/
|
906 |
-
Observer.prototype.observeArray = function observeArray (items) {
|
907 |
-
for (var i = 0, l = items.length; i < l; i++) {
|
908 |
-
observe(items[i]);
|
909 |
-
}
|
910 |
-
};
|
911 |
|
912 |
-
|
|
|
|
|
|
|
913 |
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
function
|
919 |
-
|
920 |
-
target.__proto__ = src;
|
921 |
-
/* eslint-enable no-proto */
|
922 |
-
}
|
923 |
-
|
924 |
-
/**
|
925 |
-
* Augment an target Object or Array by defining
|
926 |
-
* hidden properties.
|
927 |
-
*/
|
928 |
-
/* istanbul ignore next */
|
929 |
-
function copyAugment (target, src, keys) {
|
930 |
-
for (var i = 0, l = keys.length; i < l; i++) {
|
931 |
-
var key = keys[i];
|
932 |
-
def(target, key, src[key]);
|
933 |
-
}
|
934 |
-
}
|
935 |
-
|
936 |
-
/**
|
937 |
-
* Attempt to create an observer instance for a value,
|
938 |
-
* returns the new observer if successfully observed,
|
939 |
-
* or the existing observer if the value already has one.
|
940 |
-
*/
|
941 |
-
function observe (value, asRootData) {
|
942 |
-
if (!isObject(value) || value instanceof VNode) {
|
943 |
-
return
|
944 |
-
}
|
945 |
-
var ob;
|
946 |
-
if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
|
947 |
-
ob = value.__ob__;
|
948 |
-
} else if (
|
949 |
-
shouldObserve &&
|
950 |
-
!isServerRendering() &&
|
951 |
-
(Array.isArray(value) || isPlainObject(value)) &&
|
952 |
-
Object.isExtensible(value) &&
|
953 |
-
!value._isVue
|
954 |
-
) {
|
955 |
-
ob = new Observer(value);
|
956 |
-
}
|
957 |
-
if (asRootData && ob) {
|
958 |
-
ob.vmCount++;
|
959 |
-
}
|
960 |
-
return ob
|
961 |
-
}
|
962 |
|
963 |
-
|
964 |
-
|
965 |
-
*/
|
966 |
-
function defineReactive (
|
967 |
-
obj,
|
968 |
-
key,
|
969 |
-
val,
|
970 |
-
customSetter,
|
971 |
-
shallow
|
972 |
-
) {
|
973 |
-
var dep = new Dep();
|
974 |
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
|
|
|
|
979 |
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
|
|
986 |
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
999 |
}
|
|
|
|
|
1000 |
}
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
/* eslint-disable no-self-compare */
|
1007 |
-
if (newVal === value || (newVal !== newVal && value !== value)) {
|
1008 |
-
return
|
1009 |
-
}
|
1010 |
-
/* eslint-enable no-self-compare */
|
1011 |
-
if ("development" !== 'production' && customSetter) {
|
1012 |
-
customSetter();
|
1013 |
-
}
|
1014 |
-
if (setter) {
|
1015 |
-
setter.call(obj, newVal);
|
1016 |
} else {
|
1017 |
-
|
1018 |
}
|
1019 |
-
|
1020 |
-
dep.notify();
|
1021 |
-
}
|
1022 |
-
});
|
1023 |
-
}
|
1024 |
-
|
1025 |
-
/**
|
1026 |
-
* Set a property on an object. Adds the new property and
|
1027 |
-
* triggers change notification if the property doesn't
|
1028 |
-
* already exist.
|
1029 |
-
*/
|
1030 |
-
function set (target, key, val) {
|
1031 |
-
if ("development" !== 'production' &&
|
1032 |
-
(isUndef(target) || isPrimitive(target))
|
1033 |
-
) {
|
1034 |
-
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
1035 |
-
}
|
1036 |
-
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
1037 |
-
target.length = Math.max(target.length, key);
|
1038 |
-
target.splice(key, 1, val);
|
1039 |
-
return val
|
1040 |
-
}
|
1041 |
-
if (key in target && !(key in Object.prototype)) {
|
1042 |
-
target[key] = val;
|
1043 |
-
return val
|
1044 |
-
}
|
1045 |
-
var ob = (target).__ob__;
|
1046 |
-
if (target._isVue || (ob && ob.vmCount)) {
|
1047 |
-
"development" !== 'production' && warn(
|
1048 |
-
'Avoid adding reactive properties to a Vue instance or its root $data ' +
|
1049 |
-
'at runtime - declare it upfront in the data option.'
|
1050 |
-
);
|
1051 |
-
return val
|
1052 |
-
}
|
1053 |
-
if (!ob) {
|
1054 |
-
target[key] = val;
|
1055 |
-
return val
|
1056 |
}
|
1057 |
-
defineReactive(ob.value, key, val);
|
1058 |
-
ob.dep.notify();
|
1059 |
-
return val
|
1060 |
-
}
|
1061 |
|
1062 |
-
|
1063 |
-
* Delete a property and trigger change if necessary.
|
1064 |
-
*/
|
1065 |
-
function del (target, key) {
|
1066 |
-
if ("development" !== 'production' &&
|
1067 |
-
(isUndef(target) || isPrimitive(target))
|
1068 |
-
) {
|
1069 |
-
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
1070 |
-
}
|
1071 |
-
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
1072 |
-
target.splice(key, 1);
|
1073 |
-
return
|
1074 |
-
}
|
1075 |
-
var ob = (target).__ob__;
|
1076 |
-
if (target._isVue || (ob && ob.vmCount)) {
|
1077 |
-
"development" !== 'production' && warn(
|
1078 |
-
'Avoid deleting properties on a Vue instance or its root $data ' +
|
1079 |
-
'- just set it to null.'
|
1080 |
-
);
|
1081 |
-
return
|
1082 |
-
}
|
1083 |
-
if (!hasOwn(target, key)) {
|
1084 |
-
return
|
1085 |
-
}
|
1086 |
-
delete target[key];
|
1087 |
-
if (!ob) {
|
1088 |
-
return
|
1089 |
-
}
|
1090 |
-
ob.dep.notify();
|
1091 |
-
}
|
1092 |
|
1093 |
-
|
1094 |
-
* Collect dependencies on array elements when the array is touched, since
|
1095 |
-
* we cannot intercept array element access like property getters.
|
1096 |
-
*/
|
1097 |
-
function dependArray (value) {
|
1098 |
-
for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
|
1099 |
-
e = value[i];
|
1100 |
-
e && e.__ob__ && e.__ob__.dep.depend();
|
1101 |
-
if (Array.isArray(e)) {
|
1102 |
-
dependArray(e);
|
1103 |
-
}
|
1104 |
-
}
|
1105 |
-
}
|
1106 |
|
1107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1108 |
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
* value into the final value.
|
1113 |
-
*/
|
1114 |
-
var strats = config.optionMergeStrategies;
|
1115 |
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
if (
|
1122 |
-
|
1123 |
-
"option \"" + key + "\" can only be used during instance " +
|
1124 |
-
'creation with the `new` keyword.'
|
1125 |
-
);
|
1126 |
}
|
1127 |
-
return defaultStrat(parent, child)
|
1128 |
};
|
1129 |
-
}
|
1130 |
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
key = keys[i];
|
1140 |
-
toVal = to[key];
|
1141 |
-
fromVal = from[key];
|
1142 |
-
if (!hasOwn(to, key)) {
|
1143 |
-
set(to, key, fromVal);
|
1144 |
-
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
|
1145 |
-
mergeData(toVal, fromVal);
|
1146 |
-
}
|
1147 |
-
}
|
1148 |
-
return to
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
/**
|
1152 |
-
* Data
|
1153 |
-
*/
|
1154 |
-
function mergeDataOrFn (
|
1155 |
-
parentVal,
|
1156 |
-
childVal,
|
1157 |
-
vm
|
1158 |
-
) {
|
1159 |
-
if (!vm) {
|
1160 |
-
// in a Vue.extend merge, both should be functions
|
1161 |
-
if (!childVal) {
|
1162 |
-
return parentVal
|
1163 |
-
}
|
1164 |
-
if (!parentVal) {
|
1165 |
-
return childVal
|
1166 |
-
}
|
1167 |
-
// when parentVal & childVal are both present,
|
1168 |
-
// we need to return a function that returns the
|
1169 |
-
// merged result of both functions... no need to
|
1170 |
-
// check if parentVal is a function here because
|
1171 |
-
// it has to be a function to pass previous merges.
|
1172 |
-
return function mergedDataFn () {
|
1173 |
-
return mergeData(
|
1174 |
-
typeof childVal === 'function' ? childVal.call(this, this) : childVal,
|
1175 |
-
typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
|
1176 |
-
)
|
1177 |
}
|
1178 |
-
|
1179 |
-
|
1180 |
-
// instance merge
|
1181 |
-
var instanceData = typeof childVal === 'function'
|
1182 |
-
? childVal.call(vm, vm)
|
1183 |
-
: childVal;
|
1184 |
-
var defaultData = typeof parentVal === 'function'
|
1185 |
-
? parentVal.call(vm, vm)
|
1186 |
-
: parentVal;
|
1187 |
-
if (instanceData) {
|
1188 |
-
return mergeData(instanceData, defaultData)
|
1189 |
-
} else {
|
1190 |
-
return defaultData
|
1191 |
-
}
|
1192 |
}
|
1193 |
-
}
|
1194 |
-
}
|
1195 |
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
if (!vm) {
|
1202 |
-
if (childVal && typeof childVal !== 'function') {
|
1203 |
-
"development" !== 'production' && warn(
|
1204 |
-
'The "data" option should be a function ' +
|
1205 |
-
'that returns a per-instance value in component ' +
|
1206 |
-
'definitions.',
|
1207 |
-
vm
|
1208 |
-
);
|
1209 |
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
}
|
1214 |
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
/**
|
1219 |
-
* Hooks and props are merged as arrays.
|
1220 |
-
*/
|
1221 |
-
function mergeHook (
|
1222 |
-
parentVal,
|
1223 |
-
childVal
|
1224 |
-
) {
|
1225 |
-
return childVal
|
1226 |
-
? parentVal
|
1227 |
-
? parentVal.concat(childVal)
|
1228 |
-
: Array.isArray(childVal)
|
1229 |
-
? childVal
|
1230 |
-
: [childVal]
|
1231 |
-
: parentVal
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
LIFECYCLE_HOOKS.forEach(function (hook) {
|
1235 |
-
strats[hook] = mergeHook;
|
1236 |
-
});
|
1237 |
-
|
1238 |
-
/**
|
1239 |
-
* Assets
|
1240 |
-
*
|
1241 |
-
* When a vm is present (instance creation), we need to do
|
1242 |
-
* a three-way merge between constructor options, instance
|
1243 |
-
* options and parent options.
|
1244 |
-
*/
|
1245 |
-
function mergeAssets (
|
1246 |
-
parentVal,
|
1247 |
-
childVal,
|
1248 |
-
vm,
|
1249 |
-
key
|
1250 |
-
) {
|
1251 |
-
var res = Object.create(parentVal || null);
|
1252 |
-
if (childVal) {
|
1253 |
-
"development" !== 'production' && assertObjectType(key, childVal, vm);
|
1254 |
-
return extend(res, childVal)
|
1255 |
-
} else {
|
1256 |
-
return res
|
1257 |
}
|
1258 |
-
}
|
1259 |
|
1260 |
-
|
1261 |
-
strats[type + 's'] = mergeAssets;
|
1262 |
-
});
|
1263 |
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
*/
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
}
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
}
|
1340 |
-
|
1341 |
-
function validateComponentName (name) {
|
1342 |
-
if (!/^[a-zA-Z][\w-]*$/.test(name)) {
|
1343 |
-
warn(
|
1344 |
-
'Invalid component name: "' + name + '". Component names ' +
|
1345 |
-
'can only contain alphanumeric characters and the hyphen, ' +
|
1346 |
-
'and must start with a letter.'
|
1347 |
-
);
|
1348 |
-
}
|
1349 |
-
if (isBuiltInTag(name) || config.isReservedTag(name)) {
|
1350 |
-
warn(
|
1351 |
-
'Do not use built-in or reserved HTML elements as component ' +
|
1352 |
-
'id: ' + name
|
1353 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1354 |
}
|
1355 |
-
}
|
1356 |
|
1357 |
-
/**
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
name = camelize(val);
|
1372 |
-
res[name] = { type: null };
|
1373 |
} else {
|
1374 |
-
|
1375 |
}
|
|
|
|
|
|
|
1376 |
}
|
1377 |
-
}
|
1378 |
-
for (var key in props) {
|
1379 |
-
val = props[key];
|
1380 |
-
name = camelize(key);
|
1381 |
-
res[name] = isPlainObject(val)
|
1382 |
-
? val
|
1383 |
-
: { type: val };
|
1384 |
-
}
|
1385 |
-
} else {
|
1386 |
-
warn(
|
1387 |
-
"Invalid value for option \"props\": expected an Array or an Object, " +
|
1388 |
-
"but got " + (toRawType(props)) + ".",
|
1389 |
-
vm
|
1390 |
-
);
|
1391 |
-
}
|
1392 |
-
options.props = res;
|
1393 |
-
}
|
1394 |
|
1395 |
-
/**
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
normalized[inject[i]] = { from: inject[i] };
|
1405 |
-
}
|
1406 |
-
} else if (isPlainObject(inject)) {
|
1407 |
-
for (var key in inject) {
|
1408 |
-
var val = inject[key];
|
1409 |
-
normalized[key] = isPlainObject(val)
|
1410 |
-
? extend({ from: key }, val)
|
1411 |
-
: { from: val };
|
1412 |
}
|
1413 |
-
}
|
1414 |
-
warn(
|
1415 |
-
"Invalid value for option \"inject\": expected an Array or an Object, " +
|
1416 |
-
"but got " + (toRawType(inject)) + ".",
|
1417 |
-
vm
|
1418 |
-
);
|
1419 |
-
}
|
1420 |
-
}
|
1421 |
|
1422 |
-
/**
|
1423 |
-
|
1424 |
-
|
1425 |
-
function
|
1426 |
-
|
1427 |
-
|
1428 |
-
for (var key in dirs) {
|
1429 |
-
var def = dirs[key];
|
1430 |
-
if (typeof def === 'function') {
|
1431 |
-
dirs[key] = { bind: def, update: def };
|
1432 |
-
}
|
1433 |
}
|
1434 |
-
}
|
1435 |
-
}
|
1436 |
|
1437 |
-
|
1438 |
-
if (!isPlainObject(value)) {
|
1439 |
-
warn(
|
1440 |
-
"Invalid value for option \"" + name + "\": expected an Object, " +
|
1441 |
-
"but got " + (toRawType(value)) + ".",
|
1442 |
-
vm
|
1443 |
-
);
|
1444 |
-
}
|
1445 |
-
}
|
1446 |
|
1447 |
-
/**
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
function
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
) {
|
1456 |
-
{
|
1457 |
-
checkComponents(child);
|
1458 |
}
|
1459 |
|
1460 |
-
|
1461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1462 |
}
|
1463 |
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
for (var i = 0, l = child.mixins.length; i < l; i++) {
|
1473 |
-
parent = mergeOptions(parent, child.mixins[i], vm);
|
1474 |
}
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
|
|
|
|
1484 |
}
|
|
|
|
|
|
|
|
|
1485 |
}
|
1486 |
-
function mergeField (key) {
|
1487 |
-
var strat = strats[key] || defaultStrat;
|
1488 |
-
options[key] = strat(parent[key], child[key], vm, key);
|
1489 |
-
}
|
1490 |
-
return options
|
1491 |
-
}
|
1492 |
-
|
1493 |
-
/**
|
1494 |
-
* Resolve an asset.
|
1495 |
-
* This function is used because child instances need access
|
1496 |
-
* to assets defined in its ancestor chain.
|
1497 |
-
*/
|
1498 |
-
function resolveAsset (
|
1499 |
-
options,
|
1500 |
-
type,
|
1501 |
-
id,
|
1502 |
-
warnMissing
|
1503 |
-
) {
|
1504 |
-
/* istanbul ignore if */
|
1505 |
-
if (typeof id !== 'string') {
|
1506 |
-
return
|
1507 |
-
}
|
1508 |
-
var assets = options[type];
|
1509 |
-
// check local registration variations first
|
1510 |
-
if (hasOwn(assets, id)) { return assets[id] }
|
1511 |
-
var camelizedId = camelize(id);
|
1512 |
-
if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
|
1513 |
-
var PascalCaseId = capitalize(camelizedId);
|
1514 |
-
if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
|
1515 |
-
// fallback to prototype chain
|
1516 |
-
var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
|
1517 |
-
if ("development" !== 'production' && warnMissing && !res) {
|
1518 |
-
warn(
|
1519 |
-
'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
|
1520 |
-
options
|
1521 |
-
);
|
1522 |
-
}
|
1523 |
-
return res
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
/* */
|
1527 |
-
|
1528 |
-
function validateProp (
|
1529 |
-
key,
|
1530 |
-
propOptions,
|
1531 |
-
propsData,
|
1532 |
-
vm
|
1533 |
-
) {
|
1534 |
-
var prop = propOptions[key];
|
1535 |
-
var absent = !hasOwn(propsData, key);
|
1536 |
-
var value = propsData[key];
|
1537 |
-
// boolean casting
|
1538 |
-
var booleanIndex = getTypeIndex(Boolean, prop.type);
|
1539 |
-
if (booleanIndex > -1) {
|
1540 |
-
if (absent && !hasOwn(prop, 'default')) {
|
1541 |
-
value = false;
|
1542 |
-
} else if (value === '' || value === hyphenate(key)) {
|
1543 |
-
// only cast empty string / same name to boolean if
|
1544 |
-
// boolean has higher priority
|
1545 |
-
var stringIndex = getTypeIndex(String, prop.type);
|
1546 |
-
if (stringIndex < 0 || booleanIndex < stringIndex) {
|
1547 |
-
value = true;
|
1548 |
-
}
|
1549 |
-
}
|
1550 |
-
}
|
1551 |
-
// check default value
|
1552 |
-
if (value === undefined) {
|
1553 |
-
value = getPropDefaultValue(vm, prop, key);
|
1554 |
-
// since the default value is a fresh copy,
|
1555 |
-
// make sure to observe it.
|
1556 |
-
var prevShouldObserve = shouldObserve;
|
1557 |
-
toggleObserving(true);
|
1558 |
-
observe(value);
|
1559 |
-
toggleObserving(prevShouldObserve);
|
1560 |
-
}
|
1561 |
-
{
|
1562 |
-
assertProp(prop, key, value, vm, absent);
|
1563 |
-
}
|
1564 |
-
return value
|
1565 |
-
}
|
1566 |
|
1567 |
-
/**
|
1568 |
-
|
1569 |
-
|
1570 |
-
function
|
1571 |
-
|
1572 |
-
|
1573 |
-
|
1574 |
-
|
1575 |
-
|
1576 |
-
// warn against non-factory defaults for Object & Array
|
1577 |
-
if ("development" !== 'production' && isObject(def)) {
|
1578 |
-
warn(
|
1579 |
-
'Invalid default value for prop "' + key + '": ' +
|
1580 |
-
'Props with type Object/Array must use a factory function ' +
|
1581 |
-
'to return the default value.',
|
1582 |
-
vm
|
1583 |
-
);
|
1584 |
-
}
|
1585 |
-
// the raw prop value was also undefined from previous render,
|
1586 |
-
// return previous default value to avoid unnecessary watcher trigger
|
1587 |
-
if (vm && vm.$options.propsData &&
|
1588 |
-
vm.$options.propsData[key] === undefined &&
|
1589 |
-
vm._props[key] !== undefined
|
1590 |
) {
|
1591 |
-
|
1592 |
-
}
|
1593 |
-
// call factory function for non-Function types
|
1594 |
-
// a value is Function if its prototype is function even across different execution context
|
1595 |
-
return typeof def === 'function' && getType(prop.type) !== 'Function'
|
1596 |
-
? def.call(vm)
|
1597 |
-
: def
|
1598 |
-
}
|
1599 |
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1619 |
}
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
|
|
|
|
|
|
|
|
1626 |
}
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
}
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
vm
|
1639 |
-
);
|
1640 |
-
return
|
1641 |
-
}
|
1642 |
-
var validator = prop.validator;
|
1643 |
-
if (validator) {
|
1644 |
-
if (!validator(value)) {
|
1645 |
warn(
|
1646 |
-
'
|
1647 |
-
|
1648 |
);
|
|
|
|
|
|
|
|
|
|
|
1649 |
}
|
|
|
|
|
|
|
1650 |
}
|
1651 |
-
}
|
1652 |
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
valid = t === expectedType.toLowerCase();
|
1661 |
-
// for primitive wrapper objects
|
1662 |
-
if (!valid && t === 'object') {
|
1663 |
-
valid = value instanceof type;
|
1664 |
}
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1671 |
}
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1675 |
}
|
1676 |
-
}
|
1677 |
|
1678 |
-
|
1679 |
-
* Use function string name to check built-in types,
|
1680 |
-
* because a simple equality check will fail when running
|
1681 |
-
* across different vms / iframes.
|
1682 |
-
*/
|
1683 |
-
function getType (fn) {
|
1684 |
-
var match = fn && fn.toString().match(/^\s*function (\w+)/);
|
1685 |
-
return match ? match[1] : ''
|
1686 |
-
}
|
1687 |
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
|
|
|
|
|
|
1691 |
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1695 |
}
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1699 |
}
|
|
|
1700 |
}
|
1701 |
-
return -1
|
1702 |
-
}
|
1703 |
-
|
1704 |
-
/* */
|
1705 |
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1719 |
}
|
1720 |
}
|
1721 |
}
|
1722 |
}
|
1723 |
-
globalHandleError(err, vm, info);
|
1724 |
-
}
|
1725 |
|
1726 |
-
function
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1732 |
}
|
1733 |
-
}
|
1734 |
-
logError(err, vm, info);
|
1735 |
-
}
|
1736 |
|
1737 |
-
|
1738 |
-
{
|
1739 |
-
warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
|
1740 |
-
}
|
1741 |
-
/* istanbul ignore else */
|
1742 |
-
if ((inBrowser || inWeex) && typeof console !== 'undefined') {
|
1743 |
-
console.error(err);
|
1744 |
-
} else {
|
1745 |
-
throw err
|
1746 |
-
}
|
1747 |
-
}
|
1748 |
-
|
1749 |
-
/* */
|
1750 |
-
/* globals MessageChannel */
|
1751 |
-
|
1752 |
-
var callbacks = [];
|
1753 |
-
var pending = false;
|
1754 |
-
|
1755 |
-
function flushCallbacks () {
|
1756 |
-
pending = false;
|
1757 |
-
var copies = callbacks.slice(0);
|
1758 |
-
callbacks.length = 0;
|
1759 |
-
for (var i = 0; i < copies.length; i++) {
|
1760 |
-
copies[i]();
|
1761 |
-
}
|
1762 |
-
}
|
1763 |
-
|
1764 |
-
// Here we have async deferring wrappers using both microtasks and (macro) tasks.
|
1765 |
-
// In < 2.4 we used microtasks everywhere, but there are some scenarios where
|
1766 |
-
// microtasks have too high a priority and fire in between supposedly
|
1767 |
-
// sequential events (e.g. #4521, #6690) or even between bubbling of the same
|
1768 |
-
// event (#6566). However, using (macro) tasks everywhere also has subtle problems
|
1769 |
-
// when state is changed right before repaint (e.g. #6813, out-in transitions).
|
1770 |
-
// Here we use microtask by default, but expose a way to force (macro) task when
|
1771 |
-
// needed (e.g. in event handlers attached by v-on).
|
1772 |
-
var microTimerFunc;
|
1773 |
-
var macroTimerFunc;
|
1774 |
-
var useMacroTask = false;
|
1775 |
-
|
1776 |
-
// Determine (macro) task defer implementation.
|
1777 |
-
// Technically setImmediate should be the ideal choice, but it's only available
|
1778 |
-
// in IE. The only polyfill that consistently queues the callback after all DOM
|
1779 |
-
// events triggered in the same loop is by using MessageChannel.
|
1780 |
-
/* istanbul ignore if */
|
1781 |
-
if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
|
1782 |
-
macroTimerFunc = function () {
|
1783 |
-
setImmediate(flushCallbacks);
|
1784 |
-
};
|
1785 |
-
} else if (typeof MessageChannel !== 'undefined' && (
|
1786 |
-
isNative(MessageChannel) ||
|
1787 |
-
// PhantomJS
|
1788 |
-
MessageChannel.toString() === '[object MessageChannelConstructor]'
|
1789 |
-
)) {
|
1790 |
-
var channel = new MessageChannel();
|
1791 |
-
var port = channel.port2;
|
1792 |
-
channel.port1.onmessage = flushCallbacks;
|
1793 |
-
macroTimerFunc = function () {
|
1794 |
-
port.postMessage(1);
|
1795 |
-
};
|
1796 |
-
} else {
|
1797 |
-
/* istanbul ignore next */
|
1798 |
-
macroTimerFunc = function () {
|
1799 |
-
setTimeout(flushCallbacks, 0);
|
1800 |
};
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
} else {
|
1817 |
-
// fallback to macro
|
1818 |
-
microTimerFunc = macroTimerFunc;
|
1819 |
-
}
|
1820 |
-
|
1821 |
-
/**
|
1822 |
-
* Wrap a function so that if any code inside triggers state change,
|
1823 |
-
* the changes are queued using a (macro) task instead of a microtask.
|
1824 |
-
*/
|
1825 |
-
function withMacroTask (fn) {
|
1826 |
-
return fn._withTask || (fn._withTask = function () {
|
1827 |
-
useMacroTask = true;
|
1828 |
-
var res = fn.apply(null, arguments);
|
1829 |
-
useMacroTask = false;
|
1830 |
return res
|
1831 |
-
|
1832 |
-
|
|
|
1833 |
|
1834 |
-
function
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
cb.call(ctx);
|
1840 |
-
} catch (e) {
|
1841 |
-
handleError(e, ctx, 'nextTick');
|
1842 |
}
|
1843 |
-
} else if (_resolve) {
|
1844 |
-
_resolve(ctx);
|
1845 |
}
|
1846 |
-
|
1847 |
-
if (!pending) {
|
1848 |
-
pending = true;
|
1849 |
-
if (useMacroTask) {
|
1850 |
-
macroTimerFunc();
|
1851 |
-
} else {
|
1852 |
-
microTimerFunc();
|
1853 |
-
}
|
1854 |
-
}
|
1855 |
-
// $flow-disable-line
|
1856 |
-
if (!cb && typeof Promise !== 'undefined') {
|
1857 |
-
return new Promise(function (resolve) {
|
1858 |
-
_resolve = resolve;
|
1859 |
-
})
|
1860 |
}
|
1861 |
-
}
|
1862 |
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
var measure;
|
1867 |
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
|
|
|
|
|
|
1877 |
) {
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
}
|
1885 |
}
|
1886 |
-
}
|
1887 |
-
|
1888 |
-
/* not type checking this file because flow doesn't play well with Proxy */
|
1889 |
-
|
1890 |
-
var initProxy;
|
1891 |
-
|
1892 |
-
{
|
1893 |
-
var allowedGlobals = makeMap(
|
1894 |
-
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
1895 |
-
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
1896 |
-
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
1897 |
-
'require' // for Webpack/Browserify
|
1898 |
-
);
|
1899 |
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
'referenced during render. Make sure that this property is reactive, ' +
|
1904 |
-
'either in the data option, or for class-based components, by ' +
|
1905 |
-
'initializing the property. ' +
|
1906 |
-
'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
|
1907 |
-
target
|
1908 |
-
);
|
1909 |
-
};
|
1910 |
-
|
1911 |
-
var hasProxy =
|
1912 |
-
typeof Proxy !== 'undefined' && isNative(Proxy);
|
1913 |
-
|
1914 |
-
if (hasProxy) {
|
1915 |
-
var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
|
1916 |
-
config.keyCodes = new Proxy(config.keyCodes, {
|
1917 |
-
set: function set (target, key, value) {
|
1918 |
-
if (isBuiltInModifier(key)) {
|
1919 |
-
warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
|
1920 |
-
return false
|
1921 |
-
} else {
|
1922 |
-
target[key] = value;
|
1923 |
-
return true
|
1924 |
-
}
|
1925 |
-
}
|
1926 |
-
});
|
1927 |
-
}
|
1928 |
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1937 |
}
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
|
|
|
|
1944 |
}
|
1945 |
-
|
|
|
|
|
1946 |
}
|
|
|
1947 |
};
|
1948 |
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
|
|
|
|
|
|
|
|
1959 |
}
|
|
|
|
|
|
|
|
|
|
|
1960 |
};
|
1961 |
-
|
1962 |
-
|
1963 |
-
/* */
|
1964 |
|
1965 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1966 |
|
1967 |
-
/**
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
_traverse(val, seenObjects);
|
1974 |
-
seenObjects.clear();
|
1975 |
-
}
|
1976 |
-
|
1977 |
-
function _traverse (val, seen) {
|
1978 |
-
var i, keys;
|
1979 |
-
var isA = Array.isArray(val);
|
1980 |
-
if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
|
1981 |
-
return
|
1982 |
-
}
|
1983 |
-
if (val.__ob__) {
|
1984 |
-
var depId = val.__ob__.dep.id;
|
1985 |
-
if (seen.has(depId)) {
|
1986 |
-
return
|
1987 |
}
|
1988 |
-
seen.add(depId);
|
1989 |
}
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
while (i--) { _traverse(val[keys[i]], seen); }
|
1997 |
-
}
|
1998 |
-
}
|
1999 |
-
|
2000 |
-
/* */
|
2001 |
-
|
2002 |
-
var normalizeEvent = cached(function (name) {
|
2003 |
-
var passive = name.charAt(0) === '&';
|
2004 |
-
name = passive ? name.slice(1) : name;
|
2005 |
-
var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
|
2006 |
-
name = once$$1 ? name.slice(1) : name;
|
2007 |
-
var capture = name.charAt(0) === '!';
|
2008 |
-
name = capture ? name.slice(1) : name;
|
2009 |
-
return {
|
2010 |
-
name: name,
|
2011 |
-
once: once$$1,
|
2012 |
-
capture: capture,
|
2013 |
-
passive: passive
|
2014 |
-
}
|
2015 |
-
});
|
2016 |
-
|
2017 |
-
function createFnInvoker (fns) {
|
2018 |
-
function invoker () {
|
2019 |
-
var arguments$1 = arguments;
|
2020 |
-
|
2021 |
-
var fns = invoker.fns;
|
2022 |
-
if (Array.isArray(fns)) {
|
2023 |
-
var cloned = fns.slice();
|
2024 |
-
for (var i = 0; i < cloned.length; i++) {
|
2025 |
-
cloned[i].apply(null, arguments$1);
|
2026 |
-
}
|
2027 |
-
} else {
|
2028 |
-
// return handler return value for single handlers
|
2029 |
-
return fns.apply(null, arguments)
|
2030 |
-
}
|
2031 |
-
}
|
2032 |
-
invoker.fns = fns;
|
2033 |
-
return invoker
|
2034 |
-
}
|
2035 |
-
|
2036 |
-
function updateListeners (
|
2037 |
-
on,
|
2038 |
-
oldOn,
|
2039 |
-
add,
|
2040 |
-
remove$$1,
|
2041 |
-
vm
|
2042 |
-
) {
|
2043 |
-
var name, def, cur, old, event;
|
2044 |
-
for (name in on) {
|
2045 |
-
def = cur = on[name];
|
2046 |
-
old = oldOn[name];
|
2047 |
-
event = normalizeEvent(name);
|
2048 |
-
/* istanbul ignore if */
|
2049 |
-
if (isUndef(cur)) {
|
2050 |
-
"development" !== 'production' && warn(
|
2051 |
-
"Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
|
2052 |
-
vm
|
2053 |
);
|
2054 |
-
} else if (isUndef(old)) {
|
2055 |
-
if (isUndef(cur.fns)) {
|
2056 |
-
cur = on[name] = createFnInvoker(cur);
|
2057 |
-
}
|
2058 |
-
add(event.name, cur, event.once, event.capture, event.passive, event.params);
|
2059 |
-
} else if (cur !== old) {
|
2060 |
-
old.fns = cur;
|
2061 |
-
on[name] = old;
|
2062 |
}
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
}
|
2069 |
}
|
2070 |
-
}
|
2071 |
-
|
2072 |
-
/* */
|
2073 |
-
|
2074 |
-
function mergeVNodeHook (def, hookKey, hook) {
|
2075 |
-
if (def instanceof VNode) {
|
2076 |
-
def = def.data.hook || (def.data.hook = {});
|
2077 |
-
}
|
2078 |
-
var invoker;
|
2079 |
-
var oldHook = def[hookKey];
|
2080 |
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
invoker = createFnInvoker([oldHook, wrappedHook]);
|
2100 |
-
}
|
2101 |
-
}
|
2102 |
-
|
2103 |
-
invoker.merged = true;
|
2104 |
-
def[hookKey] = invoker;
|
2105 |
-
}
|
2106 |
-
|
2107 |
-
/* */
|
2108 |
-
|
2109 |
-
function extractPropsFromVNodeData (
|
2110 |
-
data,
|
2111 |
-
Ctor,
|
2112 |
-
tag
|
2113 |
-
) {
|
2114 |
-
// we are only extracting raw values here.
|
2115 |
-
// validation and default values are handled in the child
|
2116 |
-
// component itself.
|
2117 |
-
var propOptions = Ctor.options.props;
|
2118 |
-
if (isUndef(propOptions)) {
|
2119 |
-
return
|
2120 |
-
}
|
2121 |
-
var res = {};
|
2122 |
-
var attrs = data.attrs;
|
2123 |
-
var props = data.props;
|
2124 |
-
if (isDef(attrs) || isDef(props)) {
|
2125 |
-
for (var key in propOptions) {
|
2126 |
-
var altKey = hyphenate(key);
|
2127 |
-
{
|
2128 |
-
var keyInLowerCase = key.toLowerCase();
|
2129 |
-
if (
|
2130 |
-
key !== keyInLowerCase &&
|
2131 |
-
attrs && hasOwn(attrs, keyInLowerCase)
|
2132 |
-
) {
|
2133 |
-
tip(
|
2134 |
-
"Prop \"" + keyInLowerCase + "\" is passed to component " +
|
2135 |
-
(formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
|
2136 |
-
" \"" + key + "\". " +
|
2137 |
-
"Note that HTML attributes are case-insensitive and camelCased " +
|
2138 |
-
"props need to use their kebab-case equivalents when using in-DOM " +
|
2139 |
-
"templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
|
2140 |
-
);
|
2141 |
}
|
2142 |
}
|
2143 |
-
|
2144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2145 |
}
|
|
|
2146 |
}
|
2147 |
-
return res
|
2148 |
-
}
|
2149 |
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
delete hash[altKey];
|
2168 |
}
|
2169 |
-
|
|
|
|
|
|
|
|
|
|
|
2170 |
}
|
2171 |
}
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
// 1. When the children contains components - because a functional component
|
2185 |
-
// may return an Array instead of a single root. In this case, just a simple
|
2186 |
-
// normalization is needed - if any child is an Array, we flatten the whole
|
2187 |
-
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
|
2188 |
-
// because functional components already normalize their own children.
|
2189 |
-
function simpleNormalizeChildren (children) {
|
2190 |
-
for (var i = 0; i < children.length; i++) {
|
2191 |
-
if (Array.isArray(children[i])) {
|
2192 |
-
return Array.prototype.concat.apply([], children)
|
2193 |
-
}
|
2194 |
-
}
|
2195 |
-
return children
|
2196 |
-
}
|
2197 |
-
|
2198 |
-
// 2. When the children contains constructs that always generated nested Arrays,
|
2199 |
-
// e.g. <template>, <slot>, v-for, or when the children is provided by user
|
2200 |
-
// with hand-written render functions / JSX. In such cases a full normalization
|
2201 |
-
// is needed to cater to all possible types of children values.
|
2202 |
-
function normalizeChildren (children) {
|
2203 |
-
return isPrimitive(children)
|
2204 |
-
? [createTextVNode(children)]
|
2205 |
-
: Array.isArray(children)
|
2206 |
-
? normalizeArrayChildren(children)
|
2207 |
-
: undefined
|
2208 |
-
}
|
2209 |
-
|
2210 |
-
function isTextNode (node) {
|
2211 |
-
return isDef(node) && isDef(node.text) && isFalse(node.isComment)
|
2212 |
-
}
|
2213 |
-
|
2214 |
-
function normalizeArrayChildren (children, nestedIndex) {
|
2215 |
-
var res = [];
|
2216 |
-
var i, c, lastIndex, last;
|
2217 |
-
for (i = 0; i < children.length; i++) {
|
2218 |
-
c = children[i];
|
2219 |
-
if (isUndef(c) || typeof c === 'boolean') { continue }
|
2220 |
-
lastIndex = res.length - 1;
|
2221 |
-
last = res[lastIndex];
|
2222 |
-
// nested
|
2223 |
-
if (Array.isArray(c)) {
|
2224 |
-
if (c.length > 0) {
|
2225 |
-
c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
|
2226 |
-
// merge adjacent text nodes
|
2227 |
-
if (isTextNode(c[0]) && isTextNode(last)) {
|
2228 |
-
res[lastIndex] = createTextVNode(last.text + (c[0]).text);
|
2229 |
-
c.shift();
|
2230 |
-
}
|
2231 |
-
res.push.apply(res, c);
|
2232 |
-
}
|
2233 |
-
} else if (isPrimitive(c)) {
|
2234 |
-
if (isTextNode(last)) {
|
2235 |
-
// merge adjacent text nodes
|
2236 |
-
// this is necessary for SSR hydration because text nodes are
|
2237 |
-
// essentially merged when rendered to HTML strings
|
2238 |
-
res[lastIndex] = createTextVNode(last.text + c);
|
2239 |
-
} else if (c !== '') {
|
2240 |
-
// convert primitive to vnode
|
2241 |
-
res.push(createTextVNode(c));
|
2242 |
-
}
|
2243 |
-
} else {
|
2244 |
-
if (isTextNode(c) && isTextNode(last)) {
|
2245 |
-
// merge adjacent text nodes
|
2246 |
-
res[lastIndex] = createTextVNode(last.text + c.text);
|
2247 |
-
} else {
|
2248 |
-
// default key for nested array children (likely generated by v-for)
|
2249 |
-
if (isTrue(children._isVList) &&
|
2250 |
-
isDef(c.tag) &&
|
2251 |
-
isUndef(c.key) &&
|
2252 |
-
isDef(nestedIndex)) {
|
2253 |
-
c.key = "__vlist" + nestedIndex + "_" + i + "__";
|
2254 |
}
|
2255 |
-
res.push(c);
|
2256 |
}
|
2257 |
}
|
2258 |
}
|
2259 |
-
return res
|
2260 |
-
}
|
2261 |
|
2262 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2263 |
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
|
|
|
|
|
|
|
|
2268 |
) {
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
? base.extend(comp)
|
2273 |
-
: comp
|
2274 |
-
}
|
2275 |
-
|
2276 |
-
function createAsyncPlaceholder (
|
2277 |
-
factory,
|
2278 |
-
data,
|
2279 |
-
context,
|
2280 |
-
children,
|
2281 |
-
tag
|
2282 |
-
) {
|
2283 |
-
var node = createEmptyVNode();
|
2284 |
-
node.asyncFactory = factory;
|
2285 |
-
node.asyncMeta = { data: data, context: context, children: children, tag: tag };
|
2286 |
-
return node
|
2287 |
-
}
|
2288 |
-
|
2289 |
-
function resolveAsyncComponent (
|
2290 |
-
factory,
|
2291 |
-
baseCtor,
|
2292 |
-
context
|
2293 |
-
) {
|
2294 |
-
if (isTrue(factory.error) && isDef(factory.errorComp)) {
|
2295 |
-
return factory.errorComp
|
2296 |
-
}
|
2297 |
-
|
2298 |
-
if (isDef(factory.resolved)) {
|
2299 |
-
return factory.resolved
|
2300 |
-
}
|
2301 |
-
|
2302 |
-
if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
|
2303 |
-
return factory.loadingComp
|
2304 |
-
}
|
2305 |
-
|
2306 |
-
if (isDef(factory.contexts)) {
|
2307 |
-
// already pending
|
2308 |
-
factory.contexts.push(context);
|
2309 |
-
} else {
|
2310 |
-
var contexts = factory.contexts = [context];
|
2311 |
-
var sync = true;
|
2312 |
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
}
|
2317 |
-
};
|
2318 |
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
// invoke callbacks only if this is not a synchronous resolve
|
2323 |
-
// (async resolves are shimmed as synchronous during SSR)
|
2324 |
-
if (!sync) {
|
2325 |
-
forceRender();
|
2326 |
-
}
|
2327 |
-
});
|
2328 |
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
if (
|
2335 |
-
|
2336 |
-
forceRender();
|
2337 |
}
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
if (isObject(res)) {
|
2343 |
-
if (typeof res.then === 'function') {
|
2344 |
-
// () => Promise
|
2345 |
-
if (isUndef(factory.resolved)) {
|
2346 |
-
res.then(resolve, reject);
|
2347 |
-
}
|
2348 |
-
} else if (isDef(res.component) && typeof res.component.then === 'function') {
|
2349 |
-
res.component.then(resolve, reject);
|
2350 |
-
|
2351 |
-
if (isDef(res.error)) {
|
2352 |
-
factory.errorComp = ensureCtor(res.error, baseCtor);
|
2353 |
-
}
|
2354 |
-
|
2355 |
-
if (isDef(res.loading)) {
|
2356 |
-
factory.loadingComp = ensureCtor(res.loading, baseCtor);
|
2357 |
-
if (res.delay === 0) {
|
2358 |
-
factory.loading = true;
|
2359 |
-
} else {
|
2360 |
-
setTimeout(function () {
|
2361 |
-
if (isUndef(factory.resolved) && isUndef(factory.error)) {
|
2362 |
-
factory.loading = true;
|
2363 |
-
forceRender();
|
2364 |
-
}
|
2365 |
-
}, res.delay || 200);
|
2366 |
-
}
|
2367 |
-
}
|
2368 |
-
|
2369 |
-
if (isDef(res.timeout)) {
|
2370 |
-
setTimeout(function () {
|
2371 |
-
if (isUndef(factory.resolved)) {
|
2372 |
-
reject(
|
2373 |
-
"timeout (" + (res.timeout) + "ms)"
|
2374 |
-
);
|
2375 |
-
}
|
2376 |
-
}, res.timeout);
|
2377 |
}
|
2378 |
}
|
2379 |
}
|
2380 |
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
/* */
|
2390 |
-
|
2391 |
-
function isAsyncPlaceholder (node) {
|
2392 |
-
return node.isComment && node.asyncFactory
|
2393 |
-
}
|
2394 |
-
|
2395 |
-
/* */
|
2396 |
-
|
2397 |
-
function getFirstComponentChild (children) {
|
2398 |
-
if (Array.isArray(children)) {
|
2399 |
-
for (var i = 0; i < children.length; i++) {
|
2400 |
-
var c = children[i];
|
2401 |
-
if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
|
2402 |
-
return c
|
2403 |
}
|
2404 |
}
|
|
|
|
|
|
|
|
|
|
|
2405 |
}
|
2406 |
-
}
|
2407 |
-
|
2408 |
-
/* */
|
2409 |
|
2410 |
-
|
2411 |
-
|
2412 |
-
function
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2419 |
}
|
2420 |
-
}
|
2421 |
|
2422 |
-
|
2423 |
|
2424 |
-
function add (event, fn, once) {
|
2425 |
-
if (once) {
|
2426 |
-
target.$once(event, fn);
|
2427 |
-
} else {
|
2428 |
-
target.$on(event, fn);
|
2429 |
-
}
|
2430 |
-
}
|
2431 |
-
|
2432 |
-
function remove$1 (event, fn) {
|
2433 |
-
target.$off(event, fn);
|
2434 |
-
}
|
2435 |
-
|
2436 |
-
function updateComponentListeners (
|
2437 |
-
vm,
|
2438 |
-
listeners,
|
2439 |
-
oldListeners
|
2440 |
-
) {
|
2441 |
-
target = vm;
|
2442 |
-
updateListeners(listeners, oldListeners || {}, add, remove$1, vm);
|
2443 |
-
target = undefined;
|
2444 |
-
}
|
2445 |
-
|
2446 |
-
function eventsMixin (Vue) {
|
2447 |
-
var hookRE = /^hook:/;
|
2448 |
-
Vue.prototype.$on = function (event, fn) {
|
2449 |
-
var this$1 = this;
|
2450 |
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2462 |
}
|
2463 |
}
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
|
|
2472 |
}
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
Vue.prototype.$off = function (event, fn) {
|
2479 |
-
var this$1 = this;
|
2480 |
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2486 |
}
|
2487 |
-
//
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
|
|
2493 |
}
|
2494 |
-
//
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2498 |
}
|
2499 |
-
if (!
|
2500 |
-
|
2501 |
-
return vm
|
2502 |
}
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
|
|
2513 |
}
|
2514 |
}
|
2515 |
-
return vm
|
2516 |
-
};
|
2517 |
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
"Event \"" + lowerCaseEvent + "\" is emitted in component " +
|
2525 |
-
(formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
|
2526 |
-
"Note that HTML attributes are case-insensitive and you cannot use " +
|
2527 |
-
"v-on to listen to camelCase events when using in-DOM templates. " +
|
2528 |
-
"You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
|
2529 |
-
);
|
2530 |
-
}
|
2531 |
}
|
2532 |
-
var
|
2533 |
-
if (
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
} catch (e) {
|
2540 |
-
handleError(e, vm, ("event handler for \"" + event + "\""));
|
2541 |
-
}
|
2542 |
}
|
2543 |
}
|
2544 |
-
|
2545 |
-
};
|
2546 |
-
}
|
2547 |
|
2548 |
-
|
2549 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2550 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2551 |
|
2552 |
-
|
2553 |
-
|
2554 |
-
*/
|
2555 |
-
function resolveSlots (
|
2556 |
-
children,
|
2557 |
-
context
|
2558 |
-
) {
|
2559 |
-
var slots = {};
|
2560 |
-
if (!children) {
|
2561 |
-
return slots
|
2562 |
}
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
// same context.
|
2572 |
-
if ((child.context === context || child.fnContext === context) &&
|
2573 |
-
data && data.slot != null
|
2574 |
-
) {
|
2575 |
-
var name = data.slot;
|
2576 |
-
var slot = (slots[name] || (slots[name] = []));
|
2577 |
-
if (child.tag === 'template') {
|
2578 |
-
slot.push.apply(slot, child.children || []);
|
2579 |
-
} else {
|
2580 |
-
slot.push(child);
|
2581 |
}
|
2582 |
-
} else {
|
2583 |
-
(slots.default || (slots.default = [])).push(child);
|
2584 |
}
|
|
|
2585 |
}
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2590 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2591 |
}
|
2592 |
-
return slots
|
2593 |
-
}
|
2594 |
-
|
2595 |
-
function isWhitespace (node) {
|
2596 |
-
return (node.isComment && !node.asyncFactory) || node.text === ' '
|
2597 |
-
}
|
2598 |
|
2599 |
-
function
|
2600 |
-
|
2601 |
-
|
2602 |
-
) {
|
2603 |
-
|
2604 |
-
for (var i = 0; i < fns.length; i++) {
|
2605 |
-
if (Array.isArray(fns[i])) {
|
2606 |
-
resolveScopedSlots(fns[i], res);
|
2607 |
} else {
|
2608 |
-
|
2609 |
}
|
2610 |
}
|
2611 |
-
return res
|
2612 |
-
}
|
2613 |
|
2614 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2615 |
|
2616 |
-
|
2617 |
-
|
2618 |
|
2619 |
-
|
2620 |
-
var options = vm.$options;
|
2621 |
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2627 |
}
|
2628 |
-
parent.$children.push(vm);
|
2629 |
}
|
2630 |
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
callHook(vm, 'beforeUpdate');
|
2650 |
-
}
|
2651 |
-
var prevEl = vm.$el;
|
2652 |
-
var prevVnode = vm._vnode;
|
2653 |
-
var prevActiveInstance = activeInstance;
|
2654 |
-
activeInstance = vm;
|
2655 |
-
vm._vnode = vnode;
|
2656 |
-
// Vue.prototype.__patch__ is injected in entry points
|
2657 |
-
// based on the rendering backend used.
|
2658 |
-
if (!prevVnode) {
|
2659 |
-
// initial render
|
2660 |
-
vm.$el = vm.__patch__(
|
2661 |
-
vm.$el, vnode, hydrating, false /* removeOnly */,
|
2662 |
-
vm.$options._parentElm,
|
2663 |
-
vm.$options._refElm
|
2664 |
-
);
|
2665 |
-
// no need for the ref nodes after initial patch
|
2666 |
-
// this prevents keeping a detached DOM tree in memory (#5851)
|
2667 |
-
vm.$options._parentElm = vm.$options._refElm = null;
|
2668 |
-
} else {
|
2669 |
-
// updates
|
2670 |
-
vm.$el = vm.__patch__(prevVnode, vnode);
|
2671 |
-
}
|
2672 |
-
activeInstance = prevActiveInstance;
|
2673 |
-
// update __vue__ reference
|
2674 |
-
if (prevEl) {
|
2675 |
-
prevEl.__vue__ = null;
|
2676 |
-
}
|
2677 |
-
if (vm.$el) {
|
2678 |
-
vm.$el.__vue__ = vm;
|
2679 |
-
}
|
2680 |
-
// if parent is an HOC, update its $el as well
|
2681 |
-
if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
|
2682 |
-
vm.$parent.$el = vm.$el;
|
2683 |
-
}
|
2684 |
-
// updated hook is called by the scheduler to ensure that children are
|
2685 |
-
// updated in a parent's updated hook.
|
2686 |
-
};
|
2687 |
-
|
2688 |
-
Vue.prototype.$forceUpdate = function () {
|
2689 |
-
var vm = this;
|
2690 |
-
if (vm._watcher) {
|
2691 |
-
vm._watcher.update();
|
2692 |
}
|
2693 |
-
|
|
|
2694 |
|
2695 |
-
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
remove(parent.$children, vm);
|
2706 |
-
}
|
2707 |
-
// teardown watchers
|
2708 |
-
if (vm._watcher) {
|
2709 |
-
vm._watcher.teardown();
|
2710 |
-
}
|
2711 |
-
var i = vm._watchers.length;
|
2712 |
-
while (i--) {
|
2713 |
-
vm._watchers[i].teardown();
|
2714 |
-
}
|
2715 |
-
// remove reference from data ob
|
2716 |
-
// frozen object may not have observer.
|
2717 |
-
if (vm._data.__ob__) {
|
2718 |
-
vm._data.__ob__.vmCount--;
|
2719 |
-
}
|
2720 |
-
// call the last hook...
|
2721 |
-
vm._isDestroyed = true;
|
2722 |
-
// invoke destroy hooks on current rendered tree
|
2723 |
-
vm.__patch__(vm._vnode, null);
|
2724 |
-
// fire destroyed hook
|
2725 |
-
callHook(vm, 'destroyed');
|
2726 |
-
// turn off all instance listeners.
|
2727 |
-
vm.$off();
|
2728 |
-
// remove __vue__ reference
|
2729 |
-
if (vm.$el) {
|
2730 |
-
vm.$el.__vue__ = null;
|
2731 |
-
}
|
2732 |
-
// release circular reference (#6759)
|
2733 |
-
if (vm.$vnode) {
|
2734 |
-
vm.$vnode.parent = null;
|
2735 |
-
}
|
2736 |
-
};
|
2737 |
-
}
|
2738 |
-
|
2739 |
-
function mountComponent (
|
2740 |
-
vm,
|
2741 |
-
el,
|
2742 |
-
hydrating
|
2743 |
-
) {
|
2744 |
-
vm.$el = el;
|
2745 |
-
if (!vm.$options.render) {
|
2746 |
-
vm.$options.render = createEmptyVNode;
|
2747 |
-
{
|
2748 |
-
/* istanbul ignore if */
|
2749 |
-
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
|
2750 |
-
vm.$options.el || el) {
|
2751 |
-
warn(
|
2752 |
-
'You are using the runtime-only build of Vue where the template ' +
|
2753 |
-
'compiler is not available. Either pre-compile the templates into ' +
|
2754 |
-
'render functions, or use the compiler-included build.',
|
2755 |
-
vm
|
2756 |
-
);
|
2757 |
-
} else {
|
2758 |
-
warn(
|
2759 |
-
'Failed to mount component: template or render function not defined.',
|
2760 |
-
vm
|
2761 |
-
);
|
2762 |
}
|
2763 |
}
|
|
|
2764 |
}
|
2765 |
-
callHook(vm, 'beforeMount');
|
2766 |
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2785 |
};
|
2786 |
} else {
|
2787 |
-
|
2788 |
-
|
|
|
2789 |
};
|
2790 |
}
|
2791 |
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
)
|
2814 |
-
|
2815 |
-
isUpdatingChildComponent = true;
|
2816 |
}
|
2817 |
|
2818 |
-
|
2819 |
-
// we need to do this before overwriting $options._renderChildren
|
2820 |
-
var hasChildren = !!(
|
2821 |
-
renderChildren || // has new static slots
|
2822 |
-
vm.$options._renderChildren || // has old static slots
|
2823 |
-
parentVnode.data.scopedSlots || // has new scoped slots
|
2824 |
-
vm.$scopedSlots !== emptyObject // has old scoped slots
|
2825 |
-
);
|
2826 |
-
|
2827 |
-
vm.$options._parentVnode = parentVnode;
|
2828 |
-
vm.$vnode = parentVnode; // update vm's placeholder node without re-render
|
2829 |
-
|
2830 |
-
if (vm._vnode) { // update child tree's parent
|
2831 |
-
vm._vnode.parent = parentVnode;
|
2832 |
-
}
|
2833 |
-
vm.$options._renderChildren = renderChildren;
|
2834 |
|
2835 |
-
|
2836 |
-
|
2837 |
-
// used them during render
|
2838 |
-
vm.$attrs = parentVnode.data.attrs || emptyObject;
|
2839 |
-
vm.$listeners = listeners || emptyObject;
|
2840 |
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2850 |
}
|
2851 |
-
toggleObserving(true);
|
2852 |
-
// keep a copy of raw propsData
|
2853 |
-
vm.$options.propsData = propsData;
|
2854 |
}
|
2855 |
|
2856 |
-
|
2857 |
-
listeners = listeners || emptyObject;
|
2858 |
-
var oldListeners = vm.$options._parentListeners;
|
2859 |
-
vm.$options._parentListeners = listeners;
|
2860 |
-
updateComponentListeners(vm, listeners, oldListeners);
|
2861 |
|
2862 |
-
|
2863 |
-
if (hasChildren) {
|
2864 |
-
vm.$slots = resolveSlots(renderChildren, parentVnode.context);
|
2865 |
-
vm.$forceUpdate();
|
2866 |
-
}
|
2867 |
|
2868 |
{
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
|
|
|
|
|
|
2872 |
|
2873 |
-
function
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
|
|
|
|
|
|
|
|
2879 |
|
2880 |
-
function
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
if (vm._inactive || vm._inactive === null) {
|
2890 |
-
vm._inactive = false;
|
2891 |
-
for (var i = 0; i < vm.$children.length; i++) {
|
2892 |
-
activateChildComponent(vm.$children[i]);
|
2893 |
-
}
|
2894 |
-
callHook(vm, 'activated');
|
2895 |
-
}
|
2896 |
-
}
|
2897 |
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
if (
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
|
|
|
|
|
|
|
|
|
|
2909 |
}
|
2910 |
-
callHook(vm, 'deactivated');
|
2911 |
-
}
|
2912 |
-
}
|
2913 |
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
}
|
2925 |
-
}
|
2926 |
-
}
|
2927 |
-
if (vm._hasHookEvent) {
|
2928 |
-
vm.$emit('hook:' + hook);
|
2929 |
-
}
|
2930 |
-
popTarget();
|
2931 |
-
}
|
2932 |
|
2933 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2934 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2935 |
|
2936 |
-
|
2937 |
|
2938 |
-
var
|
2939 |
-
var activatedChildren = [];
|
2940 |
-
var has = {};
|
2941 |
-
var circular = {};
|
2942 |
-
var waiting = false;
|
2943 |
-
var flushing = false;
|
2944 |
-
var index = 0;
|
2945 |
|
2946 |
-
/**
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
}
|
2955 |
-
waiting = flushing = false;
|
2956 |
-
}
|
2957 |
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
// created before the child)
|
2969 |
-
// 2. A component's user watchers are run before its render watcher (because
|
2970 |
-
// user watchers are created before the render watcher)
|
2971 |
-
// 3. If a component is destroyed during a parent component's watcher run,
|
2972 |
-
// its watchers can be skipped.
|
2973 |
-
queue.sort(function (a, b) { return a.id - b.id; });
|
2974 |
-
|
2975 |
-
// do not cache length because more watchers might be pushed
|
2976 |
-
// as we run existing watchers
|
2977 |
-
for (index = 0; index < queue.length; index++) {
|
2978 |
-
watcher = queue[index];
|
2979 |
-
id = watcher.id;
|
2980 |
-
has[id] = null;
|
2981 |
-
watcher.run();
|
2982 |
-
// in dev build, check and stop circular updates.
|
2983 |
-
if ("development" !== 'production' && has[id] != null) {
|
2984 |
-
circular[id] = (circular[id] || 0) + 1;
|
2985 |
-
if (circular[id] > MAX_UPDATE_COUNT) {
|
2986 |
-
warn(
|
2987 |
-
'You may have an infinite update loop ' + (
|
2988 |
-
watcher.user
|
2989 |
-
? ("in watcher with expression \"" + (watcher.expression) + "\"")
|
2990 |
-
: "in a component render function."
|
2991 |
-
),
|
2992 |
-
watcher.vm
|
2993 |
-
);
|
2994 |
-
break
|
2995 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2996 |
}
|
2997 |
}
|
2998 |
|
2999 |
-
|
3000 |
-
var activatedQueue = activatedChildren.slice();
|
3001 |
-
var updatedQueue = queue.slice();
|
3002 |
-
|
3003 |
-
resetSchedulerState();
|
3004 |
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3008 |
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
devtools.emit('flush');
|
3013 |
-
}
|
3014 |
-
}
|
3015 |
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
|
|
|
|
|
|
3023 |
}
|
|
|
|
|
3024 |
}
|
3025 |
-
}
|
3026 |
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
} else {
|
3057 |
-
// if already flushing, splice the watcher based on its id
|
3058 |
-
// if already past its id, it will be run next immediately.
|
3059 |
-
var i = queue.length - 1;
|
3060 |
-
while (i > index && queue[i].id > watcher.id) {
|
3061 |
-
i--;
|
3062 |
}
|
3063 |
-
queue.splice(i + 1, 0, watcher);
|
3064 |
}
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
|
|
3069 |
}
|
3070 |
}
|
3071 |
-
}
|
3072 |
|
3073 |
-
/* */
|
3074 |
|
3075 |
-
|
|
|
|
|
|
|
|
|
|
|
3076 |
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
var Watcher = function Watcher (
|
3083 |
-
vm,
|
3084 |
-
expOrFn,
|
3085 |
-
cb,
|
3086 |
-
options,
|
3087 |
-
isRenderWatcher
|
3088 |
-
) {
|
3089 |
-
this.vm = vm;
|
3090 |
-
if (isRenderWatcher) {
|
3091 |
-
vm._watcher = this;
|
3092 |
-
}
|
3093 |
-
vm._watchers.push(this);
|
3094 |
-
// options
|
3095 |
-
if (options) {
|
3096 |
-
this.deep = !!options.deep;
|
3097 |
-
this.user = !!options.user;
|
3098 |
-
this.lazy = !!options.lazy;
|
3099 |
-
this.sync = !!options.sync;
|
3100 |
-
} else {
|
3101 |
-
this.deep = this.user = this.lazy = this.sync = false;
|
3102 |
-
}
|
3103 |
-
this.cb = cb;
|
3104 |
-
this.id = ++uid$1; // uid for batching
|
3105 |
-
this.active = true;
|
3106 |
-
this.dirty = this.lazy; // for lazy watchers
|
3107 |
-
this.deps = [];
|
3108 |
-
this.newDeps = [];
|
3109 |
-
this.depIds = new _Set();
|
3110 |
-
this.newDepIds = new _Set();
|
3111 |
-
this.expression = expOrFn.toString();
|
3112 |
-
// parse expression for getter
|
3113 |
-
if (typeof expOrFn === 'function') {
|
3114 |
-
this.getter = expOrFn;
|
3115 |
-
} else {
|
3116 |
-
this.getter = parsePath(expOrFn);
|
3117 |
-
if (!this.getter) {
|
3118 |
-
this.getter = function () {};
|
3119 |
-
"development" !== 'production' && warn(
|
3120 |
-
"Failed watching path: \"" + expOrFn + "\" " +
|
3121 |
-
'Watcher only accepts simple dot-delimited paths. ' +
|
3122 |
-
'For full control, use a function instead.',
|
3123 |
-
vm
|
3124 |
-
);
|
3125 |
}
|
3126 |
-
}
|
3127 |
-
this.value = this.lazy
|
3128 |
-
? undefined
|
3129 |
-
: this.get();
|
3130 |
-
};
|
3131 |
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
Watcher.prototype.get = function get () {
|
3136 |
-
pushTarget(this);
|
3137 |
-
var value;
|
3138 |
-
var vm = this.vm;
|
3139 |
-
try {
|
3140 |
-
value = this.getter.call(vm, vm);
|
3141 |
-
} catch (e) {
|
3142 |
-
if (this.user) {
|
3143 |
-
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
|
3144 |
} else {
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
|
|
|
|
3152 |
}
|
3153 |
-
popTarget();
|
3154 |
-
this.cleanupDeps();
|
3155 |
-
}
|
3156 |
-
return value
|
3157 |
-
};
|
3158 |
|
3159 |
-
|
3160 |
-
|
3161 |
-
*/
|
3162 |
-
Watcher.prototype.addDep = function addDep (dep) {
|
3163 |
-
var id = dep.id;
|
3164 |
-
if (!this.newDepIds.has(id)) {
|
3165 |
-
this.newDepIds.add(id);
|
3166 |
-
this.newDeps.push(dep);
|
3167 |
-
if (!this.depIds.has(id)) {
|
3168 |
-
dep.addSub(this);
|
3169 |
-
}
|
3170 |
}
|
3171 |
-
};
|
3172 |
|
3173 |
-
|
3174 |
-
* Clean up for dependency collection.
|
3175 |
-
*/
|
3176 |
-
Watcher.prototype.cleanupDeps = function cleanupDeps () {
|
3177 |
-
var this$1 = this;
|
3178 |
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3208 |
}
|
3209 |
-
};
|
3210 |
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
if (
|
3219 |
-
|
3220 |
-
|
3221 |
-
|
3222 |
-
|
3223 |
-
isObject(value) ||
|
3224 |
-
this.deep
|
3225 |
-
) {
|
3226 |
-
// set new value
|
3227 |
-
var oldValue = this.value;
|
3228 |
-
this.value = value;
|
3229 |
-
if (this.user) {
|
3230 |
-
try {
|
3231 |
-
this.cb.call(this.vm, value, oldValue);
|
3232 |
-
} catch (e) {
|
3233 |
-
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
|
3234 |
}
|
3235 |
-
|
3236 |
-
|
|
|
|
|
|
|
|
|
|
|
3237 |
}
|
3238 |
}
|
|
|
3239 |
}
|
3240 |
-
};
|
3241 |
|
3242 |
-
|
3243 |
-
* Evaluate the value of the watcher.
|
3244 |
-
* This only gets called for lazy watchers.
|
3245 |
-
*/
|
3246 |
-
Watcher.prototype.evaluate = function evaluate () {
|
3247 |
-
this.value = this.get();
|
3248 |
-
this.dirty = false;
|
3249 |
-
};
|
3250 |
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
|
|
3256 |
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3260 |
}
|
3261 |
-
};
|
3262 |
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3268 |
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3279 |
}
|
3280 |
-
|
3281 |
}
|
3282 |
-
};
|
3283 |
|
3284 |
-
/* */
|
3285 |
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
|
|
|
|
3292 |
|
3293 |
-
function
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
if (opts.data) {
|
3309 |
-
initData(vm);
|
3310 |
-
} else {
|
3311 |
-
observe(vm._data = {}, true /* asRootData */);
|
3312 |
-
}
|
3313 |
-
if (opts.computed) { initComputed(vm, opts.computed); }
|
3314 |
-
if (opts.watch && opts.watch !== nativeWatch) {
|
3315 |
-
initWatch(vm, opts.watch);
|
3316 |
-
}
|
3317 |
-
}
|
3318 |
-
|
3319 |
-
function initProps (vm, propsOptions) {
|
3320 |
-
var propsData = vm.$options.propsData || {};
|
3321 |
-
var props = vm._props = {};
|
3322 |
-
// cache prop keys so that future props updates can iterate using Array
|
3323 |
-
// instead of dynamic object key enumeration.
|
3324 |
-
var keys = vm.$options._propKeys = [];
|
3325 |
-
var isRoot = !vm.$parent;
|
3326 |
-
// root instance props should be converted
|
3327 |
-
if (!isRoot) {
|
3328 |
-
toggleObserving(false);
|
3329 |
-
}
|
3330 |
-
var loop = function ( key ) {
|
3331 |
-
keys.push(key);
|
3332 |
-
var value = validateProp(key, propsOptions, propsData, vm);
|
3333 |
-
/* istanbul ignore else */
|
3334 |
-
{
|
3335 |
-
var hyphenatedKey = hyphenate(key);
|
3336 |
-
if (isReservedAttribute(hyphenatedKey) ||
|
3337 |
-
config.isReservedAttr(hyphenatedKey)) {
|
3338 |
-
warn(
|
3339 |
-
("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
|
3340 |
-
vm
|
3341 |
-
);
|
3342 |
-
}
|
3343 |
-
defineReactive(props, key, value, function () {
|
3344 |
-
if (vm.$parent && !isUpdatingChildComponent) {
|
3345 |
-
warn(
|
3346 |
-
"Avoid mutating a prop directly since the value will be " +
|
3347 |
-
"overwritten whenever the parent component re-renders. " +
|
3348 |
-
"Instead, use a data or computed property based on the prop's " +
|
3349 |
-
"value. Prop being mutated: \"" + key + "\"",
|
3350 |
-
vm
|
3351 |
-
);
|
3352 |
}
|
3353 |
});
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
|
3389 |
-
warn(
|
3390 |
-
("Method \"" + key + "\" has already been defined as a data property."),
|
3391 |
-
vm
|
3392 |
-
);
|
3393 |
}
|
|
|
3394 |
}
|
3395 |
-
if (props && hasOwn(props, key)) {
|
3396 |
-
"development" !== 'production' && warn(
|
3397 |
-
"The data property \"" + key + "\" is already declared as a prop. " +
|
3398 |
-
"Use prop default value instead.",
|
3399 |
-
vm
|
3400 |
-
);
|
3401 |
-
} else if (!isReserved(key)) {
|
3402 |
-
proxy(vm, "_data", key);
|
3403 |
-
}
|
3404 |
-
}
|
3405 |
-
// observe data
|
3406 |
-
observe(data, true /* asRootData */);
|
3407 |
-
}
|
3408 |
-
|
3409 |
-
function getData (data, vm) {
|
3410 |
-
// #7573 disable dep collection when invoking data getters
|
3411 |
-
pushTarget();
|
3412 |
-
try {
|
3413 |
-
return data.call(vm, vm)
|
3414 |
-
} catch (e) {
|
3415 |
-
handleError(e, vm, "data()");
|
3416 |
-
return {}
|
3417 |
-
} finally {
|
3418 |
-
popTarget();
|
3419 |
}
|
3420 |
-
}
|
3421 |
|
3422 |
-
|
3423 |
|
3424 |
-
function initComputed (vm, computed) {
|
3425 |
-
// $flow-disable-line
|
3426 |
-
var watchers = vm._computedWatchers = Object.create(null);
|
3427 |
-
// computed properties are just getters during SSR
|
3428 |
-
var isSSR = isServerRendering();
|
3429 |
|
3430 |
-
for (var key in computed) {
|
3431 |
-
var userDef = computed[key];
|
3432 |
-
var getter = typeof userDef === 'function' ? userDef : userDef.get;
|
3433 |
-
if ("development" !== 'production' && getter == null) {
|
3434 |
-
warn(
|
3435 |
-
("Getter is missing for computed property \"" + key + "\"."),
|
3436 |
-
vm
|
3437 |
-
);
|
3438 |
-
}
|
3439 |
|
3440 |
-
|
3441 |
-
|
3442 |
-
|
3443 |
-
|
3444 |
-
|
3445 |
-
|
3446 |
-
|
3447 |
-
|
3448 |
-
|
3449 |
-
|
3450 |
-
|
3451 |
-
|
3452 |
-
|
3453 |
-
|
3454 |
-
|
3455 |
-
|
3456 |
-
|
3457 |
-
|
3458 |
-
|
3459 |
-
|
3460 |
-
|
3461 |
-
|
3462 |
-
|
3463 |
-
|
3464 |
-
|
3465 |
-
|
3466 |
-
|
3467 |
-
|
3468 |
-
|
3469 |
-
|
3470 |
-
|
3471 |
-
|
3472 |
-
sharedPropertyDefinition.get = shouldCache
|
3473 |
-
? createComputedGetter(key)
|
3474 |
-
: userDef;
|
3475 |
-
sharedPropertyDefinition.set = noop;
|
3476 |
-
} else {
|
3477 |
-
sharedPropertyDefinition.get = userDef.get
|
3478 |
-
? shouldCache && userDef.cache !== false
|
3479 |
-
? createComputedGetter(key)
|
3480 |
-
: userDef.get
|
3481 |
-
: noop;
|
3482 |
-
sharedPropertyDefinition.set = userDef.set
|
3483 |
-
? userDef.set
|
3484 |
-
: noop;
|
3485 |
-
}
|
3486 |
-
if ("development" !== 'production' &&
|
3487 |
-
sharedPropertyDefinition.set === noop) {
|
3488 |
-
sharedPropertyDefinition.set = function () {
|
3489 |
-
warn(
|
3490 |
-
("Computed property \"" + key + "\" was assigned to but it has no setter."),
|
3491 |
-
this
|
3492 |
-
);
|
3493 |
-
};
|
3494 |
-
}
|
3495 |
-
Object.defineProperty(target, key, sharedPropertyDefinition);
|
3496 |
-
}
|
3497 |
-
|
3498 |
-
function createComputedGetter (key) {
|
3499 |
-
return function computedGetter () {
|
3500 |
-
var watcher = this._computedWatchers && this._computedWatchers[key];
|
3501 |
-
if (watcher) {
|
3502 |
-
if (watcher.dirty) {
|
3503 |
-
watcher.evaluate();
|
3504 |
-
}
|
3505 |
-
if (Dep.target) {
|
3506 |
-
watcher.depend();
|
3507 |
}
|
3508 |
-
return watcher.value
|
3509 |
}
|
3510 |
-
|
3511 |
-
|
3512 |
-
|
3513 |
-
|
3514 |
-
var props = vm.$options.props;
|
3515 |
-
for (var key in methods) {
|
3516 |
-
{
|
3517 |
-
if (methods[key] == null) {
|
3518 |
-
warn(
|
3519 |
-
"Method \"" + key + "\" has an undefined value in the component definition. " +
|
3520 |
-
"Did you reference the function correctly?",
|
3521 |
-
vm
|
3522 |
-
);
|
3523 |
-
}
|
3524 |
-
if (props && hasOwn(props, key)) {
|
3525 |
-
warn(
|
3526 |
-
("Method \"" + key + "\" has already been defined as a prop."),
|
3527 |
-
vm
|
3528 |
-
);
|
3529 |
-
}
|
3530 |
-
if ((key in vm) && isReserved(key)) {
|
3531 |
-
warn(
|
3532 |
-
"Method \"" + key + "\" conflicts with an existing Vue instance method. " +
|
3533 |
-
"Avoid defining component methods that start with _ or $."
|
3534 |
-
);
|
3535 |
}
|
3536 |
}
|
3537 |
-
|
3538 |
}
|
3539 |
-
}
|
3540 |
|
3541 |
-
function
|
3542 |
-
|
3543 |
-
var handler = watch[key];
|
3544 |
-
if (Array.isArray(handler)) {
|
3545 |
-
for (var i = 0; i < handler.length; i++) {
|
3546 |
-
createWatcher(vm, key, handler[i]);
|
3547 |
-
}
|
3548 |
-
} else {
|
3549 |
-
createWatcher(vm, key, handler);
|
3550 |
-
}
|
3551 |
-
}
|
3552 |
-
}
|
3553 |
-
|
3554 |
-
function createWatcher (
|
3555 |
-
vm,
|
3556 |
-
expOrFn,
|
3557 |
-
handler,
|
3558 |
-
options
|
3559 |
-
) {
|
3560 |
-
if (isPlainObject(handler)) {
|
3561 |
-
options = handler;
|
3562 |
-
handler = handler.handler;
|
3563 |
-
}
|
3564 |
-
if (typeof handler === 'string') {
|
3565 |
-
handler = vm[handler];
|
3566 |
-
}
|
3567 |
-
return vm.$watch(expOrFn, handler, options)
|
3568 |
-
}
|
3569 |
-
|
3570 |
-
function stateMixin (Vue) {
|
3571 |
-
// flow somehow has problems with directly declared definition object
|
3572 |
-
// when using Object.defineProperty, so we have to procedurally build up
|
3573 |
-
// the object here.
|
3574 |
-
var dataDef = {};
|
3575 |
-
dataDef.get = function () { return this._data };
|
3576 |
-
var propsDef = {};
|
3577 |
-
propsDef.get = function () { return this._props };
|
3578 |
-
{
|
3579 |
-
dataDef.set = function (newData) {
|
3580 |
-
warn(
|
3581 |
-
'Avoid replacing instance root $data. ' +
|
3582 |
-
'Use nested data properties instead.',
|
3583 |
-
this
|
3584 |
-
);
|
3585 |
-
};
|
3586 |
-
propsDef.set = function () {
|
3587 |
-
warn("$props is readonly.", this);
|
3588 |
-
};
|
3589 |
}
|
3590 |
-
Object.defineProperty(Vue.prototype, '$data', dataDef);
|
3591 |
-
Object.defineProperty(Vue.prototype, '$props', propsDef);
|
3592 |
|
3593 |
-
|
3594 |
-
Vue.prototype.$delete = del;
|
3595 |
|
3596 |
-
|
3597 |
-
|
3598 |
-
|
3599 |
-
|
3600 |
) {
|
3601 |
-
var
|
3602 |
-
|
3603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3604 |
}
|
3605 |
-
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
-
|
3610 |
}
|
3611 |
-
|
3612 |
-
|
|
|
|
|
3613 |
}
|
3614 |
-
|
3615 |
-
|
3616 |
-
|
3617 |
-
|
|
|
3618 |
|
3619 |
-
function
|
3620 |
-
|
3621 |
-
|
3622 |
-
|
3623 |
-
|
3624 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3625 |
}
|
3626 |
-
}
|
3627 |
|
3628 |
-
function
|
3629 |
-
|
3630 |
-
if (result) {
|
3631 |
-
toggleObserving(false);
|
3632 |
-
Object.keys(result).forEach(function (key) {
|
3633 |
-
/* istanbul ignore else */
|
3634 |
-
{
|
3635 |
-
defineReactive(vm, key, result[key], function () {
|
3636 |
-
warn(
|
3637 |
-
"Avoid mutating an injected value directly since the changes will be " +
|
3638 |
-
"overwritten whenever the provided component re-renders. " +
|
3639 |
-
"injection being mutated: \"" + key + "\"",
|
3640 |
-
vm
|
3641 |
-
);
|
3642 |
-
});
|
3643 |
-
}
|
3644 |
-
});
|
3645 |
-
toggleObserving(true);
|
3646 |
}
|
3647 |
-
}
|
3648 |
|
3649 |
-
|
3650 |
-
if (inject) {
|
3651 |
-
// inject is :any because flow is not smart enough to figure out cached
|
3652 |
-
var result = Object.create(null);
|
3653 |
-
var keys = hasSymbol
|
3654 |
-
? Reflect.ownKeys(inject).filter(function (key) {
|
3655 |
-
/* istanbul ignore next */
|
3656 |
-
return Object.getOwnPropertyDescriptor(inject, key).enumerable
|
3657 |
-
})
|
3658 |
-
: Object.keys(inject);
|
3659 |
|
3660 |
-
|
3661 |
-
|
3662 |
-
|
3663 |
-
|
3664 |
-
|
3665 |
-
|
3666 |
-
|
3667 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3668 |
}
|
3669 |
-
|
3670 |
-
|
3671 |
-
|
3672 |
-
|
3673 |
-
|
3674 |
-
|
3675 |
-
? provideDefault.call(vm)
|
3676 |
-
: provideDefault;
|
3677 |
-
} else {
|
3678 |
-
warn(("Injection \"" + key + "\" not found"), vm);
|
3679 |
}
|
3680 |
}
|
3681 |
}
|
3682 |
-
|
3683 |
-
|
3684 |
-
}
|
3685 |
-
|
3686 |
-
/* */
|
3687 |
-
|
3688 |
-
/**
|
3689 |
-
* Runtime helper for rendering v-for lists.
|
3690 |
-
*/
|
3691 |
-
function renderList (
|
3692 |
-
val,
|
3693 |
-
render
|
3694 |
-
) {
|
3695 |
-
var ret, i, l, keys, key;
|
3696 |
-
if (Array.isArray(val) || typeof val === 'string') {
|
3697 |
-
ret = new Array(val.length);
|
3698 |
-
for (i = 0, l = val.length; i < l; i++) {
|
3699 |
-
ret[i] = render(val[i], i);
|
3700 |
-
}
|
3701 |
-
} else if (typeof val === 'number') {
|
3702 |
-
ret = new Array(val);
|
3703 |
-
for (i = 0; i < val; i++) {
|
3704 |
-
ret[i] = render(i + 1, i);
|
3705 |
-
}
|
3706 |
-
} else if (isObject(val)) {
|
3707 |
-
keys = Object.keys(val);
|
3708 |
-
ret = new Array(keys.length);
|
3709 |
-
for (i = 0, l = keys.length; i < l; i++) {
|
3710 |
-
key = keys[i];
|
3711 |
-
ret[i] = render(val[key], key, i);
|
3712 |
}
|
3713 |
-
}
|
3714 |
-
if (isDef(ret)) {
|
3715 |
(ret)._isVList = true;
|
|
|
3716 |
}
|
3717 |
-
return ret
|
3718 |
-
}
|
3719 |
|
3720 |
-
/* */
|
3721 |
|
3722 |
-
/**
|
3723 |
-
|
3724 |
-
|
3725 |
-
function renderSlot (
|
3726 |
-
|
3727 |
-
|
3728 |
-
|
3729 |
-
|
3730 |
-
) {
|
3731 |
-
|
3732 |
-
|
3733 |
-
|
3734 |
-
|
3735 |
-
|
3736 |
-
|
3737 |
-
|
3738 |
-
|
3739 |
-
|
3740 |
-
|
|
|
|
|
3741 |
}
|
3742 |
-
|
|
|
|
|
3743 |
}
|
3744 |
-
|
3745 |
-
|
3746 |
-
|
3747 |
-
|
3748 |
-
|
3749 |
-
|
3750 |
-
warn(
|
3751 |
-
"Duplicate presence of slot \"" + name + "\" found in the same render tree " +
|
3752 |
-
"- this will likely cause render errors.",
|
3753 |
-
this
|
3754 |
-
);
|
3755 |
-
}
|
3756 |
-
slotNodes._rendered = true;
|
3757 |
}
|
3758 |
-
nodes = slotNodes || fallback;
|
3759 |
}
|
3760 |
|
3761 |
-
|
3762 |
-
if (target) {
|
3763 |
-
return this.$createElement('template', { slot: target }, nodes)
|
3764 |
-
} else {
|
3765 |
-
return nodes
|
3766 |
-
}
|
3767 |
-
}
|
3768 |
|
3769 |
-
|
|
|
|
|
|
|
|
|
|
|
3770 |
|
3771 |
-
|
3772 |
-
* Runtime helper for resolving filters
|
3773 |
-
*/
|
3774 |
-
function resolveFilter (id) {
|
3775 |
-
return resolveAsset(this.$options, 'filters', id, true) || identity
|
3776 |
-
}
|
3777 |
|
3778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3779 |
|
3780 |
-
|
3781 |
-
|
3782 |
-
|
3783 |
-
|
3784 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3785 |
}
|
3786 |
-
}
|
3787 |
|
3788 |
-
|
3789 |
-
|
3790 |
-
|
3791 |
-
|
3792 |
-
|
3793 |
-
function
|
3794 |
-
|
3795 |
-
|
3796 |
-
|
3797 |
-
|
3798 |
-
|
3799 |
-
) {
|
3800 |
-
|
3801 |
-
|
3802 |
-
|
3803 |
-
|
3804 |
-
|
3805 |
-
|
3806 |
-
|
3807 |
-
|
3808 |
-
|
3809 |
-
|
3810 |
-
/* */
|
3811 |
-
|
3812 |
-
/**
|
3813 |
-
* Runtime helper for merging v-bind="object" into a VNode's data.
|
3814 |
-
*/
|
3815 |
-
function bindObjectProps (
|
3816 |
-
data,
|
3817 |
-
tag,
|
3818 |
-
value,
|
3819 |
-
asProp,
|
3820 |
-
isSync
|
3821 |
-
) {
|
3822 |
-
if (value) {
|
3823 |
-
if (!isObject(value)) {
|
3824 |
-
"development" !== 'production' && warn(
|
3825 |
-
'v-bind without argument expects an Object or Array value',
|
3826 |
-
this
|
3827 |
-
);
|
3828 |
-
} else {
|
3829 |
-
if (Array.isArray(value)) {
|
3830 |
-
value = toObject(value);
|
3831 |
-
}
|
3832 |
-
var hash;
|
3833 |
-
var loop = function ( key ) {
|
3834 |
-
if (
|
3835 |
-
key === 'class' ||
|
3836 |
-
key === 'style' ||
|
3837 |
-
isReservedAttribute(key)
|
3838 |
-
) {
|
3839 |
-
hash = data;
|
3840 |
-
} else {
|
3841 |
-
var type = data.attrs && data.attrs.type;
|
3842 |
-
hash = asProp || config.mustUseProp(tag, type, key)
|
3843 |
-
? data.domProps || (data.domProps = {})
|
3844 |
-
: data.attrs || (data.attrs = {});
|
3845 |
-
}
|
3846 |
-
if (!(key in hash)) {
|
3847 |
-
hash[key] = value[key];
|
3848 |
-
|
3849 |
-
if (isSync) {
|
3850 |
-
var on = data.on || (data.on = {});
|
3851 |
-
on[("update:" + key)] = function ($event) {
|
3852 |
-
value[key] = $event;
|
3853 |
-
};
|
3854 |
-
}
|
3855 |
}
|
3856 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3857 |
|
3858 |
-
|
|
|
3859 |
}
|
|
|
3860 |
}
|
3861 |
-
return data
|
3862 |
-
}
|
3863 |
|
3864 |
-
/* */
|
3865 |
|
3866 |
-
/**
|
3867 |
-
|
3868 |
-
|
3869 |
-
function renderStatic (
|
3870 |
-
|
3871 |
-
|
3872 |
-
) {
|
3873 |
-
|
3874 |
-
|
3875 |
-
|
3876 |
-
|
3877 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3878 |
return tree
|
3879 |
}
|
3880 |
-
// otherwise, render a fresh tree.
|
3881 |
-
tree = cached[index] = this.$options.staticRenderFns[index].call(
|
3882 |
-
this._renderProxy,
|
3883 |
-
null,
|
3884 |
-
this // for render fns generated for functional component templates
|
3885 |
-
);
|
3886 |
-
markStatic(tree, ("__static__" + index), false);
|
3887 |
-
return tree
|
3888 |
-
}
|
3889 |
|
3890 |
-
/**
|
3891 |
-
|
3892 |
-
|
3893 |
-
|
3894 |
-
function markOnce (
|
3895 |
-
|
3896 |
-
|
3897 |
-
|
3898 |
-
) {
|
3899 |
-
|
3900 |
-
|
3901 |
-
}
|
3902 |
-
|
3903 |
-
function markStatic (
|
3904 |
-
|
3905 |
-
|
3906 |
-
|
3907 |
-
) {
|
3908 |
-
|
3909 |
-
|
3910 |
-
|
3911 |
-
|
|
|
3912 |
}
|
|
|
|
|
3913 |
}
|
3914 |
-
} else {
|
3915 |
-
markStaticNode(tree, key, isOnce);
|
3916 |
}
|
3917 |
-
}
|
3918 |
|
3919 |
-
function markStaticNode (node, key, isOnce) {
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
}
|
3924 |
|
3925 |
-
/* */
|
3926 |
|
3927 |
-
function bindObjectListeners (data, value) {
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
|
3940 |
-
|
3941 |
-
}
|
3942 |
-
}
|
3943 |
-
return data
|
3944 |
-
}
|
3945 |
-
|
3946 |
-
/* */
|
3947 |
-
|
3948 |
-
function installRenderHelpers (target) {
|
3949 |
-
target._o = markOnce;
|
3950 |
-
target._n = toNumber;
|
3951 |
-
target._s = toString;
|
3952 |
-
target._l = renderList;
|
3953 |
-
target._t = renderSlot;
|
3954 |
-
target._q = looseEqual;
|
3955 |
-
target._i = looseIndexOf;
|
3956 |
-
target._m = renderStatic;
|
3957 |
-
target._f = resolveFilter;
|
3958 |
-
target._k = checkKeyCodes;
|
3959 |
-
target._b = bindObjectProps;
|
3960 |
-
target._v = createTextVNode;
|
3961 |
-
target._e = createEmptyVNode;
|
3962 |
-
target._u = resolveScopedSlots;
|
3963 |
-
target._g = bindObjectListeners;
|
3964 |
-
}
|
3965 |
-
|
3966 |
-
/* */
|
3967 |
-
|
3968 |
-
function FunctionalRenderContext (
|
3969 |
-
data,
|
3970 |
-
props,
|
3971 |
-
children,
|
3972 |
-
parent,
|
3973 |
-
Ctor
|
3974 |
-
) {
|
3975 |
-
var options = Ctor.options;
|
3976 |
-
// ensure the createElement function in functional components
|
3977 |
-
// gets a unique context - this is necessary for correct named slot check
|
3978 |
-
var contextVm;
|
3979 |
-
if (hasOwn(parent, '_uid')) {
|
3980 |
-
contextVm = Object.create(parent);
|
3981 |
-
// $flow-disable-line
|
3982 |
-
contextVm._original = parent;
|
3983 |
-
} else {
|
3984 |
-
// the context vm passed in is a functional context as well.
|
3985 |
-
// in this case we want to make sure we are able to get a hold to the
|
3986 |
-
// real context instance.
|
3987 |
-
contextVm = parent;
|
3988 |
-
// $flow-disable-line
|
3989 |
-
parent = parent._original;
|
3990 |
-
}
|
3991 |
-
var isCompiled = isTrue(options._compiled);
|
3992 |
-
var needNormalization = !isCompiled;
|
3993 |
-
|
3994 |
-
this.data = data;
|
3995 |
-
this.props = props;
|
3996 |
-
this.children = children;
|
3997 |
-
this.parent = parent;
|
3998 |
-
this.listeners = data.on || emptyObject;
|
3999 |
-
this.injections = resolveInject(options.inject, parent);
|
4000 |
-
this.slots = function () { return resolveSlots(children, parent); };
|
4001 |
-
|
4002 |
-
// support for compiled functional template
|
4003 |
-
if (isCompiled) {
|
4004 |
-
// exposing $options for renderStatic()
|
4005 |
-
this.$options = options;
|
4006 |
-
// pre-resolve slots for renderSlot()
|
4007 |
-
this.$slots = this.slots();
|
4008 |
-
this.$scopedSlots = data.scopedSlots || emptyObject;
|
4009 |
-
}
|
4010 |
-
|
4011 |
-
if (options._scopeId) {
|
4012 |
-
this._c = function (a, b, c, d) {
|
4013 |
-
var vnode = createElement(contextVm, a, b, c, d, needNormalization);
|
4014 |
-
if (vnode && !Array.isArray(vnode)) {
|
4015 |
-
vnode.fnScopeId = options._scopeId;
|
4016 |
-
vnode.fnContext = parent;
|
4017 |
}
|
4018 |
-
return vnode
|
4019 |
-
};
|
4020 |
-
} else {
|
4021 |
-
this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
|
4022 |
-
}
|
4023 |
-
}
|
4024 |
-
|
4025 |
-
installRenderHelpers(FunctionalRenderContext.prototype);
|
4026 |
-
|
4027 |
-
function createFunctionalComponent (
|
4028 |
-
Ctor,
|
4029 |
-
propsData,
|
4030 |
-
data,
|
4031 |
-
contextVm,
|
4032 |
-
children
|
4033 |
-
) {
|
4034 |
-
var options = Ctor.options;
|
4035 |
-
var props = {};
|
4036 |
-
var propOptions = options.props;
|
4037 |
-
if (isDef(propOptions)) {
|
4038 |
-
for (var key in propOptions) {
|
4039 |
-
props[key] = validateProp(key, propOptions, propsData || emptyObject);
|
4040 |
}
|
4041 |
-
|
4042 |
-
if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
|
4043 |
-
if (isDef(data.props)) { mergeProps(props, data.props); }
|
4044 |
}
|
4045 |
|
4046 |
-
|
4047 |
-
data,
|
4048 |
-
props,
|
4049 |
-
children,
|
4050 |
-
contextVm,
|
4051 |
-
Ctor
|
4052 |
-
);
|
4053 |
-
|
4054 |
-
var vnode = options.render.call(null, renderContext._c, renderContext);
|
4055 |
|
4056 |
-
|
4057 |
-
|
4058 |
-
|
4059 |
-
|
4060 |
-
|
4061 |
-
|
4062 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4063 |
}
|
4064 |
return res
|
4065 |
}
|
4066 |
-
}
|
4067 |
|
4068 |
-
|
4069 |
-
// #7817 clone node before setting fnContext, otherwise if the node is reused
|
4070 |
-
// (e.g. it was from a cached normal slot) the fnContext causes named slots
|
4071 |
-
// that should not be matched to match.
|
4072 |
-
var clone = cloneVNode(vnode);
|
4073 |
-
clone.fnContext = contextVm;
|
4074 |
-
clone.fnOptions = options;
|
4075 |
-
if (data.slot) {
|
4076 |
-
(clone.data || (clone.data = {})).slot = data.slot;
|
4077 |
-
}
|
4078 |
-
return clone
|
4079 |
-
}
|
4080 |
|
4081 |
-
function
|
4082 |
-
|
4083 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4084 |
}
|
4085 |
-
}
|
4086 |
-
|
4087 |
-
/* */
|
4088 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4089 |
|
|
|
4090 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4091 |
|
4092 |
-
|
4093 |
-
// The hook will be triggered by native, not javascript.
|
4094 |
-
|
4095 |
-
|
4096 |
-
// Updates the state of the component to weex native render engine.
|
4097 |
-
|
4098 |
-
/* */
|
4099 |
|
4100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4101 |
|
4102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4103 |
|
4104 |
-
|
|
|
|
|
|
|
|
|
|
|
4105 |
|
4106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4107 |
|
4108 |
-
|
4109 |
-
|
4110 |
-
|
4111 |
-
|
4112 |
-
|
4113 |
-
|
4114 |
-
|
4115 |
-
|
4116 |
-
|
4117 |
-
vnode.componentInstance &&
|
4118 |
-
!vnode.componentInstance._isDestroyed &&
|
4119 |
-
vnode.data.keepAlive
|
4120 |
-
) {
|
4121 |
-
// kept-alive components, treat as a patch
|
4122 |
-
var mountedNode = vnode; // work around flow
|
4123 |
-
componentVNodeHooks.prepatch(mountedNode, mountedNode);
|
4124 |
} else {
|
4125 |
-
|
4126 |
-
vnode,
|
4127 |
-
activeInstance,
|
4128 |
-
parentElm,
|
4129 |
-
refElm
|
4130 |
-
);
|
4131 |
-
child.$mount(hydrating ? vnode.elm : undefined, hydrating);
|
4132 |
-
}
|
4133 |
-
},
|
4134 |
-
|
4135 |
-
prepatch: function prepatch (oldVnode, vnode) {
|
4136 |
-
var options = vnode.componentOptions;
|
4137 |
-
var child = vnode.componentInstance = oldVnode.componentInstance;
|
4138 |
-
updateChildComponent(
|
4139 |
-
child,
|
4140 |
-
options.propsData, // updated props
|
4141 |
-
options.listeners, // updated listeners
|
4142 |
-
vnode, // new parent vnode
|
4143 |
-
options.children // new children
|
4144 |
-
);
|
4145 |
-
},
|
4146 |
-
|
4147 |
-
insert: function insert (vnode) {
|
4148 |
-
var context = vnode.context;
|
4149 |
-
var componentInstance = vnode.componentInstance;
|
4150 |
-
if (!componentInstance._isMounted) {
|
4151 |
-
componentInstance._isMounted = true;
|
4152 |
-
callHook(componentInstance, 'mounted');
|
4153 |
-
}
|
4154 |
-
if (vnode.data.keepAlive) {
|
4155 |
-
if (context._isMounted) {
|
4156 |
-
// vue-router#1212
|
4157 |
-
// During updates, a kept-alive component's child components may
|
4158 |
-
// change, so directly walking the tree here may call activated hooks
|
4159 |
-
// on incorrect children. Instead we push them into a queue which will
|
4160 |
-
// be processed after the whole patch process ended.
|
4161 |
-
queueActivatedComponent(componentInstance);
|
4162 |
-
} else {
|
4163 |
-
activateChildComponent(componentInstance, true /* direct */);
|
4164 |
-
}
|
4165 |
}
|
4166 |
-
}
|
4167 |
|
4168 |
-
|
4169 |
-
|
4170 |
-
|
4171 |
-
|
4172 |
-
|
4173 |
-
|
4174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4175 |
}
|
|
|
|
|
|
|
4176 |
}
|
4177 |
-
}
|
4178 |
-
};
|
4179 |
|
4180 |
-
var
|
4181 |
-
|
4182 |
-
|
4183 |
-
|
4184 |
-
|
4185 |
-
|
4186 |
-
|
4187 |
-
tag
|
4188 |
-
) {
|
4189 |
-
if (isUndef(Ctor)) {
|
4190 |
-
return
|
4191 |
-
}
|
4192 |
|
4193 |
-
|
4194 |
|
4195 |
-
|
4196 |
-
|
4197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4198 |
}
|
4199 |
|
4200 |
-
|
4201 |
-
|
4202 |
-
|
|
|
|
|
|
|
|
|
4203 |
{
|
4204 |
-
|
4205 |
-
}
|
4206 |
-
return
|
4207 |
-
}
|
4208 |
-
|
4209 |
-
// async component
|
4210 |
-
var asyncFactory;
|
4211 |
-
if (isUndef(Ctor.cid)) {
|
4212 |
-
asyncFactory = Ctor;
|
4213 |
-
Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);
|
4214 |
-
if (Ctor === undefined) {
|
4215 |
-
// return a placeholder node for async component, which is rendered
|
4216 |
-
// as a comment node but preserves all the raw information for the node.
|
4217 |
-
// the information will be used for async server-rendering and hydration.
|
4218 |
-
return createAsyncPlaceholder(
|
4219 |
-
asyncFactory,
|
4220 |
-
data,
|
4221 |
-
context,
|
4222 |
-
children,
|
4223 |
-
tag
|
4224 |
-
)
|
4225 |
}
|
|
|
|
|
|
|
|
|
4226 |
}
|
4227 |
|
4228 |
-
|
4229 |
-
|
4230 |
-
|
4231 |
-
|
4232 |
-
resolveConstructorOptions(Ctor);
|
4233 |
-
|
4234 |
-
// transform component v-model data into props & events
|
4235 |
-
if (isDef(data.model)) {
|
4236 |
-
transformModel(Ctor.options, data);
|
4237 |
}
|
4238 |
|
4239 |
-
|
4240 |
-
var propsData = extractPropsFromVNodeData(data, Ctor, tag);
|
4241 |
|
4242 |
-
|
4243 |
-
if (isTrue(Ctor.options.functional)) {
|
4244 |
-
return createFunctionalComponent(Ctor, propsData, data, context, children)
|
4245 |
-
}
|
4246 |
|
4247 |
-
|
4248 |
-
// child component listeners instead of DOM listeners
|
4249 |
-
var listeners = data.on;
|
4250 |
-
// replace with listeners with .native modifier
|
4251 |
-
// so it gets processed during parent component patch.
|
4252 |
-
data.on = data.nativeOn;
|
4253 |
|
4254 |
-
|
4255 |
-
// abstract components do not keep anything
|
4256 |
-
// other than props & listeners & slot
|
4257 |
|
4258 |
-
|
4259 |
-
|
4260 |
-
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4265 |
|
4266 |
-
|
4267 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4268 |
|
4269 |
-
|
4270 |
-
|
4271 |
-
|
4272 |
-
|
4273 |
-
|
4274 |
-
|
4275 |
-
|
4276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4277 |
|
4278 |
-
|
4279 |
-
|
4280 |
-
|
4281 |
-
|
4282 |
-
|
4283 |
-
}
|
4284 |
-
|
4285 |
-
|
4286 |
-
|
4287 |
-
|
4288 |
-
parentElm,
|
4289 |
-
refElm
|
4290 |
-
) {
|
4291 |
-
var options = {
|
4292 |
-
_isComponent: true,
|
4293 |
-
parent: parent,
|
4294 |
-
_parentVnode: vnode,
|
4295 |
-
_parentElm: parentElm || null,
|
4296 |
-
_refElm: refElm || null
|
4297 |
};
|
4298 |
-
|
4299 |
-
var
|
4300 |
-
|
4301 |
-
|
4302 |
-
|
4303 |
-
|
4304 |
-
|
4305 |
-
|
4306 |
-
|
4307 |
-
|
4308 |
-
|
4309 |
-
|
4310 |
-
|
4311 |
-
|
4312 |
-
|
4313 |
-
|
4314 |
-
|
4315 |
-
|
4316 |
-
|
4317 |
-
|
4318 |
-
|
4319 |
-
|
4320 |
-
|
4321 |
-
|
4322 |
-
|
4323 |
-
|
4324 |
-
|
4325 |
-
|
4326 |
-
}
|
4327 |
-
|
4328 |
-
|
4329 |
-
|
4330 |
-
|
4331 |
-
|
4332 |
-
|
4333 |
-
|
4334 |
-
//
|
4335 |
-
|
4336 |
-
|
4337 |
-
|
4338 |
-
|
4339 |
-
|
4340 |
-
|
4341 |
-
|
4342 |
-
|
4343 |
-
|
4344 |
-
|
4345 |
-
|
4346 |
-
|
4347 |
-
|
4348 |
-
|
4349 |
-
|
4350 |
-
|
4351 |
-
|
4352 |
-
|
4353 |
-
|
4354 |
-
|
4355 |
-
|
4356 |
-
|
4357 |
-
|
4358 |
-
|
4359 |
-
|
4360 |
-
|
4361 |
-
|
4362 |
-
|
4363 |
-
|
4364 |
-
|
4365 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4366 |
);
|
4367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4368 |
}
|
4369 |
-
|
4370 |
-
|
4371 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4372 |
}
|
4373 |
-
|
4374 |
-
|
4375 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4376 |
}
|
4377 |
-
|
4378 |
-
|
4379 |
-
|
|
|
|
|
|
|
|
|
4380 |
) {
|
4381 |
-
{
|
4382 |
warn(
|
4383 |
-
|
4384 |
-
'
|
4385 |
context
|
4386 |
);
|
|
|
4387 |
}
|
4388 |
-
|
4389 |
-
|
4390 |
-
|
4391 |
-
|
4392 |
-
|
4393 |
-
|
4394 |
-
|
4395 |
-
|
4396 |
-
|
4397 |
-
|
4398 |
-
|
4399 |
-
|
4400 |
-
|
4401 |
-
|
4402 |
-
|
4403 |
-
|
4404 |
-
|
4405 |
-
|
4406 |
-
|
4407 |
-
|
4408 |
-
|
4409 |
-
|
4410 |
-
|
4411 |
-
|
4412 |
-
|
4413 |
-
|
4414 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4415 |
} else {
|
4416 |
-
//
|
4417 |
-
|
4418 |
-
|
4419 |
-
|
4420 |
-
|
4421 |
-
|
4422 |
-
);
|
|
|
|
|
|
|
|
|
4423 |
}
|
4424 |
-
} else {
|
4425 |
-
// direct component options / constructor
|
4426 |
-
vnode = createComponent(tag, data, context, children);
|
4427 |
}
|
4428 |
-
|
4429 |
-
|
4430 |
-
|
4431 |
-
if (
|
4432 |
-
|
4433 |
-
|
4434 |
-
|
4435 |
-
|
4436 |
-
|
4437 |
-
|
4438 |
-
|
4439 |
-
|
4440 |
-
|
4441 |
-
|
4442 |
-
|
4443 |
-
|
4444 |
-
|
4445 |
-
}
|
4446 |
-
|
4447 |
-
|
4448 |
-
|
4449 |
-
|
4450 |
-
|
4451 |
-
|
4452 |
-
|
4453 |
-
}
|
4454 |
-
|
4455 |
-
|
4456 |
-
|
4457 |
-
// ref #5318
|
4458 |
-
// necessary to ensure parent re-render when deep bindings like :style and
|
4459 |
-
// :class are used on slot nodes
|
4460 |
-
function registerDeepBindings (data) {
|
4461 |
-
if (isObject(data.style)) {
|
4462 |
-
traverse(data.style);
|
4463 |
-
}
|
4464 |
-
if (isObject(data.class)) {
|
4465 |
-
traverse(data.class);
|
4466 |
-
}
|
4467 |
-
}
|
4468 |
-
|
4469 |
-
/* */
|
4470 |
-
|
4471 |
-
function initRender (vm) {
|
4472 |
-
vm._vnode = null; // the root of the child tree
|
4473 |
-
vm._staticTrees = null; // v-once cached trees
|
4474 |
-
var options = vm.$options;
|
4475 |
-
var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
|
4476 |
-
var renderContext = parentVnode && parentVnode.context;
|
4477 |
-
vm.$slots = resolveSlots(options._renderChildren, renderContext);
|
4478 |
-
vm.$scopedSlots = emptyObject;
|
4479 |
-
// bind the createElement fn to this instance
|
4480 |
-
// so that we get proper render context inside it.
|
4481 |
-
// args order: tag, data, children, normalizationType, alwaysNormalize
|
4482 |
-
// internal version is used by render functions compiled from templates
|
4483 |
-
vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
|
4484 |
-
// normalization is always applied for the public version, used in
|
4485 |
-
// user-written render functions.
|
4486 |
-
vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
|
4487 |
-
|
4488 |
-
// $attrs & $listeners are exposed for easier HOC creation.
|
4489 |
-
// they need to be reactive so that HOCs using them are always updated
|
4490 |
-
var parentData = parentVnode && parentVnode.data;
|
4491 |
-
|
4492 |
-
/* istanbul ignore else */
|
4493 |
-
{
|
4494 |
-
defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
|
4495 |
-
!isUpdatingChildComponent && warn("$attrs is readonly.", vm);
|
4496 |
-
}, true);
|
4497 |
-
defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () {
|
4498 |
-
!isUpdatingChildComponent && warn("$listeners is readonly.", vm);
|
4499 |
-
}, true);
|
4500 |
}
|
4501 |
-
}
|
4502 |
|
4503 |
-
|
4504 |
-
// install runtime convenience helpers
|
4505 |
-
installRenderHelpers(Vue.prototype);
|
4506 |
|
4507 |
-
|
4508 |
-
|
4509 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4510 |
|
4511 |
-
|
4512 |
-
|
4513 |
-
var
|
4514 |
-
var render = ref.render;
|
4515 |
-
var _parentVnode = ref._parentVnode;
|
4516 |
|
4517 |
-
|
4518 |
{
|
4519 |
-
|
4520 |
-
|
4521 |
-
|
4522 |
-
|
|
|
|
|
4523 |
}
|
|
|
4524 |
|
4525 |
-
|
4526 |
-
vm.$scopedSlots = _parentVnode.data.scopedSlots || emptyObject;
|
4527 |
-
}
|
4528 |
|
4529 |
-
|
4530 |
-
//
|
4531 |
-
|
4532 |
-
|
4533 |
-
|
4534 |
-
|
4535 |
-
|
4536 |
-
|
4537 |
-
|
4538 |
-
|
4539 |
-
|
4540 |
-
|
4541 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4542 |
if (vm.$options.renderError) {
|
4543 |
try {
|
4544 |
vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
|
@@ -4549,6399 +3564,8402 @@ function renderMixin (Vue) {
|
|
4549 |
} else {
|
4550 |
vnode = vm._vnode;
|
4551 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4552 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4553 |
}
|
4554 |
-
|
4555 |
-
if (
|
4556 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4557 |
warn(
|
4558 |
-
|
4559 |
-
|
4560 |
-
vm
|
4561 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4562 |
}
|
4563 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4564 |
}
|
4565 |
-
// set parent
|
4566 |
-
vnode.parent = _parentVnode;
|
4567 |
-
return vnode
|
4568 |
};
|
4569 |
-
}
|
4570 |
|
4571 |
-
|
|
|
|
|
|
|
|
|
4572 |
|
4573 |
-
|
|
|
|
|
|
|
|
|
4574 |
|
4575 |
-
|
4576 |
-
|
4577 |
-
var vm = this;
|
4578 |
-
// a uid
|
4579 |
-
vm._uid = uid$3++;
|
4580 |
|
4581 |
-
var
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
|
4587 |
-
|
4588 |
-
|
4589 |
-
|
4590 |
-
|
4591 |
-
|
4592 |
-
|
4593 |
-
|
4594 |
-
|
4595 |
-
|
4596 |
-
|
4597 |
-
|
4598 |
-
|
4599 |
-
|
4600 |
-
options || {},
|
4601 |
-
vm
|
4602 |
-
);
|
4603 |
}
|
4604 |
-
/* istanbul ignore else */
|
4605 |
-
{
|
4606 |
-
initProxy(vm);
|
4607 |
-
}
|
4608 |
-
// expose real self
|
4609 |
-
vm._self = vm;
|
4610 |
-
initLifecycle(vm);
|
4611 |
-
initEvents(vm);
|
4612 |
-
initRender(vm);
|
4613 |
-
callHook(vm, 'beforeCreate');
|
4614 |
-
initInjections(vm); // resolve injections before data/props
|
4615 |
-
initState(vm);
|
4616 |
-
initProvide(vm); // resolve provide after data/props
|
4617 |
-
callHook(vm, 'created');
|
4618 |
|
4619 |
-
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4624 |
}
|
4625 |
|
4626 |
-
if (
|
4627 |
-
|
|
|
|
|
|
|
|
|
4628 |
}
|
4629 |
-
|
4630 |
-
|
4631 |
-
|
4632 |
-
|
4633 |
-
|
4634 |
-
|
4635 |
-
|
4636 |
-
opts.parent = options.parent;
|
4637 |
-
opts._parentVnode = parentVnode;
|
4638 |
-
opts._parentElm = options._parentElm;
|
4639 |
-
opts._refElm = options._refElm;
|
4640 |
-
|
4641 |
-
var vnodeComponentOptions = parentVnode.componentOptions;
|
4642 |
-
opts.propsData = vnodeComponentOptions.propsData;
|
4643 |
-
opts._parentListeners = vnodeComponentOptions.listeners;
|
4644 |
-
opts._renderChildren = vnodeComponentOptions.children;
|
4645 |
-
opts._componentTag = vnodeComponentOptions.tag;
|
4646 |
-
|
4647 |
-
if (options.render) {
|
4648 |
-
opts.render = options.render;
|
4649 |
-
opts.staticRenderFns = options.staticRenderFns;
|
4650 |
-
}
|
4651 |
-
}
|
4652 |
-
|
4653 |
-
function resolveConstructorOptions (Ctor) {
|
4654 |
-
var options = Ctor.options;
|
4655 |
-
if (Ctor.super) {
|
4656 |
-
var superOptions = resolveConstructorOptions(Ctor.super);
|
4657 |
-
var cachedSuperOptions = Ctor.superOptions;
|
4658 |
-
if (superOptions !== cachedSuperOptions) {
|
4659 |
-
// super option changed,
|
4660 |
-
// need to resolve new options.
|
4661 |
-
Ctor.superOptions = superOptions;
|
4662 |
-
// check if there are any late-modified/attached options (#4976)
|
4663 |
-
var modifiedOptions = resolveModifiedOptions(Ctor);
|
4664 |
-
// update base extend options
|
4665 |
-
if (modifiedOptions) {
|
4666 |
-
extend(Ctor.extendOptions, modifiedOptions);
|
4667 |
-
}
|
4668 |
-
options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
|
4669 |
-
if (options.name) {
|
4670 |
-
options.components[options.name] = Ctor;
|
4671 |
-
}
|
4672 |
-
}
|
4673 |
-
}
|
4674 |
-
return options
|
4675 |
-
}
|
4676 |
-
|
4677 |
-
function resolveModifiedOptions (Ctor) {
|
4678 |
-
var modified;
|
4679 |
-
var latest = Ctor.options;
|
4680 |
-
var extended = Ctor.extendOptions;
|
4681 |
-
var sealed = Ctor.sealedOptions;
|
4682 |
-
for (var key in latest) {
|
4683 |
-
if (latest[key] !== sealed[key]) {
|
4684 |
-
if (!modified) { modified = {}; }
|
4685 |
-
modified[key] = dedupe(latest[key], extended[key], sealed[key]);
|
4686 |
-
}
|
4687 |
-
}
|
4688 |
-
return modified
|
4689 |
-
}
|
4690 |
-
|
4691 |
-
function dedupe (latest, extended, sealed) {
|
4692 |
-
// compare latest and sealed to ensure lifecycle hooks won't be duplicated
|
4693 |
-
// between merges
|
4694 |
-
if (Array.isArray(latest)) {
|
4695 |
-
var res = [];
|
4696 |
-
sealed = Array.isArray(sealed) ? sealed : [sealed];
|
4697 |
-
extended = Array.isArray(extended) ? extended : [extended];
|
4698 |
-
for (var i = 0; i < latest.length; i++) {
|
4699 |
-
// push original options and not sealed options to exclude duplicated options
|
4700 |
-
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) {
|
4701 |
-
res.push(latest[i]);
|
4702 |
}
|
4703 |
}
|
4704 |
-
return res
|
4705 |
-
} else {
|
4706 |
-
return latest
|
4707 |
}
|
4708 |
-
}
|
4709 |
|
4710 |
-
|
4711 |
-
if ("development" !== 'production' &&
|
4712 |
-
!(this instanceof Vue)
|
4713 |
-
) {
|
4714 |
-
warn('Vue is a constructor and should be called with the `new` keyword');
|
4715 |
-
}
|
4716 |
-
this._init(options);
|
4717 |
-
}
|
4718 |
-
|
4719 |
-
initMixin(Vue);
|
4720 |
-
stateMixin(Vue);
|
4721 |
-
eventsMixin(Vue);
|
4722 |
-
lifecycleMixin(Vue);
|
4723 |
-
renderMixin(Vue);
|
4724 |
-
|
4725 |
-
/* */
|
4726 |
|
4727 |
-
function
|
4728 |
-
|
4729 |
-
|
4730 |
-
|
4731 |
-
|
|
|
|
|
|
|
4732 |
}
|
4733 |
-
|
4734 |
-
|
4735 |
-
|
4736 |
-
|
4737 |
-
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
|
|
4741 |
}
|
4742 |
-
|
4743 |
-
return
|
4744 |
-
}
|
4745 |
-
}
|
4746 |
|
4747 |
-
|
|
|
|
|
4748 |
|
4749 |
-
function
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
}
|
|
|
|
|
|
|
|
|
4755 |
|
4756 |
-
|
|
|
|
|
|
|
4757 |
|
4758 |
-
|
4759 |
-
/**
|
4760 |
-
* Each instance constructor, including Vue, has a unique
|
4761 |
-
* cid. This enables us to create wrapped "child
|
4762 |
-
* constructors" for prototypal inheritance and cache them.
|
4763 |
-
*/
|
4764 |
-
Vue.cid = 0;
|
4765 |
-
var cid = 1;
|
4766 |
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
|
4771 |
-
extendOptions = extendOptions || {};
|
4772 |
-
var Super = this;
|
4773 |
-
var SuperId = Super.cid;
|
4774 |
-
var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
|
4775 |
-
if (cachedCtors[SuperId]) {
|
4776 |
-
return cachedCtors[SuperId]
|
4777 |
}
|
4778 |
-
|
4779 |
-
|
4780 |
-
|
4781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4782 |
}
|
4783 |
|
4784 |
-
|
4785 |
-
|
4786 |
-
|
4787 |
-
|
4788 |
-
|
4789 |
-
|
4790 |
-
Sub.options = mergeOptions(
|
4791 |
-
Super.options,
|
4792 |
-
extendOptions
|
4793 |
-
);
|
4794 |
-
Sub['super'] = Super;
|
4795 |
-
|
4796 |
-
// For props and computed properties, we define the proxy getters on
|
4797 |
-
// the Vue instances at extension time, on the extended prototype. This
|
4798 |
-
// avoids Object.defineProperty calls for each instance created.
|
4799 |
-
if (Sub.options.props) {
|
4800 |
-
initProps$1(Sub);
|
4801 |
}
|
4802 |
-
|
4803 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4804 |
}
|
|
|
4805 |
|
4806 |
-
|
4807 |
-
|
4808 |
-
|
4809 |
-
|
4810 |
-
|
4811 |
-
|
4812 |
-
|
4813 |
-
|
4814 |
-
|
4815 |
-
|
4816 |
-
|
4817 |
-
|
4818 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4819 |
}
|
4820 |
-
|
4821 |
-
// keep a reference to the super options at extension time.
|
4822 |
-
// later at instantiation we can check if Super's options have
|
4823 |
-
// been updated.
|
4824 |
-
Sub.superOptions = Super.options;
|
4825 |
-
Sub.extendOptions = extendOptions;
|
4826 |
-
Sub.sealedOptions = extend({}, Sub.options);
|
4827 |
-
|
4828 |
-
// cache constructor
|
4829 |
-
cachedCtors[SuperId] = Sub;
|
4830 |
-
return Sub
|
4831 |
-
};
|
4832 |
-
}
|
4833 |
-
|
4834 |
-
function initProps$1 (Comp) {
|
4835 |
-
var props = Comp.options.props;
|
4836 |
-
for (var key in props) {
|
4837 |
-
proxy(Comp.prototype, "_props", key);
|
4838 |
}
|
4839 |
-
}
|
4840 |
|
4841 |
-
function
|
4842 |
-
|
4843 |
-
|
4844 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4845 |
}
|
4846 |
-
}
|
4847 |
|
4848 |
-
|
|
|
|
|
|
|
4849 |
|
4850 |
-
|
4851 |
-
/**
|
4852 |
-
* Create asset registration methods.
|
4853 |
-
*/
|
4854 |
-
ASSET_TYPES.forEach(function (type) {
|
4855 |
-
Vue[type] = function (
|
4856 |
-
id,
|
4857 |
-
definition
|
4858 |
-
) {
|
4859 |
-
if (!definition) {
|
4860 |
-
return this.options[type + 's'][id]
|
4861 |
-
} else {
|
4862 |
-
/* istanbul ignore if */
|
4863 |
-
if ("development" !== 'production' && type === 'component') {
|
4864 |
-
validateComponentName(id);
|
4865 |
-
}
|
4866 |
-
if (type === 'component' && isPlainObject(definition)) {
|
4867 |
-
definition.name = definition.name || id;
|
4868 |
-
definition = this.options._base.extend(definition);
|
4869 |
-
}
|
4870 |
-
if (type === 'directive' && typeof definition === 'function') {
|
4871 |
-
definition = { bind: definition, update: definition };
|
4872 |
-
}
|
4873 |
-
this.options[type + 's'][id] = definition;
|
4874 |
-
return definition
|
4875 |
-
}
|
4876 |
-
};
|
4877 |
-
});
|
4878 |
-
}
|
4879 |
|
4880 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4881 |
|
4882 |
-
|
4883 |
-
return opts && (opts.Ctor.options.name || opts.tag)
|
4884 |
-
}
|
4885 |
|
4886 |
-
|
4887 |
-
|
4888 |
-
|
4889 |
-
|
4890 |
-
|
4891 |
-
} else if (isRegExp(pattern)) {
|
4892 |
-
return pattern.test(name)
|
4893 |
-
}
|
4894 |
-
/* istanbul ignore next */
|
4895 |
-
return false
|
4896 |
-
}
|
4897 |
-
|
4898 |
-
function pruneCache (keepAliveInstance, filter) {
|
4899 |
-
var cache = keepAliveInstance.cache;
|
4900 |
-
var keys = keepAliveInstance.keys;
|
4901 |
-
var _vnode = keepAliveInstance._vnode;
|
4902 |
-
for (var key in cache) {
|
4903 |
-
var cachedNode = cache[key];
|
4904 |
-
if (cachedNode) {
|
4905 |
-
var name = getComponentName(cachedNode.componentOptions);
|
4906 |
-
if (name && !filter(name)) {
|
4907 |
-
pruneCacheEntry(cache, key, keys, _vnode);
|
4908 |
-
}
|
4909 |
-
}
|
4910 |
-
}
|
4911 |
-
}
|
4912 |
-
|
4913 |
-
function pruneCacheEntry (
|
4914 |
-
cache,
|
4915 |
-
key,
|
4916 |
-
keys,
|
4917 |
-
current
|
4918 |
-
) {
|
4919 |
-
var cached$$1 = cache[key];
|
4920 |
-
if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
|
4921 |
-
cached$$1.componentInstance.$destroy();
|
4922 |
-
}
|
4923 |
-
cache[key] = null;
|
4924 |
-
remove(keys, key);
|
4925 |
-
}
|
4926 |
-
|
4927 |
-
var patternTypes = [String, RegExp, Array];
|
4928 |
-
|
4929 |
-
var KeepAlive = {
|
4930 |
-
name: 'keep-alive',
|
4931 |
-
abstract: true,
|
4932 |
-
|
4933 |
-
props: {
|
4934 |
-
include: patternTypes,
|
4935 |
-
exclude: patternTypes,
|
4936 |
-
max: [String, Number]
|
4937 |
-
},
|
4938 |
-
|
4939 |
-
created: function created () {
|
4940 |
-
this.cache = Object.create(null);
|
4941 |
-
this.keys = [];
|
4942 |
-
},
|
4943 |
-
|
4944 |
-
destroyed: function destroyed () {
|
4945 |
-
var this$1 = this;
|
4946 |
|
4947 |
-
|
4948 |
-
|
|
|
|
|
4949 |
}
|
4950 |
-
}
|
4951 |
|
4952 |
-
|
4953 |
-
|
|
|
|
|
4954 |
|
4955 |
-
|
4956 |
-
|
4957 |
-
|
4958 |
-
|
4959 |
-
|
4960 |
-
|
4961 |
-
|
4962 |
-
|
4963 |
-
|
4964 |
-
var
|
4965 |
-
var
|
4966 |
-
var
|
4967 |
-
|
4968 |
-
|
4969 |
-
|
4970 |
-
|
4971 |
-
|
4972 |
-
|
4973 |
-
if (
|
4974 |
-
|
4975 |
-
|
4976 |
-
|
4977 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4978 |
) {
|
4979 |
-
|
4980 |
-
|
4981 |
-
|
4982 |
-
|
4983 |
-
|
4984 |
-
|
4985 |
-
|
4986 |
-
// same constructor may get registered as different local components
|
4987 |
-
// so cid alone is not enough (#3269)
|
4988 |
-
? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
|
4989 |
-
: vnode.key;
|
4990 |
-
if (cache[key]) {
|
4991 |
-
vnode.componentInstance = cache[key].componentInstance;
|
4992 |
-
// make current key freshest
|
4993 |
-
remove(keys, key);
|
4994 |
-
keys.push(key);
|
4995 |
} else {
|
4996 |
-
|
4997 |
-
|
4998 |
-
|
4999 |
-
|
5000 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5001 |
}
|
5002 |
}
|
|
|
5003 |
|
5004 |
-
|
|
|
|
|
|
|
5005 |
}
|
5006 |
-
return vnode || (slot && slot[0])
|
5007 |
-
}
|
5008 |
-
}
|
5009 |
|
5010 |
-
|
5011 |
-
|
5012 |
-
|
|
|
5013 |
|
5014 |
-
|
|
|
|
|
|
|
|
|
5015 |
|
5016 |
-
|
5017 |
-
// config
|
5018 |
-
var configDef = {};
|
5019 |
-
configDef.get = function () { return config; };
|
5020 |
-
{
|
5021 |
-
configDef.set = function () {
|
5022 |
-
warn(
|
5023 |
-
'Do not replace the Vue.config object, set individual fields instead.'
|
5024 |
-
);
|
5025 |
-
};
|
5026 |
}
|
5027 |
-
Object.defineProperty(Vue, 'config', configDef);
|
5028 |
|
5029 |
-
|
5030 |
-
|
5031 |
-
|
5032 |
-
|
5033 |
-
|
5034 |
-
|
5035 |
-
|
5036 |
-
|
5037 |
-
|
5038 |
-
|
5039 |
-
|
5040 |
-
Vue.delete = del;
|
5041 |
-
Vue.nextTick = nextTick;
|
5042 |
-
|
5043 |
-
Vue.options = Object.create(null);
|
5044 |
-
ASSET_TYPES.forEach(function (type) {
|
5045 |
-
Vue.options[type + 's'] = Object.create(null);
|
5046 |
-
});
|
5047 |
|
5048 |
-
|
5049 |
-
// components with in Weex's multi-instance scenarios.
|
5050 |
-
Vue.options._base = Vue;
|
5051 |
|
5052 |
-
extend(Vue.options.components, builtInComponents);
|
5053 |
|
5054 |
-
initUse(Vue);
|
5055 |
-
initMixin$1(Vue);
|
5056 |
-
initExtend(Vue);
|
5057 |
-
initAssetRegisters(Vue);
|
5058 |
-
}
|
5059 |
|
5060 |
-
|
|
|
|
|
|
|
|
|
5061 |
|
5062 |
-
|
5063 |
-
|
5064 |
-
|
|
|
|
|
|
|
|
|
|
|
5065 |
|
5066 |
-
|
5067 |
-
|
5068 |
-
|
5069 |
-
return this.$vnode && this.$vnode.ssrContext
|
5070 |
}
|
5071 |
-
});
|
5072 |
|
5073 |
-
|
5074 |
-
|
5075 |
-
|
5076 |
-
|
|
|
|
|
|
|
5077 |
|
5078 |
-
|
|
|
|
|
|
|
|
|
5079 |
|
5080 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5081 |
|
5082 |
-
|
5083 |
-
|
5084 |
-
|
|
|
|
|
5085 |
|
5086 |
-
|
5087 |
-
|
5088 |
-
|
5089 |
-
|
5090 |
-
|
5091 |
-
|
5092 |
-
|
5093 |
-
|
5094 |
-
|
5095 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5096 |
|
5097 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5098 |
|
5099 |
-
|
5100 |
-
|
5101 |
-
|
5102 |
-
|
5103 |
-
|
5104 |
-
|
5105 |
-
|
5106 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
5107 |
|
5108 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
5109 |
|
5110 |
-
var
|
5111 |
-
|
5112 |
-
|
|
|
5113 |
|
5114 |
-
var
|
5115 |
-
|
5116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5117 |
|
5118 |
-
|
5119 |
-
|
5120 |
-
};
|
5121 |
|
5122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5123 |
|
5124 |
-
function
|
5125 |
-
|
5126 |
-
|
5127 |
-
|
5128 |
-
|
5129 |
-
|
5130 |
-
|
5131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5132 |
}
|
5133 |
}
|
5134 |
-
|
5135 |
-
|
5136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5137 |
}
|
|
|
|
|
|
|
|
|
5138 |
}
|
5139 |
-
return renderClass(data.staticClass, data.class)
|
5140 |
-
}
|
5141 |
|
5142 |
-
function
|
5143 |
-
|
5144 |
-
|
5145 |
-
|
5146 |
-
|
5147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5148 |
}
|
5149 |
-
}
|
5150 |
|
5151 |
-
function
|
5152 |
-
|
5153 |
-
|
5154 |
-
) {
|
5155 |
-
|
5156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5157 |
}
|
5158 |
-
/* istanbul ignore next */
|
5159 |
-
return ''
|
5160 |
-
}
|
5161 |
|
5162 |
-
|
5163 |
-
return a ? b ? (a + ' ' + b) : a : (b || '')
|
5164 |
-
}
|
5165 |
|
5166 |
-
|
5167 |
-
|
5168 |
-
|
5169 |
-
|
5170 |
-
|
5171 |
-
|
5172 |
-
|
5173 |
-
|
5174 |
-
|
5175 |
-
|
5176 |
-
|
5177 |
-
|
5178 |
-
|
5179 |
-
|
5180 |
-
|
5181 |
-
|
5182 |
-
|
5183 |
-
|
5184 |
-
|
5185 |
-
|
5186 |
-
|
5187 |
-
|
5188 |
-
|
5189 |
-
|
5190 |
-
|
5191 |
-
|
5192 |
-
|
5193 |
-
|
5194 |
-
|
5195 |
-
|
5196 |
-
if (res) { res += ' '; }
|
5197 |
-
res += key;
|
5198 |
-
}
|
5199 |
-
}
|
5200 |
-
return res
|
5201 |
-
}
|
5202 |
-
|
5203 |
-
/* */
|
5204 |
-
|
5205 |
-
var namespaceMap = {
|
5206 |
-
svg: 'http://www.w3.org/2000/svg',
|
5207 |
-
math: 'http://www.w3.org/1998/Math/MathML'
|
5208 |
-
};
|
5209 |
-
|
5210 |
-
var isHTMLTag = makeMap(
|
5211 |
-
'html,body,base,head,link,meta,style,title,' +
|
5212 |
-
'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
|
5213 |
-
'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
|
5214 |
-
'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
|
5215 |
-
's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
|
5216 |
-
'embed,object,param,source,canvas,script,noscript,del,ins,' +
|
5217 |
-
'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
|
5218 |
-
'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
|
5219 |
-
'output,progress,select,textarea,' +
|
5220 |
-
'details,dialog,menu,menuitem,summary,' +
|
5221 |
-
'content,element,shadow,template,blockquote,iframe,tfoot'
|
5222 |
-
);
|
5223 |
-
|
5224 |
-
// this map is intentionally selective, only covering SVG elements that may
|
5225 |
-
// contain child elements.
|
5226 |
-
var isSVG = makeMap(
|
5227 |
-
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
|
5228 |
-
'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
|
5229 |
-
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
|
5230 |
-
true
|
5231 |
-
);
|
5232 |
-
|
5233 |
-
var isPreTag = function (tag) { return tag === 'pre'; };
|
5234 |
-
|
5235 |
-
var isReservedTag = function (tag) {
|
5236 |
-
return isHTMLTag(tag) || isSVG(tag)
|
5237 |
-
};
|
5238 |
-
|
5239 |
-
function getTagNamespace (tag) {
|
5240 |
-
if (isSVG(tag)) {
|
5241 |
-
return 'svg'
|
5242 |
-
}
|
5243 |
-
// basic support for MathML
|
5244 |
-
// note it doesn't support other MathML elements being component roots
|
5245 |
-
if (tag === 'math') {
|
5246 |
-
return 'math'
|
5247 |
-
}
|
5248 |
-
}
|
5249 |
-
|
5250 |
-
var unknownElementCache = Object.create(null);
|
5251 |
-
function isUnknownElement (tag) {
|
5252 |
-
/* istanbul ignore if */
|
5253 |
-
if (!inBrowser) {
|
5254 |
-
return true
|
5255 |
-
}
|
5256 |
-
if (isReservedTag(tag)) {
|
5257 |
-
return false
|
5258 |
-
}
|
5259 |
-
tag = tag.toLowerCase();
|
5260 |
-
/* istanbul ignore if */
|
5261 |
-
if (unknownElementCache[tag] != null) {
|
5262 |
-
return unknownElementCache[tag]
|
5263 |
-
}
|
5264 |
-
var el = document.createElement(tag);
|
5265 |
-
if (tag.indexOf('-') > -1) {
|
5266 |
-
// http://stackoverflow.com/a/28210364/1070244
|
5267 |
-
return (unknownElementCache[tag] = (
|
5268 |
-
el.constructor === window.HTMLUnknownElement ||
|
5269 |
-
el.constructor === window.HTMLElement
|
5270 |
-
))
|
5271 |
-
} else {
|
5272 |
-
return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
|
5273 |
}
|
5274 |
-
}
|
5275 |
-
|
5276 |
-
var isTextInputType = makeMap('text,number,password,search,email,tel,url');
|
5277 |
-
|
5278 |
-
/* */
|
5279 |
|
5280 |
-
/**
|
5281 |
-
|
5282 |
-
|
5283 |
-
function
|
5284 |
-
|
5285 |
-
|
5286 |
-
|
5287 |
-
|
5288 |
-
|
5289 |
-
)
|
5290 |
-
|
|
|
5291 |
}
|
5292 |
-
return selected
|
5293 |
-
} else {
|
5294 |
-
return el
|
5295 |
}
|
5296 |
-
}
|
5297 |
|
5298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5299 |
|
5300 |
-
|
5301 |
-
var elm = document.createElement(tagName);
|
5302 |
-
if (tagName !== 'select') {
|
5303 |
-
return elm
|
5304 |
-
}
|
5305 |
-
// false or null will remove the attribute but undefined will not
|
5306 |
-
if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
|
5307 |
-
elm.setAttribute('multiple', 'multiple');
|
5308 |
-
}
|
5309 |
-
return elm
|
5310 |
-
}
|
5311 |
-
|
5312 |
-
function createElementNS (namespace, tagName) {
|
5313 |
-
return document.createElementNS(namespaceMap[namespace], tagName)
|
5314 |
-
}
|
5315 |
-
|
5316 |
-
function createTextNode (text) {
|
5317 |
-
return document.createTextNode(text)
|
5318 |
-
}
|
5319 |
-
|
5320 |
-
function createComment (text) {
|
5321 |
-
return document.createComment(text)
|
5322 |
-
}
|
5323 |
-
|
5324 |
-
function insertBefore (parentNode, newNode, referenceNode) {
|
5325 |
-
parentNode.insertBefore(newNode, referenceNode);
|
5326 |
-
}
|
5327 |
-
|
5328 |
-
function removeChild (node, child) {
|
5329 |
-
node.removeChild(child);
|
5330 |
-
}
|
5331 |
-
|
5332 |
-
function appendChild (node, child) {
|
5333 |
-
node.appendChild(child);
|
5334 |
-
}
|
5335 |
-
|
5336 |
-
function parentNode (node) {
|
5337 |
-
return node.parentNode
|
5338 |
-
}
|
5339 |
-
|
5340 |
-
function nextSibling (node) {
|
5341 |
-
return node.nextSibling
|
5342 |
-
}
|
5343 |
-
|
5344 |
-
function tagName (node) {
|
5345 |
-
return node.tagName
|
5346 |
-
}
|
5347 |
-
|
5348 |
-
function setTextContent (node, text) {
|
5349 |
-
node.textContent = text;
|
5350 |
-
}
|
5351 |
-
|
5352 |
-
function setStyleScope (node, scopeId) {
|
5353 |
-
node.setAttribute(scopeId, '');
|
5354 |
-
}
|
5355 |
-
|
5356 |
-
|
5357 |
-
var nodeOps = Object.freeze({
|
5358 |
-
createElement: createElement$1,
|
5359 |
-
createElementNS: createElementNS,
|
5360 |
-
createTextNode: createTextNode,
|
5361 |
-
createComment: createComment,
|
5362 |
-
insertBefore: insertBefore,
|
5363 |
-
removeChild: removeChild,
|
5364 |
-
appendChild: appendChild,
|
5365 |
-
parentNode: parentNode,
|
5366 |
-
nextSibling: nextSibling,
|
5367 |
-
tagName: tagName,
|
5368 |
-
setTextContent: setTextContent,
|
5369 |
-
setStyleScope: setStyleScope
|
5370 |
-
});
|
5371 |
-
|
5372 |
-
/* */
|
5373 |
-
|
5374 |
-
var ref = {
|
5375 |
-
create: function create (_, vnode) {
|
5376 |
-
registerRef(vnode);
|
5377 |
-
},
|
5378 |
-
update: function update (oldVnode, vnode) {
|
5379 |
-
if (oldVnode.data.ref !== vnode.data.ref) {
|
5380 |
-
registerRef(oldVnode, true);
|
5381 |
-
registerRef(vnode);
|
5382 |
-
}
|
5383 |
-
},
|
5384 |
-
destroy: function destroy (vnode) {
|
5385 |
-
registerRef(vnode, true);
|
5386 |
-
}
|
5387 |
-
}
|
5388 |
|
5389 |
-
function registerRef (vnode, isRemoval) {
|
5390 |
-
var key = vnode.data.ref;
|
5391 |
-
if (!isDef(key)) { return }
|
5392 |
|
5393 |
-
|
5394 |
-
|
5395 |
-
|
5396 |
-
|
5397 |
-
|
5398 |
-
|
5399 |
-
|
5400 |
-
|
5401 |
-
|
5402 |
-
|
5403 |
-
|
5404 |
-
|
5405 |
-
|
5406 |
-
|
5407 |
-
|
5408 |
-
|
|
|
|
|
|
|
5409 |
}
|
5410 |
-
} else {
|
5411 |
-
refs[key] = ref;
|
5412 |
}
|
5413 |
-
}
|
5414 |
-
}
|
5415 |
|
5416 |
-
|
5417 |
-
|
5418 |
-
* Simon Friis Vindum (@paldepind)
|
5419 |
-
* Licensed under the MIT License
|
5420 |
-
* https://github.com/paldepind/snabbdom/blob/master/LICENSE
|
5421 |
-
*
|
5422 |
-
* modified by Evan You (@yyx990803)
|
5423 |
-
*
|
5424 |
-
* Not type-checking this because this file is perf-critical and the cost
|
5425 |
-
* of making flow understand it is not worth it.
|
5426 |
-
*/
|
5427 |
|
5428 |
-
|
5429 |
-
|
5430 |
-
|
5431 |
-
|
5432 |
-
|
5433 |
-
|
5434 |
-
|
5435 |
-
|
5436 |
-
|
5437 |
-
a.isComment === b.isComment &&
|
5438 |
-
isDef(a.data) === isDef(b.data) &&
|
5439 |
-
sameInputType(a, b)
|
5440 |
-
) || (
|
5441 |
-
isTrue(a.isAsyncPlaceholder) &&
|
5442 |
-
a.asyncFactory === b.asyncFactory &&
|
5443 |
-
isUndef(b.asyncFactory.error)
|
5444 |
-
)
|
5445 |
-
)
|
5446 |
-
)
|
5447 |
-
}
|
5448 |
|
5449 |
-
|
5450 |
-
|
5451 |
-
|
5452 |
-
|
5453 |
-
|
5454 |
-
return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
|
5455 |
-
}
|
5456 |
|
5457 |
-
function
|
5458 |
-
|
5459 |
-
var map = {};
|
5460 |
-
for (i = beginIdx; i <= endIdx; ++i) {
|
5461 |
-
key = children[i].key;
|
5462 |
-
if (isDef(key)) { map[key] = i; }
|
5463 |
}
|
5464 |
-
return map
|
5465 |
-
}
|
5466 |
|
5467 |
-
function
|
5468 |
-
|
5469 |
-
|
5470 |
|
5471 |
-
|
5472 |
-
|
|
|
5473 |
|
5474 |
-
|
5475 |
-
|
5476 |
-
|
5477 |
-
|
5478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5479 |
}
|
5480 |
}
|
5481 |
}
|
5482 |
|
5483 |
-
function
|
5484 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5485 |
}
|
5486 |
|
5487 |
-
|
5488 |
-
|
5489 |
-
|
5490 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5491 |
}
|
5492 |
}
|
5493 |
-
remove.listeners = listeners;
|
5494 |
-
return remove
|
5495 |
-
}
|
5496 |
|
5497 |
-
|
5498 |
-
|
5499 |
-
|
5500 |
-
|
5501 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5502 |
}
|
|
|
|
|
|
|
5503 |
}
|
5504 |
|
5505 |
-
function
|
5506 |
-
|
5507 |
-
|
5508 |
-
|
5509 |
-
|
5510 |
-
|
5511 |
-
|
5512 |
-
|
5513 |
-
|
5514 |
-
|
5515 |
-
|
5516 |
-
)
|
5517 |
-
|
5518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5519 |
}
|
5520 |
|
5521 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5522 |
|
5523 |
-
function
|
5524 |
-
|
5525 |
-
|
5526 |
-
|
5527 |
-
refElm,
|
5528 |
-
nested,
|
5529 |
-
ownerArray,
|
5530 |
-
index
|
5531 |
) {
|
5532 |
-
|
5533 |
-
|
5534 |
-
|
5535 |
-
|
5536 |
-
|
5537 |
-
// associated DOM element for it.
|
5538 |
-
vnode = ownerArray[index] = cloneVNode(vnode);
|
5539 |
-
}
|
5540 |
|
5541 |
-
|
5542 |
-
|
5543 |
-
|
5544 |
-
|
|
|
5545 |
|
5546 |
-
|
5547 |
-
|
5548 |
-
|
5549 |
-
|
5550 |
-
|
5551 |
-
|
5552 |
-
|
5553 |
-
|
5554 |
-
|
5555 |
-
|
5556 |
-
|
5557 |
-
|
5558 |
-
|
5559 |
-
|
5560 |
-
|
5561 |
-
|
|
|
|
|
|
|
5562 |
}
|
|
|
5563 |
|
5564 |
-
|
5565 |
-
|
5566 |
-
|
5567 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5568 |
|
5569 |
-
|
5570 |
-
|
5571 |
-
|
5572 |
-
|
5573 |
-
|
5574 |
-
|
5575 |
-
|
5576 |
-
}
|
5577 |
|
5578 |
-
|
5579 |
-
|
5580 |
-
|
5581 |
-
} else if (isTrue(vnode.isComment)) {
|
5582 |
-
vnode.elm = nodeOps.createComment(vnode.text);
|
5583 |
-
insert(parentElm, vnode.elm, refElm);
|
5584 |
-
} else {
|
5585 |
-
vnode.elm = nodeOps.createTextNode(vnode.text);
|
5586 |
-
insert(parentElm, vnode.elm, refElm);
|
5587 |
}
|
5588 |
-
}
|
5589 |
|
5590 |
-
|
5591 |
-
|
5592 |
-
if (
|
5593 |
-
|
5594 |
-
if (isDef(i = i.hook) && isDef(i = i.init)) {
|
5595 |
-
i(vnode, false /* hydrating */, parentElm, refElm);
|
5596 |
-
}
|
5597 |
-
// after calling the init hook, if the vnode is a child component
|
5598 |
-
// it should've created a child instance and mounted it. the child
|
5599 |
-
// component also has set the placeholder vnode's elm.
|
5600 |
-
// in that case we can just return the element and be done.
|
5601 |
-
if (isDef(vnode.componentInstance)) {
|
5602 |
-
initComponent(vnode, insertedVnodeQueue);
|
5603 |
-
if (isTrue(isReactivated)) {
|
5604 |
-
reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
|
5605 |
-
}
|
5606 |
-
return true
|
5607 |
-
}
|
5608 |
}
|
5609 |
}
|
5610 |
|
5611 |
-
|
5612 |
-
|
5613 |
-
|
5614 |
-
|
5615 |
-
|
5616 |
-
|
5617 |
-
|
5618 |
-
|
5619 |
-
|
5620 |
-
|
5621 |
-
|
5622 |
-
|
5623 |
-
|
5624 |
-
|
5625 |
-
|
|
|
|
|
|
|
|
|
|
|
5626 |
}
|
5627 |
}
|
5628 |
|
5629 |
-
|
5630 |
-
|
5631 |
-
|
5632 |
-
|
5633 |
-
|
5634 |
-
|
5635 |
-
|
5636 |
-
|
5637 |
-
innerNode = innerNode.componentInstance._vnode;
|
5638 |
-
if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
|
5639 |
-
for (i = 0; i < cbs.activate.length; ++i) {
|
5640 |
-
cbs.activate[i](emptyNode, innerNode);
|
5641 |
-
}
|
5642 |
-
insertedVnodeQueue.push(innerNode);
|
5643 |
-
break
|
5644 |
}
|
5645 |
}
|
5646 |
-
// unlike a newly created component,
|
5647 |
-
// a reactivated keep-alive component doesn't insert itself
|
5648 |
-
insert(parentElm, vnode.elm, refElm);
|
5649 |
}
|
5650 |
|
5651 |
-
|
5652 |
-
|
5653 |
-
|
5654 |
-
|
5655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5656 |
}
|
5657 |
-
}
|
5658 |
-
nodeOps.appendChild(parent, elm);
|
5659 |
-
}
|
5660 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5661 |
}
|
5662 |
|
5663 |
-
function
|
5664 |
-
|
5665 |
-
|
5666 |
-
|
5667 |
-
|
5668 |
-
|
5669 |
-
|
5670 |
-
|
5671 |
-
|
5672 |
-
|
5673 |
-
|
5674 |
}
|
5675 |
|
5676 |
-
function
|
5677 |
-
|
5678 |
-
|
5679 |
}
|
5680 |
-
|
|
|
|
|
|
|
|
|
|
|
5681 |
}
|
5682 |
|
5683 |
-
|
5684 |
-
|
5685 |
-
|
5686 |
-
|
5687 |
-
|
5688 |
-
|
5689 |
-
|
5690 |
-
|
|
|
|
|
|
|
|
|
5691 |
}
|
5692 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5693 |
|
5694 |
-
|
5695 |
-
|
5696 |
-
|
5697 |
-
|
5698 |
-
|
5699 |
-
|
5700 |
-
|
5701 |
-
|
5702 |
-
|
5703 |
-
|
5704 |
-
|
5705 |
-
|
|
|
|
|
|
|
|
|
5706 |
}
|
5707 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5708 |
}
|
5709 |
}
|
5710 |
-
// for slot content they should also get the scopeId from the host instance.
|
5711 |
-
if (isDef(i = activeInstance) &&
|
5712 |
-
i !== vnode.context &&
|
5713 |
-
i !== vnode.fnContext &&
|
5714 |
-
isDef(i = i.$options._scopeId)
|
5715 |
-
) {
|
5716 |
-
nodeOps.setStyleScope(vnode.elm, i);
|
5717 |
-
}
|
5718 |
}
|
5719 |
|
5720 |
-
|
5721 |
-
for (; startIdx <= endIdx; ++startIdx) {
|
5722 |
-
createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
|
5723 |
-
}
|
5724 |
-
}
|
5725 |
|
5726 |
-
|
5727 |
-
|
5728 |
-
|
5729 |
-
|
5730 |
-
|
5731 |
-
|
5732 |
-
|
5733 |
-
if (isDef(i = vnode.children)) {
|
5734 |
-
for (j = 0; j < vnode.children.length; ++j) {
|
5735 |
-
invokeDestroyHook(vnode.children[j]);
|
5736 |
-
}
|
5737 |
-
}
|
5738 |
}
|
5739 |
|
5740 |
-
function
|
5741 |
-
|
5742 |
-
|
5743 |
-
|
5744 |
-
|
5745 |
-
|
5746 |
-
|
5747 |
-
|
5748 |
-
removeNode(ch.elm);
|
5749 |
-
}
|
5750 |
-
}
|
5751 |
-
}
|
5752 |
}
|
5753 |
|
5754 |
-
function
|
5755 |
-
|
5756 |
-
|
5757 |
-
|
5758 |
-
if (
|
5759 |
-
|
5760 |
-
// increase the listeners count
|
5761 |
-
rm.listeners += listeners;
|
5762 |
-
} else {
|
5763 |
-
// directly removing
|
5764 |
-
rm = createRmCb(vnode.elm, listeners);
|
5765 |
-
}
|
5766 |
-
// recursively invoke hooks on child component root node
|
5767 |
-
if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
|
5768 |
-
removeAndInvokeRemoveHook(i, rm);
|
5769 |
-
}
|
5770 |
-
for (i = 0; i < cbs.remove.length; ++i) {
|
5771 |
-
cbs.remove[i](vnode, rm);
|
5772 |
}
|
5773 |
-
if (
|
5774 |
-
|
5775 |
-
} else {
|
5776 |
-
rm();
|
5777 |
}
|
5778 |
-
} else {
|
5779 |
-
removeNode(vnode.elm);
|
5780 |
}
|
|
|
5781 |
}
|
5782 |
|
5783 |
-
|
5784 |
-
|
5785 |
-
|
5786 |
-
|
5787 |
-
var oldStartVnode = oldCh[0];
|
5788 |
-
var oldEndVnode = oldCh[oldEndIdx];
|
5789 |
-
var newEndIdx = newCh.length - 1;
|
5790 |
-
var newStartVnode = newCh[0];
|
5791 |
-
var newEndVnode = newCh[newEndIdx];
|
5792 |
-
var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
|
5793 |
|
5794 |
-
|
5795 |
-
// to ensure removed elements stay in correct relative positions
|
5796 |
-
// during leaving transitions
|
5797 |
-
var canMove = !removeOnly;
|
5798 |
|
5799 |
-
|
5800 |
-
|
5801 |
-
|
5802 |
-
|
5803 |
-
|
5804 |
-
if (
|
5805 |
-
|
5806 |
-
|
5807 |
-
oldEndVnode = oldCh[--oldEndIdx];
|
5808 |
-
} else if (sameVnode(oldStartVnode, newStartVnode)) {
|
5809 |
-
patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
|
5810 |
-
oldStartVnode = oldCh[++oldStartIdx];
|
5811 |
-
newStartVnode = newCh[++newStartIdx];
|
5812 |
-
} else if (sameVnode(oldEndVnode, newEndVnode)) {
|
5813 |
-
patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
|
5814 |
-
oldEndVnode = oldCh[--oldEndIdx];
|
5815 |
-
newEndVnode = newCh[--newEndIdx];
|
5816 |
-
} else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
|
5817 |
-
patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
|
5818 |
-
canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
|
5819 |
-
oldStartVnode = oldCh[++oldStartIdx];
|
5820 |
-
newEndVnode = newCh[--newEndIdx];
|
5821 |
-
} else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
|
5822 |
-
patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
|
5823 |
-
canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
|
5824 |
-
oldEndVnode = oldCh[--oldEndIdx];
|
5825 |
-
newStartVnode = newCh[++newStartIdx];
|
5826 |
-
} else {
|
5827 |
-
if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
|
5828 |
-
idxInOld = isDef(newStartVnode.key)
|
5829 |
-
? oldKeyToIdx[newStartVnode.key]
|
5830 |
-
: findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
|
5831 |
-
if (isUndef(idxInOld)) { // New element
|
5832 |
-
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
|
5833 |
-
} else {
|
5834 |
-
vnodeToMove = oldCh[idxInOld];
|
5835 |
-
if (sameVnode(vnodeToMove, newStartVnode)) {
|
5836 |
-
patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue);
|
5837 |
-
oldCh[idxInOld] = undefined;
|
5838 |
-
canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
|
5839 |
-
} else {
|
5840 |
-
// same key but different element. treat as new element
|
5841 |
-
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
|
5842 |
-
}
|
5843 |
-
}
|
5844 |
-
newStartVnode = newCh[++newStartIdx];
|
5845 |
}
|
5846 |
-
}
|
5847 |
-
|
5848 |
-
|
5849 |
-
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
5850 |
-
} else if (newStartIdx > newEndIdx) {
|
5851 |
-
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
|
5852 |
-
}
|
5853 |
-
}
|
5854 |
|
5855 |
-
|
5856 |
-
|
5857 |
-
|
5858 |
-
|
5859 |
-
|
5860 |
-
|
5861 |
-
|
5862 |
-
|
5863 |
-
("Duplicate keys detected: '" + key + "'. This may cause an update error."),
|
5864 |
-
vnode.context
|
5865 |
-
);
|
5866 |
-
} else {
|
5867 |
-
seenKeys[key] = true;
|
5868 |
-
}
|
5869 |
-
}
|
5870 |
-
}
|
5871 |
}
|
5872 |
|
5873 |
-
|
5874 |
-
|
5875 |
-
|
5876 |
-
|
5877 |
}
|
5878 |
-
|
5879 |
-
|
5880 |
-
function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
|
5881 |
-
if (oldVnode === vnode) {
|
5882 |
-
return
|
5883 |
}
|
|
|
|
|
5884 |
|
5885 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5886 |
|
5887 |
-
if (
|
5888 |
-
|
5889 |
-
|
5890 |
-
|
5891 |
-
|
|
|
|
|
|
|
|
|
|
|
5892 |
}
|
5893 |
-
return
|
5894 |
-
}
|
5895 |
-
|
5896 |
-
// reuse element for static trees.
|
5897 |
-
// note we only do this if the vnode is cloned -
|
5898 |
-
// if the new node is not cloned it means the render functions have been
|
5899 |
-
// reset by the hot-reload-api and we need to do a proper re-render.
|
5900 |
-
if (isTrue(vnode.isStatic) &&
|
5901 |
-
isTrue(oldVnode.isStatic) &&
|
5902 |
-
vnode.key === oldVnode.key &&
|
5903 |
-
(isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
|
5904 |
-
) {
|
5905 |
-
vnode.componentInstance = oldVnode.componentInstance;
|
5906 |
-
return
|
5907 |
}
|
5908 |
|
5909 |
-
|
5910 |
-
|
5911 |
-
if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
|
5912 |
-
i(oldVnode, vnode);
|
5913 |
}
|
5914 |
|
5915 |
-
var
|
5916 |
-
|
5917 |
-
|
5918 |
-
|
5919 |
-
if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
|
5920 |
-
}
|
5921 |
-
if (isUndef(vnode.text)) {
|
5922 |
-
if (isDef(oldCh) && isDef(ch)) {
|
5923 |
-
if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
|
5924 |
-
} else if (isDef(ch)) {
|
5925 |
-
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
5926 |
-
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
5927 |
-
} else if (isDef(oldCh)) {
|
5928 |
-
removeVnodes(elm, oldCh, 0, oldCh.length - 1);
|
5929 |
-
} else if (isDef(oldVnode.text)) {
|
5930 |
-
nodeOps.setTextContent(elm, '');
|
5931 |
}
|
5932 |
-
} else if (oldVnode.text !== vnode.text) {
|
5933 |
-
nodeOps.setTextContent(elm, vnode.text);
|
5934 |
-
}
|
5935 |
-
if (isDef(data)) {
|
5936 |
-
if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
|
5937 |
}
|
|
|
5938 |
}
|
5939 |
|
5940 |
-
|
5941 |
-
|
5942 |
-
|
5943 |
-
|
5944 |
-
|
|
|
|
|
|
|
|
|
|
|
5945 |
} else {
|
5946 |
-
|
5947 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5948 |
}
|
5949 |
}
|
5950 |
-
}
|
5951 |
-
|
5952 |
-
var hydrationBailed = false;
|
5953 |
-
// list of modules that can skip create hook during hydration because they
|
5954 |
-
// are already rendered on the client or has no need for initialization
|
5955 |
-
// Note: style is excluded because it relies on initial clone for future
|
5956 |
-
// deep updates (#7063).
|
5957 |
-
var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
|
5958 |
|
5959 |
-
|
5960 |
-
function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
|
5961 |
-
var i;
|
5962 |
-
var tag = vnode.tag;
|
5963 |
-
var data = vnode.data;
|
5964 |
-
var children = vnode.children;
|
5965 |
-
inVPre = inVPre || (data && data.pre);
|
5966 |
-
vnode.elm = elm;
|
5967 |
|
5968 |
-
|
5969 |
-
|
5970 |
-
|
5971 |
-
|
5972 |
-
|
5973 |
-
|
5974 |
-
if (!assertNodeMatch(elm, vnode, inVPre)) {
|
5975 |
-
return false
|
5976 |
-
}
|
5977 |
-
}
|
5978 |
-
if (isDef(data)) {
|
5979 |
-
if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
|
5980 |
-
if (isDef(i = vnode.componentInstance)) {
|
5981 |
-
// child component. it should have hydrated its own tree.
|
5982 |
-
initComponent(vnode, insertedVnodeQueue);
|
5983 |
-
return true
|
5984 |
-
}
|
5985 |
}
|
5986 |
-
|
5987 |
-
|
5988 |
-
|
5989 |
-
|
5990 |
-
|
5991 |
-
} else {
|
5992 |
-
// v-html and domProps: innerHTML
|
5993 |
-
if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
|
5994 |
-
if (i !== elm.innerHTML) {
|
5995 |
-
/* istanbul ignore if */
|
5996 |
-
if ("development" !== 'production' &&
|
5997 |
-
typeof console !== 'undefined' &&
|
5998 |
-
!hydrationBailed
|
5999 |
-
) {
|
6000 |
-
hydrationBailed = true;
|
6001 |
-
console.warn('Parent: ', elm);
|
6002 |
-
console.warn('server innerHTML: ', i);
|
6003 |
-
console.warn('client innerHTML: ', elm.innerHTML);
|
6004 |
-
}
|
6005 |
-
return false
|
6006 |
-
}
|
6007 |
-
} else {
|
6008 |
-
// iterate and compare children lists
|
6009 |
-
var childrenMatch = true;
|
6010 |
-
var childNode = elm.firstChild;
|
6011 |
-
for (var i$1 = 0; i$1 < children.length; i$1++) {
|
6012 |
-
if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
|
6013 |
-
childrenMatch = false;
|
6014 |
-
break
|
6015 |
-
}
|
6016 |
-
childNode = childNode.nextSibling;
|
6017 |
-
}
|
6018 |
-
// if childNode is not null, it means the actual childNodes list is
|
6019 |
-
// longer than the virtual children list.
|
6020 |
-
if (!childrenMatch || childNode) {
|
6021 |
-
/* istanbul ignore if */
|
6022 |
-
if ("development" !== 'production' &&
|
6023 |
-
typeof console !== 'undefined' &&
|
6024 |
-
!hydrationBailed
|
6025 |
-
) {
|
6026 |
-
hydrationBailed = true;
|
6027 |
-
console.warn('Parent: ', elm);
|
6028 |
-
console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
|
6029 |
-
}
|
6030 |
-
return false
|
6031 |
-
}
|
6032 |
-
}
|
6033 |
-
}
|
6034 |
-
}
|
6035 |
-
if (isDef(data)) {
|
6036 |
-
var fullInvoke = false;
|
6037 |
-
for (var key in data) {
|
6038 |
-
if (!isRenderedModule(key)) {
|
6039 |
-
fullInvoke = true;
|
6040 |
-
invokeCreateHooks(vnode, insertedVnodeQueue);
|
6041 |
-
break
|
6042 |
-
}
|
6043 |
-
}
|
6044 |
-
if (!fullInvoke && data['class']) {
|
6045 |
-
// ensure collecting deps for deep class bindings for future updates
|
6046 |
-
traverse(data['class']);
|
6047 |
-
}
|
6048 |
}
|
6049 |
-
} else if (elm.data !== vnode.text) {
|
6050 |
-
elm.data = vnode.text;
|
6051 |
}
|
6052 |
-
|
6053 |
-
}
|
6054 |
|
6055 |
-
function
|
6056 |
-
|
6057 |
-
|
6058 |
-
!isUnknownElement$$1(vnode, inVPre) &&
|
6059 |
-
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
|
6060 |
-
)
|
6061 |
-
} else {
|
6062 |
-
return node.nodeType === (vnode.isComment ? 8 : 3)
|
6063 |
-
}
|
6064 |
-
}
|
6065 |
|
6066 |
-
|
6067 |
-
|
6068 |
-
|
6069 |
return
|
6070 |
}
|
6071 |
|
6072 |
-
var
|
6073 |
-
var
|
|
|
|
|
6074 |
|
6075 |
-
if
|
6076 |
-
|
6077 |
-
isInitialPatch = true;
|
6078 |
-
createElm(vnode, insertedVnodeQueue, parentElm, refElm);
|
6079 |
-
} else {
|
6080 |
-
var isRealElement = isDef(oldVnode.nodeType);
|
6081 |
-
if (!isRealElement && sameVnode(oldVnode, vnode)) {
|
6082 |
-
// patch existing root node
|
6083 |
-
patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);
|
6084 |
-
} else {
|
6085 |
-
if (isRealElement) {
|
6086 |
-
// mounting to a real element
|
6087 |
-
// check if this is server-rendered content and if we can perform
|
6088 |
-
// a successful hydration.
|
6089 |
-
if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
|
6090 |
-
oldVnode.removeAttribute(SSR_ATTR);
|
6091 |
-
hydrating = true;
|
6092 |
-
}
|
6093 |
-
if (isTrue(hydrating)) {
|
6094 |
-
if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
|
6095 |
-
invokeInsertHook(vnode, insertedVnodeQueue, true);
|
6096 |
-
return oldVnode
|
6097 |
-
} else {
|
6098 |
-
warn(
|
6099 |
-
'The client-side rendered virtual DOM tree is not matching ' +
|
6100 |
-
'server-rendered content. This is likely caused by incorrect ' +
|
6101 |
-
'HTML markup, for example nesting block-level elements inside ' +
|
6102 |
-
'<p>, or missing <tbody>. Bailing hydration and performing ' +
|
6103 |
-
'full client-side render.'
|
6104 |
-
);
|
6105 |
-
}
|
6106 |
-
}
|
6107 |
-
// either not server-rendered, or hydration failed.
|
6108 |
-
// create an empty node and replace it
|
6109 |
-
oldVnode = emptyNodeAt(oldVnode);
|
6110 |
-
}
|
6111 |
|
6112 |
-
|
6113 |
-
var oldElm = oldVnode.elm;
|
6114 |
-
var parentElm$1 = nodeOps.parentNode(oldElm);
|
6115 |
|
6116 |
-
|
6117 |
-
|
6118 |
-
|
6119 |
-
|
6120 |
-
|
6121 |
-
|
6122 |
-
// keep-alive + HOCs. (#4590)
|
6123 |
-
oldElm._leaveCb ? null : parentElm$1,
|
6124 |
-
nodeOps.nextSibling(oldElm)
|
6125 |
-
);
|
6126 |
|
6127 |
-
|
6128 |
-
if (isDef(vnode.parent)) {
|
6129 |
-
var ancestor = vnode.parent;
|
6130 |
-
var patchable = isPatchable(vnode);
|
6131 |
-
while (ancestor) {
|
6132 |
-
for (var i = 0; i < cbs.destroy.length; ++i) {
|
6133 |
-
cbs.destroy[i](ancestor);
|
6134 |
-
}
|
6135 |
-
ancestor.elm = vnode.elm;
|
6136 |
-
if (patchable) {
|
6137 |
-
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
|
6138 |
-
cbs.create[i$1](emptyNode, ancestor);
|
6139 |
-
}
|
6140 |
-
// #6513
|
6141 |
-
// invoke insert hooks that may have been merged by create hooks.
|
6142 |
-
// e.g. for directives that uses the "inserted" hook.
|
6143 |
-
var insert = ancestor.data.hook.insert;
|
6144 |
-
if (insert.merged) {
|
6145 |
-
// start at index 1 to avoid re-invoking component mounted hook
|
6146 |
-
for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
|
6147 |
-
insert.fns[i$2]();
|
6148 |
-
}
|
6149 |
-
}
|
6150 |
-
} else {
|
6151 |
-
registerRef(ancestor);
|
6152 |
-
}
|
6153 |
-
ancestor = ancestor.parent;
|
6154 |
-
}
|
6155 |
-
}
|
6156 |
|
6157 |
-
|
6158 |
-
|
6159 |
-
|
6160 |
-
|
6161 |
-
|
6162 |
-
|
|
|
|
|
|
|
|
|
6163 |
}
|
6164 |
}
|
6165 |
-
|
6166 |
-
invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
|
6167 |
-
return vnode.elm
|
6168 |
}
|
6169 |
-
}
|
6170 |
|
6171 |
-
|
6172 |
-
|
6173 |
-
|
6174 |
-
|
6175 |
-
update: updateDirectives,
|
6176 |
-
destroy: function unbindDirectives (vnode) {
|
6177 |
-
updateDirectives(vnode, emptyNode);
|
6178 |
-
}
|
6179 |
-
}
|
6180 |
|
6181 |
-
|
6182 |
-
if (oldVnode.data.directives || vnode.data.directives) {
|
6183 |
-
_update(oldVnode, vnode);
|
6184 |
-
}
|
6185 |
-
}
|
6186 |
|
6187 |
-
|
6188 |
-
var isCreate = oldVnode === emptyNode;
|
6189 |
-
var isDestroy = vnode === emptyNode;
|
6190 |
-
var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
|
6191 |
-
var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
|
6192 |
|
6193 |
-
|
6194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6195 |
|
6196 |
-
|
6197 |
-
|
6198 |
-
|
6199 |
-
|
6200 |
-
|
6201 |
-
|
6202 |
-
callHook$1(dir, 'bind', vnode, oldVnode);
|
6203 |
-
if (dir.def && dir.def.inserted) {
|
6204 |
-
dirsWithInsert.push(dir);
|
6205 |
}
|
6206 |
} else {
|
6207 |
-
|
6208 |
-
|
6209 |
-
|
6210 |
-
if (dir.def && dir.def.componentUpdated) {
|
6211 |
-
dirsWithPostpatch.push(dir);
|
6212 |
}
|
6213 |
}
|
6214 |
}
|
6215 |
|
6216 |
-
|
6217 |
-
|
6218 |
-
|
6219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6220 |
}
|
6221 |
-
};
|
6222 |
-
if (isCreate) {
|
6223 |
-
mergeVNodeHook(vnode, 'insert', callInsert);
|
6224 |
} else {
|
6225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6226 |
}
|
6227 |
}
|
6228 |
|
6229 |
-
|
6230 |
-
mergeVNodeHook(vnode, 'postpatch', function () {
|
6231 |
-
for (var i = 0; i < dirsWithPostpatch.length; i++) {
|
6232 |
-
callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
|
6233 |
-
}
|
6234 |
-
});
|
6235 |
-
}
|
6236 |
|
6237 |
-
|
6238 |
-
|
6239 |
-
|
6240 |
-
|
6241 |
-
|
|
|
|
|
|
|
|
|
6242 |
}
|
|
|
|
|
|
|
|
|
6243 |
}
|
6244 |
}
|
6245 |
-
}
|
6246 |
-
|
6247 |
-
var emptyModifiers = Object.create(null);
|
6248 |
|
6249 |
-
function
|
6250 |
-
|
6251 |
-
|
6252 |
-
)
|
6253 |
-
|
6254 |
-
|
6255 |
-
|
6256 |
-
|
6257 |
-
}
|
6258 |
-
var i, dir;
|
6259 |
-
for (i = 0; i < dirs.length; i++) {
|
6260 |
-
dir = dirs[i];
|
6261 |
-
if (!dir.modifiers) {
|
6262 |
-
// $flow-disable-line
|
6263 |
-
dir.modifiers = emptyModifiers;
|
6264 |
}
|
6265 |
-
|
6266 |
-
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
|
6267 |
-
}
|
6268 |
-
// $flow-disable-line
|
6269 |
-
return res
|
6270 |
-
}
|
6271 |
|
6272 |
-
|
6273 |
-
|
6274 |
-
|
6275 |
|
6276 |
-
|
6277 |
-
var
|
6278 |
-
|
6279 |
-
|
6280 |
-
|
6281 |
-
|
6282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6283 |
}
|
6284 |
}
|
6285 |
-
}
|
6286 |
-
|
6287 |
-
var baseModules = [
|
6288 |
-
ref,
|
6289 |
-
directives
|
6290 |
-
]
|
6291 |
|
6292 |
-
|
|
|
|
|
|
|
|
|
|
|
6293 |
|
6294 |
-
function
|
6295 |
-
|
6296 |
-
|
6297 |
-
|
6298 |
-
}
|
6299 |
-
if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
|
6300 |
-
return
|
6301 |
-
}
|
6302 |
-
var key, cur, old;
|
6303 |
-
var elm = vnode.elm;
|
6304 |
-
var oldAttrs = oldVnode.data.attrs || {};
|
6305 |
-
var attrs = vnode.data.attrs || {};
|
6306 |
-
// clone observed objects, as the user probably wants to mutate it
|
6307 |
-
if (isDef(attrs.__ob__)) {
|
6308 |
-
attrs = vnode.data.attrs = extend({}, attrs);
|
6309 |
}
|
6310 |
|
6311 |
-
|
6312 |
-
|
6313 |
-
|
6314 |
-
|
6315 |
-
|
6316 |
-
}
|
6317 |
-
}
|
6318 |
-
// #4391: in IE9, setting type can reset value for input[type=radio]
|
6319 |
-
// #6666: IE/Edge forces progress value down to 1 before setting a max
|
6320 |
-
/* istanbul ignore if */
|
6321 |
-
if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
|
6322 |
-
setAttr(elm, 'value', attrs.value);
|
6323 |
-
}
|
6324 |
-
for (key in oldAttrs) {
|
6325 |
-
if (isUndef(attrs[key])) {
|
6326 |
-
if (isXlink(key)) {
|
6327 |
-
elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
6328 |
-
} else if (!isEnumeratedAttr(key)) {
|
6329 |
-
elm.removeAttribute(key);
|
6330 |
-
}
|
6331 |
}
|
6332 |
}
|
6333 |
-
}
|
6334 |
|
6335 |
-
function
|
6336 |
-
|
6337 |
-
|
6338 |
-
} else if (isBooleanAttr(key)) {
|
6339 |
-
// set attribute for blank value
|
6340 |
-
// e.g. <option disabled>Select one</option>
|
6341 |
-
if (isFalsyAttrValue(value)) {
|
6342 |
-
el.removeAttribute(key);
|
6343 |
-
} else {
|
6344 |
-
// technically allowfullscreen is a boolean attribute for <iframe>,
|
6345 |
-
// but Flash expects a value of "true" when used on <embed> tag
|
6346 |
-
value = key === 'allowfullscreen' && el.tagName === 'EMBED'
|
6347 |
-
? 'true'
|
6348 |
-
: key;
|
6349 |
-
el.setAttribute(key, value);
|
6350 |
}
|
6351 |
-
|
6352 |
-
el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
|
6353 |
-
} else if (isXlink(key)) {
|
6354 |
-
if (isFalsyAttrValue(value)) {
|
6355 |
-
el.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
6356 |
-
} else {
|
6357 |
-
el.setAttributeNS(xlinkNS, key, value);
|
6358 |
-
}
|
6359 |
-
} else {
|
6360 |
-
baseSetAttr(el, key, value);
|
6361 |
}
|
6362 |
-
}
|
6363 |
|
6364 |
-
function
|
6365 |
-
|
6366 |
-
|
6367 |
-
|
6368 |
-
|
6369 |
-
|
6370 |
-
|
6371 |
-
|
6372 |
-
|
6373 |
-
|
6374 |
-
|
6375 |
-
|
6376 |
-
) {
|
6377 |
-
|
6378 |
-
|
6379 |
-
|
6380 |
-
|
6381 |
-
|
6382 |
-
|
6383 |
-
|
6384 |
-
|
6385 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6386 |
}
|
6387 |
-
}
|
6388 |
|
6389 |
-
var
|
6390 |
-
create: updateAttrs,
|
6391 |
-
update: updateAttrs
|
6392 |
-
}
|
6393 |
|
6394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6395 |
|
6396 |
-
|
6397 |
-
|
6398 |
-
|
6399 |
-
|
6400 |
-
|
6401 |
-
|
6402 |
-
|
6403 |
-
|
6404 |
-
|
6405 |
-
|
6406 |
-
|
6407 |
-
|
6408 |
-
|
6409 |
-
|
6410 |
-
|
6411 |
-
|
6412 |
-
var cls = genClassForVnode(vnode);
|
6413 |
-
|
6414 |
-
// handle transition classes
|
6415 |
-
var transitionClass = el._transitionClasses;
|
6416 |
-
if (isDef(transitionClass)) {
|
6417 |
-
cls = concat(cls, stringifyClass(transitionClass));
|
6418 |
-
}
|
6419 |
-
|
6420 |
-
// set the class
|
6421 |
-
if (cls !== el._prevClass) {
|
6422 |
-
el.setAttribute('class', cls);
|
6423 |
-
el._prevClass = cls;
|
6424 |
-
}
|
6425 |
-
}
|
6426 |
-
|
6427 |
-
var klass = {
|
6428 |
-
create: updateClass,
|
6429 |
-
update: updateClass
|
6430 |
-
}
|
6431 |
-
|
6432 |
-
/* */
|
6433 |
-
|
6434 |
-
var validDivisionCharRE = /[\w).+\-_$\]]/;
|
6435 |
-
|
6436 |
-
function parseFilters (exp) {
|
6437 |
-
var inSingle = false;
|
6438 |
-
var inDouble = false;
|
6439 |
-
var inTemplateString = false;
|
6440 |
-
var inRegex = false;
|
6441 |
-
var curly = 0;
|
6442 |
-
var square = 0;
|
6443 |
-
var paren = 0;
|
6444 |
-
var lastFilterIndex = 0;
|
6445 |
-
var c, prev, i, expression, filters;
|
6446 |
-
|
6447 |
-
for (i = 0; i < exp.length; i++) {
|
6448 |
-
prev = c;
|
6449 |
-
c = exp.charCodeAt(i);
|
6450 |
-
if (inSingle) {
|
6451 |
-
if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
|
6452 |
-
} else if (inDouble) {
|
6453 |
-
if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
|
6454 |
-
} else if (inTemplateString) {
|
6455 |
-
if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
|
6456 |
-
} else if (inRegex) {
|
6457 |
-
if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
|
6458 |
-
} else if (
|
6459 |
-
c === 0x7C && // pipe
|
6460 |
-
exp.charCodeAt(i + 1) !== 0x7C &&
|
6461 |
-
exp.charCodeAt(i - 1) !== 0x7C &&
|
6462 |
-
!curly && !square && !paren
|
6463 |
-
) {
|
6464 |
-
if (expression === undefined) {
|
6465 |
-
// first filter, end of expression
|
6466 |
-
lastFilterIndex = i + 1;
|
6467 |
-
expression = exp.slice(0, i).trim();
|
6468 |
-
} else {
|
6469 |
-
pushFilter();
|
6470 |
}
|
6471 |
} else {
|
6472 |
-
|
6473 |
-
|
6474 |
-
|
6475 |
-
|
6476 |
-
|
6477 |
-
|
6478 |
-
|
6479 |
-
|
6480 |
-
|
6481 |
-
|
6482 |
-
|
6483 |
-
|
6484 |
-
|
6485 |
-
|
6486 |
-
|
6487 |
-
|
6488 |
-
|
6489 |
-
|
6490 |
-
|
6491 |
-
|
6492 |
-
inRegex = true;
|
6493 |
-
}
|
6494 |
-
}
|
6495 |
}
|
6496 |
}
|
6497 |
|
6498 |
-
|
6499 |
-
|
6500 |
-
|
6501 |
-
|
6502 |
-
|
6503 |
|
6504 |
-
|
6505 |
-
|
6506 |
-
|
6507 |
}
|
6508 |
|
6509 |
-
|
6510 |
-
|
6511 |
-
|
6512 |
-
|
|
|
|
|
6513 |
}
|
6514 |
|
6515 |
-
|
6516 |
-
}
|
6517 |
-
|
6518 |
-
function wrapFilter (exp, filter) {
|
6519 |
-
var i = filter.indexOf('(');
|
6520 |
-
if (i < 0) {
|
6521 |
-
// _f: resolveFilter
|
6522 |
-
return ("_f(\"" + filter + "\")(" + exp + ")")
|
6523 |
-
} else {
|
6524 |
-
var name = filter.slice(0, i);
|
6525 |
-
var args = filter.slice(i + 1);
|
6526 |
-
return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
|
6527 |
-
}
|
6528 |
-
}
|
6529 |
-
|
6530 |
-
/* */
|
6531 |
-
|
6532 |
-
function baseWarn (msg) {
|
6533 |
-
console.error(("[Vue compiler]: " + msg));
|
6534 |
-
}
|
6535 |
-
|
6536 |
-
function pluckModuleFunction (
|
6537 |
-
modules,
|
6538 |
-
key
|
6539 |
-
) {
|
6540 |
-
return modules
|
6541 |
-
? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
|
6542 |
-
: []
|
6543 |
-
}
|
6544 |
-
|
6545 |
-
function addProp (el, name, value) {
|
6546 |
-
(el.props || (el.props = [])).push({ name: name, value: value });
|
6547 |
-
el.plain = false;
|
6548 |
-
}
|
6549 |
-
|
6550 |
-
function addAttr (el, name, value) {
|
6551 |
-
(el.attrs || (el.attrs = [])).push({ name: name, value: value });
|
6552 |
-
el.plain = false;
|
6553 |
-
}
|
6554 |
-
|
6555 |
-
// add a raw attr (use this in preTransforms)
|
6556 |
-
function addRawAttr (el, name, value) {
|
6557 |
-
el.attrsMap[name] = value;
|
6558 |
-
el.attrsList.push({ name: name, value: value });
|
6559 |
-
}
|
6560 |
-
|
6561 |
-
function addDirective (
|
6562 |
-
el,
|
6563 |
-
name,
|
6564 |
-
rawName,
|
6565 |
-
value,
|
6566 |
-
arg,
|
6567 |
-
modifiers
|
6568 |
-
) {
|
6569 |
-
(el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });
|
6570 |
-
el.plain = false;
|
6571 |
-
}
|
6572 |
-
|
6573 |
-
function addHandler (
|
6574 |
-
el,
|
6575 |
-
name,
|
6576 |
-
value,
|
6577 |
-
modifiers,
|
6578 |
-
important,
|
6579 |
-
warn
|
6580 |
-
) {
|
6581 |
-
modifiers = modifiers || emptyObject;
|
6582 |
-
// warn prevent and passive modifier
|
6583 |
-
/* istanbul ignore if */
|
6584 |
-
if (
|
6585 |
-
"development" !== 'production' && warn &&
|
6586 |
-
modifiers.prevent && modifiers.passive
|
6587 |
-
) {
|
6588 |
-
warn(
|
6589 |
-
'passive and prevent can\'t be used together. ' +
|
6590 |
-
'Passive handler can\'t prevent default event.'
|
6591 |
-
);
|
6592 |
-
}
|
6593 |
|
6594 |
-
|
6595 |
-
|
6596 |
-
delete modifiers.capture;
|
6597 |
-
name = '!' + name; // mark the event as captured
|
6598 |
-
}
|
6599 |
-
if (modifiers.once) {
|
6600 |
-
delete modifiers.once;
|
6601 |
-
name = '~' + name; // mark the event as once
|
6602 |
-
}
|
6603 |
-
/* istanbul ignore if */
|
6604 |
-
if (modifiers.passive) {
|
6605 |
-
delete modifiers.passive;
|
6606 |
-
name = '&' + name; // mark the event as passive
|
6607 |
-
}
|
6608 |
|
6609 |
-
|
6610 |
-
|
6611 |
-
|
6612 |
-
|
6613 |
-
if (modifiers.right) {
|
6614 |
-
name = 'contextmenu';
|
6615 |
-
delete modifiers.right;
|
6616 |
-
} else if (modifiers.middle) {
|
6617 |
-
name = 'mouseup';
|
6618 |
}
|
6619 |
-
}
|
6620 |
|
6621 |
-
|
6622 |
-
|
6623 |
-
|
6624 |
-
|
6625 |
-
} else {
|
6626 |
-
events = el.events || (el.events = {});
|
6627 |
-
}
|
6628 |
|
6629 |
-
|
6630 |
-
|
6631 |
-
|
6632 |
-
|
6633 |
-
newHandler.modifiers = modifiers;
|
6634 |
-
}
|
6635 |
|
6636 |
-
|
6637 |
-
|
6638 |
-
|
6639 |
-
|
6640 |
-
|
6641 |
-
|
6642 |
-
|
6643 |
-
|
6644 |
-
|
6645 |
-
|
6646 |
-
|
6647 |
-
|
6648 |
-
|
6649 |
-
|
6650 |
-
|
6651 |
-
|
6652 |
-
|
6653 |
-
|
6654 |
-
|
6655 |
-
|
6656 |
-
|
6657 |
-
|
6658 |
-
|
6659 |
-
|
6660 |
-
|
6661 |
-
|
6662 |
-
|
6663 |
-
}
|
6664 |
-
|
6665 |
-
|
6666 |
-
|
6667 |
-
|
6668 |
-
|
6669 |
-
// By default it does NOT remove it from the map (attrsMap) because the map is
|
6670 |
-
// needed during codegen.
|
6671 |
-
function getAndRemoveAttr (
|
6672 |
-
el,
|
6673 |
-
name,
|
6674 |
-
removeFromMap
|
6675 |
-
) {
|
6676 |
-
var val;
|
6677 |
-
if ((val = el.attrsMap[name]) != null) {
|
6678 |
-
var list = el.attrsList;
|
6679 |
-
for (var i = 0, l = list.length; i < l; i++) {
|
6680 |
-
if (list[i].name === name) {
|
6681 |
-
list.splice(i, 1);
|
6682 |
-
break
|
6683 |
-
}
|
6684 |
}
|
6685 |
-
}
|
6686 |
-
if (removeFromMap) {
|
6687 |
-
delete el.attrsMap[name];
|
6688 |
-
}
|
6689 |
-
return val
|
6690 |
-
}
|
6691 |
|
6692 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6693 |
|
6694 |
-
|
6695 |
-
|
6696 |
-
|
6697 |
-
function genComponentModel (
|
6698 |
-
el,
|
6699 |
-
value,
|
6700 |
-
modifiers
|
6701 |
-
) {
|
6702 |
-
var ref = modifiers || {};
|
6703 |
-
var number = ref.number;
|
6704 |
-
var trim = ref.trim;
|
6705 |
-
|
6706 |
-
var baseValueExpression = '$$v';
|
6707 |
-
var valueExpression = baseValueExpression;
|
6708 |
-
if (trim) {
|
6709 |
-
valueExpression =
|
6710 |
-
"(typeof " + baseValueExpression + " === 'string'" +
|
6711 |
-
"? " + baseValueExpression + ".trim()" +
|
6712 |
-
": " + baseValueExpression + ")";
|
6713 |
-
}
|
6714 |
-
if (number) {
|
6715 |
-
valueExpression = "_n(" + valueExpression + ")";
|
6716 |
-
}
|
6717 |
-
var assignment = genAssignmentCode(value, valueExpression);
|
6718 |
-
|
6719 |
-
el.model = {
|
6720 |
-
value: ("(" + value + ")"),
|
6721 |
-
expression: ("\"" + value + "\""),
|
6722 |
-
callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
|
6723 |
-
};
|
6724 |
-
}
|
6725 |
|
6726 |
-
|
6727 |
-
|
6728 |
-
*/
|
6729 |
-
function genAssignmentCode (
|
6730 |
-
value,
|
6731 |
-
assignment
|
6732 |
-
) {
|
6733 |
-
var res = parseModel(value);
|
6734 |
-
if (res.key === null) {
|
6735 |
-
return (value + "=" + assignment)
|
6736 |
-
} else {
|
6737 |
-
return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
|
6738 |
-
}
|
6739 |
-
}
|
6740 |
-
|
6741 |
-
/**
|
6742 |
-
* Parse a v-model expression into a base path and a final key segment.
|
6743 |
-
* Handles both dot-path and possible square brackets.
|
6744 |
-
*
|
6745 |
-
* Possible cases:
|
6746 |
-
*
|
6747 |
-
* - test
|
6748 |
-
* - test[key]
|
6749 |
-
* - test[test1[key]]
|
6750 |
-
* - test["a"][key]
|
6751 |
-
* - xxx.test[a[a].test1[key]]
|
6752 |
-
* - test.xxx.a["asa"][test1[key]]
|
6753 |
-
*
|
6754 |
-
*/
|
6755 |
|
6756 |
-
var
|
6757 |
-
|
6758 |
-
|
6759 |
-
|
6760 |
-
|
6761 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6762 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6763 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6764 |
|
6765 |
-
|
6766 |
-
|
6767 |
-
|
6768 |
-
|
6769 |
-
len = val.length;
|
6770 |
|
6771 |
-
|
6772 |
-
|
6773 |
-
if (index$1 > -1) {
|
6774 |
-
return {
|
6775 |
-
exp: val.slice(0, index$1),
|
6776 |
-
key: '"' + val.slice(index$1 + 1) + '"'
|
6777 |
-
}
|
6778 |
-
} else {
|
6779 |
-
return {
|
6780 |
-
exp: val,
|
6781 |
-
key: null
|
6782 |
-
}
|
6783 |
}
|
6784 |
}
|
6785 |
|
6786 |
-
|
6787 |
-
|
6788 |
|
6789 |
-
|
6790 |
-
|
6791 |
-
|
6792 |
-
|
6793 |
-
parseString(chr);
|
6794 |
-
} else if (chr === 0x5B) {
|
6795 |
-
parseBracket(chr);
|
6796 |
}
|
6797 |
-
}
|
6798 |
|
6799 |
-
|
6800 |
-
|
6801 |
-
|
6802 |
-
|
6803 |
-
|
|
|
|
|
|
|
|
|
6804 |
|
6805 |
-
|
6806 |
-
|
6807 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6808 |
|
6809 |
-
|
6810 |
-
|
6811 |
-
}
|
6812 |
|
6813 |
-
|
6814 |
-
|
6815 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6816 |
|
6817 |
-
|
6818 |
-
|
6819 |
-
|
6820 |
-
|
6821 |
-
chr = next();
|
6822 |
-
if (isStringStart(chr)) {
|
6823 |
-
parseString(chr);
|
6824 |
-
continue
|
6825 |
}
|
6826 |
-
|
6827 |
-
|
6828 |
-
|
6829 |
-
|
6830 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6831 |
}
|
6832 |
}
|
6833 |
-
}
|
6834 |
|
6835 |
-
|
6836 |
-
|
6837 |
-
|
6838 |
-
|
6839 |
-
|
6840 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6841 |
}
|
6842 |
}
|
6843 |
-
}
|
6844 |
-
|
6845 |
-
/* */
|
6846 |
-
|
6847 |
-
var warn$1;
|
6848 |
|
6849 |
-
|
6850 |
-
|
6851 |
-
|
6852 |
-
var CHECKBOX_RADIO_TOKEN = '__c';
|
6853 |
-
|
6854 |
-
function model (
|
6855 |
-
el,
|
6856 |
-
dir,
|
6857 |
-
_warn
|
6858 |
-
) {
|
6859 |
-
warn$1 = _warn;
|
6860 |
-
var value = dir.value;
|
6861 |
-
var modifiers = dir.modifiers;
|
6862 |
-
var tag = el.tag;
|
6863 |
-
var type = el.attrsMap.type;
|
6864 |
|
6865 |
-
|
6866 |
-
|
6867 |
-
|
6868 |
-
|
6869 |
-
|
6870 |
-
|
6871 |
-
|
6872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6873 |
}
|
6874 |
}
|
6875 |
|
6876 |
-
|
6877 |
-
|
6878 |
-
|
6879 |
-
|
6880 |
-
} else if (tag === 'select') {
|
6881 |
-
genSelect(el, value, modifiers);
|
6882 |
-
} else if (tag === 'input' && type === 'checkbox') {
|
6883 |
-
genCheckboxModel(el, value, modifiers);
|
6884 |
-
} else if (tag === 'input' && type === 'radio') {
|
6885 |
-
genRadioModel(el, value, modifiers);
|
6886 |
-
} else if (tag === 'input' || tag === 'textarea') {
|
6887 |
-
genDefaultModel(el, value, modifiers);
|
6888 |
-
} else if (!config.isReservedTag(tag)) {
|
6889 |
-
genComponentModel(el, value, modifiers);
|
6890 |
-
// component v-model doesn't need extra runtime
|
6891 |
-
return false
|
6892 |
-
} else {
|
6893 |
-
warn$1(
|
6894 |
-
"<" + (el.tag) + " v-model=\"" + value + "\">: " +
|
6895 |
-
"v-model is not supported on this element type. " +
|
6896 |
-
'If you are working with contenteditable, it\'s recommended to ' +
|
6897 |
-
'wrap a library dedicated for that purpose inside a custom component.'
|
6898 |
-
);
|
6899 |
}
|
6900 |
|
6901 |
-
|
6902 |
-
|
6903 |
-
|
6904 |
-
|
6905 |
-
|
6906 |
-
|
6907 |
-
|
6908 |
-
|
6909 |
-
)
|
6910 |
-
|
6911 |
-
var valueBinding = getBindingAttr(el, 'value') || 'null';
|
6912 |
-
var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
|
6913 |
-
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
|
6914 |
-
addProp(el, 'checked',
|
6915 |
-
"Array.isArray(" + value + ")" +
|
6916 |
-
"?_i(" + value + "," + valueBinding + ")>-1" + (
|
6917 |
-
trueValueBinding === 'true'
|
6918 |
-
? (":(" + value + ")")
|
6919 |
-
: (":_q(" + value + "," + trueValueBinding + ")")
|
6920 |
-
)
|
6921 |
-
);
|
6922 |
-
addHandler(el, 'change',
|
6923 |
-
"var $$a=" + value + "," +
|
6924 |
-
'$$el=$event.target,' +
|
6925 |
-
"$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
|
6926 |
-
'if(Array.isArray($$a)){' +
|
6927 |
-
"var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
|
6928 |
-
'$$i=_i($$a,$$v);' +
|
6929 |
-
"if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
|
6930 |
-
"else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
|
6931 |
-
"}else{" + (genAssignmentCode(value, '$$c')) + "}",
|
6932 |
-
null, true
|
6933 |
-
);
|
6934 |
-
}
|
6935 |
-
|
6936 |
-
function genRadioModel (
|
6937 |
-
el,
|
6938 |
-
value,
|
6939 |
-
modifiers
|
6940 |
-
) {
|
6941 |
-
var number = modifiers && modifiers.number;
|
6942 |
-
var valueBinding = getBindingAttr(el, 'value') || 'null';
|
6943 |
-
valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
|
6944 |
-
addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
|
6945 |
-
addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
|
6946 |
-
}
|
6947 |
-
|
6948 |
-
function genSelect (
|
6949 |
-
el,
|
6950 |
-
value,
|
6951 |
-
modifiers
|
6952 |
-
) {
|
6953 |
-
var number = modifiers && modifiers.number;
|
6954 |
-
var selectedVal = "Array.prototype.filter" +
|
6955 |
-
".call($event.target.options,function(o){return o.selected})" +
|
6956 |
-
".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
|
6957 |
-
"return " + (number ? '_n(val)' : 'val') + "})";
|
6958 |
-
|
6959 |
-
var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
|
6960 |
-
var code = "var $$selectedVal = " + selectedVal + ";";
|
6961 |
-
code = code + " " + (genAssignmentCode(value, assignment));
|
6962 |
-
addHandler(el, 'change', code, null, true);
|
6963 |
-
}
|
6964 |
-
|
6965 |
-
function genDefaultModel (
|
6966 |
-
el,
|
6967 |
-
value,
|
6968 |
-
modifiers
|
6969 |
-
) {
|
6970 |
-
var type = el.attrsMap.type;
|
6971 |
-
|
6972 |
-
// warn if v-bind:value conflicts with v-model
|
6973 |
-
// except for inputs with v-bind:type
|
6974 |
-
{
|
6975 |
-
var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
|
6976 |
-
var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
|
6977 |
-
if (value$1 && !typeBinding) {
|
6978 |
-
var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
|
6979 |
-
warn$1(
|
6980 |
-
binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
|
6981 |
-
'because the latter already expands to a value binding internally'
|
6982 |
-
);
|
6983 |
}
|
6984 |
-
}
|
6985 |
|
6986 |
-
var
|
6987 |
-
|
6988 |
-
|
6989 |
-
|
6990 |
-
|
6991 |
-
|
6992 |
-
|
6993 |
-
|
6994 |
-
? RANGE_TOKEN
|
6995 |
-
: 'input';
|
6996 |
|
6997 |
-
|
6998 |
-
if (trim) {
|
6999 |
-
valueExpression = "$event.target.value.trim()";
|
7000 |
-
}
|
7001 |
-
if (number) {
|
7002 |
-
valueExpression = "_n(" + valueExpression + ")";
|
7003 |
-
}
|
7004 |
|
7005 |
-
|
7006 |
-
|
7007 |
-
|
7008 |
-
}
|
7009 |
|
7010 |
-
|
7011 |
-
addHandler(el, event, code, null, true);
|
7012 |
-
if (trim || number) {
|
7013 |
-
addHandler(el, 'blur', '$forceUpdate()');
|
7014 |
-
}
|
7015 |
-
}
|
7016 |
|
7017 |
-
|
|
|
|
|
|
|
7018 |
|
7019 |
-
// normalize v-model event tokens that can only be determined at runtime.
|
7020 |
-
// it's important to place the event as the first in the array because
|
7021 |
-
// the whole point is ensuring the v-model callback gets called before
|
7022 |
-
// user-attached handlers.
|
7023 |
-
function normalizeEvents (on) {
|
7024 |
/* istanbul ignore if */
|
7025 |
-
if (
|
7026 |
-
//
|
7027 |
-
|
7028 |
-
|
7029 |
-
|
7030 |
-
|
7031 |
-
|
7032 |
-
|
7033 |
-
|
7034 |
-
|
7035 |
-
|
7036 |
-
|
7037 |
-
|
7038 |
-
|
7039 |
-
|
7040 |
-
|
7041 |
-
|
7042 |
-
|
7043 |
-
|
7044 |
-
|
7045 |
-
|
7046 |
-
|
7047 |
-
|
7048 |
-
|
7049 |
-
|
7050 |
-
|
7051 |
-
|
7052 |
-
|
7053 |
-
|
7054 |
-
|
7055 |
-
|
7056 |
-
|
7057 |
-
|
7058 |
-
) {
|
7059 |
-
|
7060 |
-
|
7061 |
-
|
7062 |
-
|
7063 |
-
|
7064 |
-
|
7065 |
-
|
7066 |
-
|
7067 |
-
|
7068 |
-
|
7069 |
-
|
7070 |
-
|
7071 |
-
|
7072 |
-
|
7073 |
-
|
7074 |
-
|
7075 |
-
|
7076 |
-
|
7077 |
-
|
7078 |
-
|
7079 |
-
|
7080 |
-
|
7081 |
-
|
7082 |
-
|
7083 |
-
|
7084 |
-
if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
|
7085 |
-
return
|
7086 |
-
}
|
7087 |
-
var on = vnode.data.on || {};
|
7088 |
-
var oldOn = oldVnode.data.on || {};
|
7089 |
-
target$1 = vnode.elm;
|
7090 |
-
normalizeEvents(on);
|
7091 |
-
updateListeners(on, oldOn, add$1, remove$2, vnode.context);
|
7092 |
-
target$1 = undefined;
|
7093 |
-
}
|
7094 |
-
|
7095 |
-
var events = {
|
7096 |
-
create: updateDOMListeners,
|
7097 |
-
update: updateDOMListeners
|
7098 |
-
}
|
7099 |
-
|
7100 |
-
/* */
|
7101 |
-
|
7102 |
-
function updateDOMProps (oldVnode, vnode) {
|
7103 |
-
if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
|
7104 |
-
return
|
7105 |
-
}
|
7106 |
-
var key, cur;
|
7107 |
-
var elm = vnode.elm;
|
7108 |
-
var oldProps = oldVnode.data.domProps || {};
|
7109 |
-
var props = vnode.data.domProps || {};
|
7110 |
-
// clone observed objects, as the user probably wants to mutate it
|
7111 |
-
if (isDef(props.__ob__)) {
|
7112 |
-
props = vnode.data.domProps = extend({}, props);
|
7113 |
-
}
|
7114 |
-
|
7115 |
-
for (key in oldProps) {
|
7116 |
-
if (isUndef(props[key])) {
|
7117 |
-
elm[key] = '';
|
7118 |
-
}
|
7119 |
-
}
|
7120 |
-
for (key in props) {
|
7121 |
-
cur = props[key];
|
7122 |
-
// ignore children if the node has textContent or innerHTML,
|
7123 |
-
// as these will throw away existing DOM nodes and cause removal errors
|
7124 |
-
// on subsequent patches (#3360)
|
7125 |
-
if (key === 'textContent' || key === 'innerHTML') {
|
7126 |
-
if (vnode.children) { vnode.children.length = 0; }
|
7127 |
-
if (cur === oldProps[key]) { continue }
|
7128 |
-
// #6601 work around Chrome version <= 55 bug where single textNode
|
7129 |
-
// replaced by innerHTML/textContent retains its parentNode property
|
7130 |
-
if (elm.childNodes.length === 1) {
|
7131 |
-
elm.removeChild(elm.childNodes[0]);
|
7132 |
-
}
|
7133 |
-
}
|
7134 |
-
|
7135 |
-
if (key === 'value') {
|
7136 |
-
// store value as _value as well since
|
7137 |
-
// non-string values will be stringified
|
7138 |
-
elm._value = cur;
|
7139 |
-
// avoid resetting cursor position when value is the same
|
7140 |
-
var strCur = isUndef(cur) ? '' : String(cur);
|
7141 |
-
if (shouldUpdateValue(elm, strCur)) {
|
7142 |
-
elm.value = strCur;
|
7143 |
}
|
7144 |
-
} else {
|
7145 |
-
elm[key] = cur;
|
7146 |
-
}
|
7147 |
-
}
|
7148 |
-
}
|
7149 |
-
|
7150 |
-
// check platforms/web/util/attrs.js acceptValue
|
7151 |
-
|
7152 |
-
|
7153 |
-
function shouldUpdateValue (elm, checkVal) {
|
7154 |
-
return (!elm.composing && (
|
7155 |
-
elm.tagName === 'OPTION' ||
|
7156 |
-
isNotInFocusAndDirty(elm, checkVal) ||
|
7157 |
-
isDirtyWithModifiers(elm, checkVal)
|
7158 |
-
))
|
7159 |
-
}
|
7160 |
-
|
7161 |
-
function isNotInFocusAndDirty (elm, checkVal) {
|
7162 |
-
// return true when textbox (.number and .trim) loses focus and its value is
|
7163 |
-
// not equal to the updated value
|
7164 |
-
var notInFocus = true;
|
7165 |
-
// #6157
|
7166 |
-
// work around IE bug when accessing document.activeElement in an iframe
|
7167 |
-
try { notInFocus = document.activeElement !== elm; } catch (e) {}
|
7168 |
-
return notInFocus && elm.value !== checkVal
|
7169 |
-
}
|
7170 |
-
|
7171 |
-
function isDirtyWithModifiers (elm, newVal) {
|
7172 |
-
var value = elm.value;
|
7173 |
-
var modifiers = elm._vModifiers; // injected by v-model runtime
|
7174 |
-
if (isDef(modifiers)) {
|
7175 |
-
if (modifiers.lazy) {
|
7176 |
-
// inputs with lazy should only be updated when not in focus
|
7177 |
-
return false
|
7178 |
-
}
|
7179 |
-
if (modifiers.number) {
|
7180 |
-
return toNumber(value) !== toNumber(newVal)
|
7181 |
}
|
7182 |
-
|
7183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7184 |
}
|
7185 |
}
|
7186 |
-
return value !== newVal
|
7187 |
-
}
|
7188 |
|
7189 |
-
|
7190 |
-
|
7191 |
-
|
7192 |
-
|
7193 |
-
|
7194 |
-
|
7195 |
-
|
7196 |
-
|
7197 |
-
|
7198 |
-
|
7199 |
-
var propertyDelimiter = /:(.+)/;
|
7200 |
-
cssText.split(listDelimiter).forEach(function (item) {
|
7201 |
-
if (item) {
|
7202 |
-
var tmp = item.split(propertyDelimiter);
|
7203 |
-
tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
|
7204 |
}
|
7205 |
-
|
7206 |
-
|
7207 |
-
|
7208 |
-
|
7209 |
-
|
7210 |
-
|
7211 |
-
|
7212 |
-
|
7213 |
-
|
7214 |
-
|
7215 |
-
|
7216 |
-
|
7217 |
-
}
|
7218 |
-
|
7219 |
-
|
7220 |
-
function normalizeStyleBinding (bindingStyle) {
|
7221 |
-
if (Array.isArray(bindingStyle)) {
|
7222 |
-
return toObject(bindingStyle)
|
7223 |
-
}
|
7224 |
-
if (typeof bindingStyle === 'string') {
|
7225 |
-
return parseStyleText(bindingStyle)
|
7226 |
-
}
|
7227 |
-
return bindingStyle
|
7228 |
-
}
|
7229 |
-
|
7230 |
-
/**
|
7231 |
-
* parent component style should be after child's
|
7232 |
-
* so that parent component's style could override it
|
7233 |
-
*/
|
7234 |
-
function getStyle (vnode, checkChild) {
|
7235 |
-
var res = {};
|
7236 |
-
var styleData;
|
7237 |
-
|
7238 |
-
if (checkChild) {
|
7239 |
-
var childNode = vnode;
|
7240 |
-
while (childNode.componentInstance) {
|
7241 |
-
childNode = childNode.componentInstance._vnode;
|
7242 |
-
if (
|
7243 |
-
childNode && childNode.data &&
|
7244 |
-
(styleData = normalizeStyleData(childNode.data))
|
7245 |
-
) {
|
7246 |
-
extend(res, styleData);
|
7247 |
}
|
7248 |
}
|
|
|
|
|
|
|
7249 |
}
|
7250 |
|
7251 |
-
|
7252 |
-
|
7253 |
}
|
7254 |
|
7255 |
-
|
7256 |
-
|
7257 |
-
|
7258 |
-
|
7259 |
-
}
|
7260 |
}
|
7261 |
-
return res
|
7262 |
-
}
|
7263 |
-
|
7264 |
-
/* */
|
7265 |
|
7266 |
-
|
7267 |
-
|
7268 |
-
var setProp = function (el, name, val) {
|
7269 |
-
/* istanbul ignore if */
|
7270 |
-
if (cssVarRE.test(name)) {
|
7271 |
-
el.style.setProperty(name, val);
|
7272 |
-
} else if (importantRE.test(val)) {
|
7273 |
-
el.style.setProperty(name, val.replace(importantRE, ''), 'important');
|
7274 |
-
} else {
|
7275 |
-
var normalizedName = normalize(name);
|
7276 |
-
if (Array.isArray(val)) {
|
7277 |
-
// Support values array created by autoprefixer, e.g.
|
7278 |
-
// {display: ["-webkit-box", "-ms-flexbox", "flex"]}
|
7279 |
-
// Set them one by one, and the browser will only set those it can recognize
|
7280 |
-
for (var i = 0, len = val.length; i < len; i++) {
|
7281 |
-
el.style[normalizedName] = val[i];
|
7282 |
-
}
|
7283 |
-
} else {
|
7284 |
-
el.style[normalizedName] = val;
|
7285 |
-
}
|
7286 |
}
|
7287 |
-
};
|
7288 |
-
|
7289 |
-
var vendorNames = ['Webkit', 'Moz', 'ms'];
|
7290 |
|
7291 |
-
|
7292 |
-
|
7293 |
-
|
7294 |
-
|
7295 |
-
|
7296 |
-
return prop
|
7297 |
}
|
7298 |
-
|
7299 |
-
|
7300 |
-
var
|
7301 |
-
|
7302 |
-
|
7303 |
-
}
|
7304 |
}
|
7305 |
-
});
|
7306 |
|
7307 |
-
|
7308 |
-
var data = vnode.data;
|
7309 |
-
var oldData = oldVnode.data;
|
7310 |
|
7311 |
-
|
7312 |
-
|
7313 |
-
|
7314 |
-
|
|
|
7315 |
}
|
7316 |
|
7317 |
-
var
|
7318 |
-
|
7319 |
-
|
7320 |
-
var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
|
7321 |
-
|
7322 |
-
// if static style exists, stylebinding already merged into it when doing normalizeStyleData
|
7323 |
-
var oldStyle = oldStaticStyle || oldStyleBinding;
|
7324 |
|
7325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7326 |
|
7327 |
-
|
7328 |
-
|
7329 |
-
|
7330 |
-
vnode.data.normalizedStyle = isDef(style.__ob__)
|
7331 |
-
? extend({}, style)
|
7332 |
-
: style;
|
7333 |
|
7334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7335 |
|
7336 |
-
|
7337 |
-
|
7338 |
-
|
7339 |
-
|
7340 |
-
|
7341 |
-
|
7342 |
-
|
7343 |
-
|
7344 |
-
|
7345 |
-
|
7346 |
}
|
7347 |
-
}
|
7348 |
-
}
|
7349 |
-
|
7350 |
-
var style = {
|
7351 |
-
create: updateStyle,
|
7352 |
-
update: updateStyle
|
7353 |
-
}
|
7354 |
|
7355 |
-
|
|
|
|
|
|
|
7356 |
|
7357 |
-
|
7358 |
-
|
7359 |
-
|
7360 |
-
|
7361 |
-
|
7362 |
-
|
7363 |
-
|
7364 |
-
|
7365 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7366 |
|
7367 |
-
|
7368 |
-
|
7369 |
-
|
7370 |
-
|
|
|
|
|
7371 |
} else {
|
7372 |
-
|
7373 |
-
}
|
7374 |
-
} else {
|
7375 |
-
var cur = " " + (el.getAttribute('class') || '') + " ";
|
7376 |
-
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
7377 |
-
el.setAttribute('class', (cur + cls).trim());
|
7378 |
}
|
7379 |
}
|
7380 |
-
}
|
7381 |
-
|
7382 |
-
/**
|
7383 |
-
* Remove class with compatibility for SVG since classList is not supported on
|
7384 |
-
* SVG elements in IE
|
7385 |
-
*/
|
7386 |
-
function removeClass (el, cls) {
|
7387 |
-
/* istanbul ignore if */
|
7388 |
-
if (!cls || !(cls = cls.trim())) {
|
7389 |
-
return
|
7390 |
-
}
|
7391 |
|
7392 |
-
|
7393 |
-
|
7394 |
-
|
7395 |
-
|
7396 |
-
|
7397 |
-
|
7398 |
}
|
7399 |
-
|
7400 |
-
|
7401 |
-
|
7402 |
-
|
7403 |
-
|
7404 |
-
var tar = ' ' + cls + ' ';
|
7405 |
-
while (cur.indexOf(tar) >= 0) {
|
7406 |
-
cur = cur.replace(tar, ' ');
|
7407 |
-
}
|
7408 |
-
cur = cur.trim();
|
7409 |
-
if (cur) {
|
7410 |
-
el.setAttribute('class', cur);
|
7411 |
-
} else {
|
7412 |
-
el.removeAttribute('class');
|
7413 |
}
|
|
|
7414 |
}
|
7415 |
-
}
|
7416 |
-
|
7417 |
-
/* */
|
7418 |
|
7419 |
-
function
|
7420 |
-
|
7421 |
-
|
7422 |
-
|
7423 |
-
|
7424 |
-
if (typeof def === 'object') {
|
7425 |
-
var res = {};
|
7426 |
-
if (def.css !== false) {
|
7427 |
-
extend(res, autoCssTransition(def.name || 'v'));
|
7428 |
}
|
7429 |
-
extend(res, def);
|
7430 |
-
return res
|
7431 |
-
} else if (typeof def === 'string') {
|
7432 |
-
return autoCssTransition(def)
|
7433 |
-
}
|
7434 |
-
}
|
7435 |
-
|
7436 |
-
var autoCssTransition = cached(function (name) {
|
7437 |
-
return {
|
7438 |
-
enterClass: (name + "-enter"),
|
7439 |
-
enterToClass: (name + "-enter-to"),
|
7440 |
-
enterActiveClass: (name + "-enter-active"),
|
7441 |
-
leaveClass: (name + "-leave"),
|
7442 |
-
leaveToClass: (name + "-leave-to"),
|
7443 |
-
leaveActiveClass: (name + "-leave-active")
|
7444 |
-
}
|
7445 |
-
});
|
7446 |
-
|
7447 |
-
var hasTransition = inBrowser && !isIE9;
|
7448 |
-
var TRANSITION = 'transition';
|
7449 |
-
var ANIMATION = 'animation';
|
7450 |
-
|
7451 |
-
// Transition property/event sniffing
|
7452 |
-
var transitionProp = 'transition';
|
7453 |
-
var transitionEndEvent = 'transitionend';
|
7454 |
-
var animationProp = 'animation';
|
7455 |
-
var animationEndEvent = 'animationend';
|
7456 |
-
if (hasTransition) {
|
7457 |
-
/* istanbul ignore if */
|
7458 |
-
if (window.ontransitionend === undefined &&
|
7459 |
-
window.onwebkittransitionend !== undefined
|
7460 |
-
) {
|
7461 |
-
transitionProp = 'WebkitTransition';
|
7462 |
-
transitionEndEvent = 'webkitTransitionEnd';
|
7463 |
}
|
7464 |
-
if (window.onanimationend === undefined &&
|
7465 |
-
window.onwebkitanimationend !== undefined
|
7466 |
-
) {
|
7467 |
-
animationProp = 'WebkitAnimation';
|
7468 |
-
animationEndEvent = 'webkitAnimationEnd';
|
7469 |
-
}
|
7470 |
-
}
|
7471 |
|
7472 |
-
|
7473 |
-
|
7474 |
-
|
7475 |
-
|
7476 |
-
: setTimeout
|
7477 |
-
: /* istanbul ignore next */ function (fn) { return fn(); };
|
7478 |
-
|
7479 |
-
function nextFrame (fn) {
|
7480 |
-
raf(function () {
|
7481 |
-
raf(fn);
|
7482 |
-
});
|
7483 |
-
}
|
7484 |
-
|
7485 |
-
function addTransitionClass (el, cls) {
|
7486 |
-
var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
|
7487 |
-
if (transitionClasses.indexOf(cls) < 0) {
|
7488 |
-
transitionClasses.push(cls);
|
7489 |
-
addClass(el, cls);
|
7490 |
-
}
|
7491 |
-
}
|
7492 |
-
|
7493 |
-
function removeTransitionClass (el, cls) {
|
7494 |
-
if (el._transitionClasses) {
|
7495 |
-
remove(el._transitionClasses, cls);
|
7496 |
-
}
|
7497 |
-
removeClass(el, cls);
|
7498 |
-
}
|
7499 |
-
|
7500 |
-
function whenTransitionEnds (
|
7501 |
-
el,
|
7502 |
-
expectedType,
|
7503 |
-
cb
|
7504 |
-
) {
|
7505 |
-
var ref = getTransitionInfo(el, expectedType);
|
7506 |
-
var type = ref.type;
|
7507 |
-
var timeout = ref.timeout;
|
7508 |
-
var propCount = ref.propCount;
|
7509 |
-
if (!type) { return cb() }
|
7510 |
-
var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
|
7511 |
-
var ended = 0;
|
7512 |
-
var end = function () {
|
7513 |
-
el.removeEventListener(event, onEnd);
|
7514 |
-
cb();
|
7515 |
-
};
|
7516 |
-
var onEnd = function (e) {
|
7517 |
-
if (e.target === el) {
|
7518 |
-
if (++ended >= propCount) {
|
7519 |
-
end();
|
7520 |
}
|
7521 |
}
|
7522 |
-
};
|
7523 |
-
setTimeout(function () {
|
7524 |
-
if (ended < propCount) {
|
7525 |
-
end();
|
7526 |
-
}
|
7527 |
-
}, timeout + 1);
|
7528 |
-
el.addEventListener(event, onEnd);
|
7529 |
-
}
|
7530 |
-
|
7531 |
-
var transformRE = /\b(transform|all)(,|$)/;
|
7532 |
-
|
7533 |
-
function getTransitionInfo (el, expectedType) {
|
7534 |
-
var styles = window.getComputedStyle(el);
|
7535 |
-
var transitionDelays = styles[transitionProp + 'Delay'].split(', ');
|
7536 |
-
var transitionDurations = styles[transitionProp + 'Duration'].split(', ');
|
7537 |
-
var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
7538 |
-
var animationDelays = styles[animationProp + 'Delay'].split(', ');
|
7539 |
-
var animationDurations = styles[animationProp + 'Duration'].split(', ');
|
7540 |
-
var animationTimeout = getTimeout(animationDelays, animationDurations);
|
7541 |
-
|
7542 |
-
var type;
|
7543 |
-
var timeout = 0;
|
7544 |
-
var propCount = 0;
|
7545 |
-
/* istanbul ignore if */
|
7546 |
-
if (expectedType === TRANSITION) {
|
7547 |
-
if (transitionTimeout > 0) {
|
7548 |
-
type = TRANSITION;
|
7549 |
-
timeout = transitionTimeout;
|
7550 |
-
propCount = transitionDurations.length;
|
7551 |
-
}
|
7552 |
-
} else if (expectedType === ANIMATION) {
|
7553 |
-
if (animationTimeout > 0) {
|
7554 |
-
type = ANIMATION;
|
7555 |
-
timeout = animationTimeout;
|
7556 |
-
propCount = animationDurations.length;
|
7557 |
-
}
|
7558 |
-
} else {
|
7559 |
-
timeout = Math.max(transitionTimeout, animationTimeout);
|
7560 |
-
type = timeout > 0
|
7561 |
-
? transitionTimeout > animationTimeout
|
7562 |
-
? TRANSITION
|
7563 |
-
: ANIMATION
|
7564 |
-
: null;
|
7565 |
-
propCount = type
|
7566 |
-
? type === TRANSITION
|
7567 |
-
? transitionDurations.length
|
7568 |
-
: animationDurations.length
|
7569 |
-
: 0;
|
7570 |
-
}
|
7571 |
-
var hasTransform =
|
7572 |
-
type === TRANSITION &&
|
7573 |
-
transformRE.test(styles[transitionProp + 'Property']);
|
7574 |
-
return {
|
7575 |
-
type: type,
|
7576 |
-
timeout: timeout,
|
7577 |
-
propCount: propCount,
|
7578 |
-
hasTransform: hasTransform
|
7579 |
-
}
|
7580 |
-
}
|
7581 |
-
|
7582 |
-
function getTimeout (delays, durations) {
|
7583 |
-
/* istanbul ignore next */
|
7584 |
-
while (delays.length < durations.length) {
|
7585 |
-
delays = delays.concat(delays);
|
7586 |
}
|
7587 |
|
7588 |
-
|
7589 |
-
return
|
7590 |
-
}))
|
7591 |
-
}
|
7592 |
-
|
7593 |
-
function toMs (s) {
|
7594 |
-
return Number(s.slice(0, -1)) * 1000
|
7595 |
-
}
|
7596 |
-
|
7597 |
-
/* */
|
7598 |
-
|
7599 |
-
function enter (vnode, toggleDisplay) {
|
7600 |
-
var el = vnode.elm;
|
7601 |
-
|
7602 |
-
// call leave callback now
|
7603 |
-
if (isDef(el._leaveCb)) {
|
7604 |
-
el._leaveCb.cancelled = true;
|
7605 |
-
el._leaveCb();
|
7606 |
}
|
7607 |
|
7608 |
-
var
|
7609 |
-
if (isUndef(data)) {
|
7610 |
-
return
|
7611 |
-
}
|
7612 |
|
7613 |
-
|
7614 |
-
if (isDef(el._enterCb) || el.nodeType !== 1) {
|
7615 |
-
return
|
7616 |
-
}
|
7617 |
-
|
7618 |
-
var css = data.css;
|
7619 |
-
var type = data.type;
|
7620 |
-
var enterClass = data.enterClass;
|
7621 |
-
var enterToClass = data.enterToClass;
|
7622 |
-
var enterActiveClass = data.enterActiveClass;
|
7623 |
-
var appearClass = data.appearClass;
|
7624 |
-
var appearToClass = data.appearToClass;
|
7625 |
-
var appearActiveClass = data.appearActiveClass;
|
7626 |
-
var beforeEnter = data.beforeEnter;
|
7627 |
-
var enter = data.enter;
|
7628 |
-
var afterEnter = data.afterEnter;
|
7629 |
-
var enterCancelled = data.enterCancelled;
|
7630 |
-
var beforeAppear = data.beforeAppear;
|
7631 |
-
var appear = data.appear;
|
7632 |
-
var afterAppear = data.afterAppear;
|
7633 |
-
var appearCancelled = data.appearCancelled;
|
7634 |
-
var duration = data.duration;
|
7635 |
-
|
7636 |
-
// activeInstance will always be the <transition> component managing this
|
7637 |
-
// transition. One edge case to check is when the <transition> is placed
|
7638 |
-
// as the root node of a child component. In that case we need to check
|
7639 |
-
// <transition>'s parent for appear check.
|
7640 |
-
var context = activeInstance;
|
7641 |
-
var transitionNode = activeInstance.$vnode;
|
7642 |
-
while (transitionNode && transitionNode.parent) {
|
7643 |
-
transitionNode = transitionNode.parent;
|
7644 |
-
context = transitionNode.context;
|
7645 |
-
}
|
7646 |
-
|
7647 |
-
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
7648 |
-
|
7649 |
-
if (isAppear && !appear && appear !== '') {
|
7650 |
-
return
|
7651 |
-
}
|
7652 |
-
|
7653 |
-
var startClass = isAppear && appearClass
|
7654 |
-
? appearClass
|
7655 |
-
: enterClass;
|
7656 |
-
var activeClass = isAppear && appearActiveClass
|
7657 |
-
? appearActiveClass
|
7658 |
-
: enterActiveClass;
|
7659 |
-
var toClass = isAppear && appearToClass
|
7660 |
-
? appearToClass
|
7661 |
-
: enterToClass;
|
7662 |
-
|
7663 |
-
var beforeEnterHook = isAppear
|
7664 |
-
? (beforeAppear || beforeEnter)
|
7665 |
-
: beforeEnter;
|
7666 |
-
var enterHook = isAppear
|
7667 |
-
? (typeof appear === 'function' ? appear : enter)
|
7668 |
-
: enter;
|
7669 |
-
var afterEnterHook = isAppear
|
7670 |
-
? (afterAppear || afterEnter)
|
7671 |
-
: afterEnter;
|
7672 |
-
var enterCancelledHook = isAppear
|
7673 |
-
? (appearCancelled || enterCancelled)
|
7674 |
-
: enterCancelled;
|
7675 |
-
|
7676 |
-
var explicitEnterDuration = toNumber(
|
7677 |
-
isObject(duration)
|
7678 |
-
? duration.enter
|
7679 |
-
: duration
|
7680 |
-
);
|
7681 |
|
7682 |
-
|
7683 |
-
|
7684 |
-
|
|
|
7685 |
|
7686 |
-
|
7687 |
-
|
7688 |
|
7689 |
-
|
7690 |
-
|
7691 |
-
|
7692 |
-
removeTransitionClass(el, activeClass);
|
7693 |
-
}
|
7694 |
-
if (cb.cancelled) {
|
7695 |
-
if (expectsCSS) {
|
7696 |
-
removeTransitionClass(el, startClass);
|
7697 |
}
|
7698 |
-
enterCancelledHook && enterCancelledHook(el);
|
7699 |
-
} else {
|
7700 |
-
afterEnterHook && afterEnterHook(el);
|
7701 |
-
}
|
7702 |
-
el._enterCb = null;
|
7703 |
-
});
|
7704 |
|
7705 |
-
|
7706 |
-
|
7707 |
-
|
7708 |
-
|
7709 |
-
|
7710 |
-
if (pendingNode &&
|
7711 |
-
pendingNode.tag === vnode.tag &&
|
7712 |
-
pendingNode.elm._leaveCb
|
7713 |
-
) {
|
7714 |
-
pendingNode.elm._leaveCb();
|
7715 |
}
|
7716 |
-
enterHook && enterHook(el, cb);
|
7717 |
-
});
|
7718 |
-
}
|
7719 |
|
7720 |
-
|
7721 |
-
|
7722 |
-
|
7723 |
-
|
7724 |
-
|
7725 |
-
|
7726 |
-
|
7727 |
-
if (!cb.cancelled) {
|
7728 |
-
addTransitionClass(el, toClass);
|
7729 |
-
if (!userWantsControl) {
|
7730 |
-
if (isValidDuration(explicitEnterDuration)) {
|
7731 |
-
setTimeout(cb, explicitEnterDuration);
|
7732 |
-
} else {
|
7733 |
-
whenTransitionEnds(el, type, cb);
|
7734 |
-
}
|
7735 |
-
}
|
7736 |
}
|
7737 |
-
});
|
7738 |
-
}
|
7739 |
|
7740 |
-
|
7741 |
-
toggleDisplay && toggleDisplay();
|
7742 |
-
enterHook && enterHook(el, cb);
|
7743 |
-
}
|
7744 |
|
7745 |
-
|
7746 |
-
|
7747 |
-
|
7748 |
-
|
|
|
|
|
|
|
|
|
7749 |
|
7750 |
-
|
7751 |
-
var el = vnode.elm;
|
7752 |
|
7753 |
-
|
7754 |
-
|
7755 |
-
|
7756 |
-
|
7757 |
-
|
7758 |
|
7759 |
-
|
7760 |
-
|
7761 |
-
|
7762 |
-
|
|
|
|
|
|
|
7763 |
|
7764 |
-
|
7765 |
-
|
7766 |
-
|
7767 |
-
}
|
7768 |
-
|
7769 |
-
var css = data.css;
|
7770 |
-
var type = data.type;
|
7771 |
-
var leaveClass = data.leaveClass;
|
7772 |
-
var leaveToClass = data.leaveToClass;
|
7773 |
-
var leaveActiveClass = data.leaveActiveClass;
|
7774 |
-
var beforeLeave = data.beforeLeave;
|
7775 |
-
var leave = data.leave;
|
7776 |
-
var afterLeave = data.afterLeave;
|
7777 |
-
var leaveCancelled = data.leaveCancelled;
|
7778 |
-
var delayLeave = data.delayLeave;
|
7779 |
-
var duration = data.duration;
|
7780 |
-
|
7781 |
-
var expectsCSS = css !== false && !isIE9;
|
7782 |
-
var userWantsControl = getHookArgumentsLength(leave);
|
7783 |
-
|
7784 |
-
var explicitLeaveDuration = toNumber(
|
7785 |
-
isObject(duration)
|
7786 |
-
? duration.leave
|
7787 |
-
: duration
|
7788 |
-
);
|
7789 |
|
7790 |
-
|
7791 |
-
|
7792 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7793 |
|
7794 |
-
|
7795 |
-
|
7796 |
-
|
7797 |
-
}
|
7798 |
-
if (expectsCSS) {
|
7799 |
-
removeTransitionClass(el, leaveToClass);
|
7800 |
-
removeTransitionClass(el, leaveActiveClass);
|
7801 |
-
}
|
7802 |
-
if (cb.cancelled) {
|
7803 |
-
if (expectsCSS) {
|
7804 |
-
removeTransitionClass(el, leaveClass);
|
7805 |
-
}
|
7806 |
-
leaveCancelled && leaveCancelled(el);
|
7807 |
-
} else {
|
7808 |
-
rm();
|
7809 |
-
afterLeave && afterLeave(el);
|
7810 |
-
}
|
7811 |
-
el._leaveCb = null;
|
7812 |
-
});
|
7813 |
|
7814 |
-
|
7815 |
-
|
7816 |
-
|
7817 |
-
|
7818 |
-
|
7819 |
|
7820 |
-
|
7821 |
-
|
7822 |
-
|
7823 |
-
|
7824 |
-
|
7825 |
-
|
7826 |
-
|
7827 |
-
|
7828 |
-
|
7829 |
-
|
7830 |
-
|
7831 |
-
|
7832 |
-
|
7833 |
-
|
7834 |
-
|
7835 |
-
|
7836 |
-
|
7837 |
-
|
7838 |
-
|
7839 |
-
|
7840 |
-
|
7841 |
-
|
7842 |
-
|
7843 |
}
|
|
|
|
|
|
|
|
|
|
|
7844 |
}
|
7845 |
-
}
|
7846 |
-
}
|
7847 |
-
leave && leave(el, cb);
|
7848 |
-
if (!expectsCSS && !userWantsControl) {
|
7849 |
-
cb();
|
7850 |
-
}
|
7851 |
-
}
|
7852 |
-
}
|
7853 |
|
7854 |
-
|
7855 |
-
|
7856 |
-
|
7857 |
-
warn(
|
7858 |
-
"<transition> explicit " + name + " duration is not a valid number - " +
|
7859 |
-
"got " + (JSON.stringify(val)) + ".",
|
7860 |
-
vnode.context
|
7861 |
-
);
|
7862 |
-
} else if (isNaN(val)) {
|
7863 |
-
warn(
|
7864 |
-
"<transition> explicit " + name + " duration is NaN - " +
|
7865 |
-
'the duration expression might be incorrect.',
|
7866 |
-
vnode.context
|
7867 |
-
);
|
7868 |
-
}
|
7869 |
-
}
|
7870 |
|
7871 |
-
|
7872 |
-
return typeof val === 'number' && !isNaN(val)
|
7873 |
-
}
|
7874 |
|
7875 |
-
|
7876 |
-
|
7877 |
-
|
7878 |
-
|
7879 |
-
* - a plain function (.length)
|
7880 |
-
*/
|
7881 |
-
function getHookArgumentsLength (fn) {
|
7882 |
-
if (isUndef(fn)) {
|
7883 |
-
return false
|
7884 |
-
}
|
7885 |
-
var invokerFns = fn.fns;
|
7886 |
-
if (isDef(invokerFns)) {
|
7887 |
-
// invoker
|
7888 |
-
return getHookArgumentsLength(
|
7889 |
-
Array.isArray(invokerFns)
|
7890 |
-
? invokerFns[0]
|
7891 |
-
: invokerFns
|
7892 |
-
)
|
7893 |
-
} else {
|
7894 |
-
return (fn._length || fn.length) > 1
|
7895 |
-
}
|
7896 |
-
}
|
7897 |
|
7898 |
-
|
7899 |
-
if (vnode.data.show !== true) {
|
7900 |
-
enter(vnode);
|
7901 |
-
}
|
7902 |
-
}
|
7903 |
|
7904 |
-
var
|
7905 |
-
|
7906 |
-
activate: _enter,
|
7907 |
-
remove: function remove$$1 (vnode, rm) {
|
7908 |
-
/* istanbul ignore else */
|
7909 |
-
if (vnode.data.show !== true) {
|
7910 |
-
leave(vnode, rm);
|
7911 |
-
} else {
|
7912 |
-
rm();
|
7913 |
-
}
|
7914 |
-
}
|
7915 |
-
} : {}
|
7916 |
|
7917 |
-
|
7918 |
-
|
7919 |
-
klass,
|
7920 |
-
events,
|
7921 |
-
domProps,
|
7922 |
-
style,
|
7923 |
-
transition
|
7924 |
-
]
|
7925 |
|
7926 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7927 |
|
7928 |
-
|
7929 |
-
|
7930 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7931 |
|
7932 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7933 |
|
7934 |
-
|
7935 |
-
|
7936 |
-
* properties to Elements.
|
7937 |
-
*/
|
7938 |
|
7939 |
-
|
7940 |
-
|
7941 |
-
|
7942 |
-
|
7943 |
-
|
7944 |
-
if (el && el.vmodel) {
|
7945 |
-
trigger(el, 'input');
|
7946 |
-
}
|
7947 |
-
});
|
7948 |
-
}
|
7949 |
-
|
7950 |
-
var directive = {
|
7951 |
-
inserted: function inserted (el, binding, vnode, oldVnode) {
|
7952 |
-
if (vnode.tag === 'select') {
|
7953 |
-
// #6903
|
7954 |
-
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
7955 |
-
mergeVNodeHook(vnode, 'postpatch', function () {
|
7956 |
-
directive.componentUpdated(el, binding, vnode);
|
7957 |
-
});
|
7958 |
-
} else {
|
7959 |
-
setSelected(el, binding, vnode.context);
|
7960 |
}
|
7961 |
-
|
7962 |
-
|
7963 |
-
|
7964 |
-
|
7965 |
-
|
7966 |
-
|
7967 |
-
|
7968 |
-
|
7969 |
-
|
7970 |
-
|
7971 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7972 |
/* istanbul ignore if */
|
7973 |
-
if (
|
7974 |
-
|
7975 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7976 |
}
|
7977 |
}
|
7978 |
-
}
|
7979 |
|
7980 |
-
|
7981 |
-
|
7982 |
-
|
7983 |
-
|
7984 |
-
|
7985 |
-
|
7986 |
-
|
7987 |
-
|
7988 |
-
var curOptions = el._vOptions = [].map.call(el.options, getValue);
|
7989 |
-
if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
|
7990 |
-
// trigger change event if
|
7991 |
-
// no matching option found for at least one value
|
7992 |
-
var needReset = el.multiple
|
7993 |
-
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
|
7994 |
-
: binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
|
7995 |
-
if (needReset) {
|
7996 |
-
trigger(el, 'change');
|
7997 |
-
}
|
7998 |
-
}
|
7999 |
}
|
8000 |
}
|
8001 |
-
};
|
8002 |
|
8003 |
-
function
|
8004 |
-
|
8005 |
-
/* istanbul ignore if */
|
8006 |
-
if (isIE || isEdge) {
|
8007 |
-
setTimeout(function () {
|
8008 |
-
actuallySetSelected(el, binding, vm);
|
8009 |
-
}, 0);
|
8010 |
}
|
8011 |
-
}
|
8012 |
|
8013 |
-
function
|
8014 |
-
|
8015 |
-
|
8016 |
-
|
8017 |
-
|
8018 |
-
|
8019 |
-
|
8020 |
-
|
8021 |
-
|
8022 |
-
|
|
|
8023 |
}
|
8024 |
-
|
8025 |
-
|
8026 |
-
|
8027 |
-
|
8028 |
-
|
8029 |
-
|
8030 |
-
|
8031 |
-
|
8032 |
-
|
8033 |
-
|
8034 |
-
|
8035 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8036 |
}
|
8037 |
-
return
|
8038 |
}
|
8039 |
-
|
8040 |
-
|
8041 |
-
|
8042 |
-
|
8043 |
-
|
8044 |
-
|
8045 |
-
|
8046 |
-
|
8047 |
-
|
8048 |
-
}
|
8049 |
-
|
8050 |
-
function getValue (option) {
|
8051 |
-
return '_value' in option
|
8052 |
-
? option._value
|
8053 |
-
: option.value
|
8054 |
-
}
|
8055 |
-
|
8056 |
-
function onCompositionStart (e) {
|
8057 |
-
e.target.composing = true;
|
8058 |
-
}
|
8059 |
-
|
8060 |
-
function onCompositionEnd (e) {
|
8061 |
-
// prevent triggering an input event for no reason
|
8062 |
-
if (!e.target.composing) { return }
|
8063 |
-
e.target.composing = false;
|
8064 |
-
trigger(e.target, 'input');
|
8065 |
-
}
|
8066 |
-
|
8067 |
-
function trigger (el, type) {
|
8068 |
-
var e = document.createEvent('HTMLEvents');
|
8069 |
-
e.initEvent(type, true, true);
|
8070 |
-
el.dispatchEvent(e);
|
8071 |
-
}
|
8072 |
-
|
8073 |
-
/* */
|
8074 |
-
|
8075 |
-
// recursively search for possible transition defined inside the component root
|
8076 |
-
function locateNode (vnode) {
|
8077 |
-
return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
|
8078 |
-
? locateNode(vnode.componentInstance._vnode)
|
8079 |
-
: vnode
|
8080 |
-
}
|
8081 |
-
|
8082 |
-
var show = {
|
8083 |
-
bind: function bind (el, ref, vnode) {
|
8084 |
-
var value = ref.value;
|
8085 |
-
|
8086 |
-
vnode = locateNode(vnode);
|
8087 |
-
var transition$$1 = vnode.data && vnode.data.transition;
|
8088 |
-
var originalDisplay = el.__vOriginalDisplay =
|
8089 |
-
el.style.display === 'none' ? '' : el.style.display;
|
8090 |
-
if (value && transition$$1) {
|
8091 |
-
vnode.data.show = true;
|
8092 |
-
enter(vnode, function () {
|
8093 |
-
el.style.display = originalDisplay;
|
8094 |
-
});
|
8095 |
-
} else {
|
8096 |
-
el.style.display = value ? originalDisplay : 'none';
|
8097 |
-
}
|
8098 |
-
},
|
8099 |
|
8100 |
-
|
8101 |
-
var value = ref.value;
|
8102 |
-
var oldValue = ref.oldValue;
|
8103 |
|
8104 |
-
|
8105 |
-
|
8106 |
-
vnode = locateNode(vnode);
|
8107 |
-
var transition$$1 = vnode.data && vnode.data.transition;
|
8108 |
-
if (transition$$1) {
|
8109 |
-
vnode.data.show = true;
|
8110 |
-
if (value) {
|
8111 |
-
enter(vnode, function () {
|
8112 |
-
el.style.display = el.__vOriginalDisplay;
|
8113 |
-
});
|
8114 |
-
} else {
|
8115 |
-
leave(vnode, function () {
|
8116 |
-
el.style.display = 'none';
|
8117 |
-
});
|
8118 |
-
}
|
8119 |
-
} else {
|
8120 |
-
el.style.display = value ? el.__vOriginalDisplay : 'none';
|
8121 |
-
}
|
8122 |
-
},
|
8123 |
|
8124 |
-
|
8125 |
-
|
8126 |
-
|
8127 |
-
|
8128 |
-
|
8129 |
-
|
|
|
|
|
|
|
|
|
|
|
8130 |
) {
|
8131 |
-
|
8132 |
-
|
8133 |
-
|
8134 |
-
|
8135 |
-
|
8136 |
-
|
8137 |
-
var
|
8138 |
-
|
8139 |
-
|
8140 |
-
|
8141 |
-
|
8142 |
-
|
8143 |
-
|
8144 |
-
|
8145 |
-
|
8146 |
-
|
8147 |
-
var
|
8148 |
-
|
8149 |
-
|
8150 |
-
|
8151 |
-
|
8152 |
-
|
8153 |
-
|
8154 |
-
|
8155 |
-
|
8156 |
-
|
8157 |
-
|
8158 |
-
|
8159 |
-
|
8160 |
-
appearActiveClass: String,
|
8161 |
-
appearToClass: String,
|
8162 |
-
duration: [Number, String, Object]
|
8163 |
-
};
|
8164 |
-
|
8165 |
-
// in case the child is also an abstract component, e.g. <keep-alive>
|
8166 |
-
// we want to recursively retrieve the real component to be rendered
|
8167 |
-
function getRealChild (vnode) {
|
8168 |
-
var compOptions = vnode && vnode.componentOptions;
|
8169 |
-
if (compOptions && compOptions.Ctor.options.abstract) {
|
8170 |
-
return getRealChild(getFirstComponentChild(compOptions.children))
|
8171 |
-
} else {
|
8172 |
-
return vnode
|
8173 |
}
|
8174 |
-
}
|
8175 |
|
8176 |
-
|
8177 |
-
var data = {};
|
8178 |
-
var options = comp.$options;
|
8179 |
-
// props
|
8180 |
-
for (var key in options.propsData) {
|
8181 |
-
data[key] = comp[key];
|
8182 |
-
}
|
8183 |
-
// events.
|
8184 |
-
// extract listeners and pass them directly to the transition methods
|
8185 |
-
var listeners = options._parentListeners;
|
8186 |
-
for (var key$1 in listeners) {
|
8187 |
-
data[camelize(key$1)] = listeners[key$1];
|
8188 |
-
}
|
8189 |
-
return data
|
8190 |
-
}
|
8191 |
|
8192 |
-
function
|
8193 |
-
|
8194 |
-
|
8195 |
-
|
8196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8197 |
}
|
8198 |
-
}
|
8199 |
|
8200 |
-
function
|
8201 |
-
|
8202 |
-
if (
|
8203 |
-
|
8204 |
}
|
|
|
|
|
|
|
|
|
8205 |
}
|
8206 |
-
}
|
8207 |
-
|
8208 |
-
function isSameChild (child, oldChild) {
|
8209 |
-
return oldChild.key === child.key && oldChild.tag === child.tag
|
8210 |
-
}
|
8211 |
|
8212 |
-
var
|
8213 |
-
|
8214 |
-
|
8215 |
-
|
|
|
8216 |
|
8217 |
-
|
8218 |
-
var this$1 = this;
|
8219 |
|
8220 |
-
|
8221 |
-
|
8222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8223 |
}
|
8224 |
|
8225 |
-
|
8226 |
-
|
8227 |
-
|
8228 |
-
if (!children.length) {
|
8229 |
-
return
|
8230 |
}
|
|
|
8231 |
|
8232 |
-
|
8233 |
-
|
8234 |
-
|
8235 |
-
|
8236 |
-
|
8237 |
-
|
8238 |
-
);
|
8239 |
}
|
|
|
|
|
8240 |
|
8241 |
-
|
|
|
|
|
|
|
|
|
8242 |
|
8243 |
-
|
8244 |
-
if ("development" !== 'production' &&
|
8245 |
-
mode && mode !== 'in-out' && mode !== 'out-in'
|
8246 |
-
) {
|
8247 |
-
warn(
|
8248 |
-
'invalid <transition> mode: ' + mode,
|
8249 |
-
this.$parent
|
8250 |
-
);
|
8251 |
-
}
|
8252 |
|
8253 |
-
|
8254 |
|
8255 |
-
|
8256 |
-
|
8257 |
-
|
8258 |
-
|
|
|
8259 |
}
|
|
|
8260 |
|
8261 |
-
|
8262 |
-
// use getRealChild() to ignore abstract components e.g. keep-alive
|
8263 |
-
var child = getRealChild(rawChild);
|
8264 |
-
/* istanbul ignore if */
|
8265 |
-
if (!child) {
|
8266 |
-
return rawChild
|
8267 |
-
}
|
8268 |
|
8269 |
-
|
8270 |
-
|
8271 |
-
|
|
|
8272 |
|
8273 |
-
|
8274 |
-
|
8275 |
-
|
8276 |
-
|
8277 |
-
|
8278 |
-
? child.isComment
|
8279 |
-
? id + 'comment'
|
8280 |
-
: id + child.tag
|
8281 |
-
: isPrimitive(child.key)
|
8282 |
-
? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
|
8283 |
-
: child.key;
|
8284 |
|
8285 |
-
|
8286 |
-
|
8287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8288 |
|
8289 |
-
|
8290 |
-
|
8291 |
-
|
8292 |
-
child.data.show = true;
|
8293 |
-
}
|
8294 |
|
8295 |
-
|
8296 |
-
|
8297 |
-
|
8298 |
-
|
8299 |
-
|
8300 |
-
|
8301 |
-
|
8302 |
-
|
8303 |
-
|
8304 |
-
|
8305 |
-
|
8306 |
-
|
8307 |
-
|
8308 |
-
|
8309 |
-
|
8310 |
-
|
8311 |
-
|
8312 |
-
|
8313 |
-
|
8314 |
-
|
8315 |
-
|
8316 |
-
|
8317 |
-
|
8318 |
-
|
8319 |
-
|
8320 |
-
|
8321 |
-
|
8322 |
-
|
8323 |
-
|
8324 |
-
|
8325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8326 |
|
8327 |
-
|
8328 |
-
|
8329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8330 |
|
8331 |
-
|
|
|
|
|
|
|
|
|
|
|
8332 |
|
8333 |
-
//
|
8334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8335 |
|
8336 |
-
//
|
8337 |
-
|
8338 |
-
|
8339 |
-
|
8340 |
-
|
8341 |
-
|
8342 |
-
|
|
|
|
|
|
|
8343 |
|
8344 |
-
var
|
8345 |
-
|
8346 |
-
|
8347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8348 |
|
8349 |
-
|
|
|
|
|
8350 |
|
8351 |
-
|
8352 |
-
|
|
|
8353 |
|
8354 |
-
|
8355 |
-
|
8356 |
-
var map = Object.create(null);
|
8357 |
-
var prevChildren = this.prevChildren = this.children;
|
8358 |
-
var rawChildren = this.$slots.default || [];
|
8359 |
-
var children = this.children = [];
|
8360 |
-
var transitionData = extractTransitionData(this);
|
8361 |
-
|
8362 |
-
for (var i = 0; i < rawChildren.length; i++) {
|
8363 |
-
var c = rawChildren[i];
|
8364 |
-
if (c.tag) {
|
8365 |
-
if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
|
8366 |
-
children.push(c);
|
8367 |
-
map[c.key] = c
|
8368 |
-
;(c.data || (c.data = {})).transition = transitionData;
|
8369 |
-
} else {
|
8370 |
-
var opts = c.componentOptions;
|
8371 |
-
var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
|
8372 |
-
warn(("<transition-group> children must be keyed: <" + name + ">"));
|
8373 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8374 |
}
|
8375 |
-
}
|
8376 |
|
8377 |
-
|
8378 |
-
|
8379 |
-
|
8380 |
-
|
8381 |
-
var c$1 = prevChildren[i$1];
|
8382 |
-
c$1.data.transition = transitionData;
|
8383 |
-
c$1.data.pos = c$1.elm.getBoundingClientRect();
|
8384 |
-
if (map[c$1.key]) {
|
8385 |
-
kept.push(c$1);
|
8386 |
-
} else {
|
8387 |
-
removed.push(c$1);
|
8388 |
}
|
|
|
8389 |
}
|
8390 |
-
this.kept = h(tag, null, kept);
|
8391 |
-
this.removed = removed;
|
8392 |
}
|
8393 |
|
8394 |
-
|
8395 |
-
|
8396 |
|
8397 |
-
|
8398 |
-
|
8399 |
-
|
8400 |
-
|
8401 |
-
this.kept,
|
8402 |
-
false, // hydrating
|
8403 |
-
true // removeOnly (!important, avoids unnecessary moves)
|
8404 |
-
);
|
8405 |
-
this._vnode = this.kept;
|
8406 |
-
},
|
8407 |
|
8408 |
-
|
8409 |
-
|
8410 |
-
|
8411 |
-
|
8412 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8413 |
}
|
8414 |
|
8415 |
-
|
8416 |
-
|
8417 |
-
|
8418 |
-
children.forEach(recordPosition);
|
8419 |
-
children.forEach(applyTranslation);
|
8420 |
|
8421 |
-
|
8422 |
-
|
8423 |
-
|
8424 |
-
|
8425 |
-
|
8426 |
-
|
8427 |
-
|
8428 |
-
var el = c.elm;
|
8429 |
-
var s = el.style;
|
8430 |
-
addTransitionClass(el, moveClass);
|
8431 |
-
s.transform = s.WebkitTransform = s.transitionDuration = '';
|
8432 |
-
el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
|
8433 |
-
if (!e || /transform$/.test(e.propertyName)) {
|
8434 |
-
el.removeEventListener(transitionEndEvent, cb);
|
8435 |
-
el._moveCb = null;
|
8436 |
-
removeTransitionClass(el, moveClass);
|
8437 |
-
}
|
8438 |
-
});
|
8439 |
}
|
8440 |
-
});
|
8441 |
-
},
|
8442 |
|
8443 |
-
|
8444 |
-
|
8445 |
-
|
8446 |
-
|
8447 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8448 |
}
|
8449 |
-
|
8450 |
-
if (
|
8451 |
-
|
|
|
8452 |
}
|
8453 |
-
|
8454 |
-
|
8455 |
-
|
8456 |
-
// all other transition classes applied to ensure only the move class
|
8457 |
-
// is applied.
|
8458 |
-
var clone = el.cloneNode();
|
8459 |
-
if (el._transitionClasses) {
|
8460 |
-
el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
|
8461 |
}
|
8462 |
-
addClass(clone, moveClass);
|
8463 |
-
clone.style.display = 'none';
|
8464 |
-
this.$el.appendChild(clone);
|
8465 |
-
var info = getTransitionInfo(clone);
|
8466 |
-
this.$el.removeChild(clone);
|
8467 |
-
return (this._hasMove = info.hasTransform)
|
8468 |
}
|
8469 |
-
}
|
8470 |
-
}
|
8471 |
|
8472 |
-
function
|
8473 |
-
|
8474 |
-
|
8475 |
-
|
8476 |
-
|
8477 |
-
|
8478 |
-
|
8479 |
-
|
8480 |
-
|
8481 |
-
|
8482 |
-
|
8483 |
-
|
8484 |
-
|
8485 |
-
}
|
8486 |
-
|
8487 |
-
|
8488 |
-
|
8489 |
-
|
8490 |
-
|
8491 |
-
|
8492 |
-
|
8493 |
-
|
8494 |
-
|
8495 |
-
|
8496 |
-
|
8497 |
-
|
8498 |
-
}
|
8499 |
-
|
8500 |
-
|
8501 |
-
|
8502 |
-
|
8503 |
-
}
|
8504 |
-
|
8505 |
-
|
8506 |
-
|
8507 |
-
|
8508 |
-
|
8509 |
-
|
8510 |
-
|
8511 |
-
|
8512 |
-
|
8513 |
-
|
8514 |
-
|
8515 |
-
|
8516 |
-
|
8517 |
-
|
8518 |
-
|
8519 |
-
|
8520 |
-
|
8521 |
-
// public mount method
|
8522 |
-
Vue.prototype.$mount = function (
|
8523 |
-
el,
|
8524 |
-
hydrating
|
8525 |
-
) {
|
8526 |
-
el = el && inBrowser ? query(el) : undefined;
|
8527 |
-
return mountComponent(this, el, hydrating)
|
8528 |
-
};
|
8529 |
-
|
8530 |
-
// devtools global hook
|
8531 |
-
/* istanbul ignore next */
|
8532 |
-
if (inBrowser) {
|
8533 |
-
setTimeout(function () {
|
8534 |
-
if (config.devtools) {
|
8535 |
-
if (devtools) {
|
8536 |
-
devtools.emit('init', Vue);
|
8537 |
-
} else if (
|
8538 |
-
"development" !== 'production' &&
|
8539 |
-
"development" !== 'test' &&
|
8540 |
-
isChrome
|
8541 |
-
) {
|
8542 |
-
console[console.info ? 'info' : 'log'](
|
8543 |
-
'Download the Vue Devtools extension for a better development experience:\n' +
|
8544 |
-
'https://github.com/vuejs/vue-devtools'
|
8545 |
-
);
|
8546 |
}
|
8547 |
}
|
8548 |
-
|
8549 |
-
"development" !== 'test' &&
|
8550 |
-
config.productionTip !== false &&
|
8551 |
-
typeof console !== 'undefined'
|
8552 |
-
) {
|
8553 |
-
console[console.info ? 'info' : 'log'](
|
8554 |
-
"You are running Vue in development mode.\n" +
|
8555 |
-
"Make sure to turn on production mode when deploying for production.\n" +
|
8556 |
-
"See more tips at https://vuejs.org/guide/deployment.html"
|
8557 |
-
);
|
8558 |
-
}
|
8559 |
-
}, 0);
|
8560 |
-
}
|
8561 |
|
8562 |
-
/* */
|
8563 |
|
8564 |
-
var
|
8565 |
-
var
|
|
|
|
|
|
|
|
|
8566 |
|
8567 |
-
var
|
8568 |
-
var
|
8569 |
-
var
|
8570 |
-
return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
|
8571 |
-
});
|
8572 |
|
|
|
8573 |
|
|
|
|
|
8574 |
|
8575 |
-
|
8576 |
-
text,
|
8577 |
-
delimiters
|
8578 |
-
) {
|
8579 |
-
var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
|
8580 |
-
if (!tagRE.test(text)) {
|
8581 |
-
return
|
8582 |
-
}
|
8583 |
-
var tokens = [];
|
8584 |
-
var rawTokens = [];
|
8585 |
-
var lastIndex = tagRE.lastIndex = 0;
|
8586 |
-
var match, index, tokenValue;
|
8587 |
-
while ((match = tagRE.exec(text))) {
|
8588 |
-
index = match.index;
|
8589 |
-
// push text token
|
8590 |
-
if (index > lastIndex) {
|
8591 |
-
rawTokens.push(tokenValue = text.slice(lastIndex, index));
|
8592 |
-
tokens.push(JSON.stringify(tokenValue));
|
8593 |
-
}
|
8594 |
-
// tag token
|
8595 |
-
var exp = parseFilters(match[1].trim());
|
8596 |
-
tokens.push(("_s(" + exp + ")"));
|
8597 |
-
rawTokens.push({ '@binding': exp });
|
8598 |
-
lastIndex = index + match[0].length;
|
8599 |
-
}
|
8600 |
-
if (lastIndex < text.length) {
|
8601 |
-
rawTokens.push(tokenValue = text.slice(lastIndex));
|
8602 |
-
tokens.push(JSON.stringify(tokenValue));
|
8603 |
-
}
|
8604 |
-
return {
|
8605 |
-
expression: tokens.join('+'),
|
8606 |
-
tokens: rawTokens
|
8607 |
-
}
|
8608 |
-
}
|
8609 |
|
8610 |
-
|
8611 |
|
8612 |
-
|
8613 |
-
|
8614 |
-
|
8615 |
-
|
8616 |
-
|
8617 |
-
|
8618 |
-
|
8619 |
-
|
8620 |
-
|
8621 |
-
|
8622 |
-
|
8623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8624 |
}
|
8625 |
}
|
8626 |
-
if (staticClass) {
|
8627 |
-
el.staticClass = JSON.stringify(staticClass);
|
8628 |
-
}
|
8629 |
-
var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
|
8630 |
-
if (classBinding) {
|
8631 |
-
el.classBinding = classBinding;
|
8632 |
-
}
|
8633 |
-
}
|
8634 |
|
8635 |
-
|
8636 |
-
|
8637 |
-
|
8638 |
-
|
8639 |
-
|
8640 |
-
|
8641 |
-
|
8642 |
-
|
8643 |
-
return data
|
8644 |
-
}
|
8645 |
|
8646 |
-
|
8647 |
-
|
8648 |
-
|
8649 |
-
|
8650 |
-
}
|
8651 |
|
8652 |
-
|
|
|
|
|
8653 |
|
8654 |
-
|
8655 |
-
|
8656 |
-
|
8657 |
-
|
8658 |
-
|
8659 |
-
|
8660 |
-
|
8661 |
-
|
8662 |
-
|
8663 |
-
|
8664 |
-
|
8665 |
-
|
8666 |
-
|
8667 |
-
|
|
|
8668 |
}
|
8669 |
}
|
8670 |
-
el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
|
8671 |
-
}
|
8672 |
-
|
8673 |
-
var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
|
8674 |
-
if (styleBinding) {
|
8675 |
-
el.styleBinding = styleBinding;
|
8676 |
-
}
|
8677 |
-
}
|
8678 |
|
8679 |
-
function
|
8680 |
-
|
8681 |
-
|
8682 |
-
|
8683 |
-
|
8684 |
-
|
8685 |
-
|
8686 |
-
|
8687 |
-
|
8688 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8689 |
|
8690 |
-
|
8691 |
-
|
8692 |
-
|
8693 |
-
|
8694 |
-
|
8695 |
|
8696 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8697 |
|
8698 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8699 |
|
8700 |
-
|
8701 |
-
|
8702 |
-
|
8703 |
-
|
8704 |
-
|
8705 |
-
|
8706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8707 |
|
8708 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8709 |
|
8710 |
-
|
8711 |
-
|
8712 |
-
|
8713 |
-
);
|
|
|
8714 |
|
8715 |
-
|
8716 |
-
|
8717 |
-
|
8718 |
-
|
8719 |
-
);
|
8720 |
|
8721 |
-
|
8722 |
-
|
8723 |
-
|
8724 |
-
|
8725 |
-
|
8726 |
-
|
8727 |
-
|
8728 |
-
|
8729 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8730 |
|
8731 |
-
|
8732 |
-
|
8733 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8734 |
|
8735 |
-
|
8736 |
-
|
8737 |
-
|
8738 |
-
|
8739 |
-
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
8740 |
-
*/
|
8741 |
|
8742 |
-
|
8743 |
-
|
8744 |
-
|
8745 |
-
|
8746 |
-
var ncname = '[a-zA-Z_][\\w\\-\\.]*';
|
8747 |
-
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
|
8748 |
-
var startTagOpen = new RegExp(("^<" + qnameCapture));
|
8749 |
-
var startTagClose = /^\s*(\/?)>/;
|
8750 |
-
var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
|
8751 |
-
var doctype = /^<!DOCTYPE [^>]+>/i;
|
8752 |
-
// #7298: escape - to avoid being pased as HTML comment when inlined in page
|
8753 |
-
var comment = /^<!\--/;
|
8754 |
-
var conditionalComment = /^<!\[/;
|
8755 |
-
|
8756 |
-
var IS_REGEX_CAPTURING_BROKEN = false;
|
8757 |
-
'x'.replace(/x(.)?/g, function (m, g) {
|
8758 |
-
IS_REGEX_CAPTURING_BROKEN = g === '';
|
8759 |
-
});
|
8760 |
-
|
8761 |
-
// Special Elements (can contain anything)
|
8762 |
-
var isPlainTextElement = makeMap('script,style,textarea', true);
|
8763 |
-
var reCache = {};
|
8764 |
-
|
8765 |
-
var decodingMap = {
|
8766 |
-
'<': '<',
|
8767 |
-
'>': '>',
|
8768 |
-
'"': '"',
|
8769 |
-
'&': '&',
|
8770 |
-
' ': '\n',
|
8771 |
-
'	': '\t'
|
8772 |
-
};
|
8773 |
-
var encodedAttr = /&(?:lt|gt|quot|amp);/g;
|
8774 |
-
var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;
|
8775 |
-
|
8776 |
-
// #5992
|
8777 |
-
var isIgnoreNewlineTag = makeMap('pre,textarea', true);
|
8778 |
-
var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
|
8779 |
-
|
8780 |
-
function decodeAttr (value, shouldDecodeNewlines) {
|
8781 |
-
var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
|
8782 |
-
return value.replace(re, function (match) { return decodingMap[match]; })
|
8783 |
-
}
|
8784 |
-
|
8785 |
-
function parseHTML (html, options) {
|
8786 |
-
var stack = [];
|
8787 |
-
var expectHTML = options.expectHTML;
|
8788 |
-
var isUnaryTag$$1 = options.isUnaryTag || no;
|
8789 |
-
var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
|
8790 |
-
var index = 0;
|
8791 |
-
var last, lastTag;
|
8792 |
-
while (html) {
|
8793 |
-
last = html;
|
8794 |
-
// Make sure we're not in a plaintext content element like script/style
|
8795 |
-
if (!lastTag || !isPlainTextElement(lastTag)) {
|
8796 |
-
var textEnd = html.indexOf('<');
|
8797 |
-
if (textEnd === 0) {
|
8798 |
-
// Comment:
|
8799 |
-
if (comment.test(html)) {
|
8800 |
-
var commentEnd = html.indexOf('-->');
|
8801 |
-
|
8802 |
-
if (commentEnd >= 0) {
|
8803 |
-
if (options.shouldKeepComment) {
|
8804 |
-
options.comment(html.substring(4, commentEnd));
|
8805 |
-
}
|
8806 |
-
advance(commentEnd + 3);
|
8807 |
-
continue
|
8808 |
}
|
8809 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8810 |
|
8811 |
-
|
8812 |
-
|
8813 |
-
|
8814 |
-
|
8815 |
-
if (conditionalEnd >= 0) {
|
8816 |
-
advance(conditionalEnd + 2);
|
8817 |
-
continue
|
8818 |
}
|
8819 |
}
|
8820 |
|
8821 |
-
|
8822 |
-
|
8823 |
-
|
8824 |
-
|
8825 |
-
|
8826 |
}
|
8827 |
-
|
8828 |
-
|
8829 |
-
|
8830 |
-
|
8831 |
-
|
8832 |
-
|
8833 |
-
|
8834 |
-
|
|
|
8835 |
}
|
8836 |
-
|
8837 |
-
|
8838 |
-
|
8839 |
-
|
8840 |
-
|
8841 |
-
|
8842 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8843 |
}
|
8844 |
-
|
8845 |
}
|
8846 |
-
|
8847 |
-
|
8848 |
-
|
8849 |
-
|
8850 |
-
|
8851 |
-
while (
|
8852 |
-
!endTag.test(rest) &&
|
8853 |
-
!startTagOpen.test(rest) &&
|
8854 |
-
!comment.test(rest) &&
|
8855 |
-
!conditionalComment.test(rest)
|
8856 |
) {
|
8857 |
-
|
8858 |
-
|
8859 |
-
|
8860 |
-
|
8861 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8862 |
}
|
8863 |
-
text = html.substring(0, textEnd);
|
8864 |
-
advance(textEnd);
|
8865 |
-
}
|
8866 |
-
|
8867 |
-
if (textEnd < 0) {
|
8868 |
-
text = html;
|
8869 |
-
html = '';
|
8870 |
}
|
|
|
|
|
|
|
8871 |
|
8872 |
-
|
8873 |
-
|
8874 |
-
|
8875 |
-
} else {
|
8876 |
-
var endTagLength = 0;
|
8877 |
-
var stackedTag = lastTag.toLowerCase();
|
8878 |
-
var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
|
8879 |
-
var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
|
8880 |
-
endTagLength = endTag.length;
|
8881 |
-
if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
|
8882 |
-
text = text
|
8883 |
-
.replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
|
8884 |
-
.replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
|
8885 |
-
}
|
8886 |
-
if (shouldIgnoreFirstNewline(stackedTag, text)) {
|
8887 |
-
text = text.slice(1);
|
8888 |
-
}
|
8889 |
-
if (options.chars) {
|
8890 |
-
options.chars(text);
|
8891 |
-
}
|
8892 |
-
return ''
|
8893 |
-
});
|
8894 |
-
index += html.length - rest$1.length;
|
8895 |
-
html = rest$1;
|
8896 |
-
parseEndTag(stackedTag, index - endTagLength, index);
|
8897 |
}
|
|
|
8898 |
|
8899 |
-
|
8900 |
-
|
8901 |
-
|
8902 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8903 |
}
|
8904 |
-
|
|
|
|
|
8905 |
}
|
8906 |
}
|
8907 |
|
8908 |
-
|
8909 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8910 |
|
8911 |
-
|
8912 |
-
|
8913 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8914 |
}
|
8915 |
|
8916 |
-
function
|
8917 |
-
var
|
8918 |
-
if (
|
8919 |
-
|
8920 |
-
|
8921 |
-
|
8922 |
-
|
8923 |
-
|
8924 |
-
|
8925 |
-
|
8926 |
-
|
8927 |
-
|
8928 |
-
|
8929 |
-
|
8930 |
-
|
8931 |
-
|
8932 |
-
|
8933 |
-
|
8934 |
-
|
|
|
|
|
|
|
8935 |
}
|
|
|
8936 |
}
|
8937 |
}
|
8938 |
|
8939 |
-
function
|
8940 |
-
var
|
8941 |
-
|
8942 |
-
|
8943 |
-
|
8944 |
-
if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
|
8945 |
-
parseEndTag(lastTag);
|
8946 |
-
}
|
8947 |
-
if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
|
8948 |
-
parseEndTag(tagName);
|
8949 |
-
}
|
8950 |
}
|
|
|
8951 |
|
8952 |
-
|
8953 |
-
|
8954 |
-
|
8955 |
-
|
8956 |
-
|
8957 |
-
|
8958 |
-
|
8959 |
-
|
8960 |
-
|
8961 |
-
|
8962 |
-
|
8963 |
}
|
8964 |
-
var value = args[3] || args[4] || args[5] || '';
|
8965 |
-
var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
|
8966 |
-
? options.shouldDecodeNewlinesForHref
|
8967 |
-
: options.shouldDecodeNewlines;
|
8968 |
-
attrs[i] = {
|
8969 |
-
name: args[1],
|
8970 |
-
value: decodeAttr(value, shouldDecodeNewlines)
|
8971 |
-
};
|
8972 |
-
}
|
8973 |
-
|
8974 |
-
if (!unary) {
|
8975 |
-
stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs });
|
8976 |
-
lastTag = tagName;
|
8977 |
-
}
|
8978 |
-
|
8979 |
-
if (options.start) {
|
8980 |
-
options.start(tagName, attrs, unary, match.start, match.end);
|
8981 |
}
|
8982 |
}
|
8983 |
|
8984 |
-
function parseEndTag (tagName, start, end) {
|
8985 |
-
var pos, lowerCasedTagName;
|
8986 |
-
if (start == null) { start = index; }
|
8987 |
-
if (end == null) { end = index; }
|
8988 |
|
8989 |
-
if (tagName) {
|
8990 |
-
lowerCasedTagName = tagName.toLowerCase();
|
8991 |
-
}
|
8992 |
|
8993 |
-
|
8994 |
-
|
8995 |
-
|
8996 |
-
|
8997 |
-
|
8998 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8999 |
}
|
9000 |
} else {
|
9001 |
-
|
9002 |
-
pos = 0;
|
9003 |
}
|
|
|
|
|
9004 |
|
9005 |
-
|
9006 |
-
|
9007 |
-
|
9008 |
-
|
9009 |
-
|
9010 |
-
|
9011 |
-
|
9012 |
-
|
9013 |
-
|
9014 |
-
|
9015 |
-
|
9016 |
-
if (options.end) {
|
9017 |
-
options.end(stack[i].tag, start, end);
|
9018 |
-
}
|
9019 |
-
}
|
9020 |
-
|
9021 |
-
// Remove the open elements from the stack
|
9022 |
-
stack.length = pos;
|
9023 |
-
lastTag = pos && stack[pos - 1].tag;
|
9024 |
-
} else if (lowerCasedTagName === 'br') {
|
9025 |
-
if (options.start) {
|
9026 |
-
options.start(tagName, [], true, start, end);
|
9027 |
-
}
|
9028 |
-
} else if (lowerCasedTagName === 'p') {
|
9029 |
-
if (options.start) {
|
9030 |
-
options.start(tagName, [], false, start, end);
|
9031 |
}
|
9032 |
-
|
9033 |
-
|
|
|
9034 |
}
|
9035 |
}
|
9036 |
}
|
9037 |
-
}
|
9038 |
-
|
9039 |
-
/* */
|
9040 |
-
|
9041 |
-
var onRE = /^@|^v-on:/;
|
9042 |
-
var dirRE = /^v-|^@|^:/;
|
9043 |
-
var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/;
|
9044 |
-
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
9045 |
-
var stripParensRE = /^\(|\)$/g;
|
9046 |
-
|
9047 |
-
var argRE = /:(.*)$/;
|
9048 |
-
var bindRE = /^:|^v-bind:/;
|
9049 |
-
var modifierRE = /\.[^.]+/g;
|
9050 |
-
|
9051 |
-
var decodeHTMLCached = cached(he.decode);
|
9052 |
-
|
9053 |
-
// configurable state
|
9054 |
-
var warn$2;
|
9055 |
-
var delimiters;
|
9056 |
-
var transforms;
|
9057 |
-
var preTransforms;
|
9058 |
-
var postTransforms;
|
9059 |
-
var platformIsPreTag;
|
9060 |
-
var platformMustUseProp;
|
9061 |
-
var platformGetTagNamespace;
|
9062 |
|
9063 |
-
|
9064 |
-
|
9065 |
-
|
9066 |
-
|
9067 |
-
|
9068 |
-
|
9069 |
-
)
|
9070 |
-
|
9071 |
-
|
9072 |
-
|
9073 |
-
|
9074 |
-
|
9075 |
-
|
9076 |
-
|
9077 |
}
|
9078 |
-
}
|
9079 |
-
|
9080 |
-
/**
|
9081 |
-
* Convert HTML string to AST.
|
9082 |
-
*/
|
9083 |
-
function parse (
|
9084 |
-
template,
|
9085 |
-
options
|
9086 |
-
) {
|
9087 |
-
warn$2 = options.warn || baseWarn;
|
9088 |
-
|
9089 |
-
platformIsPreTag = options.isPreTag || no;
|
9090 |
-
platformMustUseProp = options.mustUseProp || no;
|
9091 |
-
platformGetTagNamespace = options.getTagNamespace || no;
|
9092 |
-
|
9093 |
-
transforms = pluckModuleFunction(options.modules, 'transformNode');
|
9094 |
-
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
|
9095 |
-
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
|
9096 |
-
|
9097 |
-
delimiters = options.delimiters;
|
9098 |
|
9099 |
-
|
9100 |
-
|
9101 |
-
|
9102 |
-
|
9103 |
-
|
9104 |
-
|
9105 |
-
|
9106 |
-
|
9107 |
-
|
9108 |
-
|
9109 |
-
|
9110 |
-
|
|
|
|
|
|
|
9111 |
}
|
9112 |
}
|
9113 |
|
9114 |
-
function
|
9115 |
-
|
9116 |
-
|
9117 |
-
inVPre = false;
|
9118 |
-
}
|
9119 |
-
if (platformIsPreTag(element.tag)) {
|
9120 |
-
inPre = false;
|
9121 |
-
}
|
9122 |
-
// apply post-transforms
|
9123 |
-
for (var i = 0; i < postTransforms.length; i++) {
|
9124 |
-
postTransforms[i](element, options);
|
9125 |
}
|
|
|
9126 |
}
|
9127 |
|
9128 |
-
|
9129 |
-
|
9130 |
-
|
9131 |
-
|
9132 |
-
|
9133 |
-
|
9134 |
-
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
|
9135 |
-
shouldKeepComment: options.comments,
|
9136 |
-
start: function start (tag, attrs, unary) {
|
9137 |
-
// check namespace.
|
9138 |
-
// inherit parent ns if there is one
|
9139 |
-
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
|
9140 |
|
9141 |
-
|
|
|
|
|
|
|
|
|
|
|
9142 |
/* istanbul ignore if */
|
9143 |
-
if (
|
9144 |
-
|
9145 |
-
|
9146 |
-
|
9147 |
-
|
9148 |
-
|
9149 |
-
|
|
|
|
|
9150 |
}
|
9151 |
-
|
9152 |
-
|
9153 |
-
|
9154 |
-
|
9155 |
-
|
9156 |
-
|
9157 |
-
"
|
|
|
|
|
|
|
9158 |
);
|
9159 |
}
|
|
|
|
|
9160 |
|
9161 |
-
|
9162 |
-
|
9163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9164 |
}
|
|
|
9165 |
|
9166 |
-
|
9167 |
-
|
9168 |
-
|
9169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9170 |
}
|
9171 |
}
|
9172 |
-
|
9173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9174 |
}
|
9175 |
-
|
9176 |
-
|
9177 |
-
|
9178 |
-
|
9179 |
-
|
9180 |
-
|
9181 |
-
|
9182 |
-
|
9183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9184 |
}
|
|
|
|
|
9185 |
|
9186 |
-
|
9187 |
-
|
9188 |
-
|
9189 |
-
|
9190 |
-
|
9191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9192 |
);
|
9193 |
}
|
9194 |
-
if (
|
9195 |
-
|
9196 |
-
|
9197 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9198 |
);
|
9199 |
}
|
9200 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9201 |
}
|
|
|
|
|
9202 |
|
9203 |
-
|
9204 |
-
|
9205 |
-
|
9206 |
-
|
9207 |
-
|
9208 |
-
// allow root elements with v-if, v-else-if and v-else
|
9209 |
-
if (root.if && (element.elseif || element.else)) {
|
9210 |
-
checkRootConstraints(element);
|
9211 |
-
addIfCondition(root, {
|
9212 |
-
exp: element.elseif,
|
9213 |
-
block: element
|
9214 |
-
});
|
9215 |
-
} else {
|
9216 |
-
warnOnce(
|
9217 |
-
"Component template should contain exactly one root element. " +
|
9218 |
-
"If you are using v-if on multiple elements, " +
|
9219 |
-
"use v-else-if to chain them instead."
|
9220 |
-
);
|
9221 |
-
}
|
9222 |
}
|
9223 |
-
|
9224 |
-
|
9225 |
-
|
9226 |
-
|
9227 |
-
|
9228 |
-
|
9229 |
-
|
9230 |
-
|
9231 |
-
|
9232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9233 |
}
|
9234 |
-
|
9235 |
-
|
9236 |
-
|
9237 |
-
|
9238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9239 |
}
|
9240 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9241 |
|
9242 |
-
|
9243 |
-
// remove trailing whitespace
|
9244 |
-
var element = stack[stack.length - 1];
|
9245 |
-
var lastNode = element.children[element.children.length - 1];
|
9246 |
-
if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
|
9247 |
-
element.children.pop();
|
9248 |
-
}
|
9249 |
-
// pop stack
|
9250 |
-
stack.length -= 1;
|
9251 |
-
currentParent = stack[stack.length - 1];
|
9252 |
-
closeElement(element);
|
9253 |
-
},
|
9254 |
|
9255 |
-
|
9256 |
-
|
9257 |
-
|
9258 |
-
|
9259 |
-
warnOnce(
|
9260 |
-
'Component template requires a root element, rather than just text.'
|
9261 |
-
);
|
9262 |
-
} else if ((text = text.trim())) {
|
9263 |
-
warnOnce(
|
9264 |
-
("text \"" + text + "\" outside root element will be ignored.")
|
9265 |
-
);
|
9266 |
-
}
|
9267 |
-
}
|
9268 |
-
return
|
9269 |
-
}
|
9270 |
-
// IE textarea placeholder bug
|
9271 |
-
/* istanbul ignore if */
|
9272 |
-
if (isIE &&
|
9273 |
-
currentParent.tag === 'textarea' &&
|
9274 |
-
currentParent.attrsMap.placeholder === text
|
9275 |
-
) {
|
9276 |
return
|
9277 |
}
|
9278 |
-
|
9279 |
-
|
9280 |
-
|
9281 |
-
|
9282 |
-
|
9283 |
-
if (
|
9284 |
-
|
9285 |
-
|
9286 |
-
|
9287 |
-
|
9288 |
-
|
9289 |
-
|
9290 |
-
|
9291 |
-
|
9292 |
-
|
9293 |
-
|
9294 |
-
|
9295 |
-
|
9296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9297 |
}
|
|
|
|
|
9298 |
}
|
9299 |
-
},
|
9300 |
-
comment: function comment (text) {
|
9301 |
-
currentParent.children.push({
|
9302 |
-
type: 3,
|
9303 |
-
text: text,
|
9304 |
-
isComment: true
|
9305 |
-
});
|
9306 |
-
}
|
9307 |
-
});
|
9308 |
-
return root
|
9309 |
-
}
|
9310 |
-
|
9311 |
-
function processPre (el) {
|
9312 |
-
if (getAndRemoveAttr(el, 'v-pre') != null) {
|
9313 |
-
el.pre = true;
|
9314 |
-
}
|
9315 |
-
}
|
9316 |
-
|
9317 |
-
function processRawAttrs (el) {
|
9318 |
-
var l = el.attrsList.length;
|
9319 |
-
if (l) {
|
9320 |
-
var attrs = el.attrs = new Array(l);
|
9321 |
-
for (var i = 0; i < l; i++) {
|
9322 |
-
attrs[i] = {
|
9323 |
-
name: el.attrsList[i].name,
|
9324 |
-
value: JSON.stringify(el.attrsList[i].value)
|
9325 |
-
};
|
9326 |
}
|
9327 |
-
} else if (!el.pre) {
|
9328 |
-
// non root node in pre blocks with no attributes
|
9329 |
-
el.plain = true;
|
9330 |
}
|
9331 |
-
}
|
9332 |
|
9333 |
-
function
|
9334 |
-
|
|
|
9335 |
|
9336 |
-
|
9337 |
-
|
9338 |
-
|
9339 |
|
9340 |
-
|
9341 |
-
|
9342 |
-
|
9343 |
-
|
9344 |
-
|
9345 |
-
}
|
9346 |
-
processAttrs(element);
|
9347 |
-
}
|
9348 |
|
9349 |
-
|
9350 |
-
|
9351 |
-
|
9352 |
-
if (
|
9353 |
-
|
9354 |
}
|
9355 |
-
el.key = exp;
|
9356 |
}
|
9357 |
-
}
|
9358 |
|
9359 |
-
|
9360 |
-
var ref = getBindingAttr(el, 'ref');
|
9361 |
-
if (ref) {
|
9362 |
-
el.ref = ref;
|
9363 |
-
el.refInFor = checkInFor(el);
|
9364 |
-
}
|
9365 |
-
}
|
9366 |
|
9367 |
-
function
|
9368 |
-
|
9369 |
-
|
9370 |
-
var res = parseFor(exp);
|
9371 |
-
if (res) {
|
9372 |
-
extend(el, res);
|
9373 |
-
} else {
|
9374 |
-
warn$2(
|
9375 |
-
("Invalid v-for expression: " + exp)
|
9376 |
-
);
|
9377 |
}
|
9378 |
}
|
9379 |
-
}
|
9380 |
|
|
|
|
|
|
|
|
|
|
|
9381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9382 |
|
9383 |
-
|
9384 |
-
var inMatch = exp.match(forAliasRE);
|
9385 |
-
if (!inMatch) { return }
|
9386 |
-
var res = {};
|
9387 |
-
res.for = inMatch[2].trim();
|
9388 |
-
var alias = inMatch[1].trim().replace(stripParensRE, '');
|
9389 |
-
var iteratorMatch = alias.match(forIteratorRE);
|
9390 |
-
if (iteratorMatch) {
|
9391 |
-
res.alias = alias.replace(forIteratorRE, '');
|
9392 |
-
res.iterator1 = iteratorMatch[1].trim();
|
9393 |
-
if (iteratorMatch[2]) {
|
9394 |
-
res.iterator2 = iteratorMatch[2].trim();
|
9395 |
-
}
|
9396 |
-
} else {
|
9397 |
-
res.alias = alias;
|
9398 |
-
}
|
9399 |
-
return res
|
9400 |
-
}
|
9401 |
-
|
9402 |
-
function processIf (el) {
|
9403 |
-
var exp = getAndRemoveAttr(el, 'v-if');
|
9404 |
-
if (exp) {
|
9405 |
-
el.if = exp;
|
9406 |
-
addIfCondition(el, {
|
9407 |
-
exp: exp,
|
9408 |
-
block: el
|
9409 |
-
});
|
9410 |
-
} else {
|
9411 |
-
if (getAndRemoveAttr(el, 'v-else') != null) {
|
9412 |
-
el.else = true;
|
9413 |
-
}
|
9414 |
-
var elseif = getAndRemoveAttr(el, 'v-else-if');
|
9415 |
-
if (elseif) {
|
9416 |
-
el.elseif = elseif;
|
9417 |
-
}
|
9418 |
-
}
|
9419 |
-
}
|
9420 |
|
9421 |
-
|
9422 |
-
var
|
9423 |
-
|
9424 |
-
|
9425 |
-
|
9426 |
-
|
9427 |
-
|
9428 |
-
|
9429 |
-
|
9430 |
-
|
9431 |
-
|
9432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9433 |
}
|
9434 |
-
}
|
9435 |
|
9436 |
-
function
|
9437 |
-
|
9438 |
-
|
9439 |
-
|
9440 |
-
|
9441 |
-
|
9442 |
-
if (
|
9443 |
-
|
9444 |
-
|
9445 |
-
|
9446 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9447 |
}
|
9448 |
-
children.pop();
|
9449 |
}
|
9450 |
}
|
9451 |
-
}
|
9452 |
|
9453 |
-
function
|
9454 |
-
|
9455 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9456 |
}
|
9457 |
-
el.ifConditions.push(condition);
|
9458 |
-
}
|
9459 |
|
9460 |
-
function
|
9461 |
-
|
9462 |
-
|
9463 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9464 |
}
|
9465 |
-
}
|
9466 |
|
9467 |
-
function
|
9468 |
-
|
9469 |
-
|
9470 |
-
|
9471 |
-
|
9472 |
-
"`key` does not work on <slot> because slots are abstract outlets " +
|
9473 |
-
"and can possibly expand into multiple elements. " +
|
9474 |
-
"Use the key on a wrapping element instead."
|
9475 |
-
);
|
9476 |
-
}
|
9477 |
-
} else {
|
9478 |
-
var slotScope;
|
9479 |
-
if (el.tag === 'template') {
|
9480 |
-
slotScope = getAndRemoveAttr(el, 'scope');
|
9481 |
-
/* istanbul ignore if */
|
9482 |
-
if ("development" !== 'production' && slotScope) {
|
9483 |
-
warn$2(
|
9484 |
-
"the \"scope\" attribute for scoped slots have been deprecated and " +
|
9485 |
-
"replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
|
9486 |
-
"can also be used on plain elements in addition to <template> to " +
|
9487 |
-
"denote scoped slots.",
|
9488 |
-
true
|
9489 |
-
);
|
9490 |
}
|
9491 |
-
|
9492 |
-
|
9493 |
-
/* istanbul ignore if */
|
9494 |
-
if ("development" !== 'production' && el.attrsMap['v-for']) {
|
9495 |
-
warn$2(
|
9496 |
-
"Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
|
9497 |
-
"(v-for takes higher priority). Use a wrapper <template> for the " +
|
9498 |
-
"scoped slot to make it clearer.",
|
9499 |
-
true
|
9500 |
-
);
|
9501 |
}
|
9502 |
-
el.slotScope = slotScope;
|
9503 |
}
|
9504 |
-
|
9505 |
-
|
9506 |
-
|
9507 |
-
|
9508 |
-
|
9509 |
-
|
9510 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9511 |
}
|
9512 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
9513 |
}
|
9514 |
-
}
|
9515 |
|
9516 |
-
function
|
9517 |
-
|
9518 |
-
|
9519 |
-
|
9520 |
-
}
|
9521 |
-
if (getAndRemoveAttr(el, 'inline-template') != null) {
|
9522 |
-
el.inlineTemplate = true;
|
9523 |
-
}
|
9524 |
-
}
|
9525 |
|
9526 |
-
|
9527 |
-
|
9528 |
-
|
9529 |
-
|
9530 |
-
|
9531 |
-
|
9532 |
-
|
9533 |
-
|
9534 |
-
|
9535 |
-
|
9536 |
-
|
9537 |
-
if (modifiers) {
|
9538 |
-
name = name.replace(modifierRE, '');
|
9539 |
}
|
9540 |
-
|
9541 |
-
|
9542 |
-
|
9543 |
-
|
9544 |
-
|
9545 |
-
|
9546 |
-
|
9547 |
-
|
9548 |
-
|
9549 |
-
|
9550 |
-
|
9551 |
-
name = camelize(name);
|
9552 |
-
}
|
9553 |
-
if (modifiers.sync) {
|
9554 |
-
addHandler(
|
9555 |
-
el,
|
9556 |
-
("update:" + (camelize(name))),
|
9557 |
-
genAssignmentCode(value, "$event")
|
9558 |
-
);
|
9559 |
}
|
9560 |
-
}
|
9561 |
-
|
9562 |
-
|
9563 |
-
|
9564 |
-
|
|
|
|
|
|
|
9565 |
} else {
|
9566 |
-
|
9567 |
-
}
|
9568 |
-
} else if (onRE.test(name)) { // v-on
|
9569 |
-
name = name.replace(onRE, '');
|
9570 |
-
addHandler(el, name, value, modifiers, false, warn$2);
|
9571 |
-
} else { // normal directives
|
9572 |
-
name = name.replace(dirRE, '');
|
9573 |
-
// parse arg
|
9574 |
-
var argMatch = name.match(argRE);
|
9575 |
-
var arg = argMatch && argMatch[1];
|
9576 |
-
if (arg) {
|
9577 |
-
name = name.slice(0, -(arg.length + 1));
|
9578 |
-
}
|
9579 |
-
addDirective(el, name, rawName, value, arg, modifiers);
|
9580 |
-
if ("development" !== 'production' && name === 'model') {
|
9581 |
-
checkForAliasModel(el, value);
|
9582 |
}
|
9583 |
}
|
9584 |
-
|
9585 |
-
|
9586 |
-
{
|
9587 |
-
var res = parseText(value, delimiters);
|
9588 |
-
if (res) {
|
9589 |
-
warn$2(
|
9590 |
-
name + "=\"" + value + "\": " +
|
9591 |
-
'Interpolation inside attributes has been removed. ' +
|
9592 |
-
'Use v-bind or the colon shorthand instead. For example, ' +
|
9593 |
-
'instead of <div id="{{ val }}">, use <div :id="val">.'
|
9594 |
-
);
|
9595 |
-
}
|
9596 |
}
|
9597 |
-
|
9598 |
-
|
9599 |
-
|
9600 |
-
if (!el.component &&
|
9601 |
-
name === 'muted' &&
|
9602 |
-
platformMustUseProp(el.tag, el.attrsMap.type, name)) {
|
9603 |
-
addProp(el, name, 'true');
|
9604 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9605 |
}
|
9606 |
}
|
9607 |
-
}
|
9608 |
|
9609 |
-
function
|
9610 |
-
|
9611 |
-
|
9612 |
-
|
9613 |
-
|
9614 |
-
|
9615 |
-
|
|
|
9616 |
}
|
9617 |
-
return false
|
9618 |
-
}
|
9619 |
|
9620 |
-
function
|
9621 |
-
|
9622 |
-
|
9623 |
-
|
9624 |
-
|
9625 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9626 |
}
|
9627 |
-
}
|
9628 |
|
9629 |
-
|
9630 |
-
|
9631 |
-
|
9632 |
-
if (
|
9633 |
-
"
|
9634 |
-
map[attrs[i].name] && !isIE && !isEdge
|
9635 |
-
) {
|
9636 |
-
warn$2('duplicate attribute: ' + attrs[i].name);
|
9637 |
}
|
9638 |
-
|
9639 |
}
|
9640 |
-
return map
|
9641 |
-
}
|
9642 |
|
9643 |
-
|
9644 |
-
function isTextTag (el) {
|
9645 |
-
return el.tag === 'script' || el.tag === 'style'
|
9646 |
-
}
|
9647 |
|
9648 |
-
function
|
9649 |
-
|
9650 |
-
|
9651 |
-
|
9652 |
-
|
9653 |
-
el.attrsMap.type === 'text/javascript'
|
9654 |
-
))
|
9655 |
-
)
|
9656 |
-
}
|
9657 |
|
9658 |
-
|
9659 |
-
var ieNSPrefix = /^NS\d+:/;
|
9660 |
|
9661 |
-
|
9662 |
-
|
9663 |
-
|
9664 |
-
|
9665 |
-
|
9666 |
-
if (!ieNSBug.test(attr.name)) {
|
9667 |
-
attr.name = attr.name.replace(ieNSPrefix, '');
|
9668 |
-
res.push(attr);
|
9669 |
-
}
|
9670 |
-
}
|
9671 |
-
return res
|
9672 |
-
}
|
9673 |
|
9674 |
-
|
9675 |
-
|
9676 |
-
|
9677 |
-
|
9678 |
-
|
9679 |
-
|
9680 |
-
|
9681 |
-
|
9682 |
-
|
9683 |
-
|
9684 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9685 |
}
|
9686 |
-
_el = _el.parent;
|
9687 |
}
|
9688 |
-
}
|
9689 |
|
9690 |
-
|
|
|
|
|
|
|
9691 |
|
9692 |
-
|
9693 |
-
|
9694 |
-
|
9695 |
-
|
9696 |
-
|
9697 |
-
|
9698 |
-
|
9699 |
-
|
9700 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9701 |
|
9702 |
-
|
9703 |
-
|
9704 |
-
|
9705 |
-
|
9706 |
-
|
|
|
|
|
|
|
9707 |
}
|
|
|
9708 |
|
9709 |
-
|
9710 |
-
|
9711 |
-
|
9712 |
-
|
9713 |
-
|
9714 |
-
|
9715 |
-
|
9716 |
-
|
9717 |
-
|
9718 |
-
|
9719 |
-
|
9720 |
-
|
9721 |
-
|
9722 |
-
|
9723 |
-
var branch0 = cloneASTElement(el);
|
9724 |
-
// process for on the main node
|
9725 |
-
processFor(branch0);
|
9726 |
-
addRawAttr(branch0, 'type', 'checkbox');
|
9727 |
-
processElement(branch0, options);
|
9728 |
-
branch0.processed = true; // prevent it from double-processed
|
9729 |
-
branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
|
9730 |
-
addIfCondition(branch0, {
|
9731 |
-
exp: branch0.if,
|
9732 |
-
block: branch0
|
9733 |
-
});
|
9734 |
-
// 2. add radio else-if condition
|
9735 |
-
var branch1 = cloneASTElement(el);
|
9736 |
-
getAndRemoveAttr(branch1, 'v-for', true);
|
9737 |
-
addRawAttr(branch1, 'type', 'radio');
|
9738 |
-
processElement(branch1, options);
|
9739 |
-
addIfCondition(branch0, {
|
9740 |
-
exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
|
9741 |
-
block: branch1
|
9742 |
-
});
|
9743 |
-
// 3. other
|
9744 |
-
var branch2 = cloneASTElement(el);
|
9745 |
-
getAndRemoveAttr(branch2, 'v-for', true);
|
9746 |
-
addRawAttr(branch2, ':type', typeBinding);
|
9747 |
-
processElement(branch2, options);
|
9748 |
-
addIfCondition(branch0, {
|
9749 |
-
exp: ifCondition,
|
9750 |
-
block: branch2
|
9751 |
-
});
|
9752 |
|
9753 |
-
|
9754 |
-
|
9755 |
-
|
9756 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9757 |
}
|
9758 |
-
|
9759 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9760 |
}
|
9761 |
}
|
9762 |
-
}
|
9763 |
|
9764 |
-
function
|
9765 |
-
|
9766 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9767 |
|
9768 |
-
var
|
9769 |
-
|
9770 |
-
|
|
|
|
|
|
|
9771 |
|
9772 |
-
|
9773 |
-
|
9774 |
-
|
9775 |
-
|
9776 |
-
|
|
|
|
|
|
|
|
|
9777 |
|
9778 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9779 |
|
9780 |
-
|
9781 |
-
|
9782 |
-
|
|
|
|
|
9783 |
}
|
9784 |
-
}
|
9785 |
|
9786 |
-
|
|
|
9787 |
|
9788 |
-
|
9789 |
-
|
9790 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9791 |
}
|
9792 |
-
}
|
9793 |
|
9794 |
-
|
9795 |
-
|
9796 |
-
|
9797 |
-
|
9798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9799 |
|
9800 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9801 |
|
9802 |
-
|
9803 |
-
|
9804 |
-
|
9805 |
-
|
9806 |
-
|
9807 |
-
|
9808 |
-
|
9809 |
-
|
9810 |
-
|
9811 |
-
|
9812 |
-
|
9813 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9814 |
|
9815 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9816 |
|
9817 |
-
var
|
9818 |
-
|
|
|
9819 |
|
9820 |
-
|
|
|
9821 |
|
9822 |
-
|
9823 |
-
|
9824 |
-
|
9825 |
-
|
9826 |
-
*
|
9827 |
-
* Once we detect these sub-trees, we can:
|
9828 |
-
*
|
9829 |
-
* 1. Hoist them into constants, so that we no longer need to
|
9830 |
-
* create fresh nodes for them on each re-render;
|
9831 |
-
* 2. Completely skip them in the patching process.
|
9832 |
-
*/
|
9833 |
-
function optimize (root, options) {
|
9834 |
-
if (!root) { return }
|
9835 |
-
isStaticKey = genStaticKeysCached(options.staticKeys || '');
|
9836 |
-
isPlatformReservedTag = options.isReservedTag || no;
|
9837 |
-
// first pass: mark all non-static nodes.
|
9838 |
-
markStatic$1(root);
|
9839 |
-
// second pass: mark static roots.
|
9840 |
-
markStaticRoots(root, false);
|
9841 |
-
}
|
9842 |
-
|
9843 |
-
function genStaticKeys$1 (keys) {
|
9844 |
-
return makeMap(
|
9845 |
-
'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +
|
9846 |
-
(keys ? ',' + keys : '')
|
9847 |
-
)
|
9848 |
-
}
|
9849 |
-
|
9850 |
-
function markStatic$1 (node) {
|
9851 |
-
node.static = isStatic(node);
|
9852 |
-
if (node.type === 1) {
|
9853 |
-
// do not make component slot content static. this avoids
|
9854 |
-
// 1. components not able to mutate slot nodes
|
9855 |
-
// 2. static slot content fails for hot-reloading
|
9856 |
-
if (
|
9857 |
-
!isPlatformReservedTag(node.tag) &&
|
9858 |
-
node.tag !== 'slot' &&
|
9859 |
-
node.attrsMap['inline-template'] == null
|
9860 |
-
) {
|
9861 |
-
return
|
9862 |
}
|
9863 |
-
|
9864 |
-
|
9865 |
-
|
9866 |
-
|
9867 |
-
|
|
|
|
|
9868 |
}
|
|
|
9869 |
}
|
9870 |
-
|
9871 |
-
|
9872 |
-
|
9873 |
-
|
9874 |
-
|
9875 |
-
|
9876 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9877 |
}
|
|
|
|
|
|
|
|
|
|
|
9878 |
}
|
9879 |
}
|
9880 |
-
}
|
9881 |
|
9882 |
-
|
9883 |
-
|
9884 |
-
|
9885 |
-
|
9886 |
-
|
9887 |
-
|
9888 |
-
|
9889 |
-
|
9890 |
-
|
9891 |
-
|
9892 |
-
|
9893 |
-
|
9894 |
-
|
9895 |
-
return
|
9896 |
-
} else {
|
9897 |
-
node.staticRoot = false;
|
9898 |
-
}
|
9899 |
-
if (node.children) {
|
9900 |
-
for (var i = 0, l = node.children.length; i < l; i++) {
|
9901 |
-
markStaticRoots(node.children[i], isInFor || !!node.for);
|
9902 |
}
|
9903 |
-
|
9904 |
-
|
9905 |
-
|
9906 |
-
|
|
|
|
|
|
|
|
|
9907 |
}
|
9908 |
}
|
|
|
9909 |
}
|
9910 |
-
}
|
9911 |
|
9912 |
-
function
|
9913 |
-
|
9914 |
-
return false
|
9915 |
-
}
|
9916 |
-
if (node.type === 3) { // text
|
9917 |
-
return true
|
9918 |
-
}
|
9919 |
-
return !!(node.pre || (
|
9920 |
-
!node.hasBindings && // no dynamic bindings
|
9921 |
-
!node.if && !node.for && // not v-if or v-for or v-else
|
9922 |
-
!isBuiltInTag(node.tag) && // not a built-in
|
9923 |
-
isPlatformReservedTag(node.tag) && // not a component
|
9924 |
-
!isDirectChildOfTemplateFor(node) &&
|
9925 |
-
Object.keys(node).every(isStaticKey)
|
9926 |
-
))
|
9927 |
-
}
|
9928 |
-
|
9929 |
-
function isDirectChildOfTemplateFor (node) {
|
9930 |
-
while (node.parent) {
|
9931 |
-
node = node.parent;
|
9932 |
-
if (node.tag !== 'template') {
|
9933 |
-
return false
|
9934 |
-
}
|
9935 |
-
if (node.for) {
|
9936 |
-
return true
|
9937 |
-
}
|
9938 |
}
|
9939 |
-
|
9940 |
-
|
9941 |
-
|
9942 |
-
|
9943 |
-
|
9944 |
-
|
9945 |
-
|
9946 |
-
|
9947 |
-
// KeyboardEvent.keyCode aliases
|
9948 |
-
var keyCodes = {
|
9949 |
-
esc: 27,
|
9950 |
-
tab: 9,
|
9951 |
-
enter: 13,
|
9952 |
-
space: 32,
|
9953 |
-
up: 38,
|
9954 |
-
left: 37,
|
9955 |
-
right: 39,
|
9956 |
-
down: 40,
|
9957 |
-
'delete': [8, 46]
|
9958 |
-
};
|
9959 |
-
|
9960 |
-
// KeyboardEvent.key aliases
|
9961 |
-
var keyNames = {
|
9962 |
-
esc: 'Escape',
|
9963 |
-
tab: 'Tab',
|
9964 |
-
enter: 'Enter',
|
9965 |
-
space: ' ',
|
9966 |
-
// #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
|
9967 |
-
up: ['Up', 'ArrowUp'],
|
9968 |
-
left: ['Left', 'ArrowLeft'],
|
9969 |
-
right: ['Right', 'ArrowRight'],
|
9970 |
-
down: ['Down', 'ArrowDown'],
|
9971 |
-
'delete': ['Backspace', 'Delete']
|
9972 |
-
};
|
9973 |
-
|
9974 |
-
// #4868: modifiers that prevent the execution of the listener
|
9975 |
-
// need to explicitly return null so that we can determine whether to remove
|
9976 |
-
// the listener for .once
|
9977 |
-
var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
|
9978 |
-
|
9979 |
-
var modifierCode = {
|
9980 |
-
stop: '$event.stopPropagation();',
|
9981 |
-
prevent: '$event.preventDefault();',
|
9982 |
-
self: genGuard("$event.target !== $event.currentTarget"),
|
9983 |
-
ctrl: genGuard("!$event.ctrlKey"),
|
9984 |
-
shift: genGuard("!$event.shiftKey"),
|
9985 |
-
alt: genGuard("!$event.altKey"),
|
9986 |
-
meta: genGuard("!$event.metaKey"),
|
9987 |
-
left: genGuard("'button' in $event && $event.button !== 0"),
|
9988 |
-
middle: genGuard("'button' in $event && $event.button !== 1"),
|
9989 |
-
right: genGuard("'button' in $event && $event.button !== 2")
|
9990 |
-
};
|
9991 |
-
|
9992 |
-
function genHandlers (
|
9993 |
-
events,
|
9994 |
-
isNative,
|
9995 |
-
warn
|
9996 |
-
) {
|
9997 |
-
var res = isNative ? 'nativeOn:{' : 'on:{';
|
9998 |
-
for (var name in events) {
|
9999 |
-
res += "\"" + name + "\":" + (genHandler(name, events[name])) + ",";
|
10000 |
-
}
|
10001 |
-
return res.slice(0, -1) + '}'
|
10002 |
-
}
|
10003 |
-
|
10004 |
-
function genHandler (
|
10005 |
-
name,
|
10006 |
-
handler
|
10007 |
-
) {
|
10008 |
-
if (!handler) {
|
10009 |
-
return 'function(){}'
|
10010 |
-
}
|
10011 |
-
|
10012 |
-
if (Array.isArray(handler)) {
|
10013 |
-
return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]")
|
10014 |
-
}
|
10015 |
-
|
10016 |
-
var isMethodPath = simplePathRE.test(handler.value);
|
10017 |
-
var isFunctionExpression = fnExpRE.test(handler.value);
|
10018 |
-
|
10019 |
-
if (!handler.modifiers) {
|
10020 |
-
if (isMethodPath || isFunctionExpression) {
|
10021 |
-
return handler.value
|
10022 |
-
}
|
10023 |
-
/* istanbul ignore if */
|
10024 |
-
return ("function($event){" + (handler.value) + "}") // inline statement
|
10025 |
-
} else {
|
10026 |
-
var code = '';
|
10027 |
-
var genModifierCode = '';
|
10028 |
-
var keys = [];
|
10029 |
-
for (var key in handler.modifiers) {
|
10030 |
-
if (modifierCode[key]) {
|
10031 |
-
genModifierCode += modifierCode[key];
|
10032 |
-
// left/right
|
10033 |
-
if (keyCodes[key]) {
|
10034 |
-
keys.push(key);
|
10035 |
-
}
|
10036 |
-
} else if (key === 'exact') {
|
10037 |
-
var modifiers = (handler.modifiers);
|
10038 |
-
genModifierCode += genGuard(
|
10039 |
-
['ctrl', 'shift', 'alt', 'meta']
|
10040 |
-
.filter(function (keyModifier) { return !modifiers[keyModifier]; })
|
10041 |
-
.map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
|
10042 |
-
.join('||')
|
10043 |
-
);
|
10044 |
-
} else {
|
10045 |
-
keys.push(key);
|
10046 |
-
}
|
10047 |
-
}
|
10048 |
-
if (keys.length) {
|
10049 |
-
code += genKeyFilter(keys);
|
10050 |
-
}
|
10051 |
-
// Make sure modifiers like prevent and stop get executed after key filtering
|
10052 |
-
if (genModifierCode) {
|
10053 |
-
code += genModifierCode;
|
10054 |
}
|
10055 |
-
var handlerCode = isMethodPath
|
10056 |
-
? ("return " + (handler.value) + "($event)")
|
10057 |
-
: isFunctionExpression
|
10058 |
-
? ("return (" + (handler.value) + ")($event)")
|
10059 |
-
: handler.value;
|
10060 |
-
/* istanbul ignore if */
|
10061 |
-
return ("function($event){" + code + handlerCode + "}")
|
10062 |
}
|
10063 |
-
}
|
10064 |
-
|
10065 |
-
function genKeyFilter (keys) {
|
10066 |
-
return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;")
|
10067 |
-
}
|
10068 |
|
10069 |
-
function
|
10070 |
-
|
10071 |
-
|
10072 |
-
|
10073 |
}
|
10074 |
-
var keyCode = keyCodes[key];
|
10075 |
-
var keyName = keyNames[key];
|
10076 |
-
return (
|
10077 |
-
"_k($event.keyCode," +
|
10078 |
-
(JSON.stringify(key)) + "," +
|
10079 |
-
(JSON.stringify(keyCode)) + "," +
|
10080 |
-
"$event.key," +
|
10081 |
-
"" + (JSON.stringify(keyName)) +
|
10082 |
-
")"
|
10083 |
-
)
|
10084 |
-
}
|
10085 |
|
10086 |
-
|
10087 |
-
|
10088 |
-
function on (el, dir) {
|
10089 |
-
if ("development" !== 'production' && dir.modifiers) {
|
10090 |
-
warn("v-on without argument does not support modifiers.");
|
10091 |
}
|
10092 |
-
el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
|
10093 |
-
}
|
10094 |
|
10095 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10096 |
|
10097 |
-
|
10098 |
-
|
10099 |
-
|
10100 |
-
|
10101 |
-
|
10102 |
-
|
10103 |
-
|
10104 |
-
|
10105 |
-
|
10106 |
-
|
10107 |
-
|
10108 |
-
|
10109 |
-
|
10110 |
-
|
10111 |
-
|
10112 |
-
|
10113 |
-
|
10114 |
-
|
10115 |
-
|
10116 |
-
|
10117 |
-
this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
|
10118 |
-
this.directives = extend(extend({}, baseDirectives), options.directives);
|
10119 |
-
var isReservedTag = options.isReservedTag || no;
|
10120 |
-
this.maybeComponent = function (el) { return !isReservedTag(el.tag); };
|
10121 |
-
this.onceId = 0;
|
10122 |
-
this.staticRenderFns = [];
|
10123 |
-
};
|
10124 |
-
|
10125 |
-
|
10126 |
-
|
10127 |
-
function generate (
|
10128 |
-
ast,
|
10129 |
-
options
|
10130 |
-
) {
|
10131 |
-
var state = new CodegenState(options);
|
10132 |
-
var code = ast ? genElement(ast, state) : '_c("div")';
|
10133 |
-
return {
|
10134 |
-
render: ("with(this){return " + code + "}"),
|
10135 |
-
staticRenderFns: state.staticRenderFns
|
10136 |
-
}
|
10137 |
-
}
|
10138 |
-
|
10139 |
-
function genElement (el, state) {
|
10140 |
-
if (el.staticRoot && !el.staticProcessed) {
|
10141 |
-
return genStatic(el, state)
|
10142 |
-
} else if (el.once && !el.onceProcessed) {
|
10143 |
-
return genOnce(el, state)
|
10144 |
-
} else if (el.for && !el.forProcessed) {
|
10145 |
-
return genFor(el, state)
|
10146 |
-
} else if (el.if && !el.ifProcessed) {
|
10147 |
-
return genIf(el, state)
|
10148 |
-
} else if (el.tag === 'template' && !el.slotTarget) {
|
10149 |
-
return genChildren(el, state) || 'void 0'
|
10150 |
-
} else if (el.tag === 'slot') {
|
10151 |
-
return genSlot(el, state)
|
10152 |
-
} else {
|
10153 |
-
// component or element
|
10154 |
-
var code;
|
10155 |
-
if (el.component) {
|
10156 |
-
code = genComponent(el.component, el, state);
|
10157 |
-
} else {
|
10158 |
-
var data = el.plain ? undefined : genData$2(el, state);
|
10159 |
-
|
10160 |
-
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
10161 |
-
code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
|
10162 |
-
}
|
10163 |
-
// module transforms
|
10164 |
-
for (var i = 0; i < state.transforms.length; i++) {
|
10165 |
-
code = state.transforms[i](el, code);
|
10166 |
-
}
|
10167 |
-
return code
|
10168 |
-
}
|
10169 |
-
}
|
10170 |
-
|
10171 |
-
// hoist static sub-trees out
|
10172 |
-
function genStatic (el, state) {
|
10173 |
-
el.staticProcessed = true;
|
10174 |
-
state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
|
10175 |
-
return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
|
10176 |
-
}
|
10177 |
-
|
10178 |
-
// v-once
|
10179 |
-
function genOnce (el, state) {
|
10180 |
-
el.onceProcessed = true;
|
10181 |
-
if (el.if && !el.ifProcessed) {
|
10182 |
-
return genIf(el, state)
|
10183 |
-
} else if (el.staticInFor) {
|
10184 |
-
var key = '';
|
10185 |
-
var parent = el.parent;
|
10186 |
-
while (parent) {
|
10187 |
-
if (parent.for) {
|
10188 |
-
key = parent.key;
|
10189 |
-
break
|
10190 |
}
|
10191 |
-
parent = parent.parent;
|
10192 |
}
|
10193 |
-
|
10194 |
-
|
10195 |
-
|
10196 |
-
|
10197 |
-
return
|
10198 |
}
|
10199 |
-
return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
|
10200 |
-
} else {
|
10201 |
-
return genStatic(el, state)
|
10202 |
-
}
|
10203 |
-
}
|
10204 |
-
|
10205 |
-
function genIf (
|
10206 |
-
el,
|
10207 |
-
state,
|
10208 |
-
altGen,
|
10209 |
-
altEmpty
|
10210 |
-
) {
|
10211 |
-
el.ifProcessed = true; // avoid recursion
|
10212 |
-
return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
|
10213 |
-
}
|
10214 |
-
|
10215 |
-
function genIfConditions (
|
10216 |
-
conditions,
|
10217 |
-
state,
|
10218 |
-
altGen,
|
10219 |
-
altEmpty
|
10220 |
-
) {
|
10221 |
-
if (!conditions.length) {
|
10222 |
-
return altEmpty || '_e()'
|
10223 |
-
}
|
10224 |
-
|
10225 |
-
var condition = conditions.shift();
|
10226 |
-
if (condition.exp) {
|
10227 |
-
return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
|
10228 |
-
} else {
|
10229 |
-
return ("" + (genTernaryExp(condition.block)))
|
10230 |
-
}
|
10231 |
-
|
10232 |
-
// v-if with v-once should generate code like (a)?_m(0):_m(1)
|
10233 |
-
function genTernaryExp (el) {
|
10234 |
-
return altGen
|
10235 |
-
? altGen(el, state)
|
10236 |
-
: el.once
|
10237 |
-
? genOnce(el, state)
|
10238 |
-
: genElement(el, state)
|
10239 |
-
}
|
10240 |
-
}
|
10241 |
-
|
10242 |
-
function genFor (
|
10243 |
-
el,
|
10244 |
-
state,
|
10245 |
-
altGen,
|
10246 |
-
altHelper
|
10247 |
-
) {
|
10248 |
-
var exp = el.for;
|
10249 |
-
var alias = el.alias;
|
10250 |
-
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
|
10251 |
-
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
|
10252 |
-
|
10253 |
-
if ("development" !== 'production' &&
|
10254 |
-
state.maybeComponent(el) &&
|
10255 |
-
el.tag !== 'slot' &&
|
10256 |
-
el.tag !== 'template' &&
|
10257 |
-
!el.key
|
10258 |
-
) {
|
10259 |
-
state.warn(
|
10260 |
-
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
|
10261 |
-
"v-for should have explicit keys. " +
|
10262 |
-
"See https://vuejs.org/guide/list.html#key for more info.",
|
10263 |
-
true /* tip */
|
10264 |
-
);
|
10265 |
}
|
10266 |
|
10267 |
-
|
10268 |
-
|
10269 |
-
|
10270 |
-
|
10271 |
-
|
10272 |
-
}
|
10273 |
-
|
10274 |
-
function genData$2 (el, state) {
|
10275 |
-
var data = '{';
|
10276 |
-
|
10277 |
-
// directives first.
|
10278 |
-
// directives may mutate the el's other properties before they are generated.
|
10279 |
-
var dirs = genDirectives(el, state);
|
10280 |
-
if (dirs) { data += dirs + ','; }
|
10281 |
-
|
10282 |
-
// key
|
10283 |
-
if (el.key) {
|
10284 |
-
data += "key:" + (el.key) + ",";
|
10285 |
-
}
|
10286 |
-
// ref
|
10287 |
-
if (el.ref) {
|
10288 |
-
data += "ref:" + (el.ref) + ",";
|
10289 |
-
}
|
10290 |
-
if (el.refInFor) {
|
10291 |
-
data += "refInFor:true,";
|
10292 |
-
}
|
10293 |
-
// pre
|
10294 |
-
if (el.pre) {
|
10295 |
-
data += "pre:true,";
|
10296 |
-
}
|
10297 |
-
// record original tag name for components using "is" attribute
|
10298 |
-
if (el.component) {
|
10299 |
-
data += "tag:\"" + (el.tag) + "\",";
|
10300 |
-
}
|
10301 |
-
// module data generation functions
|
10302 |
-
for (var i = 0; i < state.dataGenFns.length; i++) {
|
10303 |
-
data += state.dataGenFns[i](el);
|
10304 |
-
}
|
10305 |
-
// attributes
|
10306 |
-
if (el.attrs) {
|
10307 |
-
data += "attrs:{" + (genProps(el.attrs)) + "},";
|
10308 |
-
}
|
10309 |
-
// DOM props
|
10310 |
-
if (el.props) {
|
10311 |
-
data += "domProps:{" + (genProps(el.props)) + "},";
|
10312 |
-
}
|
10313 |
-
// event handlers
|
10314 |
-
if (el.events) {
|
10315 |
-
data += (genHandlers(el.events, false, state.warn)) + ",";
|
10316 |
-
}
|
10317 |
-
if (el.nativeEvents) {
|
10318 |
-
data += (genHandlers(el.nativeEvents, true, state.warn)) + ",";
|
10319 |
-
}
|
10320 |
-
// slot target
|
10321 |
-
// only for non-scoped slots
|
10322 |
-
if (el.slotTarget && !el.slotScope) {
|
10323 |
-
data += "slot:" + (el.slotTarget) + ",";
|
10324 |
-
}
|
10325 |
-
// scoped slots
|
10326 |
-
if (el.scopedSlots) {
|
10327 |
-
data += (genScopedSlots(el.scopedSlots, state)) + ",";
|
10328 |
-
}
|
10329 |
-
// component v-model
|
10330 |
-
if (el.model) {
|
10331 |
-
data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
|
10332 |
-
}
|
10333 |
-
// inline-template
|
10334 |
-
if (el.inlineTemplate) {
|
10335 |
-
var inlineTemplate = genInlineTemplate(el, state);
|
10336 |
-
if (inlineTemplate) {
|
10337 |
-
data += inlineTemplate + ",";
|
10338 |
-
}
|
10339 |
-
}
|
10340 |
-
data = data.replace(/,$/, '') + '}';
|
10341 |
-
// v-bind data wrap
|
10342 |
-
if (el.wrapData) {
|
10343 |
-
data = el.wrapData(data);
|
10344 |
-
}
|
10345 |
-
// v-on data wrap
|
10346 |
-
if (el.wrapListeners) {
|
10347 |
-
data = el.wrapListeners(data);
|
10348 |
-
}
|
10349 |
-
return data
|
10350 |
-
}
|
10351 |
-
|
10352 |
-
function genDirectives (el, state) {
|
10353 |
-
var dirs = el.directives;
|
10354 |
-
if (!dirs) { return }
|
10355 |
-
var res = 'directives:[';
|
10356 |
-
var hasRuntime = false;
|
10357 |
-
var i, l, dir, needRuntime;
|
10358 |
-
for (i = 0, l = dirs.length; i < l; i++) {
|
10359 |
-
dir = dirs[i];
|
10360 |
-
needRuntime = true;
|
10361 |
-
var gen = state.directives[dir.name];
|
10362 |
-
if (gen) {
|
10363 |
-
// compile-time directive that manipulates AST.
|
10364 |
-
// returns true if it also needs a runtime counterpart.
|
10365 |
-
needRuntime = !!gen(el, dir, state.warn);
|
10366 |
-
}
|
10367 |
-
if (needRuntime) {
|
10368 |
-
hasRuntime = true;
|
10369 |
-
res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
|
10370 |
-
}
|
10371 |
-
}
|
10372 |
-
if (hasRuntime) {
|
10373 |
-
return res.slice(0, -1) + ']'
|
10374 |
-
}
|
10375 |
-
}
|
10376 |
-
|
10377 |
-
function genInlineTemplate (el, state) {
|
10378 |
-
var ast = el.children[0];
|
10379 |
-
if ("development" !== 'production' && (
|
10380 |
-
el.children.length !== 1 || ast.type !== 1
|
10381 |
-
)) {
|
10382 |
-
state.warn('Inline-template components must have exactly one child element.');
|
10383 |
-
}
|
10384 |
-
if (ast.type === 1) {
|
10385 |
-
var inlineRenderFns = generate(ast, state.options);
|
10386 |
-
return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
|
10387 |
-
}
|
10388 |
-
}
|
10389 |
-
|
10390 |
-
function genScopedSlots (
|
10391 |
-
slots,
|
10392 |
-
state
|
10393 |
-
) {
|
10394 |
-
return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
|
10395 |
-
return genScopedSlot(key, slots[key], state)
|
10396 |
-
}).join(',')) + "])")
|
10397 |
-
}
|
10398 |
-
|
10399 |
-
function genScopedSlot (
|
10400 |
-
key,
|
10401 |
-
el,
|
10402 |
-
state
|
10403 |
-
) {
|
10404 |
-
if (el.for && !el.forProcessed) {
|
10405 |
-
return genForScopedSlot(key, el, state)
|
10406 |
-
}
|
10407 |
-
var fn = "function(" + (String(el.slotScope)) + "){" +
|
10408 |
-
"return " + (el.tag === 'template'
|
10409 |
-
? el.if
|
10410 |
-
? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined")
|
10411 |
-
: genChildren(el, state) || 'undefined'
|
10412 |
-
: genElement(el, state)) + "}";
|
10413 |
-
return ("{key:" + key + ",fn:" + fn + "}")
|
10414 |
-
}
|
10415 |
-
|
10416 |
-
function genForScopedSlot (
|
10417 |
-
key,
|
10418 |
-
el,
|
10419 |
-
state
|
10420 |
-
) {
|
10421 |
-
var exp = el.for;
|
10422 |
-
var alias = el.alias;
|
10423 |
-
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
|
10424 |
-
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
|
10425 |
-
el.forProcessed = true; // avoid recursion
|
10426 |
-
return "_l((" + exp + ")," +
|
10427 |
-
"function(" + alias + iterator1 + iterator2 + "){" +
|
10428 |
-
"return " + (genScopedSlot(key, el, state)) +
|
10429 |
-
'})'
|
10430 |
-
}
|
10431 |
-
|
10432 |
-
function genChildren (
|
10433 |
-
el,
|
10434 |
-
state,
|
10435 |
-
checkSkip,
|
10436 |
-
altGenElement,
|
10437 |
-
altGenNode
|
10438 |
-
) {
|
10439 |
-
var children = el.children;
|
10440 |
-
if (children.length) {
|
10441 |
-
var el$1 = children[0];
|
10442 |
-
// optimize single v-for
|
10443 |
-
if (children.length === 1 &&
|
10444 |
-
el$1.for &&
|
10445 |
-
el$1.tag !== 'template' &&
|
10446 |
-
el$1.tag !== 'slot'
|
10447 |
-
) {
|
10448 |
-
return (altGenElement || genElement)(el$1, state)
|
10449 |
-
}
|
10450 |
-
var normalizationType = checkSkip
|
10451 |
-
? getNormalizationType(children, state.maybeComponent)
|
10452 |
-
: 0;
|
10453 |
-
var gen = altGenNode || genNode;
|
10454 |
-
return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
|
10455 |
-
}
|
10456 |
-
}
|
10457 |
-
|
10458 |
-
// determine the normalization needed for the children array.
|
10459 |
-
// 0: no normalization needed
|
10460 |
-
// 1: simple normalization needed (possible 1-level deep nested array)
|
10461 |
-
// 2: full normalization needed
|
10462 |
-
function getNormalizationType (
|
10463 |
-
children,
|
10464 |
-
maybeComponent
|
10465 |
-
) {
|
10466 |
-
var res = 0;
|
10467 |
-
for (var i = 0; i < children.length; i++) {
|
10468 |
-
var el = children[i];
|
10469 |
-
if (el.type !== 1) {
|
10470 |
-
continue
|
10471 |
-
}
|
10472 |
-
if (needsNormalization(el) ||
|
10473 |
-
(el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
|
10474 |
-
res = 2;
|
10475 |
-
break
|
10476 |
-
}
|
10477 |
-
if (maybeComponent(el) ||
|
10478 |
-
(el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
|
10479 |
-
res = 1;
|
10480 |
-
}
|
10481 |
-
}
|
10482 |
-
return res
|
10483 |
-
}
|
10484 |
-
|
10485 |
-
function needsNormalization (el) {
|
10486 |
-
return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
|
10487 |
-
}
|
10488 |
-
|
10489 |
-
function genNode (node, state) {
|
10490 |
-
if (node.type === 1) {
|
10491 |
-
return genElement(node, state)
|
10492 |
-
} if (node.type === 3 && node.isComment) {
|
10493 |
-
return genComment(node)
|
10494 |
-
} else {
|
10495 |
-
return genText(node)
|
10496 |
-
}
|
10497 |
-
}
|
10498 |
-
|
10499 |
-
function genText (text) {
|
10500 |
-
return ("_v(" + (text.type === 2
|
10501 |
-
? text.expression // no need for () because already wrapped in _s()
|
10502 |
-
: transformSpecialNewlines(JSON.stringify(text.text))) + ")")
|
10503 |
-
}
|
10504 |
-
|
10505 |
-
function genComment (comment) {
|
10506 |
-
return ("_e(" + (JSON.stringify(comment.text)) + ")")
|
10507 |
-
}
|
10508 |
-
|
10509 |
-
function genSlot (el, state) {
|
10510 |
-
var slotName = el.slotName || '"default"';
|
10511 |
-
var children = genChildren(el, state);
|
10512 |
-
var res = "_t(" + slotName + (children ? ("," + children) : '');
|
10513 |
-
var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
|
10514 |
-
var bind$$1 = el.attrsMap['v-bind'];
|
10515 |
-
if ((attrs || bind$$1) && !children) {
|
10516 |
-
res += ",null";
|
10517 |
-
}
|
10518 |
-
if (attrs) {
|
10519 |
-
res += "," + attrs;
|
10520 |
-
}
|
10521 |
-
if (bind$$1) {
|
10522 |
-
res += (attrs ? '' : ',null') + "," + bind$$1;
|
10523 |
-
}
|
10524 |
-
return res + ')'
|
10525 |
-
}
|
10526 |
-
|
10527 |
-
// componentName is el.component, take it as argument to shun flow's pessimistic refinement
|
10528 |
-
function genComponent (
|
10529 |
-
componentName,
|
10530 |
-
el,
|
10531 |
-
state
|
10532 |
-
) {
|
10533 |
-
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
10534 |
-
return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
|
10535 |
-
}
|
10536 |
-
|
10537 |
-
function genProps (props) {
|
10538 |
-
var res = '';
|
10539 |
-
for (var i = 0; i < props.length; i++) {
|
10540 |
-
var prop = props[i];
|
10541 |
-
/* istanbul ignore if */
|
10542 |
-
{
|
10543 |
-
res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ",";
|
10544 |
-
}
|
10545 |
}
|
10546 |
-
return res.slice(0, -1)
|
10547 |
-
}
|
10548 |
|
10549 |
-
|
10550 |
-
|
10551 |
-
return text
|
10552 |
-
.replace(/\u2028/g, '\\u2028')
|
10553 |
-
.replace(/\u2029/g, '\\u2029')
|
10554 |
-
}
|
10555 |
|
10556 |
-
/* */
|
10557 |
|
10558 |
-
// these keywords should not appear inside expressions, but operators like
|
10559 |
-
// typeof, instanceof and in are allowed
|
10560 |
-
var prohibitedKeywordRE = new RegExp('\\b' + (
|
10561 |
-
|
10562 |
-
|
10563 |
-
|
10564 |
-
).split(',').join('\\b|\\b') + '\\b');
|
10565 |
|
10566 |
-
// these unary operators should not be used as property/method names
|
10567 |
-
var unaryOperatorsRE = new RegExp('\\b' + (
|
10568 |
-
|
10569 |
-
).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
|
10570 |
|
10571 |
-
// strip strings in expressions
|
10572 |
-
var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
|
10573 |
|
10574 |
-
// detect problematic expressions in a template
|
10575 |
-
function detectErrors (ast) {
|
10576 |
-
|
10577 |
-
|
10578 |
-
|
10579 |
}
|
10580 |
-
return errors
|
10581 |
-
}
|
10582 |
|
10583 |
-
function checkNode (node,
|
10584 |
-
|
10585 |
-
|
10586 |
-
|
10587 |
-
|
10588 |
-
|
10589 |
-
|
10590 |
-
|
10591 |
-
|
10592 |
-
|
10593 |
-
|
10594 |
-
|
|
|
|
|
|
|
|
|
10595 |
}
|
10596 |
}
|
10597 |
}
|
10598 |
-
|
10599 |
-
|
10600 |
-
|
10601 |
-
|
10602 |
}
|
|
|
|
|
10603 |
}
|
10604 |
-
} else if (node.type === 2) {
|
10605 |
-
checkExpression(node.expression, node.text, errors);
|
10606 |
}
|
10607 |
-
}
|
10608 |
|
10609 |
-
function checkEvent (exp, text,
|
10610 |
-
|
10611 |
-
|
10612 |
-
|
10613 |
-
|
10614 |
-
|
10615 |
-
|
10616 |
-
|
|
|
|
|
|
|
10617 |
}
|
10618 |
-
|
10619 |
-
|
10620 |
-
|
10621 |
-
|
10622 |
-
|
10623 |
-
|
10624 |
-
|
10625 |
-
|
10626 |
-
|
10627 |
-
|
10628 |
-
|
10629 |
-
|
10630 |
-
|
10631 |
-
|
10632 |
-
|
10633 |
-
) {
|
10634 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10635 |
try {
|
10636 |
-
new Function(("
|
10637 |
} catch (e) {
|
10638 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10639 |
}
|
10640 |
}
|
10641 |
-
}
|
10642 |
|
10643 |
-
function
|
10644 |
-
|
10645 |
-
|
10646 |
-
|
10647 |
-
|
10648 |
-
|
10649 |
-
errors.push(
|
10650 |
-
"avoid using JavaScript keyword as property name: " +
|
10651 |
-
"\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim())
|
10652 |
-
);
|
10653 |
-
} else {
|
10654 |
-
errors.push(
|
10655 |
-
"invalid expression: " + (e.message) + " in\n\n" +
|
10656 |
" " + exp + "\n\n" +
|
10657 |
-
" Raw expression: " + (text.trim()) + "\n"
|
|
|
10658 |
);
|
10659 |
}
|
10660 |
}
|
10661 |
-
}
|
10662 |
-
|
10663 |
-
/* */
|
10664 |
|
10665 |
-
|
10666 |
-
try {
|
10667 |
-
return new Function(code)
|
10668 |
-
} catch (err) {
|
10669 |
-
errors.push({ err: err, code: code });
|
10670 |
-
return noop
|
10671 |
-
}
|
10672 |
-
}
|
10673 |
|
10674 |
-
|
10675 |
-
var cache = Object.create(null);
|
10676 |
|
10677 |
-
|
10678 |
-
|
10679 |
-
|
10680 |
-
|
10681 |
) {
|
10682 |
-
|
10683 |
-
|
10684 |
-
delete options.warn;
|
10685 |
|
10686 |
-
|
10687 |
-
|
10688 |
-
|
10689 |
-
|
10690 |
-
|
10691 |
-
|
10692 |
-
|
10693 |
-
|
10694 |
-
|
10695 |
-
|
10696 |
-
|
10697 |
-
|
10698 |
-
|
10699 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10700 |
}
|
|
|
10701 |
}
|
10702 |
}
|
|
|
|
|
10703 |
|
10704 |
-
|
10705 |
-
var
|
10706 |
-
|
10707 |
-
|
10708 |
-
|
10709 |
-
|
|
|
|
|
|
|
10710 |
}
|
|
|
|
|
10711 |
|
10712 |
-
|
10713 |
-
var compiled = compile(template, options);
|
10714 |
|
10715 |
-
// check compilation errors/tips
|
10716 |
-
{
|
10717 |
-
if (compiled.errors && compiled.errors.length) {
|
10718 |
-
warn$$1(
|
10719 |
-
"Error compiling template:\n\n" + template + "\n\n" +
|
10720 |
-
compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
|
10721 |
-
vm
|
10722 |
-
);
|
10723 |
-
}
|
10724 |
-
if (compiled.tips && compiled.tips.length) {
|
10725 |
-
compiled.tips.forEach(function (msg) { return tip(msg, vm); });
|
10726 |
-
}
|
10727 |
-
}
|
10728 |
|
10729 |
-
// turn code into functions
|
10730 |
-
var res = {};
|
10731 |
-
var fnGenErrors = [];
|
10732 |
-
res.render = createFunction(compiled.render, fnGenErrors);
|
10733 |
-
res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
|
10734 |
-
return createFunction(code, fnGenErrors)
|
10735 |
-
});
|
10736 |
|
10737 |
-
|
10738 |
-
|
10739 |
-
|
10740 |
-
|
10741 |
-
|
10742 |
-
|
10743 |
-
warn$$1(
|
10744 |
-
"Failed to generate render function:\n\n" +
|
10745 |
-
fnGenErrors.map(function (ref) {
|
10746 |
-
var err = ref.err;
|
10747 |
-
var code = ref.code;
|
10748 |
-
|
10749 |
-
return ((err.toString()) + " in\n\n" + code + "\n");
|
10750 |
-
}).join('\n'),
|
10751 |
-
vm
|
10752 |
-
);
|
10753 |
-
}
|
10754 |
}
|
10755 |
-
|
10756 |
-
return (cache[key] = res)
|
10757 |
}
|
10758 |
-
}
|
10759 |
|
10760 |
-
|
|
|
10761 |
|
10762 |
-
function
|
10763 |
-
return function createCompiler (baseOptions) {
|
10764 |
-
function compile (
|
10765 |
template,
|
10766 |
-
options
|
|
|
10767 |
) {
|
10768 |
-
|
10769 |
-
var
|
10770 |
-
|
10771 |
-
finalOptions.warn = function (msg, tip) {
|
10772 |
-
(tip ? tips : errors).push(msg);
|
10773 |
-
};
|
10774 |
|
10775 |
-
if
|
10776 |
-
|
10777 |
-
|
10778 |
-
|
10779 |
-
|
10780 |
-
}
|
10781 |
-
|
10782 |
-
|
10783 |
-
|
10784 |
-
|
10785 |
-
|
10786 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10787 |
}
|
10788 |
-
|
10789 |
-
|
10790 |
-
|
10791 |
-
|
|
|
10792 |
}
|
10793 |
}
|
10794 |
}
|
10795 |
|
10796 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10797 |
{
|
10798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10799 |
}
|
10800 |
-
compiled.errors = errors;
|
10801 |
-
compiled.tips = tips;
|
10802 |
-
return compiled
|
10803 |
-
}
|
10804 |
|
10805 |
-
|
10806 |
-
compile: compile,
|
10807 |
-
compileToFunctions: createCompileToFunctionFn(compile)
|
10808 |
}
|
10809 |
}
|
10810 |
-
}
|
10811 |
|
10812 |
-
/* */
|
10813 |
|
10814 |
-
|
10815 |
-
|
10816 |
-
|
10817 |
-
|
10818 |
-
|
10819 |
-
|
10820 |
-
)
|
10821 |
-
|
10822 |
-
|
10823 |
-
|
10824 |
-
|
10825 |
-
|
10826 |
-
|
10827 |
-
|
10828 |
-
|
10829 |
-
|
10830 |
-
|
10831 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10832 |
|
10833 |
-
|
10834 |
|
10835 |
-
var
|
10836 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10837 |
|
10838 |
-
|
|
|
|
|
|
|
|
|
|
|
10839 |
|
10840 |
-
|
10841 |
-
var div;
|
10842 |
-
function getShouldDecode (href) {
|
10843 |
-
div = div || document.createElement('div');
|
10844 |
-
div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
|
10845 |
-
return div.innerHTML.indexOf(' ') > 0
|
10846 |
-
}
|
10847 |
|
10848 |
-
//
|
10849 |
-
|
10850 |
-
//
|
10851 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10852 |
|
10853 |
-
/* */
|
10854 |
|
10855 |
-
var
|
10856 |
-
var
|
10857 |
-
|
10858 |
-
});
|
10859 |
|
10860 |
-
|
10861 |
-
Vue.prototype.$mount = function (
|
10862 |
-
el,
|
10863 |
-
hydrating
|
10864 |
-
) {
|
10865 |
-
el = el && query(el);
|
10866 |
|
10867 |
-
|
10868 |
-
|
10869 |
-
|
10870 |
-
|
10871 |
-
|
10872 |
-
return
|
10873 |
}
|
10874 |
|
10875 |
-
|
10876 |
-
|
10877 |
-
|
10878 |
-
|
10879 |
-
|
10880 |
-
|
10881 |
-
|
10882 |
-
|
10883 |
-
|
10884 |
-
|
10885 |
-
|
10886 |
-
|
10887 |
-
|
10888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10889 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10890 |
}
|
10891 |
-
} else if (
|
10892 |
-
template =
|
10893 |
-
} else {
|
10894 |
-
{
|
10895 |
-
warn('invalid template option:' + template, this);
|
10896 |
-
}
|
10897 |
-
return this
|
10898 |
-
}
|
10899 |
-
} else if (el) {
|
10900 |
-
template = getOuterHTML(el);
|
10901 |
-
}
|
10902 |
-
if (template) {
|
10903 |
-
/* istanbul ignore if */
|
10904 |
-
if ("development" !== 'production' && config.performance && mark) {
|
10905 |
-
mark('compile');
|
10906 |
}
|
|
|
|
|
|
|
|
|
|
|
10907 |
|
10908 |
-
|
10909 |
-
|
10910 |
-
|
10911 |
-
|
10912 |
-
|
10913 |
-
|
10914 |
-
|
10915 |
-
|
10916 |
-
|
10917 |
-
|
|
|
10918 |
|
10919 |
-
|
10920 |
-
|
10921 |
-
|
10922 |
-
|
|
|
10923 |
}
|
10924 |
}
|
10925 |
-
|
10926 |
-
|
10927 |
-
};
|
10928 |
|
10929 |
-
/**
|
10930 |
-
|
10931 |
-
|
10932 |
-
|
10933 |
-
function getOuterHTML (el) {
|
10934 |
-
|
10935 |
-
|
10936 |
-
|
10937 |
-
|
10938 |
-
|
10939 |
-
|
|
|
10940 |
}
|
10941 |
-
}
|
10942 |
|
10943 |
-
Vue.compile = compileToFunctions;
|
10944 |
|
10945 |
-
return Vue;
|
10946 |
|
10947 |
-
}))
|
1 |
/*!
|
2 |
+
* Vue.js v2.6.12
|
3 |
+
* (c) 2014-2020 Evan You
|
4 |
* Released under the MIT License.
|
5 |
*/
|
6 |
(function (global, factory) {
|
7 |
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
8 |
+
typeof define === 'function' && define.amd ? define(factory) :
|
9 |
+
(global = global || self, global.Vue = factory());
|
10 |
+
}(this, function () { 'use strict';
|
11 |
|
12 |
+
/* */
|
13 |
|
14 |
+
var emptyObject = Object.freeze({});
|
15 |
|
16 |
+
// These helpers produce better VM code in JS engines due to their
|
17 |
+
// explicitness and function inlining.
|
18 |
+
function isUndef (v) {
|
19 |
+
return v === undefined || v === null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
function isDef (v) {
|
23 |
+
return v !== undefined && v !== null
|
24 |
+
}
|
|
|
|
|
|
|
25 |
|
26 |
+
function isTrue (v) {
|
27 |
+
return v === true
|
28 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
function isFalse (v) {
|
31 |
+
return v === false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
+
/**
|
35 |
+
* Check if value is primitive.
|
36 |
+
*/
|
37 |
+
function isPrimitive (value) {
|
38 |
+
return (
|
39 |
+
typeof value === 'string' ||
|
40 |
+
typeof value === 'number' ||
|
41 |
+
// $flow-disable-line
|
42 |
+
typeof value === 'symbol' ||
|
43 |
+
typeof value === 'boolean'
|
44 |
+
)
|
45 |
+
}
|
46 |
|
47 |
+
/**
|
48 |
+
* Quick object check - this is primarily used to tell
|
49 |
+
* Objects from primitive values when we know the value
|
50 |
+
* is a JSON-compliant type.
|
51 |
+
*/
|
52 |
+
function isObject (obj) {
|
53 |
+
return obj !== null && typeof obj === 'object'
|
54 |
+
}
|
55 |
|
56 |
+
/**
|
57 |
+
* Get the raw type string of a value, e.g., [object Object].
|
58 |
+
*/
|
59 |
+
var _toString = Object.prototype.toString;
|
60 |
|
61 |
+
function toRawType (value) {
|
62 |
+
return _toString.call(value).slice(8, -1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
|
|
|
|
64 |
|
65 |
+
/**
|
66 |
+
* Strict object type check. Only returns true
|
67 |
+
* for plain JavaScript objects.
|
68 |
+
*/
|
69 |
+
function isPlainObject (obj) {
|
70 |
+
return _toString.call(obj) === '[object Object]'
|
|
|
|
|
|
|
71 |
}
|
|
|
|
|
72 |
|
73 |
+
function isRegExp (v) {
|
74 |
+
return _toString.call(v) === '[object RegExp]'
|
75 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
/**
|
78 |
+
* Check if val is a valid array index.
|
79 |
+
*/
|
80 |
+
function isValidArrayIndex (val) {
|
81 |
+
var n = parseFloat(String(val));
|
82 |
+
return n >= 0 && Math.floor(n) === n && isFinite(val)
|
83 |
+
}
|
84 |
|
85 |
+
function isPromise (val) {
|
86 |
+
return (
|
87 |
+
isDef(val) &&
|
88 |
+
typeof val.then === 'function' &&
|
89 |
+
typeof val.catch === 'function'
|
90 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
|
|
92 |
|
93 |
+
/**
|
94 |
+
* Convert a value to a string that is actually rendered.
|
95 |
+
*/
|
96 |
+
function toString (val) {
|
97 |
+
return val == null
|
98 |
+
? ''
|
99 |
+
: Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
|
100 |
+
? JSON.stringify(val, null, 2)
|
101 |
+
: String(val)
|
102 |
}
|
|
|
|
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
/**
|
105 |
+
* Convert an input value to a number for persistence.
|
106 |
+
* If the conversion fails, return original string.
|
107 |
*/
|
108 |
+
function toNumber (val) {
|
109 |
+
var n = parseFloat(val);
|
110 |
+
return isNaN(n) ? val : n
|
111 |
+
}
|
112 |
|
113 |
/**
|
114 |
+
* Make a map and return a function for checking if a key
|
115 |
+
* is in that map.
|
116 |
*/
|
117 |
+
function makeMap (
|
118 |
+
str,
|
119 |
+
expectsLowerCase
|
120 |
+
) {
|
121 |
+
var map = Object.create(null);
|
122 |
+
var list = str.split(',');
|
123 |
+
for (var i = 0; i < list.length; i++) {
|
124 |
+
map[list[i]] = true;
|
125 |
+
}
|
126 |
+
return expectsLowerCase
|
127 |
+
? function (val) { return map[val.toLowerCase()]; }
|
128 |
+
: function (val) { return map[val]; }
|
129 |
+
}
|
130 |
|
131 |
/**
|
132 |
+
* Check if a tag is a built-in tag.
|
133 |
*/
|
134 |
+
var isBuiltInTag = makeMap('slot,component', true);
|
135 |
|
136 |
/**
|
137 |
+
* Check if an attribute is a reserved attribute.
|
138 |
*/
|
139 |
+
var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
|
140 |
|
141 |
/**
|
142 |
+
* Remove an item from an array.
|
143 |
*/
|
144 |
+
function remove (arr, item) {
|
145 |
+
if (arr.length) {
|
146 |
+
var index = arr.indexOf(item);
|
147 |
+
if (index > -1) {
|
148 |
+
return arr.splice(index, 1)
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
|
153 |
/**
|
154 |
+
* Check whether an object has the property.
|
155 |
*/
|
156 |
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
157 |
+
function hasOwn (obj, key) {
|
158 |
+
return hasOwnProperty.call(obj, key)
|
159 |
+
}
|
160 |
|
161 |
/**
|
162 |
+
* Create a cached version of a pure function.
|
163 |
*/
|
164 |
+
function cached (fn) {
|
165 |
+
var cache = Object.create(null);
|
166 |
+
return (function cachedFn (str) {
|
167 |
+
var hit = cache[str];
|
168 |
+
return hit || (cache[str] = fn(str))
|
169 |
+
})
|
170 |
+
}
|
171 |
|
172 |
/**
|
173 |
+
* Camelize a hyphen-delimited string.
|
174 |
*/
|
175 |
+
var camelizeRE = /-(\w)/g;
|
176 |
+
var camelize = cached(function (str) {
|
177 |
+
return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
|
178 |
+
});
|
179 |
|
180 |
/**
|
181 |
+
* Capitalize a string.
|
182 |
*/
|
183 |
+
var capitalize = cached(function (str) {
|
184 |
+
return str.charAt(0).toUpperCase() + str.slice(1)
|
185 |
+
});
|
186 |
|
187 |
/**
|
188 |
+
* Hyphenate a camelCase string.
|
|
|
189 |
*/
|
190 |
+
var hyphenateRE = /\B([A-Z])/g;
|
191 |
+
var hyphenate = cached(function (str) {
|
192 |
+
return str.replace(hyphenateRE, '-$1').toLowerCase()
|
193 |
+
});
|
194 |
|
195 |
/**
|
196 |
+
* Simple bind polyfill for environments that do not support it,
|
197 |
+
* e.g., PhantomJS 1.x. Technically, we don't need this anymore
|
198 |
+
* since native bind is now performant enough in most browsers.
|
199 |
+
* But removing it would mean breaking code that was able to run in
|
200 |
+
* PhantomJS 1.x, so this must be kept for backward compatibility.
|
201 |
*/
|
202 |
+
|
203 |
+
/* istanbul ignore next */
|
204 |
+
function polyfillBind (fn, ctx) {
|
205 |
+
function boundFn (a) {
|
206 |
+
var l = arguments.length;
|
207 |
+
return l
|
208 |
+
? l > 1
|
209 |
+
? fn.apply(ctx, arguments)
|
210 |
+
: fn.call(ctx, a)
|
211 |
+
: fn.call(ctx)
|
212 |
+
}
|
213 |
+
|
214 |
+
boundFn._length = fn.length;
|
215 |
+
return boundFn
|
216 |
+
}
|
217 |
+
|
218 |
+
function nativeBind (fn, ctx) {
|
219 |
+
return fn.bind(ctx)
|
220 |
+
}
|
221 |
+
|
222 |
+
var bind = Function.prototype.bind
|
223 |
+
? nativeBind
|
224 |
+
: polyfillBind;
|
225 |
|
226 |
/**
|
227 |
+
* Convert an Array-like object to a real Array.
|
|
|
228 |
*/
|
229 |
+
function toArray (list, start) {
|
230 |
+
start = start || 0;
|
231 |
+
var i = list.length - start;
|
232 |
+
var ret = new Array(i);
|
233 |
+
while (i--) {
|
234 |
+
ret[i] = list[i + start];
|
235 |
+
}
|
236 |
+
return ret
|
237 |
+
}
|
238 |
|
239 |
/**
|
240 |
+
* Mix properties into target object.
|
241 |
*/
|
242 |
+
function extend (to, _from) {
|
243 |
+
for (var key in _from) {
|
244 |
+
to[key] = _from[key];
|
245 |
+
}
|
246 |
+
return to
|
247 |
+
}
|
248 |
|
249 |
/**
|
250 |
+
* Merge an Array of Objects into a single Object.
|
251 |
*/
|
252 |
+
function toObject (arr) {
|
253 |
+
var res = {};
|
254 |
+
for (var i = 0; i < arr.length; i++) {
|
255 |
+
if (arr[i]) {
|
256 |
+
extend(res, arr[i]);
|
257 |
+
}
|
258 |
+
}
|
259 |
+
return res
|
260 |
+
}
|
261 |
+
|
262 |
+
/* eslint-disable no-unused-vars */
|
263 |
|
264 |
/**
|
265 |
+
* Perform no operation.
|
266 |
+
* Stubbing args to make Flow happy without leaving useless transpiled code
|
267 |
+
* with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
|
268 |
*/
|
269 |
+
function noop (a, b, c) {}
|
270 |
|
271 |
/**
|
272 |
+
* Always return false.
|
273 |
*/
|
274 |
+
var no = function (a, b, c) { return false; };
|
|
|
275 |
|
276 |
+
/* eslint-enable no-unused-vars */
|
277 |
|
278 |
+
/**
|
279 |
+
* Return the same value.
|
280 |
+
*/
|
281 |
+
var identity = function (_) { return _; };
|
|
|
|
|
|
|
282 |
|
283 |
+
/**
|
284 |
+
* Generate a string containing static keys from compiler modules.
|
285 |
+
*/
|
286 |
+
function genStaticKeys (modules) {
|
287 |
+
return modules.reduce(function (keys, m) {
|
288 |
+
return keys.concat(m.staticKeys || [])
|
289 |
+
}, []).join(',')
|
290 |
+
}
|
|
|
|
|
|
|
291 |
|
292 |
+
/**
|
293 |
+
* Check if two values are loosely equal - that is,
|
294 |
+
* if they are plain objects, do they have the same shape?
|
295 |
+
*/
|
296 |
+
function looseEqual (a, b) {
|
297 |
+
if (a === b) { return true }
|
298 |
+
var isObjectA = isObject(a);
|
299 |
+
var isObjectB = isObject(b);
|
300 |
+
if (isObjectA && isObjectB) {
|
301 |
+
try {
|
302 |
+
var isArrayA = Array.isArray(a);
|
303 |
+
var isArrayB = Array.isArray(b);
|
304 |
+
if (isArrayA && isArrayB) {
|
305 |
+
return a.length === b.length && a.every(function (e, i) {
|
306 |
+
return looseEqual(e, b[i])
|
307 |
+
})
|
308 |
+
} else if (a instanceof Date && b instanceof Date) {
|
309 |
+
return a.getTime() === b.getTime()
|
310 |
+
} else if (!isArrayA && !isArrayB) {
|
311 |
+
var keysA = Object.keys(a);
|
312 |
+
var keysB = Object.keys(b);
|
313 |
+
return keysA.length === keysB.length && keysA.every(function (key) {
|
314 |
+
return looseEqual(a[key], b[key])
|
315 |
+
})
|
316 |
+
} else {
|
317 |
+
/* istanbul ignore next */
|
318 |
+
return false
|
319 |
+
}
|
320 |
+
} catch (e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
/* istanbul ignore next */
|
322 |
+
return false
|
323 |
+
}
|
324 |
+
} else if (!isObjectA && !isObjectB) {
|
325 |
+
return String(a) === String(b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
} else {
|
327 |
+
return false
|
328 |
}
|
329 |
}
|
|
|
|
|
330 |
|
331 |
+
/**
|
332 |
+
* Return the first index at which a loosely equal value can be
|
333 |
+
* found in the array (if value is a plain object, the array must
|
334 |
+
* contain an object of the same shape), or -1 if it is not present.
|
335 |
+
*/
|
336 |
+
function looseIndexOf (arr, val) {
|
337 |
+
for (var i = 0; i < arr.length; i++) {
|
338 |
+
if (looseEqual(arr[i], val)) { return i }
|
339 |
+
}
|
340 |
+
return -1
|
341 |
+
}
|
342 |
|
343 |
+
/**
|
344 |
+
* Ensure a function is called only once.
|
345 |
+
*/
|
346 |
+
function once (fn) {
|
347 |
+
var called = false;
|
348 |
+
return function () {
|
349 |
+
if (!called) {
|
350 |
+
called = true;
|
351 |
+
fn.apply(this, arguments);
|
352 |
+
}
|
353 |
+
}
|
354 |
+
}
|
355 |
|
356 |
+
var SSR_ATTR = 'data-server-rendered';
|
|
|
|
|
357 |
|
358 |
+
var ASSET_TYPES = [
|
359 |
+
'component',
|
360 |
+
'directive',
|
361 |
+
'filter'
|
362 |
+
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
+
var LIFECYCLE_HOOKS = [
|
365 |
+
'beforeCreate',
|
366 |
+
'created',
|
367 |
+
'beforeMount',
|
368 |
+
'mounted',
|
369 |
+
'beforeUpdate',
|
370 |
+
'updated',
|
371 |
+
'beforeDestroy',
|
372 |
+
'destroyed',
|
373 |
+
'activated',
|
374 |
+
'deactivated',
|
375 |
+
'errorCaptured',
|
376 |
+
'serverPrefetch'
|
377 |
+
];
|
378 |
|
379 |
+
/* */
|
380 |
|
|
|
|
|
|
|
|
|
381 |
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
|
383 |
+
var config = ({
|
384 |
+
/**
|
385 |
+
* Option merge strategies (used in core/util/options)
|
386 |
+
*/
|
387 |
+
// $flow-disable-line
|
388 |
+
optionMergeStrategies: Object.create(null),
|
389 |
+
|
390 |
+
/**
|
391 |
+
* Whether to suppress warnings.
|
392 |
+
*/
|
393 |
+
silent: false,
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Show production mode tip message on boot?
|
397 |
+
*/
|
398 |
+
productionTip: "development" !== 'production',
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Whether to enable devtools
|
402 |
+
*/
|
403 |
+
devtools: "development" !== 'production',
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Whether to record perf
|
407 |
+
*/
|
408 |
+
performance: false,
|
409 |
+
|
410 |
+
/**
|
411 |
+
* Error handler for watcher errors
|
412 |
+
*/
|
413 |
+
errorHandler: null,
|
414 |
+
|
415 |
+
/**
|
416 |
+
* Warn handler for watcher warns
|
417 |
+
*/
|
418 |
+
warnHandler: null,
|
419 |
+
|
420 |
+
/**
|
421 |
+
* Ignore certain custom elements
|
422 |
+
*/
|
423 |
+
ignoredElements: [],
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Custom user key aliases for v-on
|
427 |
+
*/
|
428 |
+
// $flow-disable-line
|
429 |
+
keyCodes: Object.create(null),
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Check if a tag is reserved so that it cannot be registered as a
|
433 |
+
* component. This is platform-dependent and may be overwritten.
|
434 |
+
*/
|
435 |
+
isReservedTag: no,
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Check if an attribute is reserved so that it cannot be used as a component
|
439 |
+
* prop. This is platform-dependent and may be overwritten.
|
440 |
+
*/
|
441 |
+
isReservedAttr: no,
|
442 |
+
|
443 |
+
/**
|
444 |
+
* Check if a tag is an unknown element.
|
445 |
+
* Platform-dependent.
|
446 |
+
*/
|
447 |
+
isUnknownElement: no,
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Get the namespace of an element
|
451 |
+
*/
|
452 |
+
getTagNamespace: noop,
|
453 |
+
|
454 |
+
/**
|
455 |
+
* Parse the real tag name for the specific platform.
|
456 |
+
*/
|
457 |
+
parsePlatformTagName: identity,
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Check if an attribute must be bound using property, e.g. value
|
461 |
+
* Platform-dependent.
|
462 |
+
*/
|
463 |
+
mustUseProp: no,
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Perform updates asynchronously. Intended to be used by Vue Test Utils
|
467 |
+
* This will significantly reduce performance if set to false.
|
468 |
+
*/
|
469 |
+
async: true,
|
470 |
+
|
471 |
+
/**
|
472 |
+
* Exposed for legacy reasons
|
473 |
+
*/
|
474 |
+
_lifecycleHooks: LIFECYCLE_HOOKS
|
475 |
+
});
|
476 |
|
477 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
478 |
|
479 |
+
/**
|
480 |
+
* unicode letters used for parsing html tags, component names and property paths.
|
481 |
+
* using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
|
482 |
+
* skipping \u10000-\uEFFFF due to it freezing up PhantomJS
|
483 |
+
*/
|
484 |
+
var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
|
|
|
485 |
|
486 |
+
/**
|
487 |
+
* Check if a string starts with $ or _
|
488 |
+
*/
|
489 |
+
function isReserved (str) {
|
490 |
+
var c = (str + '').charCodeAt(0);
|
491 |
+
return c === 0x24 || c === 0x5F
|
492 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
|
494 |
+
/**
|
495 |
+
* Define a property.
|
496 |
+
*/
|
497 |
+
function def (obj, key, val, enumerable) {
|
498 |
+
Object.defineProperty(obj, key, {
|
499 |
+
value: val,
|
500 |
+
enumerable: !!enumerable,
|
501 |
+
writable: true,
|
502 |
+
configurable: true
|
503 |
+
});
|
504 |
+
}
|
505 |
|
506 |
+
/**
|
507 |
+
* Parse simple path.
|
508 |
+
*/
|
509 |
+
var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
|
510 |
+
function parsePath (path) {
|
511 |
+
if (bailRE.test(path)) {
|
512 |
+
return
|
513 |
}
|
514 |
+
var segments = path.split('.');
|
515 |
+
return function (obj) {
|
516 |
+
for (var i = 0; i < segments.length; i++) {
|
517 |
+
if (!obj) { return }
|
518 |
+
obj = obj[segments[i]];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
}
|
520 |
+
return obj
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
}
|
522 |
+
}
|
|
|
523 |
|
524 |
+
/* */
|
525 |
|
526 |
+
// can we use __proto__?
|
527 |
+
var hasProto = '__proto__' in {};
|
528 |
|
529 |
+
// Browser environment sniffing
|
530 |
+
var inBrowser = typeof window !== 'undefined';
|
531 |
+
var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
|
532 |
+
var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
|
533 |
+
var UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
534 |
+
var isIE = UA && /msie|trident/.test(UA);
|
535 |
+
var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
536 |
+
var isEdge = UA && UA.indexOf('edge/') > 0;
|
537 |
+
var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
|
538 |
+
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
|
539 |
+
var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
|
540 |
+
var isPhantomJS = UA && /phantomjs/.test(UA);
|
541 |
+
var isFF = UA && UA.match(/firefox\/(\d+)/);
|
542 |
|
543 |
+
// Firefox has a "watch" function on Object.prototype...
|
544 |
+
var nativeWatch = ({}).watch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
|
546 |
+
var supportsPassive = false;
|
547 |
+
if (inBrowser) {
|
548 |
+
try {
|
549 |
+
var opts = {};
|
550 |
+
Object.defineProperty(opts, 'passive', ({
|
551 |
+
get: function get () {
|
552 |
+
/* istanbul ignore next */
|
553 |
+
supportsPassive = true;
|
554 |
+
}
|
555 |
+
})); // https://github.com/facebook/flow/issues/285
|
556 |
+
window.addEventListener('test-passive', null, opts);
|
557 |
+
} catch (e) {}
|
558 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
|
560 |
+
// this needs to be lazy-evaled because vue may be required before
|
561 |
+
// vue-server-renderer can set VUE_ENV
|
562 |
+
var _isServer;
|
563 |
+
var isServerRendering = function () {
|
564 |
+
if (_isServer === undefined) {
|
565 |
+
/* istanbul ignore if */
|
566 |
+
if (!inBrowser && !inWeex && typeof global !== 'undefined') {
|
567 |
+
// detect presence of vue-server-renderer and avoid
|
568 |
+
// Webpack shimming the process
|
569 |
+
_isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
|
570 |
+
} else {
|
571 |
+
_isServer = false;
|
572 |
+
}
|
573 |
}
|
574 |
+
return _isServer
|
575 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
|
577 |
+
// detect devtools
|
578 |
+
var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
579 |
|
580 |
+
/* istanbul ignore next */
|
581 |
+
function isNative (Ctor) {
|
582 |
+
return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
|
583 |
+
}
|
|
|
584 |
|
585 |
+
var hasSymbol =
|
586 |
+
typeof Symbol !== 'undefined' && isNative(Symbol) &&
|
587 |
+
typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
|
588 |
|
589 |
+
var _Set;
|
590 |
+
/* istanbul ignore if */ // $flow-disable-line
|
591 |
+
if (typeof Set !== 'undefined' && isNative(Set)) {
|
592 |
+
// use native Set when available.
|
593 |
+
_Set = Set;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
594 |
} else {
|
595 |
+
// a non-standard Set polyfill that only works with primitive keys.
|
596 |
+
_Set = /*@__PURE__*/(function () {
|
597 |
+
function Set () {
|
598 |
+
this.set = Object.create(null);
|
599 |
+
}
|
600 |
+
Set.prototype.has = function has (key) {
|
601 |
+
return this.set[key] === true
|
602 |
+
};
|
603 |
+
Set.prototype.add = function add (key) {
|
604 |
+
this.set[key] = true;
|
605 |
+
};
|
606 |
+
Set.prototype.clear = function clear () {
|
607 |
+
this.set = Object.create(null);
|
608 |
+
};
|
609 |
|
610 |
+
return Set;
|
611 |
+
}());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
}
|
|
|
613 |
|
614 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
|
616 |
+
var warn = noop;
|
617 |
+
var tip = noop;
|
618 |
+
var generateComponentTrace = (noop); // work around flow check
|
619 |
+
var formatComponentName = (noop);
|
620 |
|
621 |
+
{
|
622 |
+
var hasConsole = typeof console !== 'undefined';
|
623 |
+
var classifyRE = /(?:^|[-_])(\w)/g;
|
624 |
+
var classify = function (str) { return str
|
625 |
+
.replace(classifyRE, function (c) { return c.toUpperCase(); })
|
626 |
+
.replace(/[-_]/g, ''); };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
627 |
|
628 |
+
warn = function (msg, vm) {
|
629 |
+
var trace = vm ? generateComponentTrace(vm) : '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
630 |
|
631 |
+
if (config.warnHandler) {
|
632 |
+
config.warnHandler.call(null, msg, vm, trace);
|
633 |
+
} else if (hasConsole && (!config.silent)) {
|
634 |
+
console.error(("[Vue warn]: " + msg + trace));
|
635 |
+
}
|
636 |
+
};
|
637 |
|
638 |
+
tip = function (msg, vm) {
|
639 |
+
if (hasConsole && (!config.silent)) {
|
640 |
+
console.warn("[Vue tip]: " + msg + (
|
641 |
+
vm ? generateComponentTrace(vm) : ''
|
642 |
+
));
|
643 |
+
}
|
644 |
+
};
|
645 |
|
646 |
+
formatComponentName = function (vm, includeFile) {
|
647 |
+
if (vm.$root === vm) {
|
648 |
+
return '<Root>'
|
649 |
+
}
|
650 |
+
var options = typeof vm === 'function' && vm.cid != null
|
651 |
+
? vm.options
|
652 |
+
: vm._isVue
|
653 |
+
? vm.$options || vm.constructor.options
|
654 |
+
: vm;
|
655 |
+
var name = options.name || options._componentTag;
|
656 |
+
var file = options.__file;
|
657 |
+
if (!name && file) {
|
658 |
+
var match = file.match(/([^/\\]+)\.vue$/);
|
659 |
+
name = match && match[1];
|
660 |
+
}
|
661 |
+
|
662 |
+
return (
|
663 |
+
(name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
|
664 |
+
(file && includeFile !== false ? (" at " + file) : '')
|
665 |
+
)
|
666 |
+
};
|
667 |
+
|
668 |
+
var repeat = function (str, n) {
|
669 |
+
var res = '';
|
670 |
+
while (n) {
|
671 |
+
if (n % 2 === 1) { res += str; }
|
672 |
+
if (n > 1) { str += str; }
|
673 |
+
n >>= 1;
|
674 |
+
}
|
675 |
+
return res
|
676 |
+
};
|
677 |
+
|
678 |
+
generateComponentTrace = function (vm) {
|
679 |
+
if (vm._isVue && vm.$parent) {
|
680 |
+
var tree = [];
|
681 |
+
var currentRecursiveSequence = 0;
|
682 |
+
while (vm) {
|
683 |
+
if (tree.length > 0) {
|
684 |
+
var last = tree[tree.length - 1];
|
685 |
+
if (last.constructor === vm.constructor) {
|
686 |
+
currentRecursiveSequence++;
|
687 |
+
vm = vm.$parent;
|
688 |
+
continue
|
689 |
+
} else if (currentRecursiveSequence > 0) {
|
690 |
+
tree[tree.length - 1] = [last, currentRecursiveSequence];
|
691 |
+
currentRecursiveSequence = 0;
|
692 |
+
}
|
693 |
}
|
694 |
+
tree.push(vm);
|
695 |
+
vm = vm.$parent;
|
696 |
}
|
697 |
+
return '\n\nfound in\n\n' + tree
|
698 |
+
.map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
|
699 |
+
? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
|
700 |
+
: formatComponentName(vm))); })
|
701 |
+
.join('\n')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
} else {
|
703 |
+
return ("\n\n(found in " + (formatComponentName(vm)) + ")")
|
704 |
}
|
705 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
}
|
|
|
|
|
|
|
|
|
707 |
|
708 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
|
710 |
+
var uid = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
|
712 |
+
/**
|
713 |
+
* A dep is an observable that can have multiple
|
714 |
+
* directives subscribing to it.
|
715 |
+
*/
|
716 |
+
var Dep = function Dep () {
|
717 |
+
this.id = uid++;
|
718 |
+
this.subs = [];
|
719 |
+
};
|
720 |
|
721 |
+
Dep.prototype.addSub = function addSub (sub) {
|
722 |
+
this.subs.push(sub);
|
723 |
+
};
|
|
|
|
|
|
|
724 |
|
725 |
+
Dep.prototype.removeSub = function removeSub (sub) {
|
726 |
+
remove(this.subs, sub);
|
727 |
+
};
|
728 |
+
|
729 |
+
Dep.prototype.depend = function depend () {
|
730 |
+
if (Dep.target) {
|
731 |
+
Dep.target.addDep(this);
|
|
|
|
|
|
|
732 |
}
|
|
|
733 |
};
|
|
|
734 |
|
735 |
+
Dep.prototype.notify = function notify () {
|
736 |
+
// stabilize the subscriber list first
|
737 |
+
var subs = this.subs.slice();
|
738 |
+
if (!config.async) {
|
739 |
+
// subs aren't sorted in scheduler if not running async
|
740 |
+
// we need to sort them now to make sure they fire in correct
|
741 |
+
// order
|
742 |
+
subs.sort(function (a, b) { return a.id - b.id; });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
}
|
744 |
+
for (var i = 0, l = subs.length; i < l; i++) {
|
745 |
+
subs[i].update();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
}
|
747 |
+
};
|
|
|
748 |
|
749 |
+
// The current target watcher being evaluated.
|
750 |
+
// This is globally unique because only one watcher
|
751 |
+
// can be evaluated at a time.
|
752 |
+
Dep.target = null;
|
753 |
+
var targetStack = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
754 |
|
755 |
+
function pushTarget (target) {
|
756 |
+
targetStack.push(target);
|
757 |
+
Dep.target = target;
|
758 |
}
|
759 |
|
760 |
+
function popTarget () {
|
761 |
+
targetStack.pop();
|
762 |
+
Dep.target = targetStack[targetStack.length - 1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
}
|
|
|
764 |
|
765 |
+
/* */
|
|
|
|
|
766 |
|
767 |
+
var VNode = function VNode (
|
768 |
+
tag,
|
769 |
+
data,
|
770 |
+
children,
|
771 |
+
text,
|
772 |
+
elm,
|
773 |
+
context,
|
774 |
+
componentOptions,
|
775 |
+
asyncFactory
|
776 |
+
) {
|
777 |
+
this.tag = tag;
|
778 |
+
this.data = data;
|
779 |
+
this.children = children;
|
780 |
+
this.text = text;
|
781 |
+
this.elm = elm;
|
782 |
+
this.ns = undefined;
|
783 |
+
this.context = context;
|
784 |
+
this.fnContext = undefined;
|
785 |
+
this.fnOptions = undefined;
|
786 |
+
this.fnScopeId = undefined;
|
787 |
+
this.key = data && data.key;
|
788 |
+
this.componentOptions = componentOptions;
|
789 |
+
this.componentInstance = undefined;
|
790 |
+
this.parent = undefined;
|
791 |
+
this.raw = false;
|
792 |
+
this.isStatic = false;
|
793 |
+
this.isRootInsert = true;
|
794 |
+
this.isComment = false;
|
795 |
+
this.isCloned = false;
|
796 |
+
this.isOnce = false;
|
797 |
+
this.asyncFactory = asyncFactory;
|
798 |
+
this.asyncMeta = undefined;
|
799 |
+
this.isAsyncPlaceholder = false;
|
800 |
+
};
|
801 |
+
|
802 |
+
var prototypeAccessors = { child: { configurable: true } };
|
803 |
+
|
804 |
+
// DEPRECATED: alias for componentInstance for backwards compat.
|
805 |
+
/* istanbul ignore next */
|
806 |
+
prototypeAccessors.child.get = function () {
|
807 |
+
return this.componentInstance
|
808 |
+
};
|
809 |
+
|
810 |
+
Object.defineProperties( VNode.prototype, prototypeAccessors );
|
811 |
+
|
812 |
+
var createEmptyVNode = function (text) {
|
813 |
+
if ( text === void 0 ) text = '';
|
814 |
+
|
815 |
+
var node = new VNode();
|
816 |
+
node.text = text;
|
817 |
+
node.isComment = true;
|
818 |
+
return node
|
819 |
+
};
|
820 |
+
|
821 |
+
function createTextVNode (val) {
|
822 |
+
return new VNode(undefined, undefined, undefined, String(val))
|
823 |
+
}
|
824 |
+
|
825 |
+
// optimized shallow clone
|
826 |
+
// used for static nodes and slot nodes because they may be reused across
|
827 |
+
// multiple renders, cloning them avoids errors when DOM manipulations rely
|
828 |
+
// on their elm reference.
|
829 |
+
function cloneVNode (vnode) {
|
830 |
+
var cloned = new VNode(
|
831 |
+
vnode.tag,
|
832 |
+
vnode.data,
|
833 |
+
// #7975
|
834 |
+
// clone children array to avoid mutating original in case of cloning
|
835 |
+
// a child.
|
836 |
+
vnode.children && vnode.children.slice(),
|
837 |
+
vnode.text,
|
838 |
+
vnode.elm,
|
839 |
+
vnode.context,
|
840 |
+
vnode.componentOptions,
|
841 |
+
vnode.asyncFactory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
);
|
843 |
+
cloned.ns = vnode.ns;
|
844 |
+
cloned.isStatic = vnode.isStatic;
|
845 |
+
cloned.key = vnode.key;
|
846 |
+
cloned.isComment = vnode.isComment;
|
847 |
+
cloned.fnContext = vnode.fnContext;
|
848 |
+
cloned.fnOptions = vnode.fnOptions;
|
849 |
+
cloned.fnScopeId = vnode.fnScopeId;
|
850 |
+
cloned.asyncMeta = vnode.asyncMeta;
|
851 |
+
cloned.isCloned = true;
|
852 |
+
return cloned
|
853 |
+
}
|
854 |
+
|
855 |
+
/*
|
856 |
+
* not type checking this file because flow doesn't play well with
|
857 |
+
* dynamically accessing methods on Array prototype
|
858 |
+
*/
|
859 |
+
|
860 |
+
var arrayProto = Array.prototype;
|
861 |
+
var arrayMethods = Object.create(arrayProto);
|
862 |
+
|
863 |
+
var methodsToPatch = [
|
864 |
+
'push',
|
865 |
+
'pop',
|
866 |
+
'shift',
|
867 |
+
'unshift',
|
868 |
+
'splice',
|
869 |
+
'sort',
|
870 |
+
'reverse'
|
871 |
+
];
|
872 |
+
|
873 |
+
/**
|
874 |
+
* Intercept mutating methods and emit events
|
875 |
+
*/
|
876 |
+
methodsToPatch.forEach(function (method) {
|
877 |
+
// cache original method
|
878 |
+
var original = arrayProto[method];
|
879 |
+
def(arrayMethods, method, function mutator () {
|
880 |
+
var args = [], len = arguments.length;
|
881 |
+
while ( len-- ) args[ len ] = arguments[ len ];
|
882 |
+
|
883 |
+
var result = original.apply(this, args);
|
884 |
+
var ob = this.__ob__;
|
885 |
+
var inserted;
|
886 |
+
switch (method) {
|
887 |
+
case 'push':
|
888 |
+
case 'unshift':
|
889 |
+
inserted = args;
|
890 |
+
break
|
891 |
+
case 'splice':
|
892 |
+
inserted = args.slice(2);
|
893 |
+
break
|
894 |
+
}
|
895 |
+
if (inserted) { ob.observeArray(inserted); }
|
896 |
+
// notify change
|
897 |
+
ob.dep.notify();
|
898 |
+
return result
|
899 |
+
});
|
900 |
+
});
|
901 |
+
|
902 |
+
/* */
|
903 |
+
|
904 |
+
var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
|
905 |
+
|
906 |
+
/**
|
907 |
+
* In some cases we may want to disable observation inside a component's
|
908 |
+
* update computation.
|
909 |
+
*/
|
910 |
+
var shouldObserve = true;
|
911 |
+
|
912 |
+
function toggleObserving (value) {
|
913 |
+
shouldObserve = value;
|
914 |
}
|
|
|
915 |
|
916 |
+
/**
|
917 |
+
* Observer class that is attached to each observed
|
918 |
+
* object. Once attached, the observer converts the target
|
919 |
+
* object's property keys into getter/setters that
|
920 |
+
* collect dependencies and dispatch updates.
|
921 |
+
*/
|
922 |
+
var Observer = function Observer (value) {
|
923 |
+
this.value = value;
|
924 |
+
this.dep = new Dep();
|
925 |
+
this.vmCount = 0;
|
926 |
+
def(value, '__ob__', this);
|
927 |
+
if (Array.isArray(value)) {
|
928 |
+
if (hasProto) {
|
929 |
+
protoAugment(value, arrayMethods);
|
|
|
|
|
930 |
} else {
|
931 |
+
copyAugment(value, arrayMethods, arrayKeys);
|
932 |
}
|
933 |
+
this.observeArray(value);
|
934 |
+
} else {
|
935 |
+
this.walk(value);
|
936 |
}
|
937 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
938 |
|
939 |
+
/**
|
940 |
+
* Walk through all properties and convert them into
|
941 |
+
* getter/setters. This method should only be called when
|
942 |
+
* value type is Object.
|
943 |
+
*/
|
944 |
+
Observer.prototype.walk = function walk (obj) {
|
945 |
+
var keys = Object.keys(obj);
|
946 |
+
for (var i = 0; i < keys.length; i++) {
|
947 |
+
defineReactive$$1(obj, keys[i]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
948 |
}
|
949 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
950 |
|
951 |
+
/**
|
952 |
+
* Observe a list of Array items.
|
953 |
+
*/
|
954 |
+
Observer.prototype.observeArray = function observeArray (items) {
|
955 |
+
for (var i = 0, l = items.length; i < l; i++) {
|
956 |
+
observe(items[i]);
|
|
|
|
|
|
|
|
|
|
|
957 |
}
|
958 |
+
};
|
|
|
959 |
|
960 |
+
// helpers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
|
962 |
+
/**
|
963 |
+
* Augment a target Object or Array by intercepting
|
964 |
+
* the prototype chain using __proto__
|
965 |
+
*/
|
966 |
+
function protoAugment (target, src) {
|
967 |
+
/* eslint-disable no-proto */
|
968 |
+
target.__proto__ = src;
|
969 |
+
/* eslint-enable no-proto */
|
|
|
|
|
|
|
970 |
}
|
971 |
|
972 |
+
/**
|
973 |
+
* Augment a target Object or Array by defining
|
974 |
+
* hidden properties.
|
975 |
+
*/
|
976 |
+
/* istanbul ignore next */
|
977 |
+
function copyAugment (target, src, keys) {
|
978 |
+
for (var i = 0, l = keys.length; i < l; i++) {
|
979 |
+
var key = keys[i];
|
980 |
+
def(target, key, src[key]);
|
981 |
+
}
|
982 |
}
|
983 |
|
984 |
+
/**
|
985 |
+
* Attempt to create an observer instance for a value,
|
986 |
+
* returns the new observer if successfully observed,
|
987 |
+
* or the existing observer if the value already has one.
|
988 |
+
*/
|
989 |
+
function observe (value, asRootData) {
|
990 |
+
if (!isObject(value) || value instanceof VNode) {
|
991 |
+
return
|
|
|
|
|
992 |
}
|
993 |
+
var ob;
|
994 |
+
if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
|
995 |
+
ob = value.__ob__;
|
996 |
+
} else if (
|
997 |
+
shouldObserve &&
|
998 |
+
!isServerRendering() &&
|
999 |
+
(Array.isArray(value) || isPlainObject(value)) &&
|
1000 |
+
Object.isExtensible(value) &&
|
1001 |
+
!value._isVue
|
1002 |
+
) {
|
1003 |
+
ob = new Observer(value);
|
1004 |
}
|
1005 |
+
if (asRootData && ob) {
|
1006 |
+
ob.vmCount++;
|
1007 |
+
}
|
1008 |
+
return ob
|
1009 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1010 |
|
1011 |
+
/**
|
1012 |
+
* Define a reactive property on an Object.
|
1013 |
+
*/
|
1014 |
+
function defineReactive$$1 (
|
1015 |
+
obj,
|
1016 |
+
key,
|
1017 |
+
val,
|
1018 |
+
customSetter,
|
1019 |
+
shallow
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1020 |
) {
|
1021 |
+
var dep = new Dep();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
|
1023 |
+
var property = Object.getOwnPropertyDescriptor(obj, key);
|
1024 |
+
if (property && property.configurable === false) {
|
1025 |
+
return
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
// cater for pre-defined getter/setters
|
1029 |
+
var getter = property && property.get;
|
1030 |
+
var setter = property && property.set;
|
1031 |
+
if ((!getter || setter) && arguments.length === 2) {
|
1032 |
+
val = obj[key];
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
var childOb = !shallow && observe(val);
|
1036 |
+
Object.defineProperty(obj, key, {
|
1037 |
+
enumerable: true,
|
1038 |
+
configurable: true,
|
1039 |
+
get: function reactiveGetter () {
|
1040 |
+
var value = getter ? getter.call(obj) : val;
|
1041 |
+
if (Dep.target) {
|
1042 |
+
dep.depend();
|
1043 |
+
if (childOb) {
|
1044 |
+
childOb.dep.depend();
|
1045 |
+
if (Array.isArray(value)) {
|
1046 |
+
dependArray(value);
|
1047 |
+
}
|
1048 |
+
}
|
1049 |
+
}
|
1050 |
+
return value
|
1051 |
+
},
|
1052 |
+
set: function reactiveSetter (newVal) {
|
1053 |
+
var value = getter ? getter.call(obj) : val;
|
1054 |
+
/* eslint-disable no-self-compare */
|
1055 |
+
if (newVal === value || (newVal !== newVal && value !== value)) {
|
1056 |
+
return
|
1057 |
+
}
|
1058 |
+
/* eslint-enable no-self-compare */
|
1059 |
+
if (customSetter) {
|
1060 |
+
customSetter();
|
1061 |
+
}
|
1062 |
+
// #7981: for accessor properties without setter
|
1063 |
+
if (getter && !setter) { return }
|
1064 |
+
if (setter) {
|
1065 |
+
setter.call(obj, newVal);
|
1066 |
+
} else {
|
1067 |
+
val = newVal;
|
1068 |
+
}
|
1069 |
+
childOb = !shallow && observe(newVal);
|
1070 |
+
dep.notify();
|
1071 |
+
}
|
1072 |
+
});
|
1073 |
}
|
1074 |
+
|
1075 |
+
/**
|
1076 |
+
* Set a property on an object. Adds the new property and
|
1077 |
+
* triggers change notification if the property doesn't
|
1078 |
+
* already exist.
|
1079 |
+
*/
|
1080 |
+
function set (target, key, val) {
|
1081 |
+
if (isUndef(target) || isPrimitive(target)
|
1082 |
+
) {
|
1083 |
+
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
|
1084 |
}
|
1085 |
+
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
1086 |
+
target.length = Math.max(target.length, key);
|
1087 |
+
target.splice(key, 1, val);
|
1088 |
+
return val
|
1089 |
}
|
1090 |
+
if (key in target && !(key in Object.prototype)) {
|
1091 |
+
target[key] = val;
|
1092 |
+
return val
|
1093 |
+
}
|
1094 |
+
var ob = (target).__ob__;
|
1095 |
+
if (target._isVue || (ob && ob.vmCount)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1096 |
warn(
|
1097 |
+
'Avoid adding reactive properties to a Vue instance or its root $data ' +
|
1098 |
+
'at runtime - declare it upfront in the data option.'
|
1099 |
);
|
1100 |
+
return val
|
1101 |
+
}
|
1102 |
+
if (!ob) {
|
1103 |
+
target[key] = val;
|
1104 |
+
return val
|
1105 |
}
|
1106 |
+
defineReactive$$1(ob.value, key, val);
|
1107 |
+
ob.dep.notify();
|
1108 |
+
return val
|
1109 |
}
|
|
|
1110 |
|
1111 |
+
/**
|
1112 |
+
* Delete a property and trigger change if necessary.
|
1113 |
+
*/
|
1114 |
+
function del (target, key) {
|
1115 |
+
if (isUndef(target) || isPrimitive(target)
|
1116 |
+
) {
|
1117 |
+
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
|
|
|
|
|
|
|
|
|
1118 |
}
|
1119 |
+
if (Array.isArray(target) && isValidArrayIndex(key)) {
|
1120 |
+
target.splice(key, 1);
|
1121 |
+
return
|
1122 |
+
}
|
1123 |
+
var ob = (target).__ob__;
|
1124 |
+
if (target._isVue || (ob && ob.vmCount)) {
|
1125 |
+
warn(
|
1126 |
+
'Avoid deleting properties on a Vue instance or its root $data ' +
|
1127 |
+
'- just set it to null.'
|
1128 |
+
);
|
1129 |
+
return
|
1130 |
+
}
|
1131 |
+
if (!hasOwn(target, key)) {
|
1132 |
+
return
|
1133 |
+
}
|
1134 |
+
delete target[key];
|
1135 |
+
if (!ob) {
|
1136 |
+
return
|
1137 |
+
}
|
1138 |
+
ob.dep.notify();
|
1139 |
}
|
1140 |
+
|
1141 |
+
/**
|
1142 |
+
* Collect dependencies on array elements when the array is touched, since
|
1143 |
+
* we cannot intercept array element access like property getters.
|
1144 |
+
*/
|
1145 |
+
function dependArray (value) {
|
1146 |
+
for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
|
1147 |
+
e = value[i];
|
1148 |
+
e && e.__ob__ && e.__ob__.dep.depend();
|
1149 |
+
if (Array.isArray(e)) {
|
1150 |
+
dependArray(e);
|
1151 |
+
}
|
1152 |
+
}
|
1153 |
}
|
|
|
1154 |
|
1155 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1156 |
|
1157 |
+
/**
|
1158 |
+
* Option overwriting strategies are functions that handle
|
1159 |
+
* how to merge a parent option value and a child option
|
1160 |
+
* value into the final value.
|
1161 |
+
*/
|
1162 |
+
var strats = config.optionMergeStrategies;
|
1163 |
|
1164 |
+
/**
|
1165 |
+
* Options with restrictions
|
1166 |
+
*/
|
1167 |
+
{
|
1168 |
+
strats.el = strats.propsData = function (parent, child, vm, key) {
|
1169 |
+
if (!vm) {
|
1170 |
+
warn(
|
1171 |
+
"option \"" + key + "\" can only be used during instance " +
|
1172 |
+
'creation with the `new` keyword.'
|
1173 |
+
);
|
1174 |
+
}
|
1175 |
+
return defaultStrat(parent, child)
|
1176 |
+
};
|
1177 |
}
|
1178 |
+
|
1179 |
+
/**
|
1180 |
+
* Helper that recursively merges two data objects together.
|
1181 |
+
*/
|
1182 |
+
function mergeData (to, from) {
|
1183 |
+
if (!from) { return to }
|
1184 |
+
var key, toVal, fromVal;
|
1185 |
+
|
1186 |
+
var keys = hasSymbol
|
1187 |
+
? Reflect.ownKeys(from)
|
1188 |
+
: Object.keys(from);
|
1189 |
+
|
1190 |
+
for (var i = 0; i < keys.length; i++) {
|
1191 |
+
key = keys[i];
|
1192 |
+
// in case the object is already observed...
|
1193 |
+
if (key === '__ob__') { continue }
|
1194 |
+
toVal = to[key];
|
1195 |
+
fromVal = from[key];
|
1196 |
+
if (!hasOwn(to, key)) {
|
1197 |
+
set(to, key, fromVal);
|
1198 |
+
} else if (
|
1199 |
+
toVal !== fromVal &&
|
1200 |
+
isPlainObject(toVal) &&
|
1201 |
+
isPlainObject(fromVal)
|
1202 |
+
) {
|
1203 |
+
mergeData(toVal, fromVal);
|
1204 |
+
}
|
1205 |
}
|
1206 |
+
return to
|
1207 |
}
|
|
|
|
|
|
|
|
|
1208 |
|
1209 |
+
/**
|
1210 |
+
* Data
|
1211 |
+
*/
|
1212 |
+
function mergeDataOrFn (
|
1213 |
+
parentVal,
|
1214 |
+
childVal,
|
1215 |
+
vm
|
1216 |
+
) {
|
1217 |
+
if (!vm) {
|
1218 |
+
// in a Vue.extend merge, both should be functions
|
1219 |
+
if (!childVal) {
|
1220 |
+
return parentVal
|
1221 |
+
}
|
1222 |
+
if (!parentVal) {
|
1223 |
+
return childVal
|
1224 |
+
}
|
1225 |
+
// when parentVal & childVal are both present,
|
1226 |
+
// we need to return a function that returns the
|
1227 |
+
// merged result of both functions... no need to
|
1228 |
+
// check if parentVal is a function here because
|
1229 |
+
// it has to be a function to pass previous merges.
|
1230 |
+
return function mergedDataFn () {
|
1231 |
+
return mergeData(
|
1232 |
+
typeof childVal === 'function' ? childVal.call(this, this) : childVal,
|
1233 |
+
typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
|
1234 |
+
)
|
1235 |
+
}
|
1236 |
+
} else {
|
1237 |
+
return function mergedInstanceDataFn () {
|
1238 |
+
// instance merge
|
1239 |
+
var instanceData = typeof childVal === 'function'
|
1240 |
+
? childVal.call(vm, vm)
|
1241 |
+
: childVal;
|
1242 |
+
var defaultData = typeof parentVal === 'function'
|
1243 |
+
? parentVal.call(vm, vm)
|
1244 |
+
: parentVal;
|
1245 |
+
if (instanceData) {
|
1246 |
+
return mergeData(instanceData, defaultData)
|
1247 |
+
} else {
|
1248 |
+
return defaultData
|
1249 |
}
|
1250 |
}
|
1251 |
}
|
1252 |
}
|
|
|
|
|
1253 |
|
1254 |
+
strats.data = function (
|
1255 |
+
parentVal,
|
1256 |
+
childVal,
|
1257 |
+
vm
|
1258 |
+
) {
|
1259 |
+
if (!vm) {
|
1260 |
+
if (childVal && typeof childVal !== 'function') {
|
1261 |
+
warn(
|
1262 |
+
'The "data" option should be a function ' +
|
1263 |
+
'that returns a per-instance value in component ' +
|
1264 |
+
'definitions.',
|
1265 |
+
vm
|
1266 |
+
);
|
1267 |
+
|
1268 |
+
return parentVal
|
1269 |
+
}
|
1270 |
+
return mergeDataOrFn(parentVal, childVal)
|
1271 |
}
|
|
|
|
|
|
|
1272 |
|
1273 |
+
return mergeDataOrFn(parentVal, childVal, vm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1274 |
};
|
1275 |
+
|
1276 |
+
/**
|
1277 |
+
* Hooks and props are merged as arrays.
|
1278 |
+
*/
|
1279 |
+
function mergeHook (
|
1280 |
+
parentVal,
|
1281 |
+
childVal
|
1282 |
+
) {
|
1283 |
+
var res = childVal
|
1284 |
+
? parentVal
|
1285 |
+
? parentVal.concat(childVal)
|
1286 |
+
: Array.isArray(childVal)
|
1287 |
+
? childVal
|
1288 |
+
: [childVal]
|
1289 |
+
: parentVal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1290 |
return res
|
1291 |
+
? dedupeHooks(res)
|
1292 |
+
: res
|
1293 |
+
}
|
1294 |
|
1295 |
+
function dedupeHooks (hooks) {
|
1296 |
+
var res = [];
|
1297 |
+
for (var i = 0; i < hooks.length; i++) {
|
1298 |
+
if (res.indexOf(hooks[i]) === -1) {
|
1299 |
+
res.push(hooks[i]);
|
|
|
|
|
|
|
1300 |
}
|
|
|
|
|
1301 |
}
|
1302 |
+
return res
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1303 |
}
|
|
|
1304 |
|
1305 |
+
LIFECYCLE_HOOKS.forEach(function (hook) {
|
1306 |
+
strats[hook] = mergeHook;
|
1307 |
+
});
|
|
|
1308 |
|
1309 |
+
/**
|
1310 |
+
* Assets
|
1311 |
+
*
|
1312 |
+
* When a vm is present (instance creation), we need to do
|
1313 |
+
* a three-way merge between constructor options, instance
|
1314 |
+
* options and parent options.
|
1315 |
+
*/
|
1316 |
+
function mergeAssets (
|
1317 |
+
parentVal,
|
1318 |
+
childVal,
|
1319 |
+
vm,
|
1320 |
+
key
|
1321 |
) {
|
1322 |
+
var res = Object.create(parentVal || null);
|
1323 |
+
if (childVal) {
|
1324 |
+
assertObjectType(key, childVal, vm);
|
1325 |
+
return extend(res, childVal)
|
1326 |
+
} else {
|
1327 |
+
return res
|
1328 |
+
}
|
1329 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1330 |
|
1331 |
+
ASSET_TYPES.forEach(function (type) {
|
1332 |
+
strats[type + 's'] = mergeAssets;
|
1333 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1334 |
|
1335 |
+
/**
|
1336 |
+
* Watchers.
|
1337 |
+
*
|
1338 |
+
* Watchers hashes should not overwrite one
|
1339 |
+
* another, so we merge them as arrays.
|
1340 |
+
*/
|
1341 |
+
strats.watch = function (
|
1342 |
+
parentVal,
|
1343 |
+
childVal,
|
1344 |
+
vm,
|
1345 |
+
key
|
1346 |
+
) {
|
1347 |
+
// work around Firefox's Object.prototype.watch...
|
1348 |
+
if (parentVal === nativeWatch) { parentVal = undefined; }
|
1349 |
+
if (childVal === nativeWatch) { childVal = undefined; }
|
1350 |
+
/* istanbul ignore if */
|
1351 |
+
if (!childVal) { return Object.create(parentVal || null) }
|
1352 |
+
{
|
1353 |
+
assertObjectType(key, childVal, vm);
|
1354 |
}
|
1355 |
+
if (!parentVal) { return childVal }
|
1356 |
+
var ret = {};
|
1357 |
+
extend(ret, parentVal);
|
1358 |
+
for (var key$1 in childVal) {
|
1359 |
+
var parent = ret[key$1];
|
1360 |
+
var child = childVal[key$1];
|
1361 |
+
if (parent && !Array.isArray(parent)) {
|
1362 |
+
parent = [parent];
|
1363 |
}
|
1364 |
+
ret[key$1] = parent
|
1365 |
+
? parent.concat(child)
|
1366 |
+
: Array.isArray(child) ? child : [child];
|
1367 |
}
|
1368 |
+
return ret
|
1369 |
};
|
1370 |
|
1371 |
+
/**
|
1372 |
+
* Other object hashes.
|
1373 |
+
*/
|
1374 |
+
strats.props =
|
1375 |
+
strats.methods =
|
1376 |
+
strats.inject =
|
1377 |
+
strats.computed = function (
|
1378 |
+
parentVal,
|
1379 |
+
childVal,
|
1380 |
+
vm,
|
1381 |
+
key
|
1382 |
+
) {
|
1383 |
+
if (childVal && "development" !== 'production') {
|
1384 |
+
assertObjectType(key, childVal, vm);
|
1385 |
}
|
1386 |
+
if (!parentVal) { return childVal }
|
1387 |
+
var ret = Object.create(null);
|
1388 |
+
extend(ret, parentVal);
|
1389 |
+
if (childVal) { extend(ret, childVal); }
|
1390 |
+
return ret
|
1391 |
};
|
1392 |
+
strats.provide = mergeDataOrFn;
|
|
|
|
|
1393 |
|
1394 |
+
/**
|
1395 |
+
* Default strategy.
|
1396 |
+
*/
|
1397 |
+
var defaultStrat = function (parentVal, childVal) {
|
1398 |
+
return childVal === undefined
|
1399 |
+
? parentVal
|
1400 |
+
: childVal
|
1401 |
+
};
|
1402 |
|
1403 |
+
/**
|
1404 |
+
* Validate component names
|
1405 |
+
*/
|
1406 |
+
function checkComponents (options) {
|
1407 |
+
for (var key in options.components) {
|
1408 |
+
validateComponentName(key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1409 |
}
|
|
|
1410 |
}
|
1411 |
+
|
1412 |
+
function validateComponentName (name) {
|
1413 |
+
if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
|
1414 |
+
warn(
|
1415 |
+
'Invalid component name: "' + name + '". Component names ' +
|
1416 |
+
'should conform to valid custom element name in html5 specification.'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1417 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1418 |
}
|
1419 |
+
if (isBuiltInTag(name) || config.isReservedTag(name)) {
|
1420 |
+
warn(
|
1421 |
+
'Do not use built-in or reserved HTML elements as component ' +
|
1422 |
+
'id: ' + name
|
1423 |
+
);
|
1424 |
}
|
1425 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1426 |
|
1427 |
+
/**
|
1428 |
+
* Ensure all props option syntax are normalized into the
|
1429 |
+
* Object-based format.
|
1430 |
+
*/
|
1431 |
+
function normalizeProps (options, vm) {
|
1432 |
+
var props = options.props;
|
1433 |
+
if (!props) { return }
|
1434 |
+
var res = {};
|
1435 |
+
var i, val, name;
|
1436 |
+
if (Array.isArray(props)) {
|
1437 |
+
i = props.length;
|
1438 |
+
while (i--) {
|
1439 |
+
val = props[i];
|
1440 |
+
if (typeof val === 'string') {
|
1441 |
+
name = camelize(val);
|
1442 |
+
res[name] = { type: null };
|
1443 |
+
} else {
|
1444 |
+
warn('props must be strings when using array syntax.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1445 |
}
|
1446 |
}
|
1447 |
+
} else if (isPlainObject(props)) {
|
1448 |
+
for (var key in props) {
|
1449 |
+
val = props[key];
|
1450 |
+
name = camelize(key);
|
1451 |
+
res[name] = isPlainObject(val)
|
1452 |
+
? val
|
1453 |
+
: { type: val };
|
1454 |
+
}
|
1455 |
+
} else {
|
1456 |
+
warn(
|
1457 |
+
"Invalid value for option \"props\": expected an Array or an Object, " +
|
1458 |
+
"but got " + (toRawType(props)) + ".",
|
1459 |
+
vm
|
1460 |
+
);
|
1461 |
}
|
1462 |
+
options.props = res;
|
1463 |
}
|
|
|
|
|
1464 |
|
1465 |
+
/**
|
1466 |
+
* Normalize all injections into Object-based format
|
1467 |
+
*/
|
1468 |
+
function normalizeInject (options, vm) {
|
1469 |
+
var inject = options.inject;
|
1470 |
+
if (!inject) { return }
|
1471 |
+
var normalized = options.inject = {};
|
1472 |
+
if (Array.isArray(inject)) {
|
1473 |
+
for (var i = 0; i < inject.length; i++) {
|
1474 |
+
normalized[inject[i]] = { from: inject[i] };
|
1475 |
+
}
|
1476 |
+
} else if (isPlainObject(inject)) {
|
1477 |
+
for (var key in inject) {
|
1478 |
+
var val = inject[key];
|
1479 |
+
normalized[key] = isPlainObject(val)
|
1480 |
+
? extend({ from: key }, val)
|
1481 |
+
: { from: val };
|
|
|
1482 |
}
|
1483 |
+
} else {
|
1484 |
+
warn(
|
1485 |
+
"Invalid value for option \"inject\": expected an Array or an Object, " +
|
1486 |
+
"but got " + (toRawType(inject)) + ".",
|
1487 |
+
vm
|
1488 |
+
);
|
1489 |
}
|
1490 |
}
|
1491 |
+
|
1492 |
+
/**
|
1493 |
+
* Normalize raw function directives into object format.
|
1494 |
+
*/
|
1495 |
+
function normalizeDirectives (options) {
|
1496 |
+
var dirs = options.directives;
|
1497 |
+
if (dirs) {
|
1498 |
+
for (var key in dirs) {
|
1499 |
+
var def$$1 = dirs[key];
|
1500 |
+
if (typeof def$$1 === 'function') {
|
1501 |
+
dirs[key] = { bind: def$$1, update: def$$1 };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1502 |
}
|
|
|
1503 |
}
|
1504 |
}
|
1505 |
}
|
|
|
|
|
1506 |
|
1507 |
+
function assertObjectType (name, value, vm) {
|
1508 |
+
if (!isPlainObject(value)) {
|
1509 |
+
warn(
|
1510 |
+
"Invalid value for option \"" + name + "\": expected an Object, " +
|
1511 |
+
"but got " + (toRawType(value)) + ".",
|
1512 |
+
vm
|
1513 |
+
);
|
1514 |
+
}
|
1515 |
+
}
|
1516 |
|
1517 |
+
/**
|
1518 |
+
* Merge two option objects into a new one.
|
1519 |
+
* Core utility used in both instantiation and inheritance.
|
1520 |
+
*/
|
1521 |
+
function mergeOptions (
|
1522 |
+
parent,
|
1523 |
+
child,
|
1524 |
+
vm
|
1525 |
) {
|
1526 |
+
{
|
1527 |
+
checkComponents(child);
|
1528 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1529 |
|
1530 |
+
if (typeof child === 'function') {
|
1531 |
+
child = child.options;
|
1532 |
+
}
|
|
|
|
|
1533 |
|
1534 |
+
normalizeProps(child, vm);
|
1535 |
+
normalizeInject(child, vm);
|
1536 |
+
normalizeDirectives(child);
|
|
|
|
|
|
|
|
|
|
|
|
|
1537 |
|
1538 |
+
// Apply extends and mixins on the child options,
|
1539 |
+
// but only if it is a raw options object that isn't
|
1540 |
+
// the result of another mergeOptions call.
|
1541 |
+
// Only merged options has the _base property.
|
1542 |
+
if (!child._base) {
|
1543 |
+
if (child.extends) {
|
1544 |
+
parent = mergeOptions(parent, child.extends, vm);
|
|
|
1545 |
}
|
1546 |
+
if (child.mixins) {
|
1547 |
+
for (var i = 0, l = child.mixins.length; i < l; i++) {
|
1548 |
+
parent = mergeOptions(parent, child.mixins[i], vm);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1549 |
}
|
1550 |
}
|
1551 |
}
|
1552 |
|
1553 |
+
var options = {};
|
1554 |
+
var key;
|
1555 |
+
for (key in parent) {
|
1556 |
+
mergeField(key);
|
1557 |
+
}
|
1558 |
+
for (key in child) {
|
1559 |
+
if (!hasOwn(parent, key)) {
|
1560 |
+
mergeField(key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1561 |
}
|
1562 |
}
|
1563 |
+
function mergeField (key) {
|
1564 |
+
var strat = strats[key] || defaultStrat;
|
1565 |
+
options[key] = strat(parent[key], child[key], vm, key);
|
1566 |
+
}
|
1567 |
+
return options
|
1568 |
}
|
|
|
|
|
|
|
1569 |
|
1570 |
+
/**
|
1571 |
+
* Resolve an asset.
|
1572 |
+
* This function is used because child instances need access
|
1573 |
+
* to assets defined in its ancestor chain.
|
1574 |
+
*/
|
1575 |
+
function resolveAsset (
|
1576 |
+
options,
|
1577 |
+
type,
|
1578 |
+
id,
|
1579 |
+
warnMissing
|
1580 |
+
) {
|
1581 |
+
/* istanbul ignore if */
|
1582 |
+
if (typeof id !== 'string') {
|
1583 |
+
return
|
1584 |
+
}
|
1585 |
+
var assets = options[type];
|
1586 |
+
// check local registration variations first
|
1587 |
+
if (hasOwn(assets, id)) { return assets[id] }
|
1588 |
+
var camelizedId = camelize(id);
|
1589 |
+
if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
|
1590 |
+
var PascalCaseId = capitalize(camelizedId);
|
1591 |
+
if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
|
1592 |
+
// fallback to prototype chain
|
1593 |
+
var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
|
1594 |
+
if (warnMissing && !res) {
|
1595 |
+
warn(
|
1596 |
+
'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
|
1597 |
+
options
|
1598 |
+
);
|
1599 |
+
}
|
1600 |
+
return res
|
1601 |
}
|
|
|
1602 |
|
1603 |
+
/* */
|
1604 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1605 |
|
1606 |
+
|
1607 |
+
function validateProp (
|
1608 |
+
key,
|
1609 |
+
propOptions,
|
1610 |
+
propsData,
|
1611 |
+
vm
|
1612 |
+
) {
|
1613 |
+
var prop = propOptions[key];
|
1614 |
+
var absent = !hasOwn(propsData, key);
|
1615 |
+
var value = propsData[key];
|
1616 |
+
// boolean casting
|
1617 |
+
var booleanIndex = getTypeIndex(Boolean, prop.type);
|
1618 |
+
if (booleanIndex > -1) {
|
1619 |
+
if (absent && !hasOwn(prop, 'default')) {
|
1620 |
+
value = false;
|
1621 |
+
} else if (value === '' || value === hyphenate(key)) {
|
1622 |
+
// only cast empty string / same name to boolean if
|
1623 |
+
// boolean has higher priority
|
1624 |
+
var stringIndex = getTypeIndex(String, prop.type);
|
1625 |
+
if (stringIndex < 0 || booleanIndex < stringIndex) {
|
1626 |
+
value = true;
|
1627 |
+
}
|
1628 |
}
|
1629 |
}
|
1630 |
+
// check default value
|
1631 |
+
if (value === undefined) {
|
1632 |
+
value = getPropDefaultValue(vm, prop, key);
|
1633 |
+
// since the default value is a fresh copy,
|
1634 |
+
// make sure to observe it.
|
1635 |
+
var prevShouldObserve = shouldObserve;
|
1636 |
+
toggleObserving(true);
|
1637 |
+
observe(value);
|
1638 |
+
toggleObserving(prevShouldObserve);
|
1639 |
}
|
1640 |
+
{
|
1641 |
+
assertProp(prop, key, value, vm, absent);
|
1642 |
+
}
|
1643 |
+
return value
|
1644 |
+
}
|
|
|
|
|
1645 |
|
1646 |
+
/**
|
1647 |
+
* Get the default value of a prop.
|
1648 |
+
*/
|
1649 |
+
function getPropDefaultValue (vm, prop, key) {
|
1650 |
+
// no default, return undefined
|
1651 |
+
if (!hasOwn(prop, 'default')) {
|
1652 |
+
return undefined
|
1653 |
+
}
|
1654 |
+
var def = prop.default;
|
1655 |
+
// warn against non-factory defaults for Object & Array
|
1656 |
+
if (isObject(def)) {
|
1657 |
+
warn(
|
1658 |
+
'Invalid default value for prop "' + key + '": ' +
|
1659 |
+
'Props with type Object/Array must use a factory function ' +
|
1660 |
+
'to return the default value.',
|
1661 |
+
vm
|
1662 |
+
);
|
1663 |
}
|
1664 |
+
// the raw prop value was also undefined from previous render,
|
1665 |
+
// return previous default value to avoid unnecessary watcher trigger
|
1666 |
+
if (vm && vm.$options.propsData &&
|
1667 |
+
vm.$options.propsData[key] === undefined &&
|
1668 |
+
vm._props[key] !== undefined
|
1669 |
+
) {
|
1670 |
+
return vm._props[key]
|
1671 |
}
|
1672 |
+
// call factory function for non-Function types
|
1673 |
+
// a value is Function if its prototype is function even across different execution context
|
1674 |
+
return typeof def === 'function' && getType(prop.type) !== 'Function'
|
1675 |
+
? def.call(vm)
|
1676 |
+
: def
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
/**
|
1680 |
+
* Assert whether a prop is valid.
|
1681 |
+
*/
|
1682 |
+
function assertProp (
|
1683 |
+
prop,
|
1684 |
+
name,
|
1685 |
+
value,
|
1686 |
+
vm,
|
1687 |
+
absent
|
1688 |
+
) {
|
1689 |
+
if (prop.required && absent) {
|
1690 |
+
warn(
|
1691 |
+
'Missing required prop: "' + name + '"',
|
1692 |
+
vm
|
1693 |
+
);
|
1694 |
+
return
|
1695 |
}
|
1696 |
+
if (value == null && !prop.required) {
|
1697 |
+
return
|
|
|
1698 |
}
|
1699 |
+
var type = prop.type;
|
1700 |
+
var valid = !type || type === true;
|
1701 |
+
var expectedTypes = [];
|
1702 |
+
if (type) {
|
1703 |
+
if (!Array.isArray(type)) {
|
1704 |
+
type = [type];
|
1705 |
+
}
|
1706 |
+
for (var i = 0; i < type.length && !valid; i++) {
|
1707 |
+
var assertedType = assertType(value, type[i]);
|
1708 |
+
expectedTypes.push(assertedType.expectedType || '');
|
1709 |
+
valid = assertedType.valid;
|
1710 |
}
|
1711 |
}
|
|
|
|
|
1712 |
|
1713 |
+
if (!valid) {
|
1714 |
+
warn(
|
1715 |
+
getInvalidTypeMessage(name, value, expectedTypes),
|
1716 |
+
vm
|
1717 |
+
);
|
1718 |
+
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1719 |
}
|
1720 |
+
var validator = prop.validator;
|
1721 |
+
if (validator) {
|
1722 |
+
if (!validator(value)) {
|
1723 |
+
warn(
|
1724 |
+
'Invalid prop: custom validator check failed for prop "' + name + '".',
|
1725 |
+
vm
|
1726 |
+
);
|
|
|
|
|
|
|
1727 |
}
|
1728 |
}
|
1729 |
+
}
|
|
|
|
|
1730 |
|
1731 |
+
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
|
1732 |
|
1733 |
+
function assertType (value, type) {
|
1734 |
+
var valid;
|
1735 |
+
var expectedType = getType(type);
|
1736 |
+
if (simpleCheckRE.test(expectedType)) {
|
1737 |
+
var t = typeof value;
|
1738 |
+
valid = t === expectedType.toLowerCase();
|
1739 |
+
// for primitive wrapper objects
|
1740 |
+
if (!valid && t === 'object') {
|
1741 |
+
valid = value instanceof type;
|
1742 |
+
}
|
1743 |
+
} else if (expectedType === 'Object') {
|
1744 |
+
valid = isPlainObject(value);
|
1745 |
+
} else if (expectedType === 'Array') {
|
1746 |
+
valid = Array.isArray(value);
|
1747 |
+
} else {
|
1748 |
+
valid = value instanceof type;
|
1749 |
+
}
|
1750 |
+
return {
|
1751 |
+
valid: valid,
|
1752 |
+
expectedType: expectedType
|
1753 |
+
}
|
1754 |
+
}
|
1755 |
|
1756 |
+
/**
|
1757 |
+
* Use function string name to check built-in types,
|
1758 |
+
* because a simple equality check will fail when running
|
1759 |
+
* across different vms / iframes.
|
1760 |
+
*/
|
1761 |
+
function getType (fn) {
|
1762 |
+
var match = fn && fn.toString().match(/^\s*function (\w+)/);
|
1763 |
+
return match ? match[1] : ''
|
1764 |
+
}
|
1765 |
|
1766 |
+
function isSameType (a, b) {
|
1767 |
+
return getType(a) === getType(b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1768 |
}
|
1769 |
+
|
1770 |
+
function getTypeIndex (type, expectedTypes) {
|
1771 |
+
if (!Array.isArray(expectedTypes)) {
|
1772 |
+
return isSameType(expectedTypes, type) ? 0 : -1
|
1773 |
+
}
|
1774 |
+
for (var i = 0, len = expectedTypes.length; i < len; i++) {
|
1775 |
+
if (isSameType(expectedTypes[i], type)) {
|
1776 |
+
return i
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1777 |
}
|
|
|
|
|
1778 |
}
|
1779 |
+
return -1
|
1780 |
}
|
1781 |
+
|
1782 |
+
function getInvalidTypeMessage (name, value, expectedTypes) {
|
1783 |
+
var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
|
1784 |
+
" Expected " + (expectedTypes.map(capitalize).join(', '));
|
1785 |
+
var expectedType = expectedTypes[0];
|
1786 |
+
var receivedType = toRawType(value);
|
1787 |
+
var expectedValue = styleValue(value, expectedType);
|
1788 |
+
var receivedValue = styleValue(value, receivedType);
|
1789 |
+
// check if we need to specify expected value
|
1790 |
+
if (expectedTypes.length === 1 &&
|
1791 |
+
isExplicable(expectedType) &&
|
1792 |
+
!isBoolean(expectedType, receivedType)) {
|
1793 |
+
message += " with value " + expectedValue;
|
1794 |
}
|
1795 |
+
message += ", got " + receivedType + " ";
|
1796 |
+
// check if we need to specify received value
|
1797 |
+
if (isExplicable(receivedType)) {
|
1798 |
+
message += "with value " + receivedValue + ".";
|
1799 |
+
}
|
1800 |
+
return message
|
1801 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1802 |
|
1803 |
+
function styleValue (value, type) {
|
1804 |
+
if (type === 'String') {
|
1805 |
+
return ("\"" + value + "\"")
|
1806 |
+
} else if (type === 'Number') {
|
1807 |
+
return ("" + (Number(value)))
|
|
|
|
|
|
|
1808 |
} else {
|
1809 |
+
return ("" + value)
|
1810 |
}
|
1811 |
}
|
|
|
|
|
1812 |
|
1813 |
+
function isExplicable (value) {
|
1814 |
+
var explicitTypes = ['string', 'number', 'boolean'];
|
1815 |
+
return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
|
1816 |
+
}
|
1817 |
+
|
1818 |
+
function isBoolean () {
|
1819 |
+
var args = [], len = arguments.length;
|
1820 |
+
while ( len-- ) args[ len ] = arguments[ len ];
|
1821 |
|
1822 |
+
return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
|
1823 |
+
}
|
1824 |
|
1825 |
+
/* */
|
|
|
1826 |
|
1827 |
+
function handleError (err, vm, info) {
|
1828 |
+
// Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
|
1829 |
+
// See: https://github.com/vuejs/vuex/issues/1505
|
1830 |
+
pushTarget();
|
1831 |
+
try {
|
1832 |
+
if (vm) {
|
1833 |
+
var cur = vm;
|
1834 |
+
while ((cur = cur.$parent)) {
|
1835 |
+
var hooks = cur.$options.errorCaptured;
|
1836 |
+
if (hooks) {
|
1837 |
+
for (var i = 0; i < hooks.length; i++) {
|
1838 |
+
try {
|
1839 |
+
var capture = hooks[i].call(cur, err, vm, info) === false;
|
1840 |
+
if (capture) { return }
|
1841 |
+
} catch (e) {
|
1842 |
+
globalHandleError(e, cur, 'errorCaptured hook');
|
1843 |
+
}
|
1844 |
+
}
|
1845 |
+
}
|
1846 |
+
}
|
1847 |
+
}
|
1848 |
+
globalHandleError(err, vm, info);
|
1849 |
+
} finally {
|
1850 |
+
popTarget();
|
1851 |
}
|
|
|
1852 |
}
|
1853 |
|
1854 |
+
function invokeWithErrorHandling (
|
1855 |
+
handler,
|
1856 |
+
context,
|
1857 |
+
args,
|
1858 |
+
vm,
|
1859 |
+
info
|
1860 |
+
) {
|
1861 |
+
var res;
|
1862 |
+
try {
|
1863 |
+
res = args ? handler.apply(context, args) : handler.call(context);
|
1864 |
+
if (res && !res._isVue && isPromise(res) && !res._handled) {
|
1865 |
+
res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
|
1866 |
+
// issue #9511
|
1867 |
+
// avoid catch triggering multiple times when nested calls
|
1868 |
+
res._handled = true;
|
1869 |
+
}
|
1870 |
+
} catch (e) {
|
1871 |
+
handleError(e, vm, info);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1872 |
}
|
1873 |
+
return res
|
1874 |
+
}
|
1875 |
|
1876 |
+
function globalHandleError (err, vm, info) {
|
1877 |
+
if (config.errorHandler) {
|
1878 |
+
try {
|
1879 |
+
return config.errorHandler.call(null, err, vm, info)
|
1880 |
+
} catch (e) {
|
1881 |
+
// if the user intentionally throws the original error in the handler,
|
1882 |
+
// do not log it twice
|
1883 |
+
if (e !== err) {
|
1884 |
+
logError(e, null, 'config.errorHandler');
|
1885 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1886 |
}
|
1887 |
}
|
1888 |
+
logError(err, vm, info);
|
1889 |
}
|
|
|
1890 |
|
1891 |
+
function logError (err, vm, info) {
|
1892 |
+
{
|
1893 |
+
warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
|
1894 |
+
}
|
1895 |
+
/* istanbul ignore else */
|
1896 |
+
if ((inBrowser || inWeex) && typeof console !== 'undefined') {
|
1897 |
+
console.error(err);
|
1898 |
+
} else {
|
1899 |
+
throw err
|
1900 |
+
}
|
1901 |
+
}
|
1902 |
+
|
1903 |
+
/* */
|
1904 |
+
|
1905 |
+
var isUsingMicroTask = false;
|
1906 |
+
|
1907 |
+
var callbacks = [];
|
1908 |
+
var pending = false;
|
1909 |
+
|
1910 |
+
function flushCallbacks () {
|
1911 |
+
pending = false;
|
1912 |
+
var copies = callbacks.slice(0);
|
1913 |
+
callbacks.length = 0;
|
1914 |
+
for (var i = 0; i < copies.length; i++) {
|
1915 |
+
copies[i]();
|
1916 |
+
}
|
1917 |
+
}
|
1918 |
+
|
1919 |
+
// Here we have async deferring wrappers using microtasks.
|
1920 |
+
// In 2.5 we used (macro) tasks (in combination with microtasks).
|
1921 |
+
// However, it has subtle problems when state is changed right before repaint
|
1922 |
+
// (e.g. #6813, out-in transitions).
|
1923 |
+
// Also, using (macro) tasks in event handler would cause some weird behaviors
|
1924 |
+
// that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
|
1925 |
+
// So we now use microtasks everywhere, again.
|
1926 |
+
// A major drawback of this tradeoff is that there are some scenarios
|
1927 |
+
// where microtasks have too high a priority and fire in between supposedly
|
1928 |
+
// sequential events (e.g. #4521, #6690, which have workarounds)
|
1929 |
+
// or even between bubbling of the same event (#6566).
|
1930 |
+
var timerFunc;
|
1931 |
+
|
1932 |
+
// The nextTick behavior leverages the microtask queue, which can be accessed
|
1933 |
+
// via either native Promise.then or MutationObserver.
|
1934 |
+
// MutationObserver has wider support, however it is seriously bugged in
|
1935 |
+
// UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
|
1936 |
+
// completely stops working after triggering a few times... so, if native
|
1937 |
+
// Promise is available, we will use it:
|
1938 |
+
/* istanbul ignore next, $flow-disable-line */
|
1939 |
+
if (typeof Promise !== 'undefined' && isNative(Promise)) {
|
1940 |
+
var p = Promise.resolve();
|
1941 |
+
timerFunc = function () {
|
1942 |
+
p.then(flushCallbacks);
|
1943 |
+
// In problematic UIWebViews, Promise.then doesn't completely break, but
|
1944 |
+
// it can get stuck in a weird state where callbacks are pushed into the
|
1945 |
+
// microtask queue but the queue isn't being flushed, until the browser
|
1946 |
+
// needs to do some other work, e.g. handle a timer. Therefore we can
|
1947 |
+
// "force" the microtask queue to be flushed by adding an empty timer.
|
1948 |
+
if (isIOS) { setTimeout(noop); }
|
1949 |
+
};
|
1950 |
+
isUsingMicroTask = true;
|
1951 |
+
} else if (!isIE && typeof MutationObserver !== 'undefined' && (
|
1952 |
+
isNative(MutationObserver) ||
|
1953 |
+
// PhantomJS and iOS 7.x
|
1954 |
+
MutationObserver.toString() === '[object MutationObserverConstructor]'
|
1955 |
+
)) {
|
1956 |
+
// Use MutationObserver where native Promise is not available,
|
1957 |
+
// e.g. PhantomJS, iOS7, Android 4.4
|
1958 |
+
// (#6466 MutationObserver is unreliable in IE11)
|
1959 |
+
var counter = 1;
|
1960 |
+
var observer = new MutationObserver(flushCallbacks);
|
1961 |
+
var textNode = document.createTextNode(String(counter));
|
1962 |
+
observer.observe(textNode, {
|
1963 |
+
characterData: true
|
1964 |
+
});
|
1965 |
+
timerFunc = function () {
|
1966 |
+
counter = (counter + 1) % 2;
|
1967 |
+
textNode.data = String(counter);
|
1968 |
+
};
|
1969 |
+
isUsingMicroTask = true;
|
1970 |
+
} else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
|
1971 |
+
// Fallback to setImmediate.
|
1972 |
+
// Technically it leverages the (macro) task queue,
|
1973 |
+
// but it is still a better choice than setTimeout.
|
1974 |
+
timerFunc = function () {
|
1975 |
+
setImmediate(flushCallbacks);
|
1976 |
};
|
1977 |
} else {
|
1978 |
+
// Fallback to setTimeout.
|
1979 |
+
timerFunc = function () {
|
1980 |
+
setTimeout(flushCallbacks, 0);
|
1981 |
};
|
1982 |
}
|
1983 |
|
1984 |
+
function nextTick (cb, ctx) {
|
1985 |
+
var _resolve;
|
1986 |
+
callbacks.push(function () {
|
1987 |
+
if (cb) {
|
1988 |
+
try {
|
1989 |
+
cb.call(ctx);
|
1990 |
+
} catch (e) {
|
1991 |
+
handleError(e, ctx, 'nextTick');
|
1992 |
+
}
|
1993 |
+
} else if (_resolve) {
|
1994 |
+
_resolve(ctx);
|
1995 |
+
}
|
1996 |
+
});
|
1997 |
+
if (!pending) {
|
1998 |
+
pending = true;
|
1999 |
+
timerFunc();
|
2000 |
+
}
|
2001 |
+
// $flow-disable-line
|
2002 |
+
if (!cb && typeof Promise !== 'undefined') {
|
2003 |
+
return new Promise(function (resolve) {
|
2004 |
+
_resolve = resolve;
|
2005 |
+
})
|
2006 |
+
}
|
|
|
2007 |
}
|
2008 |
|
2009 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010 |
|
2011 |
+
var mark;
|
2012 |
+
var measure;
|
|
|
|
|
|
|
2013 |
|
2014 |
+
{
|
2015 |
+
var perf = inBrowser && window.performance;
|
2016 |
+
/* istanbul ignore if */
|
2017 |
+
if (
|
2018 |
+
perf &&
|
2019 |
+
perf.mark &&
|
2020 |
+
perf.measure &&
|
2021 |
+
perf.clearMarks &&
|
2022 |
+
perf.clearMeasures
|
2023 |
+
) {
|
2024 |
+
mark = function (tag) { return perf.mark(tag); };
|
2025 |
+
measure = function (name, startTag, endTag) {
|
2026 |
+
perf.measure(name, startTag, endTag);
|
2027 |
+
perf.clearMarks(startTag);
|
2028 |
+
perf.clearMarks(endTag);
|
2029 |
+
// perf.clearMeasures(name)
|
2030 |
+
};
|
2031 |
}
|
|
|
|
|
|
|
2032 |
}
|
2033 |
|
2034 |
+
/* not type checking this file because flow doesn't play well with Proxy */
|
|
|
|
|
|
|
|
|
2035 |
|
2036 |
+
var initProxy;
|
|
|
|
|
|
|
|
|
2037 |
|
2038 |
{
|
2039 |
+
var allowedGlobals = makeMap(
|
2040 |
+
'Infinity,undefined,NaN,isFinite,isNaN,' +
|
2041 |
+
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
|
2042 |
+
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
|
2043 |
+
'require' // for Webpack/Browserify
|
2044 |
+
);
|
2045 |
|
2046 |
+
var warnNonPresent = function (target, key) {
|
2047 |
+
warn(
|
2048 |
+
"Property or method \"" + key + "\" is not defined on the instance but " +
|
2049 |
+
'referenced during render. Make sure that this property is reactive, ' +
|
2050 |
+
'either in the data option, or for class-based components, by ' +
|
2051 |
+
'initializing the property. ' +
|
2052 |
+
'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
|
2053 |
+
target
|
2054 |
+
);
|
2055 |
+
};
|
2056 |
|
2057 |
+
var warnReservedPrefix = function (target, key) {
|
2058 |
+
warn(
|
2059 |
+
"Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
|
2060 |
+
'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
|
2061 |
+
'prevent conflicts with Vue internals. ' +
|
2062 |
+
'See: https://vuejs.org/v2/api/#data',
|
2063 |
+
target
|
2064 |
+
);
|
2065 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2066 |
|
2067 |
+
var hasProxy =
|
2068 |
+
typeof Proxy !== 'undefined' && isNative(Proxy);
|
2069 |
+
|
2070 |
+
if (hasProxy) {
|
2071 |
+
var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
|
2072 |
+
config.keyCodes = new Proxy(config.keyCodes, {
|
2073 |
+
set: function set (target, key, value) {
|
2074 |
+
if (isBuiltInModifier(key)) {
|
2075 |
+
warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
|
2076 |
+
return false
|
2077 |
+
} else {
|
2078 |
+
target[key] = value;
|
2079 |
+
return true
|
2080 |
+
}
|
2081 |
+
}
|
2082 |
+
});
|
2083 |
}
|
|
|
|
|
|
|
2084 |
|
2085 |
+
var hasHandler = {
|
2086 |
+
has: function has (target, key) {
|
2087 |
+
var has = key in target;
|
2088 |
+
var isAllowed = allowedGlobals(key) ||
|
2089 |
+
(typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
|
2090 |
+
if (!has && !isAllowed) {
|
2091 |
+
if (key in target.$data) { warnReservedPrefix(target, key); }
|
2092 |
+
else { warnNonPresent(target, key); }
|
2093 |
+
}
|
2094 |
+
return has || !isAllowed
|
2095 |
}
|
2096 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2097 |
|
2098 |
+
var getHandler = {
|
2099 |
+
get: function get (target, key) {
|
2100 |
+
if (typeof key === 'string' && !(key in target)) {
|
2101 |
+
if (key in target.$data) { warnReservedPrefix(target, key); }
|
2102 |
+
else { warnNonPresent(target, key); }
|
2103 |
+
}
|
2104 |
+
return target[key]
|
2105 |
+
}
|
2106 |
+
};
|
2107 |
|
2108 |
+
initProxy = function initProxy (vm) {
|
2109 |
+
if (hasProxy) {
|
2110 |
+
// determine which proxy handler to use
|
2111 |
+
var options = vm.$options;
|
2112 |
+
var handlers = options.render && options.render._withStripped
|
2113 |
+
? getHandler
|
2114 |
+
: hasHandler;
|
2115 |
+
vm._renderProxy = new Proxy(vm, handlers);
|
2116 |
+
} else {
|
2117 |
+
vm._renderProxy = vm;
|
2118 |
+
}
|
2119 |
+
};
|
2120 |
+
}
|
2121 |
|
2122 |
+
/* */
|
2123 |
|
2124 |
+
var seenObjects = new _Set();
|
|
|
|
|
|
|
|
|
|
|
|
|
2125 |
|
2126 |
+
/**
|
2127 |
+
* Recursively traverse an object to evoke all converted
|
2128 |
+
* getters, so that every nested property inside the object
|
2129 |
+
* is collected as a "deep" dependency.
|
2130 |
+
*/
|
2131 |
+
function traverse (val) {
|
2132 |
+
_traverse(val, seenObjects);
|
2133 |
+
seenObjects.clear();
|
2134 |
}
|
|
|
|
|
2135 |
|
2136 |
+
function _traverse (val, seen) {
|
2137 |
+
var i, keys;
|
2138 |
+
var isA = Array.isArray(val);
|
2139 |
+
if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
|
2140 |
+
return
|
2141 |
+
}
|
2142 |
+
if (val.__ob__) {
|
2143 |
+
var depId = val.__ob__.dep.id;
|
2144 |
+
if (seen.has(depId)) {
|
2145 |
+
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2146 |
}
|
2147 |
+
seen.add(depId);
|
2148 |
+
}
|
2149 |
+
if (isA) {
|
2150 |
+
i = val.length;
|
2151 |
+
while (i--) { _traverse(val[i], seen); }
|
2152 |
+
} else {
|
2153 |
+
keys = Object.keys(val);
|
2154 |
+
i = keys.length;
|
2155 |
+
while (i--) { _traverse(val[keys[i]], seen); }
|
2156 |
}
|
2157 |
}
|
2158 |
|
2159 |
+
/* */
|
|
|
|
|
|
|
|
|
2160 |
|
2161 |
+
var normalizeEvent = cached(function (name) {
|
2162 |
+
var passive = name.charAt(0) === '&';
|
2163 |
+
name = passive ? name.slice(1) : name;
|
2164 |
+
var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
|
2165 |
+
name = once$$1 ? name.slice(1) : name;
|
2166 |
+
var capture = name.charAt(0) === '!';
|
2167 |
+
name = capture ? name.slice(1) : name;
|
2168 |
+
return {
|
2169 |
+
name: name,
|
2170 |
+
once: once$$1,
|
2171 |
+
capture: capture,
|
2172 |
+
passive: passive
|
2173 |
+
}
|
2174 |
+
});
|
2175 |
|
2176 |
+
function createFnInvoker (fns, vm) {
|
2177 |
+
function invoker () {
|
2178 |
+
var arguments$1 = arguments;
|
|
|
|
|
|
|
2179 |
|
2180 |
+
var fns = invoker.fns;
|
2181 |
+
if (Array.isArray(fns)) {
|
2182 |
+
var cloned = fns.slice();
|
2183 |
+
for (var i = 0; i < cloned.length; i++) {
|
2184 |
+
invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
|
2185 |
+
}
|
2186 |
+
} else {
|
2187 |
+
// return handler return value for single handlers
|
2188 |
+
return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
|
2189 |
+
}
|
2190 |
}
|
2191 |
+
invoker.fns = fns;
|
2192 |
+
return invoker
|
2193 |
}
|
|
|
2194 |
|
2195 |
+
function updateListeners (
|
2196 |
+
on,
|
2197 |
+
oldOn,
|
2198 |
+
add,
|
2199 |
+
remove$$1,
|
2200 |
+
createOnceHandler,
|
2201 |
+
vm
|
2202 |
+
) {
|
2203 |
+
var name, def$$1, cur, old, event;
|
2204 |
+
for (name in on) {
|
2205 |
+
def$$1 = cur = on[name];
|
2206 |
+
old = oldOn[name];
|
2207 |
+
event = normalizeEvent(name);
|
2208 |
+
if (isUndef(cur)) {
|
2209 |
+
warn(
|
2210 |
+
"Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
|
2211 |
+
vm
|
2212 |
+
);
|
2213 |
+
} else if (isUndef(old)) {
|
2214 |
+
if (isUndef(cur.fns)) {
|
2215 |
+
cur = on[name] = createFnInvoker(cur, vm);
|
2216 |
+
}
|
2217 |
+
if (isTrue(event.once)) {
|
2218 |
+
cur = on[name] = createOnceHandler(event.name, cur, event.capture);
|
2219 |
+
}
|
2220 |
+
add(event.name, cur, event.capture, event.passive, event.params);
|
2221 |
+
} else if (cur !== old) {
|
2222 |
+
old.fns = cur;
|
2223 |
+
on[name] = old;
|
|
|
|
|
|
|
|
|
|
|
|
|
2224 |
}
|
|
|
2225 |
}
|
2226 |
+
for (name in oldOn) {
|
2227 |
+
if (isUndef(on[name])) {
|
2228 |
+
event = normalizeEvent(name);
|
2229 |
+
remove$$1(event.name, oldOn[name], event.capture);
|
2230 |
+
}
|
2231 |
}
|
2232 |
}
|
|
|
2233 |
|
2234 |
+
/* */
|
2235 |
|
2236 |
+
function mergeVNodeHook (def, hookKey, hook) {
|
2237 |
+
if (def instanceof VNode) {
|
2238 |
+
def = def.data.hook || (def.data.hook = {});
|
2239 |
+
}
|
2240 |
+
var invoker;
|
2241 |
+
var oldHook = def[hookKey];
|
2242 |
|
2243 |
+
function wrappedHook () {
|
2244 |
+
hook.apply(this, arguments);
|
2245 |
+
// important: remove merged hook to ensure it's called only once
|
2246 |
+
// and prevent memory leak
|
2247 |
+
remove(invoker.fns, wrappedHook);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2248 |
}
|
|
|
|
|
|
|
|
|
|
|
2249 |
|
2250 |
+
if (isUndef(oldHook)) {
|
2251 |
+
// no existing hook
|
2252 |
+
invoker = createFnInvoker([wrappedHook]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2253 |
} else {
|
2254 |
+
/* istanbul ignore if */
|
2255 |
+
if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
|
2256 |
+
// already a merged invoker
|
2257 |
+
invoker = oldHook;
|
2258 |
+
invoker.fns.push(wrappedHook);
|
2259 |
+
} else {
|
2260 |
+
// existing plain hook
|
2261 |
+
invoker = createFnInvoker([oldHook, wrappedHook]);
|
2262 |
+
}
|
2263 |
}
|
|
|
|
|
|
|
|
|
|
|
2264 |
|
2265 |
+
invoker.merged = true;
|
2266 |
+
def[hookKey] = invoker;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2267 |
}
|
|
|
2268 |
|
2269 |
+
/* */
|
|
|
|
|
|
|
|
|
2270 |
|
2271 |
+
function extractPropsFromVNodeData (
|
2272 |
+
data,
|
2273 |
+
Ctor,
|
2274 |
+
tag
|
2275 |
+
) {
|
2276 |
+
// we are only extracting raw values here.
|
2277 |
+
// validation and default values are handled in the child
|
2278 |
+
// component itself.
|
2279 |
+
var propOptions = Ctor.options.props;
|
2280 |
+
if (isUndef(propOptions)) {
|
2281 |
+
return
|
2282 |
+
}
|
2283 |
+
var res = {};
|
2284 |
+
var attrs = data.attrs;
|
2285 |
+
var props = data.props;
|
2286 |
+
if (isDef(attrs) || isDef(props)) {
|
2287 |
+
for (var key in propOptions) {
|
2288 |
+
var altKey = hyphenate(key);
|
2289 |
+
{
|
2290 |
+
var keyInLowerCase = key.toLowerCase();
|
2291 |
+
if (
|
2292 |
+
key !== keyInLowerCase &&
|
2293 |
+
attrs && hasOwn(attrs, keyInLowerCase)
|
2294 |
+
) {
|
2295 |
+
tip(
|
2296 |
+
"Prop \"" + keyInLowerCase + "\" is passed to component " +
|
2297 |
+
(formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
|
2298 |
+
" \"" + key + "\". " +
|
2299 |
+
"Note that HTML attributes are case-insensitive and camelCased " +
|
2300 |
+
"props need to use their kebab-case equivalents when using in-DOM " +
|
2301 |
+
"templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
|
2302 |
+
);
|
2303 |
+
}
|
2304 |
+
}
|
2305 |
+
checkProp(res, props, key, altKey, true) ||
|
2306 |
+
checkProp(res, attrs, key, altKey, false);
|
2307 |
+
}
|
2308 |
+
}
|
2309 |
+
return res
|
2310 |
}
|
|
|
2311 |
|
2312 |
+
function checkProp (
|
2313 |
+
res,
|
2314 |
+
hash,
|
2315 |
+
key,
|
2316 |
+
altKey,
|
2317 |
+
preserve
|
2318 |
+
) {
|
2319 |
+
if (isDef(hash)) {
|
2320 |
+
if (hasOwn(hash, key)) {
|
2321 |
+
res[key] = hash[key];
|
2322 |
+
if (!preserve) {
|
2323 |
+
delete hash[key];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2324 |
}
|
2325 |
+
return true
|
2326 |
+
} else if (hasOwn(hash, altKey)) {
|
2327 |
+
res[key] = hash[altKey];
|
2328 |
+
if (!preserve) {
|
2329 |
+
delete hash[altKey];
|
2330 |
+
}
|
2331 |
+
return true
|
2332 |
}
|
2333 |
}
|
2334 |
+
return false
|
2335 |
}
|
|
|
2336 |
|
2337 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2338 |
|
2339 |
+
// The template compiler attempts to minimize the need for normalization by
|
2340 |
+
// statically analyzing the template at compile time.
|
2341 |
+
//
|
2342 |
+
// For plain HTML markup, normalization can be completely skipped because the
|
2343 |
+
// generated render function is guaranteed to return Array<VNode>. There are
|
2344 |
+
// two cases where extra normalization is needed:
|
2345 |
|
2346 |
+
// 1. When the children contains components - because a functional component
|
2347 |
+
// may return an Array instead of a single root. In this case, just a simple
|
2348 |
+
// normalization is needed - if any child is an Array, we flatten the whole
|
2349 |
+
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
|
2350 |
+
// because functional components already normalize their own children.
|
2351 |
+
function simpleNormalizeChildren (children) {
|
2352 |
+
for (var i = 0; i < children.length; i++) {
|
2353 |
+
if (Array.isArray(children[i])) {
|
2354 |
+
return Array.prototype.concat.apply([], children)
|
2355 |
+
}
|
2356 |
+
}
|
2357 |
+
return children
|
2358 |
}
|
|
|
2359 |
|
2360 |
+
// 2. When the children contains constructs that always generated nested Arrays,
|
2361 |
+
// e.g. <template>, <slot>, v-for, or when the children is provided by user
|
2362 |
+
// with hand-written render functions / JSX. In such cases a full normalization
|
2363 |
+
// is needed to cater to all possible types of children values.
|
2364 |
+
function normalizeChildren (children) {
|
2365 |
+
return isPrimitive(children)
|
2366 |
+
? [createTextVNode(children)]
|
2367 |
+
: Array.isArray(children)
|
2368 |
+
? normalizeArrayChildren(children)
|
2369 |
+
: undefined
|
2370 |
+
}
|
2371 |
|
2372 |
+
function isTextNode (node) {
|
2373 |
+
return isDef(node) && isDef(node.text) && isFalse(node.isComment)
|
2374 |
+
}
|
2375 |
+
|
2376 |
+
function normalizeArrayChildren (children, nestedIndex) {
|
2377 |
+
var res = [];
|
2378 |
+
var i, c, lastIndex, last;
|
2379 |
+
for (i = 0; i < children.length; i++) {
|
2380 |
+
c = children[i];
|
2381 |
+
if (isUndef(c) || typeof c === 'boolean') { continue }
|
2382 |
+
lastIndex = res.length - 1;
|
2383 |
+
last = res[lastIndex];
|
2384 |
+
// nested
|
2385 |
+
if (Array.isArray(c)) {
|
2386 |
+
if (c.length > 0) {
|
2387 |
+
c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
|
2388 |
+
// merge adjacent text nodes
|
2389 |
+
if (isTextNode(c[0]) && isTextNode(last)) {
|
2390 |
+
res[lastIndex] = createTextVNode(last.text + (c[0]).text);
|
2391 |
+
c.shift();
|
2392 |
+
}
|
2393 |
+
res.push.apply(res, c);
|
2394 |
+
}
|
2395 |
+
} else if (isPrimitive(c)) {
|
2396 |
+
if (isTextNode(last)) {
|
2397 |
+
// merge adjacent text nodes
|
2398 |
+
// this is necessary for SSR hydration because text nodes are
|
2399 |
+
// essentially merged when rendered to HTML strings
|
2400 |
+
res[lastIndex] = createTextVNode(last.text + c);
|
2401 |
+
} else if (c !== '') {
|
2402 |
+
// convert primitive to vnode
|
2403 |
+
res.push(createTextVNode(c));
|
2404 |
+
}
|
2405 |
+
} else {
|
2406 |
+
if (isTextNode(c) && isTextNode(last)) {
|
2407 |
+
// merge adjacent text nodes
|
2408 |
+
res[lastIndex] = createTextVNode(last.text + c.text);
|
2409 |
+
} else {
|
2410 |
+
// default key for nested array children (likely generated by v-for)
|
2411 |
+
if (isTrue(children._isVList) &&
|
2412 |
+
isDef(c.tag) &&
|
2413 |
+
isUndef(c.key) &&
|
2414 |
+
isDef(nestedIndex)) {
|
2415 |
+
c.key = "__vlist" + nestedIndex + "_" + i + "__";
|
2416 |
+
}
|
2417 |
+
res.push(c);
|
2418 |
+
}
|
2419 |
+
}
|
2420 |
}
|
2421 |
+
return res
|
2422 |
}
|
|
|
2423 |
|
2424 |
+
/* */
|
2425 |
|
2426 |
+
function initProvide (vm) {
|
2427 |
+
var provide = vm.$options.provide;
|
2428 |
+
if (provide) {
|
2429 |
+
vm._provided = typeof provide === 'function'
|
2430 |
+
? provide.call(vm)
|
2431 |
+
: provide;
|
2432 |
+
}
|
2433 |
+
}
|
2434 |
|
2435 |
+
function initInjections (vm) {
|
2436 |
+
var result = resolveInject(vm.$options.inject, vm);
|
2437 |
+
if (result) {
|
2438 |
+
toggleObserving(false);
|
2439 |
+
Object.keys(result).forEach(function (key) {
|
2440 |
+
/* istanbul ignore else */
|
2441 |
+
{
|
2442 |
+
defineReactive$$1(vm, key, result[key], function () {
|
2443 |
+
warn(
|
2444 |
+
"Avoid mutating an injected value directly since the changes will be " +
|
2445 |
+
"overwritten whenever the provided component re-renders. " +
|
2446 |
+
"injection being mutated: \"" + key + "\"",
|
2447 |
+
vm
|
2448 |
+
);
|
2449 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2450 |
}
|
2451 |
});
|
2452 |
+
toggleObserving(true);
|
2453 |
+
}
|
2454 |
+
}
|
2455 |
+
|
2456 |
+
function resolveInject (inject, vm) {
|
2457 |
+
if (inject) {
|
2458 |
+
// inject is :any because flow is not smart enough to figure out cached
|
2459 |
+
var result = Object.create(null);
|
2460 |
+
var keys = hasSymbol
|
2461 |
+
? Reflect.ownKeys(inject)
|
2462 |
+
: Object.keys(inject);
|
2463 |
+
|
2464 |
+
for (var i = 0; i < keys.length; i++) {
|
2465 |
+
var key = keys[i];
|
2466 |
+
// #6574 in case the inject object is observed...
|
2467 |
+
if (key === '__ob__') { continue }
|
2468 |
+
var provideKey = inject[key].from;
|
2469 |
+
var source = vm;
|
2470 |
+
while (source) {
|
2471 |
+
if (source._provided && hasOwn(source._provided, provideKey)) {
|
2472 |
+
result[key] = source._provided[provideKey];
|
2473 |
+
break
|
2474 |
+
}
|
2475 |
+
source = source.$parent;
|
2476 |
+
}
|
2477 |
+
if (!source) {
|
2478 |
+
if ('default' in inject[key]) {
|
2479 |
+
var provideDefault = inject[key].default;
|
2480 |
+
result[key] = typeof provideDefault === 'function'
|
2481 |
+
? provideDefault.call(vm)
|
2482 |
+
: provideDefault;
|
2483 |
+
} else {
|
2484 |
+
warn(("Injection \"" + key + "\" not found"), vm);
|
2485 |
+
}
|
2486 |
+
}
|
|
|
|
|
|
|
|
|
2487 |
}
|
2488 |
+
return result
|
2489 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2490 |
}
|
|
|
2491 |
|
2492 |
+
/* */
|
2493 |
|
|
|
|
|
|
|
|
|
|
|
2494 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2495 |
|
2496 |
+
/**
|
2497 |
+
* Runtime helper for resolving raw children VNodes into a slot object.
|
2498 |
+
*/
|
2499 |
+
function resolveSlots (
|
2500 |
+
children,
|
2501 |
+
context
|
2502 |
+
) {
|
2503 |
+
if (!children || !children.length) {
|
2504 |
+
return {}
|
2505 |
+
}
|
2506 |
+
var slots = {};
|
2507 |
+
for (var i = 0, l = children.length; i < l; i++) {
|
2508 |
+
var child = children[i];
|
2509 |
+
var data = child.data;
|
2510 |
+
// remove slot attribute if the node is resolved as a Vue slot node
|
2511 |
+
if (data && data.attrs && data.attrs.slot) {
|
2512 |
+
delete data.attrs.slot;
|
2513 |
+
}
|
2514 |
+
// named slots should only be respected if the vnode was rendered in the
|
2515 |
+
// same context.
|
2516 |
+
if ((child.context === context || child.fnContext === context) &&
|
2517 |
+
data && data.slot != null
|
2518 |
+
) {
|
2519 |
+
var name = data.slot;
|
2520 |
+
var slot = (slots[name] || (slots[name] = []));
|
2521 |
+
if (child.tag === 'template') {
|
2522 |
+
slot.push.apply(slot, child.children || []);
|
2523 |
+
} else {
|
2524 |
+
slot.push(child);
|
2525 |
+
}
|
2526 |
+
} else {
|
2527 |
+
(slots.default || (slots.default = [])).push(child);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2528 |
}
|
|
|
2529 |
}
|
2530 |
+
// ignore slots that contains only whitespace
|
2531 |
+
for (var name$1 in slots) {
|
2532 |
+
if (slots[name$1].every(isWhitespace)) {
|
2533 |
+
delete slots[name$1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2534 |
}
|
2535 |
}
|
2536 |
+
return slots
|
2537 |
}
|
|
|
2538 |
|
2539 |
+
function isWhitespace (node) {
|
2540 |
+
return (node.isComment && !node.asyncFactory) || node.text === ' '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2541 |
}
|
|
|
|
|
2542 |
|
2543 |
+
/* */
|
|
|
2544 |
|
2545 |
+
function normalizeScopedSlots (
|
2546 |
+
slots,
|
2547 |
+
normalSlots,
|
2548 |
+
prevSlots
|
2549 |
) {
|
2550 |
+
var res;
|
2551 |
+
var hasNormalSlots = Object.keys(normalSlots).length > 0;
|
2552 |
+
var isStable = slots ? !!slots.$stable : !hasNormalSlots;
|
2553 |
+
var key = slots && slots.$key;
|
2554 |
+
if (!slots) {
|
2555 |
+
res = {};
|
2556 |
+
} else if (slots._normalized) {
|
2557 |
+
// fast path 1: child component re-render only, parent did not change
|
2558 |
+
return slots._normalized
|
2559 |
+
} else if (
|
2560 |
+
isStable &&
|
2561 |
+
prevSlots &&
|
2562 |
+
prevSlots !== emptyObject &&
|
2563 |
+
key === prevSlots.$key &&
|
2564 |
+
!hasNormalSlots &&
|
2565 |
+
!prevSlots.$hasNormal
|
2566 |
+
) {
|
2567 |
+
// fast path 2: stable scoped slots w/ no normal slots to proxy,
|
2568 |
+
// only need to normalize once
|
2569 |
+
return prevSlots
|
2570 |
+
} else {
|
2571 |
+
res = {};
|
2572 |
+
for (var key$1 in slots) {
|
2573 |
+
if (slots[key$1] && key$1[0] !== '$') {
|
2574 |
+
res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
|
2575 |
+
}
|
2576 |
+
}
|
2577 |
}
|
2578 |
+
// expose normal slots on scopedSlots
|
2579 |
+
for (var key$2 in normalSlots) {
|
2580 |
+
if (!(key$2 in res)) {
|
2581 |
+
res[key$2] = proxyNormalSlot(normalSlots, key$2);
|
2582 |
+
}
|
2583 |
}
|
2584 |
+
// avoriaz seems to mock a non-extensible $scopedSlots object
|
2585 |
+
// and when that is passed down this would cause an error
|
2586 |
+
if (slots && Object.isExtensible(slots)) {
|
2587 |
+
(slots)._normalized = res;
|
2588 |
}
|
2589 |
+
def(res, '$stable', isStable);
|
2590 |
+
def(res, '$key', key);
|
2591 |
+
def(res, '$hasNormal', hasNormalSlots);
|
2592 |
+
return res
|
2593 |
+
}
|
2594 |
|
2595 |
+
function normalizeScopedSlot(normalSlots, key, fn) {
|
2596 |
+
var normalized = function () {
|
2597 |
+
var res = arguments.length ? fn.apply(null, arguments) : fn({});
|
2598 |
+
res = res && typeof res === 'object' && !Array.isArray(res)
|
2599 |
+
? [res] // single vnode
|
2600 |
+
: normalizeChildren(res);
|
2601 |
+
return res && (
|
2602 |
+
res.length === 0 ||
|
2603 |
+
(res.length === 1 && res[0].isComment) // #9658
|
2604 |
+
) ? undefined
|
2605 |
+
: res
|
2606 |
+
};
|
2607 |
+
// this is a slot using the new v-slot syntax without scope. although it is
|
2608 |
+
// compiled as a scoped slot, render fn users would expect it to be present
|
2609 |
+
// on this.$slots because the usage is semantically a normal slot.
|
2610 |
+
if (fn.proxy) {
|
2611 |
+
Object.defineProperty(normalSlots, key, {
|
2612 |
+
get: normalized,
|
2613 |
+
enumerable: true,
|
2614 |
+
configurable: true
|
2615 |
+
});
|
2616 |
+
}
|
2617 |
+
return normalized
|
2618 |
}
|
|
|
2619 |
|
2620 |
+
function proxyNormalSlot(slots, key) {
|
2621 |
+
return function () { return slots[key]; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2622 |
}
|
|
|
2623 |
|
2624 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2625 |
|
2626 |
+
/**
|
2627 |
+
* Runtime helper for rendering v-for lists.
|
2628 |
+
*/
|
2629 |
+
function renderList (
|
2630 |
+
val,
|
2631 |
+
render
|
2632 |
+
) {
|
2633 |
+
var ret, i, l, keys, key;
|
2634 |
+
if (Array.isArray(val) || typeof val === 'string') {
|
2635 |
+
ret = new Array(val.length);
|
2636 |
+
for (i = 0, l = val.length; i < l; i++) {
|
2637 |
+
ret[i] = render(val[i], i);
|
2638 |
+
}
|
2639 |
+
} else if (typeof val === 'number') {
|
2640 |
+
ret = new Array(val);
|
2641 |
+
for (i = 0; i < val; i++) {
|
2642 |
+
ret[i] = render(i + 1, i);
|
2643 |
+
}
|
2644 |
+
} else if (isObject(val)) {
|
2645 |
+
if (hasSymbol && val[Symbol.iterator]) {
|
2646 |
+
ret = [];
|
2647 |
+
var iterator = val[Symbol.iterator]();
|
2648 |
+
var result = iterator.next();
|
2649 |
+
while (!result.done) {
|
2650 |
+
ret.push(render(result.value, ret.length));
|
2651 |
+
result = iterator.next();
|
2652 |
}
|
2653 |
+
} else {
|
2654 |
+
keys = Object.keys(val);
|
2655 |
+
ret = new Array(keys.length);
|
2656 |
+
for (i = 0, l = keys.length; i < l; i++) {
|
2657 |
+
key = keys[i];
|
2658 |
+
ret[i] = render(val[key], key, i);
|
|
|
|
|
|
|
|
|
2659 |
}
|
2660 |
}
|
2661 |
}
|
2662 |
+
if (!isDef(ret)) {
|
2663 |
+
ret = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2664 |
}
|
|
|
|
|
2665 |
(ret)._isVList = true;
|
2666 |
+
return ret
|
2667 |
}
|
|
|
|
|
2668 |
|
2669 |
+
/* */
|
2670 |
|
2671 |
+
/**
|
2672 |
+
* Runtime helper for rendering <slot>
|
2673 |
+
*/
|
2674 |
+
function renderSlot (
|
2675 |
+
name,
|
2676 |
+
fallback,
|
2677 |
+
props,
|
2678 |
+
bindObject
|
2679 |
+
) {
|
2680 |
+
var scopedSlotFn = this.$scopedSlots[name];
|
2681 |
+
var nodes;
|
2682 |
+
if (scopedSlotFn) { // scoped slot
|
2683 |
+
props = props || {};
|
2684 |
+
if (bindObject) {
|
2685 |
+
if (!isObject(bindObject)) {
|
2686 |
+
warn(
|
2687 |
+
'slot v-bind without argument expects an Object',
|
2688 |
+
this
|
2689 |
+
);
|
2690 |
+
}
|
2691 |
+
props = extend(extend({}, bindObject), props);
|
2692 |
}
|
2693 |
+
nodes = scopedSlotFn(props) || fallback;
|
2694 |
+
} else {
|
2695 |
+
nodes = this.$slots[name] || fallback;
|
2696 |
}
|
2697 |
+
|
2698 |
+
var target = props && props.slot;
|
2699 |
+
if (target) {
|
2700 |
+
return this.$createElement('template', { slot: target }, nodes)
|
2701 |
+
} else {
|
2702 |
+
return nodes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2703 |
}
|
|
|
2704 |
}
|
2705 |
|
2706 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
2707 |
|
2708 |
+
/**
|
2709 |
+
* Runtime helper for resolving filters
|
2710 |
+
*/
|
2711 |
+
function resolveFilter (id) {
|
2712 |
+
return resolveAsset(this.$options, 'filters', id, true) || identity
|
2713 |
+
}
|
2714 |
|
2715 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
2716 |
|
2717 |
+
function isKeyNotMatch (expect, actual) {
|
2718 |
+
if (Array.isArray(expect)) {
|
2719 |
+
return expect.indexOf(actual) === -1
|
2720 |
+
} else {
|
2721 |
+
return expect !== actual
|
2722 |
+
}
|
2723 |
+
}
|
2724 |
|
2725 |
+
/**
|
2726 |
+
* Runtime helper for checking keyCodes from config.
|
2727 |
+
* exposed as Vue.prototype._k
|
2728 |
+
* passing in eventKeyName as last argument separately for backwards compat
|
2729 |
+
*/
|
2730 |
+
function checkKeyCodes (
|
2731 |
+
eventKeyCode,
|
2732 |
+
key,
|
2733 |
+
builtInKeyCode,
|
2734 |
+
eventKeyName,
|
2735 |
+
builtInKeyName
|
2736 |
+
) {
|
2737 |
+
var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
|
2738 |
+
if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
|
2739 |
+
return isKeyNotMatch(builtInKeyName, eventKeyName)
|
2740 |
+
} else if (mappedKeyCode) {
|
2741 |
+
return isKeyNotMatch(mappedKeyCode, eventKeyCode)
|
2742 |
+
} else if (eventKeyName) {
|
2743 |
+
return hyphenate(eventKeyName) !== key
|
2744 |
+
}
|
2745 |
}
|
|
|
2746 |
|
2747 |
+
/* */
|
2748 |
+
|
2749 |
+
/**
|
2750 |
+
* Runtime helper for merging v-bind="object" into a VNode's data.
|
2751 |
+
*/
|
2752 |
+
function bindObjectProps (
|
2753 |
+
data,
|
2754 |
+
tag,
|
2755 |
+
value,
|
2756 |
+
asProp,
|
2757 |
+
isSync
|
2758 |
+
) {
|
2759 |
+
if (value) {
|
2760 |
+
if (!isObject(value)) {
|
2761 |
+
warn(
|
2762 |
+
'v-bind without argument expects an Object or Array value',
|
2763 |
+
this
|
2764 |
+
);
|
2765 |
+
} else {
|
2766 |
+
if (Array.isArray(value)) {
|
2767 |
+
value = toObject(value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2768 |
}
|
2769 |
+
var hash;
|
2770 |
+
var loop = function ( key ) {
|
2771 |
+
if (
|
2772 |
+
key === 'class' ||
|
2773 |
+
key === 'style' ||
|
2774 |
+
isReservedAttribute(key)
|
2775 |
+
) {
|
2776 |
+
hash = data;
|
2777 |
+
} else {
|
2778 |
+
var type = data.attrs && data.attrs.type;
|
2779 |
+
hash = asProp || config.mustUseProp(tag, type, key)
|
2780 |
+
? data.domProps || (data.domProps = {})
|
2781 |
+
: data.attrs || (data.attrs = {});
|
2782 |
+
}
|
2783 |
+
var camelizedKey = camelize(key);
|
2784 |
+
var hyphenatedKey = hyphenate(key);
|
2785 |
+
if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
|
2786 |
+
hash[key] = value[key];
|
2787 |
+
|
2788 |
+
if (isSync) {
|
2789 |
+
var on = data.on || (data.on = {});
|
2790 |
+
on[("update:" + key)] = function ($event) {
|
2791 |
+
value[key] = $event;
|
2792 |
+
};
|
2793 |
+
}
|
2794 |
+
}
|
2795 |
+
};
|
2796 |
|
2797 |
+
for (var key in value) loop( key );
|
2798 |
+
}
|
2799 |
}
|
2800 |
+
return data
|
2801 |
}
|
|
|
|
|
2802 |
|
2803 |
+
/* */
|
2804 |
|
2805 |
+
/**
|
2806 |
+
* Runtime helper for rendering static trees.
|
2807 |
+
*/
|
2808 |
+
function renderStatic (
|
2809 |
+
index,
|
2810 |
+
isInFor
|
2811 |
+
) {
|
2812 |
+
var cached = this._staticTrees || (this._staticTrees = []);
|
2813 |
+
var tree = cached[index];
|
2814 |
+
// if has already-rendered static tree and not inside v-for,
|
2815 |
+
// we can reuse the same tree.
|
2816 |
+
if (tree && !isInFor) {
|
2817 |
+
return tree
|
2818 |
+
}
|
2819 |
+
// otherwise, render a fresh tree.
|
2820 |
+
tree = cached[index] = this.$options.staticRenderFns[index].call(
|
2821 |
+
this._renderProxy,
|
2822 |
+
null,
|
2823 |
+
this // for render fns generated for functional component templates
|
2824 |
+
);
|
2825 |
+
markStatic(tree, ("__static__" + index), false);
|
2826 |
return tree
|
2827 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2828 |
|
2829 |
+
/**
|
2830 |
+
* Runtime helper for v-once.
|
2831 |
+
* Effectively it means marking the node as static with a unique key.
|
2832 |
+
*/
|
2833 |
+
function markOnce (
|
2834 |
+
tree,
|
2835 |
+
index,
|
2836 |
+
key
|
2837 |
+
) {
|
2838 |
+
markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
|
2839 |
+
return tree
|
2840 |
+
}
|
2841 |
+
|
2842 |
+
function markStatic (
|
2843 |
+
tree,
|
2844 |
+
key,
|
2845 |
+
isOnce
|
2846 |
+
) {
|
2847 |
+
if (Array.isArray(tree)) {
|
2848 |
+
for (var i = 0; i < tree.length; i++) {
|
2849 |
+
if (tree[i] && typeof tree[i] !== 'string') {
|
2850 |
+
markStaticNode(tree[i], (key + "_" + i), isOnce);
|
2851 |
+
}
|
2852 |
}
|
2853 |
+
} else {
|
2854 |
+
markStaticNode(tree, key, isOnce);
|
2855 |
}
|
|
|
|
|
2856 |
}
|
|
|
2857 |
|
2858 |
+
function markStaticNode (node, key, isOnce) {
|
2859 |
+
node.isStatic = true;
|
2860 |
+
node.key = key;
|
2861 |
+
node.isOnce = isOnce;
|
2862 |
+
}
|
2863 |
|
2864 |
+
/* */
|
2865 |
|
2866 |
+
function bindObjectListeners (data, value) {
|
2867 |
+
if (value) {
|
2868 |
+
if (!isPlainObject(value)) {
|
2869 |
+
warn(
|
2870 |
+
'v-on without argument expects an Object value',
|
2871 |
+
this
|
2872 |
+
);
|
2873 |
+
} else {
|
2874 |
+
var on = data.on = data.on ? extend({}, data.on) : {};
|
2875 |
+
for (var key in value) {
|
2876 |
+
var existing = on[key];
|
2877 |
+
var ours = value[key];
|
2878 |
+
on[key] = existing ? [].concat(existing, ours) : ours;
|
2879 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2880 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2881 |
}
|
2882 |
+
return data
|
|
|
|
|
2883 |
}
|
2884 |
|
2885 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2886 |
|
2887 |
+
function resolveScopedSlots (
|
2888 |
+
fns, // see flow/vnode
|
2889 |
+
res,
|
2890 |
+
// the following are added in 2.6
|
2891 |
+
hasDynamicKeys,
|
2892 |
+
contentHashKey
|
2893 |
+
) {
|
2894 |
+
res = res || { $stable: !hasDynamicKeys };
|
2895 |
+
for (var i = 0; i < fns.length; i++) {
|
2896 |
+
var slot = fns[i];
|
2897 |
+
if (Array.isArray(slot)) {
|
2898 |
+
resolveScopedSlots(slot, res, hasDynamicKeys);
|
2899 |
+
} else if (slot) {
|
2900 |
+
// marker for reverse proxying v-slot without scope on this.$slots
|
2901 |
+
if (slot.proxy) {
|
2902 |
+
slot.fn.proxy = true;
|
2903 |
+
}
|
2904 |
+
res[slot.key] = slot.fn;
|
2905 |
+
}
|
2906 |
+
}
|
2907 |
+
if (contentHashKey) {
|
2908 |
+
(res).$key = contentHashKey;
|
2909 |
}
|
2910 |
return res
|
2911 |
}
|
|
|
2912 |
|
2913 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2914 |
|
2915 |
+
function bindDynamicKeys (baseObj, values) {
|
2916 |
+
for (var i = 0; i < values.length; i += 2) {
|
2917 |
+
var key = values[i];
|
2918 |
+
if (typeof key === 'string' && key) {
|
2919 |
+
baseObj[values[i]] = values[i + 1];
|
2920 |
+
} else if (key !== '' && key !== null) {
|
2921 |
+
// null is a special value for explicitly removing a binding
|
2922 |
+
warn(
|
2923 |
+
("Invalid value for dynamic directive argument (expected string or null): " + key),
|
2924 |
+
this
|
2925 |
+
);
|
2926 |
+
}
|
2927 |
+
}
|
2928 |
+
return baseObj
|
2929 |
}
|
|
|
|
|
|
|
2930 |
|
2931 |
+
// helper to dynamically append modifier runtime markers to event names.
|
2932 |
+
// ensure only append when value is already string, otherwise it will be cast
|
2933 |
+
// to string and cause the type check to miss.
|
2934 |
+
function prependModifier (value, symbol) {
|
2935 |
+
return typeof value === 'string' ? symbol + value : value
|
2936 |
+
}
|
2937 |
|
2938 |
+
/* */
|
2939 |
|
2940 |
+
function installRenderHelpers (target) {
|
2941 |
+
target._o = markOnce;
|
2942 |
+
target._n = toNumber;
|
2943 |
+
target._s = toString;
|
2944 |
+
target._l = renderList;
|
2945 |
+
target._t = renderSlot;
|
2946 |
+
target._q = looseEqual;
|
2947 |
+
target._i = looseIndexOf;
|
2948 |
+
target._m = renderStatic;
|
2949 |
+
target._f = resolveFilter;
|
2950 |
+
target._k = checkKeyCodes;
|
2951 |
+
target._b = bindObjectProps;
|
2952 |
+
target._v = createTextVNode;
|
2953 |
+
target._e = createEmptyVNode;
|
2954 |
+
target._u = resolveScopedSlots;
|
2955 |
+
target._g = bindObjectListeners;
|
2956 |
+
target._d = bindDynamicKeys;
|
2957 |
+
target._p = prependModifier;
|
2958 |
+
}
|
2959 |
|
2960 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
2961 |
|
2962 |
+
function FunctionalRenderContext (
|
2963 |
+
data,
|
2964 |
+
props,
|
2965 |
+
children,
|
2966 |
+
parent,
|
2967 |
+
Ctor
|
2968 |
+
) {
|
2969 |
+
var this$1 = this;
|
2970 |
|
2971 |
+
var options = Ctor.options;
|
2972 |
+
// ensure the createElement function in functional components
|
2973 |
+
// gets a unique context - this is necessary for correct named slot check
|
2974 |
+
var contextVm;
|
2975 |
+
if (hasOwn(parent, '_uid')) {
|
2976 |
+
contextVm = Object.create(parent);
|
2977 |
+
// $flow-disable-line
|
2978 |
+
contextVm._original = parent;
|
2979 |
+
} else {
|
2980 |
+
// the context vm passed in is a functional context as well.
|
2981 |
+
// in this case we want to make sure we are able to get a hold to the
|
2982 |
+
// real context instance.
|
2983 |
+
contextVm = parent;
|
2984 |
+
// $flow-disable-line
|
2985 |
+
parent = parent._original;
|
2986 |
+
}
|
2987 |
+
var isCompiled = isTrue(options._compiled);
|
2988 |
+
var needNormalization = !isCompiled;
|
2989 |
+
|
2990 |
+
this.data = data;
|
2991 |
+
this.props = props;
|
2992 |
+
this.children = children;
|
2993 |
+
this.parent = parent;
|
2994 |
+
this.listeners = data.on || emptyObject;
|
2995 |
+
this.injections = resolveInject(options.inject, parent);
|
2996 |
+
this.slots = function () {
|
2997 |
+
if (!this$1.$slots) {
|
2998 |
+
normalizeScopedSlots(
|
2999 |
+
data.scopedSlots,
|
3000 |
+
this$1.$slots = resolveSlots(children, parent)
|
3001 |
+
);
|
3002 |
+
}
|
3003 |
+
return this$1.$slots
|
3004 |
+
};
|
3005 |
|
3006 |
+
Object.defineProperty(this, 'scopedSlots', ({
|
3007 |
+
enumerable: true,
|
3008 |
+
get: function get () {
|
3009 |
+
return normalizeScopedSlots(data.scopedSlots, this.slots())
|
3010 |
+
}
|
3011 |
+
}));
|
3012 |
|
3013 |
+
// support for compiled functional template
|
3014 |
+
if (isCompiled) {
|
3015 |
+
// exposing $options for renderStatic()
|
3016 |
+
this.$options = options;
|
3017 |
+
// pre-resolve slots for renderSlot()
|
3018 |
+
this.$slots = this.slots();
|
3019 |
+
this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
|
3020 |
+
}
|
3021 |
|
3022 |
+
if (options._scopeId) {
|
3023 |
+
this._c = function (a, b, c, d) {
|
3024 |
+
var vnode = createElement(contextVm, a, b, c, d, needNormalization);
|
3025 |
+
if (vnode && !Array.isArray(vnode)) {
|
3026 |
+
vnode.fnScopeId = options._scopeId;
|
3027 |
+
vnode.fnContext = parent;
|
3028 |
+
}
|
3029 |
+
return vnode
|
3030 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3031 |
} else {
|
3032 |
+
this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3033 |
}
|
3034 |
+
}
|
3035 |
|
3036 |
+
installRenderHelpers(FunctionalRenderContext.prototype);
|
3037 |
+
|
3038 |
+
function createFunctionalComponent (
|
3039 |
+
Ctor,
|
3040 |
+
propsData,
|
3041 |
+
data,
|
3042 |
+
contextVm,
|
3043 |
+
children
|
3044 |
+
) {
|
3045 |
+
var options = Ctor.options;
|
3046 |
+
var props = {};
|
3047 |
+
var propOptions = options.props;
|
3048 |
+
if (isDef(propOptions)) {
|
3049 |
+
for (var key in propOptions) {
|
3050 |
+
props[key] = validateProp(key, propOptions, propsData || emptyObject);
|
3051 |
}
|
3052 |
+
} else {
|
3053 |
+
if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
|
3054 |
+
if (isDef(data.props)) { mergeProps(props, data.props); }
|
3055 |
}
|
|
|
|
|
3056 |
|
3057 |
+
var renderContext = new FunctionalRenderContext(
|
3058 |
+
data,
|
3059 |
+
props,
|
3060 |
+
children,
|
3061 |
+
contextVm,
|
3062 |
+
Ctor
|
3063 |
+
);
|
|
|
|
|
|
|
|
|
|
|
3064 |
|
3065 |
+
var vnode = options.render.call(null, renderContext._c, renderContext);
|
3066 |
|
3067 |
+
if (vnode instanceof VNode) {
|
3068 |
+
return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
|
3069 |
+
} else if (Array.isArray(vnode)) {
|
3070 |
+
var vnodes = normalizeChildren(vnode) || [];
|
3071 |
+
var res = new Array(vnodes.length);
|
3072 |
+
for (var i = 0; i < vnodes.length; i++) {
|
3073 |
+
res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
|
3074 |
+
}
|
3075 |
+
return res
|
3076 |
+
}
|
3077 |
}
|
3078 |
|
3079 |
+
function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
|
3080 |
+
// #7817 clone node before setting fnContext, otherwise if the node is reused
|
3081 |
+
// (e.g. it was from a cached normal slot) the fnContext causes named slots
|
3082 |
+
// that should not be matched to match.
|
3083 |
+
var clone = cloneVNode(vnode);
|
3084 |
+
clone.fnContext = contextVm;
|
3085 |
+
clone.fnOptions = options;
|
3086 |
{
|
3087 |
+
(clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3088 |
}
|
3089 |
+
if (data.slot) {
|
3090 |
+
(clone.data || (clone.data = {})).slot = data.slot;
|
3091 |
+
}
|
3092 |
+
return clone
|
3093 |
}
|
3094 |
|
3095 |
+
function mergeProps (to, from) {
|
3096 |
+
for (var key in from) {
|
3097 |
+
to[camelize(key)] = from[key];
|
3098 |
+
}
|
|
|
|
|
|
|
|
|
|
|
3099 |
}
|
3100 |
|
3101 |
+
/* */
|
|
|
3102 |
|
3103 |
+
/* */
|
|
|
|
|
|
|
3104 |
|
3105 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
3106 |
|
3107 |
+
/* */
|
|
|
|
|
3108 |
|
3109 |
+
// inline hooks to be invoked on component VNodes during patch
|
3110 |
+
var componentVNodeHooks = {
|
3111 |
+
init: function init (vnode, hydrating) {
|
3112 |
+
if (
|
3113 |
+
vnode.componentInstance &&
|
3114 |
+
!vnode.componentInstance._isDestroyed &&
|
3115 |
+
vnode.data.keepAlive
|
3116 |
+
) {
|
3117 |
+
// kept-alive components, treat as a patch
|
3118 |
+
var mountedNode = vnode; // work around flow
|
3119 |
+
componentVNodeHooks.prepatch(mountedNode, mountedNode);
|
3120 |
+
} else {
|
3121 |
+
var child = vnode.componentInstance = createComponentInstanceForVnode(
|
3122 |
+
vnode,
|
3123 |
+
activeInstance
|
3124 |
+
);
|
3125 |
+
child.$mount(hydrating ? vnode.elm : undefined, hydrating);
|
3126 |
+
}
|
3127 |
+
},
|
3128 |
|
3129 |
+
prepatch: function prepatch (oldVnode, vnode) {
|
3130 |
+
var options = vnode.componentOptions;
|
3131 |
+
var child = vnode.componentInstance = oldVnode.componentInstance;
|
3132 |
+
updateChildComponent(
|
3133 |
+
child,
|
3134 |
+
options.propsData, // updated props
|
3135 |
+
options.listeners, // updated listeners
|
3136 |
+
vnode, // new parent vnode
|
3137 |
+
options.children // new children
|
3138 |
+
);
|
3139 |
+
},
|
3140 |
|
3141 |
+
insert: function insert (vnode) {
|
3142 |
+
var context = vnode.context;
|
3143 |
+
var componentInstance = vnode.componentInstance;
|
3144 |
+
if (!componentInstance._isMounted) {
|
3145 |
+
componentInstance._isMounted = true;
|
3146 |
+
callHook(componentInstance, 'mounted');
|
3147 |
+
}
|
3148 |
+
if (vnode.data.keepAlive) {
|
3149 |
+
if (context._isMounted) {
|
3150 |
+
// vue-router#1212
|
3151 |
+
// During updates, a kept-alive component's child components may
|
3152 |
+
// change, so directly walking the tree here may call activated hooks
|
3153 |
+
// on incorrect children. Instead we push them into a queue which will
|
3154 |
+
// be processed after the whole patch process ended.
|
3155 |
+
queueActivatedComponent(componentInstance);
|
3156 |
+
} else {
|
3157 |
+
activateChildComponent(componentInstance, true /* direct */);
|
3158 |
+
}
|
3159 |
+
}
|
3160 |
+
},
|
3161 |
|
3162 |
+
destroy: function destroy (vnode) {
|
3163 |
+
var componentInstance = vnode.componentInstance;
|
3164 |
+
if (!componentInstance._isDestroyed) {
|
3165 |
+
if (!vnode.data.keepAlive) {
|
3166 |
+
componentInstance.$destroy();
|
3167 |
+
} else {
|
3168 |
+
deactivateChildComponent(componentInstance, true /* direct */);
|
3169 |
+
}
|
3170 |
+
}
|
3171 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3172 |
};
|
3173 |
+
|
3174 |
+
var hooksToMerge = Object.keys(componentVNodeHooks);
|
3175 |
+
|
3176 |
+
function createComponent (
|
3177 |
+
Ctor,
|
3178 |
+
data,
|
3179 |
+
context,
|
3180 |
+
children,
|
3181 |
+
tag
|
3182 |
+
) {
|
3183 |
+
if (isUndef(Ctor)) {
|
3184 |
+
return
|
3185 |
+
}
|
3186 |
+
|
3187 |
+
var baseCtor = context.$options._base;
|
3188 |
+
|
3189 |
+
// plain options object: turn it into a constructor
|
3190 |
+
if (isObject(Ctor)) {
|
3191 |
+
Ctor = baseCtor.extend(Ctor);
|
3192 |
+
}
|
3193 |
+
|
3194 |
+
// if at this stage it's not a constructor or an async component factory,
|
3195 |
+
// reject.
|
3196 |
+
if (typeof Ctor !== 'function') {
|
3197 |
+
{
|
3198 |
+
warn(("Invalid Component definition: " + (String(Ctor))), context);
|
3199 |
+
}
|
3200 |
+
return
|
3201 |
+
}
|
3202 |
+
|
3203 |
+
// async component
|
3204 |
+
var asyncFactory;
|
3205 |
+
if (isUndef(Ctor.cid)) {
|
3206 |
+
asyncFactory = Ctor;
|
3207 |
+
Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
|
3208 |
+
if (Ctor === undefined) {
|
3209 |
+
// return a placeholder node for async component, which is rendered
|
3210 |
+
// as a comment node but preserves all the raw information for the node.
|
3211 |
+
// the information will be used for async server-rendering and hydration.
|
3212 |
+
return createAsyncPlaceholder(
|
3213 |
+
asyncFactory,
|
3214 |
+
data,
|
3215 |
+
context,
|
3216 |
+
children,
|
3217 |
+
tag
|
3218 |
+
)
|
3219 |
+
}
|
3220 |
+
}
|
3221 |
+
|
3222 |
+
data = data || {};
|
3223 |
+
|
3224 |
+
// resolve constructor options in case global mixins are applied after
|
3225 |
+
// component constructor creation
|
3226 |
+
resolveConstructorOptions(Ctor);
|
3227 |
+
|
3228 |
+
// transform component v-model data into props & events
|
3229 |
+
if (isDef(data.model)) {
|
3230 |
+
transformModel(Ctor.options, data);
|
3231 |
+
}
|
3232 |
+
|
3233 |
+
// extract props
|
3234 |
+
var propsData = extractPropsFromVNodeData(data, Ctor, tag);
|
3235 |
+
|
3236 |
+
// functional component
|
3237 |
+
if (isTrue(Ctor.options.functional)) {
|
3238 |
+
return createFunctionalComponent(Ctor, propsData, data, context, children)
|
3239 |
+
}
|
3240 |
+
|
3241 |
+
// extract listeners, since these needs to be treated as
|
3242 |
+
// child component listeners instead of DOM listeners
|
3243 |
+
var listeners = data.on;
|
3244 |
+
// replace with listeners with .native modifier
|
3245 |
+
// so it gets processed during parent component patch.
|
3246 |
+
data.on = data.nativeOn;
|
3247 |
+
|
3248 |
+
if (isTrue(Ctor.options.abstract)) {
|
3249 |
+
// abstract components do not keep anything
|
3250 |
+
// other than props & listeners & slot
|
3251 |
+
|
3252 |
+
// work around flow
|
3253 |
+
var slot = data.slot;
|
3254 |
+
data = {};
|
3255 |
+
if (slot) {
|
3256 |
+
data.slot = slot;
|
3257 |
+
}
|
3258 |
+
}
|
3259 |
+
|
3260 |
+
// install component management hooks onto the placeholder node
|
3261 |
+
installComponentHooks(data);
|
3262 |
+
|
3263 |
+
// return a placeholder vnode
|
3264 |
+
var name = Ctor.options.name || tag;
|
3265 |
+
var vnode = new VNode(
|
3266 |
+
("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
|
3267 |
+
data, undefined, undefined, undefined, context,
|
3268 |
+
{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
|
3269 |
+
asyncFactory
|
3270 |
);
|
3271 |
+
|
3272 |
+
return vnode
|
3273 |
+
}
|
3274 |
+
|
3275 |
+
function createComponentInstanceForVnode (
|
3276 |
+
vnode, // we know it's MountedComponentVNode but flow doesn't
|
3277 |
+
parent // activeInstance in lifecycle state
|
3278 |
+
) {
|
3279 |
+
var options = {
|
3280 |
+
_isComponent: true,
|
3281 |
+
_parentVnode: vnode,
|
3282 |
+
parent: parent
|
3283 |
+
};
|
3284 |
+
// check inline-template render functions
|
3285 |
+
var inlineTemplate = vnode.data.inlineTemplate;
|
3286 |
+
if (isDef(inlineTemplate)) {
|
3287 |
+
options.render = inlineTemplate.render;
|
3288 |
+
options.staticRenderFns = inlineTemplate.staticRenderFns;
|
3289 |
+
}
|
3290 |
+
return new vnode.componentOptions.Ctor(options)
|
3291 |
+
}
|
3292 |
+
|
3293 |
+
function installComponentHooks (data) {
|
3294 |
+
var hooks = data.hook || (data.hook = {});
|
3295 |
+
for (var i = 0; i < hooksToMerge.length; i++) {
|
3296 |
+
var key = hooksToMerge[i];
|
3297 |
+
var existing = hooks[key];
|
3298 |
+
var toMerge = componentVNodeHooks[key];
|
3299 |
+
if (existing !== toMerge && !(existing && existing._merged)) {
|
3300 |
+
hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
|
3301 |
+
}
|
3302 |
+
}
|
3303 |
}
|
3304 |
+
|
3305 |
+
function mergeHook$1 (f1, f2) {
|
3306 |
+
var merged = function (a, b) {
|
3307 |
+
// flow complains about extra args which is why we use any
|
3308 |
+
f1(a, b);
|
3309 |
+
f2(a, b);
|
3310 |
+
};
|
3311 |
+
merged._merged = true;
|
3312 |
+
return merged
|
3313 |
+
}
|
3314 |
+
|
3315 |
+
// transform component v-model info (value and callback) into
|
3316 |
+
// prop and event handler respectively.
|
3317 |
+
function transformModel (options, data) {
|
3318 |
+
var prop = (options.model && options.model.prop) || 'value';
|
3319 |
+
var event = (options.model && options.model.event) || 'input'
|
3320 |
+
;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
|
3321 |
+
var on = data.on || (data.on = {});
|
3322 |
+
var existing = on[event];
|
3323 |
+
var callback = data.model.callback;
|
3324 |
+
if (isDef(existing)) {
|
3325 |
+
if (
|
3326 |
+
Array.isArray(existing)
|
3327 |
+
? existing.indexOf(callback) === -1
|
3328 |
+
: existing !== callback
|
3329 |
+
) {
|
3330 |
+
on[event] = [callback].concat(existing);
|
3331 |
+
}
|
3332 |
+
} else {
|
3333 |
+
on[event] = callback;
|
3334 |
+
}
|
3335 |
}
|
3336 |
+
|
3337 |
+
/* */
|
3338 |
+
|
3339 |
+
var SIMPLE_NORMALIZE = 1;
|
3340 |
+
var ALWAYS_NORMALIZE = 2;
|
3341 |
+
|
3342 |
+
// wrapper function for providing a more flexible interface
|
3343 |
+
// without getting yelled at by flow
|
3344 |
+
function createElement (
|
3345 |
+
context,
|
3346 |
+
tag,
|
3347 |
+
data,
|
3348 |
+
children,
|
3349 |
+
normalizationType,
|
3350 |
+
alwaysNormalize
|
3351 |
+
) {
|
3352 |
+
if (Array.isArray(data) || isPrimitive(data)) {
|
3353 |
+
normalizationType = children;
|
3354 |
+
children = data;
|
3355 |
+
data = undefined;
|
3356 |
+
}
|
3357 |
+
if (isTrue(alwaysNormalize)) {
|
3358 |
+
normalizationType = ALWAYS_NORMALIZE;
|
3359 |
+
}
|
3360 |
+
return _createElement(context, tag, data, children, normalizationType)
|
3361 |
}
|
3362 |
+
|
3363 |
+
function _createElement (
|
3364 |
+
context,
|
3365 |
+
tag,
|
3366 |
+
data,
|
3367 |
+
children,
|
3368 |
+
normalizationType
|
3369 |
) {
|
3370 |
+
if (isDef(data) && isDef((data).__ob__)) {
|
3371 |
warn(
|
3372 |
+
"Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
|
3373 |
+
'Always create fresh vnode data objects in each render!',
|
3374 |
context
|
3375 |
);
|
3376 |
+
return createEmptyVNode()
|
3377 |
}
|
3378 |
+
// object syntax in v-bind
|
3379 |
+
if (isDef(data) && isDef(data.is)) {
|
3380 |
+
tag = data.is;
|
3381 |
+
}
|
3382 |
+
if (!tag) {
|
3383 |
+
// in case of component :is set to falsy value
|
3384 |
+
return createEmptyVNode()
|
3385 |
+
}
|
3386 |
+
// warn against non-primitive key
|
3387 |
+
if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)
|
3388 |
+
) {
|
3389 |
+
{
|
3390 |
+
warn(
|
3391 |
+
'Avoid using non-primitive value as key, ' +
|
3392 |
+
'use string/number value instead.',
|
3393 |
+
context
|
3394 |
+
);
|
3395 |
+
}
|
3396 |
+
}
|
3397 |
+
// support single function children as default scoped slot
|
3398 |
+
if (Array.isArray(children) &&
|
3399 |
+
typeof children[0] === 'function'
|
3400 |
+
) {
|
3401 |
+
data = data || {};
|
3402 |
+
data.scopedSlots = { default: children[0] };
|
3403 |
+
children.length = 0;
|
3404 |
+
}
|
3405 |
+
if (normalizationType === ALWAYS_NORMALIZE) {
|
3406 |
+
children = normalizeChildren(children);
|
3407 |
+
} else if (normalizationType === SIMPLE_NORMALIZE) {
|
3408 |
+
children = simpleNormalizeChildren(children);
|
3409 |
+
}
|
3410 |
+
var vnode, ns;
|
3411 |
+
if (typeof tag === 'string') {
|
3412 |
+
var Ctor;
|
3413 |
+
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
|
3414 |
+
if (config.isReservedTag(tag)) {
|
3415 |
+
// platform built-in elements
|
3416 |
+
if (isDef(data) && isDef(data.nativeOn)) {
|
3417 |
+
warn(
|
3418 |
+
("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
|
3419 |
+
context
|
3420 |
+
);
|
3421 |
+
}
|
3422 |
+
vnode = new VNode(
|
3423 |
+
config.parsePlatformTagName(tag), data, children,
|
3424 |
+
undefined, undefined, context
|
3425 |
+
);
|
3426 |
+
} else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
|
3427 |
+
// component
|
3428 |
+
vnode = createComponent(Ctor, data, context, children, tag);
|
3429 |
+
} else {
|
3430 |
+
// unknown or unlisted namespaced elements
|
3431 |
+
// check at runtime because it may get assigned a namespace when its
|
3432 |
+
// parent normalizes children
|
3433 |
+
vnode = new VNode(
|
3434 |
+
tag, data, children,
|
3435 |
+
undefined, undefined, context
|
3436 |
+
);
|
3437 |
+
}
|
3438 |
} else {
|
3439 |
+
// direct component options / constructor
|
3440 |
+
vnode = createComponent(tag, data, context, children);
|
3441 |
+
}
|
3442 |
+
if (Array.isArray(vnode)) {
|
3443 |
+
return vnode
|
3444 |
+
} else if (isDef(vnode)) {
|
3445 |
+
if (isDef(ns)) { applyNS(vnode, ns); }
|
3446 |
+
if (isDef(data)) { registerDeepBindings(data); }
|
3447 |
+
return vnode
|
3448 |
+
} else {
|
3449 |
+
return createEmptyVNode()
|
3450 |
}
|
|
|
|
|
|
|
3451 |
}
|
3452 |
+
|
3453 |
+
function applyNS (vnode, ns, force) {
|
3454 |
+
vnode.ns = ns;
|
3455 |
+
if (vnode.tag === 'foreignObject') {
|
3456 |
+
// use default namespace inside foreignObject
|
3457 |
+
ns = undefined;
|
3458 |
+
force = true;
|
3459 |
+
}
|
3460 |
+
if (isDef(vnode.children)) {
|
3461 |
+
for (var i = 0, l = vnode.children.length; i < l; i++) {
|
3462 |
+
var child = vnode.children[i];
|
3463 |
+
if (isDef(child.tag) && (
|
3464 |
+
isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
|
3465 |
+
applyNS(child, ns, force);
|
3466 |
+
}
|
3467 |
+
}
|
3468 |
+
}
|
3469 |
+
}
|
3470 |
+
|
3471 |
+
// ref #5318
|
3472 |
+
// necessary to ensure parent re-render when deep bindings like :style and
|
3473 |
+
// :class are used on slot nodes
|
3474 |
+
function registerDeepBindings (data) {
|
3475 |
+
if (isObject(data.style)) {
|
3476 |
+
traverse(data.style);
|
3477 |
+
}
|
3478 |
+
if (isObject(data.class)) {
|
3479 |
+
traverse(data.class);
|
3480 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3481 |
}
|
|
|
3482 |
|
3483 |
+
/* */
|
|
|
|
|
3484 |
|
3485 |
+
function initRender (vm) {
|
3486 |
+
vm._vnode = null; // the root of the child tree
|
3487 |
+
vm._staticTrees = null; // v-once cached trees
|
3488 |
+
var options = vm.$options;
|
3489 |
+
var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
|
3490 |
+
var renderContext = parentVnode && parentVnode.context;
|
3491 |
+
vm.$slots = resolveSlots(options._renderChildren, renderContext);
|
3492 |
+
vm.$scopedSlots = emptyObject;
|
3493 |
+
// bind the createElement fn to this instance
|
3494 |
+
// so that we get proper render context inside it.
|
3495 |
+
// args order: tag, data, children, normalizationType, alwaysNormalize
|
3496 |
+
// internal version is used by render functions compiled from templates
|
3497 |
+
vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
|
3498 |
+
// normalization is always applied for the public version, used in
|
3499 |
+
// user-written render functions.
|
3500 |
+
vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
|
3501 |
|
3502 |
+
// $attrs & $listeners are exposed for easier HOC creation.
|
3503 |
+
// they need to be reactive so that HOCs using them are always updated
|
3504 |
+
var parentData = parentVnode && parentVnode.data;
|
|
|
|
|
3505 |
|
3506 |
+
/* istanbul ignore else */
|
3507 |
{
|
3508 |
+
defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
|
3509 |
+
!isUpdatingChildComponent && warn("$attrs is readonly.", vm);
|
3510 |
+
}, true);
|
3511 |
+
defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
|
3512 |
+
!isUpdatingChildComponent && warn("$listeners is readonly.", vm);
|
3513 |
+
}, true);
|
3514 |
}
|
3515 |
+
}
|
3516 |
|
3517 |
+
var currentRenderingInstance = null;
|
|
|
|
|
3518 |
|
3519 |
+
function renderMixin (Vue) {
|
3520 |
+
// install runtime convenience helpers
|
3521 |
+
installRenderHelpers(Vue.prototype);
|
3522 |
+
|
3523 |
+
Vue.prototype.$nextTick = function (fn) {
|
3524 |
+
return nextTick(fn, this)
|
3525 |
+
};
|
3526 |
+
|
3527 |
+
Vue.prototype._render = function () {
|
3528 |
+
var vm = this;
|
3529 |
+
var ref = vm.$options;
|
3530 |
+
var render = ref.render;
|
3531 |
+
var _parentVnode = ref._parentVnode;
|
3532 |
+
|
3533 |
+
if (_parentVnode) {
|
3534 |
+
vm.$scopedSlots = normalizeScopedSlots(
|
3535 |
+
_parentVnode.data.scopedSlots,
|
3536 |
+
vm.$slots,
|
3537 |
+
vm.$scopedSlots
|
3538 |
+
);
|
3539 |
+
}
|
3540 |
+
|
3541 |
+
// set parent vnode. this allows render functions to have access
|
3542 |
+
// to the data on the placeholder node.
|
3543 |
+
vm.$vnode = _parentVnode;
|
3544 |
+
// render self
|
3545 |
+
var vnode;
|
3546 |
+
try {
|
3547 |
+
// There's no need to maintain a stack because all render fns are called
|
3548 |
+
// separately from one another. Nested component's render fns are called
|
3549 |
+
// when parent component is patched.
|
3550 |
+
currentRenderingInstance = vm;
|
3551 |
+
vnode = render.call(vm._renderProxy, vm.$createElement);
|
3552 |
+
} catch (e) {
|
3553 |
+
handleError(e, vm, "render");
|
3554 |
+
// return error render result,
|
3555 |
+
// or previous vnode to prevent render error causing blank component
|
3556 |
+
/* istanbul ignore else */
|
3557 |
if (vm.$options.renderError) {
|
3558 |
try {
|
3559 |
vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
|
3564 |
} else {
|
3565 |
vnode = vm._vnode;
|
3566 |
}
|
3567 |
+
} finally {
|
3568 |
+
currentRenderingInstance = null;
|
3569 |
+
}
|
3570 |
+
// if the returned array contains only a single node, allow it
|
3571 |
+
if (Array.isArray(vnode) && vnode.length === 1) {
|
3572 |
+
vnode = vnode[0];
|
3573 |
+
}
|
3574 |
+
// return empty vnode in case the render function errored out
|
3575 |
+
if (!(vnode instanceof VNode)) {
|
3576 |
+
if (Array.isArray(vnode)) {
|
3577 |
+
warn(
|
3578 |
+
'Multiple root nodes returned from render function. Render function ' +
|
3579 |
+
'should return a single root node.',
|
3580 |
+
vm
|
3581 |
+
);
|
3582 |
+
}
|
3583 |
+
vnode = createEmptyVNode();
|
3584 |
}
|
3585 |
+
// set parent
|
3586 |
+
vnode.parent = _parentVnode;
|
3587 |
+
return vnode
|
3588 |
+
};
|
3589 |
+
}
|
3590 |
+
|
3591 |
+
/* */
|
3592 |
+
|
3593 |
+
function ensureCtor (comp, base) {
|
3594 |
+
if (
|
3595 |
+
comp.__esModule ||
|
3596 |
+
(hasSymbol && comp[Symbol.toStringTag] === 'Module')
|
3597 |
+
) {
|
3598 |
+
comp = comp.default;
|
3599 |
+
}
|
3600 |
+
return isObject(comp)
|
3601 |
+
? base.extend(comp)
|
3602 |
+
: comp
|
3603 |
+
}
|
3604 |
+
|
3605 |
+
function createAsyncPlaceholder (
|
3606 |
+
factory,
|
3607 |
+
data,
|
3608 |
+
context,
|
3609 |
+
children,
|
3610 |
+
tag
|
3611 |
+
) {
|
3612 |
+
var node = createEmptyVNode();
|
3613 |
+
node.asyncFactory = factory;
|
3614 |
+
node.asyncMeta = { data: data, context: context, children: children, tag: tag };
|
3615 |
+
return node
|
3616 |
+
}
|
3617 |
+
|
3618 |
+
function resolveAsyncComponent (
|
3619 |
+
factory,
|
3620 |
+
baseCtor
|
3621 |
+
) {
|
3622 |
+
if (isTrue(factory.error) && isDef(factory.errorComp)) {
|
3623 |
+
return factory.errorComp
|
3624 |
+
}
|
3625 |
+
|
3626 |
+
if (isDef(factory.resolved)) {
|
3627 |
+
return factory.resolved
|
3628 |
+
}
|
3629 |
+
|
3630 |
+
var owner = currentRenderingInstance;
|
3631 |
+
if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
|
3632 |
+
// already pending
|
3633 |
+
factory.owners.push(owner);
|
3634 |
}
|
3635 |
+
|
3636 |
+
if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
|
3637 |
+
return factory.loadingComp
|
3638 |
+
}
|
3639 |
+
|
3640 |
+
if (owner && !isDef(factory.owners)) {
|
3641 |
+
var owners = factory.owners = [owner];
|
3642 |
+
var sync = true;
|
3643 |
+
var timerLoading = null;
|
3644 |
+
var timerTimeout = null
|
3645 |
+
|
3646 |
+
;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
|
3647 |
+
|
3648 |
+
var forceRender = function (renderCompleted) {
|
3649 |
+
for (var i = 0, l = owners.length; i < l; i++) {
|
3650 |
+
(owners[i]).$forceUpdate();
|
3651 |
+
}
|
3652 |
+
|
3653 |
+
if (renderCompleted) {
|
3654 |
+
owners.length = 0;
|
3655 |
+
if (timerLoading !== null) {
|
3656 |
+
clearTimeout(timerLoading);
|
3657 |
+
timerLoading = null;
|
3658 |
+
}
|
3659 |
+
if (timerTimeout !== null) {
|
3660 |
+
clearTimeout(timerTimeout);
|
3661 |
+
timerTimeout = null;
|
3662 |
+
}
|
3663 |
+
}
|
3664 |
+
};
|
3665 |
+
|
3666 |
+
var resolve = once(function (res) {
|
3667 |
+
// cache resolved
|
3668 |
+
factory.resolved = ensureCtor(res, baseCtor);
|
3669 |
+
// invoke callbacks only if this is not a synchronous resolve
|
3670 |
+
// (async resolves are shimmed as synchronous during SSR)
|
3671 |
+
if (!sync) {
|
3672 |
+
forceRender(true);
|
3673 |
+
} else {
|
3674 |
+
owners.length = 0;
|
3675 |
+
}
|
3676 |
+
});
|
3677 |
+
|
3678 |
+
var reject = once(function (reason) {
|
3679 |
warn(
|
3680 |
+
"Failed to resolve async component: " + (String(factory)) +
|
3681 |
+
(reason ? ("\nReason: " + reason) : '')
|
|
|
3682 |
);
|
3683 |
+
if (isDef(factory.errorComp)) {
|
3684 |
+
factory.error = true;
|
3685 |
+
forceRender(true);
|
3686 |
+
}
|
3687 |
+
});
|
3688 |
+
|
3689 |
+
var res = factory(resolve, reject);
|
3690 |
+
|
3691 |
+
if (isObject(res)) {
|
3692 |
+
if (isPromise(res)) {
|
3693 |
+
// () => Promise
|
3694 |
+
if (isUndef(factory.resolved)) {
|
3695 |
+
res.then(resolve, reject);
|
3696 |
+
}
|
3697 |
+
} else if (isPromise(res.component)) {
|
3698 |
+
res.component.then(resolve, reject);
|
3699 |
+
|
3700 |
+
if (isDef(res.error)) {
|
3701 |
+
factory.errorComp = ensureCtor(res.error, baseCtor);
|
3702 |
+
}
|
3703 |
+
|
3704 |
+
if (isDef(res.loading)) {
|
3705 |
+
factory.loadingComp = ensureCtor(res.loading, baseCtor);
|
3706 |
+
if (res.delay === 0) {
|
3707 |
+
factory.loading = true;
|
3708 |
+
} else {
|
3709 |
+
timerLoading = setTimeout(function () {
|
3710 |
+
timerLoading = null;
|
3711 |
+
if (isUndef(factory.resolved) && isUndef(factory.error)) {
|
3712 |
+
factory.loading = true;
|
3713 |
+
forceRender(false);
|
3714 |
+
}
|
3715 |
+
}, res.delay || 200);
|
3716 |
+
}
|
3717 |
+
}
|
3718 |
+
|
3719 |
+
if (isDef(res.timeout)) {
|
3720 |
+
timerTimeout = setTimeout(function () {
|
3721 |
+
timerTimeout = null;
|
3722 |
+
if (isUndef(factory.resolved)) {
|
3723 |
+
reject(
|
3724 |
+
"timeout (" + (res.timeout) + "ms)"
|
3725 |
+
);
|
3726 |
+
}
|
3727 |
+
}, res.timeout);
|
3728 |
+
}
|
3729 |
+
}
|
3730 |
+
}
|
3731 |
+
|
3732 |
+
sync = false;
|
3733 |
+
// return in case resolved synchronously
|
3734 |
+
return factory.loading
|
3735 |
+
? factory.loadingComp
|
3736 |
+
: factory.resolved
|
3737 |
+
}
|
3738 |
+
}
|
3739 |
+
|
3740 |
+
/* */
|
3741 |
+
|
3742 |
+
function isAsyncPlaceholder (node) {
|
3743 |
+
return node.isComment && node.asyncFactory
|
3744 |
+
}
|
3745 |
+
|
3746 |
+
/* */
|
3747 |
+
|
3748 |
+
function getFirstComponentChild (children) {
|
3749 |
+
if (Array.isArray(children)) {
|
3750 |
+
for (var i = 0; i < children.length; i++) {
|
3751 |
+
var c = children[i];
|
3752 |
+
if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
|
3753 |
+
return c
|
3754 |
+
}
|
3755 |
+
}
|
3756 |
+
}
|
3757 |
+
}
|
3758 |
+
|
3759 |
+
/* */
|
3760 |
+
|
3761 |
+
/* */
|
3762 |
+
|
3763 |
+
function initEvents (vm) {
|
3764 |
+
vm._events = Object.create(null);
|
3765 |
+
vm._hasHookEvent = false;
|
3766 |
+
// init parent attached events
|
3767 |
+
var listeners = vm.$options._parentListeners;
|
3768 |
+
if (listeners) {
|
3769 |
+
updateComponentListeners(vm, listeners);
|
3770 |
+
}
|
3771 |
+
}
|
3772 |
+
|
3773 |
+
var target;
|
3774 |
+
|
3775 |
+
function add (event, fn) {
|
3776 |
+
target.$on(event, fn);
|
3777 |
+
}
|
3778 |
+
|
3779 |
+
function remove$1 (event, fn) {
|
3780 |
+
target.$off(event, fn);
|
3781 |
+
}
|
3782 |
+
|
3783 |
+
function createOnceHandler (event, fn) {
|
3784 |
+
var _target = target;
|
3785 |
+
return function onceHandler () {
|
3786 |
+
var res = fn.apply(null, arguments);
|
3787 |
+
if (res !== null) {
|
3788 |
+
_target.$off(event, onceHandler);
|
3789 |
+
}
|
3790 |
+
}
|
3791 |
+
}
|
3792 |
+
|
3793 |
+
function updateComponentListeners (
|
3794 |
+
vm,
|
3795 |
+
listeners,
|
3796 |
+
oldListeners
|
3797 |
+
) {
|
3798 |
+
target = vm;
|
3799 |
+
updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
|
3800 |
+
target = undefined;
|
3801 |
+
}
|
3802 |
+
|
3803 |
+
function eventsMixin (Vue) {
|
3804 |
+
var hookRE = /^hook:/;
|
3805 |
+
Vue.prototype.$on = function (event, fn) {
|
3806 |
+
var vm = this;
|
3807 |
+
if (Array.isArray(event)) {
|
3808 |
+
for (var i = 0, l = event.length; i < l; i++) {
|
3809 |
+
vm.$on(event[i], fn);
|
3810 |
+
}
|
3811 |
+
} else {
|
3812 |
+
(vm._events[event] || (vm._events[event] = [])).push(fn);
|
3813 |
+
// optimize hook:event cost by using a boolean flag marked at registration
|
3814 |
+
// instead of a hash lookup
|
3815 |
+
if (hookRE.test(event)) {
|
3816 |
+
vm._hasHookEvent = true;
|
3817 |
+
}
|
3818 |
+
}
|
3819 |
+
return vm
|
3820 |
+
};
|
3821 |
+
|
3822 |
+
Vue.prototype.$once = function (event, fn) {
|
3823 |
+
var vm = this;
|
3824 |
+
function on () {
|
3825 |
+
vm.$off(event, on);
|
3826 |
+
fn.apply(vm, arguments);
|
3827 |
+
}
|
3828 |
+
on.fn = fn;
|
3829 |
+
vm.$on(event, on);
|
3830 |
+
return vm
|
3831 |
+
};
|
3832 |
+
|
3833 |
+
Vue.prototype.$off = function (event, fn) {
|
3834 |
+
var vm = this;
|
3835 |
+
// all
|
3836 |
+
if (!arguments.length) {
|
3837 |
+
vm._events = Object.create(null);
|
3838 |
+
return vm
|
3839 |
+
}
|
3840 |
+
// array of events
|
3841 |
+
if (Array.isArray(event)) {
|
3842 |
+
for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
|
3843 |
+
vm.$off(event[i$1], fn);
|
3844 |
+
}
|
3845 |
+
return vm
|
3846 |
+
}
|
3847 |
+
// specific event
|
3848 |
+
var cbs = vm._events[event];
|
3849 |
+
if (!cbs) {
|
3850 |
+
return vm
|
3851 |
+
}
|
3852 |
+
if (!fn) {
|
3853 |
+
vm._events[event] = null;
|
3854 |
+
return vm
|
3855 |
+
}
|
3856 |
+
// specific handler
|
3857 |
+
var cb;
|
3858 |
+
var i = cbs.length;
|
3859 |
+
while (i--) {
|
3860 |
+
cb = cbs[i];
|
3861 |
+
if (cb === fn || cb.fn === fn) {
|
3862 |
+
cbs.splice(i, 1);
|
3863 |
+
break
|
3864 |
+
}
|
3865 |
+
}
|
3866 |
+
return vm
|
3867 |
+
};
|
3868 |
+
|
3869 |
+
Vue.prototype.$emit = function (event) {
|
3870 |
+
var vm = this;
|
3871 |
+
{
|
3872 |
+
var lowerCaseEvent = event.toLowerCase();
|
3873 |
+
if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
|
3874 |
+
tip(
|
3875 |
+
"Event \"" + lowerCaseEvent + "\" is emitted in component " +
|
3876 |
+
(formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
|
3877 |
+
"Note that HTML attributes are case-insensitive and you cannot use " +
|
3878 |
+
"v-on to listen to camelCase events when using in-DOM templates. " +
|
3879 |
+
"You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
|
3880 |
+
);
|
3881 |
+
}
|
3882 |
+
}
|
3883 |
+
var cbs = vm._events[event];
|
3884 |
+
if (cbs) {
|
3885 |
+
cbs = cbs.length > 1 ? toArray(cbs) : cbs;
|
3886 |
+
var args = toArray(arguments, 1);
|
3887 |
+
var info = "event handler for \"" + event + "\"";
|
3888 |
+
for (var i = 0, l = cbs.length; i < l; i++) {
|
3889 |
+
invokeWithErrorHandling(cbs[i], vm, args, vm, info);
|
3890 |
+
}
|
3891 |
+
}
|
3892 |
+
return vm
|
3893 |
+
};
|
3894 |
+
}
|
3895 |
+
|
3896 |
+
/* */
|
3897 |
+
|
3898 |
+
var activeInstance = null;
|
3899 |
+
var isUpdatingChildComponent = false;
|
3900 |
+
|
3901 |
+
function setActiveInstance(vm) {
|
3902 |
+
var prevActiveInstance = activeInstance;
|
3903 |
+
activeInstance = vm;
|
3904 |
+
return function () {
|
3905 |
+
activeInstance = prevActiveInstance;
|
3906 |
+
}
|
3907 |
+
}
|
3908 |
+
|
3909 |
+
function initLifecycle (vm) {
|
3910 |
+
var options = vm.$options;
|
3911 |
+
|
3912 |
+
// locate first non-abstract parent
|
3913 |
+
var parent = options.parent;
|
3914 |
+
if (parent && !options.abstract) {
|
3915 |
+
while (parent.$options.abstract && parent.$parent) {
|
3916 |
+
parent = parent.$parent;
|
3917 |
+
}
|
3918 |
+
parent.$children.push(vm);
|
3919 |
+
}
|
3920 |
+
|
3921 |
+
vm.$parent = parent;
|
3922 |
+
vm.$root = parent ? parent.$root : vm;
|
3923 |
+
|
3924 |
+
vm.$children = [];
|
3925 |
+
vm.$refs = {};
|
3926 |
+
|
3927 |
+
vm._watcher = null;
|
3928 |
+
vm._inactive = null;
|
3929 |
+
vm._directInactive = false;
|
3930 |
+
vm._isMounted = false;
|
3931 |
+
vm._isDestroyed = false;
|
3932 |
+
vm._isBeingDestroyed = false;
|
3933 |
+
}
|
3934 |
+
|
3935 |
+
function lifecycleMixin (Vue) {
|
3936 |
+
Vue.prototype._update = function (vnode, hydrating) {
|
3937 |
+
var vm = this;
|
3938 |
+
var prevEl = vm.$el;
|
3939 |
+
var prevVnode = vm._vnode;
|
3940 |
+
var restoreActiveInstance = setActiveInstance(vm);
|
3941 |
+
vm._vnode = vnode;
|
3942 |
+
// Vue.prototype.__patch__ is injected in entry points
|
3943 |
+
// based on the rendering backend used.
|
3944 |
+
if (!prevVnode) {
|
3945 |
+
// initial render
|
3946 |
+
vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
|
3947 |
+
} else {
|
3948 |
+
// updates
|
3949 |
+
vm.$el = vm.__patch__(prevVnode, vnode);
|
3950 |
+
}
|
3951 |
+
restoreActiveInstance();
|
3952 |
+
// update __vue__ reference
|
3953 |
+
if (prevEl) {
|
3954 |
+
prevEl.__vue__ = null;
|
3955 |
+
}
|
3956 |
+
if (vm.$el) {
|
3957 |
+
vm.$el.__vue__ = vm;
|
3958 |
+
}
|
3959 |
+
// if parent is an HOC, update its $el as well
|
3960 |
+
if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
|
3961 |
+
vm.$parent.$el = vm.$el;
|
3962 |
+
}
|
3963 |
+
// updated hook is called by the scheduler to ensure that children are
|
3964 |
+
// updated in a parent's updated hook.
|
3965 |
+
};
|
3966 |
+
|
3967 |
+
Vue.prototype.$forceUpdate = function () {
|
3968 |
+
var vm = this;
|
3969 |
+
if (vm._watcher) {
|
3970 |
+
vm._watcher.update();
|
3971 |
+
}
|
3972 |
+
};
|
3973 |
+
|
3974 |
+
Vue.prototype.$destroy = function () {
|
3975 |
+
var vm = this;
|
3976 |
+
if (vm._isBeingDestroyed) {
|
3977 |
+
return
|
3978 |
+
}
|
3979 |
+
callHook(vm, 'beforeDestroy');
|
3980 |
+
vm._isBeingDestroyed = true;
|
3981 |
+
// remove self from parent
|
3982 |
+
var parent = vm.$parent;
|
3983 |
+
if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
|
3984 |
+
remove(parent.$children, vm);
|
3985 |
+
}
|
3986 |
+
// teardown watchers
|
3987 |
+
if (vm._watcher) {
|
3988 |
+
vm._watcher.teardown();
|
3989 |
+
}
|
3990 |
+
var i = vm._watchers.length;
|
3991 |
+
while (i--) {
|
3992 |
+
vm._watchers[i].teardown();
|
3993 |
+
}
|
3994 |
+
// remove reference from data ob
|
3995 |
+
// frozen object may not have observer.
|
3996 |
+
if (vm._data.__ob__) {
|
3997 |
+
vm._data.__ob__.vmCount--;
|
3998 |
+
}
|
3999 |
+
// call the last hook...
|
4000 |
+
vm._isDestroyed = true;
|
4001 |
+
// invoke destroy hooks on current rendered tree
|
4002 |
+
vm.__patch__(vm._vnode, null);
|
4003 |
+
// fire destroyed hook
|
4004 |
+
callHook(vm, 'destroyed');
|
4005 |
+
// turn off all instance listeners.
|
4006 |
+
vm.$off();
|
4007 |
+
// remove __vue__ reference
|
4008 |
+
if (vm.$el) {
|
4009 |
+
vm.$el.__vue__ = null;
|
4010 |
+
}
|
4011 |
+
// release circular reference (#6759)
|
4012 |
+
if (vm.$vnode) {
|
4013 |
+
vm.$vnode.parent = null;
|
4014 |
+
}
|
4015 |
+
};
|
4016 |
+
}
|
4017 |
+
|
4018 |
+
function mountComponent (
|
4019 |
+
vm,
|
4020 |
+
el,
|
4021 |
+
hydrating
|
4022 |
+
) {
|
4023 |
+
vm.$el = el;
|
4024 |
+
if (!vm.$options.render) {
|
4025 |
+
vm.$options.render = createEmptyVNode;
|
4026 |
+
{
|
4027 |
+
/* istanbul ignore if */
|
4028 |
+
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
|
4029 |
+
vm.$options.el || el) {
|
4030 |
+
warn(
|
4031 |
+
'You are using the runtime-only build of Vue where the template ' +
|
4032 |
+
'compiler is not available. Either pre-compile the templates into ' +
|
4033 |
+
'render functions, or use the compiler-included build.',
|
4034 |
+
vm
|
4035 |
+
);
|
4036 |
+
} else {
|
4037 |
+
warn(
|
4038 |
+
'Failed to mount component: template or render function not defined.',
|
4039 |
+
vm
|
4040 |
+
);
|
4041 |
+
}
|
4042 |
+
}
|
4043 |
+
}
|
4044 |
+
callHook(vm, 'beforeMount');
|
4045 |
+
|
4046 |
+
var updateComponent;
|
4047 |
+
/* istanbul ignore if */
|
4048 |
+
if (config.performance && mark) {
|
4049 |
+
updateComponent = function () {
|
4050 |
+
var name = vm._name;
|
4051 |
+
var id = vm._uid;
|
4052 |
+
var startTag = "vue-perf-start:" + id;
|
4053 |
+
var endTag = "vue-perf-end:" + id;
|
4054 |
+
|
4055 |
+
mark(startTag);
|
4056 |
+
var vnode = vm._render();
|
4057 |
+
mark(endTag);
|
4058 |
+
measure(("vue " + name + " render"), startTag, endTag);
|
4059 |
+
|
4060 |
+
mark(startTag);
|
4061 |
+
vm._update(vnode, hydrating);
|
4062 |
+
mark(endTag);
|
4063 |
+
measure(("vue " + name + " patch"), startTag, endTag);
|
4064 |
+
};
|
4065 |
+
} else {
|
4066 |
+
updateComponent = function () {
|
4067 |
+
vm._update(vm._render(), hydrating);
|
4068 |
+
};
|
4069 |
+
}
|
4070 |
+
|
4071 |
+
// we set this to vm._watcher inside the watcher's constructor
|
4072 |
+
// since the watcher's initial patch may call $forceUpdate (e.g. inside child
|
4073 |
+
// component's mounted hook), which relies on vm._watcher being already defined
|
4074 |
+
new Watcher(vm, updateComponent, noop, {
|
4075 |
+
before: function before () {
|
4076 |
+
if (vm._isMounted && !vm._isDestroyed) {
|
4077 |
+
callHook(vm, 'beforeUpdate');
|
4078 |
+
}
|
4079 |
+
}
|
4080 |
+
}, true /* isRenderWatcher */);
|
4081 |
+
hydrating = false;
|
4082 |
+
|
4083 |
+
// manually mounted instance, call mounted on self
|
4084 |
+
// mounted is called for render-created child components in its inserted hook
|
4085 |
+
if (vm.$vnode == null) {
|
4086 |
+
vm._isMounted = true;
|
4087 |
+
callHook(vm, 'mounted');
|
4088 |
+
}
|
4089 |
+
return vm
|
4090 |
+
}
|
4091 |
+
|
4092 |
+
function updateChildComponent (
|
4093 |
+
vm,
|
4094 |
+
propsData,
|
4095 |
+
listeners,
|
4096 |
+
parentVnode,
|
4097 |
+
renderChildren
|
4098 |
+
) {
|
4099 |
+
{
|
4100 |
+
isUpdatingChildComponent = true;
|
4101 |
+
}
|
4102 |
+
|
4103 |
+
// determine whether component has slot children
|
4104 |
+
// we need to do this before overwriting $options._renderChildren.
|
4105 |
+
|
4106 |
+
// check if there are dynamic scopedSlots (hand-written or compiled but with
|
4107 |
+
// dynamic slot names). Static scoped slots compiled from template has the
|
4108 |
+
// "$stable" marker.
|
4109 |
+
var newScopedSlots = parentVnode.data.scopedSlots;
|
4110 |
+
var oldScopedSlots = vm.$scopedSlots;
|
4111 |
+
var hasDynamicScopedSlot = !!(
|
4112 |
+
(newScopedSlots && !newScopedSlots.$stable) ||
|
4113 |
+
(oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
|
4114 |
+
(newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
|
4115 |
+
);
|
4116 |
+
|
4117 |
+
// Any static slot children from the parent may have changed during parent's
|
4118 |
+
// update. Dynamic scoped slots may also have changed. In such cases, a forced
|
4119 |
+
// update is necessary to ensure correctness.
|
4120 |
+
var needsForceUpdate = !!(
|
4121 |
+
renderChildren || // has new static slots
|
4122 |
+
vm.$options._renderChildren || // has old static slots
|
4123 |
+
hasDynamicScopedSlot
|
4124 |
+
);
|
4125 |
+
|
4126 |
+
vm.$options._parentVnode = parentVnode;
|
4127 |
+
vm.$vnode = parentVnode; // update vm's placeholder node without re-render
|
4128 |
+
|
4129 |
+
if (vm._vnode) { // update child tree's parent
|
4130 |
+
vm._vnode.parent = parentVnode;
|
4131 |
+
}
|
4132 |
+
vm.$options._renderChildren = renderChildren;
|
4133 |
+
|
4134 |
+
// update $attrs and $listeners hash
|
4135 |
+
// these are also reactive so they may trigger child update if the child
|
4136 |
+
// used them during render
|
4137 |
+
vm.$attrs = parentVnode.data.attrs || emptyObject;
|
4138 |
+
vm.$listeners = listeners || emptyObject;
|
4139 |
+
|
4140 |
+
// update props
|
4141 |
+
if (propsData && vm.$options.props) {
|
4142 |
+
toggleObserving(false);
|
4143 |
+
var props = vm._props;
|
4144 |
+
var propKeys = vm.$options._propKeys || [];
|
4145 |
+
for (var i = 0; i < propKeys.length; i++) {
|
4146 |
+
var key = propKeys[i];
|
4147 |
+
var propOptions = vm.$options.props; // wtf flow?
|
4148 |
+
props[key] = validateProp(key, propOptions, propsData, vm);
|
4149 |
+
}
|
4150 |
+
toggleObserving(true);
|
4151 |
+
// keep a copy of raw propsData
|
4152 |
+
vm.$options.propsData = propsData;
|
4153 |
+
}
|
4154 |
+
|
4155 |
+
// update listeners
|
4156 |
+
listeners = listeners || emptyObject;
|
4157 |
+
var oldListeners = vm.$options._parentListeners;
|
4158 |
+
vm.$options._parentListeners = listeners;
|
4159 |
+
updateComponentListeners(vm, listeners, oldListeners);
|
4160 |
+
|
4161 |
+
// resolve slots + force update if has children
|
4162 |
+
if (needsForceUpdate) {
|
4163 |
+
vm.$slots = resolveSlots(renderChildren, parentVnode.context);
|
4164 |
+
vm.$forceUpdate();
|
4165 |
+
}
|
4166 |
+
|
4167 |
+
{
|
4168 |
+
isUpdatingChildComponent = false;
|
4169 |
+
}
|
4170 |
+
}
|
4171 |
+
|
4172 |
+
function isInInactiveTree (vm) {
|
4173 |
+
while (vm && (vm = vm.$parent)) {
|
4174 |
+
if (vm._inactive) { return true }
|
4175 |
+
}
|
4176 |
+
return false
|
4177 |
+
}
|
4178 |
+
|
4179 |
+
function activateChildComponent (vm, direct) {
|
4180 |
+
if (direct) {
|
4181 |
+
vm._directInactive = false;
|
4182 |
+
if (isInInactiveTree(vm)) {
|
4183 |
+
return
|
4184 |
+
}
|
4185 |
+
} else if (vm._directInactive) {
|
4186 |
+
return
|
4187 |
+
}
|
4188 |
+
if (vm._inactive || vm._inactive === null) {
|
4189 |
+
vm._inactive = false;
|
4190 |
+
for (var i = 0; i < vm.$children.length; i++) {
|
4191 |
+
activateChildComponent(vm.$children[i]);
|
4192 |
+
}
|
4193 |
+
callHook(vm, 'activated');
|
4194 |
+
}
|
4195 |
+
}
|
4196 |
+
|
4197 |
+
function deactivateChildComponent (vm, direct) {
|
4198 |
+
if (direct) {
|
4199 |
+
vm._directInactive = true;
|
4200 |
+
if (isInInactiveTree(vm)) {
|
4201 |
+
return
|
4202 |
+
}
|
4203 |
+
}
|
4204 |
+
if (!vm._inactive) {
|
4205 |
+
vm._inactive = true;
|
4206 |
+
for (var i = 0; i < vm.$children.length; i++) {
|
4207 |
+
deactivateChildComponent(vm.$children[i]);
|
4208 |
+
}
|
4209 |
+
callHook(vm, 'deactivated');
|
4210 |
+
}
|
4211 |
+
}
|
4212 |
+
|
4213 |
+
function callHook (vm, hook) {
|
4214 |
+
// #7573 disable dep collection when invoking lifecycle hooks
|
4215 |
+
pushTarget();
|
4216 |
+
var handlers = vm.$options[hook];
|
4217 |
+
var info = hook + " hook";
|
4218 |
+
if (handlers) {
|
4219 |
+
for (var i = 0, j = handlers.length; i < j; i++) {
|
4220 |
+
invokeWithErrorHandling(handlers[i], vm, null, vm, info);
|
4221 |
+
}
|
4222 |
+
}
|
4223 |
+
if (vm._hasHookEvent) {
|
4224 |
+
vm.$emit('hook:' + hook);
|
4225 |
+
}
|
4226 |
+
popTarget();
|
4227 |
+
}
|
4228 |
+
|
4229 |
+
/* */
|
4230 |
+
|
4231 |
+
var MAX_UPDATE_COUNT = 100;
|
4232 |
+
|
4233 |
+
var queue = [];
|
4234 |
+
var activatedChildren = [];
|
4235 |
+
var has = {};
|
4236 |
+
var circular = {};
|
4237 |
+
var waiting = false;
|
4238 |
+
var flushing = false;
|
4239 |
+
var index = 0;
|
4240 |
+
|
4241 |
+
/**
|
4242 |
+
* Reset the scheduler's state.
|
4243 |
+
*/
|
4244 |
+
function resetSchedulerState () {
|
4245 |
+
index = queue.length = activatedChildren.length = 0;
|
4246 |
+
has = {};
|
4247 |
+
{
|
4248 |
+
circular = {};
|
4249 |
+
}
|
4250 |
+
waiting = flushing = false;
|
4251 |
+
}
|
4252 |
+
|
4253 |
+
// Async edge case #6566 requires saving the timestamp when event listeners are
|
4254 |
+
// attached. However, calling performance.now() has a perf overhead especially
|
4255 |
+
// if the page has thousands of event listeners. Instead, we take a timestamp
|
4256 |
+
// every time the scheduler flushes and use that for all event listeners
|
4257 |
+
// attached during that flush.
|
4258 |
+
var currentFlushTimestamp = 0;
|
4259 |
+
|
4260 |
+
// Async edge case fix requires storing an event listener's attach timestamp.
|
4261 |
+
var getNow = Date.now;
|
4262 |
+
|
4263 |
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
4264 |
+
// timestamp can either be hi-res (relative to page load) or low-res
|
4265 |
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
4266 |
+
// same timestamp type when saving the flush timestamp.
|
4267 |
+
// All IE versions use low-res event timestamps, and have problematic clock
|
4268 |
+
// implementations (#9632)
|
4269 |
+
if (inBrowser && !isIE) {
|
4270 |
+
var performance = window.performance;
|
4271 |
+
if (
|
4272 |
+
performance &&
|
4273 |
+
typeof performance.now === 'function' &&
|
4274 |
+
getNow() > document.createEvent('Event').timeStamp
|
4275 |
+
) {
|
4276 |
+
// if the event timestamp, although evaluated AFTER the Date.now(), is
|
4277 |
+
// smaller than it, it means the event is using a hi-res timestamp,
|
4278 |
+
// and we need to use the hi-res version for event listener timestamps as
|
4279 |
+
// well.
|
4280 |
+
getNow = function () { return performance.now(); };
|
4281 |
+
}
|
4282 |
+
}
|
4283 |
+
|
4284 |
+
/**
|
4285 |
+
* Flush both queues and run the watchers.
|
4286 |
+
*/
|
4287 |
+
function flushSchedulerQueue () {
|
4288 |
+
currentFlushTimestamp = getNow();
|
4289 |
+
flushing = true;
|
4290 |
+
var watcher, id;
|
4291 |
+
|
4292 |
+
// Sort queue before flush.
|
4293 |
+
// This ensures that:
|
4294 |
+
// 1. Components are updated from parent to child. (because parent is always
|
4295 |
+
// created before the child)
|
4296 |
+
// 2. A component's user watchers are run before its render watcher (because
|
4297 |
+
// user watchers are created before the render watcher)
|
4298 |
+
// 3. If a component is destroyed during a parent component's watcher run,
|
4299 |
+
// its watchers can be skipped.
|
4300 |
+
queue.sort(function (a, b) { return a.id - b.id; });
|
4301 |
+
|
4302 |
+
// do not cache length because more watchers might be pushed
|
4303 |
+
// as we run existing watchers
|
4304 |
+
for (index = 0; index < queue.length; index++) {
|
4305 |
+
watcher = queue[index];
|
4306 |
+
if (watcher.before) {
|
4307 |
+
watcher.before();
|
4308 |
+
}
|
4309 |
+
id = watcher.id;
|
4310 |
+
has[id] = null;
|
4311 |
+
watcher.run();
|
4312 |
+
// in dev build, check and stop circular updates.
|
4313 |
+
if (has[id] != null) {
|
4314 |
+
circular[id] = (circular[id] || 0) + 1;
|
4315 |
+
if (circular[id] > MAX_UPDATE_COUNT) {
|
4316 |
+
warn(
|
4317 |
+
'You may have an infinite update loop ' + (
|
4318 |
+
watcher.user
|
4319 |
+
? ("in watcher with expression \"" + (watcher.expression) + "\"")
|
4320 |
+
: "in a component render function."
|
4321 |
+
),
|
4322 |
+
watcher.vm
|
4323 |
+
);
|
4324 |
+
break
|
4325 |
+
}
|
4326 |
+
}
|
4327 |
+
}
|
4328 |
+
|
4329 |
+
// keep copies of post queues before resetting state
|
4330 |
+
var activatedQueue = activatedChildren.slice();
|
4331 |
+
var updatedQueue = queue.slice();
|
4332 |
+
|
4333 |
+
resetSchedulerState();
|
4334 |
+
|
4335 |
+
// call component updated and activated hooks
|
4336 |
+
callActivatedHooks(activatedQueue);
|
4337 |
+
callUpdatedHooks(updatedQueue);
|
4338 |
+
|
4339 |
+
// devtool hook
|
4340 |
+
/* istanbul ignore if */
|
4341 |
+
if (devtools && config.devtools) {
|
4342 |
+
devtools.emit('flush');
|
4343 |
+
}
|
4344 |
+
}
|
4345 |
+
|
4346 |
+
function callUpdatedHooks (queue) {
|
4347 |
+
var i = queue.length;
|
4348 |
+
while (i--) {
|
4349 |
+
var watcher = queue[i];
|
4350 |
+
var vm = watcher.vm;
|
4351 |
+
if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
|
4352 |
+
callHook(vm, 'updated');
|
4353 |
+
}
|
4354 |
+
}
|
4355 |
+
}
|
4356 |
+
|
4357 |
+
/**
|
4358 |
+
* Queue a kept-alive component that was activated during patch.
|
4359 |
+
* The queue will be processed after the entire tree has been patched.
|
4360 |
+
*/
|
4361 |
+
function queueActivatedComponent (vm) {
|
4362 |
+
// setting _inactive to false here so that a render function can
|
4363 |
+
// rely on checking whether it's in an inactive tree (e.g. router-view)
|
4364 |
+
vm._inactive = false;
|
4365 |
+
activatedChildren.push(vm);
|
4366 |
+
}
|
4367 |
+
|
4368 |
+
function callActivatedHooks (queue) {
|
4369 |
+
for (var i = 0; i < queue.length; i++) {
|
4370 |
+
queue[i]._inactive = true;
|
4371 |
+
activateChildComponent(queue[i], true /* true */);
|
4372 |
+
}
|
4373 |
+
}
|
4374 |
+
|
4375 |
+
/**
|
4376 |
+
* Push a watcher into the watcher queue.
|
4377 |
+
* Jobs with duplicate IDs will be skipped unless it's
|
4378 |
+
* pushed when the queue is being flushed.
|
4379 |
+
*/
|
4380 |
+
function queueWatcher (watcher) {
|
4381 |
+
var id = watcher.id;
|
4382 |
+
if (has[id] == null) {
|
4383 |
+
has[id] = true;
|
4384 |
+
if (!flushing) {
|
4385 |
+
queue.push(watcher);
|
4386 |
+
} else {
|
4387 |
+
// if already flushing, splice the watcher based on its id
|
4388 |
+
// if already past its id, it will be run next immediately.
|
4389 |
+
var i = queue.length - 1;
|
4390 |
+
while (i > index && queue[i].id > watcher.id) {
|
4391 |
+
i--;
|
4392 |
+
}
|
4393 |
+
queue.splice(i + 1, 0, watcher);
|
4394 |
+
}
|
4395 |
+
// queue the flush
|
4396 |
+
if (!waiting) {
|
4397 |
+
waiting = true;
|
4398 |
+
|
4399 |
+
if (!config.async) {
|
4400 |
+
flushSchedulerQueue();
|
4401 |
+
return
|
4402 |
+
}
|
4403 |
+
nextTick(flushSchedulerQueue);
|
4404 |
+
}
|
4405 |
+
}
|
4406 |
+
}
|
4407 |
+
|
4408 |
+
/* */
|
4409 |
+
|
4410 |
+
|
4411 |
+
|
4412 |
+
var uid$2 = 0;
|
4413 |
+
|
4414 |
+
/**
|
4415 |
+
* A watcher parses an expression, collects dependencies,
|
4416 |
+
* and fires callback when the expression value changes.
|
4417 |
+
* This is used for both the $watch() api and directives.
|
4418 |
+
*/
|
4419 |
+
var Watcher = function Watcher (
|
4420 |
+
vm,
|
4421 |
+
expOrFn,
|
4422 |
+
cb,
|
4423 |
+
options,
|
4424 |
+
isRenderWatcher
|
4425 |
+
) {
|
4426 |
+
this.vm = vm;
|
4427 |
+
if (isRenderWatcher) {
|
4428 |
+
vm._watcher = this;
|
4429 |
+
}
|
4430 |
+
vm._watchers.push(this);
|
4431 |
+
// options
|
4432 |
+
if (options) {
|
4433 |
+
this.deep = !!options.deep;
|
4434 |
+
this.user = !!options.user;
|
4435 |
+
this.lazy = !!options.lazy;
|
4436 |
+
this.sync = !!options.sync;
|
4437 |
+
this.before = options.before;
|
4438 |
+
} else {
|
4439 |
+
this.deep = this.user = this.lazy = this.sync = false;
|
4440 |
+
}
|
4441 |
+
this.cb = cb;
|
4442 |
+
this.id = ++uid$2; // uid for batching
|
4443 |
+
this.active = true;
|
4444 |
+
this.dirty = this.lazy; // for lazy watchers
|
4445 |
+
this.deps = [];
|
4446 |
+
this.newDeps = [];
|
4447 |
+
this.depIds = new _Set();
|
4448 |
+
this.newDepIds = new _Set();
|
4449 |
+
this.expression = expOrFn.toString();
|
4450 |
+
// parse expression for getter
|
4451 |
+
if (typeof expOrFn === 'function') {
|
4452 |
+
this.getter = expOrFn;
|
4453 |
+
} else {
|
4454 |
+
this.getter = parsePath(expOrFn);
|
4455 |
+
if (!this.getter) {
|
4456 |
+
this.getter = noop;
|
4457 |
+
warn(
|
4458 |
+
"Failed watching path: \"" + expOrFn + "\" " +
|
4459 |
+
'Watcher only accepts simple dot-delimited paths. ' +
|
4460 |
+
'For full control, use a function instead.',
|
4461 |
+
vm
|
4462 |
+
);
|
4463 |
+
}
|
4464 |
+
}
|
4465 |
+
this.value = this.lazy
|
4466 |
+
? undefined
|
4467 |
+
: this.get();
|
4468 |
+
};
|
4469 |
+
|
4470 |
+
/**
|
4471 |
+
* Evaluate the getter, and re-collect dependencies.
|
4472 |
+
*/
|
4473 |
+
Watcher.prototype.get = function get () {
|
4474 |
+
pushTarget(this);
|
4475 |
+
var value;
|
4476 |
+
var vm = this.vm;
|
4477 |
+
try {
|
4478 |
+
value = this.getter.call(vm, vm);
|
4479 |
+
} catch (e) {
|
4480 |
+
if (this.user) {
|
4481 |
+
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
|
4482 |
+
} else {
|
4483 |
+
throw e
|
4484 |
+
}
|
4485 |
+
} finally {
|
4486 |
+
// "touch" every property so they are all tracked as
|
4487 |
+
// dependencies for deep watching
|
4488 |
+
if (this.deep) {
|
4489 |
+
traverse(value);
|
4490 |
+
}
|
4491 |
+
popTarget();
|
4492 |
+
this.cleanupDeps();
|
4493 |
+
}
|
4494 |
+
return value
|
4495 |
+
};
|
4496 |
+
|
4497 |
+
/**
|
4498 |
+
* Add a dependency to this directive.
|
4499 |
+
*/
|
4500 |
+
Watcher.prototype.addDep = function addDep (dep) {
|
4501 |
+
var id = dep.id;
|
4502 |
+
if (!this.newDepIds.has(id)) {
|
4503 |
+
this.newDepIds.add(id);
|
4504 |
+
this.newDeps.push(dep);
|
4505 |
+
if (!this.depIds.has(id)) {
|
4506 |
+
dep.addSub(this);
|
4507 |
+
}
|
4508 |
+
}
|
4509 |
+
};
|
4510 |
+
|
4511 |
+
/**
|
4512 |
+
* Clean up for dependency collection.
|
4513 |
+
*/
|
4514 |
+
Watcher.prototype.cleanupDeps = function cleanupDeps () {
|
4515 |
+
var i = this.deps.length;
|
4516 |
+
while (i--) {
|
4517 |
+
var dep = this.deps[i];
|
4518 |
+
if (!this.newDepIds.has(dep.id)) {
|
4519 |
+
dep.removeSub(this);
|
4520 |
+
}
|
4521 |
+
}
|
4522 |
+
var tmp = this.depIds;
|
4523 |
+
this.depIds = this.newDepIds;
|
4524 |
+
this.newDepIds = tmp;
|
4525 |
+
this.newDepIds.clear();
|
4526 |
+
tmp = this.deps;
|
4527 |
+
this.deps = this.newDeps;
|
4528 |
+
this.newDeps = tmp;
|
4529 |
+
this.newDeps.length = 0;
|
4530 |
+
};
|
4531 |
+
|
4532 |
+
/**
|
4533 |
+
* Subscriber interface.
|
4534 |
+
* Will be called when a dependency changes.
|
4535 |
+
*/
|
4536 |
+
Watcher.prototype.update = function update () {
|
4537 |
+
/* istanbul ignore else */
|
4538 |
+
if (this.lazy) {
|
4539 |
+
this.dirty = true;
|
4540 |
+
} else if (this.sync) {
|
4541 |
+
this.run();
|
4542 |
+
} else {
|
4543 |
+
queueWatcher(this);
|
4544 |
+
}
|
4545 |
+
};
|
4546 |
+
|
4547 |
+
/**
|
4548 |
+
* Scheduler job interface.
|
4549 |
+
* Will be called by the scheduler.
|
4550 |
+
*/
|
4551 |
+
Watcher.prototype.run = function run () {
|
4552 |
+
if (this.active) {
|
4553 |
+
var value = this.get();
|
4554 |
+
if (
|
4555 |
+
value !== this.value ||
|
4556 |
+
// Deep watchers and watchers on Object/Arrays should fire even
|
4557 |
+
// when the value is the same, because the value may
|
4558 |
+
// have mutated.
|
4559 |
+
isObject(value) ||
|
4560 |
+
this.deep
|
4561 |
+
) {
|
4562 |
+
// set new value
|
4563 |
+
var oldValue = this.value;
|
4564 |
+
this.value = value;
|
4565 |
+
if (this.user) {
|
4566 |
+
try {
|
4567 |
+
this.cb.call(this.vm, value, oldValue);
|
4568 |
+
} catch (e) {
|
4569 |
+
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
|
4570 |
+
}
|
4571 |
+
} else {
|
4572 |
+
this.cb.call(this.vm, value, oldValue);
|
4573 |
+
}
|
4574 |
+
}
|
4575 |
+
}
|
4576 |
+
};
|
4577 |
+
|
4578 |
+
/**
|
4579 |
+
* Evaluate the value of the watcher.
|
4580 |
+
* This only gets called for lazy watchers.
|
4581 |
+
*/
|
4582 |
+
Watcher.prototype.evaluate = function evaluate () {
|
4583 |
+
this.value = this.get();
|
4584 |
+
this.dirty = false;
|
4585 |
+
};
|
4586 |
+
|
4587 |
+
/**
|
4588 |
+
* Depend on all deps collected by this watcher.
|
4589 |
+
*/
|
4590 |
+
Watcher.prototype.depend = function depend () {
|
4591 |
+
var i = this.deps.length;
|
4592 |
+
while (i--) {
|
4593 |
+
this.deps[i].depend();
|
4594 |
+
}
|
4595 |
+
};
|
4596 |
+
|
4597 |
+
/**
|
4598 |
+
* Remove self from all dependencies' subscriber list.
|
4599 |
+
*/
|
4600 |
+
Watcher.prototype.teardown = function teardown () {
|
4601 |
+
if (this.active) {
|
4602 |
+
// remove self from vm's watcher list
|
4603 |
+
// this is a somewhat expensive operation so we skip it
|
4604 |
+
// if the vm is being destroyed.
|
4605 |
+
if (!this.vm._isBeingDestroyed) {
|
4606 |
+
remove(this.vm._watchers, this);
|
4607 |
+
}
|
4608 |
+
var i = this.deps.length;
|
4609 |
+
while (i--) {
|
4610 |
+
this.deps[i].removeSub(this);
|
4611 |
+
}
|
4612 |
+
this.active = false;
|
4613 |
+
}
|
4614 |
+
};
|
4615 |
+
|
4616 |
+
/* */
|
4617 |
+
|
4618 |
+
var sharedPropertyDefinition = {
|
4619 |
+
enumerable: true,
|
4620 |
+
configurable: true,
|
4621 |
+
get: noop,
|
4622 |
+
set: noop
|
4623 |
+
};
|
4624 |
+
|
4625 |
+
function proxy (target, sourceKey, key) {
|
4626 |
+
sharedPropertyDefinition.get = function proxyGetter () {
|
4627 |
+
return this[sourceKey][key]
|
4628 |
+
};
|
4629 |
+
sharedPropertyDefinition.set = function proxySetter (val) {
|
4630 |
+
this[sourceKey][key] = val;
|
4631 |
+
};
|
4632 |
+
Object.defineProperty(target, key, sharedPropertyDefinition);
|
4633 |
+
}
|
4634 |
+
|
4635 |
+
function initState (vm) {
|
4636 |
+
vm._watchers = [];
|
4637 |
+
var opts = vm.$options;
|
4638 |
+
if (opts.props) { initProps(vm, opts.props); }
|
4639 |
+
if (opts.methods) { initMethods(vm, opts.methods); }
|
4640 |
+
if (opts.data) {
|
4641 |
+
initData(vm);
|
4642 |
+
} else {
|
4643 |
+
observe(vm._data = {}, true /* asRootData */);
|
4644 |
+
}
|
4645 |
+
if (opts.computed) { initComputed(vm, opts.computed); }
|
4646 |
+
if (opts.watch && opts.watch !== nativeWatch) {
|
4647 |
+
initWatch(vm, opts.watch);
|
4648 |
+
}
|
4649 |
+
}
|
4650 |
+
|
4651 |
+
function initProps (vm, propsOptions) {
|
4652 |
+
var propsData = vm.$options.propsData || {};
|
4653 |
+
var props = vm._props = {};
|
4654 |
+
// cache prop keys so that future props updates can iterate using Array
|
4655 |
+
// instead of dynamic object key enumeration.
|
4656 |
+
var keys = vm.$options._propKeys = [];
|
4657 |
+
var isRoot = !vm.$parent;
|
4658 |
+
// root instance props should be converted
|
4659 |
+
if (!isRoot) {
|
4660 |
+
toggleObserving(false);
|
4661 |
+
}
|
4662 |
+
var loop = function ( key ) {
|
4663 |
+
keys.push(key);
|
4664 |
+
var value = validateProp(key, propsOptions, propsData, vm);
|
4665 |
+
/* istanbul ignore else */
|
4666 |
+
{
|
4667 |
+
var hyphenatedKey = hyphenate(key);
|
4668 |
+
if (isReservedAttribute(hyphenatedKey) ||
|
4669 |
+
config.isReservedAttr(hyphenatedKey)) {
|
4670 |
+
warn(
|
4671 |
+
("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
|
4672 |
+
vm
|
4673 |
+
);
|
4674 |
+
}
|
4675 |
+
defineReactive$$1(props, key, value, function () {
|
4676 |
+
if (!isRoot && !isUpdatingChildComponent) {
|
4677 |
+
warn(
|
4678 |
+
"Avoid mutating a prop directly since the value will be " +
|
4679 |
+
"overwritten whenever the parent component re-renders. " +
|
4680 |
+
"Instead, use a data or computed property based on the prop's " +
|
4681 |
+
"value. Prop being mutated: \"" + key + "\"",
|
4682 |
+
vm
|
4683 |
+
);
|
4684 |
+
}
|
4685 |
+
});
|
4686 |
+
}
|
4687 |
+
// static props are already proxied on the component's prototype
|
4688 |
+
// during Vue.extend(). We only need to proxy props defined at
|
4689 |
+
// instantiation here.
|
4690 |
+
if (!(key in vm)) {
|
4691 |
+
proxy(vm, "_props", key);
|
4692 |
+
}
|
4693 |
+
};
|
4694 |
+
|
4695 |
+
for (var key in propsOptions) loop( key );
|
4696 |
+
toggleObserving(true);
|
4697 |
+
}
|
4698 |
+
|
4699 |
+
function initData (vm) {
|
4700 |
+
var data = vm.$options.data;
|
4701 |
+
data = vm._data = typeof data === 'function'
|
4702 |
+
? getData(data, vm)
|
4703 |
+
: data || {};
|
4704 |
+
if (!isPlainObject(data)) {
|
4705 |
+
data = {};
|
4706 |
+
warn(
|
4707 |
+
'data functions should return an object:\n' +
|
4708 |
+
'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
|
4709 |
+
vm
|
4710 |
+
);
|
4711 |
+
}
|
4712 |
+
// proxy data on instance
|
4713 |
+
var keys = Object.keys(data);
|
4714 |
+
var props = vm.$options.props;
|
4715 |
+
var methods = vm.$options.methods;
|
4716 |
+
var i = keys.length;
|
4717 |
+
while (i--) {
|
4718 |
+
var key = keys[i];
|
4719 |
+
{
|
4720 |
+
if (methods && hasOwn(methods, key)) {
|
4721 |
+
warn(
|
4722 |
+
("Method \"" + key + "\" has already been defined as a data property."),
|
4723 |
+
vm
|
4724 |
+
);
|
4725 |
+
}
|
4726 |
+
}
|
4727 |
+
if (props && hasOwn(props, key)) {
|
4728 |
+
warn(
|
4729 |
+
"The data property \"" + key + "\" is already declared as a prop. " +
|
4730 |
+
"Use prop default value instead.",
|
4731 |
+
vm
|
4732 |
+
);
|
4733 |
+
} else if (!isReserved(key)) {
|
4734 |
+
proxy(vm, "_data", key);
|
4735 |
+
}
|
4736 |
+
}
|
4737 |
+
// observe data
|
4738 |
+
observe(data, true /* asRootData */);
|
4739 |
+
}
|
4740 |
+
|
4741 |
+
function getData (data, vm) {
|
4742 |
+
// #7573 disable dep collection when invoking data getters
|
4743 |
+
pushTarget();
|
4744 |
+
try {
|
4745 |
+
return data.call(vm, vm)
|
4746 |
+
} catch (e) {
|
4747 |
+
handleError(e, vm, "data()");
|
4748 |
+
return {}
|
4749 |
+
} finally {
|
4750 |
+
popTarget();
|
4751 |
+
}
|
4752 |
+
}
|
4753 |
+
|
4754 |
+
var computedWatcherOptions = { lazy: true };
|
4755 |
+
|
4756 |
+
function initComputed (vm, computed) {
|
4757 |
+
// $flow-disable-line
|
4758 |
+
var watchers = vm._computedWatchers = Object.create(null);
|
4759 |
+
// computed properties are just getters during SSR
|
4760 |
+
var isSSR = isServerRendering();
|
4761 |
+
|
4762 |
+
for (var key in computed) {
|
4763 |
+
var userDef = computed[key];
|
4764 |
+
var getter = typeof userDef === 'function' ? userDef : userDef.get;
|
4765 |
+
if (getter == null) {
|
4766 |
+
warn(
|
4767 |
+
("Getter is missing for computed property \"" + key + "\"."),
|
4768 |
+
vm
|
4769 |
+
);
|
4770 |
+
}
|
4771 |
+
|
4772 |
+
if (!isSSR) {
|
4773 |
+
// create internal watcher for the computed property.
|
4774 |
+
watchers[key] = new Watcher(
|
4775 |
+
vm,
|
4776 |
+
getter || noop,
|
4777 |
+
noop,
|
4778 |
+
computedWatcherOptions
|
4779 |
+
);
|
4780 |
+
}
|
4781 |
+
|
4782 |
+
// component-defined computed properties are already defined on the
|
4783 |
+
// component prototype. We only need to define computed properties defined
|
4784 |
+
// at instantiation here.
|
4785 |
+
if (!(key in vm)) {
|
4786 |
+
defineComputed(vm, key, userDef);
|
4787 |
+
} else {
|
4788 |
+
if (key in vm.$data) {
|
4789 |
+
warn(("The computed property \"" + key + "\" is already defined in data."), vm);
|
4790 |
+
} else if (vm.$options.props && key in vm.$options.props) {
|
4791 |
+
warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
|
4792 |
+
}
|
4793 |
+
}
|
4794 |
+
}
|
4795 |
+
}
|
4796 |
+
|
4797 |
+
function defineComputed (
|
4798 |
+
target,
|
4799 |
+
key,
|
4800 |
+
userDef
|
4801 |
+
) {
|
4802 |
+
var shouldCache = !isServerRendering();
|
4803 |
+
if (typeof userDef === 'function') {
|
4804 |
+
sharedPropertyDefinition.get = shouldCache
|
4805 |
+
? createComputedGetter(key)
|
4806 |
+
: createGetterInvoker(userDef);
|
4807 |
+
sharedPropertyDefinition.set = noop;
|
4808 |
+
} else {
|
4809 |
+
sharedPropertyDefinition.get = userDef.get
|
4810 |
+
? shouldCache && userDef.cache !== false
|
4811 |
+
? createComputedGetter(key)
|
4812 |
+
: createGetterInvoker(userDef.get)
|
4813 |
+
: noop;
|
4814 |
+
sharedPropertyDefinition.set = userDef.set || noop;
|
4815 |
+
}
|
4816 |
+
if (sharedPropertyDefinition.set === noop) {
|
4817 |
+
sharedPropertyDefinition.set = function () {
|
4818 |
+
warn(
|
4819 |
+
("Computed property \"" + key + "\" was assigned to but it has no setter."),
|
4820 |
+
this
|
4821 |
+
);
|
4822 |
+
};
|
4823 |
+
}
|
4824 |
+
Object.defineProperty(target, key, sharedPropertyDefinition);
|
4825 |
+
}
|
4826 |
+
|
4827 |
+
function createComputedGetter (key) {
|
4828 |
+
return function computedGetter () {
|
4829 |
+
var watcher = this._computedWatchers && this._computedWatchers[key];
|
4830 |
+
if (watcher) {
|
4831 |
+
if (watcher.dirty) {
|
4832 |
+
watcher.evaluate();
|
4833 |
+
}
|
4834 |
+
if (Dep.target) {
|
4835 |
+
watcher.depend();
|
4836 |
+
}
|
4837 |
+
return watcher.value
|
4838 |
+
}
|
4839 |
+
}
|
4840 |
+
}
|
4841 |
+
|
4842 |
+
function createGetterInvoker(fn) {
|
4843 |
+
return function computedGetter () {
|
4844 |
+
return fn.call(this, this)
|
4845 |
+
}
|
4846 |
+
}
|
4847 |
+
|
4848 |
+
function initMethods (vm, methods) {
|
4849 |
+
var props = vm.$options.props;
|
4850 |
+
for (var key in methods) {
|
4851 |
+
{
|
4852 |
+
if (typeof methods[key] !== 'function') {
|
4853 |
+
warn(
|
4854 |
+
"Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
|
4855 |
+
"Did you reference the function correctly?",
|
4856 |
+
vm
|
4857 |
+
);
|
4858 |
+
}
|
4859 |
+
if (props && hasOwn(props, key)) {
|
4860 |
+
warn(
|
4861 |
+
("Method \"" + key + "\" has already been defined as a prop."),
|
4862 |
+
vm
|
4863 |
+
);
|
4864 |
+
}
|
4865 |
+
if ((key in vm) && isReserved(key)) {
|
4866 |
+
warn(
|
4867 |
+
"Method \"" + key + "\" conflicts with an existing Vue instance method. " +
|
4868 |
+
"Avoid defining component methods that start with _ or $."
|
4869 |
+
);
|
4870 |
+
}
|
4871 |
+
}
|
4872 |
+
vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
|
4873 |
+
}
|
4874 |
+
}
|
4875 |
+
|
4876 |
+
function initWatch (vm, watch) {
|
4877 |
+
for (var key in watch) {
|
4878 |
+
var handler = watch[key];
|
4879 |
+
if (Array.isArray(handler)) {
|
4880 |
+
for (var i = 0; i < handler.length; i++) {
|
4881 |
+
createWatcher(vm, key, handler[i]);
|
4882 |
+
}
|
4883 |
+
} else {
|
4884 |
+
createWatcher(vm, key, handler);
|
4885 |
+
}
|
4886 |
+
}
|
4887 |
+
}
|
4888 |
+
|
4889 |
+
function createWatcher (
|
4890 |
+
vm,
|
4891 |
+
expOrFn,
|
4892 |
+
handler,
|
4893 |
+
options
|
4894 |
+
) {
|
4895 |
+
if (isPlainObject(handler)) {
|
4896 |
+
options = handler;
|
4897 |
+
handler = handler.handler;
|
4898 |
+
}
|
4899 |
+
if (typeof handler === 'string') {
|
4900 |
+
handler = vm[handler];
|
4901 |
+
}
|
4902 |
+
return vm.$watch(expOrFn, handler, options)
|
4903 |
+
}
|
4904 |
+
|
4905 |
+
function stateMixin (Vue) {
|
4906 |
+
// flow somehow has problems with directly declared definition object
|
4907 |
+
// when using Object.defineProperty, so we have to procedurally build up
|
4908 |
+
// the object here.
|
4909 |
+
var dataDef = {};
|
4910 |
+
dataDef.get = function () { return this._data };
|
4911 |
+
var propsDef = {};
|
4912 |
+
propsDef.get = function () { return this._props };
|
4913 |
+
{
|
4914 |
+
dataDef.set = function () {
|
4915 |
+
warn(
|
4916 |
+
'Avoid replacing instance root $data. ' +
|
4917 |
+
'Use nested data properties instead.',
|
4918 |
+
this
|
4919 |
+
);
|
4920 |
+
};
|
4921 |
+
propsDef.set = function () {
|
4922 |
+
warn("$props is readonly.", this);
|
4923 |
+
};
|
4924 |
+
}
|
4925 |
+
Object.defineProperty(Vue.prototype, '$data', dataDef);
|
4926 |
+
Object.defineProperty(Vue.prototype, '$props', propsDef);
|
4927 |
+
|
4928 |
+
Vue.prototype.$set = set;
|
4929 |
+
Vue.prototype.$delete = del;
|
4930 |
+
|
4931 |
+
Vue.prototype.$watch = function (
|
4932 |
+
expOrFn,
|
4933 |
+
cb,
|
4934 |
+
options
|
4935 |
+
) {
|
4936 |
+
var vm = this;
|
4937 |
+
if (isPlainObject(cb)) {
|
4938 |
+
return createWatcher(vm, expOrFn, cb, options)
|
4939 |
+
}
|
4940 |
+
options = options || {};
|
4941 |
+
options.user = true;
|
4942 |
+
var watcher = new Watcher(vm, expOrFn, cb, options);
|
4943 |
+
if (options.immediate) {
|
4944 |
+
try {
|
4945 |
+
cb.call(vm, watcher.value);
|
4946 |
+
} catch (error) {
|
4947 |
+
handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
|
4948 |
+
}
|
4949 |
+
}
|
4950 |
+
return function unwatchFn () {
|
4951 |
+
watcher.teardown();
|
4952 |
+
}
|
4953 |
+
};
|
4954 |
+
}
|
4955 |
+
|
4956 |
+
/* */
|
4957 |
+
|
4958 |
+
var uid$3 = 0;
|
4959 |
+
|
4960 |
+
function initMixin (Vue) {
|
4961 |
+
Vue.prototype._init = function (options) {
|
4962 |
+
var vm = this;
|
4963 |
+
// a uid
|
4964 |
+
vm._uid = uid$3++;
|
4965 |
+
|
4966 |
+
var startTag, endTag;
|
4967 |
+
/* istanbul ignore if */
|
4968 |
+
if (config.performance && mark) {
|
4969 |
+
startTag = "vue-perf-start:" + (vm._uid);
|
4970 |
+
endTag = "vue-perf-end:" + (vm._uid);
|
4971 |
+
mark(startTag);
|
4972 |
+
}
|
4973 |
+
|
4974 |
+
// a flag to avoid this being observed
|
4975 |
+
vm._isVue = true;
|
4976 |
+
// merge options
|
4977 |
+
if (options && options._isComponent) {
|
4978 |
+
// optimize internal component instantiation
|
4979 |
+
// since dynamic options merging is pretty slow, and none of the
|
4980 |
+
// internal component options needs special treatment.
|
4981 |
+
initInternalComponent(vm, options);
|
4982 |
+
} else {
|
4983 |
+
vm.$options = mergeOptions(
|
4984 |
+
resolveConstructorOptions(vm.constructor),
|
4985 |
+
options || {},
|
4986 |
+
vm
|
4987 |
+
);
|
4988 |
+
}
|
4989 |
+
/* istanbul ignore else */
|
4990 |
+
{
|
4991 |
+
initProxy(vm);
|
4992 |
+
}
|
4993 |
+
// expose real self
|
4994 |
+
vm._self = vm;
|
4995 |
+
initLifecycle(vm);
|
4996 |
+
initEvents(vm);
|
4997 |
+
initRender(vm);
|
4998 |
+
callHook(vm, 'beforeCreate');
|
4999 |
+
initInjections(vm); // resolve injections before data/props
|
5000 |
+
initState(vm);
|
5001 |
+
initProvide(vm); // resolve provide after data/props
|
5002 |
+
callHook(vm, 'created');
|
5003 |
+
|
5004 |
+
/* istanbul ignore if */
|
5005 |
+
if (config.performance && mark) {
|
5006 |
+
vm._name = formatComponentName(vm, false);
|
5007 |
+
mark(endTag);
|
5008 |
+
measure(("vue " + (vm._name) + " init"), startTag, endTag);
|
5009 |
+
}
|
5010 |
+
|
5011 |
+
if (vm.$options.el) {
|
5012 |
+
vm.$mount(vm.$options.el);
|
5013 |
+
}
|
5014 |
+
};
|
5015 |
+
}
|
5016 |
+
|
5017 |
+
function initInternalComponent (vm, options) {
|
5018 |
+
var opts = vm.$options = Object.create(vm.constructor.options);
|
5019 |
+
// doing this because it's faster than dynamic enumeration.
|
5020 |
+
var parentVnode = options._parentVnode;
|
5021 |
+
opts.parent = options.parent;
|
5022 |
+
opts._parentVnode = parentVnode;
|
5023 |
+
|
5024 |
+
var vnodeComponentOptions = parentVnode.componentOptions;
|
5025 |
+
opts.propsData = vnodeComponentOptions.propsData;
|
5026 |
+
opts._parentListeners = vnodeComponentOptions.listeners;
|
5027 |
+
opts._renderChildren = vnodeComponentOptions.children;
|
5028 |
+
opts._componentTag = vnodeComponentOptions.tag;
|
5029 |
+
|
5030 |
+
if (options.render) {
|
5031 |
+
opts.render = options.render;
|
5032 |
+
opts.staticRenderFns = options.staticRenderFns;
|
5033 |
+
}
|
5034 |
+
}
|
5035 |
+
|
5036 |
+
function resolveConstructorOptions (Ctor) {
|
5037 |
+
var options = Ctor.options;
|
5038 |
+
if (Ctor.super) {
|
5039 |
+
var superOptions = resolveConstructorOptions(Ctor.super);
|
5040 |
+
var cachedSuperOptions = Ctor.superOptions;
|
5041 |
+
if (superOptions !== cachedSuperOptions) {
|
5042 |
+
// super option changed,
|
5043 |
+
// need to resolve new options.
|
5044 |
+
Ctor.superOptions = superOptions;
|
5045 |
+
// check if there are any late-modified/attached options (#4976)
|
5046 |
+
var modifiedOptions = resolveModifiedOptions(Ctor);
|
5047 |
+
// update base extend options
|
5048 |
+
if (modifiedOptions) {
|
5049 |
+
extend(Ctor.extendOptions, modifiedOptions);
|
5050 |
+
}
|
5051 |
+
options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
|
5052 |
+
if (options.name) {
|
5053 |
+
options.components[options.name] = Ctor;
|
5054 |
+
}
|
5055 |
+
}
|
5056 |
+
}
|
5057 |
+
return options
|
5058 |
+
}
|
5059 |
+
|
5060 |
+
function resolveModifiedOptions (Ctor) {
|
5061 |
+
var modified;
|
5062 |
+
var latest = Ctor.options;
|
5063 |
+
var sealed = Ctor.sealedOptions;
|
5064 |
+
for (var key in latest) {
|
5065 |
+
if (latest[key] !== sealed[key]) {
|
5066 |
+
if (!modified) { modified = {}; }
|
5067 |
+
modified[key] = latest[key];
|
5068 |
+
}
|
5069 |
+
}
|
5070 |
+
return modified
|
5071 |
+
}
|
5072 |
+
|
5073 |
+
function Vue (options) {
|
5074 |
+
if (!(this instanceof Vue)
|
5075 |
+
) {
|
5076 |
+
warn('Vue is a constructor and should be called with the `new` keyword');
|
5077 |
+
}
|
5078 |
+
this._init(options);
|
5079 |
+
}
|
5080 |
+
|
5081 |
+
initMixin(Vue);
|
5082 |
+
stateMixin(Vue);
|
5083 |
+
eventsMixin(Vue);
|
5084 |
+
lifecycleMixin(Vue);
|
5085 |
+
renderMixin(Vue);
|
5086 |
+
|
5087 |
+
/* */
|
5088 |
+
|
5089 |
+
function initUse (Vue) {
|
5090 |
+
Vue.use = function (plugin) {
|
5091 |
+
var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
|
5092 |
+
if (installedPlugins.indexOf(plugin) > -1) {
|
5093 |
+
return this
|
5094 |
+
}
|
5095 |
+
|
5096 |
+
// additional parameters
|
5097 |
+
var args = toArray(arguments, 1);
|
5098 |
+
args.unshift(this);
|
5099 |
+
if (typeof plugin.install === 'function') {
|
5100 |
+
plugin.install.apply(plugin, args);
|
5101 |
+
} else if (typeof plugin === 'function') {
|
5102 |
+
plugin.apply(null, args);
|
5103 |
+
}
|
5104 |
+
installedPlugins.push(plugin);
|
5105 |
+
return this
|
5106 |
+
};
|
5107 |
+
}
|
5108 |
+
|
5109 |
+
/* */
|
5110 |
+
|
5111 |
+
function initMixin$1 (Vue) {
|
5112 |
+
Vue.mixin = function (mixin) {
|
5113 |
+
this.options = mergeOptions(this.options, mixin);
|
5114 |
+
return this
|
5115 |
+
};
|
5116 |
+
}
|
5117 |
+
|
5118 |
+
/* */
|
5119 |
+
|
5120 |
+
function initExtend (Vue) {
|
5121 |
+
/**
|
5122 |
+
* Each instance constructor, including Vue, has a unique
|
5123 |
+
* cid. This enables us to create wrapped "child
|
5124 |
+
* constructors" for prototypal inheritance and cache them.
|
5125 |
+
*/
|
5126 |
+
Vue.cid = 0;
|
5127 |
+
var cid = 1;
|
5128 |
+
|
5129 |
+
/**
|
5130 |
+
* Class inheritance
|
5131 |
+
*/
|
5132 |
+
Vue.extend = function (extendOptions) {
|
5133 |
+
extendOptions = extendOptions || {};
|
5134 |
+
var Super = this;
|
5135 |
+
var SuperId = Super.cid;
|
5136 |
+
var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
|
5137 |
+
if (cachedCtors[SuperId]) {
|
5138 |
+
return cachedCtors[SuperId]
|
5139 |
+
}
|
5140 |
+
|
5141 |
+
var name = extendOptions.name || Super.options.name;
|
5142 |
+
if (name) {
|
5143 |
+
validateComponentName(name);
|
5144 |
+
}
|
5145 |
+
|
5146 |
+
var Sub = function VueComponent (options) {
|
5147 |
+
this._init(options);
|
5148 |
+
};
|
5149 |
+
Sub.prototype = Object.create(Super.prototype);
|
5150 |
+
Sub.prototype.constructor = Sub;
|
5151 |
+
Sub.cid = cid++;
|
5152 |
+
Sub.options = mergeOptions(
|
5153 |
+
Super.options,
|
5154 |
+
extendOptions
|
5155 |
+
);
|
5156 |
+
Sub['super'] = Super;
|
5157 |
+
|
5158 |
+
// For props and computed properties, we define the proxy getters on
|
5159 |
+
// the Vue instances at extension time, on the extended prototype. This
|
5160 |
+
// avoids Object.defineProperty calls for each instance created.
|
5161 |
+
if (Sub.options.props) {
|
5162 |
+
initProps$1(Sub);
|
5163 |
+
}
|
5164 |
+
if (Sub.options.computed) {
|
5165 |
+
initComputed$1(Sub);
|
5166 |
+
}
|
5167 |
+
|
5168 |
+
// allow further extension/mixin/plugin usage
|
5169 |
+
Sub.extend = Super.extend;
|
5170 |
+
Sub.mixin = Super.mixin;
|
5171 |
+
Sub.use = Super.use;
|
5172 |
+
|
5173 |
+
// create asset registers, so extended classes
|
5174 |
+
// can have their private assets too.
|
5175 |
+
ASSET_TYPES.forEach(function (type) {
|
5176 |
+
Sub[type] = Super[type];
|
5177 |
+
});
|
5178 |
+
// enable recursive self-lookup
|
5179 |
+
if (name) {
|
5180 |
+
Sub.options.components[name] = Sub;
|
5181 |
+
}
|
5182 |
+
|
5183 |
+
// keep a reference to the super options at extension time.
|
5184 |
+
// later at instantiation we can check if Super's options have
|
5185 |
+
// been updated.
|
5186 |
+
Sub.superOptions = Super.options;
|
5187 |
+
Sub.extendOptions = extendOptions;
|
5188 |
+
Sub.sealedOptions = extend({}, Sub.options);
|
5189 |
+
|
5190 |
+
// cache constructor
|
5191 |
+
cachedCtors[SuperId] = Sub;
|
5192 |
+
return Sub
|
5193 |
+
};
|
5194 |
+
}
|
5195 |
+
|
5196 |
+
function initProps$1 (Comp) {
|
5197 |
+
var props = Comp.options.props;
|
5198 |
+
for (var key in props) {
|
5199 |
+
proxy(Comp.prototype, "_props", key);
|
5200 |
+
}
|
5201 |
+
}
|
5202 |
+
|
5203 |
+
function initComputed$1 (Comp) {
|
5204 |
+
var computed = Comp.options.computed;
|
5205 |
+
for (var key in computed) {
|
5206 |
+
defineComputed(Comp.prototype, key, computed[key]);
|
5207 |
+
}
|
5208 |
+
}
|
5209 |
+
|
5210 |
+
/* */
|
5211 |
+
|
5212 |
+
function initAssetRegisters (Vue) {
|
5213 |
+
/**
|
5214 |
+
* Create asset registration methods.
|
5215 |
+
*/
|
5216 |
+
ASSET_TYPES.forEach(function (type) {
|
5217 |
+
Vue[type] = function (
|
5218 |
+
id,
|
5219 |
+
definition
|
5220 |
+
) {
|
5221 |
+
if (!definition) {
|
5222 |
+
return this.options[type + 's'][id]
|
5223 |
+
} else {
|
5224 |
+
/* istanbul ignore if */
|
5225 |
+
if (type === 'component') {
|
5226 |
+
validateComponentName(id);
|
5227 |
+
}
|
5228 |
+
if (type === 'component' && isPlainObject(definition)) {
|
5229 |
+
definition.name = definition.name || id;
|
5230 |
+
definition = this.options._base.extend(definition);
|
5231 |
+
}
|
5232 |
+
if (type === 'directive' && typeof definition === 'function') {
|
5233 |
+
definition = { bind: definition, update: definition };
|
5234 |
+
}
|
5235 |
+
this.options[type + 's'][id] = definition;
|
5236 |
+
return definition
|
5237 |
+
}
|
5238 |
+
};
|
5239 |
+
});
|
5240 |
+
}
|
5241 |
+
|
5242 |
+
/* */
|
5243 |
+
|
5244 |
+
|
5245 |
+
|
5246 |
+
function getComponentName (opts) {
|
5247 |
+
return opts && (opts.Ctor.options.name || opts.tag)
|
5248 |
+
}
|
5249 |
+
|
5250 |
+
function matches (pattern, name) {
|
5251 |
+
if (Array.isArray(pattern)) {
|
5252 |
+
return pattern.indexOf(name) > -1
|
5253 |
+
} else if (typeof pattern === 'string') {
|
5254 |
+
return pattern.split(',').indexOf(name) > -1
|
5255 |
+
} else if (isRegExp(pattern)) {
|
5256 |
+
return pattern.test(name)
|
5257 |
+
}
|
5258 |
+
/* istanbul ignore next */
|
5259 |
+
return false
|
5260 |
+
}
|
5261 |
+
|
5262 |
+
function pruneCache (keepAliveInstance, filter) {
|
5263 |
+
var cache = keepAliveInstance.cache;
|
5264 |
+
var keys = keepAliveInstance.keys;
|
5265 |
+
var _vnode = keepAliveInstance._vnode;
|
5266 |
+
for (var key in cache) {
|
5267 |
+
var cachedNode = cache[key];
|
5268 |
+
if (cachedNode) {
|
5269 |
+
var name = getComponentName(cachedNode.componentOptions);
|
5270 |
+
if (name && !filter(name)) {
|
5271 |
+
pruneCacheEntry(cache, key, keys, _vnode);
|
5272 |
+
}
|
5273 |
+
}
|
5274 |
+
}
|
5275 |
+
}
|
5276 |
+
|
5277 |
+
function pruneCacheEntry (
|
5278 |
+
cache,
|
5279 |
+
key,
|
5280 |
+
keys,
|
5281 |
+
current
|
5282 |
+
) {
|
5283 |
+
var cached$$1 = cache[key];
|
5284 |
+
if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
|
5285 |
+
cached$$1.componentInstance.$destroy();
|
5286 |
+
}
|
5287 |
+
cache[key] = null;
|
5288 |
+
remove(keys, key);
|
5289 |
+
}
|
5290 |
+
|
5291 |
+
var patternTypes = [String, RegExp, Array];
|
5292 |
+
|
5293 |
+
var KeepAlive = {
|
5294 |
+
name: 'keep-alive',
|
5295 |
+
abstract: true,
|
5296 |
+
|
5297 |
+
props: {
|
5298 |
+
include: patternTypes,
|
5299 |
+
exclude: patternTypes,
|
5300 |
+
max: [String, Number]
|
5301 |
+
},
|
5302 |
+
|
5303 |
+
created: function created () {
|
5304 |
+
this.cache = Object.create(null);
|
5305 |
+
this.keys = [];
|
5306 |
+
},
|
5307 |
+
|
5308 |
+
destroyed: function destroyed () {
|
5309 |
+
for (var key in this.cache) {
|
5310 |
+
pruneCacheEntry(this.cache, key, this.keys);
|
5311 |
+
}
|
5312 |
+
},
|
5313 |
+
|
5314 |
+
mounted: function mounted () {
|
5315 |
+
var this$1 = this;
|
5316 |
+
|
5317 |
+
this.$watch('include', function (val) {
|
5318 |
+
pruneCache(this$1, function (name) { return matches(val, name); });
|
5319 |
+
});
|
5320 |
+
this.$watch('exclude', function (val) {
|
5321 |
+
pruneCache(this$1, function (name) { return !matches(val, name); });
|
5322 |
+
});
|
5323 |
+
},
|
5324 |
+
|
5325 |
+
render: function render () {
|
5326 |
+
var slot = this.$slots.default;
|
5327 |
+
var vnode = getFirstComponentChild(slot);
|
5328 |
+
var componentOptions = vnode && vnode.componentOptions;
|
5329 |
+
if (componentOptions) {
|
5330 |
+
// check pattern
|
5331 |
+
var name = getComponentName(componentOptions);
|
5332 |
+
var ref = this;
|
5333 |
+
var include = ref.include;
|
5334 |
+
var exclude = ref.exclude;
|
5335 |
+
if (
|
5336 |
+
// not included
|
5337 |
+
(include && (!name || !matches(include, name))) ||
|
5338 |
+
// excluded
|
5339 |
+
(exclude && name && matches(exclude, name))
|
5340 |
+
) {
|
5341 |
+
return vnode
|
5342 |
+
}
|
5343 |
+
|
5344 |
+
var ref$1 = this;
|
5345 |
+
var cache = ref$1.cache;
|
5346 |
+
var keys = ref$1.keys;
|
5347 |
+
var key = vnode.key == null
|
5348 |
+
// same constructor may get registered as different local components
|
5349 |
+
// so cid alone is not enough (#3269)
|
5350 |
+
? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
|
5351 |
+
: vnode.key;
|
5352 |
+
if (cache[key]) {
|
5353 |
+
vnode.componentInstance = cache[key].componentInstance;
|
5354 |
+
// make current key freshest
|
5355 |
+
remove(keys, key);
|
5356 |
+
keys.push(key);
|
5357 |
+
} else {
|
5358 |
+
cache[key] = vnode;
|
5359 |
+
keys.push(key);
|
5360 |
+
// prune oldest entry
|
5361 |
+
if (this.max && keys.length > parseInt(this.max)) {
|
5362 |
+
pruneCacheEntry(cache, keys[0], keys, this._vnode);
|
5363 |
+
}
|
5364 |
+
}
|
5365 |
+
|
5366 |
+
vnode.data.keepAlive = true;
|
5367 |
+
}
|
5368 |
+
return vnode || (slot && slot[0])
|
5369 |
+
}
|
5370 |
+
};
|
5371 |
+
|
5372 |
+
var builtInComponents = {
|
5373 |
+
KeepAlive: KeepAlive
|
5374 |
+
};
|
5375 |
+
|
5376 |
+
/* */
|
5377 |
+
|
5378 |
+
function initGlobalAPI (Vue) {
|
5379 |
+
// config
|
5380 |
+
var configDef = {};
|
5381 |
+
configDef.get = function () { return config; };
|
5382 |
+
{
|
5383 |
+
configDef.set = function () {
|
5384 |
+
warn(
|
5385 |
+
'Do not replace the Vue.config object, set individual fields instead.'
|
5386 |
+
);
|
5387 |
+
};
|
5388 |
+
}
|
5389 |
+
Object.defineProperty(Vue, 'config', configDef);
|
5390 |
+
|
5391 |
+
// exposed util methods.
|
5392 |
+
// NOTE: these are not considered part of the public API - avoid relying on
|
5393 |
+
// them unless you are aware of the risk.
|
5394 |
+
Vue.util = {
|
5395 |
+
warn: warn,
|
5396 |
+
extend: extend,
|
5397 |
+
mergeOptions: mergeOptions,
|
5398 |
+
defineReactive: defineReactive$$1
|
5399 |
+
};
|
5400 |
+
|
5401 |
+
Vue.set = set;
|
5402 |
+
Vue.delete = del;
|
5403 |
+
Vue.nextTick = nextTick;
|
5404 |
+
|
5405 |
+
// 2.6 explicit observable API
|
5406 |
+
Vue.observable = function (obj) {
|
5407 |
+
observe(obj);
|
5408 |
+
return obj
|
5409 |
+
};
|
5410 |
+
|
5411 |
+
Vue.options = Object.create(null);
|
5412 |
+
ASSET_TYPES.forEach(function (type) {
|
5413 |
+
Vue.options[type + 's'] = Object.create(null);
|
5414 |
+
});
|
5415 |
+
|
5416 |
+
// this is used to identify the "base" constructor to extend all plain-object
|
5417 |
+
// components with in Weex's multi-instance scenarios.
|
5418 |
+
Vue.options._base = Vue;
|
5419 |
+
|
5420 |
+
extend(Vue.options.components, builtInComponents);
|
5421 |
+
|
5422 |
+
initUse(Vue);
|
5423 |
+
initMixin$1(Vue);
|
5424 |
+
initExtend(Vue);
|
5425 |
+
initAssetRegisters(Vue);
|
5426 |
+
}
|
5427 |
+
|
5428 |
+
initGlobalAPI(Vue);
|
5429 |
+
|
5430 |
+
Object.defineProperty(Vue.prototype, '$isServer', {
|
5431 |
+
get: isServerRendering
|
5432 |
+
});
|
5433 |
+
|
5434 |
+
Object.defineProperty(Vue.prototype, '$ssrContext', {
|
5435 |
+
get: function get () {
|
5436 |
+
/* istanbul ignore next */
|
5437 |
+
return this.$vnode && this.$vnode.ssrContext
|
5438 |
+
}
|
5439 |
+
});
|
5440 |
+
|
5441 |
+
// expose FunctionalRenderContext for ssr runtime helper installation
|
5442 |
+
Object.defineProperty(Vue, 'FunctionalRenderContext', {
|
5443 |
+
value: FunctionalRenderContext
|
5444 |
+
});
|
5445 |
+
|
5446 |
+
Vue.version = '2.6.12';
|
5447 |
+
|
5448 |
+
/* */
|
5449 |
+
|
5450 |
+
// these are reserved for web because they are directly compiled away
|
5451 |
+
// during template compilation
|
5452 |
+
var isReservedAttr = makeMap('style,class');
|
5453 |
+
|
5454 |
+
// attributes that should be using props for binding
|
5455 |
+
var acceptValue = makeMap('input,textarea,option,select,progress');
|
5456 |
+
var mustUseProp = function (tag, type, attr) {
|
5457 |
+
return (
|
5458 |
+
(attr === 'value' && acceptValue(tag)) && type !== 'button' ||
|
5459 |
+
(attr === 'selected' && tag === 'option') ||
|
5460 |
+
(attr === 'checked' && tag === 'input') ||
|
5461 |
+
(attr === 'muted' && tag === 'video')
|
5462 |
+
)
|
5463 |
+
};
|
5464 |
+
|
5465 |
+
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');
|
5466 |
+
|
5467 |
+
var isValidContentEditableValue = makeMap('events,caret,typing,plaintext-only');
|
5468 |
+
|
5469 |
+
var convertEnumeratedValue = function (key, value) {
|
5470 |
+
return isFalsyAttrValue(value) || value === 'false'
|
5471 |
+
? 'false'
|
5472 |
+
// allow arbitrary string value for contenteditable
|
5473 |
+
: key === 'contenteditable' && isValidContentEditableValue(value)
|
5474 |
+
? value
|
5475 |
+
: 'true'
|
5476 |
+
};
|
5477 |
+
|
5478 |
+
var isBooleanAttr = makeMap(
|
5479 |
+
'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +
|
5480 |
+
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +
|
5481 |
+
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +
|
5482 |
+
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +
|
5483 |
+
'required,reversed,scoped,seamless,selected,sortable,translate,' +
|
5484 |
+
'truespeed,typemustmatch,visible'
|
5485 |
+
);
|
5486 |
+
|
5487 |
+
var xlinkNS = 'http://www.w3.org/1999/xlink';
|
5488 |
+
|
5489 |
+
var isXlink = function (name) {
|
5490 |
+
return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'
|
5491 |
+
};
|
5492 |
+
|
5493 |
+
var getXlinkProp = function (name) {
|
5494 |
+
return isXlink(name) ? name.slice(6, name.length) : ''
|
5495 |
+
};
|
5496 |
+
|
5497 |
+
var isFalsyAttrValue = function (val) {
|
5498 |
+
return val == null || val === false
|
5499 |
+
};
|
5500 |
+
|
5501 |
+
/* */
|
5502 |
+
|
5503 |
+
function genClassForVnode (vnode) {
|
5504 |
+
var data = vnode.data;
|
5505 |
+
var parentNode = vnode;
|
5506 |
+
var childNode = vnode;
|
5507 |
+
while (isDef(childNode.componentInstance)) {
|
5508 |
+
childNode = childNode.componentInstance._vnode;
|
5509 |
+
if (childNode && childNode.data) {
|
5510 |
+
data = mergeClassData(childNode.data, data);
|
5511 |
+
}
|
5512 |
+
}
|
5513 |
+
while (isDef(parentNode = parentNode.parent)) {
|
5514 |
+
if (parentNode && parentNode.data) {
|
5515 |
+
data = mergeClassData(data, parentNode.data);
|
5516 |
+
}
|
5517 |
+
}
|
5518 |
+
return renderClass(data.staticClass, data.class)
|
5519 |
+
}
|
5520 |
+
|
5521 |
+
function mergeClassData (child, parent) {
|
5522 |
+
return {
|
5523 |
+
staticClass: concat(child.staticClass, parent.staticClass),
|
5524 |
+
class: isDef(child.class)
|
5525 |
+
? [child.class, parent.class]
|
5526 |
+
: parent.class
|
5527 |
+
}
|
5528 |
+
}
|
5529 |
+
|
5530 |
+
function renderClass (
|
5531 |
+
staticClass,
|
5532 |
+
dynamicClass
|
5533 |
+
) {
|
5534 |
+
if (isDef(staticClass) || isDef(dynamicClass)) {
|
5535 |
+
return concat(staticClass, stringifyClass(dynamicClass))
|
5536 |
+
}
|
5537 |
+
/* istanbul ignore next */
|
5538 |
+
return ''
|
5539 |
+
}
|
5540 |
+
|
5541 |
+
function concat (a, b) {
|
5542 |
+
return a ? b ? (a + ' ' + b) : a : (b || '')
|
5543 |
+
}
|
5544 |
+
|
5545 |
+
function stringifyClass (value) {
|
5546 |
+
if (Array.isArray(value)) {
|
5547 |
+
return stringifyArray(value)
|
5548 |
+
}
|
5549 |
+
if (isObject(value)) {
|
5550 |
+
return stringifyObject(value)
|
5551 |
+
}
|
5552 |
+
if (typeof value === 'string') {
|
5553 |
+
return value
|
5554 |
+
}
|
5555 |
+
/* istanbul ignore next */
|
5556 |
+
return ''
|
5557 |
+
}
|
5558 |
+
|
5559 |
+
function stringifyArray (value) {
|
5560 |
+
var res = '';
|
5561 |
+
var stringified;
|
5562 |
+
for (var i = 0, l = value.length; i < l; i++) {
|
5563 |
+
if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
|
5564 |
+
if (res) { res += ' '; }
|
5565 |
+
res += stringified;
|
5566 |
+
}
|
5567 |
+
}
|
5568 |
+
return res
|
5569 |
+
}
|
5570 |
+
|
5571 |
+
function stringifyObject (value) {
|
5572 |
+
var res = '';
|
5573 |
+
for (var key in value) {
|
5574 |
+
if (value[key]) {
|
5575 |
+
if (res) { res += ' '; }
|
5576 |
+
res += key;
|
5577 |
+
}
|
5578 |
+
}
|
5579 |
+
return res
|
5580 |
+
}
|
5581 |
+
|
5582 |
+
/* */
|
5583 |
+
|
5584 |
+
var namespaceMap = {
|
5585 |
+
svg: 'http://www.w3.org/2000/svg',
|
5586 |
+
math: 'http://www.w3.org/1998/Math/MathML'
|
5587 |
+
};
|
5588 |
+
|
5589 |
+
var isHTMLTag = makeMap(
|
5590 |
+
'html,body,base,head,link,meta,style,title,' +
|
5591 |
+
'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
|
5592 |
+
'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
|
5593 |
+
'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
|
5594 |
+
's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
|
5595 |
+
'embed,object,param,source,canvas,script,noscript,del,ins,' +
|
5596 |
+
'caption,col,colgroup,table,thead,tbody,td,th,tr,' +
|
5597 |
+
'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
|
5598 |
+
'output,progress,select,textarea,' +
|
5599 |
+
'details,dialog,menu,menuitem,summary,' +
|
5600 |
+
'content,element,shadow,template,blockquote,iframe,tfoot'
|
5601 |
+
);
|
5602 |
+
|
5603 |
+
// this map is intentionally selective, only covering SVG elements that may
|
5604 |
+
// contain child elements.
|
5605 |
+
var isSVG = makeMap(
|
5606 |
+
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' +
|
5607 |
+
'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +
|
5608 |
+
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',
|
5609 |
+
true
|
5610 |
+
);
|
5611 |
+
|
5612 |
+
var isPreTag = function (tag) { return tag === 'pre'; };
|
5613 |
+
|
5614 |
+
var isReservedTag = function (tag) {
|
5615 |
+
return isHTMLTag(tag) || isSVG(tag)
|
5616 |
+
};
|
5617 |
+
|
5618 |
+
function getTagNamespace (tag) {
|
5619 |
+
if (isSVG(tag)) {
|
5620 |
+
return 'svg'
|
5621 |
+
}
|
5622 |
+
// basic support for MathML
|
5623 |
+
// note it doesn't support other MathML elements being component roots
|
5624 |
+
if (tag === 'math') {
|
5625 |
+
return 'math'
|
5626 |
+
}
|
5627 |
+
}
|
5628 |
+
|
5629 |
+
var unknownElementCache = Object.create(null);
|
5630 |
+
function isUnknownElement (tag) {
|
5631 |
+
/* istanbul ignore if */
|
5632 |
+
if (!inBrowser) {
|
5633 |
+
return true
|
5634 |
+
}
|
5635 |
+
if (isReservedTag(tag)) {
|
5636 |
+
return false
|
5637 |
+
}
|
5638 |
+
tag = tag.toLowerCase();
|
5639 |
+
/* istanbul ignore if */
|
5640 |
+
if (unknownElementCache[tag] != null) {
|
5641 |
+
return unknownElementCache[tag]
|
5642 |
+
}
|
5643 |
+
var el = document.createElement(tag);
|
5644 |
+
if (tag.indexOf('-') > -1) {
|
5645 |
+
// http://stackoverflow.com/a/28210364/1070244
|
5646 |
+
return (unknownElementCache[tag] = (
|
5647 |
+
el.constructor === window.HTMLUnknownElement ||
|
5648 |
+
el.constructor === window.HTMLElement
|
5649 |
+
))
|
5650 |
+
} else {
|
5651 |
+
return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))
|
5652 |
+
}
|
5653 |
+
}
|
5654 |
+
|
5655 |
+
var isTextInputType = makeMap('text,number,password,search,email,tel,url');
|
5656 |
+
|
5657 |
+
/* */
|
5658 |
+
|
5659 |
+
/**
|
5660 |
+
* Query an element selector if it's not an element already.
|
5661 |
+
*/
|
5662 |
+
function query (el) {
|
5663 |
+
if (typeof el === 'string') {
|
5664 |
+
var selected = document.querySelector(el);
|
5665 |
+
if (!selected) {
|
5666 |
+
warn(
|
5667 |
+
'Cannot find element: ' + el
|
5668 |
+
);
|
5669 |
+
return document.createElement('div')
|
5670 |
+
}
|
5671 |
+
return selected
|
5672 |
+
} else {
|
5673 |
+
return el
|
5674 |
+
}
|
5675 |
+
}
|
5676 |
+
|
5677 |
+
/* */
|
5678 |
+
|
5679 |
+
function createElement$1 (tagName, vnode) {
|
5680 |
+
var elm = document.createElement(tagName);
|
5681 |
+
if (tagName !== 'select') {
|
5682 |
+
return elm
|
5683 |
+
}
|
5684 |
+
// false or null will remove the attribute but undefined will not
|
5685 |
+
if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) {
|
5686 |
+
elm.setAttribute('multiple', 'multiple');
|
5687 |
+
}
|
5688 |
+
return elm
|
5689 |
+
}
|
5690 |
+
|
5691 |
+
function createElementNS (namespace, tagName) {
|
5692 |
+
return document.createElementNS(namespaceMap[namespace], tagName)
|
5693 |
+
}
|
5694 |
+
|
5695 |
+
function createTextNode (text) {
|
5696 |
+
return document.createTextNode(text)
|
5697 |
+
}
|
5698 |
+
|
5699 |
+
function createComment (text) {
|
5700 |
+
return document.createComment(text)
|
5701 |
+
}
|
5702 |
+
|
5703 |
+
function insertBefore (parentNode, newNode, referenceNode) {
|
5704 |
+
parentNode.insertBefore(newNode, referenceNode);
|
5705 |
+
}
|
5706 |
+
|
5707 |
+
function removeChild (node, child) {
|
5708 |
+
node.removeChild(child);
|
5709 |
+
}
|
5710 |
+
|
5711 |
+
function appendChild (node, child) {
|
5712 |
+
node.appendChild(child);
|
5713 |
+
}
|
5714 |
+
|
5715 |
+
function parentNode (node) {
|
5716 |
+
return node.parentNode
|
5717 |
+
}
|
5718 |
+
|
5719 |
+
function nextSibling (node) {
|
5720 |
+
return node.nextSibling
|
5721 |
+
}
|
5722 |
+
|
5723 |
+
function tagName (node) {
|
5724 |
+
return node.tagName
|
5725 |
+
}
|
5726 |
+
|
5727 |
+
function setTextContent (node, text) {
|
5728 |
+
node.textContent = text;
|
5729 |
+
}
|
5730 |
+
|
5731 |
+
function setStyleScope (node, scopeId) {
|
5732 |
+
node.setAttribute(scopeId, '');
|
5733 |
+
}
|
5734 |
+
|
5735 |
+
var nodeOps = /*#__PURE__*/Object.freeze({
|
5736 |
+
createElement: createElement$1,
|
5737 |
+
createElementNS: createElementNS,
|
5738 |
+
createTextNode: createTextNode,
|
5739 |
+
createComment: createComment,
|
5740 |
+
insertBefore: insertBefore,
|
5741 |
+
removeChild: removeChild,
|
5742 |
+
appendChild: appendChild,
|
5743 |
+
parentNode: parentNode,
|
5744 |
+
nextSibling: nextSibling,
|
5745 |
+
tagName: tagName,
|
5746 |
+
setTextContent: setTextContent,
|
5747 |
+
setStyleScope: setStyleScope
|
5748 |
+
});
|
5749 |
+
|
5750 |
+
/* */
|
5751 |
+
|
5752 |
+
var ref = {
|
5753 |
+
create: function create (_, vnode) {
|
5754 |
+
registerRef(vnode);
|
5755 |
+
},
|
5756 |
+
update: function update (oldVnode, vnode) {
|
5757 |
+
if (oldVnode.data.ref !== vnode.data.ref) {
|
5758 |
+
registerRef(oldVnode, true);
|
5759 |
+
registerRef(vnode);
|
5760 |
+
}
|
5761 |
+
},
|
5762 |
+
destroy: function destroy (vnode) {
|
5763 |
+
registerRef(vnode, true);
|
5764 |
+
}
|
5765 |
+
};
|
5766 |
+
|
5767 |
+
function registerRef (vnode, isRemoval) {
|
5768 |
+
var key = vnode.data.ref;
|
5769 |
+
if (!isDef(key)) { return }
|
5770 |
+
|
5771 |
+
var vm = vnode.context;
|
5772 |
+
var ref = vnode.componentInstance || vnode.elm;
|
5773 |
+
var refs = vm.$refs;
|
5774 |
+
if (isRemoval) {
|
5775 |
+
if (Array.isArray(refs[key])) {
|
5776 |
+
remove(refs[key], ref);
|
5777 |
+
} else if (refs[key] === ref) {
|
5778 |
+
refs[key] = undefined;
|
5779 |
+
}
|
5780 |
+
} else {
|
5781 |
+
if (vnode.data.refInFor) {
|
5782 |
+
if (!Array.isArray(refs[key])) {
|
5783 |
+
refs[key] = [ref];
|
5784 |
+
} else if (refs[key].indexOf(ref) < 0) {
|
5785 |
+
// $flow-disable-line
|
5786 |
+
refs[key].push(ref);
|
5787 |
+
}
|
5788 |
+
} else {
|
5789 |
+
refs[key] = ref;
|
5790 |
+
}
|
5791 |
+
}
|
5792 |
+
}
|
5793 |
+
|
5794 |
+
/**
|
5795 |
+
* Virtual DOM patching algorithm based on Snabbdom by
|
5796 |
+
* Simon Friis Vindum (@paldepind)
|
5797 |
+
* Licensed under the MIT License
|
5798 |
+
* https://github.com/paldepind/snabbdom/blob/master/LICENSE
|
5799 |
+
*
|
5800 |
+
* modified by Evan You (@yyx990803)
|
5801 |
+
*
|
5802 |
+
* Not type-checking this because this file is perf-critical and the cost
|
5803 |
+
* of making flow understand it is not worth it.
|
5804 |
+
*/
|
5805 |
+
|
5806 |
+
var emptyNode = new VNode('', {}, []);
|
5807 |
+
|
5808 |
+
var hooks = ['create', 'activate', 'update', 'remove', 'destroy'];
|
5809 |
+
|
5810 |
+
function sameVnode (a, b) {
|
5811 |
+
return (
|
5812 |
+
a.key === b.key && (
|
5813 |
+
(
|
5814 |
+
a.tag === b.tag &&
|
5815 |
+
a.isComment === b.isComment &&
|
5816 |
+
isDef(a.data) === isDef(b.data) &&
|
5817 |
+
sameInputType(a, b)
|
5818 |
+
) || (
|
5819 |
+
isTrue(a.isAsyncPlaceholder) &&
|
5820 |
+
a.asyncFactory === b.asyncFactory &&
|
5821 |
+
isUndef(b.asyncFactory.error)
|
5822 |
+
)
|
5823 |
+
)
|
5824 |
+
)
|
5825 |
+
}
|
5826 |
+
|
5827 |
+
function sameInputType (a, b) {
|
5828 |
+
if (a.tag !== 'input') { return true }
|
5829 |
+
var i;
|
5830 |
+
var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
|
5831 |
+
var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
|
5832 |
+
return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
|
5833 |
+
}
|
5834 |
+
|
5835 |
+
function createKeyToOldIdx (children, beginIdx, endIdx) {
|
5836 |
+
var i, key;
|
5837 |
+
var map = {};
|
5838 |
+
for (i = beginIdx; i <= endIdx; ++i) {
|
5839 |
+
key = children[i].key;
|
5840 |
+
if (isDef(key)) { map[key] = i; }
|
5841 |
+
}
|
5842 |
+
return map
|
5843 |
+
}
|
5844 |
+
|
5845 |
+
function createPatchFunction (backend) {
|
5846 |
+
var i, j;
|
5847 |
+
var cbs = {};
|
5848 |
+
|
5849 |
+
var modules = backend.modules;
|
5850 |
+
var nodeOps = backend.nodeOps;
|
5851 |
+
|
5852 |
+
for (i = 0; i < hooks.length; ++i) {
|
5853 |
+
cbs[hooks[i]] = [];
|
5854 |
+
for (j = 0; j < modules.length; ++j) {
|
5855 |
+
if (isDef(modules[j][hooks[i]])) {
|
5856 |
+
cbs[hooks[i]].push(modules[j][hooks[i]]);
|
5857 |
+
}
|
5858 |
+
}
|
5859 |
+
}
|
5860 |
+
|
5861 |
+
function emptyNodeAt (elm) {
|
5862 |
+
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)
|
5863 |
+
}
|
5864 |
+
|
5865 |
+
function createRmCb (childElm, listeners) {
|
5866 |
+
function remove$$1 () {
|
5867 |
+
if (--remove$$1.listeners === 0) {
|
5868 |
+
removeNode(childElm);
|
5869 |
+
}
|
5870 |
+
}
|
5871 |
+
remove$$1.listeners = listeners;
|
5872 |
+
return remove$$1
|
5873 |
+
}
|
5874 |
+
|
5875 |
+
function removeNode (el) {
|
5876 |
+
var parent = nodeOps.parentNode(el);
|
5877 |
+
// element may have already been removed due to v-html / v-text
|
5878 |
+
if (isDef(parent)) {
|
5879 |
+
nodeOps.removeChild(parent, el);
|
5880 |
+
}
|
5881 |
+
}
|
5882 |
+
|
5883 |
+
function isUnknownElement$$1 (vnode, inVPre) {
|
5884 |
+
return (
|
5885 |
+
!inVPre &&
|
5886 |
+
!vnode.ns &&
|
5887 |
+
!(
|
5888 |
+
config.ignoredElements.length &&
|
5889 |
+
config.ignoredElements.some(function (ignore) {
|
5890 |
+
return isRegExp(ignore)
|
5891 |
+
? ignore.test(vnode.tag)
|
5892 |
+
: ignore === vnode.tag
|
5893 |
+
})
|
5894 |
+
) &&
|
5895 |
+
config.isUnknownElement(vnode.tag)
|
5896 |
+
)
|
5897 |
+
}
|
5898 |
+
|
5899 |
+
var creatingElmInVPre = 0;
|
5900 |
+
|
5901 |
+
function createElm (
|
5902 |
+
vnode,
|
5903 |
+
insertedVnodeQueue,
|
5904 |
+
parentElm,
|
5905 |
+
refElm,
|
5906 |
+
nested,
|
5907 |
+
ownerArray,
|
5908 |
+
index
|
5909 |
+
) {
|
5910 |
+
if (isDef(vnode.elm) && isDef(ownerArray)) {
|
5911 |
+
// This vnode was used in a previous render!
|
5912 |
+
// now it's used as a new node, overwriting its elm would cause
|
5913 |
+
// potential patch errors down the road when it's used as an insertion
|
5914 |
+
// reference node. Instead, we clone the node on-demand before creating
|
5915 |
+
// associated DOM element for it.
|
5916 |
+
vnode = ownerArray[index] = cloneVNode(vnode);
|
5917 |
+
}
|
5918 |
+
|
5919 |
+
vnode.isRootInsert = !nested; // for transition enter check
|
5920 |
+
if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {
|
5921 |
+
return
|
5922 |
+
}
|
5923 |
+
|
5924 |
+
var data = vnode.data;
|
5925 |
+
var children = vnode.children;
|
5926 |
+
var tag = vnode.tag;
|
5927 |
+
if (isDef(tag)) {
|
5928 |
+
{
|
5929 |
+
if (data && data.pre) {
|
5930 |
+
creatingElmInVPre++;
|
5931 |
+
}
|
5932 |
+
if (isUnknownElement$$1(vnode, creatingElmInVPre)) {
|
5933 |
+
warn(
|
5934 |
+
'Unknown custom element: <' + tag + '> - did you ' +
|
5935 |
+
'register the component correctly? For recursive components, ' +
|
5936 |
+
'make sure to provide the "name" option.',
|
5937 |
+
vnode.context
|
5938 |
+
);
|
5939 |
+
}
|
5940 |
+
}
|
5941 |
+
|
5942 |
+
vnode.elm = vnode.ns
|
5943 |
+
? nodeOps.createElementNS(vnode.ns, tag)
|
5944 |
+
: nodeOps.createElement(tag, vnode);
|
5945 |
+
setScope(vnode);
|
5946 |
+
|
5947 |
+
/* istanbul ignore if */
|
5948 |
+
{
|
5949 |
+
createChildren(vnode, children, insertedVnodeQueue);
|
5950 |
+
if (isDef(data)) {
|
5951 |
+
invokeCreateHooks(vnode, insertedVnodeQueue);
|
5952 |
+
}
|
5953 |
+
insert(parentElm, vnode.elm, refElm);
|
5954 |
+
}
|
5955 |
+
|
5956 |
+
if (data && data.pre) {
|
5957 |
+
creatingElmInVPre--;
|
5958 |
+
}
|
5959 |
+
} else if (isTrue(vnode.isComment)) {
|
5960 |
+
vnode.elm = nodeOps.createComment(vnode.text);
|
5961 |
+
insert(parentElm, vnode.elm, refElm);
|
5962 |
+
} else {
|
5963 |
+
vnode.elm = nodeOps.createTextNode(vnode.text);
|
5964 |
+
insert(parentElm, vnode.elm, refElm);
|
5965 |
+
}
|
5966 |
+
}
|
5967 |
+
|
5968 |
+
function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
|
5969 |
+
var i = vnode.data;
|
5970 |
+
if (isDef(i)) {
|
5971 |
+
var isReactivated = isDef(vnode.componentInstance) && i.keepAlive;
|
5972 |
+
if (isDef(i = i.hook) && isDef(i = i.init)) {
|
5973 |
+
i(vnode, false /* hydrating */);
|
5974 |
+
}
|
5975 |
+
// after calling the init hook, if the vnode is a child component
|
5976 |
+
// it should've created a child instance and mounted it. the child
|
5977 |
+
// component also has set the placeholder vnode's elm.
|
5978 |
+
// in that case we can just return the element and be done.
|
5979 |
+
if (isDef(vnode.componentInstance)) {
|
5980 |
+
initComponent(vnode, insertedVnodeQueue);
|
5981 |
+
insert(parentElm, vnode.elm, refElm);
|
5982 |
+
if (isTrue(isReactivated)) {
|
5983 |
+
reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);
|
5984 |
+
}
|
5985 |
+
return true
|
5986 |
+
}
|
5987 |
+
}
|
5988 |
+
}
|
5989 |
+
|
5990 |
+
function initComponent (vnode, insertedVnodeQueue) {
|
5991 |
+
if (isDef(vnode.data.pendingInsert)) {
|
5992 |
+
insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);
|
5993 |
+
vnode.data.pendingInsert = null;
|
5994 |
+
}
|
5995 |
+
vnode.elm = vnode.componentInstance.$el;
|
5996 |
+
if (isPatchable(vnode)) {
|
5997 |
+
invokeCreateHooks(vnode, insertedVnodeQueue);
|
5998 |
+
setScope(vnode);
|
5999 |
+
} else {
|
6000 |
+
// empty component root.
|
6001 |
+
// skip all element-related modules except for ref (#3455)
|
6002 |
+
registerRef(vnode);
|
6003 |
+
// make sure to invoke the insert hook
|
6004 |
+
insertedVnodeQueue.push(vnode);
|
6005 |
+
}
|
6006 |
+
}
|
6007 |
+
|
6008 |
+
function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {
|
6009 |
+
var i;
|
6010 |
+
// hack for #4339: a reactivated component with inner transition
|
6011 |
+
// does not trigger because the inner node's created hooks are not called
|
6012 |
+
// again. It's not ideal to involve module-specific logic in here but
|
6013 |
+
// there doesn't seem to be a better way to do it.
|
6014 |
+
var innerNode = vnode;
|
6015 |
+
while (innerNode.componentInstance) {
|
6016 |
+
innerNode = innerNode.componentInstance._vnode;
|
6017 |
+
if (isDef(i = innerNode.data) && isDef(i = i.transition)) {
|
6018 |
+
for (i = 0; i < cbs.activate.length; ++i) {
|
6019 |
+
cbs.activate[i](emptyNode, innerNode);
|
6020 |
+
}
|
6021 |
+
insertedVnodeQueue.push(innerNode);
|
6022 |
+
break
|
6023 |
+
}
|
6024 |
+
}
|
6025 |
+
// unlike a newly created component,
|
6026 |
+
// a reactivated keep-alive component doesn't insert itself
|
6027 |
+
insert(parentElm, vnode.elm, refElm);
|
6028 |
+
}
|
6029 |
+
|
6030 |
+
function insert (parent, elm, ref$$1) {
|
6031 |
+
if (isDef(parent)) {
|
6032 |
+
if (isDef(ref$$1)) {
|
6033 |
+
if (nodeOps.parentNode(ref$$1) === parent) {
|
6034 |
+
nodeOps.insertBefore(parent, elm, ref$$1);
|
6035 |
+
}
|
6036 |
+
} else {
|
6037 |
+
nodeOps.appendChild(parent, elm);
|
6038 |
+
}
|
6039 |
+
}
|
6040 |
+
}
|
6041 |
+
|
6042 |
+
function createChildren (vnode, children, insertedVnodeQueue) {
|
6043 |
+
if (Array.isArray(children)) {
|
6044 |
+
{
|
6045 |
+
checkDuplicateKeys(children);
|
6046 |
+
}
|
6047 |
+
for (var i = 0; i < children.length; ++i) {
|
6048 |
+
createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i);
|
6049 |
+
}
|
6050 |
+
} else if (isPrimitive(vnode.text)) {
|
6051 |
+
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text)));
|
6052 |
+
}
|
6053 |
+
}
|
6054 |
+
|
6055 |
+
function isPatchable (vnode) {
|
6056 |
+
while (vnode.componentInstance) {
|
6057 |
+
vnode = vnode.componentInstance._vnode;
|
6058 |
+
}
|
6059 |
+
return isDef(vnode.tag)
|
6060 |
+
}
|
6061 |
+
|
6062 |
+
function invokeCreateHooks (vnode, insertedVnodeQueue) {
|
6063 |
+
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
|
6064 |
+
cbs.create[i$1](emptyNode, vnode);
|
6065 |
+
}
|
6066 |
+
i = vnode.data.hook; // Reuse variable
|
6067 |
+
if (isDef(i)) {
|
6068 |
+
if (isDef(i.create)) { i.create(emptyNode, vnode); }
|
6069 |
+
if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); }
|
6070 |
+
}
|
6071 |
+
}
|
6072 |
+
|
6073 |
+
// set scope id attribute for scoped CSS.
|
6074 |
+
// this is implemented as a special case to avoid the overhead
|
6075 |
+
// of going through the normal attribute patching process.
|
6076 |
+
function setScope (vnode) {
|
6077 |
+
var i;
|
6078 |
+
if (isDef(i = vnode.fnScopeId)) {
|
6079 |
+
nodeOps.setStyleScope(vnode.elm, i);
|
6080 |
+
} else {
|
6081 |
+
var ancestor = vnode;
|
6082 |
+
while (ancestor) {
|
6083 |
+
if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {
|
6084 |
+
nodeOps.setStyleScope(vnode.elm, i);
|
6085 |
+
}
|
6086 |
+
ancestor = ancestor.parent;
|
6087 |
+
}
|
6088 |
+
}
|
6089 |
+
// for slot content they should also get the scopeId from the host instance.
|
6090 |
+
if (isDef(i = activeInstance) &&
|
6091 |
+
i !== vnode.context &&
|
6092 |
+
i !== vnode.fnContext &&
|
6093 |
+
isDef(i = i.$options._scopeId)
|
6094 |
+
) {
|
6095 |
+
nodeOps.setStyleScope(vnode.elm, i);
|
6096 |
+
}
|
6097 |
+
}
|
6098 |
+
|
6099 |
+
function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {
|
6100 |
+
for (; startIdx <= endIdx; ++startIdx) {
|
6101 |
+
createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx);
|
6102 |
+
}
|
6103 |
+
}
|
6104 |
+
|
6105 |
+
function invokeDestroyHook (vnode) {
|
6106 |
+
var i, j;
|
6107 |
+
var data = vnode.data;
|
6108 |
+
if (isDef(data)) {
|
6109 |
+
if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }
|
6110 |
+
for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }
|
6111 |
+
}
|
6112 |
+
if (isDef(i = vnode.children)) {
|
6113 |
+
for (j = 0; j < vnode.children.length; ++j) {
|
6114 |
+
invokeDestroyHook(vnode.children[j]);
|
6115 |
+
}
|
6116 |
+
}
|
6117 |
+
}
|
6118 |
+
|
6119 |
+
function removeVnodes (vnodes, startIdx, endIdx) {
|
6120 |
+
for (; startIdx <= endIdx; ++startIdx) {
|
6121 |
+
var ch = vnodes[startIdx];
|
6122 |
+
if (isDef(ch)) {
|
6123 |
+
if (isDef(ch.tag)) {
|
6124 |
+
removeAndInvokeRemoveHook(ch);
|
6125 |
+
invokeDestroyHook(ch);
|
6126 |
+
} else { // Text node
|
6127 |
+
removeNode(ch.elm);
|
6128 |
+
}
|
6129 |
+
}
|
6130 |
+
}
|
6131 |
+
}
|
6132 |
+
|
6133 |
+
function removeAndInvokeRemoveHook (vnode, rm) {
|
6134 |
+
if (isDef(rm) || isDef(vnode.data)) {
|
6135 |
+
var i;
|
6136 |
+
var listeners = cbs.remove.length + 1;
|
6137 |
+
if (isDef(rm)) {
|
6138 |
+
// we have a recursively passed down rm callback
|
6139 |
+
// increase the listeners count
|
6140 |
+
rm.listeners += listeners;
|
6141 |
+
} else {
|
6142 |
+
// directly removing
|
6143 |
+
rm = createRmCb(vnode.elm, listeners);
|
6144 |
+
}
|
6145 |
+
// recursively invoke hooks on child component root node
|
6146 |
+
if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) {
|
6147 |
+
removeAndInvokeRemoveHook(i, rm);
|
6148 |
+
}
|
6149 |
+
for (i = 0; i < cbs.remove.length; ++i) {
|
6150 |
+
cbs.remove[i](vnode, rm);
|
6151 |
+
}
|
6152 |
+
if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {
|
6153 |
+
i(vnode, rm);
|
6154 |
+
} else {
|
6155 |
+
rm();
|
6156 |
+
}
|
6157 |
+
} else {
|
6158 |
+
removeNode(vnode.elm);
|
6159 |
+
}
|
6160 |
+
}
|
6161 |
+
|
6162 |
+
function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {
|
6163 |
+
var oldStartIdx = 0;
|
6164 |
+
var newStartIdx = 0;
|
6165 |
+
var oldEndIdx = oldCh.length - 1;
|
6166 |
+
var oldStartVnode = oldCh[0];
|
6167 |
+
var oldEndVnode = oldCh[oldEndIdx];
|
6168 |
+
var newEndIdx = newCh.length - 1;
|
6169 |
+
var newStartVnode = newCh[0];
|
6170 |
+
var newEndVnode = newCh[newEndIdx];
|
6171 |
+
var oldKeyToIdx, idxInOld, vnodeToMove, refElm;
|
6172 |
+
|
6173 |
+
// removeOnly is a special flag used only by <transition-group>
|
6174 |
+
// to ensure removed elements stay in correct relative positions
|
6175 |
+
// during leaving transitions
|
6176 |
+
var canMove = !removeOnly;
|
6177 |
+
|
6178 |
+
{
|
6179 |
+
checkDuplicateKeys(newCh);
|
6180 |
+
}
|
6181 |
+
|
6182 |
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
6183 |
+
if (isUndef(oldStartVnode)) {
|
6184 |
+
oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left
|
6185 |
+
} else if (isUndef(oldEndVnode)) {
|
6186 |
+
oldEndVnode = oldCh[--oldEndIdx];
|
6187 |
+
} else if (sameVnode(oldStartVnode, newStartVnode)) {
|
6188 |
+
patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
|
6189 |
+
oldStartVnode = oldCh[++oldStartIdx];
|
6190 |
+
newStartVnode = newCh[++newStartIdx];
|
6191 |
+
} else if (sameVnode(oldEndVnode, newEndVnode)) {
|
6192 |
+
patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
|
6193 |
+
oldEndVnode = oldCh[--oldEndIdx];
|
6194 |
+
newEndVnode = newCh[--newEndIdx];
|
6195 |
+
} else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right
|
6196 |
+
patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue, newCh, newEndIdx);
|
6197 |
+
canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));
|
6198 |
+
oldStartVnode = oldCh[++oldStartIdx];
|
6199 |
+
newEndVnode = newCh[--newEndIdx];
|
6200 |
+
} else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left
|
6201 |
+
patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
|
6202 |
+
canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
|
6203 |
+
oldEndVnode = oldCh[--oldEndIdx];
|
6204 |
+
newStartVnode = newCh[++newStartIdx];
|
6205 |
+
} else {
|
6206 |
+
if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
|
6207 |
+
idxInOld = isDef(newStartVnode.key)
|
6208 |
+
? oldKeyToIdx[newStartVnode.key]
|
6209 |
+
: findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
|
6210 |
+
if (isUndef(idxInOld)) { // New element
|
6211 |
+
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
|
6212 |
+
} else {
|
6213 |
+
vnodeToMove = oldCh[idxInOld];
|
6214 |
+
if (sameVnode(vnodeToMove, newStartVnode)) {
|
6215 |
+
patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue, newCh, newStartIdx);
|
6216 |
+
oldCh[idxInOld] = undefined;
|
6217 |
+
canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm);
|
6218 |
+
} else {
|
6219 |
+
// same key but different element. treat as new element
|
6220 |
+
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx);
|
6221 |
+
}
|
6222 |
+
}
|
6223 |
+
newStartVnode = newCh[++newStartIdx];
|
6224 |
+
}
|
6225 |
+
}
|
6226 |
+
if (oldStartIdx > oldEndIdx) {
|
6227 |
+
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;
|
6228 |
+
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
|
6229 |
+
} else if (newStartIdx > newEndIdx) {
|
6230 |
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
6231 |
+
}
|
6232 |
+
}
|
6233 |
+
|
6234 |
+
function checkDuplicateKeys (children) {
|
6235 |
+
var seenKeys = {};
|
6236 |
+
for (var i = 0; i < children.length; i++) {
|
6237 |
+
var vnode = children[i];
|
6238 |
+
var key = vnode.key;
|
6239 |
+
if (isDef(key)) {
|
6240 |
+
if (seenKeys[key]) {
|
6241 |
+
warn(
|
6242 |
+
("Duplicate keys detected: '" + key + "'. This may cause an update error."),
|
6243 |
+
vnode.context
|
6244 |
+
);
|
6245 |
+
} else {
|
6246 |
+
seenKeys[key] = true;
|
6247 |
+
}
|
6248 |
+
}
|
6249 |
+
}
|
6250 |
+
}
|
6251 |
+
|
6252 |
+
function findIdxInOld (node, oldCh, start, end) {
|
6253 |
+
for (var i = start; i < end; i++) {
|
6254 |
+
var c = oldCh[i];
|
6255 |
+
if (isDef(c) && sameVnode(node, c)) { return i }
|
6256 |
+
}
|
6257 |
+
}
|
6258 |
+
|
6259 |
+
function patchVnode (
|
6260 |
+
oldVnode,
|
6261 |
+
vnode,
|
6262 |
+
insertedVnodeQueue,
|
6263 |
+
ownerArray,
|
6264 |
+
index,
|
6265 |
+
removeOnly
|
6266 |
+
) {
|
6267 |
+
if (oldVnode === vnode) {
|
6268 |
+
return
|
6269 |
+
}
|
6270 |
+
|
6271 |
+
if (isDef(vnode.elm) && isDef(ownerArray)) {
|
6272 |
+
// clone reused vnode
|
6273 |
+
vnode = ownerArray[index] = cloneVNode(vnode);
|
6274 |
+
}
|
6275 |
+
|
6276 |
+
var elm = vnode.elm = oldVnode.elm;
|
6277 |
+
|
6278 |
+
if (isTrue(oldVnode.isAsyncPlaceholder)) {
|
6279 |
+
if (isDef(vnode.asyncFactory.resolved)) {
|
6280 |
+
hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
|
6281 |
+
} else {
|
6282 |
+
vnode.isAsyncPlaceholder = true;
|
6283 |
+
}
|
6284 |
+
return
|
6285 |
+
}
|
6286 |
+
|
6287 |
+
// reuse element for static trees.
|
6288 |
+
// note we only do this if the vnode is cloned -
|
6289 |
+
// if the new node is not cloned it means the render functions have been
|
6290 |
+
// reset by the hot-reload-api and we need to do a proper re-render.
|
6291 |
+
if (isTrue(vnode.isStatic) &&
|
6292 |
+
isTrue(oldVnode.isStatic) &&
|
6293 |
+
vnode.key === oldVnode.key &&
|
6294 |
+
(isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
|
6295 |
+
) {
|
6296 |
+
vnode.componentInstance = oldVnode.componentInstance;
|
6297 |
+
return
|
6298 |
+
}
|
6299 |
+
|
6300 |
+
var i;
|
6301 |
+
var data = vnode.data;
|
6302 |
+
if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
|
6303 |
+
i(oldVnode, vnode);
|
6304 |
+
}
|
6305 |
+
|
6306 |
+
var oldCh = oldVnode.children;
|
6307 |
+
var ch = vnode.children;
|
6308 |
+
if (isDef(data) && isPatchable(vnode)) {
|
6309 |
+
for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }
|
6310 |
+
if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }
|
6311 |
+
}
|
6312 |
+
if (isUndef(vnode.text)) {
|
6313 |
+
if (isDef(oldCh) && isDef(ch)) {
|
6314 |
+
if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }
|
6315 |
+
} else if (isDef(ch)) {
|
6316 |
+
{
|
6317 |
+
checkDuplicateKeys(ch);
|
6318 |
+
}
|
6319 |
+
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }
|
6320 |
+
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
|
6321 |
+
} else if (isDef(oldCh)) {
|
6322 |
+
removeVnodes(oldCh, 0, oldCh.length - 1);
|
6323 |
+
} else if (isDef(oldVnode.text)) {
|
6324 |
+
nodeOps.setTextContent(elm, '');
|
6325 |
+
}
|
6326 |
+
} else if (oldVnode.text !== vnode.text) {
|
6327 |
+
nodeOps.setTextContent(elm, vnode.text);
|
6328 |
+
}
|
6329 |
+
if (isDef(data)) {
|
6330 |
+
if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }
|
6331 |
+
}
|
6332 |
+
}
|
6333 |
+
|
6334 |
+
function invokeInsertHook (vnode, queue, initial) {
|
6335 |
+
// delay insert hooks for component root nodes, invoke them after the
|
6336 |
+
// element is really inserted
|
6337 |
+
if (isTrue(initial) && isDef(vnode.parent)) {
|
6338 |
+
vnode.parent.data.pendingInsert = queue;
|
6339 |
+
} else {
|
6340 |
+
for (var i = 0; i < queue.length; ++i) {
|
6341 |
+
queue[i].data.hook.insert(queue[i]);
|
6342 |
+
}
|
6343 |
+
}
|
6344 |
+
}
|
6345 |
+
|
6346 |
+
var hydrationBailed = false;
|
6347 |
+
// list of modules that can skip create hook during hydration because they
|
6348 |
+
// are already rendered on the client or has no need for initialization
|
6349 |
+
// Note: style is excluded because it relies on initial clone for future
|
6350 |
+
// deep updates (#7063).
|
6351 |
+
var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key');
|
6352 |
+
|
6353 |
+
// Note: this is a browser-only function so we can assume elms are DOM nodes.
|
6354 |
+
function hydrate (elm, vnode, insertedVnodeQueue, inVPre) {
|
6355 |
+
var i;
|
6356 |
+
var tag = vnode.tag;
|
6357 |
+
var data = vnode.data;
|
6358 |
+
var children = vnode.children;
|
6359 |
+
inVPre = inVPre || (data && data.pre);
|
6360 |
+
vnode.elm = elm;
|
6361 |
+
|
6362 |
+
if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
|
6363 |
+
vnode.isAsyncPlaceholder = true;
|
6364 |
+
return true
|
6365 |
+
}
|
6366 |
+
// assert node match
|
6367 |
+
{
|
6368 |
+
if (!assertNodeMatch(elm, vnode, inVPre)) {
|
6369 |
+
return false
|
6370 |
+
}
|
6371 |
+
}
|
6372 |
+
if (isDef(data)) {
|
6373 |
+
if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }
|
6374 |
+
if (isDef(i = vnode.componentInstance)) {
|
6375 |
+
// child component. it should have hydrated its own tree.
|
6376 |
+
initComponent(vnode, insertedVnodeQueue);
|
6377 |
+
return true
|
6378 |
+
}
|
6379 |
+
}
|
6380 |
+
if (isDef(tag)) {
|
6381 |
+
if (isDef(children)) {
|
6382 |
+
// empty element, allow client to pick up and populate children
|
6383 |
+
if (!elm.hasChildNodes()) {
|
6384 |
+
createChildren(vnode, children, insertedVnodeQueue);
|
6385 |
+
} else {
|
6386 |
+
// v-html and domProps: innerHTML
|
6387 |
+
if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
|
6388 |
+
if (i !== elm.innerHTML) {
|
6389 |
+
/* istanbul ignore if */
|
6390 |
+
if (typeof console !== 'undefined' &&
|
6391 |
+
!hydrationBailed
|
6392 |
+
) {
|
6393 |
+
hydrationBailed = true;
|
6394 |
+
console.warn('Parent: ', elm);
|
6395 |
+
console.warn('server innerHTML: ', i);
|
6396 |
+
console.warn('client innerHTML: ', elm.innerHTML);
|
6397 |
+
}
|
6398 |
+
return false
|
6399 |
+
}
|
6400 |
+
} else {
|
6401 |
+
// iterate and compare children lists
|
6402 |
+
var childrenMatch = true;
|
6403 |
+
var childNode = elm.firstChild;
|
6404 |
+
for (var i$1 = 0; i$1 < children.length; i$1++) {
|
6405 |
+
if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) {
|
6406 |
+
childrenMatch = false;
|
6407 |
+
break
|
6408 |
+
}
|
6409 |
+
childNode = childNode.nextSibling;
|
6410 |
+
}
|
6411 |
+
// if childNode is not null, it means the actual childNodes list is
|
6412 |
+
// longer than the virtual children list.
|
6413 |
+
if (!childrenMatch || childNode) {
|
6414 |
+
/* istanbul ignore if */
|
6415 |
+
if (typeof console !== 'undefined' &&
|
6416 |
+
!hydrationBailed
|
6417 |
+
) {
|
6418 |
+
hydrationBailed = true;
|
6419 |
+
console.warn('Parent: ', elm);
|
6420 |
+
console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
|
6421 |
+
}
|
6422 |
+
return false
|
6423 |
+
}
|
6424 |
+
}
|
6425 |
+
}
|
6426 |
+
}
|
6427 |
+
if (isDef(data)) {
|
6428 |
+
var fullInvoke = false;
|
6429 |
+
for (var key in data) {
|
6430 |
+
if (!isRenderedModule(key)) {
|
6431 |
+
fullInvoke = true;
|
6432 |
+
invokeCreateHooks(vnode, insertedVnodeQueue);
|
6433 |
+
break
|
6434 |
+
}
|
6435 |
+
}
|
6436 |
+
if (!fullInvoke && data['class']) {
|
6437 |
+
// ensure collecting deps for deep class bindings for future updates
|
6438 |
+
traverse(data['class']);
|
6439 |
+
}
|
6440 |
+
}
|
6441 |
+
} else if (elm.data !== vnode.text) {
|
6442 |
+
elm.data = vnode.text;
|
6443 |
+
}
|
6444 |
+
return true
|
6445 |
+
}
|
6446 |
+
|
6447 |
+
function assertNodeMatch (node, vnode, inVPre) {
|
6448 |
+
if (isDef(vnode.tag)) {
|
6449 |
+
return vnode.tag.indexOf('vue-component') === 0 || (
|
6450 |
+
!isUnknownElement$$1(vnode, inVPre) &&
|
6451 |
+
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())
|
6452 |
+
)
|
6453 |
+
} else {
|
6454 |
+
return node.nodeType === (vnode.isComment ? 8 : 3)
|
6455 |
+
}
|
6456 |
+
}
|
6457 |
+
|
6458 |
+
return function patch (oldVnode, vnode, hydrating, removeOnly) {
|
6459 |
+
if (isUndef(vnode)) {
|
6460 |
+
if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); }
|
6461 |
+
return
|
6462 |
+
}
|
6463 |
+
|
6464 |
+
var isInitialPatch = false;
|
6465 |
+
var insertedVnodeQueue = [];
|
6466 |
+
|
6467 |
+
if (isUndef(oldVnode)) {
|
6468 |
+
// empty mount (likely as component), create new root element
|
6469 |
+
isInitialPatch = true;
|
6470 |
+
createElm(vnode, insertedVnodeQueue);
|
6471 |
+
} else {
|
6472 |
+
var isRealElement = isDef(oldVnode.nodeType);
|
6473 |
+
if (!isRealElement && sameVnode(oldVnode, vnode)) {
|
6474 |
+
// patch existing root node
|
6475 |
+
patchVnode(oldVnode, vnode, insertedVnodeQueue, null, null, removeOnly);
|
6476 |
+
} else {
|
6477 |
+
if (isRealElement) {
|
6478 |
+
// mounting to a real element
|
6479 |
+
// check if this is server-rendered content and if we can perform
|
6480 |
+
// a successful hydration.
|
6481 |
+
if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) {
|
6482 |
+
oldVnode.removeAttribute(SSR_ATTR);
|
6483 |
+
hydrating = true;
|
6484 |
+
}
|
6485 |
+
if (isTrue(hydrating)) {
|
6486 |
+
if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {
|
6487 |
+
invokeInsertHook(vnode, insertedVnodeQueue, true);
|
6488 |
+
return oldVnode
|
6489 |
+
} else {
|
6490 |
+
warn(
|
6491 |
+
'The client-side rendered virtual DOM tree is not matching ' +
|
6492 |
+
'server-rendered content. This is likely caused by incorrect ' +
|
6493 |
+
'HTML markup, for example nesting block-level elements inside ' +
|
6494 |
+
'<p>, or missing <tbody>. Bailing hydration and performing ' +
|
6495 |
+
'full client-side render.'
|
6496 |
+
);
|
6497 |
+
}
|
6498 |
+
}
|
6499 |
+
// either not server-rendered, or hydration failed.
|
6500 |
+
// create an empty node and replace it
|
6501 |
+
oldVnode = emptyNodeAt(oldVnode);
|
6502 |
+
}
|
6503 |
+
|
6504 |
+
// replacing existing element
|
6505 |
+
var oldElm = oldVnode.elm;
|
6506 |
+
var parentElm = nodeOps.parentNode(oldElm);
|
6507 |
+
|
6508 |
+
// create new node
|
6509 |
+
createElm(
|
6510 |
+
vnode,
|
6511 |
+
insertedVnodeQueue,
|
6512 |
+
// extremely rare edge case: do not insert if old element is in a
|
6513 |
+
// leaving transition. Only happens when combining transition +
|
6514 |
+
// keep-alive + HOCs. (#4590)
|
6515 |
+
oldElm._leaveCb ? null : parentElm,
|
6516 |
+
nodeOps.nextSibling(oldElm)
|
6517 |
+
);
|
6518 |
+
|
6519 |
+
// update parent placeholder node element, recursively
|
6520 |
+
if (isDef(vnode.parent)) {
|
6521 |
+
var ancestor = vnode.parent;
|
6522 |
+
var patchable = isPatchable(vnode);
|
6523 |
+
while (ancestor) {
|
6524 |
+
for (var i = 0; i < cbs.destroy.length; ++i) {
|
6525 |
+
cbs.destroy[i](ancestor);
|
6526 |
+
}
|
6527 |
+
ancestor.elm = vnode.elm;
|
6528 |
+
if (patchable) {
|
6529 |
+
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
|
6530 |
+
cbs.create[i$1](emptyNode, ancestor);
|
6531 |
+
}
|
6532 |
+
// #6513
|
6533 |
+
// invoke insert hooks that may have been merged by create hooks.
|
6534 |
+
// e.g. for directives that uses the "inserted" hook.
|
6535 |
+
var insert = ancestor.data.hook.insert;
|
6536 |
+
if (insert.merged) {
|
6537 |
+
// start at index 1 to avoid re-invoking component mounted hook
|
6538 |
+
for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
|
6539 |
+
insert.fns[i$2]();
|
6540 |
+
}
|
6541 |
+
}
|
6542 |
+
} else {
|
6543 |
+
registerRef(ancestor);
|
6544 |
+
}
|
6545 |
+
ancestor = ancestor.parent;
|
6546 |
+
}
|
6547 |
+
}
|
6548 |
+
|
6549 |
+
// destroy old node
|
6550 |
+
if (isDef(parentElm)) {
|
6551 |
+
removeVnodes([oldVnode], 0, 0);
|
6552 |
+
} else if (isDef(oldVnode.tag)) {
|
6553 |
+
invokeDestroyHook(oldVnode);
|
6554 |
+
}
|
6555 |
+
}
|
6556 |
}
|
6557 |
+
|
6558 |
+
invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);
|
6559 |
+
return vnode.elm
|
6560 |
+
}
|
6561 |
+
}
|
6562 |
+
|
6563 |
+
/* */
|
6564 |
+
|
6565 |
+
var directives = {
|
6566 |
+
create: updateDirectives,
|
6567 |
+
update: updateDirectives,
|
6568 |
+
destroy: function unbindDirectives (vnode) {
|
6569 |
+
updateDirectives(vnode, emptyNode);
|
6570 |
}
|
|
|
|
|
|
|
6571 |
};
|
|
|
6572 |
|
6573 |
+
function updateDirectives (oldVnode, vnode) {
|
6574 |
+
if (oldVnode.data.directives || vnode.data.directives) {
|
6575 |
+
_update(oldVnode, vnode);
|
6576 |
+
}
|
6577 |
+
}
|
6578 |
|
6579 |
+
function _update (oldVnode, vnode) {
|
6580 |
+
var isCreate = oldVnode === emptyNode;
|
6581 |
+
var isDestroy = vnode === emptyNode;
|
6582 |
+
var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);
|
6583 |
+
var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);
|
6584 |
|
6585 |
+
var dirsWithInsert = [];
|
6586 |
+
var dirsWithPostpatch = [];
|
|
|
|
|
|
|
6587 |
|
6588 |
+
var key, oldDir, dir;
|
6589 |
+
for (key in newDirs) {
|
6590 |
+
oldDir = oldDirs[key];
|
6591 |
+
dir = newDirs[key];
|
6592 |
+
if (!oldDir) {
|
6593 |
+
// new directive, bind
|
6594 |
+
callHook$1(dir, 'bind', vnode, oldVnode);
|
6595 |
+
if (dir.def && dir.def.inserted) {
|
6596 |
+
dirsWithInsert.push(dir);
|
6597 |
+
}
|
6598 |
+
} else {
|
6599 |
+
// existing directive, update
|
6600 |
+
dir.oldValue = oldDir.value;
|
6601 |
+
dir.oldArg = oldDir.arg;
|
6602 |
+
callHook$1(dir, 'update', vnode, oldVnode);
|
6603 |
+
if (dir.def && dir.def.componentUpdated) {
|
6604 |
+
dirsWithPostpatch.push(dir);
|
6605 |
+
}
|
6606 |
+
}
|
|
|
|
|
|
|
6607 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6608 |
|
6609 |
+
if (dirsWithInsert.length) {
|
6610 |
+
var callInsert = function () {
|
6611 |
+
for (var i = 0; i < dirsWithInsert.length; i++) {
|
6612 |
+
callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);
|
6613 |
+
}
|
6614 |
+
};
|
6615 |
+
if (isCreate) {
|
6616 |
+
mergeVNodeHook(vnode, 'insert', callInsert);
|
6617 |
+
} else {
|
6618 |
+
callInsert();
|
6619 |
+
}
|
6620 |
}
|
6621 |
|
6622 |
+
if (dirsWithPostpatch.length) {
|
6623 |
+
mergeVNodeHook(vnode, 'postpatch', function () {
|
6624 |
+
for (var i = 0; i < dirsWithPostpatch.length; i++) {
|
6625 |
+
callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);
|
6626 |
+
}
|
6627 |
+
});
|
6628 |
}
|
6629 |
+
|
6630 |
+
if (!isCreate) {
|
6631 |
+
for (key in oldDirs) {
|
6632 |
+
if (!newDirs[key]) {
|
6633 |
+
// no longer present, unbind
|
6634 |
+
callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy);
|
6635 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6636 |
}
|
6637 |
}
|
|
|
|
|
|
|
6638 |
}
|
|
|
6639 |
|
6640 |
+
var emptyModifiers = Object.create(null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6641 |
|
6642 |
+
function normalizeDirectives$1 (
|
6643 |
+
dirs,
|
6644 |
+
vm
|
6645 |
+
) {
|
6646 |
+
var res = Object.create(null);
|
6647 |
+
if (!dirs) {
|
6648 |
+
// $flow-disable-line
|
6649 |
+
return res
|
6650 |
}
|
6651 |
+
var i, dir;
|
6652 |
+
for (i = 0; i < dirs.length; i++) {
|
6653 |
+
dir = dirs[i];
|
6654 |
+
if (!dir.modifiers) {
|
6655 |
+
// $flow-disable-line
|
6656 |
+
dir.modifiers = emptyModifiers;
|
6657 |
+
}
|
6658 |
+
res[getRawDirName(dir)] = dir;
|
6659 |
+
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);
|
6660 |
}
|
6661 |
+
// $flow-disable-line
|
6662 |
+
return res
|
6663 |
+
}
|
|
|
6664 |
|
6665 |
+
function getRawDirName (dir) {
|
6666 |
+
return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.')))
|
6667 |
+
}
|
6668 |
|
6669 |
+
function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) {
|
6670 |
+
var fn = dir.def && dir.def[hook];
|
6671 |
+
if (fn) {
|
6672 |
+
try {
|
6673 |
+
fn(vnode.elm, dir, vnode, oldVnode, isDestroy);
|
6674 |
+
} catch (e) {
|
6675 |
+
handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook"));
|
6676 |
+
}
|
6677 |
+
}
|
6678 |
+
}
|
6679 |
|
6680 |
+
var baseModules = [
|
6681 |
+
ref,
|
6682 |
+
directives
|
6683 |
+
];
|
6684 |
|
6685 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6686 |
|
6687 |
+
function updateAttrs (oldVnode, vnode) {
|
6688 |
+
var opts = vnode.componentOptions;
|
6689 |
+
if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
|
6690 |
+
return
|
|
|
|
|
|
|
|
|
|
|
|
|
6691 |
}
|
6692 |
+
if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
|
6693 |
+
return
|
6694 |
+
}
|
6695 |
+
var key, cur, old;
|
6696 |
+
var elm = vnode.elm;
|
6697 |
+
var oldAttrs = oldVnode.data.attrs || {};
|
6698 |
+
var attrs = vnode.data.attrs || {};
|
6699 |
+
// clone observed objects, as the user probably wants to mutate it
|
6700 |
+
if (isDef(attrs.__ob__)) {
|
6701 |
+
attrs = vnode.data.attrs = extend({}, attrs);
|
6702 |
}
|
6703 |
|
6704 |
+
for (key in attrs) {
|
6705 |
+
cur = attrs[key];
|
6706 |
+
old = oldAttrs[key];
|
6707 |
+
if (old !== cur) {
|
6708 |
+
setAttr(elm, key, cur);
|
6709 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6710 |
}
|
6711 |
+
// #4391: in IE9, setting type can reset value for input[type=radio]
|
6712 |
+
// #6666: IE/Edge forces progress value down to 1 before setting a max
|
6713 |
+
/* istanbul ignore if */
|
6714 |
+
if ((isIE || isEdge) && attrs.value !== oldAttrs.value) {
|
6715 |
+
setAttr(elm, 'value', attrs.value);
|
6716 |
+
}
|
6717 |
+
for (key in oldAttrs) {
|
6718 |
+
if (isUndef(attrs[key])) {
|
6719 |
+
if (isXlink(key)) {
|
6720 |
+
elm.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
6721 |
+
} else if (!isEnumeratedAttr(key)) {
|
6722 |
+
elm.removeAttribute(key);
|
6723 |
+
}
|
6724 |
+
}
|
6725 |
}
|
6726 |
+
}
|
6727 |
|
6728 |
+
function setAttr (el, key, value) {
|
6729 |
+
if (el.tagName.indexOf('-') > -1) {
|
6730 |
+
baseSetAttr(el, key, value);
|
6731 |
+
} else if (isBooleanAttr(key)) {
|
6732 |
+
// set attribute for blank value
|
6733 |
+
// e.g. <option disabled>Select one</option>
|
6734 |
+
if (isFalsyAttrValue(value)) {
|
6735 |
+
el.removeAttribute(key);
|
6736 |
+
} else {
|
6737 |
+
// technically allowfullscreen is a boolean attribute for <iframe>,
|
6738 |
+
// but Flash expects a value of "true" when used on <embed> tag
|
6739 |
+
value = key === 'allowfullscreen' && el.tagName === 'EMBED'
|
6740 |
+
? 'true'
|
6741 |
+
: key;
|
6742 |
+
el.setAttribute(key, value);
|
6743 |
+
}
|
6744 |
+
} else if (isEnumeratedAttr(key)) {
|
6745 |
+
el.setAttribute(key, convertEnumeratedValue(key, value));
|
6746 |
+
} else if (isXlink(key)) {
|
6747 |
+
if (isFalsyAttrValue(value)) {
|
6748 |
+
el.removeAttributeNS(xlinkNS, getXlinkProp(key));
|
6749 |
+
} else {
|
6750 |
+
el.setAttributeNS(xlinkNS, key, value);
|
6751 |
+
}
|
6752 |
+
} else {
|
6753 |
+
baseSetAttr(el, key, value);
|
6754 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6755 |
}
|
|
|
6756 |
|
6757 |
+
function baseSetAttr (el, key, value) {
|
6758 |
+
if (isFalsyAttrValue(value)) {
|
6759 |
+
el.removeAttribute(key);
|
6760 |
+
} else {
|
6761 |
+
// #7138: IE10 & 11 fires input event when setting placeholder on
|
6762 |
+
// <textarea>... block the first input event and remove the blocker
|
6763 |
+
// immediately.
|
6764 |
+
/* istanbul ignore if */
|
6765 |
+
if (
|
6766 |
+
isIE && !isIE9 &&
|
6767 |
+
el.tagName === 'TEXTAREA' &&
|
6768 |
+
key === 'placeholder' && value !== '' && !el.__ieph
|
6769 |
+
) {
|
6770 |
+
var blocker = function (e) {
|
6771 |
+
e.stopImmediatePropagation();
|
6772 |
+
el.removeEventListener('input', blocker);
|
6773 |
+
};
|
6774 |
+
el.addEventListener('input', blocker);
|
6775 |
+
// $flow-disable-line
|
6776 |
+
el.__ieph = true; /* IE placeholder patched */
|
6777 |
+
}
|
6778 |
+
el.setAttribute(key, value);
|
6779 |
+
}
|
6780 |
}
|
|
|
6781 |
|
6782 |
+
var attrs = {
|
6783 |
+
create: updateAttrs,
|
6784 |
+
update: updateAttrs
|
6785 |
+
};
|
6786 |
|
6787 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6788 |
|
6789 |
+
function updateClass (oldVnode, vnode) {
|
6790 |
+
var el = vnode.elm;
|
6791 |
+
var data = vnode.data;
|
6792 |
+
var oldData = oldVnode.data;
|
6793 |
+
if (
|
6794 |
+
isUndef(data.staticClass) &&
|
6795 |
+
isUndef(data.class) && (
|
6796 |
+
isUndef(oldData) || (
|
6797 |
+
isUndef(oldData.staticClass) &&
|
6798 |
+
isUndef(oldData.class)
|
6799 |
+
)
|
6800 |
+
)
|
6801 |
+
) {
|
6802 |
+
return
|
6803 |
+
}
|
6804 |
|
6805 |
+
var cls = genClassForVnode(vnode);
|
|
|
|
|
6806 |
|
6807 |
+
// handle transition classes
|
6808 |
+
var transitionClass = el._transitionClasses;
|
6809 |
+
if (isDef(transitionClass)) {
|
6810 |
+
cls = concat(cls, stringifyClass(transitionClass));
|
6811 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6812 |
|
6813 |
+
// set the class
|
6814 |
+
if (cls !== el._prevClass) {
|
6815 |
+
el.setAttribute('class', cls);
|
6816 |
+
el._prevClass = cls;
|
6817 |
}
|
6818 |
+
}
|
6819 |
|
6820 |
+
var klass = {
|
6821 |
+
create: updateClass,
|
6822 |
+
update: updateClass
|
6823 |
+
};
|
6824 |
|
6825 |
+
/* */
|
6826 |
+
|
6827 |
+
var validDivisionCharRE = /[\w).+\-_$\]]/;
|
6828 |
+
|
6829 |
+
function parseFilters (exp) {
|
6830 |
+
var inSingle = false;
|
6831 |
+
var inDouble = false;
|
6832 |
+
var inTemplateString = false;
|
6833 |
+
var inRegex = false;
|
6834 |
+
var curly = 0;
|
6835 |
+
var square = 0;
|
6836 |
+
var paren = 0;
|
6837 |
+
var lastFilterIndex = 0;
|
6838 |
+
var c, prev, i, expression, filters;
|
6839 |
+
|
6840 |
+
for (i = 0; i < exp.length; i++) {
|
6841 |
+
prev = c;
|
6842 |
+
c = exp.charCodeAt(i);
|
6843 |
+
if (inSingle) {
|
6844 |
+
if (c === 0x27 && prev !== 0x5C) { inSingle = false; }
|
6845 |
+
} else if (inDouble) {
|
6846 |
+
if (c === 0x22 && prev !== 0x5C) { inDouble = false; }
|
6847 |
+
} else if (inTemplateString) {
|
6848 |
+
if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }
|
6849 |
+
} else if (inRegex) {
|
6850 |
+
if (c === 0x2f && prev !== 0x5C) { inRegex = false; }
|
6851 |
+
} else if (
|
6852 |
+
c === 0x7C && // pipe
|
6853 |
+
exp.charCodeAt(i + 1) !== 0x7C &&
|
6854 |
+
exp.charCodeAt(i - 1) !== 0x7C &&
|
6855 |
+
!curly && !square && !paren
|
6856 |
) {
|
6857 |
+
if (expression === undefined) {
|
6858 |
+
// first filter, end of expression
|
6859 |
+
lastFilterIndex = i + 1;
|
6860 |
+
expression = exp.slice(0, i).trim();
|
6861 |
+
} else {
|
6862 |
+
pushFilter();
|
6863 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6864 |
} else {
|
6865 |
+
switch (c) {
|
6866 |
+
case 0x22: inDouble = true; break // "
|
6867 |
+
case 0x27: inSingle = true; break // '
|
6868 |
+
case 0x60: inTemplateString = true; break // `
|
6869 |
+
case 0x28: paren++; break // (
|
6870 |
+
case 0x29: paren--; break // )
|
6871 |
+
case 0x5B: square++; break // [
|
6872 |
+
case 0x5D: square--; break // ]
|
6873 |
+
case 0x7B: curly++; break // {
|
6874 |
+
case 0x7D: curly--; break // }
|
6875 |
+
}
|
6876 |
+
if (c === 0x2f) { // /
|
6877 |
+
var j = i - 1;
|
6878 |
+
var p = (void 0);
|
6879 |
+
// find first non-whitespace prev char
|
6880 |
+
for (; j >= 0; j--) {
|
6881 |
+
p = exp.charAt(j);
|
6882 |
+
if (p !== ' ') { break }
|
6883 |
+
}
|
6884 |
+
if (!p || !validDivisionCharRE.test(p)) {
|
6885 |
+
inRegex = true;
|
6886 |
+
}
|
6887 |
}
|
6888 |
}
|
6889 |
+
}
|
6890 |
|
6891 |
+
if (expression === undefined) {
|
6892 |
+
expression = exp.slice(0, i).trim();
|
6893 |
+
} else if (lastFilterIndex !== 0) {
|
6894 |
+
pushFilter();
|
6895 |
}
|
|
|
|
|
|
|
6896 |
|
6897 |
+
function pushFilter () {
|
6898 |
+
(filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());
|
6899 |
+
lastFilterIndex = i + 1;
|
6900 |
+
}
|
6901 |
|
6902 |
+
if (filters) {
|
6903 |
+
for (i = 0; i < filters.length; i++) {
|
6904 |
+
expression = wrapFilter(expression, filters[i]);
|
6905 |
+
}
|
6906 |
+
}
|
6907 |
|
6908 |
+
return expression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6909 |
}
|
|
|
6910 |
|
6911 |
+
function wrapFilter (exp, filter) {
|
6912 |
+
var i = filter.indexOf('(');
|
6913 |
+
if (i < 0) {
|
6914 |
+
// _f: resolveFilter
|
6915 |
+
return ("_f(\"" + filter + "\")(" + exp + ")")
|
6916 |
+
} else {
|
6917 |
+
var name = filter.slice(0, i);
|
6918 |
+
var args = filter.slice(i + 1);
|
6919 |
+
return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args))
|
6920 |
+
}
|
6921 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6922 |
|
6923 |
+
/* */
|
|
|
|
|
6924 |
|
|
|
6925 |
|
|
|
|
|
|
|
|
|
|
|
6926 |
|
6927 |
+
/* eslint-disable no-unused-vars */
|
6928 |
+
function baseWarn (msg, range) {
|
6929 |
+
console.error(("[Vue compiler]: " + msg));
|
6930 |
+
}
|
6931 |
+
/* eslint-enable no-unused-vars */
|
6932 |
|
6933 |
+
function pluckModuleFunction (
|
6934 |
+
modules,
|
6935 |
+
key
|
6936 |
+
) {
|
6937 |
+
return modules
|
6938 |
+
? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })
|
6939 |
+
: []
|
6940 |
+
}
|
6941 |
|
6942 |
+
function addProp (el, name, value, range, dynamic) {
|
6943 |
+
(el.props || (el.props = [])).push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
|
6944 |
+
el.plain = false;
|
|
|
6945 |
}
|
|
|
6946 |
|
6947 |
+
function addAttr (el, name, value, range, dynamic) {
|
6948 |
+
var attrs = dynamic
|
6949 |
+
? (el.dynamicAttrs || (el.dynamicAttrs = []))
|
6950 |
+
: (el.attrs || (el.attrs = []));
|
6951 |
+
attrs.push(rangeSetItem({ name: name, value: value, dynamic: dynamic }, range));
|
6952 |
+
el.plain = false;
|
6953 |
+
}
|
6954 |
|
6955 |
+
// add a raw attr (use this in preTransforms)
|
6956 |
+
function addRawAttr (el, name, value, range) {
|
6957 |
+
el.attrsMap[name] = value;
|
6958 |
+
el.attrsList.push(rangeSetItem({ name: name, value: value }, range));
|
6959 |
+
}
|
6960 |
|
6961 |
+
function addDirective (
|
6962 |
+
el,
|
6963 |
+
name,
|
6964 |
+
rawName,
|
6965 |
+
value,
|
6966 |
+
arg,
|
6967 |
+
isDynamicArg,
|
6968 |
+
modifiers,
|
6969 |
+
range
|
6970 |
+
) {
|
6971 |
+
(el.directives || (el.directives = [])).push(rangeSetItem({
|
6972 |
+
name: name,
|
6973 |
+
rawName: rawName,
|
6974 |
+
value: value,
|
6975 |
+
arg: arg,
|
6976 |
+
isDynamicArg: isDynamicArg,
|
6977 |
+
modifiers: modifiers
|
6978 |
+
}, range));
|
6979 |
+
el.plain = false;
|
6980 |
+
}
|
6981 |
|
6982 |
+
function prependModifierMarker (symbol, name, dynamic) {
|
6983 |
+
return dynamic
|
6984 |
+
? ("_p(" + name + ",\"" + symbol + "\")")
|
6985 |
+
: symbol + name // mark the event as captured
|
6986 |
+
}
|
6987 |
|
6988 |
+
function addHandler (
|
6989 |
+
el,
|
6990 |
+
name,
|
6991 |
+
value,
|
6992 |
+
modifiers,
|
6993 |
+
important,
|
6994 |
+
warn,
|
6995 |
+
range,
|
6996 |
+
dynamic
|
6997 |
+
) {
|
6998 |
+
modifiers = modifiers || emptyObject;
|
6999 |
+
// warn prevent and passive modifier
|
7000 |
+
/* istanbul ignore if */
|
7001 |
+
if (
|
7002 |
+
warn &&
|
7003 |
+
modifiers.prevent && modifiers.passive
|
7004 |
+
) {
|
7005 |
+
warn(
|
7006 |
+
'passive and prevent can\'t be used together. ' +
|
7007 |
+
'Passive handler can\'t prevent default event.',
|
7008 |
+
range
|
7009 |
+
);
|
7010 |
+
}
|
7011 |
|
7012 |
+
// normalize click.right and click.middle since they don't actually fire
|
7013 |
+
// this is technically browser-specific, but at least for now browsers are
|
7014 |
+
// the only target envs that have right/middle clicks.
|
7015 |
+
if (modifiers.right) {
|
7016 |
+
if (dynamic) {
|
7017 |
+
name = "(" + name + ")==='click'?'contextmenu':(" + name + ")";
|
7018 |
+
} else if (name === 'click') {
|
7019 |
+
name = 'contextmenu';
|
7020 |
+
delete modifiers.right;
|
7021 |
+
}
|
7022 |
+
} else if (modifiers.middle) {
|
7023 |
+
if (dynamic) {
|
7024 |
+
name = "(" + name + ")==='click'?'mouseup':(" + name + ")";
|
7025 |
+
} else if (name === 'click') {
|
7026 |
+
name = 'mouseup';
|
7027 |
+
}
|
7028 |
+
}
|
7029 |
|
7030 |
+
// check capture modifier
|
7031 |
+
if (modifiers.capture) {
|
7032 |
+
delete modifiers.capture;
|
7033 |
+
name = prependModifierMarker('!', name, dynamic);
|
7034 |
+
}
|
7035 |
+
if (modifiers.once) {
|
7036 |
+
delete modifiers.once;
|
7037 |
+
name = prependModifierMarker('~', name, dynamic);
|
7038 |
+
}
|
7039 |
+
/* istanbul ignore if */
|
7040 |
+
if (modifiers.passive) {
|
7041 |
+
delete modifiers.passive;
|
7042 |
+
name = prependModifierMarker('&', name, dynamic);
|
7043 |
+
}
|
7044 |
|
7045 |
+
var events;
|
7046 |
+
if (modifiers.native) {
|
7047 |
+
delete modifiers.native;
|
7048 |
+
events = el.nativeEvents || (el.nativeEvents = {});
|
7049 |
+
} else {
|
7050 |
+
events = el.events || (el.events = {});
|
7051 |
+
}
|
7052 |
|
7053 |
+
var newHandler = rangeSetItem({ value: value.trim(), dynamic: dynamic }, range);
|
7054 |
+
if (modifiers !== emptyObject) {
|
7055 |
+
newHandler.modifiers = modifiers;
|
7056 |
+
}
|
7057 |
|
7058 |
+
var handlers = events[name];
|
7059 |
+
/* istanbul ignore if */
|
7060 |
+
if (Array.isArray(handlers)) {
|
7061 |
+
important ? handlers.unshift(newHandler) : handlers.push(newHandler);
|
7062 |
+
} else if (handlers) {
|
7063 |
+
events[name] = important ? [newHandler, handlers] : [handlers, newHandler];
|
7064 |
+
} else {
|
7065 |
+
events[name] = newHandler;
|
7066 |
+
}
|
7067 |
|
7068 |
+
el.plain = false;
|
7069 |
+
}
|
|
|
7070 |
|
7071 |
+
function getRawBindingAttr (
|
7072 |
+
el,
|
7073 |
+
name
|
7074 |
+
) {
|
7075 |
+
return el.rawAttrsMap[':' + name] ||
|
7076 |
+
el.rawAttrsMap['v-bind:' + name] ||
|
7077 |
+
el.rawAttrsMap[name]
|
7078 |
+
}
|
7079 |
|
7080 |
+
function getBindingAttr (
|
7081 |
+
el,
|
7082 |
+
name,
|
7083 |
+
getStatic
|
7084 |
+
) {
|
7085 |
+
var dynamicValue =
|
7086 |
+
getAndRemoveAttr(el, ':' + name) ||
|
7087 |
+
getAndRemoveAttr(el, 'v-bind:' + name);
|
7088 |
+
if (dynamicValue != null) {
|
7089 |
+
return parseFilters(dynamicValue)
|
7090 |
+
} else if (getStatic !== false) {
|
7091 |
+
var staticValue = getAndRemoveAttr(el, name);
|
7092 |
+
if (staticValue != null) {
|
7093 |
+
return JSON.stringify(staticValue)
|
7094 |
+
}
|
7095 |
}
|
7096 |
}
|
7097 |
+
|
7098 |
+
// note: this only removes the attr from the Array (attrsList) so that it
|
7099 |
+
// doesn't get processed by processAttrs.
|
7100 |
+
// By default it does NOT remove it from the map (attrsMap) because the map is
|
7101 |
+
// needed during codegen.
|
7102 |
+
function getAndRemoveAttr (
|
7103 |
+
el,
|
7104 |
+
name,
|
7105 |
+
removeFromMap
|
7106 |
+
) {
|
7107 |
+
var val;
|
7108 |
+
if ((val = el.attrsMap[name]) != null) {
|
7109 |
+
var list = el.attrsList;
|
7110 |
+
for (var i = 0, l = list.length; i < l; i++) {
|
7111 |
+
if (list[i].name === name) {
|
7112 |
+
list.splice(i, 1);
|
7113 |
+
break
|
7114 |
+
}
|
7115 |
+
}
|
7116 |
}
|
7117 |
+
if (removeFromMap) {
|
7118 |
+
delete el.attrsMap[name];
|
7119 |
+
}
|
7120 |
+
return val
|
7121 |
}
|
|
|
|
|
7122 |
|
7123 |
+
function getAndRemoveAttrByRegex (
|
7124 |
+
el,
|
7125 |
+
name
|
7126 |
+
) {
|
7127 |
+
var list = el.attrsList;
|
7128 |
+
for (var i = 0, l = list.length; i < l; i++) {
|
7129 |
+
var attr = list[i];
|
7130 |
+
if (name.test(attr.name)) {
|
7131 |
+
list.splice(i, 1);
|
7132 |
+
return attr
|
7133 |
+
}
|
7134 |
+
}
|
7135 |
}
|
|
|
7136 |
|
7137 |
+
function rangeSetItem (
|
7138 |
+
item,
|
7139 |
+
range
|
7140 |
+
) {
|
7141 |
+
if (range) {
|
7142 |
+
if (range.start != null) {
|
7143 |
+
item.start = range.start;
|
7144 |
+
}
|
7145 |
+
if (range.end != null) {
|
7146 |
+
item.end = range.end;
|
7147 |
+
}
|
7148 |
+
}
|
7149 |
+
return item
|
7150 |
}
|
|
|
|
|
|
|
7151 |
|
7152 |
+
/* */
|
|
|
|
|
7153 |
|
7154 |
+
/**
|
7155 |
+
* Cross-platform code generation for component v-model
|
7156 |
+
*/
|
7157 |
+
function genComponentModel (
|
7158 |
+
el,
|
7159 |
+
value,
|
7160 |
+
modifiers
|
7161 |
+
) {
|
7162 |
+
var ref = modifiers || {};
|
7163 |
+
var number = ref.number;
|
7164 |
+
var trim = ref.trim;
|
7165 |
+
|
7166 |
+
var baseValueExpression = '$$v';
|
7167 |
+
var valueExpression = baseValueExpression;
|
7168 |
+
if (trim) {
|
7169 |
+
valueExpression =
|
7170 |
+
"(typeof " + baseValueExpression + " === 'string'" +
|
7171 |
+
"? " + baseValueExpression + ".trim()" +
|
7172 |
+
": " + baseValueExpression + ")";
|
7173 |
+
}
|
7174 |
+
if (number) {
|
7175 |
+
valueExpression = "_n(" + valueExpression + ")";
|
7176 |
+
}
|
7177 |
+
var assignment = genAssignmentCode(value, valueExpression);
|
7178 |
+
|
7179 |
+
el.model = {
|
7180 |
+
value: ("(" + value + ")"),
|
7181 |
+
expression: JSON.stringify(value),
|
7182 |
+
callback: ("function (" + baseValueExpression + ") {" + assignment + "}")
|
7183 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7184 |
}
|
|
|
|
|
|
|
|
|
|
|
7185 |
|
7186 |
+
/**
|
7187 |
+
* Cross-platform codegen helper for generating v-model value assignment code.
|
7188 |
+
*/
|
7189 |
+
function genAssignmentCode (
|
7190 |
+
value,
|
7191 |
+
assignment
|
7192 |
+
) {
|
7193 |
+
var res = parseModel(value);
|
7194 |
+
if (res.key === null) {
|
7195 |
+
return (value + "=" + assignment)
|
7196 |
+
} else {
|
7197 |
+
return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")")
|
7198 |
}
|
|
|
|
|
|
|
7199 |
}
|
|
|
7200 |
|
7201 |
+
/**
|
7202 |
+
* Parse a v-model expression into a base path and a final key segment.
|
7203 |
+
* Handles both dot-path and possible square brackets.
|
7204 |
+
*
|
7205 |
+
* Possible cases:
|
7206 |
+
*
|
7207 |
+
* - test
|
7208 |
+
* - test[key]
|
7209 |
+
* - test[test1[key]]
|
7210 |
+
* - test["a"][key]
|
7211 |
+
* - xxx.test[a[a].test1[key]]
|
7212 |
+
* - test.xxx.a["asa"][test1[key]]
|
7213 |
+
*
|
7214 |
+
*/
|
7215 |
|
7216 |
+
var len, str, chr, index$1, expressionPos, expressionEndPos;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7217 |
|
|
|
|
|
|
|
7218 |
|
7219 |
+
|
7220 |
+
function parseModel (val) {
|
7221 |
+
// Fix https://github.com/vuejs/vue/pull/7730
|
7222 |
+
// allow v-model="obj.val " (trailing whitespace)
|
7223 |
+
val = val.trim();
|
7224 |
+
len = val.length;
|
7225 |
+
|
7226 |
+
if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
|
7227 |
+
index$1 = val.lastIndexOf('.');
|
7228 |
+
if (index$1 > -1) {
|
7229 |
+
return {
|
7230 |
+
exp: val.slice(0, index$1),
|
7231 |
+
key: '"' + val.slice(index$1 + 1) + '"'
|
7232 |
+
}
|
7233 |
+
} else {
|
7234 |
+
return {
|
7235 |
+
exp: val,
|
7236 |
+
key: null
|
7237 |
+
}
|
7238 |
}
|
|
|
|
|
7239 |
}
|
|
|
|
|
7240 |
|
7241 |
+
str = val;
|
7242 |
+
index$1 = expressionPos = expressionEndPos = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7243 |
|
7244 |
+
while (!eof()) {
|
7245 |
+
chr = next();
|
7246 |
+
/* istanbul ignore if */
|
7247 |
+
if (isStringStart(chr)) {
|
7248 |
+
parseString(chr);
|
7249 |
+
} else if (chr === 0x5B) {
|
7250 |
+
parseBracket(chr);
|
7251 |
+
}
|
7252 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7253 |
|
7254 |
+
return {
|
7255 |
+
exp: val.slice(0, expressionPos),
|
7256 |
+
key: val.slice(expressionPos + 1, expressionEndPos)
|
7257 |
+
}
|
7258 |
+
}
|
|
|
|
|
7259 |
|
7260 |
+
function next () {
|
7261 |
+
return str.charCodeAt(++index$1)
|
|
|
|
|
|
|
|
|
7262 |
}
|
|
|
|
|
7263 |
|
7264 |
+
function eof () {
|
7265 |
+
return index$1 >= len
|
7266 |
+
}
|
7267 |
|
7268 |
+
function isStringStart (chr) {
|
7269 |
+
return chr === 0x22 || chr === 0x27
|
7270 |
+
}
|
7271 |
|
7272 |
+
function parseBracket (chr) {
|
7273 |
+
var inBracket = 1;
|
7274 |
+
expressionPos = index$1;
|
7275 |
+
while (!eof()) {
|
7276 |
+
chr = next();
|
7277 |
+
if (isStringStart(chr)) {
|
7278 |
+
parseString(chr);
|
7279 |
+
continue
|
7280 |
+
}
|
7281 |
+
if (chr === 0x5B) { inBracket++; }
|
7282 |
+
if (chr === 0x5D) { inBracket--; }
|
7283 |
+
if (inBracket === 0) {
|
7284 |
+
expressionEndPos = index$1;
|
7285 |
+
break
|
7286 |
}
|
7287 |
}
|
7288 |
}
|
7289 |
|
7290 |
+
function parseString (chr) {
|
7291 |
+
var stringQuote = chr;
|
7292 |
+
while (!eof()) {
|
7293 |
+
chr = next();
|
7294 |
+
if (chr === stringQuote) {
|
7295 |
+
break
|
7296 |
+
}
|
7297 |
+
}
|
7298 |
}
|
7299 |
|
7300 |
+
/* */
|
7301 |
+
|
7302 |
+
var warn$1;
|
7303 |
+
|
7304 |
+
// in some cases, the event used has to be determined at runtime
|
7305 |
+
// so we used some reserved tokens during compile.
|
7306 |
+
var RANGE_TOKEN = '__r';
|
7307 |
+
var CHECKBOX_RADIO_TOKEN = '__c';
|
7308 |
+
|
7309 |
+
function model (
|
7310 |
+
el,
|
7311 |
+
dir,
|
7312 |
+
_warn
|
7313 |
+
) {
|
7314 |
+
warn$1 = _warn;
|
7315 |
+
var value = dir.value;
|
7316 |
+
var modifiers = dir.modifiers;
|
7317 |
+
var tag = el.tag;
|
7318 |
+
var type = el.attrsMap.type;
|
7319 |
+
|
7320 |
+
{
|
7321 |
+
// inputs with type="file" are read only and setting the input's
|
7322 |
+
// value will throw an error.
|
7323 |
+
if (tag === 'input' && type === 'file') {
|
7324 |
+
warn$1(
|
7325 |
+
"<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" +
|
7326 |
+
"File inputs are read only. Use a v-on:change listener instead.",
|
7327 |
+
el.rawAttrsMap['v-model']
|
7328 |
+
);
|
7329 |
}
|
7330 |
}
|
|
|
|
|
|
|
7331 |
|
7332 |
+
if (el.component) {
|
7333 |
+
genComponentModel(el, value, modifiers);
|
7334 |
+
// component v-model doesn't need extra runtime
|
7335 |
+
return false
|
7336 |
+
} else if (tag === 'select') {
|
7337 |
+
genSelect(el, value, modifiers);
|
7338 |
+
} else if (tag === 'input' && type === 'checkbox') {
|
7339 |
+
genCheckboxModel(el, value, modifiers);
|
7340 |
+
} else if (tag === 'input' && type === 'radio') {
|
7341 |
+
genRadioModel(el, value, modifiers);
|
7342 |
+
} else if (tag === 'input' || tag === 'textarea') {
|
7343 |
+
genDefaultModel(el, value, modifiers);
|
7344 |
+
} else if (!config.isReservedTag(tag)) {
|
7345 |
+
genComponentModel(el, value, modifiers);
|
7346 |
+
// component v-model doesn't need extra runtime
|
7347 |
+
return false
|
7348 |
+
} else {
|
7349 |
+
warn$1(
|
7350 |
+
"<" + (el.tag) + " v-model=\"" + value + "\">: " +
|
7351 |
+
"v-model is not supported on this element type. " +
|
7352 |
+
'If you are working with contenteditable, it\'s recommended to ' +
|
7353 |
+
'wrap a library dedicated for that purpose inside a custom component.',
|
7354 |
+
el.rawAttrsMap['v-model']
|
7355 |
+
);
|
7356 |
}
|
7357 |
+
|
7358 |
+
// ensure runtime directive metadata
|
7359 |
+
return true
|
7360 |
}
|
7361 |
|
7362 |
+
function genCheckboxModel (
|
7363 |
+
el,
|
7364 |
+
value,
|
7365 |
+
modifiers
|
7366 |
+
) {
|
7367 |
+
var number = modifiers && modifiers.number;
|
7368 |
+
var valueBinding = getBindingAttr(el, 'value') || 'null';
|
7369 |
+
var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';
|
7370 |
+
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';
|
7371 |
+
addProp(el, 'checked',
|
7372 |
+
"Array.isArray(" + value + ")" +
|
7373 |
+
"?_i(" + value + "," + valueBinding + ")>-1" + (
|
7374 |
+
trueValueBinding === 'true'
|
7375 |
+
? (":(" + value + ")")
|
7376 |
+
: (":_q(" + value + "," + trueValueBinding + ")")
|
7377 |
+
)
|
7378 |
+
);
|
7379 |
+
addHandler(el, 'change',
|
7380 |
+
"var $$a=" + value + "," +
|
7381 |
+
'$$el=$event.target,' +
|
7382 |
+
"$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" +
|
7383 |
+
'if(Array.isArray($$a)){' +
|
7384 |
+
"var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
|
7385 |
+
'$$i=_i($$a,$$v);' +
|
7386 |
+
"if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" +
|
7387 |
+
"else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" +
|
7388 |
+
"}else{" + (genAssignmentCode(value, '$$c')) + "}",
|
7389 |
+
null, true
|
7390 |
+
);
|
7391 |
}
|
7392 |
|
7393 |
+
function genRadioModel (
|
7394 |
+
el,
|
7395 |
+
value,
|
7396 |
+
modifiers
|
7397 |
+
) {
|
7398 |
+
var number = modifiers && modifiers.number;
|
7399 |
+
var valueBinding = getBindingAttr(el, 'value') || 'null';
|
7400 |
+
valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding;
|
7401 |
+
addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")"));
|
7402 |
+
addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);
|
7403 |
+
}
|
7404 |
|
7405 |
+
function genSelect (
|
7406 |
+
el,
|
7407 |
+
value,
|
7408 |
+
modifiers
|
|
|
|
|
|
|
|
|
7409 |
) {
|
7410 |
+
var number = modifiers && modifiers.number;
|
7411 |
+
var selectedVal = "Array.prototype.filter" +
|
7412 |
+
".call($event.target.options,function(o){return o.selected})" +
|
7413 |
+
".map(function(o){var val = \"_value\" in o ? o._value : o.value;" +
|
7414 |
+
"return " + (number ? '_n(val)' : 'val') + "})";
|
|
|
|
|
|
|
7415 |
|
7416 |
+
var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]';
|
7417 |
+
var code = "var $$selectedVal = " + selectedVal + ";";
|
7418 |
+
code = code + " " + (genAssignmentCode(value, assignment));
|
7419 |
+
addHandler(el, 'change', code, null, true);
|
7420 |
+
}
|
7421 |
|
7422 |
+
function genDefaultModel (
|
7423 |
+
el,
|
7424 |
+
value,
|
7425 |
+
modifiers
|
7426 |
+
) {
|
7427 |
+
var type = el.attrsMap.type;
|
7428 |
+
|
7429 |
+
// warn if v-bind:value conflicts with v-model
|
7430 |
+
// except for inputs with v-bind:type
|
7431 |
+
{
|
7432 |
+
var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value'];
|
7433 |
+
var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];
|
7434 |
+
if (value$1 && !typeBinding) {
|
7435 |
+
var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value';
|
7436 |
+
warn$1(
|
7437 |
+
binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " +
|
7438 |
+
'because the latter already expands to a value binding internally',
|
7439 |
+
el.rawAttrsMap[binding]
|
7440 |
+
);
|
7441 |
}
|
7442 |
+
}
|
7443 |
|
7444 |
+
var ref = modifiers || {};
|
7445 |
+
var lazy = ref.lazy;
|
7446 |
+
var number = ref.number;
|
7447 |
+
var trim = ref.trim;
|
7448 |
+
var needCompositionGuard = !lazy && type !== 'range';
|
7449 |
+
var event = lazy
|
7450 |
+
? 'change'
|
7451 |
+
: type === 'range'
|
7452 |
+
? RANGE_TOKEN
|
7453 |
+
: 'input';
|
7454 |
|
7455 |
+
var valueExpression = '$event.target.value';
|
7456 |
+
if (trim) {
|
7457 |
+
valueExpression = "$event.target.value.trim()";
|
7458 |
+
}
|
7459 |
+
if (number) {
|
7460 |
+
valueExpression = "_n(" + valueExpression + ")";
|
7461 |
+
}
|
|
|
7462 |
|
7463 |
+
var code = genAssignmentCode(value, valueExpression);
|
7464 |
+
if (needCompositionGuard) {
|
7465 |
+
code = "if($event.target.composing)return;" + code;
|
|
|
|
|
|
|
|
|
|
|
|
|
7466 |
}
|
|
|
7467 |
|
7468 |
+
addProp(el, 'value', ("(" + value + ")"));
|
7469 |
+
addHandler(el, event, code, null, true);
|
7470 |
+
if (trim || number) {
|
7471 |
+
addHandler(el, 'blur', '$forceUpdate()');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7472 |
}
|
7473 |
}
|
7474 |
|
7475 |
+
/* */
|
7476 |
+
|
7477 |
+
// normalize v-model event tokens that can only be determined at runtime.
|
7478 |
+
// it's important to place the event as the first in the array because
|
7479 |
+
// the whole point is ensuring the v-model callback gets called before
|
7480 |
+
// user-attached handlers.
|
7481 |
+
function normalizeEvents (on) {
|
7482 |
+
/* istanbul ignore if */
|
7483 |
+
if (isDef(on[RANGE_TOKEN])) {
|
7484 |
+
// IE input[type=range] only supports `change` event
|
7485 |
+
var event = isIE ? 'change' : 'input';
|
7486 |
+
on[event] = [].concat(on[RANGE_TOKEN], on[event] || []);
|
7487 |
+
delete on[RANGE_TOKEN];
|
7488 |
+
}
|
7489 |
+
// This was originally intended to fix #4521 but no longer necessary
|
7490 |
+
// after 2.5. Keeping it for backwards compat with generated code from < 2.4
|
7491 |
+
/* istanbul ignore if */
|
7492 |
+
if (isDef(on[CHECKBOX_RADIO_TOKEN])) {
|
7493 |
+
on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []);
|
7494 |
+
delete on[CHECKBOX_RADIO_TOKEN];
|
7495 |
}
|
7496 |
}
|
7497 |
|
7498 |
+
var target$1;
|
7499 |
+
|
7500 |
+
function createOnceHandler$1 (event, handler, capture) {
|
7501 |
+
var _target = target$1; // save current target element in closure
|
7502 |
+
return function onceHandler () {
|
7503 |
+
var res = handler.apply(null, arguments);
|
7504 |
+
if (res !== null) {
|
7505 |
+
remove$2(event, onceHandler, capture, _target);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7506 |
}
|
7507 |
}
|
|
|
|
|
|
|
7508 |
}
|
7509 |
|
7510 |
+
// #9446: Firefox <= 53 (in particular, ESR 52) has incorrect Event.timeStamp
|
7511 |
+
// implementation and does not fire microtasks in between event propagation, so
|
7512 |
+
// safe to exclude.
|
7513 |
+
var useMicrotaskFix = isUsingMicroTask && !(isFF && Number(isFF[1]) <= 53);
|
7514 |
+
|
7515 |
+
function add$1 (
|
7516 |
+
name,
|
7517 |
+
handler,
|
7518 |
+
capture,
|
7519 |
+
passive
|
7520 |
+
) {
|
7521 |
+
// async edge case #6566: inner click event triggers patch, event handler
|
7522 |
+
// attached to outer element during patch, and triggered again. This
|
7523 |
+
// happens because browsers fire microtask ticks between event propagation.
|
7524 |
+
// the solution is simple: we save the timestamp when a handler is attached,
|
7525 |
+
// and the handler would only fire if the event passed to it was fired
|
7526 |
+
// AFTER it was attached.
|
7527 |
+
if (useMicrotaskFix) {
|
7528 |
+
var attachedTimestamp = currentFlushTimestamp;
|
7529 |
+
var original = handler;
|
7530 |
+
handler = original._wrapper = function (e) {
|
7531 |
+
if (
|
7532 |
+
// no bubbling, should always fire.
|
7533 |
+
// this is just a safety net in case event.timeStamp is unreliable in
|
7534 |
+
// certain weird environments...
|
7535 |
+
e.target === e.currentTarget ||
|
7536 |
+
// event is fired after handler attachment
|
7537 |
+
e.timeStamp >= attachedTimestamp ||
|
7538 |
+
// bail for environments that have buggy event.timeStamp implementations
|
7539 |
+
// #9462 iOS 9 bug: event.timeStamp is 0 after history.pushState
|
7540 |
+
// #9681 QtWebEngine event.timeStamp is negative value
|
7541 |
+
e.timeStamp <= 0 ||
|
7542 |
+
// #9448 bail if event is fired in another document in a multi-page
|
7543 |
+
// electron/nw.js app, since event.timeStamp will be using a different
|
7544 |
+
// starting reference
|
7545 |
+
e.target.ownerDocument !== document
|
7546 |
+
) {
|
7547 |
+
return original.apply(this, arguments)
|
7548 |
}
|
7549 |
+
};
|
|
|
|
|
7550 |
}
|
7551 |
+
target$1.addEventListener(
|
7552 |
+
name,
|
7553 |
+
handler,
|
7554 |
+
supportsPassive
|
7555 |
+
? { capture: capture, passive: passive }
|
7556 |
+
: capture
|
7557 |
+
);
|
7558 |
}
|
7559 |
|
7560 |
+
function remove$2 (
|
7561 |
+
name,
|
7562 |
+
handler,
|
7563 |
+
capture,
|
7564 |
+
_target
|
7565 |
+
) {
|
7566 |
+
(_target || target$1).removeEventListener(
|
7567 |
+
name,
|
7568 |
+
handler._wrapper || handler,
|
7569 |
+
capture
|
7570 |
+
);
|
7571 |
}
|
7572 |
|
7573 |
+
function updateDOMListeners (oldVnode, vnode) {
|
7574 |
+
if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) {
|
7575 |
+
return
|
7576 |
}
|
7577 |
+
var on = vnode.data.on || {};
|
7578 |
+
var oldOn = oldVnode.data.on || {};
|
7579 |
+
target$1 = vnode.elm;
|
7580 |
+
normalizeEvents(on);
|
7581 |
+
updateListeners(on, oldOn, add$1, remove$2, createOnceHandler$1, vnode.context);
|
7582 |
+
target$1 = undefined;
|
7583 |
}
|
7584 |
|
7585 |
+
var events = {
|
7586 |
+
create: updateDOMListeners,
|
7587 |
+
update: updateDOMListeners
|
7588 |
+
};
|
7589 |
+
|
7590 |
+
/* */
|
7591 |
+
|
7592 |
+
var svgContainer;
|
7593 |
+
|
7594 |
+
function updateDOMProps (oldVnode, vnode) {
|
7595 |
+
if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) {
|
7596 |
+
return
|
7597 |
}
|
7598 |
+
var key, cur;
|
7599 |
+
var elm = vnode.elm;
|
7600 |
+
var oldProps = oldVnode.data.domProps || {};
|
7601 |
+
var props = vnode.data.domProps || {};
|
7602 |
+
// clone observed objects, as the user probably wants to mutate it
|
7603 |
+
if (isDef(props.__ob__)) {
|
7604 |
+
props = vnode.data.domProps = extend({}, props);
|
7605 |
+
}
|
7606 |
+
|
7607 |
+
for (key in oldProps) {
|
7608 |
+
if (!(key in props)) {
|
7609 |
+
elm[key] = '';
|
7610 |
+
}
|
7611 |
+
}
|
7612 |
+
|
7613 |
+
for (key in props) {
|
7614 |
+
cur = props[key];
|
7615 |
+
// ignore children if the node has textContent or innerHTML,
|
7616 |
+
// as these will throw away existing DOM nodes and cause removal errors
|
7617 |
+
// on subsequent patches (#3360)
|
7618 |
+
if (key === 'textContent' || key === 'innerHTML') {
|
7619 |
+
if (vnode.children) { vnode.children.length = 0; }
|
7620 |
+
if (cur === oldProps[key]) { continue }
|
7621 |
+
// #6601 work around Chrome version <= 55 bug where single textNode
|
7622 |
+
// replaced by innerHTML/textContent retains its parentNode property
|
7623 |
+
if (elm.childNodes.length === 1) {
|
7624 |
+
elm.removeChild(elm.childNodes[0]);
|
7625 |
+
}
|
7626 |
+
}
|
7627 |
|
7628 |
+
if (key === 'value' && elm.tagName !== 'PROGRESS') {
|
7629 |
+
// store value as _value as well since
|
7630 |
+
// non-string values will be stringified
|
7631 |
+
elm._value = cur;
|
7632 |
+
// avoid resetting cursor position when value is the same
|
7633 |
+
var strCur = isUndef(cur) ? '' : String(cur);
|
7634 |
+
if (shouldUpdateValue(elm, strCur)) {
|
7635 |
+
elm.value = strCur;
|
7636 |
+
}
|
7637 |
+
} else if (key === 'innerHTML' && isSVG(elm.tagName) && isUndef(elm.innerHTML)) {
|
7638 |
+
// IE doesn't support innerHTML for SVG elements
|
7639 |
+
svgContainer = svgContainer || document.createElement('div');
|
7640 |
+
svgContainer.innerHTML = "<svg>" + cur + "</svg>";
|
7641 |
+
var svg = svgContainer.firstChild;
|
7642 |
+
while (elm.firstChild) {
|
7643 |
+
elm.removeChild(elm.firstChild);
|
7644 |
}
|
7645 |
+
while (svg.firstChild) {
|
7646 |
+
elm.appendChild(svg.firstChild);
|
7647 |
+
}
|
7648 |
+
} else if (
|
7649 |
+
// skip the update if old and new VDOM state is the same.
|
7650 |
+
// `value` is handled separately because the DOM value may be temporarily
|
7651 |
+
// out of sync with VDOM state due to focus, composition and modifiers.
|
7652 |
+
// This #4521 by skipping the unnecessary `checked` update.
|
7653 |
+
cur !== oldProps[key]
|
7654 |
+
) {
|
7655 |
+
// some property updates can throw
|
7656 |
+
// e.g. `value` on <progress> w/ non-finite value
|
7657 |
+
try {
|
7658 |
+
elm[key] = cur;
|
7659 |
+
} catch (e) {}
|
7660 |
}
|
7661 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7662 |
}
|
7663 |
|
7664 |
+
// check platforms/web/util/attrs.js acceptValue
|
|
|
|
|
|
|
|
|
7665 |
|
7666 |
+
|
7667 |
+
function shouldUpdateValue (elm, checkVal) {
|
7668 |
+
return (!elm.composing && (
|
7669 |
+
elm.tagName === 'OPTION' ||
|
7670 |
+
isNotInFocusAndDirty(elm, checkVal) ||
|
7671 |
+
isDirtyWithModifiers(elm, checkVal)
|
7672 |
+
))
|
|
|
|
|
|
|
|
|
|
|
7673 |
}
|
7674 |
|
7675 |
+
function isNotInFocusAndDirty (elm, checkVal) {
|
7676 |
+
// return true when textbox (.number and .trim) loses focus and its value is
|
7677 |
+
// not equal to the updated value
|
7678 |
+
var notInFocus = true;
|
7679 |
+
// #6157
|
7680 |
+
// work around IE bug when accessing document.activeElement in an iframe
|
7681 |
+
try { notInFocus = document.activeElement !== elm; } catch (e) {}
|
7682 |
+
return notInFocus && elm.value !== checkVal
|
|
|
|
|
|
|
|
|
7683 |
}
|
7684 |
|
7685 |
+
function isDirtyWithModifiers (elm, newVal) {
|
7686 |
+
var value = elm.value;
|
7687 |
+
var modifiers = elm._vModifiers; // injected by v-model runtime
|
7688 |
+
if (isDef(modifiers)) {
|
7689 |
+
if (modifiers.number) {
|
7690 |
+
return toNumber(value) !== toNumber(newVal)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7691 |
}
|
7692 |
+
if (modifiers.trim) {
|
7693 |
+
return value.trim() !== newVal.trim()
|
|
|
|
|
7694 |
}
|
|
|
|
|
7695 |
}
|
7696 |
+
return value !== newVal
|
7697 |
}
|
7698 |
|
7699 |
+
var domProps = {
|
7700 |
+
create: updateDOMProps,
|
7701 |
+
update: updateDOMProps
|
7702 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
7703 |
|
7704 |
+
/* */
|
|
|
|
|
|
|
7705 |
|
7706 |
+
var parseStyleText = cached(function (cssText) {
|
7707 |
+
var res = {};
|
7708 |
+
var listDelimiter = /;(?![^(]*\))/g;
|
7709 |
+
var propertyDelimiter = /:(.+)/;
|
7710 |
+
cssText.split(listDelimiter).forEach(function (item) {
|
7711 |
+
if (item) {
|
7712 |
+
var tmp = item.split(propertyDelimiter);
|
7713 |
+
tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7714 |
}
|
7715 |
+
});
|
7716 |
+
return res
|
7717 |
+
});
|
|
|
|
|
|
|
|
|
|
|
7718 |
|
7719 |
+
// merge static and dynamic style data on the same vnode
|
7720 |
+
function normalizeStyleData (data) {
|
7721 |
+
var style = normalizeStyleBinding(data.style);
|
7722 |
+
// static style is pre-processed into an object during compilation
|
7723 |
+
// and is always a fresh object, so it's safe to merge into it
|
7724 |
+
return data.staticStyle
|
7725 |
+
? extend(data.staticStyle, style)
|
7726 |
+
: style
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7727 |
}
|
7728 |
|
7729 |
+
// normalize possible array / string values into Object
|
7730 |
+
function normalizeStyleBinding (bindingStyle) {
|
7731 |
+
if (Array.isArray(bindingStyle)) {
|
7732 |
+
return toObject(bindingStyle)
|
7733 |
}
|
7734 |
+
if (typeof bindingStyle === 'string') {
|
7735 |
+
return parseStyleText(bindingStyle)
|
|
|
|
|
|
|
7736 |
}
|
7737 |
+
return bindingStyle
|
7738 |
+
}
|
7739 |
|
7740 |
+
/**
|
7741 |
+
* parent component style should be after child's
|
7742 |
+
* so that parent component's style could override it
|
7743 |
+
*/
|
7744 |
+
function getStyle (vnode, checkChild) {
|
7745 |
+
var res = {};
|
7746 |
+
var styleData;
|
7747 |
|
7748 |
+
if (checkChild) {
|
7749 |
+
var childNode = vnode;
|
7750 |
+
while (childNode.componentInstance) {
|
7751 |
+
childNode = childNode.componentInstance._vnode;
|
7752 |
+
if (
|
7753 |
+
childNode && childNode.data &&
|
7754 |
+
(styleData = normalizeStyleData(childNode.data))
|
7755 |
+
) {
|
7756 |
+
extend(res, styleData);
|
7757 |
+
}
|
7758 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7759 |
}
|
7760 |
|
7761 |
+
if ((styleData = normalizeStyleData(vnode.data))) {
|
7762 |
+
extend(res, styleData);
|
|
|
|
|
7763 |
}
|
7764 |
|
7765 |
+
var parentNode = vnode;
|
7766 |
+
while ((parentNode = parentNode.parent)) {
|
7767 |
+
if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {
|
7768 |
+
extend(res, styleData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7769 |
}
|
|
|
|
|
|
|
|
|
|
|
7770 |
}
|
7771 |
+
return res
|
7772 |
}
|
7773 |
|
7774 |
+
/* */
|
7775 |
+
|
7776 |
+
var cssVarRE = /^--/;
|
7777 |
+
var importantRE = /\s*!important$/;
|
7778 |
+
var setProp = function (el, name, val) {
|
7779 |
+
/* istanbul ignore if */
|
7780 |
+
if (cssVarRE.test(name)) {
|
7781 |
+
el.style.setProperty(name, val);
|
7782 |
+
} else if (importantRE.test(val)) {
|
7783 |
+
el.style.setProperty(hyphenate(name), val.replace(importantRE, ''), 'important');
|
7784 |
} else {
|
7785 |
+
var normalizedName = normalize(name);
|
7786 |
+
if (Array.isArray(val)) {
|
7787 |
+
// Support values array created by autoprefixer, e.g.
|
7788 |
+
// {display: ["-webkit-box", "-ms-flexbox", "flex"]}
|
7789 |
+
// Set them one by one, and the browser will only set those it can recognize
|
7790 |
+
for (var i = 0, len = val.length; i < len; i++) {
|
7791 |
+
el.style[normalizedName] = val[i];
|
7792 |
+
}
|
7793 |
+
} else {
|
7794 |
+
el.style[normalizedName] = val;
|
7795 |
}
|
7796 |
}
|
7797 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7798 |
|
7799 |
+
var vendorNames = ['Webkit', 'Moz', 'ms'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7800 |
|
7801 |
+
var emptyStyle;
|
7802 |
+
var normalize = cached(function (prop) {
|
7803 |
+
emptyStyle = emptyStyle || document.createElement('div').style;
|
7804 |
+
prop = camelize(prop);
|
7805 |
+
if (prop !== 'filter' && (prop in emptyStyle)) {
|
7806 |
+
return prop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7807 |
}
|
7808 |
+
var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
|
7809 |
+
for (var i = 0; i < vendorNames.length; i++) {
|
7810 |
+
var name = vendorNames[i] + capName;
|
7811 |
+
if (name in emptyStyle) {
|
7812 |
+
return name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7813 |
}
|
|
|
|
|
7814 |
}
|
7815 |
+
});
|
|
|
7816 |
|
7817 |
+
function updateStyle (oldVnode, vnode) {
|
7818 |
+
var data = vnode.data;
|
7819 |
+
var oldData = oldVnode.data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7820 |
|
7821 |
+
if (isUndef(data.staticStyle) && isUndef(data.style) &&
|
7822 |
+
isUndef(oldData.staticStyle) && isUndef(oldData.style)
|
7823 |
+
) {
|
7824 |
return
|
7825 |
}
|
7826 |
|
7827 |
+
var cur, name;
|
7828 |
+
var el = vnode.elm;
|
7829 |
+
var oldStaticStyle = oldData.staticStyle;
|
7830 |
+
var oldStyleBinding = oldData.normalizedStyle || oldData.style || {};
|
7831 |
|
7832 |
+
// if static style exists, stylebinding already merged into it when doing normalizeStyleData
|
7833 |
+
var oldStyle = oldStaticStyle || oldStyleBinding;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7834 |
|
7835 |
+
var style = normalizeStyleBinding(vnode.data.style) || {};
|
|
|
|
|
7836 |
|
7837 |
+
// store normalized style under a different key for next diff
|
7838 |
+
// make sure to clone it if it's reactive, since the user likely wants
|
7839 |
+
// to mutate it.
|
7840 |
+
vnode.data.normalizedStyle = isDef(style.__ob__)
|
7841 |
+
? extend({}, style)
|
7842 |
+
: style;
|
|
|
|
|
|
|
|
|
7843 |
|
7844 |
+
var newStyle = getStyle(vnode, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7845 |
|
7846 |
+
for (name in oldStyle) {
|
7847 |
+
if (isUndef(newStyle[name])) {
|
7848 |
+
setProp(el, name, '');
|
7849 |
+
}
|
7850 |
+
}
|
7851 |
+
for (name in newStyle) {
|
7852 |
+
cur = newStyle[name];
|
7853 |
+
if (cur !== oldStyle[name]) {
|
7854 |
+
// ie9 setting to null has no effect, must use empty string
|
7855 |
+
setProp(el, name, cur == null ? '' : cur);
|
7856 |
}
|
7857 |
}
|
|
|
|
|
|
|
7858 |
}
|
|
|
7859 |
|
7860 |
+
var style = {
|
7861 |
+
create: updateStyle,
|
7862 |
+
update: updateStyle
|
7863 |
+
};
|
|
|
|
|
|
|
|
|
|
|
7864 |
|
7865 |
+
/* */
|
|
|
|
|
|
|
|
|
7866 |
|
7867 |
+
var whitespaceRE = /\s+/;
|
|
|
|
|
|
|
|
|
7868 |
|
7869 |
+
/**
|
7870 |
+
* Add class with compatibility for SVG since classList is not supported on
|
7871 |
+
* SVG elements in IE
|
7872 |
+
*/
|
7873 |
+
function addClass (el, cls) {
|
7874 |
+
/* istanbul ignore if */
|
7875 |
+
if (!cls || !(cls = cls.trim())) {
|
7876 |
+
return
|
7877 |
+
}
|
7878 |
|
7879 |
+
/* istanbul ignore else */
|
7880 |
+
if (el.classList) {
|
7881 |
+
if (cls.indexOf(' ') > -1) {
|
7882 |
+
cls.split(whitespaceRE).forEach(function (c) { return el.classList.add(c); });
|
7883 |
+
} else {
|
7884 |
+
el.classList.add(cls);
|
|
|
|
|
|
|
7885 |
}
|
7886 |
} else {
|
7887 |
+
var cur = " " + (el.getAttribute('class') || '') + " ";
|
7888 |
+
if (cur.indexOf(' ' + cls + ' ') < 0) {
|
7889 |
+
el.setAttribute('class', (cur + cls).trim());
|
|
|
|
|
7890 |
}
|
7891 |
}
|
7892 |
}
|
7893 |
|
7894 |
+
/**
|
7895 |
+
* Remove class with compatibility for SVG since classList is not supported on
|
7896 |
+
* SVG elements in IE
|
7897 |
+
*/
|
7898 |
+
function removeClass (el, cls) {
|
7899 |
+
/* istanbul ignore if */
|
7900 |
+
if (!cls || !(cls = cls.trim())) {
|
7901 |
+
return
|
7902 |
+
}
|
7903 |
+
|
7904 |
+
/* istanbul ignore else */
|
7905 |
+
if (el.classList) {
|
7906 |
+
if (cls.indexOf(' ') > -1) {
|
7907 |
+
cls.split(whitespaceRE).forEach(function (c) { return el.classList.remove(c); });
|
7908 |
+
} else {
|
7909 |
+
el.classList.remove(cls);
|
7910 |
+
}
|
7911 |
+
if (!el.classList.length) {
|
7912 |
+
el.removeAttribute('class');
|
7913 |
}
|
|
|
|
|
|
|
7914 |
} else {
|
7915 |
+
var cur = " " + (el.getAttribute('class') || '') + " ";
|
7916 |
+
var tar = ' ' + cls + ' ';
|
7917 |
+
while (cur.indexOf(tar) >= 0) {
|
7918 |
+
cur = cur.replace(tar, ' ');
|
7919 |
+
}
|
7920 |
+
cur = cur.trim();
|
7921 |
+
if (cur) {
|
7922 |
+
el.setAttribute('class', cur);
|
7923 |
+
} else {
|
7924 |
+
el.removeAttribute('class');
|
7925 |
+
}
|
7926 |
}
|
7927 |
}
|
7928 |
|
7929 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
7930 |
|
7931 |
+
function resolveTransition (def$$1) {
|
7932 |
+
if (!def$$1) {
|
7933 |
+
return
|
7934 |
+
}
|
7935 |
+
/* istanbul ignore else */
|
7936 |
+
if (typeof def$$1 === 'object') {
|
7937 |
+
var res = {};
|
7938 |
+
if (def$$1.css !== false) {
|
7939 |
+
extend(res, autoCssTransition(def$$1.name || 'v'));
|
7940 |
}
|
7941 |
+
extend(res, def$$1);
|
7942 |
+
return res
|
7943 |
+
} else if (typeof def$$1 === 'string') {
|
7944 |
+
return autoCssTransition(def$$1)
|
7945 |
}
|
7946 |
}
|
|
|
|
|
|
|
7947 |
|
7948 |
+
var autoCssTransition = cached(function (name) {
|
7949 |
+
return {
|
7950 |
+
enterClass: (name + "-enter"),
|
7951 |
+
enterToClass: (name + "-enter-to"),
|
7952 |
+
enterActiveClass: (name + "-enter-active"),
|
7953 |
+
leaveClass: (name + "-leave"),
|
7954 |
+
leaveToClass: (name + "-leave-to"),
|
7955 |
+
leaveActiveClass: (name + "-leave-active")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7956 |
}
|
7957 |
+
});
|
|
|
|
|
|
|
|
|
|
|
7958 |
|
7959 |
+
var hasTransition = inBrowser && !isIE9;
|
7960 |
+
var TRANSITION = 'transition';
|
7961 |
+
var ANIMATION = 'animation';
|
7962 |
|
7963 |
+
// Transition property/event sniffing
|
7964 |
+
var transitionProp = 'transition';
|
7965 |
+
var transitionEndEvent = 'transitionend';
|
7966 |
+
var animationProp = 'animation';
|
7967 |
+
var animationEndEvent = 'animationend';
|
7968 |
+
if (hasTransition) {
|
7969 |
+
/* istanbul ignore if */
|
7970 |
+
if (window.ontransitionend === undefined &&
|
7971 |
+
window.onwebkittransitionend !== undefined
|
7972 |
+
) {
|
7973 |
+
transitionProp = 'WebkitTransition';
|
7974 |
+
transitionEndEvent = 'webkitTransitionEnd';
|
7975 |
+
}
|
7976 |
+
if (window.onanimationend === undefined &&
|
7977 |
+
window.onwebkitanimationend !== undefined
|
7978 |
+
) {
|
7979 |
+
animationProp = 'WebkitAnimation';
|
7980 |
+
animationEndEvent = 'webkitAnimationEnd';
|
7981 |
}
|
7982 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
7983 |
|
7984 |
+
// binding to window is necessary to make hot reload work in IE in strict mode
|
7985 |
+
var raf = inBrowser
|
7986 |
+
? window.requestAnimationFrame
|
7987 |
+
? window.requestAnimationFrame.bind(window)
|
7988 |
+
: setTimeout
|
7989 |
+
: /* istanbul ignore next */ function (fn) { return fn(); };
|
7990 |
|
7991 |
+
function nextFrame (fn) {
|
7992 |
+
raf(function () {
|
7993 |
+
raf(fn);
|
7994 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7995 |
}
|
7996 |
|
7997 |
+
function addTransitionClass (el, cls) {
|
7998 |
+
var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
|
7999 |
+
if (transitionClasses.indexOf(cls) < 0) {
|
8000 |
+
transitionClasses.push(cls);
|
8001 |
+
addClass(el, cls);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8002 |
}
|
8003 |
}
|
|
|
8004 |
|
8005 |
+
function removeTransitionClass (el, cls) {
|
8006 |
+
if (el._transitionClasses) {
|
8007 |
+
remove(el._transitionClasses, cls);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8008 |
}
|
8009 |
+
removeClass(el, cls);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8010 |
}
|
|
|
8011 |
|
8012 |
+
function whenTransitionEnds (
|
8013 |
+
el,
|
8014 |
+
expectedType,
|
8015 |
+
cb
|
8016 |
+
) {
|
8017 |
+
var ref = getTransitionInfo(el, expectedType);
|
8018 |
+
var type = ref.type;
|
8019 |
+
var timeout = ref.timeout;
|
8020 |
+
var propCount = ref.propCount;
|
8021 |
+
if (!type) { return cb() }
|
8022 |
+
var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;
|
8023 |
+
var ended = 0;
|
8024 |
+
var end = function () {
|
8025 |
+
el.removeEventListener(event, onEnd);
|
8026 |
+
cb();
|
8027 |
+
};
|
8028 |
+
var onEnd = function (e) {
|
8029 |
+
if (e.target === el) {
|
8030 |
+
if (++ended >= propCount) {
|
8031 |
+
end();
|
8032 |
+
}
|
8033 |
+
}
|
8034 |
+
};
|
8035 |
+
setTimeout(function () {
|
8036 |
+
if (ended < propCount) {
|
8037 |
+
end();
|
8038 |
+
}
|
8039 |
+
}, timeout + 1);
|
8040 |
+
el.addEventListener(event, onEnd);
|
8041 |
}
|
|
|
8042 |
|
8043 |
+
var transformRE = /\b(transform|all)(,|$)/;
|
|
|
|
|
|
|
8044 |
|
8045 |
+
function getTransitionInfo (el, expectedType) {
|
8046 |
+
var styles = window.getComputedStyle(el);
|
8047 |
+
// JSDOM may return undefined for transition properties
|
8048 |
+
var transitionDelays = (styles[transitionProp + 'Delay'] || '').split(', ');
|
8049 |
+
var transitionDurations = (styles[transitionProp + 'Duration'] || '').split(', ');
|
8050 |
+
var transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
8051 |
+
var animationDelays = (styles[animationProp + 'Delay'] || '').split(', ');
|
8052 |
+
var animationDurations = (styles[animationProp + 'Duration'] || '').split(', ');
|
8053 |
+
var animationTimeout = getTimeout(animationDelays, animationDurations);
|
8054 |
|
8055 |
+
var type;
|
8056 |
+
var timeout = 0;
|
8057 |
+
var propCount = 0;
|
8058 |
+
/* istanbul ignore if */
|
8059 |
+
if (expectedType === TRANSITION) {
|
8060 |
+
if (transitionTimeout > 0) {
|
8061 |
+
type = TRANSITION;
|
8062 |
+
timeout = transitionTimeout;
|
8063 |
+
propCount = transitionDurations.length;
|
8064 |
+
}
|
8065 |
+
} else if (expectedType === ANIMATION) {
|
8066 |
+
if (animationTimeout > 0) {
|
8067 |
+
type = ANIMATION;
|
8068 |
+
timeout = animationTimeout;
|
8069 |
+
propCount = animationDurations.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8070 |
}
|
8071 |
} else {
|
8072 |
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
8073 |
+
type = timeout > 0
|
8074 |
+
? transitionTimeout > animationTimeout
|
8075 |
+
? TRANSITION
|
8076 |
+
: ANIMATION
|
8077 |
+
: null;
|
8078 |
+
propCount = type
|
8079 |
+
? type === TRANSITION
|
8080 |
+
? transitionDurations.length
|
8081 |
+
: animationDurations.length
|
8082 |
+
: 0;
|
8083 |
+
}
|
8084 |
+
var hasTransform =
|
8085 |
+
type === TRANSITION &&
|
8086 |
+
transformRE.test(styles[transitionProp + 'Property']);
|
8087 |
+
return {
|
8088 |
+
type: type,
|
8089 |
+
timeout: timeout,
|
8090 |
+
propCount: propCount,
|
8091 |
+
hasTransform: hasTransform
|
|
|
|
|
|
|
8092 |
}
|
8093 |
}
|
8094 |
|
8095 |
+
function getTimeout (delays, durations) {
|
8096 |
+
/* istanbul ignore next */
|
8097 |
+
while (delays.length < durations.length) {
|
8098 |
+
delays = delays.concat(delays);
|
8099 |
+
}
|
8100 |
|
8101 |
+
return Math.max.apply(null, durations.map(function (d, i) {
|
8102 |
+
return toMs(d) + toMs(delays[i])
|
8103 |
+
}))
|
8104 |
}
|
8105 |
|
8106 |
+
// Old versions of Chromium (below 61.0.3163.100) formats floating pointer numbers
|
8107 |
+
// in a locale-dependent way, using a comma instead of a dot.
|
8108 |
+
// If comma is not replaced with a dot, the input will be rounded down (i.e. acting
|
8109 |
+
// as a floor function) causing unexpected behaviors
|
8110 |
+
function toMs (s) {
|
8111 |
+
return Number(s.slice(0, -1).replace(',', '.')) * 1000
|
8112 |
}
|
8113 |
|
8114 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8115 |
|
8116 |
+
function enter (vnode, toggleDisplay) {
|
8117 |
+
var el = vnode.elm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8118 |
|
8119 |
+
// call leave callback now
|
8120 |
+
if (isDef(el._leaveCb)) {
|
8121 |
+
el._leaveCb.cancelled = true;
|
8122 |
+
el._leaveCb();
|
|
|
|
|
|
|
|
|
|
|
8123 |
}
|
|
|
8124 |
|
8125 |
+
var data = resolveTransition(vnode.data.transition);
|
8126 |
+
if (isUndef(data)) {
|
8127 |
+
return
|
8128 |
+
}
|
|
|
|
|
|
|
8129 |
|
8130 |
+
/* istanbul ignore if */
|
8131 |
+
if (isDef(el._enterCb) || el.nodeType !== 1) {
|
8132 |
+
return
|
8133 |
+
}
|
|
|
|
|
8134 |
|
8135 |
+
var css = data.css;
|
8136 |
+
var type = data.type;
|
8137 |
+
var enterClass = data.enterClass;
|
8138 |
+
var enterToClass = data.enterToClass;
|
8139 |
+
var enterActiveClass = data.enterActiveClass;
|
8140 |
+
var appearClass = data.appearClass;
|
8141 |
+
var appearToClass = data.appearToClass;
|
8142 |
+
var appearActiveClass = data.appearActiveClass;
|
8143 |
+
var beforeEnter = data.beforeEnter;
|
8144 |
+
var enter = data.enter;
|
8145 |
+
var afterEnter = data.afterEnter;
|
8146 |
+
var enterCancelled = data.enterCancelled;
|
8147 |
+
var beforeAppear = data.beforeAppear;
|
8148 |
+
var appear = data.appear;
|
8149 |
+
var afterAppear = data.afterAppear;
|
8150 |
+
var appearCancelled = data.appearCancelled;
|
8151 |
+
var duration = data.duration;
|
8152 |
+
|
8153 |
+
// activeInstance will always be the <transition> component managing this
|
8154 |
+
// transition. One edge case to check is when the <transition> is placed
|
8155 |
+
// as the root node of a child component. In that case we need to check
|
8156 |
+
// <transition>'s parent for appear check.
|
8157 |
+
var context = activeInstance;
|
8158 |
+
var transitionNode = activeInstance.$vnode;
|
8159 |
+
while (transitionNode && transitionNode.parent) {
|
8160 |
+
context = transitionNode.context;
|
8161 |
+
transitionNode = transitionNode.parent;
|
8162 |
+
}
|
8163 |
+
|
8164 |
+
var isAppear = !context._isMounted || !vnode.isRootInsert;
|
8165 |
+
|
8166 |
+
if (isAppear && !appear && appear !== '') {
|
8167 |
+
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8168 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8169 |
|
8170 |
+
var startClass = isAppear && appearClass
|
8171 |
+
? appearClass
|
8172 |
+
: enterClass;
|
8173 |
+
var activeClass = isAppear && appearActiveClass
|
8174 |
+
? appearActiveClass
|
8175 |
+
: enterActiveClass;
|
8176 |
+
var toClass = isAppear && appearToClass
|
8177 |
+
? appearToClass
|
8178 |
+
: enterToClass;
|
8179 |
+
|
8180 |
+
var beforeEnterHook = isAppear
|
8181 |
+
? (beforeAppear || beforeEnter)
|
8182 |
+
: beforeEnter;
|
8183 |
+
var enterHook = isAppear
|
8184 |
+
? (typeof appear === 'function' ? appear : enter)
|
8185 |
+
: enter;
|
8186 |
+
var afterEnterHook = isAppear
|
8187 |
+
? (afterAppear || afterEnter)
|
8188 |
+
: afterEnter;
|
8189 |
+
var enterCancelledHook = isAppear
|
8190 |
+
? (appearCancelled || enterCancelled)
|
8191 |
+
: enterCancelled;
|
8192 |
+
|
8193 |
+
var explicitEnterDuration = toNumber(
|
8194 |
+
isObject(duration)
|
8195 |
+
? duration.enter
|
8196 |
+
: duration
|
8197 |
+
);
|
8198 |
|
8199 |
+
if (explicitEnterDuration != null) {
|
8200 |
+
checkDuration(explicitEnterDuration, 'enter', vnode);
|
8201 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8202 |
|
8203 |
+
var expectsCSS = css !== false && !isIE9;
|
8204 |
+
var userWantsControl = getHookArgumentsLength(enterHook);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8205 |
|
8206 |
+
var cb = el._enterCb = once(function () {
|
8207 |
+
if (expectsCSS) {
|
8208 |
+
removeTransitionClass(el, toClass);
|
8209 |
+
removeTransitionClass(el, activeClass);
|
8210 |
+
}
|
8211 |
+
if (cb.cancelled) {
|
8212 |
+
if (expectsCSS) {
|
8213 |
+
removeTransitionClass(el, startClass);
|
8214 |
+
}
|
8215 |
+
enterCancelledHook && enterCancelledHook(el);
|
8216 |
+
} else {
|
8217 |
+
afterEnterHook && afterEnterHook(el);
|
8218 |
+
}
|
8219 |
+
el._enterCb = null;
|
8220 |
+
});
|
8221 |
|
8222 |
+
if (!vnode.data.show) {
|
8223 |
+
// remove pending leave element on enter by injecting an insert hook
|
8224 |
+
mergeVNodeHook(vnode, 'insert', function () {
|
8225 |
+
var parent = el.parentNode;
|
8226 |
+
var pendingNode = parent && parent._pending && parent._pending[vnode.key];
|
8227 |
+
if (pendingNode &&
|
8228 |
+
pendingNode.tag === vnode.tag &&
|
8229 |
+
pendingNode.elm._leaveCb
|
8230 |
+
) {
|
8231 |
+
pendingNode.elm._leaveCb();
|
8232 |
+
}
|
8233 |
+
enterHook && enterHook(el, cb);
|
8234 |
+
});
|
8235 |
+
}
|
8236 |
|
8237 |
+
// start enter transition
|
8238 |
+
beforeEnterHook && beforeEnterHook(el);
|
8239 |
+
if (expectsCSS) {
|
8240 |
+
addTransitionClass(el, startClass);
|
8241 |
+
addTransitionClass(el, activeClass);
|
8242 |
+
nextFrame(function () {
|
8243 |
+
removeTransitionClass(el, startClass);
|
8244 |
+
if (!cb.cancelled) {
|
8245 |
+
addTransitionClass(el, toClass);
|
8246 |
+
if (!userWantsControl) {
|
8247 |
+
if (isValidDuration(explicitEnterDuration)) {
|
8248 |
+
setTimeout(cb, explicitEnterDuration);
|
8249 |
+
} else {
|
8250 |
+
whenTransitionEnds(el, type, cb);
|
8251 |
+
}
|
8252 |
+
}
|
8253 |
+
}
|
8254 |
+
});
|
8255 |
+
}
|
8256 |
|
8257 |
+
if (vnode.data.show) {
|
8258 |
+
toggleDisplay && toggleDisplay();
|
8259 |
+
enterHook && enterHook(el, cb);
|
8260 |
+
}
|
|
|
8261 |
|
8262 |
+
if (!expectsCSS && !userWantsControl) {
|
8263 |
+
cb();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8264 |
}
|
8265 |
}
|
8266 |
|
8267 |
+
function leave (vnode, rm) {
|
8268 |
+
var el = vnode.elm;
|
8269 |
|
8270 |
+
// call enter callback now
|
8271 |
+
if (isDef(el._enterCb)) {
|
8272 |
+
el._enterCb.cancelled = true;
|
8273 |
+
el._enterCb();
|
|
|
|
|
|
|
8274 |
}
|
|
|
8275 |
|
8276 |
+
var data = resolveTransition(vnode.data.transition);
|
8277 |
+
if (isUndef(data) || el.nodeType !== 1) {
|
8278 |
+
return rm()
|
8279 |
+
}
|
8280 |
+
|
8281 |
+
/* istanbul ignore if */
|
8282 |
+
if (isDef(el._leaveCb)) {
|
8283 |
+
return
|
8284 |
+
}
|
8285 |
|
8286 |
+
var css = data.css;
|
8287 |
+
var type = data.type;
|
8288 |
+
var leaveClass = data.leaveClass;
|
8289 |
+
var leaveToClass = data.leaveToClass;
|
8290 |
+
var leaveActiveClass = data.leaveActiveClass;
|
8291 |
+
var beforeLeave = data.beforeLeave;
|
8292 |
+
var leave = data.leave;
|
8293 |
+
var afterLeave = data.afterLeave;
|
8294 |
+
var leaveCancelled = data.leaveCancelled;
|
8295 |
+
var delayLeave = data.delayLeave;
|
8296 |
+
var duration = data.duration;
|
8297 |
+
|
8298 |
+
var expectsCSS = css !== false && !isIE9;
|
8299 |
+
var userWantsControl = getHookArgumentsLength(leave);
|
8300 |
+
|
8301 |
+
var explicitLeaveDuration = toNumber(
|
8302 |
+
isObject(duration)
|
8303 |
+
? duration.leave
|
8304 |
+
: duration
|
8305 |
+
);
|
8306 |
|
8307 |
+
if (isDef(explicitLeaveDuration)) {
|
8308 |
+
checkDuration(explicitLeaveDuration, 'leave', vnode);
|
8309 |
+
}
|
8310 |
|
8311 |
+
var cb = el._leaveCb = once(function () {
|
8312 |
+
if (el.parentNode && el.parentNode._pending) {
|
8313 |
+
el.parentNode._pending[vnode.key] = null;
|
8314 |
+
}
|
8315 |
+
if (expectsCSS) {
|
8316 |
+
removeTransitionClass(el, leaveToClass);
|
8317 |
+
removeTransitionClass(el, leaveActiveClass);
|
8318 |
+
}
|
8319 |
+
if (cb.cancelled) {
|
8320 |
+
if (expectsCSS) {
|
8321 |
+
removeTransitionClass(el, leaveClass);
|
8322 |
+
}
|
8323 |
+
leaveCancelled && leaveCancelled(el);
|
8324 |
+
} else {
|
8325 |
+
rm();
|
8326 |
+
afterLeave && afterLeave(el);
|
8327 |
+
}
|
8328 |
+
el._leaveCb = null;
|
8329 |
+
});
|
8330 |
|
8331 |
+
if (delayLeave) {
|
8332 |
+
delayLeave(performLeave);
|
8333 |
+
} else {
|
8334 |
+
performLeave();
|
|
|
|
|
|
|
|
|
8335 |
}
|
8336 |
+
|
8337 |
+
function performLeave () {
|
8338 |
+
// the delayed leave may have already been cancelled
|
8339 |
+
if (cb.cancelled) {
|
8340 |
+
return
|
8341 |
+
}
|
8342 |
+
// record leaving element
|
8343 |
+
if (!vnode.data.show && el.parentNode) {
|
8344 |
+
(el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode;
|
8345 |
+
}
|
8346 |
+
beforeLeave && beforeLeave(el);
|
8347 |
+
if (expectsCSS) {
|
8348 |
+
addTransitionClass(el, leaveClass);
|
8349 |
+
addTransitionClass(el, leaveActiveClass);
|
8350 |
+
nextFrame(function () {
|
8351 |
+
removeTransitionClass(el, leaveClass);
|
8352 |
+
if (!cb.cancelled) {
|
8353 |
+
addTransitionClass(el, leaveToClass);
|
8354 |
+
if (!userWantsControl) {
|
8355 |
+
if (isValidDuration(explicitLeaveDuration)) {
|
8356 |
+
setTimeout(cb, explicitLeaveDuration);
|
8357 |
+
} else {
|
8358 |
+
whenTransitionEnds(el, type, cb);
|
8359 |
+
}
|
8360 |
+
}
|
8361 |
+
}
|
8362 |
+
});
|
8363 |
+
}
|
8364 |
+
leave && leave(el, cb);
|
8365 |
+
if (!expectsCSS && !userWantsControl) {
|
8366 |
+
cb();
|
8367 |
+
}
|
8368 |
}
|
8369 |
}
|
|
|
8370 |
|
8371 |
+
// only used in dev mode
|
8372 |
+
function checkDuration (val, name, vnode) {
|
8373 |
+
if (typeof val !== 'number') {
|
8374 |
+
warn(
|
8375 |
+
"<transition> explicit " + name + " duration is not a valid number - " +
|
8376 |
+
"got " + (JSON.stringify(val)) + ".",
|
8377 |
+
vnode.context
|
8378 |
+
);
|
8379 |
+
} else if (isNaN(val)) {
|
8380 |
+
warn(
|
8381 |
+
"<transition> explicit " + name + " duration is NaN - " +
|
8382 |
+
'the duration expression might be incorrect.',
|
8383 |
+
vnode.context
|
8384 |
+
);
|
8385 |
}
|
8386 |
}
|
|
|
|
|
|
|
|
|
|
|
8387 |
|
8388 |
+
function isValidDuration (val) {
|
8389 |
+
return typeof val === 'number' && !isNaN(val)
|
8390 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8391 |
|
8392 |
+
/**
|
8393 |
+
* Normalize a transition hook's argument length. The hook may be:
|
8394 |
+
* - a merged hook (invoker) with the original in .fns
|
8395 |
+
* - a wrapped component method (check ._length)
|
8396 |
+
* - a plain function (.length)
|
8397 |
+
*/
|
8398 |
+
function getHookArgumentsLength (fn) {
|
8399 |
+
if (isUndef(fn)) {
|
8400 |
+
return false
|
8401 |
+
}
|
8402 |
+
var invokerFns = fn.fns;
|
8403 |
+
if (isDef(invokerFns)) {
|
8404 |
+
// invoker
|
8405 |
+
return getHookArgumentsLength(
|
8406 |
+
Array.isArray(invokerFns)
|
8407 |
+
? invokerFns[0]
|
8408 |
+
: invokerFns
|
8409 |
+
)
|
8410 |
+
} else {
|
8411 |
+
return (fn._length || fn.length) > 1
|
8412 |
}
|
8413 |
}
|
8414 |
|
8415 |
+
function _enter (_, vnode) {
|
8416 |
+
if (vnode.data.show !== true) {
|
8417 |
+
enter(vnode);
|
8418 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8419 |
}
|
8420 |
|
8421 |
+
var transition = inBrowser ? {
|
8422 |
+
create: _enter,
|
8423 |
+
activate: _enter,
|
8424 |
+
remove: function remove$$1 (vnode, rm) {
|
8425 |
+
/* istanbul ignore else */
|
8426 |
+
if (vnode.data.show !== true) {
|
8427 |
+
leave(vnode, rm);
|
8428 |
+
} else {
|
8429 |
+
rm();
|
8430 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8431 |
}
|
8432 |
+
} : {};
|
8433 |
|
8434 |
+
var platformModules = [
|
8435 |
+
attrs,
|
8436 |
+
klass,
|
8437 |
+
events,
|
8438 |
+
domProps,
|
8439 |
+
style,
|
8440 |
+
transition
|
8441 |
+
];
|
|
|
|
|
8442 |
|
8443 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
8444 |
|
8445 |
+
// the directive module should be applied last, after all
|
8446 |
+
// built-in modules have been applied.
|
8447 |
+
var modules = platformModules.concat(baseModules);
|
|
|
8448 |
|
8449 |
+
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules });
|
|
|
|
|
|
|
|
|
|
|
8450 |
|
8451 |
+
/**
|
8452 |
+
* Not type checking this file because flow doesn't like attaching
|
8453 |
+
* properties to Elements.
|
8454 |
+
*/
|
8455 |
|
|
|
|
|
|
|
|
|
|
|
8456 |
/* istanbul ignore if */
|
8457 |
+
if (isIE9) {
|
8458 |
+
// http://www.matts411.com/post/internet-explorer-9-oninput/
|
8459 |
+
document.addEventListener('selectionchange', function () {
|
8460 |
+
var el = document.activeElement;
|
8461 |
+
if (el && el.vmodel) {
|
8462 |
+
trigger(el, 'input');
|
8463 |
+
}
|
8464 |
+
});
|
8465 |
+
}
|
8466 |
+
|
8467 |
+
var directive = {
|
8468 |
+
inserted: function inserted (el, binding, vnode, oldVnode) {
|
8469 |
+
if (vnode.tag === 'select') {
|
8470 |
+
// #6903
|
8471 |
+
if (oldVnode.elm && !oldVnode.elm._vOptions) {
|
8472 |
+
mergeVNodeHook(vnode, 'postpatch', function () {
|
8473 |
+
directive.componentUpdated(el, binding, vnode);
|
8474 |
+
});
|
8475 |
+
} else {
|
8476 |
+
setSelected(el, binding, vnode.context);
|
8477 |
+
}
|
8478 |
+
el._vOptions = [].map.call(el.options, getValue);
|
8479 |
+
} else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
|
8480 |
+
el._vModifiers = binding.modifiers;
|
8481 |
+
if (!binding.modifiers.lazy) {
|
8482 |
+
el.addEventListener('compositionstart', onCompositionStart);
|
8483 |
+
el.addEventListener('compositionend', onCompositionEnd);
|
8484 |
+
// Safari < 10.2 & UIWebView doesn't fire compositionend when
|
8485 |
+
// switching focus before confirming composition choice
|
8486 |
+
// this also fixes the issue where some browsers e.g. iOS Chrome
|
8487 |
+
// fires "change" instead of "input" on autocomplete.
|
8488 |
+
el.addEventListener('change', onCompositionEnd);
|
8489 |
+
/* istanbul ignore if */
|
8490 |
+
if (isIE9) {
|
8491 |
+
el.vmodel = true;
|
8492 |
+
}
|
8493 |
+
}
|
8494 |
+
}
|
8495 |
+
},
|
8496 |
+
|
8497 |
+
componentUpdated: function componentUpdated (el, binding, vnode) {
|
8498 |
+
if (vnode.tag === 'select') {
|
8499 |
+
setSelected(el, binding, vnode.context);
|
8500 |
+
// in case the options rendered by v-for have changed,
|
8501 |
+
// it's possible that the value is out-of-sync with the rendered options.
|
8502 |
+
// detect such cases and filter out values that no longer has a matching
|
8503 |
+
// option in the DOM.
|
8504 |
+
var prevOptions = el._vOptions;
|
8505 |
+
var curOptions = el._vOptions = [].map.call(el.options, getValue);
|
8506 |
+
if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
|
8507 |
+
// trigger change event if
|
8508 |
+
// no matching option found for at least one value
|
8509 |
+
var needReset = el.multiple
|
8510 |
+
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
|
8511 |
+
: binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
|
8512 |
+
if (needReset) {
|
8513 |
+
trigger(el, 'change');
|
8514 |
+
}
|
8515 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8516 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8517 |
}
|
8518 |
+
};
|
8519 |
+
|
8520 |
+
function setSelected (el, binding, vm) {
|
8521 |
+
actuallySetSelected(el, binding, vm);
|
8522 |
+
/* istanbul ignore if */
|
8523 |
+
if (isIE || isEdge) {
|
8524 |
+
setTimeout(function () {
|
8525 |
+
actuallySetSelected(el, binding, vm);
|
8526 |
+
}, 0);
|
8527 |
}
|
8528 |
}
|
|
|
|
|
8529 |
|
8530 |
+
function actuallySetSelected (el, binding, vm) {
|
8531 |
+
var value = binding.value;
|
8532 |
+
var isMultiple = el.multiple;
|
8533 |
+
if (isMultiple && !Array.isArray(value)) {
|
8534 |
+
warn(
|
8535 |
+
"<select multiple v-model=\"" + (binding.expression) + "\"> " +
|
8536 |
+
"expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)),
|
8537 |
+
vm
|
8538 |
+
);
|
8539 |
+
return
|
|
|
|
|
|
|
|
|
|
|
8540 |
}
|
8541 |
+
var selected, option;
|
8542 |
+
for (var i = 0, l = el.options.length; i < l; i++) {
|
8543 |
+
option = el.options[i];
|
8544 |
+
if (isMultiple) {
|
8545 |
+
selected = looseIndexOf(value, getValue(option)) > -1;
|
8546 |
+
if (option.selected !== selected) {
|
8547 |
+
option.selected = selected;
|
8548 |
+
}
|
8549 |
+
} else {
|
8550 |
+
if (looseEqual(getValue(option), value)) {
|
8551 |
+
if (el.selectedIndex !== i) {
|
8552 |
+
el.selectedIndex = i;
|
8553 |
+
}
|
8554 |
+
return
|
8555 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8556 |
}
|
8557 |
}
|
8558 |
+
if (!isMultiple) {
|
8559 |
+
el.selectedIndex = -1;
|
8560 |
+
}
|
8561 |
}
|
8562 |
|
8563 |
+
function hasNoMatchingOption (value, options) {
|
8564 |
+
return options.every(function (o) { return !looseEqual(o, value); })
|
8565 |
}
|
8566 |
|
8567 |
+
function getValue (option) {
|
8568 |
+
return '_value' in option
|
8569 |
+
? option._value
|
8570 |
+
: option.value
|
|
|
8571 |
}
|
|
|
|
|
|
|
|
|
8572 |
|
8573 |
+
function onCompositionStart (e) {
|
8574 |
+
e.target.composing = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8575 |
}
|
|
|
|
|
|
|
8576 |
|
8577 |
+
function onCompositionEnd (e) {
|
8578 |
+
// prevent triggering an input event for no reason
|
8579 |
+
if (!e.target.composing) { return }
|
8580 |
+
e.target.composing = false;
|
8581 |
+
trigger(e.target, 'input');
|
|
|
8582 |
}
|
8583 |
+
|
8584 |
+
function trigger (el, type) {
|
8585 |
+
var e = document.createEvent('HTMLEvents');
|
8586 |
+
e.initEvent(type, true, true);
|
8587 |
+
el.dispatchEvent(e);
|
|
|
8588 |
}
|
|
|
8589 |
|
8590 |
+
/* */
|
|
|
|
|
8591 |
|
8592 |
+
// recursively search for possible transition defined inside the component root
|
8593 |
+
function locateNode (vnode) {
|
8594 |
+
return vnode.componentInstance && (!vnode.data || !vnode.data.transition)
|
8595 |
+
? locateNode(vnode.componentInstance._vnode)
|
8596 |
+
: vnode
|
8597 |
}
|
8598 |
|
8599 |
+
var show = {
|
8600 |
+
bind: function bind (el, ref, vnode) {
|
8601 |
+
var value = ref.value;
|
|
|
|
|
|
|
|
|
8602 |
|
8603 |
+
vnode = locateNode(vnode);
|
8604 |
+
var transition$$1 = vnode.data && vnode.data.transition;
|
8605 |
+
var originalDisplay = el.__vOriginalDisplay =
|
8606 |
+
el.style.display === 'none' ? '' : el.style.display;
|
8607 |
+
if (value && transition$$1) {
|
8608 |
+
vnode.data.show = true;
|
8609 |
+
enter(vnode, function () {
|
8610 |
+
el.style.display = originalDisplay;
|
8611 |
+
});
|
8612 |
+
} else {
|
8613 |
+
el.style.display = value ? originalDisplay : 'none';
|
8614 |
+
}
|
8615 |
+
},
|
8616 |
|
8617 |
+
update: function update (el, ref, vnode) {
|
8618 |
+
var value = ref.value;
|
8619 |
+
var oldValue = ref.oldValue;
|
|
|
|
|
|
|
8620 |
|
8621 |
+
/* istanbul ignore if */
|
8622 |
+
if (!value === !oldValue) { return }
|
8623 |
+
vnode = locateNode(vnode);
|
8624 |
+
var transition$$1 = vnode.data && vnode.data.transition;
|
8625 |
+
if (transition$$1) {
|
8626 |
+
vnode.data.show = true;
|
8627 |
+
if (value) {
|
8628 |
+
enter(vnode, function () {
|
8629 |
+
el.style.display = el.__vOriginalDisplay;
|
8630 |
+
});
|
8631 |
+
} else {
|
8632 |
+
leave(vnode, function () {
|
8633 |
+
el.style.display = 'none';
|
8634 |
+
});
|
8635 |
+
}
|
8636 |
+
} else {
|
8637 |
+
el.style.display = value ? el.__vOriginalDisplay : 'none';
|
8638 |
+
}
|
8639 |
+
},
|
8640 |
|
8641 |
+
unbind: function unbind (
|
8642 |
+
el,
|
8643 |
+
binding,
|
8644 |
+
vnode,
|
8645 |
+
oldVnode,
|
8646 |
+
isDestroy
|
8647 |
+
) {
|
8648 |
+
if (!isDestroy) {
|
8649 |
+
el.style.display = el.__vOriginalDisplay;
|
8650 |
+
}
|
8651 |
}
|
8652 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
8653 |
|
8654 |
+
var platformDirectives = {
|
8655 |
+
model: directive,
|
8656 |
+
show: show
|
8657 |
+
};
|
8658 |
|
8659 |
+
/* */
|
8660 |
+
|
8661 |
+
var transitionProps = {
|
8662 |
+
name: String,
|
8663 |
+
appear: Boolean,
|
8664 |
+
css: Boolean,
|
8665 |
+
mode: String,
|
8666 |
+
type: String,
|
8667 |
+
enterClass: String,
|
8668 |
+
leaveClass: String,
|
8669 |
+
enterToClass: String,
|
8670 |
+
leaveToClass: String,
|
8671 |
+
enterActiveClass: String,
|
8672 |
+
leaveActiveClass: String,
|
8673 |
+
appearClass: String,
|
8674 |
+
appearActiveClass: String,
|
8675 |
+
appearToClass: String,
|
8676 |
+
duration: [Number, String, Object]
|
8677 |
+
};
|
8678 |
|
8679 |
+
// in case the child is also an abstract component, e.g. <keep-alive>
|
8680 |
+
// we want to recursively retrieve the real component to be rendered
|
8681 |
+
function getRealChild (vnode) {
|
8682 |
+
var compOptions = vnode && vnode.componentOptions;
|
8683 |
+
if (compOptions && compOptions.Ctor.options.abstract) {
|
8684 |
+
return getRealChild(getFirstComponentChild(compOptions.children))
|
8685 |
} else {
|
8686 |
+
return vnode
|
|
|
|
|
|
|
|
|
|
|
8687 |
}
|
8688 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8689 |
|
8690 |
+
function extractTransitionData (comp) {
|
8691 |
+
var data = {};
|
8692 |
+
var options = comp.$options;
|
8693 |
+
// props
|
8694 |
+
for (var key in options.propsData) {
|
8695 |
+
data[key] = comp[key];
|
8696 |
}
|
8697 |
+
// events.
|
8698 |
+
// extract listeners and pass them directly to the transition methods
|
8699 |
+
var listeners = options._parentListeners;
|
8700 |
+
for (var key$1 in listeners) {
|
8701 |
+
data[camelize(key$1)] = listeners[key$1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8702 |
}
|
8703 |
+
return data
|
8704 |
}
|
|
|
|
|
|
|
8705 |
|
8706 |
+
function placeholder (h, rawChild) {
|
8707 |
+
if (/\d-keep-alive$/.test(rawChild.tag)) {
|
8708 |
+
return h('keep-alive', {
|
8709 |
+
props: rawChild.componentOptions.propsData
|
8710 |
+
})
|
|
|
|
|
|
|
|
|
8711 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8712 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8713 |
|
8714 |
+
function hasParentTransition (vnode) {
|
8715 |
+
while ((vnode = vnode.parent)) {
|
8716 |
+
if (vnode.data.transition) {
|
8717 |
+
return true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8718 |
}
|
8719 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8720 |
}
|
8721 |
|
8722 |
+
function isSameChild (child, oldChild) {
|
8723 |
+
return oldChild.key === child.key && oldChild.tag === child.tag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8724 |
}
|
8725 |
|
8726 |
+
var isNotTextNode = function (c) { return c.tag || isAsyncPlaceholder(c); };
|
|
|
|
|
|
|
8727 |
|
8728 |
+
var isVShowDirective = function (d) { return d.name === 'show'; };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8729 |
|
8730 |
+
var Transition = {
|
8731 |
+
name: 'transition',
|
8732 |
+
props: transitionProps,
|
8733 |
+
abstract: true,
|
8734 |
|
8735 |
+
render: function render (h) {
|
8736 |
+
var this$1 = this;
|
8737 |
|
8738 |
+
var children = this.$slots.default;
|
8739 |
+
if (!children) {
|
8740 |
+
return
|
|
|
|
|
|
|
|
|
|
|
8741 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8742 |
|
8743 |
+
// filter out text nodes (possible whitespaces)
|
8744 |
+
children = children.filter(isNotTextNode);
|
8745 |
+
/* istanbul ignore if */
|
8746 |
+
if (!children.length) {
|
8747 |
+
return
|
|
|
|
|
|
|
|
|
|
|
8748 |
}
|
|
|
|
|
|
|
8749 |
|
8750 |
+
// warn multiple elements
|
8751 |
+
if (children.length > 1) {
|
8752 |
+
warn(
|
8753 |
+
'<transition> can only be used on a single element. Use ' +
|
8754 |
+
'<transition-group> for lists.',
|
8755 |
+
this.$parent
|
8756 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8757 |
}
|
|
|
|
|
8758 |
|
8759 |
+
var mode = this.mode;
|
|
|
|
|
|
|
8760 |
|
8761 |
+
// warn invalid mode
|
8762 |
+
if (mode && mode !== 'in-out' && mode !== 'out-in'
|
8763 |
+
) {
|
8764 |
+
warn(
|
8765 |
+
'invalid <transition> mode: ' + mode,
|
8766 |
+
this.$parent
|
8767 |
+
);
|
8768 |
+
}
|
8769 |
|
8770 |
+
var rawChild = children[0];
|
|
|
8771 |
|
8772 |
+
// if this is a component root node and the component's
|
8773 |
+
// parent container node also has transition, skip.
|
8774 |
+
if (hasParentTransition(this.$vnode)) {
|
8775 |
+
return rawChild
|
8776 |
+
}
|
8777 |
|
8778 |
+
// apply transition data to child
|
8779 |
+
// use getRealChild() to ignore abstract components e.g. keep-alive
|
8780 |
+
var child = getRealChild(rawChild);
|
8781 |
+
/* istanbul ignore if */
|
8782 |
+
if (!child) {
|
8783 |
+
return rawChild
|
8784 |
+
}
|
8785 |
|
8786 |
+
if (this._leaving) {
|
8787 |
+
return placeholder(h, rawChild)
|
8788 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8789 |
|
8790 |
+
// ensure a key that is unique to the vnode type and to this transition
|
8791 |
+
// component instance. This key will be used to remove pending leaving nodes
|
8792 |
+
// during entering.
|
8793 |
+
var id = "__transition-" + (this._uid) + "-";
|
8794 |
+
child.key = child.key == null
|
8795 |
+
? child.isComment
|
8796 |
+
? id + 'comment'
|
8797 |
+
: id + child.tag
|
8798 |
+
: isPrimitive(child.key)
|
8799 |
+
? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
|
8800 |
+
: child.key;
|
8801 |
|
8802 |
+
var data = (child.data || (child.data = {})).transition = extractTransitionData(this);
|
8803 |
+
var oldRawChild = this._vnode;
|
8804 |
+
var oldChild = getRealChild(oldRawChild);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8805 |
|
8806 |
+
// mark v-show
|
8807 |
+
// so that the transition module can hand over the control to the directive
|
8808 |
+
if (child.data.directives && child.data.directives.some(isVShowDirective)) {
|
8809 |
+
child.data.show = true;
|
8810 |
+
}
|
8811 |
|
8812 |
+
if (
|
8813 |
+
oldChild &&
|
8814 |
+
oldChild.data &&
|
8815 |
+
!isSameChild(child, oldChild) &&
|
8816 |
+
!isAsyncPlaceholder(oldChild) &&
|
8817 |
+
// #6687 component root is a comment node
|
8818 |
+
!(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment)
|
8819 |
+
) {
|
8820 |
+
// replace old child transition data with fresh one
|
8821 |
+
// important for dynamic transitions!
|
8822 |
+
var oldData = oldChild.data.transition = extend({}, data);
|
8823 |
+
// handle transition mode
|
8824 |
+
if (mode === 'out-in') {
|
8825 |
+
// return placeholder node and queue update when leave finishes
|
8826 |
+
this._leaving = true;
|
8827 |
+
mergeVNodeHook(oldData, 'afterLeave', function () {
|
8828 |
+
this$1._leaving = false;
|
8829 |
+
this$1.$forceUpdate();
|
8830 |
+
});
|
8831 |
+
return placeholder(h, rawChild)
|
8832 |
+
} else if (mode === 'in-out') {
|
8833 |
+
if (isAsyncPlaceholder(child)) {
|
8834 |
+
return oldRawChild
|
8835 |
}
|
8836 |
+
var delayedLeave;
|
8837 |
+
var performLeave = function () { delayedLeave(); };
|
8838 |
+
mergeVNodeHook(data, 'afterEnter', performLeave);
|
8839 |
+
mergeVNodeHook(data, 'enterCancelled', performLeave);
|
8840 |
+
mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; });
|
8841 |
}
|
8842 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8843 |
|
8844 |
+
return rawChild
|
8845 |
+
}
|
8846 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8847 |
|
8848 |
+
/* */
|
|
|
|
|
8849 |
|
8850 |
+
var props = extend({
|
8851 |
+
tag: String,
|
8852 |
+
moveClass: String
|
8853 |
+
}, transitionProps);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8854 |
|
8855 |
+
delete props.mode;
|
|
|
|
|
|
|
|
|
8856 |
|
8857 |
+
var TransitionGroup = {
|
8858 |
+
props: props,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8859 |
|
8860 |
+
beforeMount: function beforeMount () {
|
8861 |
+
var this$1 = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
8862 |
|
8863 |
+
var update = this._update;
|
8864 |
+
this._update = function (vnode, hydrating) {
|
8865 |
+
var restoreActiveInstance = setActiveInstance(this$1);
|
8866 |
+
// force removing pass
|
8867 |
+
this$1.__patch__(
|
8868 |
+
this$1._vnode,
|
8869 |
+
this$1.kept,
|
8870 |
+
false, // hydrating
|
8871 |
+
true // removeOnly (!important, avoids unnecessary moves)
|
8872 |
+
);
|
8873 |
+
this$1._vnode = this$1.kept;
|
8874 |
+
restoreActiveInstance();
|
8875 |
+
update.call(this$1, vnode, hydrating);
|
8876 |
+
};
|
8877 |
+
},
|
8878 |
|
8879 |
+
render: function render (h) {
|
8880 |
+
var tag = this.tag || this.$vnode.data.tag || 'span';
|
8881 |
+
var map = Object.create(null);
|
8882 |
+
var prevChildren = this.prevChildren = this.children;
|
8883 |
+
var rawChildren = this.$slots.default || [];
|
8884 |
+
var children = this.children = [];
|
8885 |
+
var transitionData = extractTransitionData(this);
|
8886 |
+
|
8887 |
+
for (var i = 0; i < rawChildren.length; i++) {
|
8888 |
+
var c = rawChildren[i];
|
8889 |
+
if (c.tag) {
|
8890 |
+
if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {
|
8891 |
+
children.push(c);
|
8892 |
+
map[c.key] = c
|
8893 |
+
;(c.data || (c.data = {})).transition = transitionData;
|
8894 |
+
} else {
|
8895 |
+
var opts = c.componentOptions;
|
8896 |
+
var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag;
|
8897 |
+
warn(("<transition-group> children must be keyed: <" + name + ">"));
|
8898 |
+
}
|
8899 |
+
}
|
8900 |
+
}
|
8901 |
|
8902 |
+
if (prevChildren) {
|
8903 |
+
var kept = [];
|
8904 |
+
var removed = [];
|
8905 |
+
for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {
|
8906 |
+
var c$1 = prevChildren[i$1];
|
8907 |
+
c$1.data.transition = transitionData;
|
8908 |
+
c$1.data.pos = c$1.elm.getBoundingClientRect();
|
8909 |
+
if (map[c$1.key]) {
|
8910 |
+
kept.push(c$1);
|
8911 |
+
} else {
|
8912 |
+
removed.push(c$1);
|
8913 |
+
}
|
8914 |
+
}
|
8915 |
+
this.kept = h(tag, null, kept);
|
8916 |
+
this.removed = removed;
|
8917 |
+
}
|
8918 |
|
8919 |
+
return h(tag, null, children)
|
8920 |
+
},
|
|
|
|
|
8921 |
|
8922 |
+
updated: function updated () {
|
8923 |
+
var children = this.prevChildren;
|
8924 |
+
var moveClass = this.moveClass || ((this.name || 'v') + '-move');
|
8925 |
+
if (!children.length || !this.hasMove(children[0].elm, moveClass)) {
|
8926 |
+
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8927 |
}
|
8928 |
+
|
8929 |
+
// we divide the work into three loops to avoid mixing DOM reads and writes
|
8930 |
+
// in each iteration - which helps prevent layout thrashing.
|
8931 |
+
children.forEach(callPendingCbs);
|
8932 |
+
children.forEach(recordPosition);
|
8933 |
+
children.forEach(applyTranslation);
|
8934 |
+
|
8935 |
+
// force reflow to put everything in position
|
8936 |
+
// assign to this to avoid being removed in tree-shaking
|
8937 |
+
// $flow-disable-line
|
8938 |
+
this._reflow = document.body.offsetHeight;
|
8939 |
+
|
8940 |
+
children.forEach(function (c) {
|
8941 |
+
if (c.data.moved) {
|
8942 |
+
var el = c.elm;
|
8943 |
+
var s = el.style;
|
8944 |
+
addTransitionClass(el, moveClass);
|
8945 |
+
s.transform = s.WebkitTransform = s.transitionDuration = '';
|
8946 |
+
el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {
|
8947 |
+
if (e && e.target !== el) {
|
8948 |
+
return
|
8949 |
+
}
|
8950 |
+
if (!e || /transform$/.test(e.propertyName)) {
|
8951 |
+
el.removeEventListener(transitionEndEvent, cb);
|
8952 |
+
el._moveCb = null;
|
8953 |
+
removeTransitionClass(el, moveClass);
|
8954 |
+
}
|
8955 |
+
});
|
8956 |
+
}
|
8957 |
+
});
|
8958 |
+
},
|
8959 |
+
|
8960 |
+
methods: {
|
8961 |
+
hasMove: function hasMove (el, moveClass) {
|
8962 |
+
/* istanbul ignore if */
|
8963 |
+
if (!hasTransition) {
|
8964 |
+
return false
|
8965 |
+
}
|
8966 |
/* istanbul ignore if */
|
8967 |
+
if (this._hasMove) {
|
8968 |
+
return this._hasMove
|
8969 |
}
|
8970 |
+
// Detect whether an element with the move class applied has
|
8971 |
+
// CSS transitions. Since the element may be inside an entering
|
8972 |
+
// transition at this very moment, we make a clone of it and remove
|
8973 |
+
// all other transition classes applied to ensure only the move class
|
8974 |
+
// is applied.
|
8975 |
+
var clone = el.cloneNode();
|
8976 |
+
if (el._transitionClasses) {
|
8977 |
+
el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); });
|
8978 |
+
}
|
8979 |
+
addClass(clone, moveClass);
|
8980 |
+
clone.style.display = 'none';
|
8981 |
+
this.$el.appendChild(clone);
|
8982 |
+
var info = getTransitionInfo(clone);
|
8983 |
+
this.$el.removeChild(clone);
|
8984 |
+
return (this._hasMove = info.hasTransform)
|
8985 |
}
|
8986 |
}
|
8987 |
+
};
|
8988 |
|
8989 |
+
function callPendingCbs (c) {
|
8990 |
+
/* istanbul ignore if */
|
8991 |
+
if (c.elm._moveCb) {
|
8992 |
+
c.elm._moveCb();
|
8993 |
+
}
|
8994 |
+
/* istanbul ignore if */
|
8995 |
+
if (c.elm._enterCb) {
|
8996 |
+
c.elm._enterCb();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8997 |
}
|
8998 |
}
|
|
|
8999 |
|
9000 |
+
function recordPosition (c) {
|
9001 |
+
c.data.newPos = c.elm.getBoundingClientRect();
|
|
|
|
|
|
|
|
|
|
|
9002 |
}
|
|
|
9003 |
|
9004 |
+
function applyTranslation (c) {
|
9005 |
+
var oldPos = c.data.pos;
|
9006 |
+
var newPos = c.data.newPos;
|
9007 |
+
var dx = oldPos.left - newPos.left;
|
9008 |
+
var dy = oldPos.top - newPos.top;
|
9009 |
+
if (dx || dy) {
|
9010 |
+
c.data.moved = true;
|
9011 |
+
var s = c.elm.style;
|
9012 |
+
s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)";
|
9013 |
+
s.transitionDuration = '0s';
|
9014 |
+
}
|
9015 |
}
|
9016 |
+
|
9017 |
+
var platformComponents = {
|
9018 |
+
Transition: Transition,
|
9019 |
+
TransitionGroup: TransitionGroup
|
9020 |
+
};
|
9021 |
+
|
9022 |
+
/* */
|
9023 |
+
|
9024 |
+
// install platform specific utils
|
9025 |
+
Vue.config.mustUseProp = mustUseProp;
|
9026 |
+
Vue.config.isReservedTag = isReservedTag;
|
9027 |
+
Vue.config.isReservedAttr = isReservedAttr;
|
9028 |
+
Vue.config.getTagNamespace = getTagNamespace;
|
9029 |
+
Vue.config.isUnknownElement = isUnknownElement;
|
9030 |
+
|
9031 |
+
// install platform runtime directives & components
|
9032 |
+
extend(Vue.options.directives, platformDirectives);
|
9033 |
+
extend(Vue.options.components, platformComponents);
|
9034 |
+
|
9035 |
+
// install platform patch function
|
9036 |
+
Vue.prototype.__patch__ = inBrowser ? patch : noop;
|
9037 |
+
|
9038 |
+
// public mount method
|
9039 |
+
Vue.prototype.$mount = function (
|
9040 |
+
el,
|
9041 |
+
hydrating
|
9042 |
+
) {
|
9043 |
+
el = el && inBrowser ? query(el) : undefined;
|
9044 |
+
return mountComponent(this, el, hydrating)
|
9045 |
+
};
|
9046 |
+
|
9047 |
+
// devtools global hook
|
9048 |
+
/* istanbul ignore next */
|
9049 |
+
if (inBrowser) {
|
9050 |
+
setTimeout(function () {
|
9051 |
+
if (config.devtools) {
|
9052 |
+
if (devtools) {
|
9053 |
+
devtools.emit('init', Vue);
|
9054 |
+
} else {
|
9055 |
+
console[console.info ? 'info' : 'log'](
|
9056 |
+
'Download the Vue Devtools extension for a better development experience:\n' +
|
9057 |
+
'https://github.com/vuejs/vue-devtools'
|
9058 |
+
);
|
9059 |
}
|
|
|
9060 |
}
|
9061 |
+
if (config.productionTip !== false &&
|
9062 |
+
typeof console !== 'undefined'
|
9063 |
+
) {
|
9064 |
+
console[console.info ? 'info' : 'log'](
|
9065 |
+
"You are running Vue in development mode.\n" +
|
9066 |
+
"Make sure to turn on production mode when deploying for production.\n" +
|
9067 |
+
"See more tips at https://vuejs.org/guide/deployment.html"
|
9068 |
+
);
|
9069 |
+
}
|
9070 |
+
}, 0);
|
9071 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9072 |
|
9073 |
+
/* */
|
|
|
|
|
9074 |
|
9075 |
+
var defaultTagRE = /\{\{((?:.|\r?\n)+?)\}\}/g;
|
9076 |
+
var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9077 |
|
9078 |
+
var buildRegex = cached(function (delimiters) {
|
9079 |
+
var open = delimiters[0].replace(regexEscapeRE, '\\$&');
|
9080 |
+
var close = delimiters[1].replace(regexEscapeRE, '\\$&');
|
9081 |
+
return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
|
9082 |
+
});
|
9083 |
+
|
9084 |
+
|
9085 |
+
|
9086 |
+
function parseText (
|
9087 |
+
text,
|
9088 |
+
delimiters
|
9089 |
) {
|
9090 |
+
var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
|
9091 |
+
if (!tagRE.test(text)) {
|
9092 |
+
return
|
9093 |
+
}
|
9094 |
+
var tokens = [];
|
9095 |
+
var rawTokens = [];
|
9096 |
+
var lastIndex = tagRE.lastIndex = 0;
|
9097 |
+
var match, index, tokenValue;
|
9098 |
+
while ((match = tagRE.exec(text))) {
|
9099 |
+
index = match.index;
|
9100 |
+
// push text token
|
9101 |
+
if (index > lastIndex) {
|
9102 |
+
rawTokens.push(tokenValue = text.slice(lastIndex, index));
|
9103 |
+
tokens.push(JSON.stringify(tokenValue));
|
9104 |
+
}
|
9105 |
+
// tag token
|
9106 |
+
var exp = parseFilters(match[1].trim());
|
9107 |
+
tokens.push(("_s(" + exp + ")"));
|
9108 |
+
rawTokens.push({ '@binding': exp });
|
9109 |
+
lastIndex = index + match[0].length;
|
9110 |
+
}
|
9111 |
+
if (lastIndex < text.length) {
|
9112 |
+
rawTokens.push(tokenValue = text.slice(lastIndex));
|
9113 |
+
tokens.push(JSON.stringify(tokenValue));
|
9114 |
+
}
|
9115 |
+
return {
|
9116 |
+
expression: tokens.join('+'),
|
9117 |
+
tokens: rawTokens
|
9118 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9119 |
}
|
|
|
9120 |
|
9121 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9122 |
|
9123 |
+
function transformNode (el, options) {
|
9124 |
+
var warn = options.warn || baseWarn;
|
9125 |
+
var staticClass = getAndRemoveAttr(el, 'class');
|
9126 |
+
if (staticClass) {
|
9127 |
+
var res = parseText(staticClass, options.delimiters);
|
9128 |
+
if (res) {
|
9129 |
+
warn(
|
9130 |
+
"class=\"" + staticClass + "\": " +
|
9131 |
+
'Interpolation inside attributes has been removed. ' +
|
9132 |
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
9133 |
+
'instead of <div class="{{ val }}">, use <div :class="val">.',
|
9134 |
+
el.rawAttrsMap['class']
|
9135 |
+
);
|
9136 |
+
}
|
9137 |
+
}
|
9138 |
+
if (staticClass) {
|
9139 |
+
el.staticClass = JSON.stringify(staticClass);
|
9140 |
+
}
|
9141 |
+
var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
|
9142 |
+
if (classBinding) {
|
9143 |
+
el.classBinding = classBinding;
|
9144 |
+
}
|
9145 |
}
|
|
|
9146 |
|
9147 |
+
function genData (el) {
|
9148 |
+
var data = '';
|
9149 |
+
if (el.staticClass) {
|
9150 |
+
data += "staticClass:" + (el.staticClass) + ",";
|
9151 |
}
|
9152 |
+
if (el.classBinding) {
|
9153 |
+
data += "class:" + (el.classBinding) + ",";
|
9154 |
+
}
|
9155 |
+
return data
|
9156 |
}
|
|
|
|
|
|
|
|
|
|
|
9157 |
|
9158 |
+
var klass$1 = {
|
9159 |
+
staticKeys: ['staticClass'],
|
9160 |
+
transformNode: transformNode,
|
9161 |
+
genData: genData
|
9162 |
+
};
|
9163 |
|
9164 |
+
/* */
|
|
|
9165 |
|
9166 |
+
function transformNode$1 (el, options) {
|
9167 |
+
var warn = options.warn || baseWarn;
|
9168 |
+
var staticStyle = getAndRemoveAttr(el, 'style');
|
9169 |
+
if (staticStyle) {
|
9170 |
+
/* istanbul ignore if */
|
9171 |
+
{
|
9172 |
+
var res = parseText(staticStyle, options.delimiters);
|
9173 |
+
if (res) {
|
9174 |
+
warn(
|
9175 |
+
"style=\"" + staticStyle + "\": " +
|
9176 |
+
'Interpolation inside attributes has been removed. ' +
|
9177 |
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
9178 |
+
'instead of <div style="{{ val }}">, use <div :style="val">.',
|
9179 |
+
el.rawAttrsMap['style']
|
9180 |
+
);
|
9181 |
+
}
|
9182 |
+
}
|
9183 |
+
el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
|
9184 |
}
|
9185 |
|
9186 |
+
var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
|
9187 |
+
if (styleBinding) {
|
9188 |
+
el.styleBinding = styleBinding;
|
|
|
|
|
9189 |
}
|
9190 |
+
}
|
9191 |
|
9192 |
+
function genData$1 (el) {
|
9193 |
+
var data = '';
|
9194 |
+
if (el.staticStyle) {
|
9195 |
+
data += "staticStyle:" + (el.staticStyle) + ",";
|
9196 |
+
}
|
9197 |
+
if (el.styleBinding) {
|
9198 |
+
data += "style:(" + (el.styleBinding) + "),";
|
9199 |
}
|
9200 |
+
return data
|
9201 |
+
}
|
9202 |
|
9203 |
+
var style$1 = {
|
9204 |
+
staticKeys: ['staticStyle'],
|
9205 |
+
transformNode: transformNode$1,
|
9206 |
+
genData: genData$1
|
9207 |
+
};
|
9208 |
|
9209 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9210 |
|
9211 |
+
var decoder;
|
9212 |
|
9213 |
+
var he = {
|
9214 |
+
decode: function decode (html) {
|
9215 |
+
decoder = decoder || document.createElement('div');
|
9216 |
+
decoder.innerHTML = html;
|
9217 |
+
return decoder.textContent
|
9218 |
}
|
9219 |
+
};
|
9220 |
|
9221 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
9222 |
|
9223 |
+
var isUnaryTag = makeMap(
|
9224 |
+
'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
|
9225 |
+
'link,meta,param,source,track,wbr'
|
9226 |
+
);
|
9227 |
|
9228 |
+
// Elements that you can, intentionally, leave open
|
9229 |
+
// (and which close themselves)
|
9230 |
+
var canBeLeftOpenTag = makeMap(
|
9231 |
+
'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'
|
9232 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
9233 |
|
9234 |
+
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3
|
9235 |
+
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
|
9236 |
+
var isNonPhrasingTag = makeMap(
|
9237 |
+
'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +
|
9238 |
+
'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +
|
9239 |
+
'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +
|
9240 |
+
'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +
|
9241 |
+
'title,tr,track'
|
9242 |
+
);
|
9243 |
|
9244 |
+
/**
|
9245 |
+
* Not type-checking this file because it's mostly vendor code.
|
9246 |
+
*/
|
|
|
|
|
9247 |
|
9248 |
+
// Regular Expressions for parsing tags and attributes
|
9249 |
+
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
9250 |
+
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
|
9251 |
+
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + (unicodeRegExp.source) + "]*";
|
9252 |
+
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
|
9253 |
+
var startTagOpen = new RegExp(("^<" + qnameCapture));
|
9254 |
+
var startTagClose = /^\s*(\/?)>/;
|
9255 |
+
var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
|
9256 |
+
var doctype = /^<!DOCTYPE [^>]+>/i;
|
9257 |
+
// #7298: escape - to avoid being passed as HTML comment when inlined in page
|
9258 |
+
var comment = /^<!\--/;
|
9259 |
+
var conditionalComment = /^<!\[/;
|
9260 |
+
|
9261 |
+
// Special Elements (can contain anything)
|
9262 |
+
var isPlainTextElement = makeMap('script,style,textarea', true);
|
9263 |
+
var reCache = {};
|
9264 |
+
|
9265 |
+
var decodingMap = {
|
9266 |
+
'<': '<',
|
9267 |
+
'>': '>',
|
9268 |
+
'"': '"',
|
9269 |
+
'&': '&',
|
9270 |
+
' ': '\n',
|
9271 |
+
'	': '\t',
|
9272 |
+
''': "'"
|
9273 |
+
};
|
9274 |
+
var encodedAttr = /&(?:lt|gt|quot|amp|#39);/g;
|
9275 |
+
var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#39|#10|#9);/g;
|
9276 |
+
|
9277 |
+
// #5992
|
9278 |
+
var isIgnoreNewlineTag = makeMap('pre,textarea', true);
|
9279 |
+
var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
|
9280 |
+
|
9281 |
+
function decodeAttr (value, shouldDecodeNewlines) {
|
9282 |
+
var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
|
9283 |
+
return value.replace(re, function (match) { return decodingMap[match]; })
|
9284 |
+
}
|
9285 |
+
|
9286 |
+
function parseHTML (html, options) {
|
9287 |
+
var stack = [];
|
9288 |
+
var expectHTML = options.expectHTML;
|
9289 |
+
var isUnaryTag$$1 = options.isUnaryTag || no;
|
9290 |
+
var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;
|
9291 |
+
var index = 0;
|
9292 |
+
var last, lastTag;
|
9293 |
+
while (html) {
|
9294 |
+
last = html;
|
9295 |
+
// Make sure we're not in a plaintext content element like script/style
|
9296 |
+
if (!lastTag || !isPlainTextElement(lastTag)) {
|
9297 |
+
var textEnd = html.indexOf('<');
|
9298 |
+
if (textEnd === 0) {
|
9299 |
+
// Comment:
|
9300 |
+
if (comment.test(html)) {
|
9301 |
+
var commentEnd = html.indexOf('-->');
|
9302 |
+
|
9303 |
+
if (commentEnd >= 0) {
|
9304 |
+
if (options.shouldKeepComment) {
|
9305 |
+
options.comment(html.substring(4, commentEnd), index, index + commentEnd + 3);
|
9306 |
+
}
|
9307 |
+
advance(commentEnd + 3);
|
9308 |
+
continue
|
9309 |
+
}
|
9310 |
+
}
|
9311 |
|
9312 |
+
// http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment
|
9313 |
+
if (conditionalComment.test(html)) {
|
9314 |
+
var conditionalEnd = html.indexOf(']>');
|
9315 |
+
|
9316 |
+
if (conditionalEnd >= 0) {
|
9317 |
+
advance(conditionalEnd + 2);
|
9318 |
+
continue
|
9319 |
+
}
|
9320 |
+
}
|
9321 |
|
9322 |
+
// Doctype:
|
9323 |
+
var doctypeMatch = html.match(doctype);
|
9324 |
+
if (doctypeMatch) {
|
9325 |
+
advance(doctypeMatch[0].length);
|
9326 |
+
continue
|
9327 |
+
}
|
9328 |
|
9329 |
+
// End tag:
|
9330 |
+
var endTagMatch = html.match(endTag);
|
9331 |
+
if (endTagMatch) {
|
9332 |
+
var curIndex = index;
|
9333 |
+
advance(endTagMatch[0].length);
|
9334 |
+
parseEndTag(endTagMatch[1], curIndex, index);
|
9335 |
+
continue
|
9336 |
+
}
|
9337 |
|
9338 |
+
// Start tag:
|
9339 |
+
var startTagMatch = parseStartTag();
|
9340 |
+
if (startTagMatch) {
|
9341 |
+
handleStartTag(startTagMatch);
|
9342 |
+
if (shouldIgnoreFirstNewline(startTagMatch.tagName, html)) {
|
9343 |
+
advance(1);
|
9344 |
+
}
|
9345 |
+
continue
|
9346 |
+
}
|
9347 |
+
}
|
9348 |
|
9349 |
+
var text = (void 0), rest = (void 0), next = (void 0);
|
9350 |
+
if (textEnd >= 0) {
|
9351 |
+
rest = html.slice(textEnd);
|
9352 |
+
while (
|
9353 |
+
!endTag.test(rest) &&
|
9354 |
+
!startTagOpen.test(rest) &&
|
9355 |
+
!comment.test(rest) &&
|
9356 |
+
!conditionalComment.test(rest)
|
9357 |
+
) {
|
9358 |
+
// < in plain text, be forgiving and treat it as text
|
9359 |
+
next = rest.indexOf('<', 1);
|
9360 |
+
if (next < 0) { break }
|
9361 |
+
textEnd += next;
|
9362 |
+
rest = html.slice(textEnd);
|
9363 |
+
}
|
9364 |
+
text = html.substring(0, textEnd);
|
9365 |
+
}
|
9366 |
|
9367 |
+
if (textEnd < 0) {
|
9368 |
+
text = html;
|
9369 |
+
}
|
9370 |
|
9371 |
+
if (text) {
|
9372 |
+
advance(text.length);
|
9373 |
+
}
|
9374 |
|
9375 |
+
if (options.chars && text) {
|
9376 |
+
options.chars(text, index - text.length, index);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9377 |
}
|
9378 |
+
} else {
|
9379 |
+
var endTagLength = 0;
|
9380 |
+
var stackedTag = lastTag.toLowerCase();
|
9381 |
+
var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
|
9382 |
+
var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
|
9383 |
+
endTagLength = endTag.length;
|
9384 |
+
if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
|
9385 |
+
text = text
|
9386 |
+
.replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298
|
9387 |
+
.replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
|
9388 |
+
}
|
9389 |
+
if (shouldIgnoreFirstNewline(stackedTag, text)) {
|
9390 |
+
text = text.slice(1);
|
9391 |
+
}
|
9392 |
+
if (options.chars) {
|
9393 |
+
options.chars(text);
|
9394 |
+
}
|
9395 |
+
return ''
|
9396 |
+
});
|
9397 |
+
index += html.length - rest$1.length;
|
9398 |
+
html = rest$1;
|
9399 |
+
parseEndTag(stackedTag, index - endTagLength, index);
|
9400 |
}
|
|
|
9401 |
|
9402 |
+
if (html === last) {
|
9403 |
+
options.chars && options.chars(html);
|
9404 |
+
if (!stack.length && options.warn) {
|
9405 |
+
options.warn(("Mal-formatted tag at end of template: \"" + html + "\""), { start: index + html.length });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9406 |
}
|
9407 |
+
break
|
9408 |
}
|
|
|
|
|
9409 |
}
|
9410 |
|
9411 |
+
// Clean up any remaining tags
|
9412 |
+
parseEndTag();
|
9413 |
|
9414 |
+
function advance (n) {
|
9415 |
+
index += n;
|
9416 |
+
html = html.substring(n);
|
9417 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
9418 |
|
9419 |
+
function parseStartTag () {
|
9420 |
+
var start = html.match(startTagOpen);
|
9421 |
+
if (start) {
|
9422 |
+
var match = {
|
9423 |
+
tagName: start[1],
|
9424 |
+
attrs: [],
|
9425 |
+
start: index
|
9426 |
+
};
|
9427 |
+
advance(start[0].length);
|
9428 |
+
var end, attr;
|
9429 |
+
while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
|
9430 |
+
attr.start = index;
|
9431 |
+
advance(attr[0].length);
|
9432 |
+
attr.end = index;
|
9433 |
+
match.attrs.push(attr);
|
9434 |
+
}
|
9435 |
+
if (end) {
|
9436 |
+
match.unarySlash = end[1];
|
9437 |
+
advance(end[0].length);
|
9438 |
+
match.end = index;
|
9439 |
+
return match
|
9440 |
+
}
|
9441 |
+
}
|
9442 |
}
|
9443 |
|
9444 |
+
function handleStartTag (match) {
|
9445 |
+
var tagName = match.tagName;
|
9446 |
+
var unarySlash = match.unarySlash;
|
|
|
|
|
9447 |
|
9448 |
+
if (expectHTML) {
|
9449 |
+
if (lastTag === 'p' && isNonPhrasingTag(tagName)) {
|
9450 |
+
parseEndTag(lastTag);
|
9451 |
+
}
|
9452 |
+
if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {
|
9453 |
+
parseEndTag(tagName);
|
9454 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9455 |
}
|
|
|
|
|
9456 |
|
9457 |
+
var unary = isUnaryTag$$1(tagName) || !!unarySlash;
|
9458 |
+
|
9459 |
+
var l = match.attrs.length;
|
9460 |
+
var attrs = new Array(l);
|
9461 |
+
for (var i = 0; i < l; i++) {
|
9462 |
+
var args = match.attrs[i];
|
9463 |
+
var value = args[3] || args[4] || args[5] || '';
|
9464 |
+
var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'
|
9465 |
+
? options.shouldDecodeNewlinesForHref
|
9466 |
+
: options.shouldDecodeNewlines;
|
9467 |
+
attrs[i] = {
|
9468 |
+
name: args[1],
|
9469 |
+
value: decodeAttr(value, shouldDecodeNewlines)
|
9470 |
+
};
|
9471 |
+
if (options.outputSourceRange) {
|
9472 |
+
attrs[i].start = args.start + args[0].match(/^\s*/).length;
|
9473 |
+
attrs[i].end = args.end;
|
9474 |
+
}
|
9475 |
}
|
9476 |
+
|
9477 |
+
if (!unary) {
|
9478 |
+
stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs, start: match.start, end: match.end });
|
9479 |
+
lastTag = tagName;
|
9480 |
}
|
9481 |
+
|
9482 |
+
if (options.start) {
|
9483 |
+
options.start(tagName, attrs, unary, match.start, match.end);
|
|
|
|
|
|
|
|
|
|
|
9484 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
9485 |
}
|
|
|
|
|
9486 |
|
9487 |
+
function parseEndTag (tagName, start, end) {
|
9488 |
+
var pos, lowerCasedTagName;
|
9489 |
+
if (start == null) { start = index; }
|
9490 |
+
if (end == null) { end = index; }
|
9491 |
+
|
9492 |
+
// Find the closest opened tag of the same type
|
9493 |
+
if (tagName) {
|
9494 |
+
lowerCasedTagName = tagName.toLowerCase();
|
9495 |
+
for (pos = stack.length - 1; pos >= 0; pos--) {
|
9496 |
+
if (stack[pos].lowerCasedTag === lowerCasedTagName) {
|
9497 |
+
break
|
9498 |
+
}
|
9499 |
+
}
|
9500 |
+
} else {
|
9501 |
+
// If no tag name is provided, clean shop
|
9502 |
+
pos = 0;
|
9503 |
+
}
|
9504 |
+
|
9505 |
+
if (pos >= 0) {
|
9506 |
+
// Close all the open elements, up the stack
|
9507 |
+
for (var i = stack.length - 1; i >= pos; i--) {
|
9508 |
+
if (i > pos || !tagName &&
|
9509 |
+
options.warn
|
9510 |
+
) {
|
9511 |
+
options.warn(
|
9512 |
+
("tag <" + (stack[i].tag) + "> has no matching end tag."),
|
9513 |
+
{ start: stack[i].start, end: stack[i].end }
|
9514 |
+
);
|
9515 |
+
}
|
9516 |
+
if (options.end) {
|
9517 |
+
options.end(stack[i].tag, start, end);
|
9518 |
+
}
|
9519 |
+
}
|
9520 |
+
|
9521 |
+
// Remove the open elements from the stack
|
9522 |
+
stack.length = pos;
|
9523 |
+
lastTag = pos && stack[pos - 1].tag;
|
9524 |
+
} else if (lowerCasedTagName === 'br') {
|
9525 |
+
if (options.start) {
|
9526 |
+
options.start(tagName, [], true, start, end);
|
9527 |
+
}
|
9528 |
+
} else if (lowerCasedTagName === 'p') {
|
9529 |
+
if (options.start) {
|
9530 |
+
options.start(tagName, [], false, start, end);
|
9531 |
+
}
|
9532 |
+
if (options.end) {
|
9533 |
+
options.end(tagName, start, end);
|
9534 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9535 |
}
|
9536 |
}
|
9537 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9538 |
|
9539 |
+
/* */
|
9540 |
|
9541 |
+
var onRE = /^@|^v-on:/;
|
9542 |
+
var dirRE = /^v-|^@|^:|^#/;
|
9543 |
+
var forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
|
9544 |
+
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
|
9545 |
+
var stripParensRE = /^\(|\)$/g;
|
9546 |
+
var dynamicArgRE = /^\[.*\]$/;
|
9547 |
|
9548 |
+
var argRE = /:(.*)$/;
|
9549 |
+
var bindRE = /^:|^\.|^v-bind:/;
|
9550 |
+
var modifierRE = /\.[^.\]]+(?=[^\]]*$)/g;
|
|
|
|
|
9551 |
|
9552 |
+
var slotRE = /^v-slot(:|$)|^#/;
|
9553 |
|
9554 |
+
var lineBreakRE = /[\r\n]/;
|
9555 |
+
var whitespaceRE$1 = /\s+/g;
|
9556 |
|
9557 |
+
var invalidAttributeRE = /[\s"'<>\/=]/;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9558 |
|
9559 |
+
var decodeHTMLCached = cached(he.decode);
|
9560 |
|
9561 |
+
var emptySlotScopeToken = "_empty_";
|
9562 |
+
|
9563 |
+
// configurable state
|
9564 |
+
var warn$2;
|
9565 |
+
var delimiters;
|
9566 |
+
var transforms;
|
9567 |
+
var preTransforms;
|
9568 |
+
var postTransforms;
|
9569 |
+
var platformIsPreTag;
|
9570 |
+
var platformMustUseProp;
|
9571 |
+
var platformGetTagNamespace;
|
9572 |
+
var maybeComponent;
|
9573 |
+
|
9574 |
+
function createASTElement (
|
9575 |
+
tag,
|
9576 |
+
attrs,
|
9577 |
+
parent
|
9578 |
+
) {
|
9579 |
+
return {
|
9580 |
+
type: 1,
|
9581 |
+
tag: tag,
|
9582 |
+
attrsList: attrs,
|
9583 |
+
attrsMap: makeAttrsMap(attrs),
|
9584 |
+
rawAttrsMap: {},
|
9585 |
+
parent: parent,
|
9586 |
+
children: []
|
9587 |
}
|
9588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9589 |
|
9590 |
+
/**
|
9591 |
+
* Convert HTML string to AST.
|
9592 |
+
*/
|
9593 |
+
function parse (
|
9594 |
+
template,
|
9595 |
+
options
|
9596 |
+
) {
|
9597 |
+
warn$2 = options.warn || baseWarn;
|
|
|
|
|
9598 |
|
9599 |
+
platformIsPreTag = options.isPreTag || no;
|
9600 |
+
platformMustUseProp = options.mustUseProp || no;
|
9601 |
+
platformGetTagNamespace = options.getTagNamespace || no;
|
9602 |
+
var isReservedTag = options.isReservedTag || no;
|
9603 |
+
maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
|
9604 |
|
9605 |
+
transforms = pluckModuleFunction(options.modules, 'transformNode');
|
9606 |
+
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
|
9607 |
+
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
|
9608 |
|
9609 |
+
delimiters = options.delimiters;
|
9610 |
+
|
9611 |
+
var stack = [];
|
9612 |
+
var preserveWhitespace = options.preserveWhitespace !== false;
|
9613 |
+
var whitespaceOption = options.whitespace;
|
9614 |
+
var root;
|
9615 |
+
var currentParent;
|
9616 |
+
var inVPre = false;
|
9617 |
+
var inPre = false;
|
9618 |
+
var warned = false;
|
9619 |
+
|
9620 |
+
function warnOnce (msg, range) {
|
9621 |
+
if (!warned) {
|
9622 |
+
warned = true;
|
9623 |
+
warn$2(msg, range);
|
9624 |
}
|
9625 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9626 |
|
9627 |
+
function closeElement (element) {
|
9628 |
+
trimEndingWhitespace(element);
|
9629 |
+
if (!inVPre && !element.processed) {
|
9630 |
+
element = processElement(element, options);
|
9631 |
+
}
|
9632 |
+
// tree management
|
9633 |
+
if (!stack.length && element !== root) {
|
9634 |
+
// allow root elements with v-if, v-else-if and v-else
|
9635 |
+
if (root.if && (element.elseif || element.else)) {
|
9636 |
+
{
|
9637 |
+
checkRootConstraints(element);
|
9638 |
+
}
|
9639 |
+
addIfCondition(root, {
|
9640 |
+
exp: element.elseif,
|
9641 |
+
block: element
|
9642 |
+
});
|
9643 |
+
} else {
|
9644 |
+
warnOnce(
|
9645 |
+
"Component template should contain exactly one root element. " +
|
9646 |
+
"If you are using v-if on multiple elements, " +
|
9647 |
+
"use v-else-if to chain them instead.",
|
9648 |
+
{ start: element.start }
|
9649 |
+
);
|
9650 |
+
}
|
9651 |
+
}
|
9652 |
+
if (currentParent && !element.forbidden) {
|
9653 |
+
if (element.elseif || element.else) {
|
9654 |
+
processIfConditions(element, currentParent);
|
9655 |
+
} else {
|
9656 |
+
if (element.slotScope) {
|
9657 |
+
// scoped slot
|
9658 |
+
// keep it in the children list so that v-else(-if) conditions can
|
9659 |
+
// find it as the prev node.
|
9660 |
+
var name = element.slotTarget || '"default"'
|
9661 |
+
;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;
|
9662 |
+
}
|
9663 |
+
currentParent.children.push(element);
|
9664 |
+
element.parent = currentParent;
|
9665 |
+
}
|
9666 |
+
}
|
9667 |
|
9668 |
+
// final children cleanup
|
9669 |
+
// filter out scoped slots
|
9670 |
+
element.children = element.children.filter(function (c) { return !(c).slotScope; });
|
9671 |
+
// remove trailing whitespace node again
|
9672 |
+
trimEndingWhitespace(element);
|
9673 |
|
9674 |
+
// check pre state
|
9675 |
+
if (element.pre) {
|
9676 |
+
inVPre = false;
|
9677 |
+
}
|
9678 |
+
if (platformIsPreTag(element.tag)) {
|
9679 |
+
inPre = false;
|
9680 |
+
}
|
9681 |
+
// apply post-transforms
|
9682 |
+
for (var i = 0; i < postTransforms.length; i++) {
|
9683 |
+
postTransforms[i](element, options);
|
9684 |
+
}
|
9685 |
+
}
|
9686 |
|
9687 |
+
function trimEndingWhitespace (el) {
|
9688 |
+
// remove trailing whitespace node
|
9689 |
+
if (!inPre) {
|
9690 |
+
var lastNode;
|
9691 |
+
while (
|
9692 |
+
(lastNode = el.children[el.children.length - 1]) &&
|
9693 |
+
lastNode.type === 3 &&
|
9694 |
+
lastNode.text === ' '
|
9695 |
+
) {
|
9696 |
+
el.children.pop();
|
9697 |
+
}
|
9698 |
+
}
|
9699 |
+
}
|
9700 |
|
9701 |
+
function checkRootConstraints (el) {
|
9702 |
+
if (el.tag === 'slot' || el.tag === 'template') {
|
9703 |
+
warnOnce(
|
9704 |
+
"Cannot use <" + (el.tag) + "> as component root element because it may " +
|
9705 |
+
'contain multiple nodes.',
|
9706 |
+
{ start: el.start }
|
9707 |
+
);
|
9708 |
+
}
|
9709 |
+
if (el.attrsMap.hasOwnProperty('v-for')) {
|
9710 |
+
warnOnce(
|
9711 |
+
'Cannot use v-for on stateful component root element because ' +
|
9712 |
+
'it renders multiple elements.',
|
9713 |
+
el.rawAttrsMap['v-for']
|
9714 |
+
);
|
9715 |
+
}
|
9716 |
+
}
|
9717 |
|
9718 |
+
parseHTML(template, {
|
9719 |
+
warn: warn$2,
|
9720 |
+
expectHTML: options.expectHTML,
|
9721 |
+
isUnaryTag: options.isUnaryTag,
|
9722 |
+
canBeLeftOpenTag: options.canBeLeftOpenTag,
|
9723 |
+
shouldDecodeNewlines: options.shouldDecodeNewlines,
|
9724 |
+
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
|
9725 |
+
shouldKeepComment: options.comments,
|
9726 |
+
outputSourceRange: options.outputSourceRange,
|
9727 |
+
start: function start (tag, attrs, unary, start$1, end) {
|
9728 |
+
// check namespace.
|
9729 |
+
// inherit parent ns if there is one
|
9730 |
+
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);
|
9731 |
|
9732 |
+
// handle IE svg bug
|
9733 |
+
/* istanbul ignore if */
|
9734 |
+
if (isIE && ns === 'svg') {
|
9735 |
+
attrs = guardIESVGBug(attrs);
|
9736 |
+
}
|
9737 |
|
9738 |
+
var element = createASTElement(tag, attrs, currentParent);
|
9739 |
+
if (ns) {
|
9740 |
+
element.ns = ns;
|
9741 |
+
}
|
|
|
9742 |
|
9743 |
+
{
|
9744 |
+
if (options.outputSourceRange) {
|
9745 |
+
element.start = start$1;
|
9746 |
+
element.end = end;
|
9747 |
+
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
|
9748 |
+
cumulated[attr.name] = attr;
|
9749 |
+
return cumulated
|
9750 |
+
}, {});
|
9751 |
+
}
|
9752 |
+
attrs.forEach(function (attr) {
|
9753 |
+
if (invalidAttributeRE.test(attr.name)) {
|
9754 |
+
warn$2(
|
9755 |
+
"Invalid dynamic argument expression: attribute names cannot contain " +
|
9756 |
+
"spaces, quotes, <, >, / or =.",
|
9757 |
+
{
|
9758 |
+
start: attr.start + attr.name.indexOf("["),
|
9759 |
+
end: attr.start + attr.name.length
|
9760 |
+
}
|
9761 |
+
);
|
9762 |
+
}
|
9763 |
+
});
|
9764 |
+
}
|
9765 |
|
9766 |
+
if (isForbiddenTag(element) && !isServerRendering()) {
|
9767 |
+
element.forbidden = true;
|
9768 |
+
warn$2(
|
9769 |
+
'Templates should only be responsible for mapping the state to the ' +
|
9770 |
+
'UI. Avoid placing tags with side-effects in your templates, such as ' +
|
9771 |
+
"<" + tag + ">" + ', as they will not be parsed.',
|
9772 |
+
{ start: element.start }
|
9773 |
+
);
|
9774 |
+
}
|
9775 |
|
9776 |
+
// apply pre-transforms
|
9777 |
+
for (var i = 0; i < preTransforms.length; i++) {
|
9778 |
+
element = preTransforms[i](element, options) || element;
|
9779 |
+
}
|
|
|
|
|
9780 |
|
9781 |
+
if (!inVPre) {
|
9782 |
+
processPre(element);
|
9783 |
+
if (element.pre) {
|
9784 |
+
inVPre = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9785 |
}
|
9786 |
}
|
9787 |
+
if (platformIsPreTag(element.tag)) {
|
9788 |
+
inPre = true;
|
9789 |
+
}
|
9790 |
+
if (inVPre) {
|
9791 |
+
processRawAttrs(element);
|
9792 |
+
} else if (!element.processed) {
|
9793 |
+
// structural directives
|
9794 |
+
processFor(element);
|
9795 |
+
processIf(element);
|
9796 |
+
processOnce(element);
|
9797 |
+
}
|
9798 |
|
9799 |
+
if (!root) {
|
9800 |
+
root = element;
|
9801 |
+
{
|
9802 |
+
checkRootConstraints(root);
|
|
|
|
|
|
|
9803 |
}
|
9804 |
}
|
9805 |
|
9806 |
+
if (!unary) {
|
9807 |
+
currentParent = element;
|
9808 |
+
stack.push(element);
|
9809 |
+
} else {
|
9810 |
+
closeElement(element);
|
9811 |
}
|
9812 |
+
},
|
9813 |
+
|
9814 |
+
end: function end (tag, start, end$1) {
|
9815 |
+
var element = stack[stack.length - 1];
|
9816 |
+
// pop stack
|
9817 |
+
stack.length -= 1;
|
9818 |
+
currentParent = stack[stack.length - 1];
|
9819 |
+
if (options.outputSourceRange) {
|
9820 |
+
element.end = end$1;
|
9821 |
}
|
9822 |
+
closeElement(element);
|
9823 |
+
},
|
9824 |
+
|
9825 |
+
chars: function chars (text, start, end) {
|
9826 |
+
if (!currentParent) {
|
9827 |
+
{
|
9828 |
+
if (text === template) {
|
9829 |
+
warnOnce(
|
9830 |
+
'Component template requires a root element, rather than just text.',
|
9831 |
+
{ start: start }
|
9832 |
+
);
|
9833 |
+
} else if ((text = text.trim())) {
|
9834 |
+
warnOnce(
|
9835 |
+
("text \"" + text + "\" outside root element will be ignored."),
|
9836 |
+
{ start: start }
|
9837 |
+
);
|
9838 |
+
}
|
9839 |
}
|
9840 |
+
return
|
9841 |
}
|
9842 |
+
// IE textarea placeholder bug
|
9843 |
+
/* istanbul ignore if */
|
9844 |
+
if (isIE &&
|
9845 |
+
currentParent.tag === 'textarea' &&
|
9846 |
+
currentParent.attrsMap.placeholder === text
|
|
|
|
|
|
|
|
|
|
|
9847 |
) {
|
9848 |
+
return
|
9849 |
+
}
|
9850 |
+
var children = currentParent.children;
|
9851 |
+
if (inPre || text.trim()) {
|
9852 |
+
text = isTextTag(currentParent) ? text : decodeHTMLCached(text);
|
9853 |
+
} else if (!children.length) {
|
9854 |
+
// remove the whitespace-only node right after an opening tag
|
9855 |
+
text = '';
|
9856 |
+
} else if (whitespaceOption) {
|
9857 |
+
if (whitespaceOption === 'condense') {
|
9858 |
+
// in condense mode, remove the whitespace node if it contains
|
9859 |
+
// line break, otherwise condense to a single space
|
9860 |
+
text = lineBreakRE.test(text) ? '' : ' ';
|
9861 |
+
} else {
|
9862 |
+
text = ' ';
|
9863 |
+
}
|
9864 |
+
} else {
|
9865 |
+
text = preserveWhitespace ? ' ' : '';
|
9866 |
+
}
|
9867 |
+
if (text) {
|
9868 |
+
if (!inPre && whitespaceOption === 'condense') {
|
9869 |
+
// condense consecutive whitespaces into single space
|
9870 |
+
text = text.replace(whitespaceRE$1, ' ');
|
9871 |
+
}
|
9872 |
+
var res;
|
9873 |
+
var child;
|
9874 |
+
if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
|
9875 |
+
child = {
|
9876 |
+
type: 2,
|
9877 |
+
expression: res.expression,
|
9878 |
+
tokens: res.tokens,
|
9879 |
+
text: text
|
9880 |
+
};
|
9881 |
+
} else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
|
9882 |
+
child = {
|
9883 |
+
type: 3,
|
9884 |
+
text: text
|
9885 |
+
};
|
9886 |
+
}
|
9887 |
+
if (child) {
|
9888 |
+
if (options.outputSourceRange) {
|
9889 |
+
child.start = start;
|
9890 |
+
child.end = end;
|
9891 |
+
}
|
9892 |
+
children.push(child);
|
9893 |
+
}
|
9894 |
+
}
|
9895 |
+
},
|
9896 |
+
comment: function comment (text, start, end) {
|
9897 |
+
// adding anything as a sibling to the root node is forbidden
|
9898 |
+
// comments should still be allowed, but ignored
|
9899 |
+
if (currentParent) {
|
9900 |
+
var child = {
|
9901 |
+
type: 3,
|
9902 |
+
text: text,
|
9903 |
+
isComment: true
|
9904 |
+
};
|
9905 |
+
if (options.outputSourceRange) {
|
9906 |
+
child.start = start;
|
9907 |
+
child.end = end;
|
9908 |
+
}
|
9909 |
+
currentParent.children.push(child);
|
9910 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9911 |
}
|
9912 |
+
});
|
9913 |
+
return root
|
9914 |
+
}
|
9915 |
|
9916 |
+
function processPre (el) {
|
9917 |
+
if (getAndRemoveAttr(el, 'v-pre') != null) {
|
9918 |
+
el.pre = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9919 |
}
|
9920 |
+
}
|
9921 |
|
9922 |
+
function processRawAttrs (el) {
|
9923 |
+
var list = el.attrsList;
|
9924 |
+
var len = list.length;
|
9925 |
+
if (len) {
|
9926 |
+
var attrs = el.attrs = new Array(len);
|
9927 |
+
for (var i = 0; i < len; i++) {
|
9928 |
+
attrs[i] = {
|
9929 |
+
name: list[i].name,
|
9930 |
+
value: JSON.stringify(list[i].value)
|
9931 |
+
};
|
9932 |
+
if (list[i].start != null) {
|
9933 |
+
attrs[i].start = list[i].start;
|
9934 |
+
attrs[i].end = list[i].end;
|
9935 |
+
}
|
9936 |
}
|
9937 |
+
} else if (!el.pre) {
|
9938 |
+
// non root node in pre blocks with no attributes
|
9939 |
+
el.plain = true;
|
9940 |
}
|
9941 |
}
|
9942 |
|
9943 |
+
function processElement (
|
9944 |
+
element,
|
9945 |
+
options
|
9946 |
+
) {
|
9947 |
+
processKey(element);
|
9948 |
+
|
9949 |
+
// determine whether this is a plain element after
|
9950 |
+
// removing structural attributes
|
9951 |
+
element.plain = (
|
9952 |
+
!element.key &&
|
9953 |
+
!element.scopedSlots &&
|
9954 |
+
!element.attrsList.length
|
9955 |
+
);
|
9956 |
|
9957 |
+
processRef(element);
|
9958 |
+
processSlotContent(element);
|
9959 |
+
processSlotOutlet(element);
|
9960 |
+
processComponent(element);
|
9961 |
+
for (var i = 0; i < transforms.length; i++) {
|
9962 |
+
element = transforms[i](element, options) || element;
|
9963 |
+
}
|
9964 |
+
processAttrs(element);
|
9965 |
+
return element
|
9966 |
}
|
9967 |
|
9968 |
+
function processKey (el) {
|
9969 |
+
var exp = getBindingAttr(el, 'key');
|
9970 |
+
if (exp) {
|
9971 |
+
{
|
9972 |
+
if (el.tag === 'template') {
|
9973 |
+
warn$2(
|
9974 |
+
"<template> cannot be keyed. Place the key on real elements instead.",
|
9975 |
+
getRawBindingAttr(el, 'key')
|
9976 |
+
);
|
9977 |
+
}
|
9978 |
+
if (el.for) {
|
9979 |
+
var iterator = el.iterator2 || el.iterator1;
|
9980 |
+
var parent = el.parent;
|
9981 |
+
if (iterator && iterator === exp && parent && parent.tag === 'transition-group') {
|
9982 |
+
warn$2(
|
9983 |
+
"Do not use v-for index as key on <transition-group> children, " +
|
9984 |
+
"this is the same as not using keys.",
|
9985 |
+
getRawBindingAttr(el, 'key'),
|
9986 |
+
true /* tip */
|
9987 |
+
);
|
9988 |
+
}
|
9989 |
+
}
|
9990 |
}
|
9991 |
+
el.key = exp;
|
9992 |
}
|
9993 |
}
|
9994 |
|
9995 |
+
function processRef (el) {
|
9996 |
+
var ref = getBindingAttr(el, 'ref');
|
9997 |
+
if (ref) {
|
9998 |
+
el.ref = ref;
|
9999 |
+
el.refInFor = checkInFor(el);
|
|
|
|
|
|
|
|
|
|
|
|
|
10000 |
}
|
10001 |
+
}
|
10002 |
|
10003 |
+
function processFor (el) {
|
10004 |
+
var exp;
|
10005 |
+
if ((exp = getAndRemoveAttr(el, 'v-for'))) {
|
10006 |
+
var res = parseFor(exp);
|
10007 |
+
if (res) {
|
10008 |
+
extend(el, res);
|
10009 |
+
} else {
|
10010 |
+
warn$2(
|
10011 |
+
("Invalid v-for expression: " + exp),
|
10012 |
+
el.rawAttrsMap['v-for']
|
10013 |
+
);
|
10014 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10015 |
}
|
10016 |
}
|
10017 |
|
|
|
|
|
|
|
|
|
10018 |
|
|
|
|
|
|
|
10019 |
|
10020 |
+
function parseFor (exp) {
|
10021 |
+
var inMatch = exp.match(forAliasRE);
|
10022 |
+
if (!inMatch) { return }
|
10023 |
+
var res = {};
|
10024 |
+
res.for = inMatch[2].trim();
|
10025 |
+
var alias = inMatch[1].trim().replace(stripParensRE, '');
|
10026 |
+
var iteratorMatch = alias.match(forIteratorRE);
|
10027 |
+
if (iteratorMatch) {
|
10028 |
+
res.alias = alias.replace(forIteratorRE, '').trim();
|
10029 |
+
res.iterator1 = iteratorMatch[1].trim();
|
10030 |
+
if (iteratorMatch[2]) {
|
10031 |
+
res.iterator2 = iteratorMatch[2].trim();
|
10032 |
}
|
10033 |
} else {
|
10034 |
+
res.alias = alias;
|
|
|
10035 |
}
|
10036 |
+
return res
|
10037 |
+
}
|
10038 |
|
10039 |
+
function processIf (el) {
|
10040 |
+
var exp = getAndRemoveAttr(el, 'v-if');
|
10041 |
+
if (exp) {
|
10042 |
+
el.if = exp;
|
10043 |
+
addIfCondition(el, {
|
10044 |
+
exp: exp,
|
10045 |
+
block: el
|
10046 |
+
});
|
10047 |
+
} else {
|
10048 |
+
if (getAndRemoveAttr(el, 'v-else') != null) {
|
10049 |
+
el.else = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10050 |
}
|
10051 |
+
var elseif = getAndRemoveAttr(el, 'v-else-if');
|
10052 |
+
if (elseif) {
|
10053 |
+
el.elseif = elseif;
|
10054 |
}
|
10055 |
}
|
10056 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10057 |
|
10058 |
+
function processIfConditions (el, parent) {
|
10059 |
+
var prev = findPrevElement(parent.children);
|
10060 |
+
if (prev && prev.if) {
|
10061 |
+
addIfCondition(prev, {
|
10062 |
+
exp: el.elseif,
|
10063 |
+
block: el
|
10064 |
+
});
|
10065 |
+
} else {
|
10066 |
+
warn$2(
|
10067 |
+
"v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " +
|
10068 |
+
"used on element <" + (el.tag) + "> without corresponding v-if.",
|
10069 |
+
el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
|
10070 |
+
);
|
10071 |
+
}
|
10072 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10073 |
|
10074 |
+
function findPrevElement (children) {
|
10075 |
+
var i = children.length;
|
10076 |
+
while (i--) {
|
10077 |
+
if (children[i].type === 1) {
|
10078 |
+
return children[i]
|
10079 |
+
} else {
|
10080 |
+
if (children[i].text !== ' ') {
|
10081 |
+
warn$2(
|
10082 |
+
"text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " +
|
10083 |
+
"will be ignored.",
|
10084 |
+
children[i]
|
10085 |
+
);
|
10086 |
+
}
|
10087 |
+
children.pop();
|
10088 |
+
}
|
10089 |
}
|
10090 |
}
|
10091 |
|
10092 |
+
function addIfCondition (el, condition) {
|
10093 |
+
if (!el.ifConditions) {
|
10094 |
+
el.ifConditions = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10095 |
}
|
10096 |
+
el.ifConditions.push(condition);
|
10097 |
}
|
10098 |
|
10099 |
+
function processOnce (el) {
|
10100 |
+
var once$$1 = getAndRemoveAttr(el, 'v-once');
|
10101 |
+
if (once$$1 != null) {
|
10102 |
+
el.once = true;
|
10103 |
+
}
|
10104 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
10105 |
|
10106 |
+
// handle content being passed to a component as slot,
|
10107 |
+
// e.g. <template slot="xxx">, <div slot-scope="xxx">
|
10108 |
+
function processSlotContent (el) {
|
10109 |
+
var slotScope;
|
10110 |
+
if (el.tag === 'template') {
|
10111 |
+
slotScope = getAndRemoveAttr(el, 'scope');
|
10112 |
/* istanbul ignore if */
|
10113 |
+
if (slotScope) {
|
10114 |
+
warn$2(
|
10115 |
+
"the \"scope\" attribute for scoped slots have been deprecated and " +
|
10116 |
+
"replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " +
|
10117 |
+
"can also be used on plain elements in addition to <template> to " +
|
10118 |
+
"denote scoped slots.",
|
10119 |
+
el.rawAttrsMap['scope'],
|
10120 |
+
true
|
10121 |
+
);
|
10122 |
}
|
10123 |
+
el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope');
|
10124 |
+
} else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
|
10125 |
+
/* istanbul ignore if */
|
10126 |
+
if (el.attrsMap['v-for']) {
|
10127 |
+
warn$2(
|
10128 |
+
"Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " +
|
10129 |
+
"(v-for takes higher priority). Use a wrapper <template> for the " +
|
10130 |
+
"scoped slot to make it clearer.",
|
10131 |
+
el.rawAttrsMap['slot-scope'],
|
10132 |
+
true
|
10133 |
);
|
10134 |
}
|
10135 |
+
el.slotScope = slotScope;
|
10136 |
+
}
|
10137 |
|
10138 |
+
// slot="xxx"
|
10139 |
+
var slotTarget = getBindingAttr(el, 'slot');
|
10140 |
+
if (slotTarget) {
|
10141 |
+
el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
|
10142 |
+
el.slotTargetDynamic = !!(el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']);
|
10143 |
+
// preserve slot as an attribute for native shadow DOM compat
|
10144 |
+
// only for non-scoped slots.
|
10145 |
+
if (el.tag !== 'template' && !el.slotScope) {
|
10146 |
+
addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'));
|
10147 |
}
|
10148 |
+
}
|
10149 |
|
10150 |
+
// 2.6 v-slot syntax
|
10151 |
+
{
|
10152 |
+
if (el.tag === 'template') {
|
10153 |
+
// v-slot on <template>
|
10154 |
+
var slotBinding = getAndRemoveAttrByRegex(el, slotRE);
|
10155 |
+
if (slotBinding) {
|
10156 |
+
{
|
10157 |
+
if (el.slotTarget || el.slotScope) {
|
10158 |
+
warn$2(
|
10159 |
+
"Unexpected mixed usage of different slot syntaxes.",
|
10160 |
+
el
|
10161 |
+
);
|
10162 |
+
}
|
10163 |
+
if (el.parent && !maybeComponent(el.parent)) {
|
10164 |
+
warn$2(
|
10165 |
+
"<template v-slot> can only appear at the root level inside " +
|
10166 |
+
"the receiving component",
|
10167 |
+
el
|
10168 |
+
);
|
10169 |
+
}
|
10170 |
+
}
|
10171 |
+
var ref = getSlotName(slotBinding);
|
10172 |
+
var name = ref.name;
|
10173 |
+
var dynamic = ref.dynamic;
|
10174 |
+
el.slotTarget = name;
|
10175 |
+
el.slotTargetDynamic = dynamic;
|
10176 |
+
el.slotScope = slotBinding.value || emptySlotScopeToken; // force it into a scoped slot for perf
|
10177 |
+
}
|
10178 |
+
} else {
|
10179 |
+
// v-slot on component, denotes default slot
|
10180 |
+
var slotBinding$1 = getAndRemoveAttrByRegex(el, slotRE);
|
10181 |
+
if (slotBinding$1) {
|
10182 |
+
{
|
10183 |
+
if (!maybeComponent(el)) {
|
10184 |
+
warn$2(
|
10185 |
+
"v-slot can only be used on components or <template>.",
|
10186 |
+
slotBinding$1
|
10187 |
+
);
|
10188 |
+
}
|
10189 |
+
if (el.slotScope || el.slotTarget) {
|
10190 |
+
warn$2(
|
10191 |
+
"Unexpected mixed usage of different slot syntaxes.",
|
10192 |
+
el
|
10193 |
+
);
|
10194 |
+
}
|
10195 |
+
if (el.scopedSlots) {
|
10196 |
+
warn$2(
|
10197 |
+
"To avoid scope ambiguity, the default slot should also use " +
|
10198 |
+
"<template> syntax when there are other named slots.",
|
10199 |
+
slotBinding$1
|
10200 |
+
);
|
10201 |
+
}
|
10202 |
+
}
|
10203 |
+
// add the component's children to its default slot
|
10204 |
+
var slots = el.scopedSlots || (el.scopedSlots = {});
|
10205 |
+
var ref$1 = getSlotName(slotBinding$1);
|
10206 |
+
var name$1 = ref$1.name;
|
10207 |
+
var dynamic$1 = ref$1.dynamic;
|
10208 |
+
var slotContainer = slots[name$1] = createASTElement('template', [], el);
|
10209 |
+
slotContainer.slotTarget = name$1;
|
10210 |
+
slotContainer.slotTargetDynamic = dynamic$1;
|
10211 |
+
slotContainer.children = el.children.filter(function (c) {
|
10212 |
+
if (!c.slotScope) {
|
10213 |
+
c.parent = slotContainer;
|
10214 |
+
return true
|
10215 |
+
}
|
10216 |
+
});
|
10217 |
+
slotContainer.slotScope = slotBinding$1.value || emptySlotScopeToken;
|
10218 |
+
// remove children as they are returned from scopedSlots now
|
10219 |
+
el.children = [];
|
10220 |
+
// mark el non-plain so data gets generated
|
10221 |
+
el.plain = false;
|
10222 |
}
|
10223 |
}
|
10224 |
+
}
|
10225 |
+
}
|
10226 |
+
|
10227 |
+
function getSlotName (binding) {
|
10228 |
+
var name = binding.name.replace(slotRE, '');
|
10229 |
+
if (!name) {
|
10230 |
+
if (binding.name[0] !== '#') {
|
10231 |
+
name = 'default';
|
10232 |
+
} else {
|
10233 |
+
warn$2(
|
10234 |
+
"v-slot shorthand syntax requires a slot name.",
|
10235 |
+
binding
|
10236 |
+
);
|
10237 |
}
|
10238 |
+
}
|
10239 |
+
return dynamicArgRE.test(name)
|
10240 |
+
// dynamic [name]
|
10241 |
+
? { name: name.slice(1, -1), dynamic: true }
|
10242 |
+
// static name
|
10243 |
+
: { name: ("\"" + name + "\""), dynamic: false }
|
10244 |
+
}
|
10245 |
+
|
10246 |
+
// handle <slot/> outlets
|
10247 |
+
function processSlotOutlet (el) {
|
10248 |
+
if (el.tag === 'slot') {
|
10249 |
+
el.slotName = getBindingAttr(el, 'name');
|
10250 |
+
if (el.key) {
|
10251 |
+
warn$2(
|
10252 |
+
"`key` does not work on <slot> because slots are abstract outlets " +
|
10253 |
+
"and can possibly expand into multiple elements. " +
|
10254 |
+
"Use the key on a wrapping element instead.",
|
10255 |
+
getRawBindingAttr(el, 'key')
|
10256 |
+
);
|
10257 |
}
|
10258 |
+
}
|
10259 |
+
}
|
10260 |
|
10261 |
+
function processComponent (el) {
|
10262 |
+
var binding;
|
10263 |
+
if ((binding = getBindingAttr(el, 'is'))) {
|
10264 |
+
el.component = binding;
|
10265 |
+
}
|
10266 |
+
if (getAndRemoveAttr(el, 'inline-template') != null) {
|
10267 |
+
el.inlineTemplate = true;
|
10268 |
+
}
|
10269 |
+
}
|
10270 |
+
|
10271 |
+
function processAttrs (el) {
|
10272 |
+
var list = el.attrsList;
|
10273 |
+
var i, l, name, rawName, value, modifiers, syncGen, isDynamic;
|
10274 |
+
for (i = 0, l = list.length; i < l; i++) {
|
10275 |
+
name = rawName = list[i].name;
|
10276 |
+
value = list[i].value;
|
10277 |
+
if (dirRE.test(name)) {
|
10278 |
+
// mark element as dynamic
|
10279 |
+
el.hasBindings = true;
|
10280 |
+
// modifiers
|
10281 |
+
modifiers = parseModifiers(name.replace(dirRE, ''));
|
10282 |
+
// support .foo shorthand syntax for the .prop modifier
|
10283 |
+
if (modifiers) {
|
10284 |
+
name = name.replace(modifierRE, '');
|
10285 |
+
}
|
10286 |
+
if (bindRE.test(name)) { // v-bind
|
10287 |
+
name = name.replace(bindRE, '');
|
10288 |
+
value = parseFilters(value);
|
10289 |
+
isDynamic = dynamicArgRE.test(name);
|
10290 |
+
if (isDynamic) {
|
10291 |
+
name = name.slice(1, -1);
|
10292 |
+
}
|
10293 |
+
if (
|
10294 |
+
value.trim().length === 0
|
10295 |
+
) {
|
10296 |
+
warn$2(
|
10297 |
+
("The value for a v-bind expression cannot be empty. Found in \"v-bind:" + name + "\"")
|
10298 |
);
|
10299 |
}
|
10300 |
+
if (modifiers) {
|
10301 |
+
if (modifiers.prop && !isDynamic) {
|
10302 |
+
name = camelize(name);
|
10303 |
+
if (name === 'innerHtml') { name = 'innerHTML'; }
|
10304 |
+
}
|
10305 |
+
if (modifiers.camel && !isDynamic) {
|
10306 |
+
name = camelize(name);
|
10307 |
+
}
|
10308 |
+
if (modifiers.sync) {
|
10309 |
+
syncGen = genAssignmentCode(value, "$event");
|
10310 |
+
if (!isDynamic) {
|
10311 |
+
addHandler(
|
10312 |
+
el,
|
10313 |
+
("update:" + (camelize(name))),
|
10314 |
+
syncGen,
|
10315 |
+
null,
|
10316 |
+
false,
|
10317 |
+
warn$2,
|
10318 |
+
list[i]
|
10319 |
+
);
|
10320 |
+
if (hyphenate(name) !== camelize(name)) {
|
10321 |
+
addHandler(
|
10322 |
+
el,
|
10323 |
+
("update:" + (hyphenate(name))),
|
10324 |
+
syncGen,
|
10325 |
+
null,
|
10326 |
+
false,
|
10327 |
+
warn$2,
|
10328 |
+
list[i]
|
10329 |
+
);
|
10330 |
+
}
|
10331 |
+
} else {
|
10332 |
+
// handler w/ dynamic event name
|
10333 |
+
addHandler(
|
10334 |
+
el,
|
10335 |
+
("\"update:\"+(" + name + ")"),
|
10336 |
+
syncGen,
|
10337 |
+
null,
|
10338 |
+
false,
|
10339 |
+
warn$2,
|
10340 |
+
list[i],
|
10341 |
+
true // dynamic
|
10342 |
+
);
|
10343 |
+
}
|
10344 |
+
}
|
10345 |
+
}
|
10346 |
+
if ((modifiers && modifiers.prop) || (
|
10347 |
+
!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
|
10348 |
+
)) {
|
10349 |
+
addProp(el, name, value, list[i], isDynamic);
|
10350 |
+
} else {
|
10351 |
+
addAttr(el, name, value, list[i], isDynamic);
|
10352 |
+
}
|
10353 |
+
} else if (onRE.test(name)) { // v-on
|
10354 |
+
name = name.replace(onRE, '');
|
10355 |
+
isDynamic = dynamicArgRE.test(name);
|
10356 |
+
if (isDynamic) {
|
10357 |
+
name = name.slice(1, -1);
|
10358 |
+
}
|
10359 |
+
addHandler(el, name, value, modifiers, false, warn$2, list[i], isDynamic);
|
10360 |
+
} else { // normal directives
|
10361 |
+
name = name.replace(dirRE, '');
|
10362 |
+
// parse arg
|
10363 |
+
var argMatch = name.match(argRE);
|
10364 |
+
var arg = argMatch && argMatch[1];
|
10365 |
+
isDynamic = false;
|
10366 |
+
if (arg) {
|
10367 |
+
name = name.slice(0, -(arg.length + 1));
|
10368 |
+
if (dynamicArgRE.test(arg)) {
|
10369 |
+
arg = arg.slice(1, -1);
|
10370 |
+
isDynamic = true;
|
10371 |
+
}
|
10372 |
+
}
|
10373 |
+
addDirective(el, name, rawName, value, arg, isDynamic, modifiers, list[i]);
|
10374 |
+
if (name === 'model') {
|
10375 |
+
checkForAliasModel(el, value);
|
10376 |
+
}
|
10377 |
+
}
|
10378 |
+
} else {
|
10379 |
+
// literal attribute
|
10380 |
+
{
|
10381 |
+
var res = parseText(value, delimiters);
|
10382 |
+
if (res) {
|
10383 |
+
warn$2(
|
10384 |
+
name + "=\"" + value + "\": " +
|
10385 |
+
'Interpolation inside attributes has been removed. ' +
|
10386 |
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
10387 |
+
'instead of <div id="{{ val }}">, use <div :id="val">.',
|
10388 |
+
list[i]
|
10389 |
);
|
10390 |
}
|
10391 |
}
|
10392 |
+
addAttr(el, name, JSON.stringify(value), list[i]);
|
10393 |
+
// #6887 firefox doesn't update muted state if set via attribute
|
10394 |
+
// even immediately after element creation
|
10395 |
+
if (!el.component &&
|
10396 |
+
name === 'muted' &&
|
10397 |
+
platformMustUseProp(el.tag, el.attrsMap.type, name)) {
|
10398 |
+
addProp(el, name, 'true', list[i]);
|
10399 |
+
}
|
10400 |
}
|
10401 |
+
}
|
10402 |
+
}
|
10403 |
|
10404 |
+
function checkInFor (el) {
|
10405 |
+
var parent = el;
|
10406 |
+
while (parent) {
|
10407 |
+
if (parent.for !== undefined) {
|
10408 |
+
return true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10409 |
}
|
10410 |
+
parent = parent.parent;
|
10411 |
+
}
|
10412 |
+
return false
|
10413 |
+
}
|
10414 |
+
|
10415 |
+
function parseModifiers (name) {
|
10416 |
+
var match = name.match(modifierRE);
|
10417 |
+
if (match) {
|
10418 |
+
var ret = {};
|
10419 |
+
match.forEach(function (m) { ret[m.slice(1)] = true; });
|
10420 |
+
return ret
|
10421 |
+
}
|
10422 |
+
}
|
10423 |
+
|
10424 |
+
function makeAttrsMap (attrs) {
|
10425 |
+
var map = {};
|
10426 |
+
for (var i = 0, l = attrs.length; i < l; i++) {
|
10427 |
+
if (
|
10428 |
+
map[attrs[i].name] && !isIE && !isEdge
|
10429 |
+
) {
|
10430 |
+
warn$2('duplicate attribute: ' + attrs[i].name, attrs[i]);
|
10431 |
}
|
10432 |
+
map[attrs[i].name] = attrs[i].value;
|
10433 |
+
}
|
10434 |
+
return map
|
10435 |
+
}
|
10436 |
+
|
10437 |
+
// for script (e.g. type="x/template") or style, do not decode content
|
10438 |
+
function isTextTag (el) {
|
10439 |
+
return el.tag === 'script' || el.tag === 'style'
|
10440 |
+
}
|
10441 |
+
|
10442 |
+
function isForbiddenTag (el) {
|
10443 |
+
return (
|
10444 |
+
el.tag === 'style' ||
|
10445 |
+
(el.tag === 'script' && (
|
10446 |
+
!el.attrsMap.type ||
|
10447 |
+
el.attrsMap.type === 'text/javascript'
|
10448 |
+
))
|
10449 |
+
)
|
10450 |
+
}
|
10451 |
+
|
10452 |
+
var ieNSBug = /^xmlns:NS\d+/;
|
10453 |
+
var ieNSPrefix = /^NS\d+:/;
|
10454 |
+
|
10455 |
+
/* istanbul ignore next */
|
10456 |
+
function guardIESVGBug (attrs) {
|
10457 |
+
var res = [];
|
10458 |
+
for (var i = 0; i < attrs.length; i++) {
|
10459 |
+
var attr = attrs[i];
|
10460 |
+
if (!ieNSBug.test(attr.name)) {
|
10461 |
+
attr.name = attr.name.replace(ieNSPrefix, '');
|
10462 |
+
res.push(attr);
|
10463 |
}
|
10464 |
+
}
|
10465 |
+
return res
|
10466 |
+
}
|
10467 |
+
|
10468 |
+
function checkForAliasModel (el, value) {
|
10469 |
+
var _el = el;
|
10470 |
+
while (_el) {
|
10471 |
+
if (_el.for && _el.alias === value) {
|
10472 |
+
warn$2(
|
10473 |
+
"<" + (el.tag) + " v-model=\"" + value + "\">: " +
|
10474 |
+
"You are binding v-model directly to a v-for iteration alias. " +
|
10475 |
+
"This will not be able to modify the v-for source array because " +
|
10476 |
+
"writing to the alias is like modifying a function local variable. " +
|
10477 |
+
"Consider using an array of objects and use v-model on an object property instead.",
|
10478 |
+
el.rawAttrsMap['v-model']
|
10479 |
+
);
|
10480 |
+
}
|
10481 |
+
_el = _el.parent;
|
10482 |
+
}
|
10483 |
+
}
|
10484 |
|
10485 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10486 |
|
10487 |
+
function preTransformNode (el, options) {
|
10488 |
+
if (el.tag === 'input') {
|
10489 |
+
var map = el.attrsMap;
|
10490 |
+
if (!map['v-model']) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10491 |
return
|
10492 |
}
|
10493 |
+
|
10494 |
+
var typeBinding;
|
10495 |
+
if (map[':type'] || map['v-bind:type']) {
|
10496 |
+
typeBinding = getBindingAttr(el, 'type');
|
10497 |
+
}
|
10498 |
+
if (!map.type && !typeBinding && map['v-bind']) {
|
10499 |
+
typeBinding = "(" + (map['v-bind']) + ").type";
|
10500 |
+
}
|
10501 |
+
|
10502 |
+
if (typeBinding) {
|
10503 |
+
var ifCondition = getAndRemoveAttr(el, 'v-if', true);
|
10504 |
+
var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : "";
|
10505 |
+
var hasElse = getAndRemoveAttr(el, 'v-else', true) != null;
|
10506 |
+
var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true);
|
10507 |
+
// 1. checkbox
|
10508 |
+
var branch0 = cloneASTElement(el);
|
10509 |
+
// process for on the main node
|
10510 |
+
processFor(branch0);
|
10511 |
+
addRawAttr(branch0, 'type', 'checkbox');
|
10512 |
+
processElement(branch0, options);
|
10513 |
+
branch0.processed = true; // prevent it from double-processed
|
10514 |
+
branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra;
|
10515 |
+
addIfCondition(branch0, {
|
10516 |
+
exp: branch0.if,
|
10517 |
+
block: branch0
|
10518 |
+
});
|
10519 |
+
// 2. add radio else-if condition
|
10520 |
+
var branch1 = cloneASTElement(el);
|
10521 |
+
getAndRemoveAttr(branch1, 'v-for', true);
|
10522 |
+
addRawAttr(branch1, 'type', 'radio');
|
10523 |
+
processElement(branch1, options);
|
10524 |
+
addIfCondition(branch0, {
|
10525 |
+
exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra,
|
10526 |
+
block: branch1
|
10527 |
+
});
|
10528 |
+
// 3. other
|
10529 |
+
var branch2 = cloneASTElement(el);
|
10530 |
+
getAndRemoveAttr(branch2, 'v-for', true);
|
10531 |
+
addRawAttr(branch2, ':type', typeBinding);
|
10532 |
+
processElement(branch2, options);
|
10533 |
+
addIfCondition(branch0, {
|
10534 |
+
exp: ifCondition,
|
10535 |
+
block: branch2
|
10536 |
+
});
|
10537 |
+
|
10538 |
+
if (hasElse) {
|
10539 |
+
branch0.else = true;
|
10540 |
+
} else if (elseIfCondition) {
|
10541 |
+
branch0.elseif = elseIfCondition;
|
10542 |
}
|
10543 |
+
|
10544 |
+
return branch0
|
10545 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10546 |
}
|
|
|
|
|
|
|
10547 |
}
|
|
|
10548 |
|
10549 |
+
function cloneASTElement (el) {
|
10550 |
+
return createASTElement(el.tag, el.attrsList.slice(), el.parent)
|
10551 |
+
}
|
10552 |
|
10553 |
+
var model$1 = {
|
10554 |
+
preTransformNode: preTransformNode
|
10555 |
+
};
|
10556 |
|
10557 |
+
var modules$1 = [
|
10558 |
+
klass$1,
|
10559 |
+
style$1,
|
10560 |
+
model$1
|
10561 |
+
];
|
|
|
|
|
|
|
10562 |
|
10563 |
+
/* */
|
10564 |
+
|
10565 |
+
function text (el, dir) {
|
10566 |
+
if (dir.value) {
|
10567 |
+
addProp(el, 'textContent', ("_s(" + (dir.value) + ")"), dir);
|
10568 |
}
|
|
|
10569 |
}
|
|
|
10570 |
|
10571 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
10572 |
|
10573 |
+
function html (el, dir) {
|
10574 |
+
if (dir.value) {
|
10575 |
+
addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"), dir);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10576 |
}
|
10577 |
}
|
|
|
10578 |
|
10579 |
+
var directives$1 = {
|
10580 |
+
model: model,
|
10581 |
+
text: text,
|
10582 |
+
html: html
|
10583 |
+
};
|
10584 |
|
10585 |
+
/* */
|
10586 |
+
|
10587 |
+
var baseOptions = {
|
10588 |
+
expectHTML: true,
|
10589 |
+
modules: modules$1,
|
10590 |
+
directives: directives$1,
|
10591 |
+
isPreTag: isPreTag,
|
10592 |
+
isUnaryTag: isUnaryTag,
|
10593 |
+
mustUseProp: mustUseProp,
|
10594 |
+
canBeLeftOpenTag: canBeLeftOpenTag,
|
10595 |
+
isReservedTag: isReservedTag,
|
10596 |
+
getTagNamespace: getTagNamespace,
|
10597 |
+
staticKeys: genStaticKeys(modules$1)
|
10598 |
+
};
|
10599 |
|
10600 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10601 |
|
10602 |
+
var isStaticKey;
|
10603 |
+
var isPlatformReservedTag;
|
10604 |
+
|
10605 |
+
var genStaticKeysCached = cached(genStaticKeys$1);
|
10606 |
+
|
10607 |
+
/**
|
10608 |
+
* Goal of the optimizer: walk the generated template AST tree
|
10609 |
+
* and detect sub-trees that are purely static, i.e. parts of
|
10610 |
+
* the DOM that never needs to change.
|
10611 |
+
*
|
10612 |
+
* Once we detect these sub-trees, we can:
|
10613 |
+
*
|
10614 |
+
* 1. Hoist them into constants, so that we no longer need to
|
10615 |
+
* create fresh nodes for them on each re-render;
|
10616 |
+
* 2. Completely skip them in the patching process.
|
10617 |
+
*/
|
10618 |
+
function optimize (root, options) {
|
10619 |
+
if (!root) { return }
|
10620 |
+
isStaticKey = genStaticKeysCached(options.staticKeys || '');
|
10621 |
+
isPlatformReservedTag = options.isReservedTag || no;
|
10622 |
+
// first pass: mark all non-static nodes.
|
10623 |
+
markStatic$1(root);
|
10624 |
+
// second pass: mark static roots.
|
10625 |
+
markStaticRoots(root, false);
|
10626 |
+
}
|
10627 |
+
|
10628 |
+
function genStaticKeys$1 (keys) {
|
10629 |
+
return makeMap(
|
10630 |
+
'type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap' +
|
10631 |
+
(keys ? ',' + keys : '')
|
10632 |
+
)
|
10633 |
}
|
|
|
10634 |
|
10635 |
+
function markStatic$1 (node) {
|
10636 |
+
node.static = isStatic(node);
|
10637 |
+
if (node.type === 1) {
|
10638 |
+
// do not make component slot content static. this avoids
|
10639 |
+
// 1. components not able to mutate slot nodes
|
10640 |
+
// 2. static slot content fails for hot-reloading
|
10641 |
+
if (
|
10642 |
+
!isPlatformReservedTag(node.tag) &&
|
10643 |
+
node.tag !== 'slot' &&
|
10644 |
+
node.attrsMap['inline-template'] == null
|
10645 |
+
) {
|
10646 |
+
return
|
10647 |
+
}
|
10648 |
+
for (var i = 0, l = node.children.length; i < l; i++) {
|
10649 |
+
var child = node.children[i];
|
10650 |
+
markStatic$1(child);
|
10651 |
+
if (!child.static) {
|
10652 |
+
node.static = false;
|
10653 |
+
}
|
10654 |
+
}
|
10655 |
+
if (node.ifConditions) {
|
10656 |
+
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
|
10657 |
+
var block = node.ifConditions[i$1].block;
|
10658 |
+
markStatic$1(block);
|
10659 |
+
if (!block.static) {
|
10660 |
+
node.static = false;
|
10661 |
+
}
|
10662 |
+
}
|
10663 |
}
|
|
|
10664 |
}
|
10665 |
}
|
|
|
10666 |
|
10667 |
+
function markStaticRoots (node, isInFor) {
|
10668 |
+
if (node.type === 1) {
|
10669 |
+
if (node.static || node.once) {
|
10670 |
+
node.staticInFor = isInFor;
|
10671 |
+
}
|
10672 |
+
// For a node to qualify as a static root, it should have children that
|
10673 |
+
// are not just static text. Otherwise the cost of hoisting out will
|
10674 |
+
// outweigh the benefits and it's better off to just always render it fresh.
|
10675 |
+
if (node.static && node.children.length && !(
|
10676 |
+
node.children.length === 1 &&
|
10677 |
+
node.children[0].type === 3
|
10678 |
+
)) {
|
10679 |
+
node.staticRoot = true;
|
10680 |
+
return
|
10681 |
+
} else {
|
10682 |
+
node.staticRoot = false;
|
10683 |
+
}
|
10684 |
+
if (node.children) {
|
10685 |
+
for (var i = 0, l = node.children.length; i < l; i++) {
|
10686 |
+
markStaticRoots(node.children[i], isInFor || !!node.for);
|
10687 |
+
}
|
10688 |
+
}
|
10689 |
+
if (node.ifConditions) {
|
10690 |
+
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
|
10691 |
+
markStaticRoots(node.ifConditions[i$1].block, isInFor);
|
10692 |
+
}
|
10693 |
+
}
|
10694 |
+
}
|
10695 |
}
|
|
|
|
|
10696 |
|
10697 |
+
function isStatic (node) {
|
10698 |
+
if (node.type === 2) { // expression
|
10699 |
+
return false
|
10700 |
+
}
|
10701 |
+
if (node.type === 3) { // text
|
10702 |
+
return true
|
10703 |
+
}
|
10704 |
+
return !!(node.pre || (
|
10705 |
+
!node.hasBindings && // no dynamic bindings
|
10706 |
+
!node.if && !node.for && // not v-if or v-for or v-else
|
10707 |
+
!isBuiltInTag(node.tag) && // not a built-in
|
10708 |
+
isPlatformReservedTag(node.tag) && // not a component
|
10709 |
+
!isDirectChildOfTemplateFor(node) &&
|
10710 |
+
Object.keys(node).every(isStaticKey)
|
10711 |
+
))
|
10712 |
}
|
|
|
10713 |
|
10714 |
+
function isDirectChildOfTemplateFor (node) {
|
10715 |
+
while (node.parent) {
|
10716 |
+
node = node.parent;
|
10717 |
+
if (node.tag !== 'template') {
|
10718 |
+
return false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10719 |
}
|
10720 |
+
if (node.for) {
|
10721 |
+
return true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10722 |
}
|
|
|
10723 |
}
|
10724 |
+
return false
|
10725 |
+
}
|
10726 |
+
|
10727 |
+
/* */
|
10728 |
+
|
10729 |
+
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/;
|
10730 |
+
var fnInvokeRE = /\([^)]*?\);*$/;
|
10731 |
+
var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/;
|
10732 |
+
|
10733 |
+
// KeyboardEvent.keyCode aliases
|
10734 |
+
var keyCodes = {
|
10735 |
+
esc: 27,
|
10736 |
+
tab: 9,
|
10737 |
+
enter: 13,
|
10738 |
+
space: 32,
|
10739 |
+
up: 38,
|
10740 |
+
left: 37,
|
10741 |
+
right: 39,
|
10742 |
+
down: 40,
|
10743 |
+
'delete': [8, 46]
|
10744 |
+
};
|
10745 |
+
|
10746 |
+
// KeyboardEvent.key aliases
|
10747 |
+
var keyNames = {
|
10748 |
+
// #7880: IE11 and Edge use `Esc` for Escape key name.
|
10749 |
+
esc: ['Esc', 'Escape'],
|
10750 |
+
tab: 'Tab',
|
10751 |
+
enter: 'Enter',
|
10752 |
+
// #9112: IE11 uses `Spacebar` for Space key name.
|
10753 |
+
space: [' ', 'Spacebar'],
|
10754 |
+
// #7806: IE11 uses key names without `Arrow` prefix for arrow keys.
|
10755 |
+
up: ['Up', 'ArrowUp'],
|
10756 |
+
left: ['Left', 'ArrowLeft'],
|
10757 |
+
right: ['Right', 'ArrowRight'],
|
10758 |
+
down: ['Down', 'ArrowDown'],
|
10759 |
+
// #9112: IE11 uses `Del` for Delete key name.
|
10760 |
+
'delete': ['Backspace', 'Delete', 'Del']
|
10761 |
+
};
|
10762 |
+
|
10763 |
+
// #4868: modifiers that prevent the execution of the listener
|
10764 |
+
// need to explicitly return null so that we can determine whether to remove
|
10765 |
+
// the listener for .once
|
10766 |
+
var genGuard = function (condition) { return ("if(" + condition + ")return null;"); };
|
10767 |
+
|
10768 |
+
var modifierCode = {
|
10769 |
+
stop: '$event.stopPropagation();',
|
10770 |
+
prevent: '$event.preventDefault();',
|
10771 |
+
self: genGuard("$event.target !== $event.currentTarget"),
|
10772 |
+
ctrl: genGuard("!$event.ctrlKey"),
|
10773 |
+
shift: genGuard("!$event.shiftKey"),
|
10774 |
+
alt: genGuard("!$event.altKey"),
|
10775 |
+
meta: genGuard("!$event.metaKey"),
|
10776 |
+
left: genGuard("'button' in $event && $event.button !== 0"),
|
10777 |
+
middle: genGuard("'button' in $event && $event.button !== 1"),
|
10778 |
+
right: genGuard("'button' in $event && $event.button !== 2")
|
10779 |
+
};
|
10780 |
+
|
10781 |
+
function genHandlers (
|
10782 |
+
events,
|
10783 |
+
isNative
|
10784 |
+
) {
|
10785 |
+
var prefix = isNative ? 'nativeOn:' : 'on:';
|
10786 |
+
var staticHandlers = "";
|
10787 |
+
var dynamicHandlers = "";
|
10788 |
+
for (var name in events) {
|
10789 |
+
var handlerCode = genHandler(events[name]);
|
10790 |
+
if (events[name] && events[name].dynamic) {
|
10791 |
+
dynamicHandlers += name + "," + handlerCode + ",";
|
10792 |
+
} else {
|
10793 |
+
staticHandlers += "\"" + name + "\":" + handlerCode + ",";
|
10794 |
}
|
10795 |
}
|
10796 |
+
staticHandlers = "{" + (staticHandlers.slice(0, -1)) + "}";
|
10797 |
+
if (dynamicHandlers) {
|
10798 |
+
return prefix + "_d(" + staticHandlers + ",[" + (dynamicHandlers.slice(0, -1)) + "])"
|
10799 |
+
} else {
|
10800 |
+
return prefix + staticHandlers
|
10801 |
+
}
|
10802 |
}
|
|
|
10803 |
|
10804 |
+
function genHandler (handler) {
|
10805 |
+
if (!handler) {
|
10806 |
+
return 'function(){}'
|
10807 |
+
}
|
|
|
|
|
|
|
|
|
|
|
10808 |
|
10809 |
+
if (Array.isArray(handler)) {
|
10810 |
+
return ("[" + (handler.map(function (handler) { return genHandler(handler); }).join(',')) + "]")
|
10811 |
+
}
|
10812 |
+
|
10813 |
+
var isMethodPath = simplePathRE.test(handler.value);
|
10814 |
+
var isFunctionExpression = fnExpRE.test(handler.value);
|
10815 |
+
var isFunctionInvocation = simplePathRE.test(handler.value.replace(fnInvokeRE, ''));
|
10816 |
+
|
10817 |
+
if (!handler.modifiers) {
|
10818 |
+
if (isMethodPath || isFunctionExpression) {
|
10819 |
+
return handler.value
|
|
|
|
|
10820 |
}
|
10821 |
+
return ("function($event){" + (isFunctionInvocation ? ("return " + (handler.value)) : handler.value) + "}") // inline statement
|
10822 |
+
} else {
|
10823 |
+
var code = '';
|
10824 |
+
var genModifierCode = '';
|
10825 |
+
var keys = [];
|
10826 |
+
for (var key in handler.modifiers) {
|
10827 |
+
if (modifierCode[key]) {
|
10828 |
+
genModifierCode += modifierCode[key];
|
10829 |
+
// left/right
|
10830 |
+
if (keyCodes[key]) {
|
10831 |
+
keys.push(key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10832 |
}
|
10833 |
+
} else if (key === 'exact') {
|
10834 |
+
var modifiers = (handler.modifiers);
|
10835 |
+
genModifierCode += genGuard(
|
10836 |
+
['ctrl', 'shift', 'alt', 'meta']
|
10837 |
+
.filter(function (keyModifier) { return !modifiers[keyModifier]; })
|
10838 |
+
.map(function (keyModifier) { return ("$event." + keyModifier + "Key"); })
|
10839 |
+
.join('||')
|
10840 |
+
);
|
10841 |
} else {
|
10842 |
+
keys.push(key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10843 |
}
|
10844 |
}
|
10845 |
+
if (keys.length) {
|
10846 |
+
code += genKeyFilter(keys);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10847 |
}
|
10848 |
+
// Make sure modifiers like prevent and stop get executed after key filtering
|
10849 |
+
if (genModifierCode) {
|
10850 |
+
code += genModifierCode;
|
|
|
|
|
|
|
|
|
10851 |
}
|
10852 |
+
var handlerCode = isMethodPath
|
10853 |
+
? ("return " + (handler.value) + "($event)")
|
10854 |
+
: isFunctionExpression
|
10855 |
+
? ("return (" + (handler.value) + ")($event)")
|
10856 |
+
: isFunctionInvocation
|
10857 |
+
? ("return " + (handler.value))
|
10858 |
+
: handler.value;
|
10859 |
+
return ("function($event){" + code + handlerCode + "}")
|
10860 |
}
|
10861 |
}
|
|
|
10862 |
|
10863 |
+
function genKeyFilter (keys) {
|
10864 |
+
return (
|
10865 |
+
// make sure the key filters only apply to KeyboardEvents
|
10866 |
+
// #9441: can't use 'keyCode' in $event because Chrome autofill fires fake
|
10867 |
+
// key events that do not have keyCode property...
|
10868 |
+
"if(!$event.type.indexOf('key')&&" +
|
10869 |
+
(keys.map(genFilterCode).join('&&')) + ")return null;"
|
10870 |
+
)
|
10871 |
}
|
|
|
|
|
10872 |
|
10873 |
+
function genFilterCode (key) {
|
10874 |
+
var keyVal = parseInt(key, 10);
|
10875 |
+
if (keyVal) {
|
10876 |
+
return ("$event.keyCode!==" + keyVal)
|
10877 |
+
}
|
10878 |
+
var keyCode = keyCodes[key];
|
10879 |
+
var keyName = keyNames[key];
|
10880 |
+
return (
|
10881 |
+
"_k($event.keyCode," +
|
10882 |
+
(JSON.stringify(key)) + "," +
|
10883 |
+
(JSON.stringify(keyCode)) + "," +
|
10884 |
+
"$event.key," +
|
10885 |
+
"" + (JSON.stringify(keyName)) +
|
10886 |
+
")"
|
10887 |
+
)
|
10888 |
}
|
|
|
10889 |
|
10890 |
+
/* */
|
10891 |
+
|
10892 |
+
function on (el, dir) {
|
10893 |
+
if (dir.modifiers) {
|
10894 |
+
warn("v-on without argument does not support modifiers.");
|
|
|
|
|
|
|
10895 |
}
|
10896 |
+
el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
|
10897 |
}
|
|
|
|
|
10898 |
|
10899 |
+
/* */
|
|
|
|
|
|
|
10900 |
|
10901 |
+
function bind$1 (el, dir) {
|
10902 |
+
el.wrapData = function (code) {
|
10903 |
+
return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
|
10904 |
+
};
|
10905 |
+
}
|
|
|
|
|
|
|
|
|
10906 |
|
10907 |
+
/* */
|
|
|
10908 |
|
10909 |
+
var baseDirectives = {
|
10910 |
+
on: on,
|
10911 |
+
bind: bind$1,
|
10912 |
+
cloak: noop
|
10913 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10914 |
|
10915 |
+
/* */
|
10916 |
+
|
10917 |
+
|
10918 |
+
|
10919 |
+
|
10920 |
+
|
10921 |
+
var CodegenState = function CodegenState (options) {
|
10922 |
+
this.options = options;
|
10923 |
+
this.warn = options.warn || baseWarn;
|
10924 |
+
this.transforms = pluckModuleFunction(options.modules, 'transformCode');
|
10925 |
+
this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
|
10926 |
+
this.directives = extend(extend({}, baseDirectives), options.directives);
|
10927 |
+
var isReservedTag = options.isReservedTag || no;
|
10928 |
+
this.maybeComponent = function (el) { return !!el.component || !isReservedTag(el.tag); };
|
10929 |
+
this.onceId = 0;
|
10930 |
+
this.staticRenderFns = [];
|
10931 |
+
this.pre = false;
|
10932 |
+
};
|
10933 |
+
|
10934 |
+
|
10935 |
+
|
10936 |
+
function generate (
|
10937 |
+
ast,
|
10938 |
+
options
|
10939 |
+
) {
|
10940 |
+
var state = new CodegenState(options);
|
10941 |
+
var code = ast ? genElement(ast, state) : '_c("div")';
|
10942 |
+
return {
|
10943 |
+
render: ("with(this){return " + code + "}"),
|
10944 |
+
staticRenderFns: state.staticRenderFns
|
10945 |
}
|
|
|
10946 |
}
|
|
|
10947 |
|
10948 |
+
function genElement (el, state) {
|
10949 |
+
if (el.parent) {
|
10950 |
+
el.pre = el.pre || el.parent.pre;
|
10951 |
+
}
|
10952 |
|
10953 |
+
if (el.staticRoot && !el.staticProcessed) {
|
10954 |
+
return genStatic(el, state)
|
10955 |
+
} else if (el.once && !el.onceProcessed) {
|
10956 |
+
return genOnce(el, state)
|
10957 |
+
} else if (el.for && !el.forProcessed) {
|
10958 |
+
return genFor(el, state)
|
10959 |
+
} else if (el.if && !el.ifProcessed) {
|
10960 |
+
return genIf(el, state)
|
10961 |
+
} else if (el.tag === 'template' && !el.slotTarget && !state.pre) {
|
10962 |
+
return genChildren(el, state) || 'void 0'
|
10963 |
+
} else if (el.tag === 'slot') {
|
10964 |
+
return genSlot(el, state)
|
10965 |
+
} else {
|
10966 |
+
// component or element
|
10967 |
+
var code;
|
10968 |
+
if (el.component) {
|
10969 |
+
code = genComponent(el.component, el, state);
|
10970 |
+
} else {
|
10971 |
+
var data;
|
10972 |
+
if (!el.plain || (el.pre && state.maybeComponent(el))) {
|
10973 |
+
data = genData$2(el, state);
|
10974 |
+
}
|
10975 |
|
10976 |
+
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
10977 |
+
code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
|
10978 |
+
}
|
10979 |
+
// module transforms
|
10980 |
+
for (var i = 0; i < state.transforms.length; i++) {
|
10981 |
+
code = state.transforms[i](el, code);
|
10982 |
+
}
|
10983 |
+
return code
|
10984 |
}
|
10985 |
+
}
|
10986 |
|
10987 |
+
// hoist static sub-trees out
|
10988 |
+
function genStatic (el, state) {
|
10989 |
+
el.staticProcessed = true;
|
10990 |
+
// Some elements (templates) need to behave differently inside of a v-pre
|
10991 |
+
// node. All pre nodes are static roots, so we can use this as a location to
|
10992 |
+
// wrap a state change and reset it upon exiting the pre node.
|
10993 |
+
var originalPreState = state.pre;
|
10994 |
+
if (el.pre) {
|
10995 |
+
state.pre = el.pre;
|
10996 |
+
}
|
10997 |
+
state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
|
10998 |
+
state.pre = originalPreState;
|
10999 |
+
return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
|
11000 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11001 |
|
11002 |
+
// v-once
|
11003 |
+
function genOnce (el, state) {
|
11004 |
+
el.onceProcessed = true;
|
11005 |
+
if (el.if && !el.ifProcessed) {
|
11006 |
+
return genIf(el, state)
|
11007 |
+
} else if (el.staticInFor) {
|
11008 |
+
var key = '';
|
11009 |
+
var parent = el.parent;
|
11010 |
+
while (parent) {
|
11011 |
+
if (parent.for) {
|
11012 |
+
key = parent.key;
|
11013 |
+
break
|
11014 |
+
}
|
11015 |
+
parent = parent.parent;
|
11016 |
}
|
11017 |
+
if (!key) {
|
11018 |
+
state.warn(
|
11019 |
+
"v-once can only be used inside v-for that is keyed. ",
|
11020 |
+
el.rawAttrsMap['v-once']
|
11021 |
+
);
|
11022 |
+
return genElement(el, state)
|
11023 |
+
}
|
11024 |
+
return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
|
11025 |
+
} else {
|
11026 |
+
return genStatic(el, state)
|
11027 |
}
|
11028 |
}
|
|
|
11029 |
|
11030 |
+
function genIf (
|
11031 |
+
el,
|
11032 |
+
state,
|
11033 |
+
altGen,
|
11034 |
+
altEmpty
|
11035 |
+
) {
|
11036 |
+
el.ifProcessed = true; // avoid recursion
|
11037 |
+
return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
|
11038 |
+
}
|
11039 |
+
|
11040 |
+
function genIfConditions (
|
11041 |
+
conditions,
|
11042 |
+
state,
|
11043 |
+
altGen,
|
11044 |
+
altEmpty
|
11045 |
+
) {
|
11046 |
+
if (!conditions.length) {
|
11047 |
+
return altEmpty || '_e()'
|
11048 |
+
}
|
11049 |
|
11050 |
+
var condition = conditions.shift();
|
11051 |
+
if (condition.exp) {
|
11052 |
+
return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
|
11053 |
+
} else {
|
11054 |
+
return ("" + (genTernaryExp(condition.block)))
|
11055 |
+
}
|
11056 |
|
11057 |
+
// v-if with v-once should generate code like (a)?_m(0):_m(1)
|
11058 |
+
function genTernaryExp (el) {
|
11059 |
+
return altGen
|
11060 |
+
? altGen(el, state)
|
11061 |
+
: el.once
|
11062 |
+
? genOnce(el, state)
|
11063 |
+
: genElement(el, state)
|
11064 |
+
}
|
11065 |
+
}
|
11066 |
|
11067 |
+
function genFor (
|
11068 |
+
el,
|
11069 |
+
state,
|
11070 |
+
altGen,
|
11071 |
+
altHelper
|
11072 |
+
) {
|
11073 |
+
var exp = el.for;
|
11074 |
+
var alias = el.alias;
|
11075 |
+
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
|
11076 |
+
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
|
11077 |
+
|
11078 |
+
if (state.maybeComponent(el) &&
|
11079 |
+
el.tag !== 'slot' &&
|
11080 |
+
el.tag !== 'template' &&
|
11081 |
+
!el.key
|
11082 |
+
) {
|
11083 |
+
state.warn(
|
11084 |
+
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
|
11085 |
+
"v-for should have explicit keys. " +
|
11086 |
+
"See https://vuejs.org/guide/list.html#key for more info.",
|
11087 |
+
el.rawAttrsMap['v-for'],
|
11088 |
+
true /* tip */
|
11089 |
+
);
|
11090 |
+
}
|
11091 |
|
11092 |
+
el.forProcessed = true; // avoid recursion
|
11093 |
+
return (altHelper || '_l') + "((" + exp + ")," +
|
11094 |
+
"function(" + alias + iterator1 + iterator2 + "){" +
|
11095 |
+
"return " + ((altGen || genElement)(el, state)) +
|
11096 |
+
'})'
|
11097 |
}
|
|
|
11098 |
|
11099 |
+
function genData$2 (el, state) {
|
11100 |
+
var data = '{';
|
11101 |
|
11102 |
+
// directives first.
|
11103 |
+
// directives may mutate the el's other properties before they are generated.
|
11104 |
+
var dirs = genDirectives(el, state);
|
11105 |
+
if (dirs) { data += dirs + ','; }
|
11106 |
+
|
11107 |
+
// key
|
11108 |
+
if (el.key) {
|
11109 |
+
data += "key:" + (el.key) + ",";
|
11110 |
+
}
|
11111 |
+
// ref
|
11112 |
+
if (el.ref) {
|
11113 |
+
data += "ref:" + (el.ref) + ",";
|
11114 |
+
}
|
11115 |
+
if (el.refInFor) {
|
11116 |
+
data += "refInFor:true,";
|
11117 |
+
}
|
11118 |
+
// pre
|
11119 |
+
if (el.pre) {
|
11120 |
+
data += "pre:true,";
|
11121 |
+
}
|
11122 |
+
// record original tag name for components using "is" attribute
|
11123 |
+
if (el.component) {
|
11124 |
+
data += "tag:\"" + (el.tag) + "\",";
|
11125 |
+
}
|
11126 |
+
// module data generation functions
|
11127 |
+
for (var i = 0; i < state.dataGenFns.length; i++) {
|
11128 |
+
data += state.dataGenFns[i](el);
|
11129 |
+
}
|
11130 |
+
// attributes
|
11131 |
+
if (el.attrs) {
|
11132 |
+
data += "attrs:" + (genProps(el.attrs)) + ",";
|
11133 |
+
}
|
11134 |
+
// DOM props
|
11135 |
+
if (el.props) {
|
11136 |
+
data += "domProps:" + (genProps(el.props)) + ",";
|
11137 |
+
}
|
11138 |
+
// event handlers
|
11139 |
+
if (el.events) {
|
11140 |
+
data += (genHandlers(el.events, false)) + ",";
|
11141 |
+
}
|
11142 |
+
if (el.nativeEvents) {
|
11143 |
+
data += (genHandlers(el.nativeEvents, true)) + ",";
|
11144 |
+
}
|
11145 |
+
// slot target
|
11146 |
+
// only for non-scoped slots
|
11147 |
+
if (el.slotTarget && !el.slotScope) {
|
11148 |
+
data += "slot:" + (el.slotTarget) + ",";
|
11149 |
+
}
|
11150 |
+
// scoped slots
|
11151 |
+
if (el.scopedSlots) {
|
11152 |
+
data += (genScopedSlots(el, el.scopedSlots, state)) + ",";
|
11153 |
+
}
|
11154 |
+
// component v-model
|
11155 |
+
if (el.model) {
|
11156 |
+
data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},";
|
11157 |
+
}
|
11158 |
+
// inline-template
|
11159 |
+
if (el.inlineTemplate) {
|
11160 |
+
var inlineTemplate = genInlineTemplate(el, state);
|
11161 |
+
if (inlineTemplate) {
|
11162 |
+
data += inlineTemplate + ",";
|
11163 |
+
}
|
11164 |
+
}
|
11165 |
+
data = data.replace(/,$/, '') + '}';
|
11166 |
+
// v-bind dynamic argument wrap
|
11167 |
+
// v-bind with dynamic arguments must be applied using the same v-bind object
|
11168 |
+
// merge helper so that class/style/mustUseProp attrs are handled correctly.
|
11169 |
+
if (el.dynamicAttrs) {
|
11170 |
+
data = "_b(" + data + ",\"" + (el.tag) + "\"," + (genProps(el.dynamicAttrs)) + ")";
|
11171 |
+
}
|
11172 |
+
// v-bind data wrap
|
11173 |
+
if (el.wrapData) {
|
11174 |
+
data = el.wrapData(data);
|
11175 |
+
}
|
11176 |
+
// v-on data wrap
|
11177 |
+
if (el.wrapListeners) {
|
11178 |
+
data = el.wrapListeners(data);
|
11179 |
+
}
|
11180 |
+
return data
|
11181 |
}
|
|
|
11182 |
|
11183 |
+
function genDirectives (el, state) {
|
11184 |
+
var dirs = el.directives;
|
11185 |
+
if (!dirs) { return }
|
11186 |
+
var res = 'directives:[';
|
11187 |
+
var hasRuntime = false;
|
11188 |
+
var i, l, dir, needRuntime;
|
11189 |
+
for (i = 0, l = dirs.length; i < l; i++) {
|
11190 |
+
dir = dirs[i];
|
11191 |
+
needRuntime = true;
|
11192 |
+
var gen = state.directives[dir.name];
|
11193 |
+
if (gen) {
|
11194 |
+
// compile-time directive that manipulates AST.
|
11195 |
+
// returns true if it also needs a runtime counterpart.
|
11196 |
+
needRuntime = !!gen(el, dir, state.warn);
|
11197 |
+
}
|
11198 |
+
if (needRuntime) {
|
11199 |
+
hasRuntime = true;
|
11200 |
+
res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:" + (dir.isDynamicArg ? dir.arg : ("\"" + (dir.arg) + "\""))) : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
|
11201 |
+
}
|
11202 |
+
}
|
11203 |
+
if (hasRuntime) {
|
11204 |
+
return res.slice(0, -1) + ']'
|
11205 |
+
}
|
11206 |
+
}
|
11207 |
|
11208 |
+
function genInlineTemplate (el, state) {
|
11209 |
+
var ast = el.children[0];
|
11210 |
+
if (el.children.length !== 1 || ast.type !== 1) {
|
11211 |
+
state.warn(
|
11212 |
+
'Inline-template components must have exactly one child element.',
|
11213 |
+
{ start: el.start }
|
11214 |
+
);
|
11215 |
+
}
|
11216 |
+
if (ast && ast.type === 1) {
|
11217 |
+
var inlineRenderFns = generate(ast, state.options);
|
11218 |
+
return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
|
11219 |
+
}
|
11220 |
+
}
|
11221 |
|
11222 |
+
function genScopedSlots (
|
11223 |
+
el,
|
11224 |
+
slots,
|
11225 |
+
state
|
11226 |
+
) {
|
11227 |
+
// by default scoped slots are considered "stable", this allows child
|
11228 |
+
// components with only scoped slots to skip forced updates from parent.
|
11229 |
+
// but in some cases we have to bail-out of this optimization
|
11230 |
+
// for example if the slot contains dynamic names, has v-if or v-for on them...
|
11231 |
+
var needsForceUpdate = el.for || Object.keys(slots).some(function (key) {
|
11232 |
+
var slot = slots[key];
|
11233 |
+
return (
|
11234 |
+
slot.slotTargetDynamic ||
|
11235 |
+
slot.if ||
|
11236 |
+
slot.for ||
|
11237 |
+
containsSlotChild(slot) // is passing down slot from parent which may be dynamic
|
11238 |
+
)
|
11239 |
+
});
|
11240 |
|
11241 |
+
// #9534: if a component with scoped slots is inside a conditional branch,
|
11242 |
+
// it's possible for the same component to be reused but with different
|
11243 |
+
// compiled slot content. To avoid that, we generate a unique key based on
|
11244 |
+
// the generated code of all the slot contents.
|
11245 |
+
var needsKey = !!el.if;
|
11246 |
+
|
11247 |
+
// OR when it is inside another scoped slot or v-for (the reactivity may be
|
11248 |
+
// disconnected due to the intermediate scope variable)
|
11249 |
+
// #9438, #9506
|
11250 |
+
// TODO: this can be further optimized by properly analyzing in-scope bindings
|
11251 |
+
// and skip force updating ones that do not actually use scope variables.
|
11252 |
+
if (!needsForceUpdate) {
|
11253 |
+
var parent = el.parent;
|
11254 |
+
while (parent) {
|
11255 |
+
if (
|
11256 |
+
(parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
|
11257 |
+
parent.for
|
11258 |
+
) {
|
11259 |
+
needsForceUpdate = true;
|
11260 |
+
break
|
11261 |
+
}
|
11262 |
+
if (parent.if) {
|
11263 |
+
needsKey = true;
|
11264 |
+
}
|
11265 |
+
parent = parent.parent;
|
11266 |
+
}
|
11267 |
+
}
|
11268 |
|
11269 |
+
var generatedSlots = Object.keys(slots)
|
11270 |
+
.map(function (key) { return genScopedSlot(slots[key], state); })
|
11271 |
+
.join(',');
|
11272 |
|
11273 |
+
return ("scopedSlots:_u([" + generatedSlots + "]" + (needsForceUpdate ? ",null,true" : "") + (!needsForceUpdate && needsKey ? (",null,false," + (hash(generatedSlots))) : "") + ")")
|
11274 |
+
}
|
11275 |
|
11276 |
+
function hash(str) {
|
11277 |
+
var hash = 5381;
|
11278 |
+
var i = str.length;
|
11279 |
+
while(i) {
|
11280 |
+
hash = (hash * 33) ^ str.charCodeAt(--i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11281 |
}
|
11282 |
+
return hash >>> 0
|
11283 |
+
}
|
11284 |
+
|
11285 |
+
function containsSlotChild (el) {
|
11286 |
+
if (el.type === 1) {
|
11287 |
+
if (el.tag === 'slot') {
|
11288 |
+
return true
|
11289 |
}
|
11290 |
+
return el.children.some(containsSlotChild)
|
11291 |
}
|
11292 |
+
return false
|
11293 |
+
}
|
11294 |
+
|
11295 |
+
function genScopedSlot (
|
11296 |
+
el,
|
11297 |
+
state
|
11298 |
+
) {
|
11299 |
+
var isLegacySyntax = el.attrsMap['slot-scope'];
|
11300 |
+
if (el.if && !el.ifProcessed && !isLegacySyntax) {
|
11301 |
+
return genIf(el, state, genScopedSlot, "null")
|
11302 |
+
}
|
11303 |
+
if (el.for && !el.forProcessed) {
|
11304 |
+
return genFor(el, state, genScopedSlot)
|
11305 |
+
}
|
11306 |
+
var slotScope = el.slotScope === emptySlotScopeToken
|
11307 |
+
? ""
|
11308 |
+
: String(el.slotScope);
|
11309 |
+
var fn = "function(" + slotScope + "){" +
|
11310 |
+
"return " + (el.tag === 'template'
|
11311 |
+
? el.if && isLegacySyntax
|
11312 |
+
? ("(" + (el.if) + ")?" + (genChildren(el, state) || 'undefined') + ":undefined")
|
11313 |
+
: genChildren(el, state) || 'undefined'
|
11314 |
+
: genElement(el, state)) + "}";
|
11315 |
+
// reverse proxy v-slot without scope on this.$slots
|
11316 |
+
var reverseProxy = slotScope ? "" : ",proxy:true";
|
11317 |
+
return ("{key:" + (el.slotTarget || "\"default\"") + ",fn:" + fn + reverseProxy + "}")
|
11318 |
+
}
|
11319 |
+
|
11320 |
+
function genChildren (
|
11321 |
+
el,
|
11322 |
+
state,
|
11323 |
+
checkSkip,
|
11324 |
+
altGenElement,
|
11325 |
+
altGenNode
|
11326 |
+
) {
|
11327 |
+
var children = el.children;
|
11328 |
+
if (children.length) {
|
11329 |
+
var el$1 = children[0];
|
11330 |
+
// optimize single v-for
|
11331 |
+
if (children.length === 1 &&
|
11332 |
+
el$1.for &&
|
11333 |
+
el$1.tag !== 'template' &&
|
11334 |
+
el$1.tag !== 'slot'
|
11335 |
+
) {
|
11336 |
+
var normalizationType = checkSkip
|
11337 |
+
? state.maybeComponent(el$1) ? ",1" : ",0"
|
11338 |
+
: "";
|
11339 |
+
return ("" + ((altGenElement || genElement)(el$1, state)) + normalizationType)
|
11340 |
}
|
11341 |
+
var normalizationType$1 = checkSkip
|
11342 |
+
? getNormalizationType(children, state.maybeComponent)
|
11343 |
+
: 0;
|
11344 |
+
var gen = altGenNode || genNode;
|
11345 |
+
return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType$1 ? ("," + normalizationType$1) : ''))
|
11346 |
}
|
11347 |
}
|
|
|
11348 |
|
11349 |
+
// determine the normalization needed for the children array.
|
11350 |
+
// 0: no normalization needed
|
11351 |
+
// 1: simple normalization needed (possible 1-level deep nested array)
|
11352 |
+
// 2: full normalization needed
|
11353 |
+
function getNormalizationType (
|
11354 |
+
children,
|
11355 |
+
maybeComponent
|
11356 |
+
) {
|
11357 |
+
var res = 0;
|
11358 |
+
for (var i = 0; i < children.length; i++) {
|
11359 |
+
var el = children[i];
|
11360 |
+
if (el.type !== 1) {
|
11361 |
+
continue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11362 |
}
|
11363 |
+
if (needsNormalization(el) ||
|
11364 |
+
(el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {
|
11365 |
+
res = 2;
|
11366 |
+
break
|
11367 |
+
}
|
11368 |
+
if (maybeComponent(el) ||
|
11369 |
+
(el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) {
|
11370 |
+
res = 1;
|
11371 |
}
|
11372 |
}
|
11373 |
+
return res
|
11374 |
}
|
|
|
11375 |
|
11376 |
+
function needsNormalization (el) {
|
11377 |
+
return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11378 |
}
|
11379 |
+
|
11380 |
+
function genNode (node, state) {
|
11381 |
+
if (node.type === 1) {
|
11382 |
+
return genElement(node, state)
|
11383 |
+
} else if (node.type === 3 && node.isComment) {
|
11384 |
+
return genComment(node)
|
11385 |
+
} else {
|
11386 |
+
return genText(node)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11387 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11388 |
}
|
|
|
|
|
|
|
|
|
|
|
11389 |
|
11390 |
+
function genText (text) {
|
11391 |
+
return ("_v(" + (text.type === 2
|
11392 |
+
? text.expression // no need for () because already wrapped in _s()
|
11393 |
+
: transformSpecialNewlines(JSON.stringify(text.text))) + ")")
|
11394 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11395 |
|
11396 |
+
function genComment (comment) {
|
11397 |
+
return ("_e(" + (JSON.stringify(comment.text)) + ")")
|
|
|
|
|
|
|
11398 |
}
|
|
|
|
|
11399 |
|
11400 |
+
function genSlot (el, state) {
|
11401 |
+
var slotName = el.slotName || '"default"';
|
11402 |
+
var children = genChildren(el, state);
|
11403 |
+
var res = "_t(" + slotName + (children ? ("," + children) : '');
|
11404 |
+
var attrs = el.attrs || el.dynamicAttrs
|
11405 |
+
? genProps((el.attrs || []).concat(el.dynamicAttrs || []).map(function (attr) { return ({
|
11406 |
+
// slot props are camelized
|
11407 |
+
name: camelize(attr.name),
|
11408 |
+
value: attr.value,
|
11409 |
+
dynamic: attr.dynamic
|
11410 |
+
}); }))
|
11411 |
+
: null;
|
11412 |
+
var bind$$1 = el.attrsMap['v-bind'];
|
11413 |
+
if ((attrs || bind$$1) && !children) {
|
11414 |
+
res += ",null";
|
11415 |
+
}
|
11416 |
+
if (attrs) {
|
11417 |
+
res += "," + attrs;
|
11418 |
+
}
|
11419 |
+
if (bind$$1) {
|
11420 |
+
res += (attrs ? '' : ',null') + "," + bind$$1;
|
11421 |
+
}
|
11422 |
+
return res + ')'
|
11423 |
+
}
|
11424 |
|
11425 |
+
// componentName is el.component, take it as argument to shun flow's pessimistic refinement
|
11426 |
+
function genComponent (
|
11427 |
+
componentName,
|
11428 |
+
el,
|
11429 |
+
state
|
11430 |
+
) {
|
11431 |
+
var children = el.inlineTemplate ? null : genChildren(el, state, true);
|
11432 |
+
return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
|
11433 |
+
}
|
11434 |
+
|
11435 |
+
function genProps (props) {
|
11436 |
+
var staticProps = "";
|
11437 |
+
var dynamicProps = "";
|
11438 |
+
for (var i = 0; i < props.length; i++) {
|
11439 |
+
var prop = props[i];
|
11440 |
+
var value = transformSpecialNewlines(prop.value);
|
11441 |
+
if (prop.dynamic) {
|
11442 |
+
dynamicProps += (prop.name) + "," + value + ",";
|
11443 |
+
} else {
|
11444 |
+
staticProps += "\"" + (prop.name) + "\":" + value + ",";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11445 |
}
|
|
|
11446 |
}
|
11447 |
+
staticProps = "{" + (staticProps.slice(0, -1)) + "}";
|
11448 |
+
if (dynamicProps) {
|
11449 |
+
return ("_d(" + staticProps + ",[" + (dynamicProps.slice(0, -1)) + "])")
|
11450 |
+
} else {
|
11451 |
+
return staticProps
|
11452 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11453 |
}
|
11454 |
|
11455 |
+
// #3895, #4268
|
11456 |
+
function transformSpecialNewlines (text) {
|
11457 |
+
return text
|
11458 |
+
.replace(/\u2028/g, '\\u2028')
|
11459 |
+
.replace(/\u2029/g, '\\u2029')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11460 |
}
|
|
|
|
|
11461 |
|
11462 |
+
/* */
|
11463 |
+
|
|
|
|
|
|
|
|
|
11464 |
|
|
|
11465 |
|
11466 |
+
// these keywords should not appear inside expressions, but operators like
|
11467 |
+
// typeof, instanceof and in are allowed
|
11468 |
+
var prohibitedKeywordRE = new RegExp('\\b' + (
|
11469 |
+
'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
|
11470 |
+
'super,throw,while,yield,delete,export,import,return,switch,default,' +
|
11471 |
+
'extends,finally,continue,debugger,function,arguments'
|
11472 |
+
).split(',').join('\\b|\\b') + '\\b');
|
11473 |
|
11474 |
+
// these unary operators should not be used as property/method names
|
11475 |
+
var unaryOperatorsRE = new RegExp('\\b' + (
|
11476 |
+
'delete,typeof,void'
|
11477 |
+
).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)');
|
11478 |
|
11479 |
+
// strip strings in expressions
|
11480 |
+
var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
|
11481 |
|
11482 |
+
// detect problematic expressions in a template
|
11483 |
+
function detectErrors (ast, warn) {
|
11484 |
+
if (ast) {
|
11485 |
+
checkNode(ast, warn);
|
11486 |
+
}
|
11487 |
}
|
|
|
|
|
11488 |
|
11489 |
+
function checkNode (node, warn) {
|
11490 |
+
if (node.type === 1) {
|
11491 |
+
for (var name in node.attrsMap) {
|
11492 |
+
if (dirRE.test(name)) {
|
11493 |
+
var value = node.attrsMap[name];
|
11494 |
+
if (value) {
|
11495 |
+
var range = node.rawAttrsMap[name];
|
11496 |
+
if (name === 'v-for') {
|
11497 |
+
checkFor(node, ("v-for=\"" + value + "\""), warn, range);
|
11498 |
+
} else if (name === 'v-slot' || name[0] === '#') {
|
11499 |
+
checkFunctionParameterExpression(value, (name + "=\"" + value + "\""), warn, range);
|
11500 |
+
} else if (onRE.test(name)) {
|
11501 |
+
checkEvent(value, (name + "=\"" + value + "\""), warn, range);
|
11502 |
+
} else {
|
11503 |
+
checkExpression(value, (name + "=\"" + value + "\""), warn, range);
|
11504 |
+
}
|
11505 |
}
|
11506 |
}
|
11507 |
}
|
11508 |
+
if (node.children) {
|
11509 |
+
for (var i = 0; i < node.children.length; i++) {
|
11510 |
+
checkNode(node.children[i], warn);
|
11511 |
+
}
|
11512 |
}
|
11513 |
+
} else if (node.type === 2) {
|
11514 |
+
checkExpression(node.expression, node.text, warn, node);
|
11515 |
}
|
|
|
|
|
11516 |
}
|
|
|
11517 |
|
11518 |
+
function checkEvent (exp, text, warn, range) {
|
11519 |
+
var stripped = exp.replace(stripStringRE, '');
|
11520 |
+
var keywordMatch = stripped.match(unaryOperatorsRE);
|
11521 |
+
if (keywordMatch && stripped.charAt(keywordMatch.index - 1) !== '$') {
|
11522 |
+
warn(
|
11523 |
+
"avoid using JavaScript unary operator as property name: " +
|
11524 |
+
"\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()),
|
11525 |
+
range
|
11526 |
+
);
|
11527 |
+
}
|
11528 |
+
checkExpression(exp, text, warn, range);
|
11529 |
}
|
11530 |
+
|
11531 |
+
function checkFor (node, text, warn, range) {
|
11532 |
+
checkExpression(node.for || '', text, warn, range);
|
11533 |
+
checkIdentifier(node.alias, 'v-for alias', text, warn, range);
|
11534 |
+
checkIdentifier(node.iterator1, 'v-for iterator', text, warn, range);
|
11535 |
+
checkIdentifier(node.iterator2, 'v-for iterator', text, warn, range);
|
11536 |
+
}
|
11537 |
+
|
11538 |
+
function checkIdentifier (
|
11539 |
+
ident,
|
11540 |
+
type,
|
11541 |
+
text,
|
11542 |
+
warn,
|
11543 |
+
range
|
11544 |
+
) {
|
11545 |
+
if (typeof ident === 'string') {
|
11546 |
+
try {
|
11547 |
+
new Function(("var " + ident + "=_"));
|
11548 |
+
} catch (e) {
|
11549 |
+
warn(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim())), range);
|
11550 |
+
}
|
11551 |
+
}
|
11552 |
+
}
|
11553 |
+
|
11554 |
+
function checkExpression (exp, text, warn, range) {
|
11555 |
try {
|
11556 |
+
new Function(("return " + exp));
|
11557 |
} catch (e) {
|
11558 |
+
var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);
|
11559 |
+
if (keywordMatch) {
|
11560 |
+
warn(
|
11561 |
+
"avoid using JavaScript keyword as property name: " +
|
11562 |
+
"\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()),
|
11563 |
+
range
|
11564 |
+
);
|
11565 |
+
} else {
|
11566 |
+
warn(
|
11567 |
+
"invalid expression: " + (e.message) + " in\n\n" +
|
11568 |
+
" " + exp + "\n\n" +
|
11569 |
+
" Raw expression: " + (text.trim()) + "\n",
|
11570 |
+
range
|
11571 |
+
);
|
11572 |
+
}
|
11573 |
}
|
11574 |
}
|
|
|
11575 |
|
11576 |
+
function checkFunctionParameterExpression (exp, text, warn, range) {
|
11577 |
+
try {
|
11578 |
+
new Function(exp, '');
|
11579 |
+
} catch (e) {
|
11580 |
+
warn(
|
11581 |
+
"invalid function parameter expression: " + (e.message) + " in\n\n" +
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11582 |
" " + exp + "\n\n" +
|
11583 |
+
" Raw expression: " + (text.trim()) + "\n",
|
11584 |
+
range
|
11585 |
);
|
11586 |
}
|
11587 |
}
|
|
|
|
|
|
|
11588 |
|
11589 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11590 |
|
11591 |
+
var range = 2;
|
|
|
11592 |
|
11593 |
+
function generateCodeFrame (
|
11594 |
+
source,
|
11595 |
+
start,
|
11596 |
+
end
|
11597 |
) {
|
11598 |
+
if ( start === void 0 ) start = 0;
|
11599 |
+
if ( end === void 0 ) end = source.length;
|
|
|
11600 |
|
11601 |
+
var lines = source.split(/\r?\n/);
|
11602 |
+
var count = 0;
|
11603 |
+
var res = [];
|
11604 |
+
for (var i = 0; i < lines.length; i++) {
|
11605 |
+
count += lines[i].length + 1;
|
11606 |
+
if (count >= start) {
|
11607 |
+
for (var j = i - range; j <= i + range || end > count; j++) {
|
11608 |
+
if (j < 0 || j >= lines.length) { continue }
|
11609 |
+
res.push(("" + (j + 1) + (repeat$1(" ", 3 - String(j + 1).length)) + "| " + (lines[j])));
|
11610 |
+
var lineLength = lines[j].length;
|
11611 |
+
if (j === i) {
|
11612 |
+
// push underline
|
11613 |
+
var pad = start - (count - lineLength) + 1;
|
11614 |
+
var length = end > count ? lineLength - pad : end - start;
|
11615 |
+
res.push(" | " + repeat$1(" ", pad) + repeat$1("^", length));
|
11616 |
+
} else if (j > i) {
|
11617 |
+
if (end > count) {
|
11618 |
+
var length$1 = Math.min(end - count, lineLength);
|
11619 |
+
res.push(" | " + repeat$1("^", length$1));
|
11620 |
+
}
|
11621 |
+
count += lineLength + 1;
|
11622 |
+
}
|
11623 |
}
|
11624 |
+
break
|
11625 |
}
|
11626 |
}
|
11627 |
+
return res.join('\n')
|
11628 |
+
}
|
11629 |
|
11630 |
+
function repeat$1 (str, n) {
|
11631 |
+
var result = '';
|
11632 |
+
if (n > 0) {
|
11633 |
+
while (true) { // eslint-disable-line
|
11634 |
+
if (n & 1) { result += str; }
|
11635 |
+
n >>>= 1;
|
11636 |
+
if (n <= 0) { break }
|
11637 |
+
str += str;
|
11638 |
+
}
|
11639 |
}
|
11640 |
+
return result
|
11641 |
+
}
|
11642 |
|
11643 |
+
/* */
|
|
|
11644 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11646 |
|
11647 |
+
function createFunction (code, errors) {
|
11648 |
+
try {
|
11649 |
+
return new Function(code)
|
11650 |
+
} catch (err) {
|
11651 |
+
errors.push({ err: err, code: code });
|
11652 |
+
return noop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11653 |
}
|
|
|
|
|
11654 |
}
|
|
|
11655 |
|
11656 |
+
function createCompileToFunctionFn (compile) {
|
11657 |
+
var cache = Object.create(null);
|
11658 |
|
11659 |
+
return function compileToFunctions (
|
|
|
|
|
11660 |
template,
|
11661 |
+
options,
|
11662 |
+
vm
|
11663 |
) {
|
11664 |
+
options = extend({}, options);
|
11665 |
+
var warn$$1 = options.warn || warn;
|
11666 |
+
delete options.warn;
|
|
|
|
|
|
|
11667 |
|
11668 |
+
/* istanbul ignore if */
|
11669 |
+
{
|
11670 |
+
// detect possible CSP restriction
|
11671 |
+
try {
|
11672 |
+
new Function('return 1');
|
11673 |
+
} catch (e) {
|
11674 |
+
if (e.toString().match(/unsafe-eval|CSP/)) {
|
11675 |
+
warn$$1(
|
11676 |
+
'It seems you are using the standalone build of Vue.js in an ' +
|
11677 |
+
'environment with Content Security Policy that prohibits unsafe-eval. ' +
|
11678 |
+
'The template compiler cannot work in this environment. Consider ' +
|
11679 |
+
'relaxing the policy to allow unsafe-eval or pre-compiling your ' +
|
11680 |
+
'templates into render functions.'
|
11681 |
+
);
|
11682 |
+
}
|
11683 |
+
}
|
11684 |
+
}
|
11685 |
+
|
11686 |
+
// check cache
|
11687 |
+
var key = options.delimiters
|
11688 |
+
? String(options.delimiters) + template
|
11689 |
+
: template;
|
11690 |
+
if (cache[key]) {
|
11691 |
+
return cache[key]
|
11692 |
+
}
|
11693 |
+
|
11694 |
+
// compile
|
11695 |
+
var compiled = compile(template, options);
|
11696 |
+
|
11697 |
+
// check compilation errors/tips
|
11698 |
+
{
|
11699 |
+
if (compiled.errors && compiled.errors.length) {
|
11700 |
+
if (options.outputSourceRange) {
|
11701 |
+
compiled.errors.forEach(function (e) {
|
11702 |
+
warn$$1(
|
11703 |
+
"Error compiling template:\n\n" + (e.msg) + "\n\n" +
|
11704 |
+
generateCodeFrame(template, e.start, e.end),
|
11705 |
+
vm
|
11706 |
+
);
|
11707 |
+
});
|
11708 |
+
} else {
|
11709 |
+
warn$$1(
|
11710 |
+
"Error compiling template:\n\n" + template + "\n\n" +
|
11711 |
+
compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n',
|
11712 |
+
vm
|
11713 |
+
);
|
11714 |
+
}
|
11715 |
}
|
11716 |
+
if (compiled.tips && compiled.tips.length) {
|
11717 |
+
if (options.outputSourceRange) {
|
11718 |
+
compiled.tips.forEach(function (e) { return tip(e.msg, vm); });
|
11719 |
+
} else {
|
11720 |
+
compiled.tips.forEach(function (msg) { return tip(msg, vm); });
|
11721 |
}
|
11722 |
}
|
11723 |
}
|
11724 |
|
11725 |
+
// turn code into functions
|
11726 |
+
var res = {};
|
11727 |
+
var fnGenErrors = [];
|
11728 |
+
res.render = createFunction(compiled.render, fnGenErrors);
|
11729 |
+
res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
|
11730 |
+
return createFunction(code, fnGenErrors)
|
11731 |
+
});
|
11732 |
+
|
11733 |
+
// check function generation errors.
|
11734 |
+
// this should only happen if there is a bug in the compiler itself.
|
11735 |
+
// mostly for codegen development use
|
11736 |
+
/* istanbul ignore if */
|
11737 |
{
|
11738 |
+
if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) {
|
11739 |
+
warn$$1(
|
11740 |
+
"Failed to generate render function:\n\n" +
|
11741 |
+
fnGenErrors.map(function (ref) {
|
11742 |
+
var err = ref.err;
|
11743 |
+
var code = ref.code;
|
11744 |
+
|
11745 |
+
return ((err.toString()) + " in\n\n" + code + "\n");
|
11746 |
+
}).join('\n'),
|
11747 |
+
vm
|
11748 |
+
);
|
11749 |
+
}
|
11750 |
}
|
|
|
|
|
|
|
|
|
11751 |
|
11752 |
+
return (cache[key] = res)
|
|
|
|
|
11753 |
}
|
11754 |
}
|
|
|
11755 |
|
11756 |
+
/* */
|
11757 |
|
11758 |
+
function createCompilerCreator (baseCompile) {
|
11759 |
+
return function createCompiler (baseOptions) {
|
11760 |
+
function compile (
|
11761 |
+
template,
|
11762 |
+
options
|
11763 |
+
) {
|
11764 |
+
var finalOptions = Object.create(baseOptions);
|
11765 |
+
var errors = [];
|
11766 |
+
var tips = [];
|
11767 |
+
|
11768 |
+
var warn = function (msg, range, tip) {
|
11769 |
+
(tip ? tips : errors).push(msg);
|
11770 |
+
};
|
11771 |
+
|
11772 |
+
if (options) {
|
11773 |
+
if (options.outputSourceRange) {
|
11774 |
+
// $flow-disable-line
|
11775 |
+
var leadingSpaceLength = template.match(/^\s*/)[0].length;
|
11776 |
+
|
11777 |
+
warn = function (msg, range, tip) {
|
11778 |
+
var data = { msg: msg };
|
11779 |
+
if (range) {
|
11780 |
+
if (range.start != null) {
|
11781 |
+
data.start = range.start + leadingSpaceLength;
|
11782 |
+
}
|
11783 |
+
if (range.end != null) {
|
11784 |
+
data.end = range.end + leadingSpaceLength;
|
11785 |
+
}
|
11786 |
+
}
|
11787 |
+
(tip ? tips : errors).push(data);
|
11788 |
+
};
|
11789 |
+
}
|
11790 |
+
// merge custom modules
|
11791 |
+
if (options.modules) {
|
11792 |
+
finalOptions.modules =
|
11793 |
+
(baseOptions.modules || []).concat(options.modules);
|
11794 |
+
}
|
11795 |
+
// merge custom directives
|
11796 |
+
if (options.directives) {
|
11797 |
+
finalOptions.directives = extend(
|
11798 |
+
Object.create(baseOptions.directives || null),
|
11799 |
+
options.directives
|
11800 |
+
);
|
11801 |
+
}
|
11802 |
+
// copy other options
|
11803 |
+
for (var key in options) {
|
11804 |
+
if (key !== 'modules' && key !== 'directives') {
|
11805 |
+
finalOptions[key] = options[key];
|
11806 |
+
}
|
11807 |
+
}
|
11808 |
+
}
|
11809 |
|
11810 |
+
finalOptions.warn = warn;
|
11811 |
|
11812 |
+
var compiled = baseCompile(template.trim(), finalOptions);
|
11813 |
+
{
|
11814 |
+
detectErrors(compiled.ast, warn);
|
11815 |
+
}
|
11816 |
+
compiled.errors = errors;
|
11817 |
+
compiled.tips = tips;
|
11818 |
+
return compiled
|
11819 |
+
}
|
11820 |
|
11821 |
+
return {
|
11822 |
+
compile: compile,
|
11823 |
+
compileToFunctions: createCompileToFunctionFn(compile)
|
11824 |
+
}
|
11825 |
+
}
|
11826 |
+
}
|
11827 |
|
11828 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
|
|
11829 |
|
11830 |
+
// `createCompilerCreator` allows creating compilers that use alternative
|
11831 |
+
// parser/optimizer/codegen, e.g the SSR optimizing compiler.
|
11832 |
+
// Here we just export a default compiler using the default parts.
|
11833 |
+
var createCompiler = createCompilerCreator(function baseCompile (
|
11834 |
+
template,
|
11835 |
+
options
|
11836 |
+
) {
|
11837 |
+
var ast = parse(template.trim(), options);
|
11838 |
+
if (options.optimize !== false) {
|
11839 |
+
optimize(ast, options);
|
11840 |
+
}
|
11841 |
+
var code = generate(ast, options);
|
11842 |
+
return {
|
11843 |
+
ast: ast,
|
11844 |
+
render: code.render,
|
11845 |
+
staticRenderFns: code.staticRenderFns
|
11846 |
+
}
|
11847 |
+
});
|
11848 |
|
11849 |
+
/* */
|
11850 |
|
11851 |
+
var ref$1 = createCompiler(baseOptions);
|
11852 |
+
var compile = ref$1.compile;
|
11853 |
+
var compileToFunctions = ref$1.compileToFunctions;
|
|
|
11854 |
|
11855 |
+
/* */
|
|
|
|
|
|
|
|
|
|
|
11856 |
|
11857 |
+
// check whether current browser encodes a char inside attribute values
|
11858 |
+
var div;
|
11859 |
+
function getShouldDecode (href) {
|
11860 |
+
div = div || document.createElement('div');
|
11861 |
+
div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>";
|
11862 |
+
return div.innerHTML.indexOf(' ') > 0
|
11863 |
}
|
11864 |
|
11865 |
+
// #3663: IE encodes newlines inside attribute values while other browsers don't
|
11866 |
+
var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false;
|
11867 |
+
// #6828: chrome encodes content in a[href]
|
11868 |
+
var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;
|
11869 |
+
|
11870 |
+
/* */
|
11871 |
+
|
11872 |
+
var idToTemplate = cached(function (id) {
|
11873 |
+
var el = query(id);
|
11874 |
+
return el && el.innerHTML
|
11875 |
+
});
|
11876 |
+
|
11877 |
+
var mount = Vue.prototype.$mount;
|
11878 |
+
Vue.prototype.$mount = function (
|
11879 |
+
el,
|
11880 |
+
hydrating
|
11881 |
+
) {
|
11882 |
+
el = el && query(el);
|
11883 |
+
|
11884 |
+
/* istanbul ignore if */
|
11885 |
+
if (el === document.body || el === document.documentElement) {
|
11886 |
+
warn(
|
11887 |
+
"Do not mount Vue to <html> or <body> - mount to normal elements instead."
|
11888 |
+
);
|
11889 |
+
return this
|
11890 |
+
}
|
11891 |
+
|
11892 |
+
var options = this.$options;
|
11893 |
+
// resolve template/el and convert to render function
|
11894 |
+
if (!options.render) {
|
11895 |
+
var template = options.template;
|
11896 |
+
if (template) {
|
11897 |
+
if (typeof template === 'string') {
|
11898 |
+
if (template.charAt(0) === '#') {
|
11899 |
+
template = idToTemplate(template);
|
11900 |
+
/* istanbul ignore if */
|
11901 |
+
if (!template) {
|
11902 |
+
warn(
|
11903 |
+
("Template element not found or is empty: " + (options.template)),
|
11904 |
+
this
|
11905 |
+
);
|
11906 |
+
}
|
11907 |
}
|
11908 |
+
} else if (template.nodeType) {
|
11909 |
+
template = template.innerHTML;
|
11910 |
+
} else {
|
11911 |
+
{
|
11912 |
+
warn('invalid template option:' + template, this);
|
11913 |
+
}
|
11914 |
+
return this
|
11915 |
}
|
11916 |
+
} else if (el) {
|
11917 |
+
template = getOuterHTML(el);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11918 |
}
|
11919 |
+
if (template) {
|
11920 |
+
/* istanbul ignore if */
|
11921 |
+
if (config.performance && mark) {
|
11922 |
+
mark('compile');
|
11923 |
+
}
|
11924 |
|
11925 |
+
var ref = compileToFunctions(template, {
|
11926 |
+
outputSourceRange: "development" !== 'production',
|
11927 |
+
shouldDecodeNewlines: shouldDecodeNewlines,
|
11928 |
+
shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,
|
11929 |
+
delimiters: options.delimiters,
|
11930 |
+
comments: options.comments
|
11931 |
+
}, this);
|
11932 |
+
var render = ref.render;
|
11933 |
+
var staticRenderFns = ref.staticRenderFns;
|
11934 |
+
options.render = render;
|
11935 |
+
options.staticRenderFns = staticRenderFns;
|
11936 |
|
11937 |
+
/* istanbul ignore if */
|
11938 |
+
if (config.performance && mark) {
|
11939 |
+
mark('compile end');
|
11940 |
+
measure(("vue " + (this._name) + " compile"), 'compile', 'compile end');
|
11941 |
+
}
|
11942 |
}
|
11943 |
}
|
11944 |
+
return mount.call(this, el, hydrating)
|
11945 |
+
};
|
|
|
11946 |
|
11947 |
+
/**
|
11948 |
+
* Get outerHTML of elements, taking care
|
11949 |
+
* of SVG elements in IE as well.
|
11950 |
+
*/
|
11951 |
+
function getOuterHTML (el) {
|
11952 |
+
if (el.outerHTML) {
|
11953 |
+
return el.outerHTML
|
11954 |
+
} else {
|
11955 |
+
var container = document.createElement('div');
|
11956 |
+
container.appendChild(el.cloneNode(true));
|
11957 |
+
return container.innerHTML
|
11958 |
+
}
|
11959 |
}
|
|
|
11960 |
|
11961 |
+
Vue.compile = compileToFunctions;
|
11962 |
|
11963 |
+
return Vue;
|
11964 |
|
11965 |
+
}));
|
admin/assets/js/solo/vue/vue.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
-
* Vue.js v2.
|
3 |
-
* (c) 2014-
|
4 |
* Released under the MIT License.
|
5 |
*/
|
6 |
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";var y=Object.freeze({});function M(e){return null==e}function D(e){return null!=e}function S(e){return!0===e}function T(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var r=Object.prototype.toString;function l(e){return"[object Object]"===r.call(e)}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function t(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function F(e){var t=parseFloat(e);return isNaN(t)?e:t}function s(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var c=s("slot,component",!0),u=s("key,ref,slot,slot-scope,is");function f(e,t){if(e.length){var n=e.indexOf(t);if(-1<n)return e.splice(n,1)}}var n=Object.prototype.hasOwnProperty;function p(e,t){return n.call(e,t)}function e(t){var n=Object.create(null);return function(e){return n[e]||(n[e]=t(e))}}var o=/-(\w)/g,g=e(function(e){return e.replace(o,function(e,t){return t?t.toUpperCase():""})}),d=e(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),a=/\B([A-Z])/g,_=e(function(e){return e.replace(a,"-$1").toLowerCase()});var v=Function.prototype.bind?function(e,t){return e.bind(t)}:function(n,r){function e(e){var t=arguments.length;return t?1<t?n.apply(r,arguments):n.call(r,e):n.call(r)}return e._length=n.length,e};function h(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function m(e,t){for(var n in t)e[n]=t[n];return e}function b(e){for(var t={},n=0;n<e.length;n++)e[n]&&m(t,e[n]);return t}function $(e,t,n){}var O=function(e,t,n){return!1},w=function(e){return e};function C(t,n){if(t===n)return!0;var e=P(t),r=P(n);if(!e||!r)return!e&&!r&&String(t)===String(n);try{var i=Array.isArray(t),o=Array.isArray(n);if(i&&o)return t.length===n.length&&t.every(function(e,t){return C(e,n[t])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.every(function(e){return C(t[e],n[e])})}catch(e){return!1}}function x(e,t){for(var n=0;n<e.length;n++)if(C(e[n],t))return n;return-1}function R(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var E="data-server-rendered",k=["component","directive","filter"],A=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],j={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:O,isReservedAttr:O,isUnknownElement:O,getTagNamespace:$,parsePlatformTagName:w,mustUseProp:O,_lifecycleHooks:A};function N(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var L=/[^\w.$]/;var I,H="__proto__"in{},B="undefined"!=typeof window,U="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,V=U&&WXEnvironment.platform.toLowerCase(),z=B&&window.navigator.userAgent.toLowerCase(),K=z&&/msie|trident/.test(z),J=z&&0<z.indexOf("msie 9.0"),q=z&&0<z.indexOf("edge/"),W=(z&&z.indexOf("android"),z&&/iphone|ipad|ipod|ios/.test(z)||"ios"===V),G=(z&&/chrome\/\d+/.test(z),{}.watch),Z=!1;if(B)try{var X={};Object.defineProperty(X,"passive",{get:function(){Z=!0}}),window.addEventListener("test-passive",null,X)}catch(e){}var Y=function(){return void 0===I&&(I=!B&&!U&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),I},Q=B&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ee(e){return"function"==typeof e&&/native code/.test(e.toString())}var te,ne="undefined"!=typeof Symbol&&ee(Symbol)&&"undefined"!=typeof Reflect&&ee(Reflect.ownKeys);te="undefined"!=typeof Set&&ee(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var re=$,ie=0,oe=function(){this.id=ie++,this.subs=[]};oe.prototype.addSub=function(e){this.subs.push(e)},oe.prototype.removeSub=function(e){f(this.subs,e)},oe.prototype.depend=function(){oe.target&&oe.target.addDep(this)},oe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},oe.target=null;var ae=[];function se(e){oe.target&&ae.push(oe.target),oe.target=e}function ce(){oe.target=ae.pop()}var le=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},ue={child:{configurable:!0}};ue.child.get=function(){return this.componentInstance},Object.defineProperties(le.prototype,ue);var fe=function(e){void 0===e&&(e="");var t=new le;return t.text=e,t.isComment=!0,t};function pe(e){return new le(void 0,void 0,void 0,String(e))}function de(e){var t=new le(e.tag,e.data,e.children,e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.isCloned=!0,t}var ve=Array.prototype,he=Object.create(ve);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(o){var a=ve[o];N(he,o,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=a.apply(this,e),i=this.__ob__;switch(o){case"push":case"unshift":n=e;break;case"splice":n=e.slice(2)}return n&&i.observeArray(n),i.dep.notify(),r})});var me=Object.getOwnPropertyNames(he),ye=!0;function ge(e){ye=e}var _e=function(e){(this.value=e,this.dep=new oe,this.vmCount=0,N(e,"__ob__",this),Array.isArray(e))?((H?be:$e)(e,he,me),this.observeArray(e)):this.walk(e)};function be(e,t,n){e.__proto__=t}function $e(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];N(e,o,t[o])}}function we(e,t){var n;if(P(e)&&!(e instanceof le))return p(e,"__ob__")&&e.__ob__ instanceof _e?n=e.__ob__:ye&&!Y()&&(Array.isArray(e)||l(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new _e(e)),t&&n&&n.vmCount++,n}function Ce(n,e,r,t,i){var o=new oe,a=Object.getOwnPropertyDescriptor(n,e);if(!a||!1!==a.configurable){var s=a&&a.get;s||2!==arguments.length||(r=n[e]);var c=a&&a.set,l=!i&&we(r);Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(n):r;return oe.target&&(o.depend(),l&&(l.dep.depend(),Array.isArray(e)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(e))),e},set:function(e){var t=s?s.call(n):r;e===t||e!=e&&t!=t||(c?c.call(n,e):r=e,l=!i&&we(e),o.notify())}})}}function xe(e,t,n){if(Array.isArray(e)&&i(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(Ce(r.value,t,n),r.dep.notify(),n):e[t]=n}function ke(e,t){if(Array.isArray(e)&&i(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||p(e,t)&&(delete e[t],n&&n.dep.notify())}}_e.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Ce(e,t[n])},_e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)we(e[t])};var Ae=j.optionMergeStrategies;function Oe(e,t){if(!t)return e;for(var n,r,i,o=Object.keys(t),a=0;a<o.length;a++)r=e[n=o[a]],i=t[n],p(e,n)?l(r)&&l(i)&&Oe(r,i):xe(e,n,i);return e}function Se(n,r,i){return i?function(){var e="function"==typeof r?r.call(i,i):r,t="function"==typeof n?n.call(i,i):n;return e?Oe(e,t):t}:r?n?function(){return Oe("function"==typeof r?r.call(this,this):r,"function"==typeof n?n.call(this,this):n)}:r:n}function Te(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function Ee(e,t,n,r){var i=Object.create(e||null);return t?m(i,t):i}Ae.data=function(e,t,n){return n?Se(e,t,n):t&&"function"!=typeof t?e:Se(e,t)},A.forEach(function(e){Ae[e]=Te}),k.forEach(function(e){Ae[e+"s"]=Ee}),Ae.watch=function(e,t,n,r){if(e===G&&(e=void 0),t===G&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in m(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ae.props=Ae.methods=Ae.inject=Ae.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return m(i,e),t&&m(i,t),i},Ae.provide=Se;var je=function(e,t){return void 0===t?e:t};function Ne(n,r,i){"function"==typeof r&&(r=r.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[g(i)]={type:null});else if(l(n))for(var a in n)i=n[a],o[g(a)]=l(i)?i:{type:i};e.props=o}}(r),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(l(n))for(var o in n){var a=n[o];r[o]=l(a)?m({from:o},a):{from:a}}}}(r),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(r);var e=r.extends;if(e&&(n=Ne(n,e,i)),r.mixins)for(var t=0,o=r.mixins.length;t<o;t++)n=Ne(n,r.mixins[t],i);var a,s={};for(a in n)c(a);for(a in r)p(n,a)||c(a);function c(e){var t=Ae[e]||je;s[e]=t(n[e],r[e],i,e)}return s}function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(p(i,n))return i[n];var o=g(n);if(p(i,o))return i[o];var a=d(o);return p(i,a)?i[a]:i[n]||i[o]||i[a]}}function Ie(e,t,n,r){var i=t[e],o=!p(n,e),a=n[e],s=Pe(Boolean,i.type);if(-1<s)if(o&&!p(i,"default"))a=!1;else if(""===a||a===_(e)){var c=Pe(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!p(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Me(t.type)?r.call(e):r}(r,i,e);var l=ye;ge(!0),we(a),ge(l)}return a}function Me(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function De(e,t){return Me(e)===Me(t)}function Pe(e,t){if(!Array.isArray(t))return De(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(De(t[n],e))return n;return-1}function Fe(e,t,n){if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Re(e,r,"errorCaptured hook")}}Re(e,t,n)}function Re(e,t,n){if(j.errorHandler)try{return j.errorHandler.call(null,e,t,n)}catch(e){He(e,null,"config.errorHandler")}He(e,t,n)}function He(e,t,n){if(!B&&!U||"undefined"==typeof console)throw e;console.error(e)}var Be,Ue,Ve=[],ze=!1;function Ke(){ze=!1;for(var e=Ve.slice(0),t=Ve.length=0;t<e.length;t++)e[t]()}var Je=!1;if("undefined"!=typeof setImmediate&&ee(setImmediate))Ue=function(){setImmediate(Ke)};else if("undefined"==typeof MessageChannel||!ee(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())Ue=function(){setTimeout(Ke,0)};else{var qe=new MessageChannel,We=qe.port2;qe.port1.onmessage=Ke,Ue=function(){We.postMessage(1)}}if("undefined"!=typeof Promise&&ee(Promise)){var Ge=Promise.resolve();Be=function(){Ge.then(Ke),W&&setTimeout($)}}else Be=Ue;function Ze(e,t){var n;if(Ve.push(function(){if(e)try{e.call(t)}catch(e){Fe(e,t,"nextTick")}else n&&n(t)}),ze||(ze=!0,Je?Ue():Be()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var Xe=new te;function Ye(e){!function e(t,n){var r,i;var o=Array.isArray(t);if(!o&&!P(t)||Object.isFrozen(t)||t instanceof le)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(o)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,Xe),Xe.clear()}var Qe,et=e(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function tt(e){function i(){var e=arguments,t=i.fns;if(!Array.isArray(t))return t.apply(null,arguments);for(var n=t.slice(),r=0;r<n.length;r++)n[r].apply(null,e)}return i.fns=e,i}function nt(e,t,n,r,i){var o,a,s,c;for(o in e)a=e[o],s=t[o],c=et(o),M(a)||(M(s)?(M(a.fns)&&(a=e[o]=tt(a)),n(c.name,a,c.once,c.capture,c.passive,c.params)):a!==s&&(s.fns=a,e[o]=s));for(o in t)M(e[o])&&r((c=et(o)).name,t[o],c.capture)}function rt(e,t,n){var r;e instanceof le&&(e=e.data.hook||(e.data.hook={}));var i=e[t];function o(){n.apply(this,arguments),f(r.fns,o)}M(i)?r=tt([o]):D(i.fns)&&S(i.merged)?(r=i).fns.push(o):r=tt([i,o]),r.merged=!0,e[t]=r}function it(e,t,n,r,i){if(D(t)){if(p(t,n))return e[n]=t[n],i||delete t[n],!0;if(p(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function ot(e){return T(e)?[pe(e)]:Array.isArray(e)?function e(t,n){var r=[];var i,o,a,s;for(i=0;i<t.length;i++)M(o=t[i])||"boolean"==typeof o||(a=r.length-1,s=r[a],Array.isArray(o)?0<o.length&&(at((o=e(o,(n||"")+"_"+i))[0])&&at(s)&&(r[a]=pe(s.text+o[0].text),o.shift()),r.push.apply(r,o)):T(o)?at(s)?r[a]=pe(s.text+o):""!==o&&r.push(pe(o)):at(o)&&at(s)?r[a]=pe(s.text+o.text):(S(t._isVList)&&D(o.tag)&&M(o.key)&&D(n)&&(o.key="__vlist"+n+"_"+i+"__"),r.push(o)));return r}(e):void 0}function at(e){return D(e)&&D(e.text)&&!1===e.isComment}function st(e,t){return(e.__esModule||ne&&"Module"===e[Symbol.toStringTag])&&(e=e.default),P(e)?t.extend(e):e}function ct(e){return e.isComment&&e.asyncFactory}function lt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(D(n)&&(D(n.componentOptions)||ct(n)))return n}}function ut(e,t,n){n?Qe.$once(e,t):Qe.$on(e,t)}function ft(e,t){Qe.$off(e,t)}function pt(e,t,n){Qe=e,nt(t,n||{},ut,ft),Qe=void 0}function dt(e,t){var n={};if(!e)return n;for(var r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var l in n)n[l].every(vt)&&delete n[l];return n}function vt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function ht(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?ht(e[n],t):t[e[n].key]=e[n].fn;return t}var mt=null;function yt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function gt(e,t){if(t){if(e._directInactive=!1,yt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)gt(e.$children[n]);_t(e,"activated")}}function _t(t,n){se();var e=t.$options[n];if(e)for(var r=0,i=e.length;r<i;r++)try{e[r].call(t)}catch(e){Fe(e,t,n+" hook")}t._hasHookEvent&&t.$emit("hook:"+n),ce()}var bt=[],$t=[],wt={},Ct=!1,xt=!1,kt=0;function At(){var e,t;for(xt=!0,bt.sort(function(e,t){return e.id-t.id}),kt=0;kt<bt.length;kt++)t=(e=bt[kt]).id,wt[t]=null,e.run();var n=$t.slice(),r=bt.slice();kt=bt.length=$t.length=0,wt={},Ct=xt=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,gt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&_t(r,"updated")}}(r),Q&&j.devtools&&Q.emit("flush")}var Ot=0,St=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Ot,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new te,this.newDepIds=new te,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!L.test(e)){var n=e.split(".");return function(e){for(var t=0;t<n.length;t++){if(!e)return;e=e[n[t]]}return e}}}(t),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};St.prototype.get=function(){var e;se(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Fe(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&Ye(e),ce(),this.cleanupDeps()}return e},St.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},St.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},St.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==wt[t]){if(wt[t]=!0,xt){for(var n=bt.length-1;kt<n&&bt[n].id>e.id;)n--;bt.splice(n+1,0,e)}else bt.push(e);Ct||(Ct=!0,Ze(At))}}(this)},St.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||P(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Fe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},St.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},St.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},St.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||f(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Tt={enumerable:!0,configurable:!0,get:$,set:$};function Et(e,t,n){Tt.get=function(){return this[t][n]},Tt.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Tt)}function jt(e){e._watchers=[];var t=e.$options;t.props&&function(n,r){var i=n.$options.propsData||{},o=n._props={},a=n.$options._propKeys=[];n.$parent&&ge(!1);var e=function(e){a.push(e);var t=Ie(e,r,i,n);Ce(o,e,t),e in n||Et(n,"_props",e)};for(var t in r)e(t);ge(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]=null==t[n]?$:v(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;l(t=e._data="function"==typeof t?function(e,t){se();try{return e.call(t,t)}catch(e){return Fe(e,t,"data()"),{}}finally{ce()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&p(r,o)||(void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&Et(e,"_data",o))}var a;we(t,!0)}(e):we(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Y();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new St(e,a||$,$,Nt)),i in e||Lt(e,i,o)}}(e,t.computed),t.watch&&t.watch!==G&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Mt(e,n,r[i]);else Mt(e,n,r)}}(e,t.watch)}var Nt={lazy:!0};function Lt(e,t,n){var r=!Y();"function"==typeof n?(Tt.get=r?It(t):n,Tt.set=$):(Tt.get=n.get?r&&!1!==n.cache?It(t):n.get:$,Tt.set=n.set?n.set:$),Object.defineProperty(e,t,Tt)}function It(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),oe.target&&e.depend(),e.value}}function Mt(e,t,n,r){return l(n)&&(n=(r=n).handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Dt(t,e){if(t){for(var n=Object.create(null),r=ne?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),i=0;i<r.length;i++){for(var o=r[i],a=t[o].from,s=e;s;){if(s._provided&&p(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var c=t[o].default;n[o]="function"==typeof c?c.call(e):c}}return n}}function Pt(e,t){var n,r,i,o,a;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(P(e))for(o=Object.keys(e),n=new Array(o.length),r=0,i=o.length;r<i;r++)a=o[r],n[r]=t(e[a],a,r);return D(n)&&(n._isVList=!0),n}function Ft(e,t,n,r){var i,o=this.$scopedSlots[e];if(o)n=n||{},r&&(n=m(m({},r),n)),i=o(n)||t;else{var a=this.$slots[e];a&&(a._rendered=!0),i=a||t}var s=n&&n.slot;return s?this.$createElement("template",{slot:s},i):i}function Rt(e){return Le(this.$options,"filters",e)||w}function Ht(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Bt(e,t,n,r,i){var o=j.keyCodes[t]||n;return i&&r&&!j.keyCodes[t]?Ht(i,r):o?Ht(o,e):r?_(r)!==t:void 0}function Ut(n,r,i,o,a){if(i)if(P(i)){var s;Array.isArray(i)&&(i=b(i));var e=function(t){if("class"===t||"style"===t||u(t))s=n;else{var e=n.attrs&&n.attrs.type;s=o||j.mustUseProp(r,e,t)?n.domProps||(n.domProps={}):n.attrs||(n.attrs={})}t in s||(s[t]=i[t],a&&((n.on||(n.on={}))["update:"+t]=function(e){i[t]=e}))};for(var t in i)e(t)}else;return n}function Vt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Kt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function zt(e,t,n){return Kt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Kt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Jt(e[r],t+"_"+r,n);else Jt(e,t,n)}function Jt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function qt(e,t){if(t)if(l(t)){var n=e.on=e.on?m({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Wt(e){e._o=zt,e._n=F,e._s=t,e._l=Pt,e._t=Ft,e._q=C,e._i=x,e._m=Vt,e._f=Rt,e._k=Bt,e._b=Ut,e._v=pe,e._e=fe,e._u=ht,e._g=qt}function Gt(e,t,n,o,r){var a,s=r.options;p(o,"_uid")?(a=Object.create(o))._original=o:o=(a=o)._original;var i=S(s._compiled),c=!i;this.data=e,this.props=t,this.children=n,this.parent=o,this.listeners=e.on||y,this.injections=Dt(s.inject,o),this.slots=function(){return dt(n,o)},i&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=e.scopedSlots||y),s._scopeId?this._c=function(e,t,n,r){var i=rn(a,e,t,n,r,c);return i&&!Array.isArray(i)&&(i.fnScopeId=s._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return rn(a,e,t,n,r,c)}}function Zt(e,t,n,r){var i=de(e);return i.fnContext=n,i.fnOptions=r,t.slot&&((i.data||(i.data={})).slot=t.slot),i}function Xt(e,t){for(var n in t)e[g(n)]=t[n]}Wt(Gt.prototype);var Yt={init:function(e,t,n,r){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var i=e;Yt.prepatch(i,i)}else{(e.componentInstance=function(e,t,n,r){var i={_isComponent:!0,parent:t,_parentVnode:e,_parentElm:n||null,_refElm:r||null},o=e.data.inlineTemplate;D(o)&&(i.render=o.render,i.staticRenderFns=o.staticRenderFns);return new e.componentOptions.Ctor(i)}(e,mt,n,r)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,i){var o=!!(i||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==y);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=i,e.$attrs=r.data.attrs||y,e.$listeners=n||y,t&&e.$options.props){ge(!1);for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var l=s[c],u=e.$options.props;a[l]=Ie(l,u,t,e)}ge(!0),e.$options.propsData=t}n=n||y;var f=e.$options._parentListeners;e.$options._parentListeners=n,pt(e,n,f),o&&(e.$slots=dt(i,r.context),e.$forceUpdate())}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,_t(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,$t.push(t)):gt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(!(n&&(t._directInactive=!0,yt(t))||t._inactive)){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);_t(t,"deactivated")}}(t,!0):t.$destroy())}},Qt=Object.keys(Yt);function en(e,t,n,r,i){if(!M(e)){var o=n.$options._base;if(P(e)&&(e=o.extend(e)),"function"==typeof e){var a,s,c,l,u,f,p;if(M(e.cid)&&void 0===(e=function(t,n,e){if(S(t.error)&&D(t.errorComp))return t.errorComp;if(D(t.resolved))return t.resolved;if(S(t.loading)&&D(t.loadingComp))return t.loadingComp;if(!D(t.contexts)){var r=t.contexts=[e],i=!0,o=function(){for(var e=0,t=r.length;e<t;e++)r[e].$forceUpdate()},a=R(function(e){t.resolved=st(e,n),i||o()}),s=R(function(e){D(t.errorComp)&&(t.error=!0,o())}),c=t(a,s);return P(c)&&("function"==typeof c.then?M(t.resolved)&&c.then(a,s):D(c.component)&&"function"==typeof c.component.then&&(c.component.then(a,s),D(c.error)&&(t.errorComp=st(c.error,n)),D(c.loading)&&(t.loadingComp=st(c.loading,n),0===c.delay?t.loading=!0:setTimeout(function(){M(t.resolved)&&M(t.error)&&(t.loading=!0,o())},c.delay||200)),D(c.timeout)&&setTimeout(function(){M(t.resolved)&&s(null)},c.timeout))),i=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(e)}(a=e,o,n)))return s=a,c=t,l=n,u=r,f=i,(p=fe()).asyncFactory=s,p.asyncMeta={data:c,context:l,children:u,tag:f},p;t=t||{},dn(e),D(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.props||(t.props={}))[n]=t.model.value;var i=t.on||(t.on={});D(i[r])?i[r]=[t.model.callback].concat(i[r]):i[r]=t.model.callback}(e.options,t);var d=function(e,t,n){var r=t.options.props;if(!M(r)){var i={},o=e.attrs,a=e.props;if(D(o)||D(a))for(var s in r){var c=_(s);it(i,a,s,c,!0)||it(i,o,s,c,!1)}return i}}(t,e);if(S(e.options.functional))return function(e,t,n,r,i){var o=e.options,a={},s=o.props;if(D(s))for(var c in s)a[c]=Ie(c,s,t||y);else D(n.attrs)&&Xt(a,n.attrs),D(n.props)&&Xt(a,n.props);var l=new Gt(n,a,i,r,e),u=o.render.call(null,l._c,l);if(u instanceof le)return Zt(u,n,l.parent,o);if(Array.isArray(u)){for(var f=ot(u)||[],p=new Array(f.length),d=0;d<f.length;d++)p[d]=Zt(f[d],n,l.parent,o);return p}}(e,d,t,n,r);var v=t.on;if(t.on=t.nativeOn,S(e.options.abstract)){var h=t.slot;t={},h&&(t.slot=h)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Qt.length;n++){var r=Qt[n];t[r]=Yt[r]}}(t);var m=e.options.name||i;return new le("vue-component-"+e.cid+(m?"-"+m:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:d,listeners:v,tag:i,children:r},a)}}}var tn=1,nn=2;function rn(e,t,n,r,i,o){return(Array.isArray(n)||T(n))&&(i=r,r=n,n=void 0),S(o)&&(i=nn),function(e,t,n,r,i){if(D(n)&&D(n.__ob__))return fe();D(n)&&D(n.is)&&(t=n.is);if(!t)return fe();Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);i===nn?r=ot(r):i===tn&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var o,a;if("string"==typeof t){var s;a=e.$vnode&&e.$vnode.ns||j.getTagNamespace(t),o=j.isReservedTag(t)?new le(j.parsePlatformTagName(t),n,r,void 0,void 0,e):D(s=Le(e.$options,"components",t))?en(s,n,e,r,t):new le(t,n,r,void 0,void 0,e)}else o=en(t,n,e,r);return Array.isArray(o)?o:D(o)?(D(a)&&function e(t,n,r){t.ns=n;"foreignObject"===t.tag&&(n=void 0,r=!0);if(D(t.children))for(var i=0,o=t.children.length;i<o;i++){var a=t.children[i];D(a.tag)&&(M(a.ns)||S(r)&&"svg"!==a.tag)&&e(a,n,r)}}(o,a),D(n)&&function(e){P(e.style)&&Ye(e.style);P(e.class)&&Ye(e.class)}(n),o):fe()}(e,t,n,r,i)}var on,an,sn,cn,ln,un,fn,pn=0;function dn(e){var t=e.options;if(e.super){var n=dn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.extendOptions,i=e.sealedOptions;for(var o in n)n[o]!==i[o]&&(t||(t={}),t[o]=vn(n[o],r[o],i[o]));return t}(e);r&&m(e.extendOptions,r),(t=e.options=Ne(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function vn(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var i=0;i<e.length;i++)(0<=t.indexOf(e[i])||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function hn(e){this._init(e)}function mn(e){e.cid=0;var a=1;e.extend=function(e){e=e||{};var t=this,n=t.cid,r=e._Ctor||(e._Ctor={});if(r[n])return r[n];var i=e.name||t.options.name,o=function(e){this._init(e)};return((o.prototype=Object.create(t.prototype)).constructor=o).cid=a++,o.options=Ne(t.options,e),o.super=t,o.options.props&&function(e){var t=e.options.props;for(var n in t)Et(e.prototype,"_props",n)}(o),o.options.computed&&function(e){var t=e.options.computed;for(var n in t)Lt(e.prototype,n,t[n])}(o),o.extend=t.extend,o.mixin=t.mixin,o.use=t.use,k.forEach(function(e){o[e]=t[e]}),i&&(o.options.components[i]=o),o.superOptions=t.options,o.extendOptions=e,o.sealedOptions=m({},o.options),r[n]=o}}function yn(e){return e&&(e.Ctor.options.name||e.tag)}function gn(e,t){return Array.isArray(e)?-1<e.indexOf(t):"string"==typeof e?-1<e.split(",").indexOf(t):(n=e,"[object RegExp]"===r.call(n)&&e.test(t));var n}function _n(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=yn(a.componentOptions);s&&!t(s)&&bn(n,o,r,i)}}}function bn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,f(n,t)}hn.prototype._init=function(e){var t,n,r,i,o=this;o._uid=pn++,o._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r,n._parentElm=t._parentElm,n._refElm=t._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(o,e):o.$options=Ne(dn(o.constructor),e||{},o),function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}((o._renderProxy=o)._self=o),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&pt(e,t)}(o),function(i){i._vnode=null,i._staticTrees=null;var e=i.$options,t=i.$vnode=e._parentVnode,n=t&&t.context;i.$slots=dt(e._renderChildren,n),i.$scopedSlots=y,i._c=function(e,t,n,r){return rn(i,e,t,n,r,!1)},i.$createElement=function(e,t,n,r){return rn(i,e,t,n,r,!0)};var r=t&&t.data;Ce(i,"$attrs",r&&r.attrs||y,null,!0),Ce(i,"$listeners",e._parentListeners||y,null,!0)}(o),_t(o,"beforeCreate"),(n=Dt((t=o).$options.inject,t))&&(ge(!1),Object.keys(n).forEach(function(e){Ce(t,e,n[e])}),ge(!0)),jt(o),(i=(r=o).$options.provide)&&(r._provided="function"==typeof i?i.call(r):i),_t(o,"created"),o.$options.el&&o.$mount(o.$options.el)},on=hn,an={get:function(){return this._data}},sn={get:function(){return this._props}},Object.defineProperty(on.prototype,"$data",an),Object.defineProperty(on.prototype,"$props",sn),on.prototype.$set=xe,on.prototype.$delete=ke,on.prototype.$watch=function(e,t,n){if(l(t))return Mt(this,e,t,n);(n=n||{}).user=!0;var r=new St(this,e,t,n);return n.immediate&&t.call(this,r.value),function(){r.teardown()}},ln=/^hook:/,(cn=hn).prototype.$on=function(e,t){if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)this.$on(e[n],t);else(this._events[e]||(this._events[e]=[])).push(t),ln.test(e)&&(this._hasHookEvent=!0);return this},cn.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},cn.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)this.$off(e[r],t);return n}var o=n._events[e];if(!o)return n;if(!t)return n._events[e]=null,n;if(t)for(var a,s=o.length;s--;)if((a=o[s])===t||a.fn===t){o.splice(s,1);break}return n},cn.prototype.$emit=function(t){var n=this,e=n._events[t];if(e){e=1<e.length?h(e):e;for(var r=h(arguments,1),i=0,o=e.length;i<o;i++)try{e[i].apply(n,r)}catch(e){Fe(e,n,'event handler for "'+t+'"')}}return n},(un=hn).prototype._update=function(e,t){var n=this;n._isMounted&&_t(n,"beforeUpdate");var r=n.$el,i=n._vnode,o=mt;(mt=n)._vnode=e,i?n.$el=n.__patch__(i,e):(n.$el=n.__patch__(n.$el,e,t,!1,n.$options._parentElm,n.$options._refElm),n.$options._parentElm=n.$options._refElm=null),mt=o,r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},un.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},un.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){_t(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||f(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),_t(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}},Wt((fn=hn).prototype),fn.prototype.$nextTick=function(e){return Ze(e,this)},fn.prototype._render=function(){var t,n=this,e=n.$options,r=e.render,i=e._parentVnode;i&&(n.$scopedSlots=i.data.scopedSlots||y),n.$vnode=i;try{t=r.call(n._renderProxy,n.$createElement)}catch(e){Fe(e,n,"render"),t=n._vnode}return t instanceof le||(t=fe()),t.parent=i,t};var $n,wn,Cn,xn=[String,RegExp,Array],kn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:xn,exclude:xn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)bn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){_n(e,function(e){return gn(t,e)})}),this.$watch("exclude",function(t){_n(e,function(e){return!gn(t,e)})})},render:function(){var e=this.$slots.default,t=lt(e),n=t&&t.componentOptions;if(n){var r=yn(n),i=this.include,o=this.exclude;if(i&&(!r||!gn(i,r))||o&&r&&gn(o,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,f(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&bn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};$n=hn,Cn={get:function(){return j}},Object.defineProperty($n,"config",Cn),$n.util={warn:re,extend:m,mergeOptions:Ne,defineReactive:Ce},$n.set=xe,$n.delete=ke,$n.nextTick=Ze,$n.options=Object.create(null),k.forEach(function(e){$n.options[e+"s"]=Object.create(null)}),m(($n.options._base=$n).options.components,kn),$n.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1<t.indexOf(e))return this;var n=h(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this},$n.mixin=function(e){return this.options=Ne(this.options,e),this},mn($n),wn=$n,k.forEach(function(n){wn[n]=function(e,t){return t?("component"===n&&l(t)&&(t.name=t.name||e,t=this.options._base.extend(t)),"directive"===n&&"function"==typeof t&&(t={bind:t,update:t}),this.options[n+"s"][e]=t):this.options[n+"s"][e]}}),Object.defineProperty(hn.prototype,"$isServer",{get:Y}),Object.defineProperty(hn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(hn,"FunctionalRenderContext",{value:Gt}),hn.version="2.5.16";var An=s("style,class"),On=s("input,textarea,option,select,progress"),Sn=function(e,t,n){return"value"===n&&On(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Tn=s("contenteditable,draggable,spellcheck"),En=s("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),jn="http://www.w3.org/1999/xlink",Nn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Ln=function(e){return Nn(e)?e.slice(6,e.length):""},In=function(e){return null==e||!1===e};function Mn(e){for(var t=e.data,n=e,r=e;D(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Dn(r.data,t));for(;D(n=n.parent);)n&&n.data&&(t=Dn(t,n.data));return function(e,t){if(D(e)||D(t))return Pn(e,Fn(t));return""}(t.staticClass,t.class)}function Dn(e,t){return{staticClass:Pn(e.staticClass,t.staticClass),class:D(e.class)?[e.class,t.class]:t.class}}function Pn(e,t){return e?t?e+" "+t:e:t||""}function Fn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)D(t=Fn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):P(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Rn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Hn=s("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Bn=s("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Un=function(e){return Hn(e)||Bn(e)};function Vn(e){return Bn(e)?"svg":"math"===e?"math":void 0}var zn=Object.create(null);var Kn=s("text,number,password,search,email,tel,url");function Jn(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var qn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Rn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Wn={create:function(e,t){Gn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Gn(e,!0),Gn(t))},destroy:function(e){Gn(e,!0)}};function Gn(e,t){var n=e.data.ref;if(D(n)){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?f(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}var Zn=new le("",{},[]),Xn=["create","activate","update","remove","destroy"];function Yn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&D(e.data)===D(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=D(n=e.data)&&D(n=n.attrs)&&n.type,i=D(n=t.data)&&D(n=n.attrs)&&n.type;return r===i||Kn(r)&&Kn(i)}(e,t)||S(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&M(t.asyncFactory.error))}function Qn(e,t,n){var r,i,o={};for(r=t;r<=n;++r)D(i=e[r].key)&&(o[i]=r);return o}var er={create:tr,update:tr,destroy:function(e){tr(e,Zn)}};function tr(e,t){(e.data.directives||t.data.directives)&&function(t,n){var e,r,i,o=t===Zn,a=n===Zn,s=rr(t.data.directives,t.context),c=rr(n.data.directives,n.context),l=[],u=[];for(e in c)r=s[e],i=c[e],r?(i.oldValue=r.value,ir(i,"update",n,t),i.def&&i.def.componentUpdated&&u.push(i)):(ir(i,"bind",n,t),i.def&&i.def.inserted&&l.push(i));if(l.length){var f=function(){for(var e=0;e<l.length;e++)ir(l[e],"inserted",n,t)};o?rt(n,"insert",f):f()}u.length&&rt(n,"postpatch",function(){for(var e=0;e<u.length;e++)ir(u[e],"componentUpdated",n,t)});if(!o)for(e in s)c[e]||ir(s[e],"unbind",t,t,a)}(e,t)}var nr=Object.create(null);function rr(e,t){var n,r,i,o=Object.create(null);if(!e)return o;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=nr),(o[(i=r,i.rawName||i.name+"."+Object.keys(i.modifiers||{}).join("."))]=r).def=Le(t.$options,"directives",r.name);return o}function ir(t,n,r,e,i){var o=t.def&&t.def[n];if(o)try{o(r.elm,t,r,e,i)}catch(e){Fe(e,r.context,"directive "+t.name+" "+n+" hook")}}var or=[Wn,er];function ar(e,t){var n=t.componentOptions;if(!(D(n)&&!1===n.Ctor.options.inheritAttrs||M(e.data.attrs)&&M(t.data.attrs))){var r,i,o=t.elm,a=e.data.attrs||{},s=t.data.attrs||{};for(r in D(s.__ob__)&&(s=t.data.attrs=m({},s)),s)i=s[r],a[r]!==i&&sr(o,r,i);for(r in(K||q)&&s.value!==a.value&&sr(o,"value",s.value),a)M(s[r])&&(Nn(r)?o.removeAttributeNS(jn,Ln(r)):Tn(r)||o.removeAttribute(r))}}function sr(e,t,n){-1<e.tagName.indexOf("-")?cr(e,t,n):En(t)?In(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Tn(t)?e.setAttribute(t,In(n)||"false"===n?"false":"true"):Nn(t)?In(n)?e.removeAttributeNS(jn,Ln(t)):e.setAttributeNS(jn,t,n):cr(e,t,n)}function cr(t,e,n){if(In(n))t.removeAttribute(e);else{if(K&&!J&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var lr={create:ar,update:ar};function ur(e,t){var n=t.elm,r=t.data,i=e.data;if(!(M(r.staticClass)&&M(r.class)&&(M(i)||M(i.staticClass)&&M(i.class)))){var o=Mn(t),a=n._transitionClasses;D(a)&&(o=Pn(o,Fn(a))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var fr,pr,dr,vr,hr,mr,yr={create:ur,update:ur},gr=/[\w).+\-_$\]]/;function _r(e){var t,n,r,i,o,a=!1,s=!1,c=!1,l=!1,u=0,f=0,p=0,d=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(l)47===t&&92!==n&&(l=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||u||f||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===t){for(var v=r-1,h=void 0;0<=v&&" "===(h=e.charAt(v));v--);h&&gr.test(h)||(l=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r<o.length;r++)i=br(i,o[r]);return i}function br(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function $r(e){console.error("[Vue compiler]: "+e)}function wr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Cr(e,t,n){(e.props||(e.props=[])).push({name:t,value:n}),e.plain=!1}function xr(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n}),e.plain=!1}function kr(e,t,n){e.attrsMap[t]=n,e.attrsList.push({name:t,value:n})}function Ar(e,t,n,r,i,o){var a;(r=r||y).capture&&(delete r.capture,t="!"+t),r.once&&(delete r.once,t="~"+t),r.passive&&(delete r.passive,t="&"+t),"click"===t&&(r.right?(t="contextmenu",delete r.right):r.middle&&(t="mouseup")),r.native?(delete r.native,a=e.nativeEvents||(e.nativeEvents={})):a=e.events||(e.events={});var s={value:n.trim()};r!==y&&(s.modifiers=r);var c=a[t];Array.isArray(c)?i?c.unshift(s):c.push(s):a[t]=c?i?[s,c]:[c,s]:s,e.plain=!1}function Or(e,t,n){var r=Sr(e,":"+t)||Sr(e,"v-bind:"+t);if(null!=r)return _r(r);if(!1!==n){var i=Sr(e,t);if(null!=i)return JSON.stringify(i)}}function Sr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Tr(e,t,n){var r=n||{},i=r.number,o="$$v",a=o;r.trim&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=Er(t,a);e.model={value:"("+t+")",expression:'"'+t+'"',callback:"function ($$v) {"+s+"}"}}function Er(e,t){var n=function(e){if(e=e.trim(),fr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<fr-1)return-1<(vr=e.lastIndexOf("."))?{exp:e.slice(0,vr),key:'"'+e.slice(vr+1)+'"'}:{exp:e,key:null};pr=e,vr=hr=mr=0;for(;!Nr();)Lr(dr=jr())?Mr(dr):91===dr&&Ir(dr);return{exp:e.slice(0,hr),key:e.slice(hr+1,mr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function jr(){return pr.charCodeAt(++vr)}function Nr(){return fr<=vr}function Lr(e){return 34===e||39===e}function Ir(e){var t=1;for(hr=vr;!Nr();)if(Lr(e=jr()))Mr(e);else if(91===e&&t++,93===e&&t--,0===t){mr=vr;break}}function Mr(e){for(var t=e;!Nr()&&(e=jr())!==t;);}var Dr,Pr="__r",Fr="__c";function Rr(e,t,n,r,i){var o,a,s,c,l;t=(o=t)._withTask||(o._withTask=function(){Je=!0;var e=o.apply(null,arguments);return Je=!1,e}),n&&(a=t,s=e,c=r,l=Dr,t=function e(){null!==a.apply(null,arguments)&&Hr(s,e,c,l)}),Dr.addEventListener(e,t,Z?{capture:r,passive:i}:r)}function Hr(e,t,n,r){(r||Dr).removeEventListener(e,t._withTask||t,n)}function Br(e,t){if(!M(e.data.on)||!M(t.data.on)){var n=t.data.on||{},r=e.data.on||{};Dr=t.elm,function(e){if(D(e[Pr])){var t=K?"change":"input";e[t]=[].concat(e[Pr],e[t]||[]),delete e[Pr]}D(e[Fr])&&(e.change=[].concat(e[Fr],e.change||[]),delete e[Fr])}(n),nt(n,r,Rr,Hr,t.context),Dr=void 0}}var Ur={create:Br,update:Br};function Vr(e,t){if(!M(e.data.domProps)||!M(t.data.domProps)){var n,r,i,o,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in D(c.__ob__)&&(c=t.data.domProps=m({},c)),s)M(c[n])&&(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){var l=M(a._value=r)?"":String(r);o=l,(i=a).composing||"OPTION"!==i.tagName&&!function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(i,o)&&!function(e,t){var n=e.value,r=e._vModifiers;if(D(r)){if(r.lazy)return!1;if(r.number)return F(n)!==F(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(i,o)||(a.value=l)}else a[n]=r}}}var zr={create:Vr,update:Vr},Kr=e(function(e){var n={},r=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var t=e.split(r);1<t.length&&(n[t[0].trim()]=t[1].trim())}}),n});function Jr(e){var t=qr(e.style);return e.staticStyle?m(e.staticStyle,t):t}function qr(e){return Array.isArray(e)?b(e):"string"==typeof e?Kr(e):e}var Wr,Gr=/^--/,Zr=/\s*!important$/,Xr=function(e,t,n){if(Gr.test(t))e.style.setProperty(t,n);else if(Zr.test(n))e.style.setProperty(t,n.replace(Zr,""),"important");else{var r=Qr(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Yr=["Webkit","Moz","ms"],Qr=e(function(e){if(Wr=Wr||document.createElement("div").style,"filter"!==(e=g(e))&&e in Wr)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Yr.length;n++){var r=Yr[n]+t;if(r in Wr)return r}});function ei(e,t){var n=t.data,r=e.data;if(!(M(n.staticStyle)&&M(n.style)&&M(r.staticStyle)&&M(r.style))){var i,o,a=t.elm,s=r.staticStyle,c=r.normalizedStyle||r.style||{},l=s||c,u=qr(t.data.style)||{};t.data.normalizedStyle=D(u.__ob__)?m({},u):u;var f=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=Jr(i.data))&&m(r,n);(n=Jr(e.data))&&m(r,n);for(var o=e;o=o.parent;)o.data&&(n=Jr(o.data))&&m(r,n);return r}(t,!0);for(o in l)M(f[o])&&Xr(a,o,"");for(o in f)(i=f[o])!==l[o]&&Xr(a,o,null==i?"":i)}}var ti={create:ei,update:ei};function ni(t,e){if(e&&(e=e.trim()))if(t.classList)-1<e.indexOf(" ")?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ri(t,e){if(e&&(e=e.trim()))if(t.classList)-1<e.indexOf(" ")?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";0<=n.indexOf(r);)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ii(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&m(t,oi(e.name||"v")),m(t,e),t}return"string"==typeof e?oi(e):void 0}}var oi=e(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),ai=B&&!J,si="transition",ci="animation",li="transition",ui="transitionend",fi="animation",pi="animationend";ai&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(li="WebkitTransition",ui="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(fi="WebkitAnimation",pi="webkitAnimationEnd"));var di=B?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function vi(e){di(function(){di(e)})}function hi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),ni(e,t))}function mi(e,t){e._transitionClasses&&f(e._transitionClasses,t),ri(e,t)}function yi(t,e,n){var r=_i(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===si?ui:pi,c=0,l=function(){t.removeEventListener(s,u),n()},u=function(e){e.target===t&&++c>=a&&l()};setTimeout(function(){c<a&&l()},o+1),t.addEventListener(s,u)}var gi=/\b(transform|all)(,|$)/;function _i(e,t){var n,r=window.getComputedStyle(e),i=r[li+"Delay"].split(", "),o=r[li+"Duration"].split(", "),a=bi(i,o),s=r[fi+"Delay"].split(", "),c=r[fi+"Duration"].split(", "),l=bi(s,c),u=0,f=0;return t===si?0<a&&(n=si,u=a,f=o.length):t===ci?0<l&&(n=ci,u=l,f=c.length):f=(n=0<(u=Math.max(a,l))?l<a?si:ci:null)?n===si?o.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:n===si&&gi.test(r[li+"Property"])}}function bi(n,e){for(;n.length<e.length;)n=n.concat(n);return Math.max.apply(null,e.map(function(e,t){return $i(e)+$i(n[t])}))}function $i(e){return 1e3*Number(e.slice(0,-1))}function wi(n,e){var r=n.elm;D(r._leaveCb)&&(r._leaveCb.cancelled=!0,r._leaveCb());var t=ii(n.data.transition);if(!M(t)&&!D(r._enterCb)&&1===r.nodeType){for(var i=t.css,o=t.type,a=t.enterClass,s=t.enterToClass,c=t.enterActiveClass,l=t.appearClass,u=t.appearToClass,f=t.appearActiveClass,p=t.beforeEnter,d=t.enter,v=t.afterEnter,h=t.enterCancelled,m=t.beforeAppear,y=t.appear,g=t.afterAppear,_=t.appearCancelled,b=t.duration,$=mt,w=mt.$vnode;w&&w.parent;)$=(w=w.parent).context;var C=!$._isMounted||!n.isRootInsert;if(!C||y||""===y){var x=C&&l?l:a,k=C&&f?f:c,A=C&&u?u:s,O=C&&m||p,S=C&&"function"==typeof y?y:d,T=C&&g||v,E=C&&_||h,j=F(P(b)?b.enter:b),N=!1!==i&&!J,L=ki(S),I=r._enterCb=R(function(){N&&(mi(r,A),mi(r,k)),I.cancelled?(N&&mi(r,x),E&&E(r)):T&&T(r),r._enterCb=null});n.data.show||rt(n,"insert",function(){var e=r.parentNode,t=e&&e._pending&&e._pending[n.key];t&&t.tag===n.tag&&t.elm._leaveCb&&t.elm._leaveCb(),S&&S(r,I)}),O&&O(r),N&&(hi(r,x),hi(r,k),vi(function(){mi(r,x),I.cancelled||(hi(r,A),L||(xi(j)?setTimeout(I,j):yi(r,o,I)))})),n.data.show&&(e&&e(),S&&S(r,I)),N||L||I()}}}function Ci(e,t){var n=e.elm;D(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=ii(e.data.transition);if(M(r)||1!==n.nodeType)return t();if(!D(n._leaveCb)){var i=r.css,o=r.type,a=r.leaveClass,s=r.leaveToClass,c=r.leaveActiveClass,l=r.beforeLeave,u=r.leave,f=r.afterLeave,p=r.leaveCancelled,d=r.delayLeave,v=r.duration,h=!1!==i&&!J,m=ki(u),y=F(P(v)?v.leave:v),g=n._leaveCb=R(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),h&&(mi(n,s),mi(n,c)),g.cancelled?(h&&mi(n,a),p&&p(n)):(t(),f&&f(n)),n._leaveCb=null});d?d(_):_()}function _(){g.cancelled||(e.data.show||((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),l&&l(n),h&&(hi(n,a),hi(n,c),vi(function(){mi(n,a),g.cancelled||(hi(n,s),m||(xi(y)?setTimeout(g,y):yi(n,o,g)))})),u&&u(n,g),h||m||g())}}function xi(e){return"number"==typeof e&&!isNaN(e)}function ki(e){if(M(e))return!1;var t=e.fns;return D(t)?ki(Array.isArray(t)?t[0]:t):1<(e._length||e.length)}function Ai(e,t){!0!==t.data.show&&wi(t)}var Oi=function(e){var r,t,g={},n=e.modules,_=e.nodeOps;for(r=0;r<Xn.length;++r)for(g[Xn[r]]=[],t=0;t<n.length;++t)D(n[t][Xn[r]])&&g[Xn[r]].push(n[t][Xn[r]]);function o(e){var t=_.parentNode(e);D(t)&&_.removeChild(t,e)}function b(e,t,n,r,i,o,a){if(D(e.elm)&&D(o)&&(e=o[a]=de(e)),e.isRootInsert=!i,!function(e,t,n,r){var i=e.data;if(D(i)){var o=D(e.componentInstance)&&i.keepAlive;if(D(i=i.hook)&&D(i=i.init)&&i(e,!1,n,r),D(e.componentInstance))return d(e,t),S(o)&&function(e,t,n,r){for(var i,o=e;o.componentInstance;)if(o=o.componentInstance._vnode,D(i=o.data)&&D(i=i.transition)){for(i=0;i<g.activate.length;++i)g.activate[i](Zn,o);t.push(o);break}u(n,e.elm,r)}(e,t,n,r),!0}}(e,t,n,r)){var s=e.data,c=e.children,l=e.tag;D(l)?(e.elm=e.ns?_.createElementNS(e.ns,l):_.createElement(l,e),f(e),v(e,c,t),D(s)&&h(e,t)):S(e.isComment)?e.elm=_.createComment(e.text):e.elm=_.createTextNode(e.text),u(n,e.elm,r)}}function d(e,t){D(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,$(e)?(h(e,t),f(e)):(Gn(e),t.push(e))}function u(e,t,n){D(e)&&(D(n)?n.parentNode===e&&_.insertBefore(e,t,n):_.appendChild(e,t))}function v(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)b(t[r],n,e.elm,null,!0,t,r);else T(e.text)&&_.appendChild(e.elm,_.createTextNode(String(e.text)))}function $(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return D(e.tag)}function h(e,t){for(var n=0;n<g.create.length;++n)g.create[n](Zn,e);D(r=e.data.hook)&&(D(r.create)&&r.create(Zn,e),D(r.insert)&&t.push(e))}function f(e){var t;if(D(t=e.fnScopeId))_.setStyleScope(e.elm,t);else for(var n=e;n;)D(t=n.context)&&D(t=t.$options._scopeId)&&_.setStyleScope(e.elm,t),n=n.parent;D(t=mt)&&t!==e.context&&t!==e.fnContext&&D(t=t.$options._scopeId)&&_.setStyleScope(e.elm,t)}function y(e,t,n,r,i,o){for(;r<=i;++r)b(n[r],o,e,t,!1,n,r)}function w(e){var t,n,r=e.data;if(D(r))for(D(t=r.hook)&&D(t=t.destroy)&&t(e),t=0;t<g.destroy.length;++t)g.destroy[t](e);if(D(t=e.children))for(n=0;n<e.children.length;++n)w(e.children[n])}function C(e,t,n,r){for(;n<=r;++n){var i=t[n];D(i)&&(D(i.tag)?(a(i),w(i)):o(i.elm))}}function a(e,t){if(D(t)||D(e.data)){var n,r=g.remove.length+1;for(D(t)?t.listeners+=r:t=function(e,t){function n(){0==--n.listeners&&o(e)}return n.listeners=t,n}(e.elm,r),D(n=e.componentInstance)&&D(n=n._vnode)&&D(n.data)&&a(n,t),n=0;n<g.remove.length;++n)g.remove[n](e,t);D(n=e.data.hook)&&D(n=n.remove)?n(e,t):t()}else o(e.elm)}function x(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];if(D(o)&&Yn(e,o))return i}}function k(e,t,n,r){if(e!==t){var i=t.elm=e.elm;if(S(e.isAsyncPlaceholder))D(t.asyncFactory.resolved)?O(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(S(t.isStatic)&&S(e.isStatic)&&t.key===e.key&&(S(t.isCloned)||S(t.isOnce)))t.componentInstance=e.componentInstance;else{var o,a=t.data;D(a)&&D(o=a.hook)&&D(o=o.prepatch)&&o(e,t);var s=e.children,c=t.children;if(D(a)&&$(t)){for(o=0;o<g.update.length;++o)g.update[o](e,t);D(o=a.hook)&&D(o=o.update)&&o(e,t)}M(t.text)?D(s)&&D(c)?s!==c&&function(e,t,n,r,i){for(var o,a,s,c=0,l=0,u=t.length-1,f=t[0],p=t[u],d=n.length-1,v=n[0],h=n[d],m=!i;c<=u&&l<=d;)M(f)?f=t[++c]:M(p)?p=t[--u]:Yn(f,v)?(k(f,v,r),f=t[++c],v=n[++l]):Yn(p,h)?(k(p,h,r),p=t[--u],h=n[--d]):Yn(f,h)?(k(f,h,r),m&&_.insertBefore(e,f.elm,_.nextSibling(p.elm)),f=t[++c],h=n[--d]):(Yn(p,v)?(k(p,v,r),m&&_.insertBefore(e,p.elm,f.elm),p=t[--u]):(M(o)&&(o=Qn(t,c,u)),M(a=D(v.key)?o[v.key]:x(v,t,c,u))?b(v,r,e,f.elm,!1,n,l):Yn(s=t[a],v)?(k(s,v,r),t[a]=void 0,m&&_.insertBefore(e,s.elm,f.elm)):b(v,r,e,f.elm,!1,n,l)),v=n[++l]);u<c?y(e,M(n[d+1])?null:n[d+1].elm,n,l,d,r):d<l&&C(0,t,c,u)}(i,s,c,n,r):D(c)?(D(e.text)&&_.setTextContent(i,""),y(i,null,c,0,c.length-1,n)):D(s)?C(0,s,0,s.length-1):D(e.text)&&_.setTextContent(i,""):e.text!==t.text&&_.setTextContent(i,t.text),D(a)&&D(o=a.hook)&&D(o=o.postpatch)&&o(e,t)}}}function A(e,t,n){if(S(n)&&D(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var m=s("attrs,class,staticClass,staticStyle,key");function O(e,t,n,r){var i,o=t.tag,a=t.data,s=t.children;if(r=r||a&&a.pre,t.elm=e,S(t.isComment)&&D(t.asyncFactory))return t.isAsyncPlaceholder=!0;if(D(a)&&(D(i=a.hook)&&D(i=i.init)&&i(t,!0),D(i=t.componentInstance)))return d(t,n),!0;if(D(o)){if(D(s))if(e.hasChildNodes())if(D(i=a)&&D(i=i.domProps)&&D(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var c=!0,l=e.firstChild,u=0;u<s.length;u++){if(!l||!O(l,s[u],n,r)){c=!1;break}l=l.nextSibling}if(!c||l)return!1}else v(t,s,n);if(D(a)){var f=!1;for(var p in a)if(!m(p)){f=!0,h(t,n);break}!f&&a.class&&Ye(a.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,r,i,o){if(!M(t)){var a,s=!1,c=[];if(M(e))s=!0,b(t,c,i,o);else{var l=D(e.nodeType);if(!l&&Yn(e,t))k(e,t,c,r);else{if(l){if(1===e.nodeType&&e.hasAttribute(E)&&(e.removeAttribute(E),n=!0),S(n)&&O(e,t,c))return A(t,c,!0),e;a=e,e=new le(_.tagName(a).toLowerCase(),{},[],void 0,a)}var u=e.elm,f=_.parentNode(u);if(b(t,c,u._leaveCb?null:f,_.nextSibling(u)),D(t.parent))for(var p=t.parent,d=$(t);p;){for(var v=0;v<g.destroy.length;++v)g.destroy[v](p);if(p.elm=t.elm,d){for(var h=0;h<g.create.length;++h)g.create[h](Zn,p);var m=p.data.hook.insert;if(m.merged)for(var y=1;y<m.fns.length;y++)m.fns[y]()}else Gn(p);p=p.parent}D(f)?C(0,[e],0,0):D(e.tag)&&w(e)}}return A(t,c,s),t.elm}D(e)&&w(e)}}({nodeOps:qn,modules:[lr,yr,Ur,zr,ti,B?{create:Ai,activate:Ai,remove:function(e,t){!0!==e.data.show?Ci(e,t):t()}}:{}].concat(or)});J&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Mi(e,"input")});var Si={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?rt(n,"postpatch",function(){Si.componentUpdated(e,t,n)}):Ti(e,t,n.context),e._vOptions=[].map.call(e.options,Ni)):("textarea"===n.tag||Kn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Li),e.addEventListener("compositionend",Ii),e.addEventListener("change",Ii),J&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ti(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Ni);if(i.some(function(e,t){return!C(e,r[t])}))(e.multiple?t.value.some(function(e){return ji(e,i)}):t.value!==t.oldValue&&ji(t.value,i))&&Mi(e,"change")}}};function Ti(e,t,n){Ei(e,t,n),(K||q)&&setTimeout(function(){Ei(e,t,n)},0)}function Ei(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=-1<x(r,Ni(a)),a.selected!==o&&(a.selected=o);else if(C(Ni(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function ji(t,e){return e.every(function(e){return!C(e,t)})}function Ni(e){return"_value"in e?e._value:e.value}function Li(e){e.target.composing=!0}function Ii(e){e.target.composing&&(e.target.composing=!1,Mi(e.target,"input"))}function Mi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Di(e){return!e.componentInstance||e.data&&e.data.transition?e:Di(e.componentInstance._vnode)}var Pi={model:Si,show:{bind:function(e,t,n){var r=t.value,i=(n=Di(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,wi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Di(n)).data&&n.data.transition?(n.data.show=!0,r?wi(n,function(){e.style.display=e.__vOriginalDisplay}):Ci(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Fi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ri(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Ri(lt(t.children)):e}function Hi(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[g(o)]=i[o];return t}function Bi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ui={name:"transition",props:Fi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(function(e){return e.tag||ct(e)})).length){var r=this.mode,i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=Ri(i);if(!o)return i;if(this._leaving)return Bi(e,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:T(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var s,c,l=(o.data||(o.data={})).transition=Hi(this),u=this._vnode,f=Ri(u);if(o.data.directives&&o.data.directives.some(function(e){return"show"===e.name})&&(o.data.show=!0),f&&f.data&&(s=o,(c=f).key!==s.key||c.tag!==s.tag)&&!ct(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var p=f.data.transition=m({},l);if("out-in"===r)return this._leaving=!0,rt(p,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Bi(e,i);if("in-out"===r){if(ct(o))return u;var d,v=function(){d()};rt(l,"afterEnter",v),rt(l,"enterCancelled",v),rt(p,"delayLeave",function(e){d=e})}}return i}}},Vi=m({tag:String,moveClass:String},Fi);function zi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Ki(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ji(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete Vi.mode;var qi={Transition:Ui,TransitionGroup:{props:Vi,render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Hi(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),((n[c.key]=c).data||(c.data={})).transition=a)}if(r){for(var l=[],u=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?l.push(p):u.push(p)}this.kept=e(t,null,l),this.removed=u}return e(t,null,o)},beforeUpdate:function(){this.__patch__(this._vnode,this.kept,!1,!0),this._vnode=this.kept},updated:function(){var e=this.prevChildren,r=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,r)&&(e.forEach(zi),e.forEach(Ki),e.forEach(Ji),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,t=n.style;hi(n,r),t.transform=t.WebkitTransform=t.transitionDuration="",n.addEventListener(ui,n._moveCb=function e(t){t&&!/transform$/.test(t.propertyName)||(n.removeEventListener(ui,e),n._moveCb=null,mi(n,r))})}}))},methods:{hasMove:function(e,t){if(!ai)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){ri(n,e)}),ni(n,t),n.style.display="none",this.$el.appendChild(n);var r=_i(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};hn.config.mustUseProp=Sn,hn.config.isReservedTag=Un,hn.config.isReservedAttr=An,hn.config.getTagNamespace=Vn,hn.config.isUnknownElement=function(e){if(!B)return!0;if(Un(e))return!1;if(e=e.toLowerCase(),null!=zn[e])return zn[e];var t=document.createElement(e);return-1<e.indexOf("-")?zn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:zn[e]=/HTMLUnknownElement/.test(t.toString())},m(hn.options.directives,Pi),m(hn.options.components,qi),hn.prototype.__patch__=B?Oi:$,hn.prototype.$mount=function(e,t){return e=e&&B?Jn(e):void 0,r=e,i=t,(n=this).$el=r,n.$options.render||(n.$options.render=fe),_t(n,"beforeMount"),new St(n,function(){n._update(n._render(),i)},$,null,!0),i=!1,null==n.$vnode&&(n._isMounted=!0,_t(n,"mounted")),n;var n,r,i},B&&setTimeout(function(){j.devtools&&Q&&Q.emit("init",hn)},0);var Wi=/\{\{((?:.|\n)+?)\}\}/g,Gi=/[-.*+?^${}()|[\]\/\\]/g,Zi=e(function(e){var t=e[0].replace(Gi,"\\$&"),n=e[1].replace(Gi,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var Xi={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=Sr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=Or(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Yi,Qi={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=Sr(e,"style");n&&(e.staticStyle=JSON.stringify(Kr(n)));var r=Or(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},eo=function(e){return(Yi=Yi||document.createElement("div")).innerHTML=e,Yi.textContent},to=s("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),no=s("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),ro=s("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),io=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,oo="[a-zA-Z_][\\w\\-\\.]*",ao="((?:"+oo+"\\:)?"+oo+")",so=new RegExp("^<"+ao),co=/^\s*(\/?)>/,lo=new RegExp("^<\\/"+ao+"[^>]*>"),uo=/^<!DOCTYPE [^>]+>/i,fo=/^<!\--/,po=/^<!\[/,vo=!1;"x".replace(/x(.)?/g,function(e,t){vo=""===t});var ho=s("script,style,textarea",!0),mo={},yo={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t"},go=/&(?:lt|gt|quot|amp);/g,_o=/&(?:lt|gt|quot|amp|#10|#9);/g,bo=s("pre,textarea",!0),$o=function(e,t){return e&&bo(e)&&"\n"===t[0]};var wo,Co,xo,ko,Ao,Oo,So,To,Eo=/^@|^v-on:/,jo=/^v-|^@|^:/,No=/([^]*?)\s+(?:in|of)\s+([^]*)/,Lo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Io=/^\(|\)$/g,Mo=/:(.*)$/,Do=/^:|^v-bind:/,Po=/\.[^.]+/g,Fo=e(eo);function Ro(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}(t),parent:n,children:[]}}function Ho(e,p){wo=p.warn||$r,Oo=p.isPreTag||O,So=p.mustUseProp||O,To=p.getTagNamespace||O,xo=wr(p.modules,"transformNode"),ko=wr(p.modules,"preTransformNode"),Ao=wr(p.modules,"postTransformNode"),Co=p.delimiters;var d,v,h=[],i=!1!==p.preserveWhitespace,m=!1,y=!1;function g(e){e.pre&&(m=!1),Oo(e.tag)&&(y=!1);for(var t=0;t<Ao.length;t++)Ao[t](e,p)}return function(i,d){for(var e,v,h=[],m=d.expectHTML,y=d.isUnaryTag||O,g=d.canBeLeftOpenTag||O,a=0;i;){if(e=i,v&&ho(v)){var r=0,o=v.toLowerCase(),t=mo[o]||(mo[o]=new RegExp("([\\s\\S]*?)(</"+o+"[^>]*>)","i")),n=i.replace(t,function(e,t,n){return r=n.length,ho(o)||"noscript"===o||(t=t.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),$o(o,t)&&(t=t.slice(1)),d.chars&&d.chars(t),""});a+=i.length-n.length,i=n,A(o,a-r,a)}else{var s=i.indexOf("<");if(0===s){if(fo.test(i)){var c=i.indexOf("--\x3e");if(0<=c){d.shouldKeepComment&&d.comment(i.substring(4,c)),C(c+3);continue}}if(po.test(i)){var l=i.indexOf("]>");if(0<=l){C(l+2);continue}}var u=i.match(uo);if(u){C(u[0].length);continue}var f=i.match(lo);if(f){var p=a;C(f[0].length),A(f[1],p,a);continue}var _=x();if(_){k(_),$o(v,i)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(0<=s){for($=i.slice(s);!(lo.test($)||so.test($)||fo.test($)||po.test($)||(w=$.indexOf("<",1))<0);)s+=w,$=i.slice(s);b=i.substring(0,s),C(s)}s<0&&(b=i,i=""),d.chars&&b&&d.chars(b)}if(i===e){d.chars&&d.chars(i);break}}function C(e){a+=e,i=i.substring(e)}function x(){var e=i.match(so);if(e){var t,n,r={tagName:e[1],attrs:[],start:a};for(C(e[0].length);!(t=i.match(co))&&(n=i.match(io));)C(n[0].length),r.attrs.push(n);if(t)return r.unarySlash=t[1],C(t[0].length),r.end=a,r}}function k(e){var t=e.tagName,n=e.unarySlash;m&&("p"===v&&ro(t)&&A(v),g(t)&&v===t&&A(t));for(var r,i,o,a=y(t)||!!n,s=e.attrs.length,c=new Array(s),l=0;l<s;l++){var u=e.attrs[l];vo&&-1===u[0].indexOf('""')&&(""===u[3]&&delete u[3],""===u[4]&&delete u[4],""===u[5]&&delete u[5]);var f=u[3]||u[4]||u[5]||"",p="a"===t&&"href"===u[1]?d.shouldDecodeNewlinesForHref:d.shouldDecodeNewlines;c[l]={name:u[1],value:(r=f,i=p,o=i?_o:go,r.replace(o,function(e){return yo[e]}))}}a||(h.push({tag:t,lowerCasedTag:t.toLowerCase(),attrs:c}),v=t),d.start&&d.start(t,c,a,e.start,e.end)}function A(e,t,n){var r,i;if(null==t&&(t=a),null==n&&(n=a),e&&(i=e.toLowerCase()),e)for(r=h.length-1;0<=r&&h[r].lowerCasedTag!==i;r--);else r=0;if(0<=r){for(var o=h.length-1;r<=o;o--)d.end&&d.end(h[o].tag,t,n);h.length=r,v=r&&h[r-1].tag}else"br"===i?d.start&&d.start(e,[],!0,t,n):"p"===i&&(d.start&&d.start(e,[],!1,t,n),d.end&&d.end(e,t,n))}A()}(e,{warn:wo,expectHTML:p.expectHTML,isUnaryTag:p.isUnaryTag,canBeLeftOpenTag:p.canBeLeftOpenTag,shouldDecodeNewlines:p.shouldDecodeNewlines,shouldDecodeNewlinesForHref:p.shouldDecodeNewlinesForHref,shouldKeepComment:p.comments,start:function(e,t,n){var r=v&&v.ns||To(e);K&&"svg"===r&&(t=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Ko.test(r.name)||(r.name=r.name.replace(Jo,""),t.push(r))}return t}(t));var i,o,a,s,c,l=Ro(e,t,v);r&&(l.ns=r),"style"!==(i=l).tag&&("script"!==i.tag||i.attrsMap.type&&"text/javascript"!==i.attrsMap.type)||Y()||(l.forbidden=!0);for(var u=0;u<ko.length;u++)l=ko[u](l,p)||l;if(m||(null!=Sr(o=l,"v-pre")&&(o.pre=!0),l.pre&&(m=!0)),Oo(l.tag)&&(y=!0),m?function(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}(l):l.processed||(Uo(l),function(e){var t=Sr(e,"v-if");if(t)e.if=t,Vo(e,{exp:t,block:e});else{null!=Sr(e,"v-else")&&(e.else=!0);var n=Sr(e,"v-else-if");n&&(e.elseif=n)}}(l),null!=Sr(a=l,"v-once")&&(a.once=!0),Bo(l,p)),d?h.length||d.if&&(l.elseif||l.else)&&Vo(d,{exp:l.elseif,block:l}):d=l,v&&!l.forbidden)if(l.elseif||l.else)s=l,(c=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(v.children))&&c.if&&Vo(c,{exp:s.elseif,block:s});else if(l.slotScope){v.plain=!1;var f=l.slotTarget||'"default"';(v.scopedSlots||(v.scopedSlots={}))[f]=l}else v.children.push(l),l.parent=v;n?g(l):(v=l,h.push(l))},end:function(){var e=h[h.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!y&&e.children.pop(),h.length-=1,v=h[h.length-1],g(e)},chars:function(e){if(v&&(!K||"textarea"!==v.tag||v.attrsMap.placeholder!==e)){var t,n,r=v.children;if(e=y||e.trim()?"script"===(t=v).tag||"style"===t.tag?e:Fo(e):i&&r.length?" ":"")!m&&" "!==e&&(n=function(e,t){var n=t?Zi(t):Wi;if(n.test(e)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){c<(i=r.index)&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var l=_r(r[1].trim());a.push("_s("+l+")"),s.push({"@binding":l}),c=i+r[0].length}return c<e.length&&(s.push(o=e.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,Co))?r.push({type:2,expression:n.expression,tokens:n.tokens,text:e}):" "===e&&r.length&&" "===r[r.length-1].text||r.push({type:3,text:e})}},comment:function(e){v.children.push({type:3,text:e,isComment:!0})}}),d}function Bo(e,t){var n,r,i,o;(r=Or(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.attrsList.length,(o=Or(i=e,"ref"))&&(i.ref=o,i.refInFor=function(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(i)),function(e){if("slot"===e.tag)e.slotName=Or(e,"name");else{var t;"template"===e.tag?(t=Sr(e,"scope"),e.slotScope=t||Sr(e,"slot-scope")):(t=Sr(e,"slot-scope"))&&(e.slotScope=t);var n=Or(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,"template"===e.tag||e.slotScope||xr(e,"slot",n))}}(e),function(e){var t;(t=Or(e,"is"))&&(e.component=t);null!=Sr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var a=0;a<xo.length;a++)e=xo[a](e,t)||e;!function(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,jo.test(r))if(e.hasBindings=!0,(a=zo(r))&&(r=r.replace(Po,"")),Do.test(r))r=r.replace(Do,""),o=_r(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=g(r))&&(r="innerHTML")),a.camel&&(r=g(r)),a.sync&&Ar(e,"update:"+g(r),Er(o,"$event"))),s||!e.component&&So(e.tag,e.attrsMap.type,r)?Cr(e,r,o):xr(e,r,o);else if(Eo.test(r))r=r.replace(Eo,""),Ar(e,r,o,a,!1);else{var l=(r=r.replace(jo,"")).match(Mo),u=l&&l[1];u&&(r=r.slice(0,-(u.length+1))),p=r,d=i,v=o,h=u,m=a,((f=e).directives||(f.directives=[])).push({name:p,rawName:d,value:v,arg:h,modifiers:m}),f.plain=!1}else xr(e,r,JSON.stringify(o)),!e.component&&"muted"===r&&So(e.tag,e.attrsMap.type,r)&&Cr(e,r,"true");var f,p,d,v,h,m}(e)}function Uo(e){var t;if(t=Sr(e,"v-for")){var n=function(e){var t=e.match(No);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Io,""),i=r.match(Lo);i?(n.alias=r.replace(Lo,""),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&m(e,n)}}function Vo(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function zo(e){var t=e.match(Po);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}var Ko=/^xmlns:NS\d+/,Jo=/^NS\d+:/;function qo(e){return Ro(e.tag,e.attrsList.slice(),e.parent)}var Wo=[Xi,Qi,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=Or(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=Sr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Sr(e,"v-else",!0),s=Sr(e,"v-else-if",!0),c=qo(e);Uo(c),kr(c,"type","checkbox"),Bo(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+o,Vo(c,{exp:c.if,block:c});var l=qo(e);Sr(l,"v-for",!0),kr(l,"type","radio"),Bo(l,t),Vo(c,{exp:"("+n+")==='radio'"+o,block:l});var u=qo(e);return Sr(u,"v-for",!0),kr(u,":type",n),Bo(u,t),Vo(c,{exp:i,block:u}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Go,Zo,Xo,Yo={expectHTML:!0,modules:Wo,directives:{model:function(e,t,n){var r,i,o,a,s,c,l,u,f,p,d,v,h,m,y,g,_=t.value,b=t.modifiers,$=e.tag,w=e.attrsMap.type;if(e.component)return Tr(e,_,b),!1;if("select"===$)h=e,m=_,g=(g='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+((y=b)&&y.number?"_n(val)":"val")+"});")+" "+Er(m,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Ar(h,"change",g,null,!0);else if("input"===$&&"checkbox"===w)c=e,l=_,f=(u=b)&&u.number,p=Or(c,"value")||"null",d=Or(c,"true-value")||"true",v=Or(c,"false-value")||"false",Cr(c,"checked","Array.isArray("+l+")?_i("+l+","+p+")>-1"+("true"===d?":("+l+")":":_q("+l+","+d+")")),Ar(c,"change","var $$a="+l+",$$el=$event.target,$$c=$$el.checked?("+d+"):("+v+");if(Array.isArray($$a)){var $$v="+(f?"_n("+p+")":p)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Er(l,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Er(l,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Er(l,"$$c")+"}",null,!0);else if("input"===$&&"radio"===w)r=e,i=_,a=(o=b)&&o.number,s=Or(r,"value")||"null",Cr(r,"checked","_q("+i+","+(s=a?"_n("+s+")":s)+")"),Ar(r,"change",Er(i,s),null,!0);else if("input"===$||"textarea"===$)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,l=o?"change":"range"===r?Pr:"input",u="$event.target.value";s&&(u="$event.target.value.trim()"),a&&(u="_n("+u+")");var f=Er(t,u);c&&(f="if($event.target.composing)return;"+f),Cr(e,"value","("+t+")"),Ar(e,l,f,null,!0),(s||a)&&Ar(e,"blur","$forceUpdate()")}(e,_,b);else if(!j.isReservedTag($))return Tr(e,_,b),!1;return!0},text:function(e,t){t.value&&Cr(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&Cr(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:to,mustUseProp:Sn,canBeLeftOpenTag:no,isReservedTag:Un,getTagNamespace:Vn,staticKeys:(Go=Wo,Go.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(","))},Qo=e(function(e){return s("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))});function ea(e,t){e&&(Zo=Qo(t.staticKeys||""),Xo=t.isReservedTag||O,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||c(e.tag)||!Xo(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Zo)))}(t);if(1===t.type){if(!Xo(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var ta=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,na=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ra={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ia={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},oa=function(e){return"if("+e+")return null;"},aa={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:oa("$event.target !== $event.currentTarget"),ctrl:oa("!$event.ctrlKey"),shift:oa("!$event.shiftKey"),alt:oa("!$event.altKey"),meta:oa("!$event.metaKey"),left:oa("'button' in $event && $event.button !== 0"),middle:oa("'button' in $event && $event.button !== 1"),right:oa("'button' in $event && $event.button !== 2")};function sa(e,t,n){var r=t?"nativeOn:{":"on:{";for(var i in e)r+='"'+i+'":'+ca(i,e[i])+",";return r.slice(0,-1)+"}"}function ca(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return ca(t,e)}).join(",")+"]";var n=na.test(e.value),r=ta.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(aa[s])o+=aa[s],ra[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=oa(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+="if(!('button' in $event)&&"+a.map(la).join("&&")+")return null;"),o&&(i+=o),"function($event){"+i+(n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function la(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=ra[e],r=ia[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ua={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(t,n){t.wrapData=function(e){return"_b("+e+",'"+t.tag+"',"+n.value+","+(n.modifiers&&n.modifiers.prop?"true":"false")+(n.modifiers&&n.modifiers.sync?",true":"")+")"}},cloak:$},fa=function(e){this.options=e,this.warn=e.warn||$r,this.transforms=wr(e.modules,"transformCode"),this.dataGenFns=wr(e.modules,"genData"),this.directives=m(m({},ua),e.directives);var t=e.isReservedTag||O;this.maybeComponent=function(e){return!t(e.tag)},this.onceId=0,this.staticRenderFns=[]};function pa(e,t){var n=new fa(t);return{render:"with(this){return "+(e?da(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function da(e,t){if(e.staticRoot&&!e.staticProcessed)return va(e,t);if(e.once&&!e.onceProcessed)return ha(e,t);if(e.for&&!e.forProcessed)return f=t,v=(u=e).for,h=u.alias,m=u.iterator1?","+u.iterator1:"",y=u.iterator2?","+u.iterator2:"",u.forProcessed=!0,(d||"_l")+"(("+v+"),function("+h+m+y+"){return "+(p||da)(u,f)+"})";if(e.if&&!e.ifProcessed)return ma(e,t);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=_a(e,t),i="_t("+n+(r?","+r:""),o=e.attrs&&"{"+e.attrs.map(function(e){return g(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)a=e.component,c=t,l=(s=e).inlineTemplate?null:_a(s,c,!0),n="_c("+a+","+ya(s,c)+(l?","+l:"")+")";else{var r=e.plain?void 0:ya(e,t),i=e.inlineTemplate?null:_a(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return _a(e,t)||"void 0";var a,s,c,l,u,f,p,d,v,h,m,y}function va(e,t){return e.staticProcessed=!0,t.staticRenderFns.push("with(this){return "+da(e,t)+"}"),"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function ha(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return ma(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+da(e,t)+","+t.onceId+++","+n+")":da(e,t)}return va(e,t)}function ma(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?ha(e,n):da(e,n)}}(e.ifConditions.slice(),t,n,r)}function ya(e,t){var n,r,i="{",o=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var l=t.directives[o.name];l&&(a=!!l(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);o&&(i+=o+","),e.key&&(i+="key:"+e.key+","),e.ref&&(i+="ref:"+e.ref+","),e.refInFor&&(i+="refInFor:true,"),e.pre&&(i+="pre:true,"),e.component&&(i+='tag:"'+e.tag+'",');for(var a=0;a<t.dataGenFns.length;a++)i+=t.dataGenFns[a](e);if(e.attrs&&(i+="attrs:{"+wa(e.attrs)+"},"),e.props&&(i+="domProps:{"+wa(e.props)+"},"),e.events&&(i+=sa(e.events,!1,t.warn)+","),e.nativeEvents&&(i+=sa(e.nativeEvents,!0,t.warn)+","),e.slotTarget&&!e.slotScope&&(i+="slot:"+e.slotTarget+","),e.scopedSlots&&(i+=(n=e.scopedSlots,r=t,"scopedSlots:_u(["+Object.keys(n).map(function(e){return ga(e,n[e],r)}).join(",")+"]),")),e.model&&(i+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var s=function(e,t){var n=e.children[0];if(1===n.type){var r=pa(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);s&&(i+=s+",")}return i=i.replace(/,$/,"")+"}",e.wrapData&&(i=e.wrapData(i)),e.wrapListeners&&(i=e.wrapListeners(i)),i}function ga(e,t,n){return t.for&&!t.forProcessed?(r=e,o=n,a=(i=t).for,s=i.alias,c=i.iterator1?","+i.iterator1:"",l=i.iterator2?","+i.iterator2:"",i.forProcessed=!0,"_l(("+a+"),function("+s+c+l+"){return "+ga(r,i,o)+"})"):"{key:"+e+",fn:"+("function("+String(t.slotScope)+"){return "+("template"===t.tag?t.if?t.if+"?"+(_a(t,n)||"undefined")+":undefined":_a(t,n)||"undefined":da(t,n))+"}")+"}";var r,i,o,a,s,c,l}function _a(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag)return(r||da)(a,t);var s=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(ba(i)||i.ifConditions&&i.ifConditions.some(function(e){return ba(e.block)})){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(o,t.maybeComponent):0,c=i||$a;return"["+o.map(function(e){return c(e,t)}).join(",")+"]"+(s?","+s:"")}}function ba(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function $a(e,t){return 1===e.type?da(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:Ca(JSON.stringify(n.text)))+")";var n,r}function wa(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+Ca(r.value)+","}return t.slice(0,-1)}function Ca(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");function xa(t,n){try{return new Function(t)}catch(e){return n.push({err:e,code:t}),$}}var ka,Aa,Oa=(ka=function(e,t){var n=Ho(e.trim(),t);!1!==t.optimize&&ea(n,t);var r=pa(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(s){function e(e,t){var n=Object.create(s),r=[],i=[];if(n.warn=function(e,t){(t?i:r).push(e)},t)for(var o in t.modules&&(n.modules=(s.modules||[]).concat(t.modules)),t.directives&&(n.directives=m(Object.create(s.directives||null),t.directives)),t)"modules"!==o&&"directives"!==o&&(n[o]=t[o]);var a=ka(e,n);return a.errors=r,a.tips=i,a}return{compile:e,compileToFunctions:(c=e,l=Object.create(null),function(e,t,n){(t=m({},t)).warn,delete t.warn;var r=t.delimiters?String(t.delimiters)+e:e;if(l[r])return l[r];var i=c(e,t),o={},a=[];return o.render=xa(i.render,a),o.staticRenderFns=i.staticRenderFns.map(function(e){return xa(e,a)}),l[r]=o})};var c,l})(Yo).compileToFunctions;function Sa(e){return(Aa=Aa||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',0<Aa.innerHTML.indexOf(" ")}var Ta=!!B&&Sa(!1),Ea=!!B&&Sa(!0),ja=e(function(e){var t=Jn(e);return t&&t.innerHTML}),Na=hn.prototype.$mount;return hn.prototype.$mount=function(e,t){if((e=e&&Jn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=ja(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){{if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}}(e));if(r){var i=Oa(r,{shouldDecodeNewlines:Ta,shouldDecodeNewlinesForHref:Ea,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return Na.call(this,e,t)},hn.compile=Oa,hn});
|
1 |
/*!
|
2 |
+
* Vue.js v2.6.12
|
3 |
+
* (c) 2014-2020 Evan You
|
4 |
* Released under the MIT License.
|
5 |
*/
|
6 |
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function l(e){return null==e?"":Array.isArray(e)||s(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function p(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var d=p("slot,component",!0),v=p("key,ref,slot,slot-scope,is");function h(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var m=Object.prototype.hasOwnProperty;function y(e,t){return m.call(e,t)}function g(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var _=/-(\w)/g,b=g(function(e){return e.replace(_,function(e,t){return t?t.toUpperCase():""})}),$=g(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),w=/\B([A-Z])/g,C=g(function(e){return e.replace(w,"-$1").toLowerCase()});var x=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function k(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function A(e,t){for(var n in t)e[n]=t[n];return e}function O(e){for(var t={},n=0;n<e.length;n++)e[n]&&A(t,e[n]);return t}function S(e,t,n){}var T=function(e,t,n){return!1},E=function(e){return e};function N(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),a=Array.isArray(t);if(i&&a)return e.length===t.length&&e.every(function(e,n){return N(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every(function(n){return N(e[n],t[n])})}catch(e){return!1}}function j(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",M=["component","directive","filter"],I=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:T,isReservedAttr:T,isUnknownElement:T,getTagNamespace:S,parsePlatformTagName:E,mustUseProp:T,async:!0,_lifecycleHooks:I},P=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function R(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var H=new RegExp("[^"+P.source+".$_\\d]");var B,U="__proto__"in{},z="undefined"!=typeof window,V="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=V&&WXEnvironment.platform.toLowerCase(),J=z&&window.navigator.userAgent.toLowerCase(),q=J&&/msie|trident/.test(J),W=J&&J.indexOf("msie 9.0")>0,Z=J&&J.indexOf("edge/")>0,G=(J&&J.indexOf("android"),J&&/iphone|ipad|ipod|ios/.test(J)||"ios"===K),X=(J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J),J&&J.match(/firefox\/(\d+)/)),Y={}.watch,Q=!1;if(z)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){Q=!0}}),window.addEventListener("test-passive",null,ee)}catch(e){}var te=function(){return void 0===B&&(B=!z&&!V&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),B},ne=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function re(e){return"function"==typeof e&&/native code/.test(e.toString())}var ie,oe="undefined"!=typeof Symbol&&re(Symbol)&&"undefined"!=typeof Reflect&&re(Reflect.ownKeys);ie="undefined"!=typeof Set&&re(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ae=S,se=0,ce=function(){this.id=se++,this.subs=[]};ce.prototype.addSub=function(e){this.subs.push(e)},ce.prototype.removeSub=function(e){h(this.subs,e)},ce.prototype.depend=function(){ce.target&&ce.target.addDep(this)},ce.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},ce.target=null;var ue=[];function le(e){ue.push(e),ce.target=e}function fe(){ue.pop(),ce.target=ue[ue.length-1]}var pe=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},de={child:{configurable:!0}};de.child.get=function(){return this.componentInstance},Object.defineProperties(pe.prototype,de);var ve=function(e){void 0===e&&(e="");var t=new pe;return t.text=e,t.isComment=!0,t};function he(e){return new pe(void 0,void 0,void 0,String(e))}function me(e){var t=new pe(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ye=Array.prototype,ge=Object.create(ye);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ye[e];R(ge,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var _e=Object.getOwnPropertyNames(ge),be=!0;function $e(e){be=e}var we=function(e){var t;this.value=e,this.dep=new ce,this.vmCount=0,R(e,"__ob__",this),Array.isArray(e)?(U?(t=ge,e.__proto__=t):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];R(e,o,t[o])}}(e,ge,_e),this.observeArray(e)):this.walk(e)};function Ce(e,t){var n;if(o(e)&&!(e instanceof pe))return y(e,"__ob__")&&e.__ob__ instanceof we?n=e.__ob__:be&&!te()&&(Array.isArray(e)||s(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new we(e)),t&&n&&n.vmCount++,n}function xe(e,t,n,r,i){var o=new ce,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var u=!i&&Ce(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return ce.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(t)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!c||(c?c.call(e,t):n=t,u=!i&&Ce(t),o.notify())}})}}function ke(e,t,n){if(Array.isArray(e)&&c(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(xe(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ae(e,t){if(Array.isArray(e)&&c(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||y(e,t)&&(delete e[t],n&&n.dep.notify())}}we.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)xe(e,t[n])},we.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ce(e[t])};var Oe=F.optionMergeStrategies;function Se(e,t){if(!t)return e;for(var n,r,i,o=oe?Reflect.ownKeys(t):Object.keys(t),a=0;a<o.length;a++)"__ob__"!==(n=o[a])&&(r=e[n],i=t[n],y(e,n)?r!==i&&s(r)&&s(i)&&Se(r,i):ke(e,n,i));return e}function Te(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?Se(r,i):i}:t?e?function(){return Se("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Ee(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ne(e,t,n,r){var i=Object.create(e||null);return t?A(i,t):i}Oe.data=function(e,t,n){return n?Te(e,t,n):t&&"function"!=typeof t?e:Te(e,t)},I.forEach(function(e){Oe[e]=Ee}),M.forEach(function(e){Oe[e+"s"]=Ne}),Oe.watch=function(e,t,n,r){if(e===Y&&(e=void 0),t===Y&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in A(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Oe.props=Oe.methods=Oe.inject=Oe.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return A(i,e),t&&A(i,t),i},Oe.provide=Te;var je=function(e,t){return void 0===t?e:t};function De(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[b(i)]={type:null});else if(s(n))for(var a in n)i=n[a],o[b(a)]=s(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(s(n))for(var o in n){var a=n[o];r[o]=s(a)?A({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=De(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=De(e,t.mixins[r],n);var o,a={};for(o in e)c(o);for(o in t)y(e,o)||c(o);function c(r){var i=Oe[r]||je;a[r]=i(e[r],t[r],n,r)}return a}function Le(e,t,n,r){if("string"==typeof n){var i=e[t];if(y(i,n))return i[n];var o=b(n);if(y(i,o))return i[o];var a=$(o);return y(i,a)?i[a]:i[n]||i[o]||i[a]}}function Me(e,t,n,r){var i=t[e],o=!y(n,e),a=n[e],s=Pe(Boolean,i.type);if(s>-1)if(o&&!y(i,"default"))a=!1;else if(""===a||a===C(e)){var c=Pe(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!y(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ie(t.type)?r.call(e):r}(r,i,e);var u=be;$e(!0),Ce(a),$e(u)}return a}function Ie(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Fe(e,t){return Ie(e)===Ie(t)}function Pe(e,t){if(!Array.isArray(t))return Fe(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Fe(t[n],e))return n;return-1}function Re(e,t,n){le();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Be(e,r,"errorCaptured hook")}}Be(e,t,n)}finally{fe()}}function He(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&u(o)&&!o._handled&&(o.catch(function(e){return Re(e,r,i+" (Promise/async)")}),o._handled=!0)}catch(e){Re(e,r,i)}return o}function Be(e,t,n){if(F.errorHandler)try{return F.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Ue(t,null,"config.errorHandler")}Ue(e,t,n)}function Ue(e,t,n){if(!z&&!V||"undefined"==typeof console)throw e;console.error(e)}var ze,Ve=!1,Ke=[],Je=!1;function qe(){Je=!1;var e=Ke.slice(0);Ke.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&re(Promise)){var We=Promise.resolve();ze=function(){We.then(qe),G&&setTimeout(S)},Ve=!0}else if(q||"undefined"==typeof MutationObserver||!re(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())ze="undefined"!=typeof setImmediate&&re(setImmediate)?function(){setImmediate(qe)}:function(){setTimeout(qe,0)};else{var Ze=1,Ge=new MutationObserver(qe),Xe=document.createTextNode(String(Ze));Ge.observe(Xe,{characterData:!0}),ze=function(){Ze=(Ze+1)%2,Xe.data=String(Ze)},Ve=!0}function Ye(e,t){var n;if(Ke.push(function(){if(e)try{e.call(t)}catch(e){Re(e,t,"nextTick")}else n&&n(t)}),Je||(Je=!0,ze()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var Qe=new ie;function et(e){!function e(t,n){var r,i;var a=Array.isArray(t);if(!a&&!o(t)||Object.isFrozen(t)||t instanceof pe)return;if(t.__ob__){var s=t.__ob__.dep.id;if(n.has(s))return;n.add(s)}if(a)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,Qe),Qe.clear()}var tt=g(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function nt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return He(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)He(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function rt(e,n,i,o,a,s){var c,u,l,f;for(c in e)u=e[c],l=n[c],f=tt(c),t(u)||(t(l)?(t(u.fns)&&(u=e[c]=nt(u,s)),r(f.once)&&(u=e[c]=a(f.name,u,f.capture)),i(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,e[c]=l));for(c in n)t(e[c])&&o((f=tt(c)).name,n[c],f.capture)}function it(e,i,o){var a;e instanceof pe&&(e=e.data.hook||(e.data.hook={}));var s=e[i];function c(){o.apply(this,arguments),h(a.fns,c)}t(s)?a=nt([c]):n(s.fns)&&r(s.merged)?(a=s).fns.push(c):a=nt([s,c]),a.merged=!0,e[i]=a}function ot(e,t,r,i,o){if(n(t)){if(y(t,r))return e[r]=t[r],o||delete t[r],!0;if(y(t,i))return e[r]=t[i],o||delete t[i],!0}return!1}function at(e){return i(e)?[he(e)]:Array.isArray(e)?function e(o,a){var s=[];var c,u,l,f;for(c=0;c<o.length;c++)t(u=o[c])||"boolean"==typeof u||(l=s.length-1,f=s[l],Array.isArray(u)?u.length>0&&(st((u=e(u,(a||"")+"_"+c))[0])&&st(f)&&(s[l]=he(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?st(f)?s[l]=he(f.text+u):""!==u&&s.push(he(u)):st(u)&&st(f)?s[l]=he(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function st(e){return n(e)&&n(e.text)&&!1===e.isComment}function ct(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var a=e[o].from,s=t;s;){if(s._provided&&y(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var c=e[o].default;n[o]="function"==typeof c?c.call(t):c}}}return n}}function ut(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var u in n)n[u].every(lt)&&delete n[u];return n}function lt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function ft(t,n,r){var i,o=Object.keys(n).length>0,a=t?!!t.$stable:!o,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!o&&!r.$hasNormal)return r;for(var c in i={},t)t[c]&&"$"!==c[0]&&(i[c]=pt(n,c,t[c]))}else i={};for(var u in n)u in i||(i[u]=dt(n,u));return t&&Object.isExtensible(t)&&(t._normalized=i),R(i,"$stable",a),R(i,"$key",s),R(i,"$hasNormal",o),i}function pt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:at(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function dt(e,t){return function(){return e[t]}}function vt(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;i<a;i++)r[i]=t(e[i],i);else if("number"==typeof e)for(r=new Array(e),i=0;i<e;i++)r[i]=t(i+1,i);else if(o(e))if(oe&&e[Symbol.iterator]){r=[];for(var u=e[Symbol.iterator](),l=u.next();!l.done;)r.push(t(l.value,r.length)),l=u.next()}else for(s=Object.keys(e),r=new Array(s.length),i=0,a=s.length;i<a;i++)c=s[i],r[i]=t(e[c],c,i);return n(r)||(r=[]),r._isVList=!0,r}function ht(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=A(A({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function mt(e){return Le(this.$options,"filters",e)||E}function yt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function gt(e,t,n,r,i){var o=F.keyCodes[t]||n;return i&&r&&!F.keyCodes[t]?yt(i,r):o?yt(o,e):r?C(r)!==t:void 0}function _t(e,t,n,r,i){if(n)if(o(n)){var a;Array.isArray(n)&&(n=O(n));var s=function(o){if("class"===o||"style"===o||v(o))a=e;else{var s=e.attrs&&e.attrs.type;a=r||F.mustUseProp(t,s,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=b(o),u=C(o);c in a||u in a||(a[o]=n[o],i&&((e.on||(e.on={}))["update:"+o]=function(e){n[o]=e}))};for(var c in n)s(c)}else;return e}function bt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t?r:(wt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r)}function $t(e,t,n){return wt(e,"__once__"+t+(n?"_"+n:""),!0),e}function wt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Ct(e[r],t+"_"+r,n);else Ct(e,t,n)}function Ct(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function xt(e,t){if(t)if(s(t)){var n=e.on=e.on?A({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function kt(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?kt(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function At(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function Ot(e,t){return"string"==typeof e?t+e:e}function St(e){e._o=$t,e._n=f,e._s=l,e._l=vt,e._t=ht,e._q=N,e._i=j,e._m=bt,e._f=mt,e._k=gt,e._b=_t,e._v=he,e._e=ve,e._u=kt,e._g=xt,e._d=At,e._p=Ot}function Tt(t,n,i,o,a){var s,c=this,u=a.options;y(o,"_uid")?(s=Object.create(o))._original=o:(s=o,o=o._original);var l=r(u._compiled),f=!l;this.data=t,this.props=n,this.children=i,this.parent=o,this.listeners=t.on||e,this.injections=ct(u.inject,o),this.slots=function(){return c.$slots||ft(t.scopedSlots,c.$slots=ut(i,o)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ft(t.scopedSlots,this.slots())}}),l&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ft(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(e,t,n,r){var i=Pt(s,e,t,n,r,f);return i&&!Array.isArray(i)&&(i.fnScopeId=u._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return Pt(s,e,t,n,r,f)}}function Et(e,t,n,r,i){var o=me(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function Nt(e,t){for(var n in t)e[b(n)]=t[n]}St(Tt.prototype);var jt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var r=e;jt.prepatch(r,r)}else{(e.componentInstance=function(e,t){var r={_isComponent:!0,_parentVnode:e,parent:t},i=e.data.inlineTemplate;n(i)&&(r.render=i.render,r.staticRenderFns=i.staticRenderFns);return new e.componentOptions.Ctor(r)}(e,Wt)).$mount(t?e.elm:void 0,t)}},prepatch:function(t,n){var r=n.componentOptions;!function(t,n,r,i,o){var a=i.data.scopedSlots,s=t.$scopedSlots,c=!!(a&&!a.$stable||s!==e&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),u=!!(o||t.$options._renderChildren||c);t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i);if(t.$options._renderChildren=o,t.$attrs=i.data.attrs||e,t.$listeners=r||e,n&&t.$options.props){$e(!1);for(var l=t._props,f=t.$options._propKeys||[],p=0;p<f.length;p++){var d=f[p],v=t.$options.props;l[d]=Me(d,v,n,t)}$e(!0),t.$options.propsData=n}r=r||e;var h=t.$options._parentListeners;t.$options._parentListeners=r,qt(t,r,h),u&&(t.$slots=ut(o,i.context),t.$forceUpdate())}(n.componentInstance=t.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Yt(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,en.push(t)):Xt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,Gt(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);Yt(t,"deactivated")}}(t,!0):t.$destroy())}},Dt=Object.keys(jt);function Lt(i,a,s,c,l){if(!t(i)){var f=s.$options._base;if(o(i)&&(i=f.extend(i)),"function"==typeof i){var p;if(t(i.cid)&&void 0===(i=function(e,i){if(r(e.error)&&n(e.errorComp))return e.errorComp;if(n(e.resolved))return e.resolved;var a=Ht;a&&n(e.owners)&&-1===e.owners.indexOf(a)&&e.owners.push(a);if(r(e.loading)&&n(e.loadingComp))return e.loadingComp;if(a&&!n(e.owners)){var s=e.owners=[a],c=!0,l=null,f=null;a.$on("hook:destroyed",function(){return h(s,a)});var p=function(e){for(var t=0,n=s.length;t<n;t++)s[t].$forceUpdate();e&&(s.length=0,null!==l&&(clearTimeout(l),l=null),null!==f&&(clearTimeout(f),f=null))},d=D(function(t){e.resolved=Bt(t,i),c?s.length=0:p(!0)}),v=D(function(t){n(e.errorComp)&&(e.error=!0,p(!0))}),m=e(d,v);return o(m)&&(u(m)?t(e.resolved)&&m.then(d,v):u(m.component)&&(m.component.then(d,v),n(m.error)&&(e.errorComp=Bt(m.error,i)),n(m.loading)&&(e.loadingComp=Bt(m.loading,i),0===m.delay?e.loading=!0:l=setTimeout(function(){l=null,t(e.resolved)&&t(e.error)&&(e.loading=!0,p(!1))},m.delay||200)),n(m.timeout)&&(f=setTimeout(function(){f=null,t(e.resolved)&&v(null)},m.timeout)))),c=!1,e.loading?e.loadingComp:e.resolved}}(p=i,f)))return function(e,t,n,r,i){var o=ve();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(p,a,s,c,l);a=a||{},$n(i),n(a.model)&&function(e,t){var r=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[r]=t.model.value;var o=t.on||(t.on={}),a=o[i],s=t.model.callback;n(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[i]=[s].concat(a)):o[i]=s}(i.options,a);var d=function(e,r,i){var o=r.options.props;if(!t(o)){var a={},s=e.attrs,c=e.props;if(n(s)||n(c))for(var u in o){var l=C(u);ot(a,c,u,l,!0)||ot(a,s,u,l,!1)}return a}}(a,i);if(r(i.options.functional))return function(t,r,i,o,a){var s=t.options,c={},u=s.props;if(n(u))for(var l in u)c[l]=Me(l,u,r||e);else n(i.attrs)&&Nt(c,i.attrs),n(i.props)&&Nt(c,i.props);var f=new Tt(i,c,a,o,t),p=s.render.call(null,f._c,f);if(p instanceof pe)return Et(p,i,f.parent,s);if(Array.isArray(p)){for(var d=at(p)||[],v=new Array(d.length),h=0;h<d.length;h++)v[h]=Et(d[h],i,f.parent,s);return v}}(i,d,a,s,c);var v=a.on;if(a.on=a.nativeOn,r(i.options.abstract)){var m=a.slot;a={},m&&(a.slot=m)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Dt.length;n++){var r=Dt[n],i=t[r],o=jt[r];i===o||i&&i._merged||(t[r]=i?Mt(o,i):o)}}(a);var y=i.options.name||l;return new pe("vue-component-"+i.cid+(y?"-"+y:""),a,void 0,void 0,void 0,s,{Ctor:i,propsData:d,listeners:v,tag:l,children:c},p)}}}function Mt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var It=1,Ft=2;function Pt(e,a,s,c,u,l){return(Array.isArray(s)||i(s))&&(u=c,c=s,s=void 0),r(l)&&(u=Ft),function(e,i,a,s,c){if(n(a)&&n(a.__ob__))return ve();n(a)&&n(a.is)&&(i=a.is);if(!i)return ve();Array.isArray(s)&&"function"==typeof s[0]&&((a=a||{}).scopedSlots={default:s[0]},s.length=0);c===Ft?s=at(s):c===It&&(s=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(s));var u,l;if("string"==typeof i){var f;l=e.$vnode&&e.$vnode.ns||F.getTagNamespace(i),u=F.isReservedTag(i)?new pe(F.parsePlatformTagName(i),a,s,void 0,void 0,e):a&&a.pre||!n(f=Le(e.$options,"components",i))?new pe(i,a,s,void 0,void 0,e):Lt(f,a,e,s,i)}else u=Lt(i,a,e,s);return Array.isArray(u)?u:n(u)?(n(l)&&function e(i,o,a){i.ns=o;"foreignObject"===i.tag&&(o=void 0,a=!0);if(n(i.children))for(var s=0,c=i.children.length;s<c;s++){var u=i.children[s];n(u.tag)&&(t(u.ns)||r(a)&&"svg"!==u.tag)&&e(u,o,a)}}(u,l),n(a)&&function(e){o(e.style)&&et(e.style);o(e.class)&&et(e.class)}(a),u):ve()}(e,a,s,c,u)}var Rt,Ht=null;function Bt(e,t){return(e.__esModule||oe&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function Ut(e){return e.isComment&&e.asyncFactory}function zt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t];if(n(r)&&(n(r.componentOptions)||Ut(r)))return r}}function Vt(e,t){Rt.$on(e,t)}function Kt(e,t){Rt.$off(e,t)}function Jt(e,t){var n=Rt;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function qt(e,t,n){Rt=e,rt(t,n||{},Vt,Kt,Jt,e),Rt=void 0}var Wt=null;function Zt(e){var t=Wt;return Wt=e,function(){Wt=t}}function Gt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Xt(e,t){if(t){if(e._directInactive=!1,Gt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Xt(e.$children[n]);Yt(e,"activated")}}function Yt(e,t){le();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)He(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),fe()}var Qt=[],en=[],tn={},nn=!1,rn=!1,on=0;var an=0,sn=Date.now;if(z&&!q){var cn=window.performance;cn&&"function"==typeof cn.now&&sn()>document.createEvent("Event").timeStamp&&(sn=function(){return cn.now()})}function un(){var e,t;for(an=sn(),rn=!0,Qt.sort(function(e,t){return e.id-t.id}),on=0;on<Qt.length;on++)(e=Qt[on]).before&&e.before(),t=e.id,tn[t]=null,e.run();var n=en.slice(),r=Qt.slice();on=Qt.length=en.length=0,tn={},nn=rn=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Xt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Yt(r,"updated")}}(r),ne&&F.devtools&&ne.emit("flush")}var ln=0,fn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++ln,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ie,this.newDepIds=new ie,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!H.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=S)),this.value=this.lazy?void 0:this.get()};fn.prototype.get=function(){var e;le(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Re(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&et(e),fe(),this.cleanupDeps()}return e},fn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},fn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},fn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==tn[t]){if(tn[t]=!0,rn){for(var n=Qt.length-1;n>on&&Qt[n].id>e.id;)n--;Qt.splice(n+1,0,e)}else Qt.push(e);nn||(nn=!0,Ye(un))}}(this)},fn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Re(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},fn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},fn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},fn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||h(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var pn={enumerable:!0,configurable:!0,get:S,set:S};function dn(e,t,n){pn.get=function(){return this[t][n]},pn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,pn)}function vn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&$e(!1);var o=function(o){i.push(o);var a=Me(o,t,n,e);xe(r,o,a),o in e||dn(e,"_props",o)};for(var a in t)o(a);$e(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?S:x(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){le();try{return e.call(t,t)}catch(e){return Re(e,t,"data()"),{}}finally{fe()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&y(r,o)||(a=void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&dn(e,"_data",o))}var a;Ce(t,!0)}(e):Ce(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=te();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new fn(e,a||S,S,hn)),i in e||mn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==Y&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)_n(e,n,r[i]);else _n(e,n,r)}}(e,t.watch)}var hn={lazy:!0};function mn(e,t,n){var r=!te();"function"==typeof n?(pn.get=r?yn(t):gn(n),pn.set=S):(pn.get=n.get?r&&!1!==n.cache?yn(t):gn(n.get):S,pn.set=n.set||S),Object.defineProperty(e,t,pn)}function yn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),ce.target&&t.depend(),t.value}}function gn(e){return function(){return e.call(this,this)}}function _n(e,t,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var bn=0;function $n(e){var t=e.options;if(e.super){var n=$n(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&A(e.extendOptions,r),(t=e.options=De(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function wn(e){this._init(e)}function Cn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=De(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)dn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)mn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,M.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=A({},a.options),i[r]=a,a}}function xn(e){return e&&(e.Ctor.options.name||e.tag)}function kn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=xn(a.componentOptions);s&&!t(s)&&On(n,o,r,i)}}}function On(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,h(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=bn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=De($n(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&qt(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=ut(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return Pt(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pt(t,e,n,r,i,!0)};var o=r&&r.data;xe(t,"$attrs",o&&o.attrs||e,null,!0),xe(t,"$listeners",n._parentListeners||e,null,!0)}(n),Yt(n,"beforeCreate"),function(e){var t=ct(e.$options.inject,e);t&&($e(!1),Object.keys(t).forEach(function(n){xe(e,n,t[n])}),$e(!0))}(n),vn(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),Yt(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(wn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=ke,e.prototype.$delete=Ae,e.prototype.$watch=function(e,t,n){if(s(t))return _n(this,e,t,n);(n=n||{}).user=!0;var r=new fn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Re(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(wn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((o=a[s])===t||o.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this._events[e];if(t){t=t.length>1?k(t):t;for(var n=k(arguments,1),r='event handler for "'+e+'"',i=0,o=t.length;i<o;i++)He(t[i],this,n,this,r)}return this}}(wn),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Zt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Yt(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||h(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Yt(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(wn),function(e){St(e.prototype),e.prototype.$nextTick=function(e){return Ye(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=ft(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Ht=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){Re(n,t,"render"),e=t._vnode}finally{Ht=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof pe||(e=ve()),e.parent=i,e}}(wn);var Sn=[String,RegExp,Array],Tn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Sn,exclude:Sn,max:[String,Number]},created:function(){this.cache=Object.create(n
|