UNPKG

o-menu

Version:

Simple circular context menu based on svg

11 lines 122 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.oMenu=e():t.oMenu=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=25)}([function(t,e,n){var i,r,s;r=[e],void 0===(s="function"==typeof(i=function(t){"use strict";var e;function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(t,"__esModule",{value:!0});var i=t.POSITION_MODES={fixed:"relativeToScreen",relative:"relativeToParent"},r=t.MENU_DEFAULTS={padding:10,positioningMode:i.relative,elClass:"circle-menu",circleDegOrigin:-90,innerCircleWidth:45,innerCircleContent:"",firstLevelSliceWidth:70,nthLevelSliceWidth:50,menuShowTime:100,menuHideTime:100,closeMenuOn:"click",styles:{innerCircle:{strokeColor:"",strokeWidth:"",fill:"#fff"},hidden:{zIndex:-1,visibility:"hidden"},visible:{zIndex:9999,visibility:"visible"},defaults:{}}},s=t.SLICE_DEFAULTS={contentSize:38,contentMoveX:0,contentMoveY:0,parentFillMode:0,iconDistanceFromInnerCircle:0,content:null,sliceClass:"circle-slice",sliceShowTime:100,sliceHideTime:100,slices:[],value:null,styles:{defaults:{cursor:"pointer",fill:"#f1f1f1"},contentContainer:{color:"red",fontSize:38,cursor:"pointer"},hover:{}}},o=(t.OPTIONS_DEFAULTS={menu:r,slice:s,nthSlice:s,slices:[]},t.SLICE_EVENTS={mouseEnter:"mouseEnter",mouseLeave:"mouseLeave",click:"click"}),a=(t.NATIVE_SLICE_EVENTS={mouseover:o.mouseEnter,mouseout:o.mouseLeave,click:o.click},t.EXTERNAL_API_EVENTS={sliceClick:"sliceClick",sliceEnter:"sliceEnter",sliceLeave:"sliceLeave",openMenu:"openMenu",closeMenu:"closeMenu",hideAnimationEnd:"hideAnimationEnd",showAnimationEnd:"showAnimationEnd"});t.INTERNAL_EXTERNAL_EVENTS_MAPPING=(n(e={},o.mouseEnter,a.sliceEnter),n(e,o.mouseLeave,a.sliceLeave),n(e,o.click,a.sliceClick),e)})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e],void 0===(s="function"==typeof(i=function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=(t.setStyles=function(t,e){var n=Object.keys(e);return n.forEach(function(n){return t.style[n]=e[n]}),t},t.randomInRange=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},t.degToRad=function(t){return t*(Math.PI/180)},t.radToDeg=function(t){return 180*t/Math.PI},t.percentsToDeg=function(t){return t/100*360}),i=(t.sliceToDeg=function(t){return n(360/t/360*100)},t.generatePart=function(){var t=Math.floor(255*Math.random()).toString(16);return 1===t.length?"0"+t:t});t.generateColor=function(){return["#",i(),i(),i()].join("")},t.getCoordinatesForRads=function(t,e,n){var i=t+e*Math.cos(n),r=t+e*Math.sin(n);return[i,r]},t.createElementNS=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElementNS("http://www.w3.org/2000/svg",t),i=Object.keys(e);return i.forEach(function(t){return n.setAttributeNS(null,t,e[t])}),n},t.dumpExtend=function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=Object.keys(i).concat(Object.keys(r)),o=[];return new Set(s).forEach(function(t){return o.push(t)}),o.forEach(function(s){if(!r.hasOwnProperty(s))return n[s]=i[s];"object"===e(i[s])&&i[s]&&!Array.isArray(i[s])?n[s]=t({},i[s],r[s]):n[s]=r[s]}),n},t.hasNestedSlices=function(t){return t.reduce(function(t,e){return t||!(!e.slices||!e.slices.length)},!1)},t.recursivelyForEachSlices=function t(e,n){var i=!0,r=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(i=(o=a.next()).done);i=!0){var h=o.value;n(h),h.slices&&h.slices.length&&t(h.slices,n)}}catch(t){r=!0,s=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return null}})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e],void 0===(s="function"==typeof(i=function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEvent=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.originalEvent=null,this.type=null,this.data=null,this.target=null}})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i=n(4),r={};for(var s in i)i.hasOwnProperty(s)&&(r[i[s]]=s);var o=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 a in o)if(o.hasOwnProperty(a)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);var h=o[a].channels,u=o[a].labels;delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:h}),Object.defineProperty(o[a],"labels",{value:u})}o.rgb.hsl=function(t){var e,n,i=t[0]/255,r=t[1]/255,s=t[2]/255,o=Math.min(i,r,s),a=Math.max(i,r,s),h=a-o;return a===o?e=0:i===a?e=(r-s)/h:r===a?e=2+(s-i)/h:s===a&&(e=4+(i-r)/h),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+a)/2,[e,100*(a===o?0:n<=.5?h/(a+o):h/(2-a-o)),100*n]},o.rgb.hsv=function(t){var e,n,i=t[0],r=t[1],s=t[2],o=Math.min(i,r,s),a=Math.max(i,r,s),h=a-o;return n=0===a?0:h/a*1e3/10,a===o?e=0:i===a?e=(r-s)/h:r===a?e=2+(s-i)/h:s===a&&(e=4+(i-r)/h),(e=Math.min(60*e,360))<0&&(e+=360),[e,n,a/255*1e3/10]},o.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[o.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)))]},o.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,r=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-r)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]},o.rgb.keyword=function(t){var e=r[t];if(e)return e;var n,s,o,a=1/0;for(var h in i)if(i.hasOwnProperty(h)){var u=i[h],l=(s=t,o=u,Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)+Math.pow(s[2]-o[2],2));l<a&&(a=l,n=h)}return n},o.keyword.rgb=function(t){return i[t]},o.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)]},o.rgb.lab=function(t){var e=o.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))]},o.hsl.rgb=function(t){var e,n,i,r,s,o=t[0]/360,a=t[1]/100,h=t[2]/100;if(0===a)return[s=255*h,s,s];e=2*h-(n=h<.5?h*(1+a):h+a-h*a),r=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,s=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[u]=255*s;return r},o.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=n,s=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,r*=s<=1?s:2-s,[e,100*(0===i?2*r/(s+r):2*n/(i+n)),100*((i+n)/2)]},o.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-n),a=255*i*(1-n*s),h=255*i*(1-n*(1-s));switch(i*=255,r){case 0:return[i,h,o];case 1:return[a,i,o];case 2:return[o,i,h];case 3:return[o,a,i];case 4:return[h,o,i];case 5:return[i,o,a]}},o.hsv.hsl=function(t){var e,n,i,r=t[0],s=t[1]/100,o=t[2]/100,a=Math.max(o,.01);return i=(2-s)*o,n=s*a,[r,100*(n=(n/=(e=(2-s)*a)<=1?e:2-e)||0),100*(i/=2)]},o.hwb.rgb=function(t){var e,n,i,r,s,o,a,h=t[0]/360,u=t[1]/100,l=t[2]/100,c=u+l;switch(c>1&&(u/=c,l/=c),n=1-l,i=6*h-(e=Math.floor(6*h)),0!=(1&e)&&(i=1-i),r=u+i*(n-u),e){default:case 6:case 0:s=n,o=r,a=u;break;case 1:s=r,o=n,a=u;break;case 2:s=u,o=n,a=r;break;case 3:s=u,o=r,a=n;break;case 4:s=r,o=u,a=n;break;case 5:s=n,o=u,a=r}return[255*s,255*o,255*a]},o.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},o.xyz.rgb=function(t){var e,n,i,r=t[0]/100,s=t[1]/100,o=t[2]/100;return n=-.9689*r+1.8758*s+.0415*o,i=.0557*r+-.204*s+1.057*o,e=(e=3.2406*r+-1.5372*s+-.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))]},o.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))]},o.lab.xyz=function(t){var e,n,i,r=t[0],s=t[1],o=t[2];e=s/500+(n=(r+16)/116),i=n-o/200;var a=Math.pow(n,3),h=Math.pow(e,3),u=Math.pow(i,3);return n=a>.008856?a:(n-16/116)/7.787,e=h>.008856?h:(e-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},o.lab.lch=function(t){var e,n=t[0],i=t[1],r=t[2];return(e=360*Math.atan2(r,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+r*r),e]},o.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)]},o.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:o.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(s+=60),s},o.hsv.ansi16=function(t){return o.rgb.ansi16(o.hsv.rgb(t),t[2])},o.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)},o.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]},o.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]},o.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},o.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]},o.rgb.hcg=function(t){var e,n,i=t[0]/255,r=t[1]/255,s=t[2]/255,o=Math.max(Math.max(i,r),s),a=Math.min(Math.min(i,r),s),h=o-a;return e=h<1?a/(1-h):0,n=h<=0?0:o===i?(r-s)/h%6:o===r?2+(s-i)/h:4+(i-r)/h+4,n/=6,[360*(n%=1),100*h,100*e]},o.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,r=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(r=(n-.5*i)/(1-i)),[t[0],100*i,100*r]},o.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},o.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 r,s=[0,0,0],o=e%1*6,a=o%1,h=1-a;switch(Math.floor(o)){case 0:s[0]=1,s[1]=a,s[2]=0;break;case 1:s[0]=h,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=a;break;case 3:s[0]=0,s[1]=h,s[2]=1;break;case 4:s[0]=a,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=h}return r=(1-n)*i,[255*(n*s[0]+r),255*(n*s[1]+r),255*(n*s[2]+r)]},o.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]},o.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]},o.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)]},o.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],100*i,100*r]},o.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},o.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},o.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},o.gray.hsl=o.gray.hsv=function(t){return[0,0,t[0]]},o.gray.hwb=function(t){return[0,100,t[0]]},o.gray.cmyk=function(t){return[0,0,0,t[0]]},o.gray.lab=function(t){return[t[0],0,0]},o.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},o.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},function(t,e,n){"use strict";t.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]}},function(t,e,n){var i,r,s;r=[e,n(0),n(6),n(2)],void 0===(s="function"==typeof(i=function(t,e,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OMenuExternalEvent=t.OMenuSliceEvent=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}t.OMenuSliceEvent=function(t){function i(t){var r=t.type,a=t.originalEvent,h=t.target;s(this,i);var u=o(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));if(!(h instanceof n.ISlice))throw new Error("Target must be an instance of Slice or NthLevelSlice");if(!Object.values(e.SLICE_EVENTS).includes(r))throw new Error("Event type must be one of defined in SLICE_EVENTS const");return u.originalEvent=a,u.type=r,u.data=h.options.data,u.target=h,u}return a(i,t),i}(i.IEvent),t.OMenuExternalEvent=function(t){function h(t,a){s(this,h);var u=o(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));if(t instanceof i.IEvent&&a)return Object.assign(u,r({},t,a,{originalEvent:t})),o(u,u);var l=t.type,c=t.originalEvent,f=void 0===c?null:c,d=t.target;return u.type=l,u.originalEvent=f,u.hasNestedSlices=!1,u.isSlice=!1,d&&(u.data=d.options.data,u.target=d,u.type=e.INTERNAL_EXTERNAL_EVENTS_MAPPING[l]||l,d instanceof n.ISlice&&(u.isSlice=!0,u.hasNestedSlices=d.slices&&d.slices.length)),u}return a(h,t),h}(i.IEvent)})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e,n(10)],void 0===(s="function"==typeof(i=function(t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISlice=void 0,t.ISlice=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(e.OMenuElement)})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i=n(20),r=n(19);t.exports=function(t){var e=Object.keys(t);if(!e.length)return"";var n,s=e.length,o="";for(n=0;n<s;n++){var a=e[n],h=t[a];o+=r(a)+":"+i(a,h)+";"}return o}},function(t,e,n){var i,r,s;r=[e,n(1),n(7),n(0),n(6),n(5)],void 0===(s="function"==typeof(i=function(t,e,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,a=(o=n)&&o.__esModule?o:{default:o},h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},u=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,s=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),c=function(t){function n(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return i.options=e,i.parent=t,i.data={},i.group=null,i.number=null,i.clickValue=null,i.coords={arcStart:[],arcEnd:[],content:[]},i.pathArray=[],i.rotateStepDeg=0,i.slices=[],i.isSlicesOpen=!1,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),l(n,[{key:"draw",value:function(t){var n=this;this.data=t,this.number=this.data.number;var i=this.data.radius;this.rotateStepDeg=-this.number*this.data.degForStep+this.data.circleDegOrigin+(this.data.parentDeg||0),this.startArcRad=this.data.radForStep*this.data.number,this.endArcRad=this.data.radForStep+this.startArcRad,this.coords.arcStart=(0,e.getCoordinatesForRads)(this.data.radiusWithPadding,i,this.startArcRad),this.coords.arcEnd=(0,e.getCoordinatesForRads)(this.data.radiusWithPadding,i,this.endArcRad);var r=u(this.coords.arcStart,2),s=r[0],o=r[1],a=u(this.coords.arcEnd,2),l=a[0],c=a[1];if(this.pathArray=["M "+s+" "+o,"A "+i+" "+i+" 0 0 1 "+l+" "+c,"L "+this.data.radiusWithPadding+" "+this.data.radiusWithPadding],this.slices.length){var f=this.data.radForStep/this.slices.length;this.slices.forEach(function(t,r){t.draw(h({},n.data,{number:r,radForStep:f,degForStep:(0,e.radToDeg)(f),innerCircleRadius:i,radius:n.data.radius+n.data.nthLevelSliceWidth,parentRad:n.startArcRad,parentDeg:(0,e.radToDeg)(n.startArcRad),parentFill:n.options.styles.defaults.fill}))})}return this.group=this.parent.group(),this.group.addClass(this.options.sliceClass).path(this.pathArray.join(" ")).style(this.options.styles.defaults),this.drawContent(),this.group.rotate(this.rotateStepDeg,this.data.radiusWithPadding,this.data.radiusWithPadding).scale(.01,this.data.radiusWithPadding,this.data.radiusWithPadding),this.bindCallbacks(),this}},{key:"drawContent",value:function(){this.coords.content=(0,e.getCoordinatesForRads)(this.data.radiusWithPadding,this.data.innerCircleRadius+(this.data.radius-this.data.innerCircleRadius)/3+this.options.iconDistanceFromInnerCircle,this.endArcRad-this.data.radForStep/2);var t=u(this.coords.content,2),n=t[0],i=t[1],r={x:n-this.options.contentSize/2.15+this.options.contentMoveX,y:i-this.options.contentSize/1.6+this.options.contentMoveY,width:this.options.contentSize,height:this.options.contentSize,transform:"rotate("+Math.abs(this.data.circleDegOrigin)+" "+n+" "+i+")"},s=(0,e.createElementNS)("foreignObject",r),o=h({},this.options.styles.contentContainer,{width:this.options.contentSize,height:this.options.contentSize,pointerEvents:"none"});s.innerHTML='\n <div xmlns="http://www.w3.org/1999/xhtml" \n style="'+(0,a.default)(o)+'"\n >\n '+this.options.content+"\n </div>\n ",this.group.node.appendChild(s)}},{key:"bindCallbacks",value:function(){var t=this;Object.keys(i.NATIVE_SLICE_EVENTS).forEach(function(e){t.group.on(e,function(n){"click"===e&&(n.preventDefault(),n.stopPropagation()),t.triggerEvent(new s.OMenuSliceEvent({type:i.NATIVE_SLICE_EVENTS[n.type],target:t,originalEvent:n}))})})}},{key:"destroy",value:function(){var t=this;Object.keys(i.NATIVE_SLICE_EVENTS).forEach(function(e){return t.group.off(e)}),this.off(),this.group.remove(),this.group=null}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.sliceShowTime;return new Promise(function(n){t.group.animate(e).scale(1,t.data.radiusWithPadding,t.data.radiusWithPadding).after(function(){t.group.animate(e).rotate(t.data.circleDegOrigin,t.data.radiusWithPadding,t.data.radiusWithPadding).after(n)})})}},{key:"hideChildrens",value:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.sliceHideTime,this.slices.length?this.slices.map(function(t){return t.hide()}):[Promise.resolve()]}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.sliceHideTime;return new Promise(function(n){t.group.animate(e).rotate(t.rotateStepDeg,t.data.radiusWithPadding,t.data.radiusWithPadding).after(function(){t.group.animate(e).scale(.01,t.data.radiusWithPadding,t.data.radiusWithPadding).after(n)})})}}]),n}(r.ISlice);t.default=c})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e,n(2)],void 0===(s="function"==typeof(i=function(t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OMenuEventEmitter=void 0;var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();t.OMenuEventEmitter=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.subscriptions={}}return n(t,[{key:"on",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments[1];if(Array.isArray(e)||(e=[e]),"function"!=typeof n)throw new Error("oMenu callback must be a function");e.forEach(function(e){t.subscriptions[e]||(t.subscriptions[e]=[]),t.subscriptions[e].push(n)})}},{key:"off",value:function(t,e){if(!t&&!e)return this.subscriptions={},!0;var n=this.subscriptions[t].indexOf(e);return-1!==n&&(this.subscriptions[t].splice(n,1),!0)}},{key:"triggerEvent",value:function(t){if(!(t instanceof e.IEvent))throw new Error("Event must be an instance of IEvent class");var n=t.type;this.subscriptions[n]&&this.subscriptions[n].forEach(function(e){return e(t)})}}]),t}()})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e,n(9)],void 0===(s="function"==typeof(i=function(t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OMenuElement=void 0;var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}();t.OMenuElement=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.slices=[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"pushSlice",value:function(t){if(!(t instanceof e))throw new Error("Slice must be an instance of PartInterface class!");return this.slices.push(t),this}},{key:"destroy",value:function(){}},{key:"draw",value:function(){}},{key:"hide",value:function(){}},{key:"show",value:function(){}}]),e}(e.OMenuEventEmitter)})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e,n(0)],void 0===(s="function"==typeof(i=function(t,e){"use strict";var n;function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(t,"__esModule",{value:!0}),t.positioningFunctions=void 0,t.positioningFunctions=(i(n={},e.POSITION_MODES.relative,function(t){var e=t.targetElement,n=t.menuInstance,i=t.ev;e.style.position="relative";var r=e.getBoundingClientRect(),s=r.x,o=r.y,a=r.width,h=r.height,u=s+window.scrollX,l=o+window.scrollY,c=i.pageX-n.radiusWithPadding-u,f=i.pageY-n.radiusWithPadding-l;c<u?c=0:c+n.size>a&&(c=a-n.size-15),f<l?f=0:f+n.size>h&&(f=h-n.size),n.svg.style({transform:"translate3d("+c+"px, "+f+"px, 0)",position:"absolute",top:0,left:0})}),i(n,e.POSITION_MODES.fixed,function(t){t.targetElement;var e=t.menuInstance,n=t.ev,i=n.x-e.radiusWithPadding,r=n.y-e.radiusWithPadding,s=e.size;i<0?i=0:i+s>window.innerWidth&&(i=window.innerWidth-s-15),r<0?r=0:r+s>window.innerHeight&&(r=window.innerHeight-s),e.svg.style({position:"fixed",transform:"translate3d("+i+"px, "+r+"px, 0)"})}),n)})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i=n(3);function r(t){var e=function(){for(var t={},e=Object.keys(i),n=e.length,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var r=n.pop(),s=Object.keys(i[r]),o=s.length,a=0;a<o;a++){var h=s[a],u=e[h];-1===u.distance&&(u.distance=e[r].distance+1,u.parent=r,n.unshift(h))}return e}function s(t,e){return function(n){return e(t(n))}}function o(t,e){for(var n=[e[t].parent,t],r=i[e[t].parent][t],o=e[t].parent;e[o].parent;)n.unshift(e[o].parent),r=s(i[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}t.exports=function(t){for(var e=r(t),n={},i=Object.keys(e),s=i.length,a=0;a<s;a++){var h=i[a];null!==e[h].parent&&(n[h]=o(h,e))}return n}},function(t,e,n){var i=n(3),r=n(12),s={};Object.keys(i).forEach(function(t){s[t]={},Object.defineProperty(s[t],"channels",{value:i[t].channels}),Object.defineProperty(s[t],"labels",{value:i[t].labels});var e=r(t);Object.keys(e).forEach(function(n){var i=e[n];s[t][n]=function(t){var e=function(e){if(void 0===e||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,r=0;r<i;r++)n[r]=Math.round(n[r]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),s[t][n].raw=function(t){var e=function(e){return void 0===e||null===e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)})}),t.exports=s},function(t,e,n){"use strict";t.exports=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},function(t,e,n){"use strict";var i=n(14),r=Array.prototype.concat,s=Array.prototype.slice,o=t.exports=function(t){for(var e=[],n=0,o=t.length;n<o;n++){var a=t[n];i(a)?e=r.call(e,s.call(a)):e.push(a)}return e};o.wrap=function(t){return function(){return t(o(arguments))}}},function(t,e,n){var i=n(4),r=n(15),s={};for(var o in i)i.hasOwnProperty(o)&&(s[i[o]]=o);var a=t.exports={to:{}};function h(t,e,n){return Math.min(Math.max(e,t),n)}function u(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),n="hsl";break;case"hwb":e=a.get.hwb(t),n="hwb";break;default:e=a.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},a.get.rgb=function(t){if(!t)return null;var e,n,r,s=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var o=2*n;s[n]=parseInt(e.slice(o,o+2),16)}r&&(s[3]=Math.round(parseInt(r,16)/255*100)/100)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)s[n]=parseInt(e[n]+e[n],16);r&&(s[3]=Math.round(parseInt(r+r,16)/255*100)/100)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)s[n]=parseInt(e[n+1],0);e[4]&&(s[3]=parseFloat(e[4]))}else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(e=t.match(/(\D+)/))?"transparent"===e[1]?[0,0,0,0]:(s=i[e[1]])?(s[3]=1,s):null:null;for(n=0;n<3;n++)s[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(s[3]=parseFloat(e[4]))}for(n=0;n<3;n++)s[n]=h(s[n],0,255);return s[3]=h(s[3],0,1),s},a.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,h(parseFloat(e[2]),0,100),h(parseFloat(e[3]),0,100),h(isNaN(n)?1:n,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,h(parseFloat(e[2]),0,100),h(parseFloat(e[3]),0,100),h(isNaN(n)?1:n,0,1)]}return null},a.to.hex=function(){var t=r(arguments);return"#"+u(t[0])+u(t[1])+u(t[2])+(t[3]<1?u(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=r(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(){var t=r(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+i+"%)":"rgba("+e+"%, "+n+"%, "+i+"%, "+t[3]+")"},a.to.hsl=function(){var t=r(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(){var t=r(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(t){return s[t.slice(0,3)]}},function(t,e,n){"use strict";var i=n(16),r=n(13),s=[].slice,o=["keyword","gray","hex"],a={};Object.keys(r).forEach(function(t){a[s.call(r[t].labels).sort().join("")]=t});var h={};function u(t,e){if(!(this instanceof u))return new u(t,e);if(e&&e in o&&(e=null),e&&!(e in r))throw new Error("Unknown model: "+e);var n,l;if(t)if(t instanceof u)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if("string"==typeof t){var c=i.get(t);if(null===c)throw new Error("Unable to parse color from string: "+t);this.model=c.model,l=r[this.model].channels,this.color=c.value.slice(0,l),this.valpha="number"==typeof c.value[l]?c.value[l]:1}else if(t.length){this.model=e||"rgb",l=r[this.model].channels;var d=s.call(t,0,l);this.color=f(d,l),this.valpha="number"==typeof t[l]?t[l]:1}else if("number"==typeof t)t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;var p=Object.keys(t);"alpha"in t&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);var v=p.sort().join("");if(!(v in a))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=a[v];var y=r[this.model].labels,g=[];for(n=0;n<y.length;n++)g.push(t[y[n]]);this.color=f(g)}else this.model="rgb",this.color=[0,0,0],this.valpha=1;if(h[this.model])for(l=r[this.model].channels,n=0;n<l;n++){var m=h[this.model][n];m&&(this.color[n]=m(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function l(t,e,n){return(t=Array.isArray(t)?t:[t]).forEach(function(t){(h[t]||(h[t]=[]))[e]=n}),t=t[0],function(i){var r;return arguments.length?(n&&(i=n(i)),(r=this[t]()).color[e]=i,r):(r=this[t]().color[e],n&&(r=n(r)),r)}}function c(t){return function(e){return Math.max(0,Math.min(t,e))}}function f(t,e){for(var n=0;n<e;n++)"number"!=typeof t[n]&&(t[n]=0);return t}u.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in i.to?this:this.rgb(),n=1===(e=e.round("number"==typeof t?t:1)).valpha?e.color:e.color.concat(this.valpha);return i.to[e.model](n)},percentString:function(t){var e=this.rgb().round("number"==typeof t?t:1),n=1===e.valpha?e.color:e.color.concat(this.valpha);return i.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=r[this.model].channels,n=r[this.model].labels,i=0;i<e;i++)t[n[i]]=this.color[i];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new u(this.color.map(function(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new u(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:l("rgb",0,c(255)),green:l("rgb",1,c(255)),blue:l("rgb",2,c(255)),hue:l(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:l("hsl",1,c(100)),lightness:l("hsl",2,c(100)),saturationv:l("hsv",1,c(100)),value:l("hsv",2,c(100)),chroma:l("hcg",1,c(100)),gray:l("hcg",2,c(100)),white:l("hwb",1,c(100)),wblack:l("hwb",2,c(100)),cyan:l("cmyk",0,c(100)),magenta:l("cmyk",1,c(100)),yellow:l("cmyk",2,c(100)),black:l("cmyk",3,c(100)),x:l("xyz",0,c(100)),y:l("xyz",1,c(100)),z:l("xyz",2,c(100)),l:l("lab",0,c(100)),a:l("lab",1),b:l("lab",2),keyword:function(t){return arguments.length?new u(t):r[this.model].keyword(this.color)},hex:function(t){return arguments.length?new u(t):i.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity:function(){for(var t=this.rgb().color,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.rgb().color;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return u.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),n=e.color[0];return n=(n=(n+t)%360)<0?360+n:n,e.color[0]=n,e},mix:function(t,e){var n=t.rgb(),i=this.rgb(),r=void 0===e?.5:e,s=2*r-1,o=n.alpha()-i.alpha(),a=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,h=1-a;return u.rgb(a*n.red()+h*i.red(),a*n.green()+h*i.green(),a*n.blue()+h*i.blue(),n.alpha()*r+i.alpha()*(1-r))}},Object.keys(r).forEach(function(t){if(-1===o.indexOf(t)){var e=r[t].channels;u.prototype[t]=function(){if(this.model===t)return new u(this);if(arguments.length)return new u(arguments,t);var n,i="number"==typeof arguments[e]?e:this.valpha;return new u((n=r[this.model][t].raw(this.color),Array.isArray(n)?n:[n]).concat(i),t)},u[t]=function(n){return"number"==typeof n&&(n=f(s.call(arguments),e)),new u(n,t)}}}),t.exports=u},function(t,e,n){var i,r,s;r=[e,n(8),n(7),n(17),n(1)],void 0===(s="function"==typeof(i=function(t,e,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=h(e),o=h(n),a=h(i);function h(t){return t&&t.__esModule?t:{default:t}}var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},l=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],i=!0,r=!1,s=void 0;try{for(var o,a=t[Symbol.iterator]();!(i=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,s=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw s}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),c(e,[{key:"draw",value:function(t){var e=null;if(this.data=t,this.number=this.data.number,this.parentFill=this.data.parentFill?new a.default(this.data.parentFill):null,0!==this.options.parentFillMode){var n=this.options.parentFillMode<0?"darken":"lighten";e=this.parentFill[n](Math.abs(this.options.parentFillMode)).hex()}var i=this.data.radius;this.rotateStepDeg=0,this.startArcRad=this.data.radForStep*this.data.number+(0,r.degToRad)(this.data.circleDegOrigin)+(0,r.degToRad)(this.data.parentDeg),this.endArcRad=this.data.radForStep+this.startArcRad,this.coords.arcStart=(0,r.getCoordinatesForRads)(this.data.radiusWithPadding,i,this.startArcRad),this.coords.arcEnd=(0,r.getCoordinatesForRads)(this.data.radiusWithPadding,i,this.endArcRad);var s=l(this.coords.arcStart,2),o=s[0],h=s[1],c=l(this.coords.arcEnd,2),f=c[0],d=c[1];this.pathArray=["M "+o+" "+h,"A "+i+" "+i+" 0 0 1 "+f+" "+d,"L "+this.data.radiusWithPadding+" "+this.data.radiusWithPadding],this.group=this.parent.group();var p=u({},this.options.styles.defaults);return e&&(p.fill=e),this.group.addClass(this.options.sliceClass).path(this.pathArray.join(" ")).style(p),this.drawContent(),this.group.scale(.2,this.data.radiusWithPadding,this.data.radiusWithPadding).opacity(0),this.bindCallbacks(),this}},{key:"drawContent",value:function(){this.coords.content=(0,r.getCoordinatesForRads)(this.data.radiusWithPadding,this.data.innerCircleRadius+(this.data.radius-this.data.innerCircleRadius)/3+this.options.iconDistanceFromInnerCircle,this.endArcRad-this.data.radForStep/2);var t=l(this.coords.content,2),e=t[0],n=t[1],i={x:e-this.options.contentSize/2.15+this.options.contentMoveX,y:n-this.options.contentSize/1.6+this.options.contentMoveY,width:this.options.contentSize,height:this.options.contentSize},s=(0,r.createElementNS)("foreignObject",i),a=u({},this.options.styles.contentContainer,{width:this.options.contentSize,height:this.options.contentSize,pointerEvents:"none"});s.innerHTML='\n <div xmlns="http://www.w3.org/1999/xhtml" \n style="'+(0,o.default)(a)+'"\n >\n '+this.options.content+"\n </div>\n ",this.group.node.appendChild(s)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.sliceShowTime;return new Promise(function(n){t.group.opacity(1).animate(e).scale(1,t.data.radiusWithPadding,t.data.radiusWithPadding).after(n)})}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.sliceHideTime;return new Promise(function(n){t.group.animate(e).scale(.01,t.data.radiusWithPadding,t.data.radiusWithPadding).after(function(){t.group.opacity(0),n()})})}}]),e}(s.default);t.default=f})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){"use strict";var i=/[A-Z]/g,r=/^ms-/,s={};t.exports=function(t){return t in s?s[t]:s[t]=t.replace(i,"-$&").toLowerCase().replace(r,"-ms-")}},function(t,e){var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};t.exports=function(t,e){return"number"!=typeof e||n[t]?e:e+"px"}},function(t,e,n){var i,r,s;r=[e,n(8)],void 0===(s="function"==typeof(i=function(t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}((n=e,n&&n.__esModule?n:{default:n}).default);t.default=i})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r,s;r=[e,n(10)],void 0===(s="function"==typeof(i=function(t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOMenu=void 0,t.IOMenu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(e.OMenuElement)})?i.apply(e,r):i)||(t.exports=s)},function(t,e,n){var i,r; /*! * svg.js - A lightweight library for manipulating and animating SVG. * @version 2.6.5 * https://svgdotjs.github.io/ * * @copyright Wout Fierens <wout@mick-wout.com> * @license MIT * * BUILT: Sat Jun 09 2018 13:46:41 GMT+0200 (CEST) */r="undefined"!=typeof window?window:this,void 0===(i=function(){return function(t,e){var n=t.SVG=function(t){if(n.supported)return t=new n.Doc(t),n.parser.draw||n.prepare(),t};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.com/svgjs",n.supported=!!e.createElementNS&&!!e.createElementNS(n.ns,"svg").createSVGRect,!n.supported)return!1;n.did=1e3,n.eid=function(t){return"Svgjs"+l(t)+n.did++},n.create=function(t){var n=e.createElementNS(this.ns,t);return n.setAttribute("id",this.eid(t)),n},n.extend=function(){var t,e,i,r;for(t=[].slice.call(arguments),e=t.pop(),r=t.length-1;r>=0;r--)if(t[r])for(i in e)t[r].prototype[i]=e[i];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,n.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&n.extend(e,t.extend),t.construct&&n.extend(t.parent||n.Container,t.construct),e},n.adopt=function(e){return e?e.instance?e.instance:((i="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new n.Nested:new n.Doc:"linearGradient"==e.nodeName?new n.Gradient("linear"):"radialGradient"==e.nodeName?new n.Gradient("radial"):n[l(e.nodeName)]?new(n[l(e.nodeName)]):new n.Element(e)).type=e.nodeName,i.node=e,e.instance=i,i instanceof n.Doc&&i.namespace().defs(),i.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),i):null;var i},n.prepare=function(){var t=e.getElementsByTagName("body")[0],i=(t?new n.Doc(t):n.adopt(e.documentElement).nested()).size(2,0);n.parser={body:t||e.documentElement,draw:i.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:i.polyline().node,path:i.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},e.addEventListener("DOMContentLoaded",function(){n.parser.draw||n.prepare()},!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/