/* Highcharts JS v9.1.1 (2021-06-03) (c) 2016-2021 Highsoft AS Authors: Jon Arild Nygard License: www.highcharts.com/license */ 'use strict';(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/wordcloud",["highcharts"],function(l){a(l);a.Highcharts=l;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function l(a,d,h,z){a.hasOwnProperty(d)||(a[d]=z.apply(null,h))}a=a?a._modules:{};l(a,"Mixins/Polygon.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,d){var h=d.find,z=d.isArray,k=d.isNumber, p=a.deg2rad,g=function(e,b){b=k(b)?b:14;b=Math.pow(10,b);return Math.round(e*b)/b},t=function(e,b){var c=b[0]-e[0];e=b[1]-e[1];return[[-e,c],[e,-c]]},u=function(e,b){e=e.map(function(c){return c[0]*b[0]+c[1]*b[1]});return{min:Math.min.apply(this,e),max:Math.max.apply(this,e)}},m=function(e,b){var c=e[0];e=e[1];var f=p*-b;b=Math.cos(f);f=Math.sin(f);return[g(c*b-e*f),g(c*f+e*b)]},A=function(e,b,c){e=m([e[0]-b[0],e[1]-b[1]],c);return[e[0]+b[0],e[1]+b[1]]},y=function(e){var b=e.axes;if(!z(b)){b=[];var c= c=e.concat([e[0]]);c.reduce(function(c,B){var f=t(c,B)[0];h(b,function(c){return c[0]===f[0]&&c[1]===f[1]})||b.push(f);return B});e.axes=b}return b},l=function(e,b){e=y(e);b=y(b);return e.concat(b)};return{getBoundingBoxFromPolygon:function(e){return e.reduce(function(b,c){var f=c[0];c=c[1];b.left=Math.min(f,b.left);b.right=Math.max(f,b.right);b.bottom=Math.max(c,b.bottom);b.top=Math.min(c,b.top);return b},{left:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,top:Number.MAX_VALUE})}, getPolygon:function(e,b,c,f,B){var g=[e,b],C=e-c/2;e+=c/2;c=b-f/2;b+=f/2;return[[C,c],[e,c],[e,b],[C,b]].map(function(c){return A(c,g,-B)})},isPolygonsColliding:function(e,b){var c=l(e,b);return!h(c,function(c){var f=u(e,c);c=u(b,c);return!!(c.min>f.max||c.maxc.right||f.rightc.bottom||f.bottom=c&&("boolean"===typeof e&&f>=d-b&&(e={x:a-(d-f),y:-a}),d-=b,"boolean"===typeof e&&f>=d-b&&(e={x:-a,y:-a+(d-f)}),d-=b,"boolean"===typeof e&&(e=f>=d-b?{x:-a+(d-f),y:a}:{x:a,y:a-(d-f-b)}),e.x*=5,e.y*=5);return e}function b(c,f){var a=f.width/2,b=-(f.height/2),d=f.height/2;return!(-(f.width/2)c.right&&bc.bottom)}a.isRectanglesIntersecting=d;a.intersectsAnyWord=m;a.archimedeanSpiral=function(c, f){var a=f.field;f=!1;a=a.width*a.width+a.height*a.height;var b=.8*c;1E4>=c&&(f={x:b*Math.cos(b),y:b*Math.sin(b)},Math.min(Math.abs(f.x),Math.abs(f.y))a?c/a:1;c=a>c?a/c:1;return{width:b*f,height:b*c,ratioX:f,ratioY:c}};a.getRotation=function(c,a,b,d){var f=!1;g(c)&&g(a)&&g(b)&&g(d)&&0b&&(f=b+a%c*((d-b)/(c- 1||1)));return f};a.getSpiral=function(c,a){var b,f=[];for(b=1;1E4>b;b++)f.push(c(b,a));return function(c){return 1E4>=c?f[c-1]:!1}};a.outsidePlayingField=b;a.intersectionTesting=function(c,a){var f=a.placed,d=a.field,e=a.rectangle,g=a.polygon,q=a.spiral,v=1,n={x:0,y:0},h=c.rect=k({},e);c.polygon=g;for(c.rotation=a.rotation;!1!==n&&(m(c,f)||b(h,d));)n=q(v),t(n)&&(h.left=e.left+n.x,h.right=e.right+n.x,h.top=e.top+n.y,h.bottom=e.bottom+n.y,c.polygon=l(n.x,n.y,g)),v++;return n};a.extendPlayingField= function(a,b){if(t(a)&&t(b)){var c=b.bottom-b.top;var f=b.right-b.left;b=a.ratioX;var d=a.ratioY;c=f*b>c*d?f:c;a=u(a,{width:a.width+c*b*2,height:a.height+c*d*2})}return a};a.updateFieldBoundaries=function(a,b){if(!g(a.left)||a.left>b.left)a.left=b.left;if(!g(a.right)||a.rightb.top)a.top=b.top;if(!g(a.bottom)||a.bottom\u25cf {series.name}: {point.weight}
'}});return r}(e);b(k.prototype,{animate:h.prototype.animate,animateDrilldown:u,animateDrillupFrom:u,pointClass:p, setClip:u,placementStrategy:{random:function(a,b){var c=b.field;b=b.rotation;return{x:g.getRandomPosition(c.width)-c.width/2,y:g.getRandomPosition(c.height)-c.height/2,rotation:g.getRotation(b.orientations,a.index,b.from,b.to)}},center:function(a,b){b=b.rotation;return{x:0,y:0,rotation:g.getRotation(b.orientations,a.index,b.from,b.to)}}},pointArrayMap:["weight"],spirals:{archimedean:g.archimedeanSpiral,rectangular:g.rectangularSpiral,square:g.squareSpiral},utils:{extendPlayingField:g.extendPlayingField, getRotation:g.getRotation,isPolygonsColliding:z,rotate2DToOrigin:y,rotate2DToPoint:d}});l.registerSeriesType("wordcloud",k);"";return k});l(a,"masters/modules/wordcloud.src.js",[],function(){})}); //# sourceMappingURL=wordcloud.js.map