8 lines
136 KiB
JavaScript
8 lines
136 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e4a7"],{"987z":function(t,e,n){t.exports=function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=25)}([function(t,e){function n(t){if(null==t||"object"!=typeof t)return t;var e=t,r=v.call(t);if("[object Array]"===r){e=[];for(var i=0,a=t.length;i<a;i++)e[i]=n(t[i])}else if(g[r]){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(var i=0,a=t.length;i<a;i++)e[i]=n(t[i])}}else if(!d[r]&&!c(t)&&!u(t))for(var s in e={},t)t.hasOwnProperty(s)&&(e[s]=n(t[s]));return e}function r(t,e,i){if(!l(e)||!l(t))return i?n(e):t;for(var a in e)if(e.hasOwnProperty(a)){var o=t[a],f=e[a];!l(f)||!l(o)||s(f)||s(o)||u(f)||u(o)||h(f)||h(o)||c(f)||c(o)?!i&&a in t||(t[a]=n(e[a])):r(o,f,i)}return t}function i(t,e,n){for(var r in e)e.hasOwnProperty(r)&&(n?null!=e[r]:null==t[r])&&(t[r]=e[r]);return t}function a(t,e,n){if(t&&e)if(t.forEach&&t.forEach===m)t.forEach(e,n);else if(t.length===+t.length)for(var r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function o(t,e){var n=y.call(arguments,2);return function(){return t.apply(e,n.concat(y.call(arguments)))}}function s(t){return"[object Array]"===v.call(t)}function l(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function h(t){return!!d[v.call(t)]}function u(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function c(t){return t[T]}function f(t){t&&a(t,function(t,e){this.set(e,t)},this)}var d={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},g={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},v=Object.prototype.toString,p=Array.prototype,m=p.forEach,x=p.filter,y=p.slice,w=p.map,_=p.reduce,b={},S=function(){return b.createCanvas()};b.createCanvas=function(){return document.createElement("canvas")};var M,T="__ec_primitive__";f.prototype={constructor:f,get:function(t){return this["_ec_"+t]},set:function(t,e){return this["_ec_"+t]=e,e},each:function(t,e){for(var n in void 0!==e&&(t=o(t,e)),this)this.hasOwnProperty(n)&&t(this[n],n.slice(4))},removeKey:function(t){delete this["_ec_"+t]}},e.$override=function(t,e){b[t]=e},e.clone=n,e.merge=r,e.mergeAll=function(t,e){for(var n=t[0],i=1,a=t.length;i<a;i++)n=r(n,t[i],e);return n},e.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},e.defaults=i,e.createCanvas=S,e.getContext=function(){return M||(M=S().getContext("2d")),M},e.indexOf=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n}return-1},e.inherits=function(t,e){function n(){}var r=t.prototype;for(var i in n.prototype=e.prototype,t.prototype=new n,r)t.prototype[i]=r[i];t.prototype.constructor=t,t.superClass=e},e.mixin=function(t,e,n){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i(t,e,n)},e.isArrayLike=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},e.each=a,e.map=function(t,e,n){if(t&&e){if(t.map&&t.map===w)return t.map(e,n);for(var r=[],i=0,a=t.length;i<a;i++)r.push(e.call(n,t[i],i,t));return r}},e.reduce=function(t,e,n,r){if(t&&e){if(t.reduce&&t.reduce===_)return t.reduce(e,n,r);for(var i=0,a=t.length;i<a;i++)n=e.call(r,n,t[i],i,t);return n}},e.filter=function(t,e,n){if(t&&e){if(t.filter&&t.filter===x)return t.filter(e,n);for(var r=[],i=0,a=t.length;i<a;i++)e.call(n,t[i],i,t)&&r.
|
|||
|
/*!
|
|||
|
* wordcloud2.js
|
|||
|
* http://timdream.org/wordcloud2.js/
|
|||
|
*
|
|||
|
* Copyright 2011 - 2013 Tim Chien
|
|||
|
* Released under the MIT license
|
|||
|
*/window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message";return window.addEventListener("message",function(n){if("string"==typeof n.data&&n.data.substr(0,e.length)===e){n.stopImmediatePropagation();var r=parseInt(n.data.substr(e.length),36);t[r]&&(t[r](),t[r]=void 0)}},!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},function(n){var r=t.length;return t.push(n),window.postMessage(e+r.toString(36),"*"),r}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}),function(n){var i=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!(e.getImageData&&e.fillText&&Array.prototype.some&&Array.prototype.push)}(),a=function(){if(i){for(var t,e,n=document.createElement("canvas").getContext("2d"),r=20;r;){if(n.font=r.toString(10)+"px sans-serif",n.measureText("W").width===t&&n.measureText("m").width===e)return r+1;t=n.measureText("W").width,e=n.measureText("m").width,r--}return 0}}(),o=function(t){for(var e,n,r=t.length;r;e=Math.floor(Math.random()*r),n=t[--r],t[r]=t[e],t[e]=n);return t},s=function(t,e){function n(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}if(i){Array.isArray(t)||(t=[t]),t.forEach(function(e,n){if("string"==typeof e){if(t[n]=document.getElementById(e),!t[n])throw"The element id specified is not found."}else if(!e.tagName&&!e.appendChild)throw"You must pass valid HTML elements, or ID of the element."});var r={list:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minSize:0,weightFactor:1,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotationStep:.1,shuffle:!0,rotateRatio:.1,shape:"circle",ellipticity:.65,classes:null,hover:null,click:null};if(e)for(var s in e)s in r&&(r[s]=e[s]);if("function"!=typeof r.weightFactor){var l=r.weightFactor;r.weightFactor=function(t){return t*l}}if("function"!=typeof r.shape)switch(r.shape){case"circle":default:r.shape="circle";break;case"cardioid":r.shape=function(t){return 1-Math.sin(t)};break;case"diamond":case"square":r.shape=function(t){var e=t%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"triangle-forward":r.shape=function(t){var e=t%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle":case"triangle-upright":r.shape=function(t){var e=(t+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"pentagon":r.shape=function(t){var e=(t+.955)%(2*Math.PI/5);return 1/(Math.cos(e)+.726543*Math.sin(e))};break;case"star":r.shape=function(t){var e=(t+.955)%(2*Math.PI/10);return(t+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}r.gridSize=Math.max(Math.floor(r.gridSize),4);var h,u,c,f,d,g,v,p=r.gridSize,m=p-r.maskGapWidth,x=Math.abs(r.maxRotation-r.minRotation),y=Math.min(r.maxRotation,r.minRotation),w=r.rotationStep;switch(r.color){case"random-dark":v=function(){return n(10,50)};break;case"random-light":v=function(){return n(50,90)};break;default:"function"==typeof r.color&&(v=r.color)}var _=null;"function"==typeof r.classes&&(_=r.classes);var b,S=!1,M=[],T=function(t){var e,n,r=t.currentTarget,i=r.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,n=t.touches[0].clientY):(e=t.clientX,n=t.clientY);var a=e-i.left,o=n-i.top,s=Math.floor(a*(r.width/i.width||1)/p),l=Math.floor(o*(r.height/i.height||1)/p);return M[s][l]},k=function(t)
|