From 57182b2687d134178707522f500497ec47c31042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 26 Sep 2019 22:03:37 +0200 Subject: [PATCH] Updates --- bundle.js | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle.js b/bundle.js index 36a8245..1cec0f9 100644 --- a/bundle.js +++ b/bundle.js @@ -1 +1 @@ -!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){var i,r;r=this,void 0===(i=function(){return r.Chartist=function(){var e={version:"0.11.3"};return function(e,t){"use strict";var n=e.window,i=e.document;t.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},t.noop=function(e){return e},t.alphaNumerate=function(e){return String.fromCharCode(97+e%26)},t.extend=function(e){var n,i,r;for(e=e||{},n=1;n":">",'"':""","'":"'"},t.serialize=function(e){return null==e?e:("number"==typeof e?e=""+e:"object"==typeof e&&(e=JSON.stringify({data:e})),Object.keys(t.escapingMap).reduce(function(e,n){return t.replaceAll(e,n,t.escapingMap[n])},e))},t.deserialize=function(e){if("string"!=typeof e)return e;e=Object.keys(t.escapingMap).reduce(function(e,n){return t.replaceAll(e,t.escapingMap[n],n)},e);try{e=void 0!==(e=JSON.parse(e)).data?e.data:e}catch(e){}return e},t.createSvg=function(e,n,i,r){var s;return n=n||"100%",i=i||"100%",Array.prototype.slice.call(e.querySelectorAll("svg")).filter(function(e){return e.getAttributeNS(t.namespaces.xmlns,"ct")}).forEach(function(t){e.removeChild(t)}),(s=new t.Svg("svg").attr({width:n,height:i}).addClass(r))._node.style.width=n,s._node.style.height=i,e.appendChild(s._node),s},t.normalizeData=function(e,n,i){var r,s={raw:e,normalized:{}};return s.normalized.series=t.getDataArray({series:e.series||[]},n,i),r=s.normalized.series.every(function(e){return e instanceof Array})?Math.max.apply(null,s.normalized.series.map(function(e){return e.length})):s.normalized.series.length,s.normalized.labels=(e.labels||[]).slice(),Array.prototype.push.apply(s.normalized.labels,t.times(Math.max(0,r-s.normalized.labels.length)).map(function(){return""})),n&&t.reverseData(s.normalized),s},t.safeHasProperty=function(e,t){return null!==e&&"object"==typeof e&&e.hasOwnProperty(t)},t.isDataHoleValue=function(e){return null==e||"number"==typeof e&&isNaN(e)},t.reverseData=function(e){e.labels.reverse(),e.series.reverse();for(var t=0;tr.high&&(r.high=o),a&&o0?r.low=0:(r.high=1,r.low=0)),r},t.isNumeric=function(e){return null!==e&&isFinite(e)},t.isFalseyButZero=function(e){return!e&&0!==e},t.getNumberOrUndefined=function(e){return t.isNumeric(e)?+e:void 0},t.isMultiValue=function(e){return"object"==typeof e&&("x"in e||"y"in e)},t.getMultiValue=function(e,n){return t.isMultiValue(e)?t.getNumberOrUndefined(e[n||"y"]):t.getNumberOrUndefined(e)},t.rho=function(e){if(1===e)return e;function t(e,n){return e%n==0?n:t(n,e%n)}function n(e){return e*e+1}var i,r=2,s=2;if(e%2==0)return 2;do{r=n(r)%e,s=n(n(s))%e,i=t(Math.abs(r-s),e)}while(1===i);return i},t.getBounds=function(e,n,i,r){var s,a,o,l=0,u={high:n.high,low:n.low};u.valueRange=u.high-u.low,u.oom=t.orderOfMagnitude(u.valueRange),u.step=Math.pow(10,u.oom),u.min=Math.floor(u.low/u.step)*u.step,u.max=Math.ceil(u.high/u.step)*u.step,u.range=u.max-u.min,u.numberOfSteps=Math.round(u.range/u.step);var c=t.projectLength(e,u.step,u)=i)u.step=1;else if(r&&p=i)u.step=p;else for(;;){if(c&&t.projectLength(e,u.step,u)<=i)u.step*=2;else{if(c||!(t.projectLength(e,u.step/2,u)>=i))break;if(u.step/=2,r&&u.step%1!=0){u.step*=2;break}}if(l++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var h=2221e-19;function d(e,t){return e===(e+=t)&&(e*=1+(t>0?h:-h)),e}for(u.step=Math.max(u.step,h),a=u.min,o=u.max;a+u.step<=u.low;)a=d(a,u.step);for(;o-u.step>=u.high;)o=d(o,-u.step);u.min=a,u.max=o,u.range=u.max-u.min;var m=[];for(s=u.min;s<=u.max;s=d(s,u.step)){var f=t.roundWithPrecision(s);f!==m[m.length-1]&&m.push(f)}return u.values=m,u},t.polarToCartesian=function(e,t,n,i){var r=(i-90)*Math.PI/180;return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}},t.createChartRect=function(e,n,i){var r=!(!n.axisX&&!n.axisY),s=r?n.axisY.offset:0,a=r?n.axisX.offset:0,o=e.width()||t.quantity(n.width).value||0,l=e.height()||t.quantity(n.height).value||0,u=t.normalizePadding(n.chartPadding,i);o=Math.max(o,s+u.left+u.right),l=Math.max(l,a+u.top+u.bottom);var c={padding:u,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return r?("start"===n.axisX.position?(c.y2=u.top+a,c.y1=Math.max(l-u.bottom,c.y2+1)):(c.y2=u.top,c.y1=Math.max(l-u.bottom-a,c.y2+1)),"start"===n.axisY.position?(c.x1=u.left+s,c.x2=Math.max(o-u.right,c.x1+1)):(c.x1=u.left,c.x2=Math.max(o-u.right-s,c.x1+1))):(c.x1=u.left,c.x2=Math.max(o-u.right,c.x1+1),c.y2=u.top,c.y1=Math.max(l-u.bottom,c.y2+1)),c},t.createGrid=function(e,n,i,r,s,a,o,l){var u={};u[i.units.pos+"1"]=e,u[i.units.pos+"2"]=e,u[i.counterUnits.pos+"1"]=r,u[i.counterUnits.pos+"2"]=r+s;var c=a.elem("line",u,o.join(" "));l.emit("draw",t.extend({type:"grid",axis:i,index:n,group:a,element:c},u))},t.createGridBackground=function(e,t,n,i){var r=e.elem("rect",{x:t.x1,y:t.y2,width:t.width(),height:t.height()},n,!0);i.emit("draw",{type:"gridBackground",group:e,element:r})},t.createLabel=function(e,n,r,s,a,o,l,u,c,p,h){var d,m={};if(m[a.units.pos]=e+l[a.units.pos],m[a.counterUnits.pos]=l[a.counterUnits.pos],m[a.units.len]=n,m[a.counterUnits.len]=Math.max(0,o-10),p){var f=i.createElement("span");f.className=c.join(" "),f.setAttribute("xmlns",t.namespaces.xhtml),f.innerText=s[r],f.style[a.units.len]=Math.round(m[a.units.len])+"px",f.style[a.counterUnits.len]=Math.round(m[a.counterUnits.len])+"px",d=u.foreignObject(f,t.extend({style:"overflow: visible;"},m))}else d=u.elem("text",m,c.join(" ")).text(s[r]);h.emit("draw",t.extend({type:"label",axis:a,index:r,group:u,element:d,text:s[r]},m))},t.getSeriesOption=function(e,t,n){if(e.name&&t.series&&t.series[e.name]){var i=t.series[e.name];return i.hasOwnProperty(n)?i[n]:t[n]}return t[n]},t.optionsProvider=function(e,i,r){var s,a,o=t.extend({},e),l=[];function u(e){var l=s;if(s=t.extend({},o),i)for(a=0;a=2&&e[a]<=e[a-2]&&(s=!0),s&&(r.push({pathCoordinates:[],valueData:[]}),s=!1),r[r.length-1].pathCoordinates.push(e[a],e[a+1]),r[r.length-1].valueData.push(n[a/2]));return r}}(this,e),function(e,t){"use strict";t.Interpolation={},t.Interpolation.none=function(e){return e=t.extend({},{fillHoles:!1},e),function(n,i){for(var r=new t.Svg.Path,s=!0,a=0;a1){var l=[];return o.forEach(function(e){l.push(r(e.pathCoordinates,e.valueData))}),t.Svg.Path.join(l)}if(s=o[0].pathCoordinates,a=o[0].valueData,s.length<=4)return t.Interpolation.none()(s,a);for(var u=(new t.Svg.Path).move(s[0],s[1],!1,a[0]),c=0,p=s.length;p-2>c;c+=2){var h=[{x:+s[c-2],y:+s[c-1]},{x:+s[c],y:+s[c+1]},{x:+s[c+2],y:+s[c+3]},{x:+s[c+4],y:+s[c+5]}];p-4===c?h[3]=h[2]:c||(h[0]={x:+s[c],y:+s[c+1]}),u.curve(n*(-h[0].x+6*h[1].x+h[2].x)/6+i*h[2].x,n*(-h[0].y+6*h[1].y+h[2].y)/6+i*h[2].y,n*(h[1].x+6*h[2].x-h[3].x)/6+i*h[2].x,n*(h[1].y+6*h[2].y-h[3].y)/6+i*h[2].y,h[2].x,h[2].y,!1,a[(c+2)/2])}return u}return t.Interpolation.none()([])}},t.Interpolation.monotoneCubic=function(e){return e=t.extend({},{fillHoles:!1},e),function n(i,r){var s=t.splitIntoSegments(i,r,{fillHoles:e.fillHoles,increasingX:!0});if(s.length){if(s.length>1){var a=[];return s.forEach(function(e){a.push(n(e.pathCoordinates,e.valueData))}),t.Svg.Path.join(a)}if(i=s[0].pathCoordinates,r=s[0].valueData,i.length<=4)return t.Interpolation.none()(i,r);var o,l,u=[],c=[],p=i.length/2,h=[],d=[],m=[],f=[];for(o=0;o0!=d[o]>0?h[o]=0:(h[o]=3*(f[o-1]+f[o])/((2*f[o]+f[o-1])/d[o-1]+(f[o]+2*f[o-1])/d[o]),isFinite(h[o])||(h[o]=0));for(l=(new t.Svg.Path).move(u[0],c[0],!1,r[0]),o=0;o1}).map(function(e){var t=e.pathElements[0],n=e.pathElements[e.pathElements.length-1];return e.clone(!0).position(0).remove(1).move(t.x,v).line(t.x,t.y).position(e.pathElements.length+1).line(n.x,v)}).forEach(function(t){var o=l.elem("path",{d:t.stringify()},e.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:i.normalized.series[a],path:t.clone(),series:n,seriesIndex:a,axisX:r,axisY:s,chartRect:u,index:a,group:l,element:o})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:s.bounds,chartRect:u,axisX:r,axisY:s,svg:this.svg,options:e})}})}(this,e),function(e,t){"use strict";e.window,e.document;var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:t.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:t.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};t.Bar=t.Base.extend({constructor:function(e,i,r,s){t.Bar.super.constructor.call(this,e,i,n,t.extend({},n,r),s)},createChart:function(e){var i,r;e.distributeSeries?(i=t.normalizeData(this.data,e.reverseData,e.horizontalBars?"x":"y")).normalized.series=i.normalized.series.map(function(e){return[e]}):i=t.normalizeData(this.data,e.reverseData,e.horizontalBars?"x":"y"),this.svg=t.createSvg(this.container,e.width,e.height,e.classNames.chart+(e.horizontalBars?" "+e.classNames.horizontalBars:""));var s=this.svg.elem("g").addClass(e.classNames.gridGroup),a=this.svg.elem("g"),o=this.svg.elem("g").addClass(e.classNames.labelGroup);if(e.stackBars&&0!==i.normalized.series.length){var l=t.serialMap(i.normalized.series,function(){return Array.prototype.slice.call(arguments).map(function(e){return e}).reduce(function(e,t){return{x:e.x+(t&&t.x)||0,y:e.y+(t&&t.y)||0}},{x:0,y:0})});r=t.getHighLow([l],e,e.horizontalBars?"x":"y")}else r=t.getHighLow(i.normalized.series,e,e.horizontalBars?"x":"y");r.high=+e.high||(0===e.high?0:r.high),r.low=+e.low||(0===e.low?0:r.low);var u,c,p,h,d,m=t.createChartRect(this.svg,e,n.padding);c=e.distributeSeries&&e.stackBars?i.normalized.labels.slice(0,1):i.normalized.labels,e.horizontalBars?(u=h=void 0===e.axisX.type?new t.AutoScaleAxis(t.Axis.units.x,i.normalized.series,m,t.extend({},e.axisX,{highLow:r,referenceValue:0})):e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,m,t.extend({},e.axisX,{highLow:r,referenceValue:0})),p=d=void 0===e.axisY.type?new t.StepAxis(t.Axis.units.y,i.normalized.series,m,{ticks:c}):e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,m,e.axisY)):(p=h=void 0===e.axisX.type?new t.StepAxis(t.Axis.units.x,i.normalized.series,m,{ticks:c}):e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,m,e.axisX),u=d=void 0===e.axisY.type?new t.AutoScaleAxis(t.Axis.units.y,i.normalized.series,m,t.extend({},e.axisY,{highLow:r,referenceValue:0})):e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,m,t.extend({},e.axisY,{highLow:r,referenceValue:0})));var f=e.horizontalBars?m.x1+u.projectValue(0):m.y1-u.projectValue(0),v=[];p.createGridAndLabels(s,o,this.supportsForeignObject,e,this.eventEmitter),u.createGridAndLabels(s,o,this.supportsForeignObject,e,this.eventEmitter),e.showGridBackground&&t.createGridBackground(s,m,e.classNames.gridBackground,this.eventEmitter),i.raw.series.forEach(function(n,r){var s,o,l=r-(i.raw.series.length-1)/2;s=e.distributeSeries&&!e.stackBars?p.axisLength/i.normalized.series.length/2:e.distributeSeries&&e.stackBars?p.axisLength/2:p.axisLength/i.normalized.series[r].length/2,(o=a.elem("g")).attr({"ct:series-name":n.name,"ct:meta":t.serialize(n.meta)}),o.addClass([e.classNames.series,n.className||e.classNames.series+"-"+t.alphaNumerate(r)].join(" ")),i.normalized.series[r].forEach(function(a,c){var g,x,y,w;if(w=e.distributeSeries&&!e.stackBars?r:e.distributeSeries&&e.stackBars?0:c,g=e.horizontalBars?{x:m.x1+u.projectValue(a&&a.x?a.x:0,c,i.normalized.series[r]),y:m.y1-p.projectValue(a&&a.y?a.y:0,w,i.normalized.series[r])}:{x:m.x1+p.projectValue(a&&a.x?a.x:0,w,i.normalized.series[r]),y:m.y1-u.projectValue(a&&a.y?a.y:0,c,i.normalized.series[r])},p instanceof t.StepAxis&&(p.options.stretch||(g[p.units.pos]+=s*(e.horizontalBars?-1:1)),g[p.units.pos]+=e.stackBars||e.distributeSeries?0:l*e.seriesBarDistance*(e.horizontalBars?-1:1)),y=v[c]||f,v[c]=y-(f-g[p.counterUnits.pos]),void 0!==a){var z={};z[p.units.pos+"1"]=g[p.units.pos],z[p.units.pos+"2"]=g[p.units.pos],!e.stackBars||"accumulate"!==e.stackMode&&e.stackMode?(z[p.counterUnits.pos+"1"]=f,z[p.counterUnits.pos+"2"]=g[p.counterUnits.pos]):(z[p.counterUnits.pos+"1"]=y,z[p.counterUnits.pos+"2"]=v[c]),z.x1=Math.min(Math.max(z.x1,m.x1),m.x2),z.x2=Math.min(Math.max(z.x2,m.x1),m.x2),z.y1=Math.min(Math.max(z.y1,m.y2),m.y1),z.y2=Math.min(Math.max(z.y2,m.y2),m.y1);var b=t.getMetaData(n,c);x=o.elem("line",z,e.classNames.bar).attr({"ct:value":[a.x,a.y].filter(t.isNumeric).join(","),"ct:meta":t.serialize(b)}),this.eventEmitter.emit("draw",t.extend({type:"bar",value:a,index:c,meta:b,series:n,seriesIndex:r,axisX:h,axisY:d,chartRect:m,group:o,element:x},z))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:u.bounds,chartRect:m,axisX:h,axisY:d,svg:this.svg,options:e})}})}(this,e),function(e,t){"use strict";e.window,e.document;var n={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:t.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};function i(e,t,n){var i=t.x>e.x;return i&&"explode"===n||!i&&"implode"===n?"start":i&&"implode"===n||!i&&"explode"===n?"end":"middle"}t.Pie=t.Base.extend({constructor:function(e,i,r,s){t.Pie.super.constructor.call(this,e,i,n,t.extend({},n,r),s)},createChart:function(e){var r,s,a,o,l,u=t.normalizeData(this.data),c=[],p=e.startAngle;this.svg=t.createSvg(this.container,e.width,e.height,e.donut?e.classNames.chartDonut:e.classNames.chartPie),s=t.createChartRect(this.svg,e,n.padding),a=Math.min(s.width()/2,s.height()/2),l=e.total||u.normalized.series.reduce(function(e,t){return e+t},0);var h=t.quantity(e.donutWidth);"%"===h.unit&&(h.value*=a/100),a-=e.donut&&!e.donutSolid?h.value/2:0,o="outside"===e.labelPosition||e.donut&&!e.donutSolid?a:"center"===e.labelPosition?0:e.donutSolid?a-h.value/2:a/2,o+=e.labelOffset;var d={x:s.x1+s.width()/2,y:s.y2+s.height()/2},m=1===u.raw.series.filter(function(e){return e.hasOwnProperty("value")?0!==e.value:0!==e}).length;u.raw.series.forEach(function(e,t){c[t]=this.svg.elem("g",null,null)}.bind(this)),e.showLabel&&(r=this.svg.elem("g",null,null)),u.raw.series.forEach(function(n,s){if(0!==u.normalized.series[s]||!e.ignoreEmptyValues){c[s].attr({"ct:series-name":n.name}),c[s].addClass([e.classNames.series,n.className||e.classNames.series+"-"+t.alphaNumerate(s)].join(" "));var f=l>0?p+u.normalized.series[s]/l*360:0,v=Math.max(0,p-(0===s||m?0:.2));f-v>=359.99&&(f=v+359.99);var g,x,y,w=t.polarToCartesian(d.x,d.y,a,v),z=t.polarToCartesian(d.x,d.y,a,f),b=new t.Svg.Path(!e.donut||e.donutSolid).move(z.x,z.y).arc(a,a,0,f-p>180,0,w.x,w.y);e.donut?e.donutSolid&&(y=a-h.value,g=t.polarToCartesian(d.x,d.y,y,p-(0===s||m?0:.2)),x=t.polarToCartesian(d.x,d.y,y,f),b.line(g.x,g.y),b.arc(y,y,0,f-p>180,1,x.x,x.y)):b.line(d.x,d.y);var S=e.classNames.slicePie;e.donut&&(S=e.classNames.sliceDonut,e.donutSolid&&(S=e.classNames.sliceDonutSolid));var k=c[s].elem("path",{d:b.stringify()},S);if(k.attr({"ct:value":u.normalized.series[s],"ct:meta":t.serialize(n.meta)}),e.donut&&!e.donutSolid&&(k._node.style.strokeWidth=h.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:u.normalized.series[s],totalDataSum:l,index:s,meta:n.meta,series:n,group:c[s],element:k,path:b.clone(),center:d,radius:a,startAngle:p,endAngle:f}),e.showLabel){var E,A;E=1===u.raw.series.length?{x:d.x,y:d.y}:t.polarToCartesian(d.x,d.y,o,p+(f-p)/2),A=u.normalized.labels&&!t.isFalseyButZero(u.normalized.labels[s])?u.normalized.labels[s]:u.normalized.series[s];var O=e.labelInterpolationFnc(A,s);if(O||0===O){var M=r.elem("text",{dx:E.x,dy:E.y,"text-anchor":i(d,E,e.labelDirection)},e.classNames.label).text(""+O);this.eventEmitter.emit("draw",{type:"label",index:s,group:r,element:M,text:""+O,x:E.x,y:E.y})}}p=f}}.bind(this)),this.eventEmitter.emit("created",{chartRect:s,svg:this.svg,options:e})},determineAnchorPosition:i})}(this,e),e}()}.apply(t,[]))||(e.exports=i)},function(e,t,n){var i=n(2);e.exports=function(e){var t,n="",r=e||{};return function(e,r,s,a){n=n+'

Okręg '+i.escape(null==(t=s)?"":t)+" "+i.escape(null==(t=r)?"":t)+"

Łącznie "+i.escape(null==(t=a)?"":t)+" mandatów

",function(){var r=e;if("number"==typeof r.length)for(var s=0,a=r.length;s"}else{a=0;for(var s in r){a++;o=r[s];n=n+""}}}.call(this),n+="
"+i.escape(null==(t=o.committee)?"":t)+""+i.escape(null==(t=o.mandates)?"":t)+"
"+i.escape(null==(t=o.committee)?"":t)+""+i.escape(null==(t=o.mandates)?"":t)+"
"}.call(this,"data"in r?r.data:"undefined"!=typeof data?data:void 0,"name"in r?r.name:"undefined"!=typeof name?name:void 0,"number"in r?r.number:"undefined"!=typeof number?number:void 0,"size"in r?r.size:"undefined"!=typeof size?size:void 0),n}},function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty;function r(e,t){return Array.isArray(e)?function(e,t){for(var n,i="",s="",a=Array.isArray(t),o=0;o]/;function l(e){var t=""+e,n=o.exec(t);if(!n)return e;var i,r,s,a="";for(i=n.index,r=0;i ":" ")+n+"| "+e}).join("\n");t.path=i;t.message=(i||"Pug")+":"+r+"\n"+a+"\n\n"+t.message;throw t}},function(e,t){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n.n(i),s={pis:37.58,po:24.09,razem:3.62,korwin:4.76,psl:5.13,zl:7.55,k15:8.81,nowoczesna:7.6},a=[{id:"pis",name:"Prawo i Sprawiedliwość",shortName:"PiS",threshold:5,pastSupportEquivalence:[["pis",1]]},{id:"ko",name:"Koalicja Obywatelska",shortName:"KO",threshold:8,pastSupportEquivalence:[["po",1],["nowoczesna",1]]},{id:"lewica",name:"SLD – Lewica",shortName:"Lew.",threshold:5,pastSupportEquivalence:[["zl",1],["razem",1]]},{id:"psl",name:"PSL – Koalicja Polska",shortName:"PSL",threshold:5,pastSupportEquivalence:[["psl",1],["k15",.5]]},{id:"konfederacja",name:"Konfederacja",shortName:"Konf.",threshold:5,pastSupportEquivalence:[["korwin",1],["k15",.5]]},{id:"mn",name:"Mniejszość Niemiecka",shortName:"MN",threshold:0,pastSupportEquivalence:[]}],o=[{name:"Legnica",size:12,pastSupport:{pis:35.7,po:25.24,razem:3.64,korwin:4.32,psl:3.89,zl:10.45,k15:9.59,nowoczesna:7.15}},{name:"Wałbrzych",size:8,pastSupport:{pis:31.15,po:32.65,razem:3.41,korwin:4.3,psl:3.18,zl:8.76,k15:8.81,nowoczesna:6.64}},{name:"Wrocław",size:14,pastSupport:{pis:31.21,po:30.49,razem:4.21,korwin:5.22,psl:2.6,zl:6.1,k15:8.74,nowoczesna:10.65}},{name:"Bydgoszcz",size:12,pastSupport:{pis:30.2,po:29.64,razem:3.76,korwin:4.54,psl:6.07,zl:10.04,k15:7.77,nowoczesna:7.3}},{name:"Toruń",size:13,pastSupport:{pis:33.57,po:25.77,razem:3.65,korwin:3.9,psl:6.75,zl:10.76,k15:8.32,nowoczesna:6.5}},{name:"Lublin",size:15,pastSupport:{pis:47.57,po:16.59,razem:2.75,korwin:5,psl:7.74,zl:5.98,k15:9.32,nowoczesna:4.54}},{name:"Chełm",size:12,pastSupport:{pis:48.02,po:12.31,razem:2.39,korwin:4.37,psl:11.39,zl:7.11,k15:10.47,nowoczesna:3.75}},{name:"Zielona Góra",size:12,pastSupport:{pis:28.27,po:28.21,razem:3.99,korwin:4.99,psl:5.12,zl:10.02,k15:8.75,nowoczesna:9.99}},{name:"Łódź",size:10,pastSupport:{pis:29.9,po:31.28,razem:4.63,korwin:4.78,psl:2.7,zl:10.48,k15:7.24,nowoczesna:8.99}},{name:"Piotrków Trybunalski",size:9,pastSupport:{pis:46.95,po:15.46,razem:3.06,korwin:3.91,psl:7.48,zl:7.47,k15:10.08,nowoczesna:5.59}},{name:"Sieradz",size:12,pastSupport:{pis:39.93,po:21.18,razem:3.54,korwin:4.1,psl:7.86,zl:8.18,k15:8.92,nowoczesna:5.32}},{name:"Chrzanów",size:8,pastSupport:{pis:49.05,po:20.42,razem:3.26,korwin:4.45,psl:3.03,zl:5.33,k15:8.67,nowoczesna:5.79}},{name:"Kraków",size:14,pastSupport:{pis:38.62,po:24.61,razem:3.88,korwin:6.35,psl:2.7,zl:6.38,k15:7.26,nowoczesna:9.73}},{name:"Nowy Sącz",size:10,pastSupport:{pis:60.56,po:13.95,razem:2.13,korwin:4.31,psl:4.16,zl:2.55,k15:7.83,nowoczesna:3.69}},{name:"Tarnów",size:9,pastSupport:{pis:51.99,po:14.71,razem:2.43,korwin:4.72,psl:8.08,zl:3.41,k15:9.6,nowoczesna:4.54}},{name:"Płock",size:10,pastSupport:{pis:43.78,po:16.44,razem:3.35,korwin:4.07,psl:10.66,zl:8.14,k15:8.41,nowoczesna:5.15}},{name:"Radom",size:9,pastSupport:{pis:47.49,po:17.55,razem:2.62,korwin:3.91,psl:9.42,zl:4.82,k15:8.41,nowoczesna:4.81}},{name:"Siedlce",size:12,pastSupport:{pis:51.1,po:13.55,razem:2.66,korwin:4.35,psl:10.23,zl:4.35,k15:8.36,nowoczesna:4.63}},{name:"Warszawa I",size:20,pastSupport:{pis:29.89,po:27.54,razem:5.54,korwin:6.18,psl:.72,zl:8.55,k15:7.76,nowoczesna:13.39}},{name:"Warszawa II",size:12,pastSupport:{pis:38.8,po:25.12,razem:3.85,korwin:4.81,psl:3.8,zl:5.66,k15:7.22,nowoczesna:10.01}},{name:"Opole",size:12,pastSupport:{pis:27.77,po:26.23,razem:3.02,korwin:3.95,psl:3.68,zl:6.75,k15:12.57,nowoczesna:7.14}},{name:"Krosno",size:11,pastSupport:{pis:53.51,po:13.76,razem:2.32,korwin:4.28,psl:7.28,zl:4.56,k15:9.15,nowoczesna:3.97}},{name:"Rzeszów",size:15,pastSupport:{pis:56.11,po:13.11,razem:2.29,korwin:4.96,psl:4.67,zl:4.42,k15:9.28,nowoczesna:4.16}},{name:"Białystok",size:14,pastSupport:{pis:45.38,po:16.74,razem:2.59,korwin:4.66,psl:8.07,zl:7.35,k15:9.07,nowoczesna:5.37}},{name:"Gdańsk",size:12,pastSupport:{pis:29.61,po:34.72,razem:3.98,korwin:5,psl:3.02,zl:6.59,k15:7.15,nowoczesna:9.17}},{name:"Gdynia",size:14,pastSupport:{pis:31.22,po:33.46,razem:4.05,korwin:4.43,psl:3.23,zl:6.64,k15:8.02,nowoczesna:8.22}},{name:"Bielsko-Biała",size:9,pastSupport:{pis:40.42,po:23.57,razem:3.72,korwin:4.68,psl:3.42,zl:6.56,k15:9.36,nowoczesna:8.27}},{name:"Częstochowa",size:7,pastSupport:{pis:35.82,po:20.95,razem:3.64,korwin:4.27,psl:4.99,zl:11.12,k15:11.63,nowoczesna:6.74}},{name:"Gliwice",size:9,pastSupport:{pis:30.51,po:28.99,razem:4.15,korwin:5.09,psl:2.5,zl:7.21,k15:12.19,nowoczesna:8.9}},{name:"Rybnik",size:9,pastSupport:{pis:39.59,po:24.21,razem:3.33,korwin:4.53,psl:1.79,zl:5.93,k15:11.31,nowoczesna:6.33}},{name:"Katowice",size:12,pastSupport:{pis:32.92,po:28.37,razem:4.08,korwin:5.55,psl:.99,zl:6.77,k15:10.05,nowoczesna:8.66}},{name:"Sosnowiec",size:9,pastSupport:{pis:29.65,po:25.56,razem:4.44,korwin:4.81,psl:2.35,zl:13.97,k15:10.24,nowoczesna:8.97}},{name:"Kielce",size:16,pastSupport:{pis:42.81,po:17.25,razem:2.8,korwin:4.14,psl:9.51,zl:7.87,k15:9.41,nowoczesna:4.98}},{name:"Elbląg",size:8,pastSupport:{pis:31.56,po:30.12,razem:3.8,korwin:4.73,psl:6.69,zl:7.69,k15:8.24,nowoczesna:5.82}},{name:"Olsztyn",size:10,pastSupport:{pis:30.42,po:27.07,razem:3.74,korwin:5.1,psl:8.44,zl:8.76,k15:8.97,nowoczesna:6.82}},{name:"Kalisz",size:12,pastSupport:{pis:31.85,po:24.69,razem:3.17,korwin:4.25,psl:10.98,zl:8.82,k15:7.98,nowoczesna:7.04}},{name:"Konin",size:9,pastSupport:{pis:37.41,po:20.23,razem:3.98,korwin:3.99,psl:6.86,zl:11.77,k15:8.83,nowoczesna:6.94}},{name:"Piła",size:9,pastSupport:{pis:27.26,po:31.02,razem:3.92,korwin:4.07,psl:7.66,zl:9.15,k15:9.01,nowoczesna:6.98}},{name:"Poznań",size:10,pastSupport:{pis:23.9,po:35.65,razem:4.6,korwin:4.77,psl:1.91,zl:8.07,k15:6.06,nowoczesna:14.49}},{name:"Koszalin",size:8,pastSupport:{pis:28.58,po:30.07,razem:3.9,korwin:4.46,psl:4.13,zl:11.38,k15:9.41,nowoczesna:8.06}},{name:"Szczecin",size:12,pastSupport:{pis:29.09,po:31.93,razem:4.12,korwin:5.33,psl:3.88,zl:8.56,k15:8.42,nowoczesna:8.66}}],l=function(e){var t=e.map(function(e,t){return a[t].pastSupportEquivalence.map(function(e){return s[e[0]]*e[1]}).reduce(function(e,t){return e+t},0)}),n=new Array(e.length+1).fill(0);return o.forEach(function(i){var r=function(e,t,n){var i=n.pastSupport,r=e.map(function(e,t){return a[t].pastSupportEquivalence.map(function(e){return i[e[0]]*e[1]}).reduce(function(e,t){return e+t},0)}),s=t.map(function(e,t){return r[t]/e}),o=e.map(function(e,t){return e*s[t]});return"Opole"===n.name&&o.push(8.14),o}(e,t,i);i.support=r,i.mandates=new Array(r.length).fill(0);for(var s=r.map(function(t,n){return e[n]0&&(n[e.committeeIndex]++,i.mandates[e.committeeIndex]++)})}),n},u=n(1),c=n.n(u),p=(n(4),function(e){e.preventDefault();var t=document.querySelectorAll("#support-form input"),n=Array.from(t).map(function(e){return parseFloat(e.value)});if(document.querySelector("#support-form").checkValidity()){var i=l(n);i.forEach(function(e,t){var n=a[t].id,i=document.querySelector("tr.".concat(n," td:last-child"));i&&(i.textContent=e.toString())});var s={labels:a.map(function(e){return e.shortName}).slice(0,-1),series:n},u=new r.a.Bar("#support-bar-chart",s,{distributeSeries:!0});u.on("draw",function(e){"bar"===e.type&&e.element.attr({style:"stroke-width: 30px"})});var p,h={series:i},d={donut:!0,donutWidth:60,startAngle:270,total:920,labelInterpolationFnc:function(e){return e<15?"":String(e)}},m=new r.a.Pie("#division-pie-chart",h,d);p=document.getElementById("constituency-results"),o.forEach(function(e,t){var n=e.mandates&&e.support?e.mandates.map(function(t,n){return{committee:a[n].name,support:e.support[n],mandates:t}}):[];n.sort(function(e,t){return t.support-e.support}),p.insertAdjacentHTML("beforeend",c()({number:t+1,name:e.name,size:e.size,data:n}))}),t.forEach(function(e){return e.addEventListener("input",function(){!function(e,t){document.querySelectorAll("tr td:last-child").forEach(function(e){e.innerHTML=""}),e.detach(),t.detach(),document.getElementById("support-bar-chart").innerHTML="",document.getElementById("division-pie-chart").innerHTML="",document.getElementById("constituency-results").innerHTML=""}(u,m)})})}});document.addEventListener("DOMContentLoaded",function(){document.querySelector("#calculate-button").addEventListener("click",p)})}]); \ No newline at end of file +!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){var i,r;r=this,void 0===(i=function(){return r.Chartist=function(){var e={version:"0.11.3"};return function(e,t){"use strict";var n=e.window,i=e.document;t.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},t.noop=function(e){return e},t.alphaNumerate=function(e){return String.fromCharCode(97+e%26)},t.extend=function(e){var n,i,r;for(e=e||{},n=1;n":">",'"':""","'":"'"},t.serialize=function(e){return null==e?e:("number"==typeof e?e=""+e:"object"==typeof e&&(e=JSON.stringify({data:e})),Object.keys(t.escapingMap).reduce(function(e,n){return t.replaceAll(e,n,t.escapingMap[n])},e))},t.deserialize=function(e){if("string"!=typeof e)return e;e=Object.keys(t.escapingMap).reduce(function(e,n){return t.replaceAll(e,t.escapingMap[n],n)},e);try{e=void 0!==(e=JSON.parse(e)).data?e.data:e}catch(e){}return e},t.createSvg=function(e,n,i,r){var s;return n=n||"100%",i=i||"100%",Array.prototype.slice.call(e.querySelectorAll("svg")).filter(function(e){return e.getAttributeNS(t.namespaces.xmlns,"ct")}).forEach(function(t){e.removeChild(t)}),(s=new t.Svg("svg").attr({width:n,height:i}).addClass(r))._node.style.width=n,s._node.style.height=i,e.appendChild(s._node),s},t.normalizeData=function(e,n,i){var r,s={raw:e,normalized:{}};return s.normalized.series=t.getDataArray({series:e.series||[]},n,i),r=s.normalized.series.every(function(e){return e instanceof Array})?Math.max.apply(null,s.normalized.series.map(function(e){return e.length})):s.normalized.series.length,s.normalized.labels=(e.labels||[]).slice(),Array.prototype.push.apply(s.normalized.labels,t.times(Math.max(0,r-s.normalized.labels.length)).map(function(){return""})),n&&t.reverseData(s.normalized),s},t.safeHasProperty=function(e,t){return null!==e&&"object"==typeof e&&e.hasOwnProperty(t)},t.isDataHoleValue=function(e){return null==e||"number"==typeof e&&isNaN(e)},t.reverseData=function(e){e.labels.reverse(),e.series.reverse();for(var t=0;tr.high&&(r.high=o),a&&o0?r.low=0:(r.high=1,r.low=0)),r},t.isNumeric=function(e){return null!==e&&isFinite(e)},t.isFalseyButZero=function(e){return!e&&0!==e},t.getNumberOrUndefined=function(e){return t.isNumeric(e)?+e:void 0},t.isMultiValue=function(e){return"object"==typeof e&&("x"in e||"y"in e)},t.getMultiValue=function(e,n){return t.isMultiValue(e)?t.getNumberOrUndefined(e[n||"y"]):t.getNumberOrUndefined(e)},t.rho=function(e){if(1===e)return e;function t(e,n){return e%n==0?n:t(n,e%n)}function n(e){return e*e+1}var i,r=2,s=2;if(e%2==0)return 2;do{r=n(r)%e,s=n(n(s))%e,i=t(Math.abs(r-s),e)}while(1===i);return i},t.getBounds=function(e,n,i,r){var s,a,o,l=0,u={high:n.high,low:n.low};u.valueRange=u.high-u.low,u.oom=t.orderOfMagnitude(u.valueRange),u.step=Math.pow(10,u.oom),u.min=Math.floor(u.low/u.step)*u.step,u.max=Math.ceil(u.high/u.step)*u.step,u.range=u.max-u.min,u.numberOfSteps=Math.round(u.range/u.step);var c=t.projectLength(e,u.step,u)=i)u.step=1;else if(r&&p=i)u.step=p;else for(;;){if(c&&t.projectLength(e,u.step,u)<=i)u.step*=2;else{if(c||!(t.projectLength(e,u.step/2,u)>=i))break;if(u.step/=2,r&&u.step%1!=0){u.step*=2;break}}if(l++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var h=2221e-19;function d(e,t){return e===(e+=t)&&(e*=1+(t>0?h:-h)),e}for(u.step=Math.max(u.step,h),a=u.min,o=u.max;a+u.step<=u.low;)a=d(a,u.step);for(;o-u.step>=u.high;)o=d(o,-u.step);u.min=a,u.max=o,u.range=u.max-u.min;var m=[];for(s=u.min;s<=u.max;s=d(s,u.step)){var f=t.roundWithPrecision(s);f!==m[m.length-1]&&m.push(f)}return u.values=m,u},t.polarToCartesian=function(e,t,n,i){var r=(i-90)*Math.PI/180;return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}},t.createChartRect=function(e,n,i){var r=!(!n.axisX&&!n.axisY),s=r?n.axisY.offset:0,a=r?n.axisX.offset:0,o=e.width()||t.quantity(n.width).value||0,l=e.height()||t.quantity(n.height).value||0,u=t.normalizePadding(n.chartPadding,i);o=Math.max(o,s+u.left+u.right),l=Math.max(l,a+u.top+u.bottom);var c={padding:u,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return r?("start"===n.axisX.position?(c.y2=u.top+a,c.y1=Math.max(l-u.bottom,c.y2+1)):(c.y2=u.top,c.y1=Math.max(l-u.bottom-a,c.y2+1)),"start"===n.axisY.position?(c.x1=u.left+s,c.x2=Math.max(o-u.right,c.x1+1)):(c.x1=u.left,c.x2=Math.max(o-u.right-s,c.x1+1))):(c.x1=u.left,c.x2=Math.max(o-u.right,c.x1+1),c.y2=u.top,c.y1=Math.max(l-u.bottom,c.y2+1)),c},t.createGrid=function(e,n,i,r,s,a,o,l){var u={};u[i.units.pos+"1"]=e,u[i.units.pos+"2"]=e,u[i.counterUnits.pos+"1"]=r,u[i.counterUnits.pos+"2"]=r+s;var c=a.elem("line",u,o.join(" "));l.emit("draw",t.extend({type:"grid",axis:i,index:n,group:a,element:c},u))},t.createGridBackground=function(e,t,n,i){var r=e.elem("rect",{x:t.x1,y:t.y2,width:t.width(),height:t.height()},n,!0);i.emit("draw",{type:"gridBackground",group:e,element:r})},t.createLabel=function(e,n,r,s,a,o,l,u,c,p,h){var d,m={};if(m[a.units.pos]=e+l[a.units.pos],m[a.counterUnits.pos]=l[a.counterUnits.pos],m[a.units.len]=n,m[a.counterUnits.len]=Math.max(0,o-10),p){var f=i.createElement("span");f.className=c.join(" "),f.setAttribute("xmlns",t.namespaces.xhtml),f.innerText=s[r],f.style[a.units.len]=Math.round(m[a.units.len])+"px",f.style[a.counterUnits.len]=Math.round(m[a.counterUnits.len])+"px",d=u.foreignObject(f,t.extend({style:"overflow: visible;"},m))}else d=u.elem("text",m,c.join(" ")).text(s[r]);h.emit("draw",t.extend({type:"label",axis:a,index:r,group:u,element:d,text:s[r]},m))},t.getSeriesOption=function(e,t,n){if(e.name&&t.series&&t.series[e.name]){var i=t.series[e.name];return i.hasOwnProperty(n)?i[n]:t[n]}return t[n]},t.optionsProvider=function(e,i,r){var s,a,o=t.extend({},e),l=[];function u(e){var l=s;if(s=t.extend({},o),i)for(a=0;a=2&&e[a]<=e[a-2]&&(s=!0),s&&(r.push({pathCoordinates:[],valueData:[]}),s=!1),r[r.length-1].pathCoordinates.push(e[a],e[a+1]),r[r.length-1].valueData.push(n[a/2]));return r}}(this,e),function(e,t){"use strict";t.Interpolation={},t.Interpolation.none=function(e){return e=t.extend({},{fillHoles:!1},e),function(n,i){for(var r=new t.Svg.Path,s=!0,a=0;a1){var l=[];return o.forEach(function(e){l.push(r(e.pathCoordinates,e.valueData))}),t.Svg.Path.join(l)}if(s=o[0].pathCoordinates,a=o[0].valueData,s.length<=4)return t.Interpolation.none()(s,a);for(var u=(new t.Svg.Path).move(s[0],s[1],!1,a[0]),c=0,p=s.length;p-2>c;c+=2){var h=[{x:+s[c-2],y:+s[c-1]},{x:+s[c],y:+s[c+1]},{x:+s[c+2],y:+s[c+3]},{x:+s[c+4],y:+s[c+5]}];p-4===c?h[3]=h[2]:c||(h[0]={x:+s[c],y:+s[c+1]}),u.curve(n*(-h[0].x+6*h[1].x+h[2].x)/6+i*h[2].x,n*(-h[0].y+6*h[1].y+h[2].y)/6+i*h[2].y,n*(h[1].x+6*h[2].x-h[3].x)/6+i*h[2].x,n*(h[1].y+6*h[2].y-h[3].y)/6+i*h[2].y,h[2].x,h[2].y,!1,a[(c+2)/2])}return u}return t.Interpolation.none()([])}},t.Interpolation.monotoneCubic=function(e){return e=t.extend({},{fillHoles:!1},e),function n(i,r){var s=t.splitIntoSegments(i,r,{fillHoles:e.fillHoles,increasingX:!0});if(s.length){if(s.length>1){var a=[];return s.forEach(function(e){a.push(n(e.pathCoordinates,e.valueData))}),t.Svg.Path.join(a)}if(i=s[0].pathCoordinates,r=s[0].valueData,i.length<=4)return t.Interpolation.none()(i,r);var o,l,u=[],c=[],p=i.length/2,h=[],d=[],m=[],f=[];for(o=0;o0!=d[o]>0?h[o]=0:(h[o]=3*(f[o-1]+f[o])/((2*f[o]+f[o-1])/d[o-1]+(f[o]+2*f[o-1])/d[o]),isFinite(h[o])||(h[o]=0));for(l=(new t.Svg.Path).move(u[0],c[0],!1,r[0]),o=0;o1}).map(function(e){var t=e.pathElements[0],n=e.pathElements[e.pathElements.length-1];return e.clone(!0).position(0).remove(1).move(t.x,v).line(t.x,t.y).position(e.pathElements.length+1).line(n.x,v)}).forEach(function(t){var o=l.elem("path",{d:t.stringify()},e.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:i.normalized.series[a],path:t.clone(),series:n,seriesIndex:a,axisX:r,axisY:s,chartRect:u,index:a,group:l,element:o})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:s.bounds,chartRect:u,axisX:r,axisY:s,svg:this.svg,options:e})}})}(this,e),function(e,t){"use strict";e.window,e.document;var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:t.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:t.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};t.Bar=t.Base.extend({constructor:function(e,i,r,s){t.Bar.super.constructor.call(this,e,i,n,t.extend({},n,r),s)},createChart:function(e){var i,r;e.distributeSeries?(i=t.normalizeData(this.data,e.reverseData,e.horizontalBars?"x":"y")).normalized.series=i.normalized.series.map(function(e){return[e]}):i=t.normalizeData(this.data,e.reverseData,e.horizontalBars?"x":"y"),this.svg=t.createSvg(this.container,e.width,e.height,e.classNames.chart+(e.horizontalBars?" "+e.classNames.horizontalBars:""));var s=this.svg.elem("g").addClass(e.classNames.gridGroup),a=this.svg.elem("g"),o=this.svg.elem("g").addClass(e.classNames.labelGroup);if(e.stackBars&&0!==i.normalized.series.length){var l=t.serialMap(i.normalized.series,function(){return Array.prototype.slice.call(arguments).map(function(e){return e}).reduce(function(e,t){return{x:e.x+(t&&t.x)||0,y:e.y+(t&&t.y)||0}},{x:0,y:0})});r=t.getHighLow([l],e,e.horizontalBars?"x":"y")}else r=t.getHighLow(i.normalized.series,e,e.horizontalBars?"x":"y");r.high=+e.high||(0===e.high?0:r.high),r.low=+e.low||(0===e.low?0:r.low);var u,c,p,h,d,m=t.createChartRect(this.svg,e,n.padding);c=e.distributeSeries&&e.stackBars?i.normalized.labels.slice(0,1):i.normalized.labels,e.horizontalBars?(u=h=void 0===e.axisX.type?new t.AutoScaleAxis(t.Axis.units.x,i.normalized.series,m,t.extend({},e.axisX,{highLow:r,referenceValue:0})):e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,m,t.extend({},e.axisX,{highLow:r,referenceValue:0})),p=d=void 0===e.axisY.type?new t.StepAxis(t.Axis.units.y,i.normalized.series,m,{ticks:c}):e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,m,e.axisY)):(p=h=void 0===e.axisX.type?new t.StepAxis(t.Axis.units.x,i.normalized.series,m,{ticks:c}):e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,m,e.axisX),u=d=void 0===e.axisY.type?new t.AutoScaleAxis(t.Axis.units.y,i.normalized.series,m,t.extend({},e.axisY,{highLow:r,referenceValue:0})):e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,m,t.extend({},e.axisY,{highLow:r,referenceValue:0})));var f=e.horizontalBars?m.x1+u.projectValue(0):m.y1-u.projectValue(0),v=[];p.createGridAndLabels(s,o,this.supportsForeignObject,e,this.eventEmitter),u.createGridAndLabels(s,o,this.supportsForeignObject,e,this.eventEmitter),e.showGridBackground&&t.createGridBackground(s,m,e.classNames.gridBackground,this.eventEmitter),i.raw.series.forEach(function(n,r){var s,o,l=r-(i.raw.series.length-1)/2;s=e.distributeSeries&&!e.stackBars?p.axisLength/i.normalized.series.length/2:e.distributeSeries&&e.stackBars?p.axisLength/2:p.axisLength/i.normalized.series[r].length/2,(o=a.elem("g")).attr({"ct:series-name":n.name,"ct:meta":t.serialize(n.meta)}),o.addClass([e.classNames.series,n.className||e.classNames.series+"-"+t.alphaNumerate(r)].join(" ")),i.normalized.series[r].forEach(function(a,c){var g,x,y,w;if(w=e.distributeSeries&&!e.stackBars?r:e.distributeSeries&&e.stackBars?0:c,g=e.horizontalBars?{x:m.x1+u.projectValue(a&&a.x?a.x:0,c,i.normalized.series[r]),y:m.y1-p.projectValue(a&&a.y?a.y:0,w,i.normalized.series[r])}:{x:m.x1+p.projectValue(a&&a.x?a.x:0,w,i.normalized.series[r]),y:m.y1-u.projectValue(a&&a.y?a.y:0,c,i.normalized.series[r])},p instanceof t.StepAxis&&(p.options.stretch||(g[p.units.pos]+=s*(e.horizontalBars?-1:1)),g[p.units.pos]+=e.stackBars||e.distributeSeries?0:l*e.seriesBarDistance*(e.horizontalBars?-1:1)),y=v[c]||f,v[c]=y-(f-g[p.counterUnits.pos]),void 0!==a){var z={};z[p.units.pos+"1"]=g[p.units.pos],z[p.units.pos+"2"]=g[p.units.pos],!e.stackBars||"accumulate"!==e.stackMode&&e.stackMode?(z[p.counterUnits.pos+"1"]=f,z[p.counterUnits.pos+"2"]=g[p.counterUnits.pos]):(z[p.counterUnits.pos+"1"]=y,z[p.counterUnits.pos+"2"]=v[c]),z.x1=Math.min(Math.max(z.x1,m.x1),m.x2),z.x2=Math.min(Math.max(z.x2,m.x1),m.x2),z.y1=Math.min(Math.max(z.y1,m.y2),m.y1),z.y2=Math.min(Math.max(z.y2,m.y2),m.y1);var b=t.getMetaData(n,c);x=o.elem("line",z,e.classNames.bar).attr({"ct:value":[a.x,a.y].filter(t.isNumeric).join(","),"ct:meta":t.serialize(b)}),this.eventEmitter.emit("draw",t.extend({type:"bar",value:a,index:c,meta:b,series:n,seriesIndex:r,axisX:h,axisY:d,chartRect:m,group:o,element:x},z))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:u.bounds,chartRect:m,axisX:h,axisY:d,svg:this.svg,options:e})}})}(this,e),function(e,t){"use strict";e.window,e.document;var n={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:t.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};function i(e,t,n){var i=t.x>e.x;return i&&"explode"===n||!i&&"implode"===n?"start":i&&"implode"===n||!i&&"explode"===n?"end":"middle"}t.Pie=t.Base.extend({constructor:function(e,i,r,s){t.Pie.super.constructor.call(this,e,i,n,t.extend({},n,r),s)},createChart:function(e){var r,s,a,o,l,u=t.normalizeData(this.data),c=[],p=e.startAngle;this.svg=t.createSvg(this.container,e.width,e.height,e.donut?e.classNames.chartDonut:e.classNames.chartPie),s=t.createChartRect(this.svg,e,n.padding),a=Math.min(s.width()/2,s.height()/2),l=e.total||u.normalized.series.reduce(function(e,t){return e+t},0);var h=t.quantity(e.donutWidth);"%"===h.unit&&(h.value*=a/100),a-=e.donut&&!e.donutSolid?h.value/2:0,o="outside"===e.labelPosition||e.donut&&!e.donutSolid?a:"center"===e.labelPosition?0:e.donutSolid?a-h.value/2:a/2,o+=e.labelOffset;var d={x:s.x1+s.width()/2,y:s.y2+s.height()/2},m=1===u.raw.series.filter(function(e){return e.hasOwnProperty("value")?0!==e.value:0!==e}).length;u.raw.series.forEach(function(e,t){c[t]=this.svg.elem("g",null,null)}.bind(this)),e.showLabel&&(r=this.svg.elem("g",null,null)),u.raw.series.forEach(function(n,s){if(0!==u.normalized.series[s]||!e.ignoreEmptyValues){c[s].attr({"ct:series-name":n.name}),c[s].addClass([e.classNames.series,n.className||e.classNames.series+"-"+t.alphaNumerate(s)].join(" "));var f=l>0?p+u.normalized.series[s]/l*360:0,v=Math.max(0,p-(0===s||m?0:.2));f-v>=359.99&&(f=v+359.99);var g,x,y,w=t.polarToCartesian(d.x,d.y,a,v),z=t.polarToCartesian(d.x,d.y,a,f),b=new t.Svg.Path(!e.donut||e.donutSolid).move(z.x,z.y).arc(a,a,0,f-p>180,0,w.x,w.y);e.donut?e.donutSolid&&(y=a-h.value,g=t.polarToCartesian(d.x,d.y,y,p-(0===s||m?0:.2)),x=t.polarToCartesian(d.x,d.y,y,f),b.line(g.x,g.y),b.arc(y,y,0,f-p>180,1,x.x,x.y)):b.line(d.x,d.y);var S=e.classNames.slicePie;e.donut&&(S=e.classNames.sliceDonut,e.donutSolid&&(S=e.classNames.sliceDonutSolid));var k=c[s].elem("path",{d:b.stringify()},S);if(k.attr({"ct:value":u.normalized.series[s],"ct:meta":t.serialize(n.meta)}),e.donut&&!e.donutSolid&&(k._node.style.strokeWidth=h.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:u.normalized.series[s],totalDataSum:l,index:s,meta:n.meta,series:n,group:c[s],element:k,path:b.clone(),center:d,radius:a,startAngle:p,endAngle:f}),e.showLabel){var E,A;E=1===u.raw.series.length?{x:d.x,y:d.y}:t.polarToCartesian(d.x,d.y,o,p+(f-p)/2),A=u.normalized.labels&&!t.isFalseyButZero(u.normalized.labels[s])?u.normalized.labels[s]:u.normalized.series[s];var O=e.labelInterpolationFnc(A,s);if(O||0===O){var M=r.elem("text",{dx:E.x,dy:E.y,"text-anchor":i(d,E,e.labelDirection)},e.classNames.label).text(""+O);this.eventEmitter.emit("draw",{type:"label",index:s,group:r,element:M,text:""+O,x:E.x,y:E.y})}}p=f}}.bind(this)),this.eventEmitter.emit("created",{chartRect:s,svg:this.svg,options:e})},determineAnchorPosition:i})}(this,e),e}()}.apply(t,[]))||(e.exports=i)},function(e,t,n){var i=n(2);e.exports=function(e){var t,n="",r=e||{};return function(e,r,s,a){n=n+'

Okręg '+i.escape(null==(t=s)?"":t)+" "+i.escape(null==(t=r)?"":t)+"

Łącznie "+i.escape(null==(t=a)?"":t)+" mandatów

",function(){var r=e;if("number"==typeof r.length)for(var s=0,a=r.length;s"}else{a=0;for(var s in r){a++;o=r[s];n=n+""}}}.call(this),n+="
"+i.escape(null==(t=o.committee)?"":t)+""+i.escape(null==(t=o.mandates)?"":t)+"
"+i.escape(null==(t=o.committee)?"":t)+""+i.escape(null==(t=o.mandates)?"":t)+"
"}.call(this,"data"in r?r.data:"undefined"!=typeof data?data:void 0,"name"in r?r.name:"undefined"!=typeof name?name:void 0,"number"in r?r.number:"undefined"!=typeof number?number:void 0,"size"in r?r.size:"undefined"!=typeof size?size:void 0),n}},function(e,t,n){"use strict";var i=Object.prototype.hasOwnProperty;function r(e,t){return Array.isArray(e)?function(e,t){for(var n,i="",s="",a=Array.isArray(t),o=0;o]/;function l(e){var t=""+e,n=o.exec(t);if(!n)return e;var i,r,s,a="";for(i=n.index,r=0;i ":" ")+n+"| "+e}).join("\n");t.path=i;t.message=(i||"Pug")+":"+r+"\n"+a+"\n\n"+t.message;throw t}},function(e,t){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(0),r=n.n(i),s={pis:37.58,po:24.09,razem:3.62,korwin:4.76,psl:5.13,zl:7.55,k15:8.81,nowoczesna:7.6},a=[{id:"pis",name:"Prawo i Sprawiedliwość",shortName:"PiS",threshold:5,pastSupportEquivalence:[["pis",1]]},{id:"ko",name:"Koalicja Obywatelska",shortName:"KO",threshold:8,pastSupportEquivalence:[["po",1],["nowoczesna",1]]},{id:"lewica",name:"SLD – Lewica",shortName:"Lew.",threshold:5,pastSupportEquivalence:[["zl",1],["razem",1]]},{id:"psl",name:"PSL – Koalicja Polska",shortName:"PSL",threshold:5,pastSupportEquivalence:[["psl",1],["k15",.25]]},{id:"konfederacja",name:"Konfederacja",shortName:"Konf.",threshold:5,pastSupportEquivalence:[["korwin",1],["k15",.75]]},{id:"mn",name:"Mniejszość Niemiecka",shortName:"MN",threshold:0,pastSupportEquivalence:[]}],o=[{name:"Legnica",size:12,pastSupport:{pis:35.7,po:25.24,razem:3.64,korwin:4.32,psl:3.89,zl:10.45,k15:9.59,nowoczesna:7.15}},{name:"Wałbrzych",size:8,pastSupport:{pis:31.15,po:32.65,razem:3.41,korwin:4.3,psl:3.18,zl:8.76,k15:8.81,nowoczesna:6.64}},{name:"Wrocław",size:14,pastSupport:{pis:31.21,po:30.49,razem:4.21,korwin:5.22,psl:2.6,zl:6.1,k15:8.74,nowoczesna:10.65}},{name:"Bydgoszcz",size:12,pastSupport:{pis:30.2,po:29.64,razem:3.76,korwin:4.54,psl:6.07,zl:10.04,k15:7.77,nowoczesna:7.3}},{name:"Toruń",size:13,pastSupport:{pis:33.57,po:25.77,razem:3.65,korwin:3.9,psl:6.75,zl:10.76,k15:8.32,nowoczesna:6.5}},{name:"Lublin",size:15,pastSupport:{pis:47.57,po:16.59,razem:2.75,korwin:5,psl:7.74,zl:5.98,k15:9.32,nowoczesna:4.54}},{name:"Chełm",size:12,pastSupport:{pis:48.02,po:12.31,razem:2.39,korwin:4.37,psl:11.39,zl:7.11,k15:10.47,nowoczesna:3.75}},{name:"Zielona Góra",size:12,pastSupport:{pis:28.27,po:28.21,razem:3.99,korwin:4.99,psl:5.12,zl:10.02,k15:8.75,nowoczesna:9.99}},{name:"Łódź",size:10,pastSupport:{pis:29.9,po:31.28,razem:4.63,korwin:4.78,psl:2.7,zl:10.48,k15:7.24,nowoczesna:8.99}},{name:"Piotrków Trybunalski",size:9,pastSupport:{pis:46.95,po:15.46,razem:3.06,korwin:3.91,psl:7.48,zl:7.47,k15:10.08,nowoczesna:5.59}},{name:"Sieradz",size:12,pastSupport:{pis:39.93,po:21.18,razem:3.54,korwin:4.1,psl:7.86,zl:8.18,k15:8.92,nowoczesna:5.32}},{name:"Chrzanów",size:8,pastSupport:{pis:49.05,po:20.42,razem:3.26,korwin:4.45,psl:3.03,zl:5.33,k15:8.67,nowoczesna:5.79}},{name:"Kraków",size:14,pastSupport:{pis:38.62,po:24.61,razem:3.88,korwin:6.35,psl:2.7,zl:6.38,k15:7.26,nowoczesna:9.73}},{name:"Nowy Sącz",size:10,pastSupport:{pis:60.56,po:13.95,razem:2.13,korwin:4.31,psl:4.16,zl:2.55,k15:7.83,nowoczesna:3.69}},{name:"Tarnów",size:9,pastSupport:{pis:51.99,po:14.71,razem:2.43,korwin:4.72,psl:8.08,zl:3.41,k15:9.6,nowoczesna:4.54}},{name:"Płock",size:10,pastSupport:{pis:43.78,po:16.44,razem:3.35,korwin:4.07,psl:10.66,zl:8.14,k15:8.41,nowoczesna:5.15}},{name:"Radom",size:9,pastSupport:{pis:47.49,po:17.55,razem:2.62,korwin:3.91,psl:9.42,zl:4.82,k15:8.41,nowoczesna:4.81}},{name:"Siedlce",size:12,pastSupport:{pis:51.1,po:13.55,razem:2.66,korwin:4.35,psl:10.23,zl:4.35,k15:8.36,nowoczesna:4.63}},{name:"Warszawa I",size:20,pastSupport:{pis:29.89,po:27.54,razem:5.54,korwin:6.18,psl:.72,zl:8.55,k15:7.76,nowoczesna:13.39}},{name:"Warszawa II",size:12,pastSupport:{pis:38.8,po:25.12,razem:3.85,korwin:4.81,psl:3.8,zl:5.66,k15:7.22,nowoczesna:10.01}},{name:"Opole",size:12,pastSupport:{pis:27.77,po:26.23,razem:3.02,korwin:3.95,psl:3.68,zl:6.75,k15:12.57,nowoczesna:7.14}},{name:"Krosno",size:11,pastSupport:{pis:53.51,po:13.76,razem:2.32,korwin:4.28,psl:7.28,zl:4.56,k15:9.15,nowoczesna:3.97}},{name:"Rzeszów",size:15,pastSupport:{pis:56.11,po:13.11,razem:2.29,korwin:4.96,psl:4.67,zl:4.42,k15:9.28,nowoczesna:4.16}},{name:"Białystok",size:14,pastSupport:{pis:45.38,po:16.74,razem:2.59,korwin:4.66,psl:8.07,zl:7.35,k15:9.07,nowoczesna:5.37}},{name:"Gdańsk",size:12,pastSupport:{pis:29.61,po:34.72,razem:3.98,korwin:5,psl:3.02,zl:6.59,k15:7.15,nowoczesna:9.17}},{name:"Gdynia",size:14,pastSupport:{pis:31.22,po:33.46,razem:4.05,korwin:4.43,psl:3.23,zl:6.64,k15:8.02,nowoczesna:8.22}},{name:"Bielsko-Biała",size:9,pastSupport:{pis:40.42,po:23.57,razem:3.72,korwin:4.68,psl:3.42,zl:6.56,k15:9.36,nowoczesna:8.27}},{name:"Częstochowa",size:7,pastSupport:{pis:35.82,po:20.95,razem:3.64,korwin:4.27,psl:4.99,zl:11.12,k15:11.63,nowoczesna:6.74}},{name:"Gliwice",size:9,pastSupport:{pis:30.51,po:28.99,razem:4.15,korwin:5.09,psl:2.5,zl:7.21,k15:12.19,nowoczesna:8.9}},{name:"Rybnik",size:9,pastSupport:{pis:39.59,po:24.21,razem:3.33,korwin:4.53,psl:1.79,zl:5.93,k15:11.31,nowoczesna:6.33}},{name:"Katowice",size:12,pastSupport:{pis:32.92,po:28.37,razem:4.08,korwin:5.55,psl:.99,zl:6.77,k15:10.05,nowoczesna:8.66}},{name:"Sosnowiec",size:9,pastSupport:{pis:29.65,po:25.56,razem:4.44,korwin:4.81,psl:2.35,zl:13.97,k15:10.24,nowoczesna:8.97}},{name:"Kielce",size:16,pastSupport:{pis:42.81,po:17.25,razem:2.8,korwin:4.14,psl:9.51,zl:7.87,k15:9.41,nowoczesna:4.98}},{name:"Elbląg",size:8,pastSupport:{pis:31.56,po:30.12,razem:3.8,korwin:4.73,psl:6.69,zl:7.69,k15:8.24,nowoczesna:5.82}},{name:"Olsztyn",size:10,pastSupport:{pis:30.42,po:27.07,razem:3.74,korwin:5.1,psl:8.44,zl:8.76,k15:8.97,nowoczesna:6.82}},{name:"Kalisz",size:12,pastSupport:{pis:31.85,po:24.69,razem:3.17,korwin:4.25,psl:10.98,zl:8.82,k15:7.98,nowoczesna:7.04}},{name:"Konin",size:9,pastSupport:{pis:37.41,po:20.23,razem:3.98,korwin:3.99,psl:6.86,zl:11.77,k15:8.83,nowoczesna:6.94}},{name:"Piła",size:9,pastSupport:{pis:27.26,po:31.02,razem:3.92,korwin:4.07,psl:7.66,zl:9.15,k15:9.01,nowoczesna:6.98}},{name:"Poznań",size:10,pastSupport:{pis:23.9,po:35.65,razem:4.6,korwin:4.77,psl:1.91,zl:8.07,k15:6.06,nowoczesna:14.49}},{name:"Koszalin",size:8,pastSupport:{pis:28.58,po:30.07,razem:3.9,korwin:4.46,psl:4.13,zl:11.38,k15:9.41,nowoczesna:8.06}},{name:"Szczecin",size:12,pastSupport:{pis:29.09,po:31.93,razem:4.12,korwin:5.33,psl:3.88,zl:8.56,k15:8.42,nowoczesna:8.66}}],l=function(e){var t=e.map(function(e,t){return a[t].pastSupportEquivalence.map(function(e){return s[e[0]]*e[1]}).reduce(function(e,t){return e+t},0)}),n=new Array(e.length+1).fill(0);return o.forEach(function(i){var r=function(e,t,n){var i=n.pastSupport,r=e.map(function(e,t){return a[t].pastSupportEquivalence.map(function(e){return i[e[0]]*e[1]}).reduce(function(e,t){return e+t},0)}),s=t.map(function(e,t){return r[t]/e}),o=e.map(function(e,t){return e*s[t]});return"Opole"===n.name&&o.push(8.14),o}(e,t,i);i.support=r,i.mandates=new Array(r.length).fill(0);for(var s=r.map(function(t,n){return e[n]0&&(n[e.committeeIndex]++,i.mandates[e.committeeIndex]++)})}),n},u=n(1),c=n.n(u),p=(n(4),function(e){e.preventDefault();var t=document.querySelectorAll("#support-form input"),n=Array.from(t).map(function(e){return parseFloat(e.value)});if(document.querySelector("#support-form").checkValidity()){var i=l(n);i.forEach(function(e,t){var n=a[t].id,i=document.querySelector("tr.".concat(n," td:last-child"));i&&(i.textContent=e.toString())});var s={labels:a.map(function(e){return e.shortName}).slice(0,-1),series:n},u=new r.a.Bar("#support-bar-chart",s,{distributeSeries:!0});u.on("draw",function(e){"bar"===e.type&&e.element.attr({style:"stroke-width: 30px"})});var p,h={series:i},d={donut:!0,donutWidth:60,startAngle:270,total:920,labelInterpolationFnc:function(e){return e<15?"":String(e)}},m=new r.a.Pie("#division-pie-chart",h,d);p=document.getElementById("constituency-results"),o.forEach(function(e,t){var n=e.mandates&&e.support?e.mandates.map(function(t,n){return{committee:a[n].name,support:e.support[n],mandates:t}}):[];n.sort(function(e,t){return t.support-e.support}),p.insertAdjacentHTML("beforeend",c()({number:t+1,name:e.name,size:e.size,data:n}))}),t.forEach(function(e){return e.addEventListener("input",function(){!function(e,t){document.querySelectorAll("tr td:last-child").forEach(function(e){e.innerHTML=""}),e.detach(),t.detach(),document.getElementById("support-bar-chart").innerHTML="",document.getElementById("division-pie-chart").innerHTML="",document.getElementById("constituency-results").innerHTML=""}(u,m)})})}});document.addEventListener("DOMContentLoaded",function(){document.querySelector("#calculate-button").addEventListener("click",p)})}]); \ No newline at end of file diff --git a/index.html b/index.html index 0743bd8..e504d65 100644 --- a/index.html +++ b/index.html @@ -11,4 +11,4 @@ to na sporządzenie szczegółowej prognozy podziału mandatów na poziomie posz startującymi w 2015 roku a obecnymi. Można to zrobić jedynie w mocno przybliżony sposób. W przypadku PiS-u odpowiednikiem z poprzednich wyborów jest ten sam komitet. Dla pozostałych komitetów zastosowano następujące odpowiedniki: KO ≈ PO + Nowoczesna; Lewica ≈ Zjednoczona -Lewica + Razem; PSL ≈ PSL + ½ Kukiz’15; Konfederacja ≈ KORWiN + ½ Kukiz’15.

KomitetPoparcieMandaty
%
%
%
%
%
Mniejszość Niemiecka
\ No newline at end of file +Lewica + Razem; PSL ≈ PSL + ¼ Kukiz’15; Konfederacja ≈ KORWiN + ¾ Kukiz’15.

KomitetPoparcieMandaty
%
%
%
%
%
Mniejszość Niemiecka
\ No newline at end of file