New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

picasso-plugin-q

Package Overview
Dependencies
Maintainers
3
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

picasso-plugin-q - npm Package Compare versions

Comparing version 0.13.1 to 0.13.2

dist/picasso-q.esm.js

9

CHANGELOG.md

@@ -6,2 +6,11 @@ # Change Log

<a name="0.13.2"></a>
## [0.13.2](https://github.com/qlik-oss/picasso.js/compare/v0.13.1...v0.13.2) (2018-09-24)
**Note:** Version bump only for package picasso-plugin-q
<a name="0.13.1"></a>

@@ -8,0 +17,0 @@ ## [0.13.1](https://github.com/qlik-oss/picasso.js/compare/v0.13.0...v0.13.1) (2018-09-20)

15

dist/picasso-q.js

@@ -1,6 +0,9 @@

/*!
* picasso-plugin-q v0.13.1
* Copyright (c) 2018 QlikTech International AB
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.picassoQ=t():e.picassoQ=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,u=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},c=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},f=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,r,n,a,o,i,s=arguments[0],p=1,h=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[1]||{},p=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});p<h;++p)if(null!=(t=arguments[p]))for(r in t)n=f(s,r),s!==(a=f(t,r))&&(d&&a&&(c(a)||(o=u(a)))?(o?(o=!1,i=n&&u(n)?n:[]):i=n&&c(n)?n:{},l(s,{name:r,newValue:e(d,i,a)})):void 0!==a&&l(s,{name:r,newValue:a}));return s}},function(e,t,r){var n,a,o;/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */a=[],void 0===(o="function"==typeof(n=function(){return function(e,t){"use strict";if(!e||isNaN(+t))return t;var r,n,a,o,i,u,c,l,f,s,p=e.length,h=e.search(/[0-9\-\+#]/),d=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),v=m.search(/[0-9\-\+#]/),y=p-v,g=e.substring(y,y+1),b=y+("."===g||","===g?1:0),q=v>0?e.substring(b,p):"";if(e=e.substring(h,b),t="-"===e.charAt(0)?-t:+t,r=t<0?t=-t:0,n=e.match(/[^\d\-\+#]/g),a=n&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(a),t=+(t=t.toFixed(e[1]&&e[1].length))+"",u=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=u)&&(t=(+t).toFixed(u+1)),f=e[0].split(o),e[0]=f.join(""),(i=e[0]&&e[0].indexOf("0"))>-1)for(;l[0].length<e[0].length-i;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],c=f[1]&&f[f.length-1].length){for(s=t[0],m="",y=s.length%c,p=s.length,b=0;b<p;b++)m+=s.charAt(b),!((b-y+1)%c)&&b<p-c&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?a+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),d+(r?"-":"")+n+q}})?n.apply(t,a):n)||(e.exports=o)},function(e,t,r){"use strict";r.r(t);var n=r(0),a=r.n(n);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t,r){if(!e)return-1;var n=r.cache,a=n.fields.indexOf(e),o=-1,i=-1;if(-1===a)for(var u=0;u<n.wrappedFields.length;u++)if(i=n.wrappedFields[u].attrDims.map(function(e){return e.instance}).indexOf(e),o=n.wrappedFields[u].attrExps.map(function(e){return e.instance}).indexOf(e),-1!==i||-1!==o){a=u;break}if((a-=t.qArea.qLeft)<0||a>=t.qArea.qWidth)return-1;var c="row[".concat(a,"]");return i>=0?Function("row","return ".concat(c,".qAttrDims.qValues[").concat(i,"];")):o>=0?Function("row","return ".concat(c,".qAttrExps.qValues[").concat(o,"];")):Function("row","return ".concat(c,";"))}function c(e,t,r){var n=r.key,a={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return a.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(a.value),e.field&&(a.source={key:n,field:e.field.key()}),a}function l(e,t,r,n){var l=[];return(Array.isArray(e)?e:[e]).forEach(function(e){if(void 0!==e.field){var f=t.raw(),s=t.key(),p="object"===i(e.field)?e.field:t.field(e.field),h=n.normalizeConfig(e,t),d=h.props,m=h.main,v=Object.keys(d),y=!!e.trackBy,g=i(e.trackBy),b={},q=[],x=[];f.qDataPages.forEach(function(t){var o=u(p,t,{cache:r});-1!==o&&t.qMatrix.forEach(function(i,l){var f=t.qArea.qTop+l,h=a()({qRow:f},o(i)),M=c(m,h,{key:s});m.filter&&!m.filter(h)||(v.forEach(function(e){var n=d[e],o=n.fields||[n];if(n.fields&&(M[e]=[]),o.forEach(function(o,l){!function(e){var t=e.cache,r=e.f,n=e.mainCell,o=e.p,i=(e.prop,e.page),l=e.rowIdx,f=e.row,s=e.sourceKey,p=e.target,h=e.targetProp,d=n;if(o.field&&o.field!==r){var m=u(o.field,i,{cache:t});if(-1===m)return;d=a()({qRow:l},m(f))}p[h]=c(o,d,{key:s})}({cache:r,f:p,mainCell:h,p:o,prop:e,props:d,page:t,rowIdx:f,row:i,sourceKey:s,target:n.fields?M[e]:M,targetProp:n.fields?l:e})}),n.fields){var l=M[e].map(function(e){return e.value}),m=M[e].map(function(e){return e.label});M[e]={value:"function"==typeof n.value?n.value(l):void 0!==n.value?n.value:l},M[e].label="function"==typeof n.label?n.label(m):void 0!==n.label?String(n.label):String(M[e].value)}}),y&&n.track({cfg:e,itemData:h,obj:M,target:q,tracker:b,trackType:g}),x.push(M))})}),y?l.push.apply(l,o(n.collect(q,{main:m,propsArr:v,props:d}))):l.push.apply(l,x)}}),l}function f(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function s(e,t){var r,n,a,o,i,u=new m(e),c=+e.value&&(u.value=e.value),l=[u];for(null==t&&(t=p);r=l.pop();)if(c&&(r.value=+r.data.value),(a=t(r.data))&&(i=a.length))for(r.children=new Array(i),o=i-1;o>=0;--o)l.push(n=r.children[o]=new m(a[o])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(d)}function p(e){return e.children}function h(e){e.data=e.data.data}function d(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function m(e){this.data=e,this.depth=this.height=0,this.parent=null}m.prototype=s.prototype={constructor:m,count:function(){return this.eachAfter(f)},each:function(e){var t,r,n,a,o=this,i=[o];do{for(t=i.reverse(),i=[];o=t.pop();)if(e(o),r=o.children)for(n=0,a=r.length;n<a;++n)i.push(r[n])}while(i.length);return this},eachAfter:function(e){for(var t,r,n,a=this,o=[a],i=[];a=o.pop();)if(i.push(a),t=a.children)for(r=0,n=t.length;r<n;++r)o.push(t[r]);for(;a=i.pop();)e(a);return this},eachBefore:function(e){for(var t,r,n=this,a=[n];n=a.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)a.push(t[r]);return this},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,a=n&&n.length;--a>=0;)r+=n[a].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),a=null;for(e=r.pop(),t=n.pop();e===t;)a=e,e=r.pop(),t=n.pop();return a}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var a=n.length;e!==r;)n.splice(a,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return s(this).eachBefore(h)}};Array.prototype.slice;function v(e){if("function"!=typeof e)throw new Error;return e}var y=function(e,t,r,n,a){for(var o,i=e.children,u=-1,c=i.length,l=e.value&&(n-t)/e.value;++u<c;)(o=i[u]).y0=r,o.y1=a,o.x0=t,o.x1=t+=o.value*l},g="$",b={depth:-1},q={};function x(e){return e.id}function M(e){return e.parentId}var A=function(){var e=x,t=M;function r(r){var n,a,o,i,u,c,l,f=r.length,s=new Array(f),p={};for(a=0;a<f;++a)n=r[a],u=s[a]=new m(n),null!=(c=e(n,a,r))&&(c+="")&&(p[l=g+(u.id=c)]=l in p?q:u);for(a=0;a<f;++a)if(u=s[a],null!=(c=t(r[a],a,r))&&(c+="")){if(!(i=p[g+c]))throw new Error("missing: "+c);if(i===q)throw new Error("ambiguous: "+c);i.children?i.children.push(u):i.children=[u],u.parent=i}else{if(o)throw new Error("multiple roots");o=u}if(!o)throw new Error("no root");if(o.parent=b,o.eachBefore(function(e){e.depth=e.parent.depth+1,--f}).eachBefore(d),o.parent=null,f>0)throw new Error("cycle");return o}return r.id=function(t){return arguments.length?(e=v(t),r):e},r.parentId=function(e){return arguments.length?(t=v(e),r):t},r};function w(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}w.prototype=Object.create(m.prototype);var D=function(e,t,r,n,a){for(var o,i=e.children,u=-1,c=i.length,l=e.value&&(a-r)/e.value;++u<c;)(o=i[u]).x0=t,o.x1=n,o.y0=r,o.y1=r+=o.value*l},I=(1+Math.sqrt(5))/2;function C(e,t,r,n,a,o){for(var i,u,c,l,f,s,p,h,d,m,v,g=[],b=t.children,q=0,x=0,M=b.length,A=t.value;q<M;){c=a-r,l=o-n;do{f=b[x++].value}while(!f&&x<M);for(s=p=f,v=f*f*(m=Math.max(l/c,c/l)/(A*e)),d=Math.max(p/v,v/s);x<M;++x){if(f+=u=b[x].value,u<s&&(s=u),u>p&&(p=u),v=f*f*m,(h=Math.max(p/v,v/s))>d){f-=u;break}d=h}g.push(i={value:f,dice:c<l,children:b.slice(q,x)}),i.dice?y(i,r,n,a,A?n+=l*f/A:o):D(i,r,n,A?r+=c*f/A:a,o),A-=f,q=x}return g}(function e(t){function r(e,r,n,a,o){C(t,e,r,n,a,o)}return r.ratio=function(t){return e((t=+t)>1?t:1)},r})(I),function e(t){function r(e,r,n,a,o){if((i=e._squarify)&&i.ratio===t)for(var i,u,c,l,f,s=-1,p=i.length,h=e.value;++s<p;){for(c=(u=i[s]).children,l=u.value=0,f=c.length;l<f;++l)u.value+=c[l].value;u.dice?y(u,r,n,a,n+=(o-n)*u.value/h):D(u,r,n,r+=(a-r)*u.value/h,o),h-=u.value}else e._squarify=i=C(t,e,r,n,a,o),i.ratio=t}return r.ratio=function(t){return e((t=+t)>1?t:1)},r}(I);function S(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function E(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),a=t,o=0;o<n.length;o++){if("*"===n[o]&&Array.isArray(a)){var i=[];r=n.slice(o+1).join("/");for(var u=0;u<a.length;u++){var c=E(r,a[u]);Array.isArray(c)?i.push.apply(i,S(c)):i.push(c)}return i}if(!n[o]&&Array.isArray(a)){var l=new Array(a.length);r=n.slice(o+1).join("/");for(var f=0;f<a.length;f++)l[f]=E(r,a[f]);return l}n[o]in a&&(a=a[n[o]])}return a}function O(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function T(e,t,r){if(e===t)return function(e){return e};if(e>t){var n=Math.max(0,Math.min(100,e-t)),a=O(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(a,";"))}if(t>e){var o=Math.max(0,Math.min(100,t-e));return function(e){return function e(t,r,n){var a=[];if(!t||!t.length)return a;if(r<=0){var o=n>=0?[t[n]]:t;a.push.apply(a,O(o))}else for(var i=0;i<t.length;i++)t[i].children&&t[i].children.length&&a.push.apply(a,O(e(t[i].children,r-1,n)));return a}(e.children,o-1,r)}}return!1}function F(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _=/^qDimensionInfo(?:\/(\d+))?/,k=/^\/?qMeasureInfo\/(\d+)/,N=/\/qAttrExprInfo\/(\d+)/,P=/\/qAttrDimInfo\/(\d+)/;function R(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(function(e,t){return t})).filter(function(t){return t<e.qDimensionInfo.length})}function H(e,t){var r=t.cube;if(!e)return-1;var n=e.key(),a=!1,o=-1,i=-1,u=-1,c=-1,l=-1,f=n,s=r.qEffectiveInterColumnSortOrder,p=R(r);return _.test(f)&&(a=!0,o=+_.exec(f)[1],f=n.replace(_,"")),k.test(f)&&("K"===r.qMode?c=+k.exec(f)[1]:s&&-1!==s.indexOf(-1)?(c=+k.exec(f)[1],l=0):l=+k.exec(f)[1],f=f.replace(k,"")),f&&(P.exec(f)?u=+P.exec(f)[1]:N.exec(f)&&(i=+N.exec(f)[1])),{fieldDepth:(a?"S"===r.qMode?p[o]:s?s.indexOf(o):o:s&&-1!==s.indexOf(-1)?s.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:c,measureIdx:l,attrDimIdx:u,attrIdx:i}}function V(e,t){var r,n,a=T(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?n=function(e){return e.qAttrDims.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(n=function(e){return e.qAttrExps.qValues[t.attrIdx]}),{nodeFn:a,attrFn:n,valueFn:r}}function Y(e,t,r){var n=r.key,a={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return a.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(a.value),e.field&&(a.source={key:n,field:e.field.key()}),a}function z(e){var t=e.propsArr,r=e.props,n=e.item,a=e.itemData,o=e.ret,i=e.sourceKey;t.forEach(function(e){var t,u=r[e],c=u.fields||[u];u.fields&&(t=[]),c.forEach(function(r){var c,l;"primitive"===r.type?l=r.value:("function"==typeof r.value&&(c=function(e){return r.value(e,n)}),r.accessor?(l=r.accessor(n),Array.isArray(l)?(l=l.map(r.valueAccessor),r.attrAccessor&&(l=l.map(r.attrAccessor)),c&&(l=l.map(c),c=null),l=r.reduce?r.reduce(l):l):l=r.attrAccessor?r.attrAccessor(r.valueAccessor(l)):r.valueAccessor(l)):l=a),u.fields?t.push(c?c(l):l):(o[e]={value:c?c(l):l},o[e].label=String(o[e].value),r.field&&(o[e].source={field:r.field.key(),key:i}))}),t&&(o[e]={value:"function"==typeof u.value?u.value(t,n):t},o[e].label=String(o[e].value))})}var L=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",a="K"===e.qMode?"qSubNodes":"qNodes",o=E(n,e);return o&&o[0]?(t.tree=s(o[0],r.children||function(e){return e[a]}),t.tree):null};var B=function(e){var t=e.propsArr,r=e.props,n=e.cube,a=e.cache,o=e.itemDepthObject,i=e.f;t.forEach(function(e){var t=r[e];(t.fields?t.fields:[t]).forEach(function(e){if(e.field!==i){var t=H(e.field,{cube:n,cache:a}),r=V(o,t);e.accessor=r.nodeFn,e.valueAccessor=r.valueFn,e.attrAccessor=r.attrFn}})})};function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=t.raw(),o=t.key(),i="S"===a.qMode?function(e){for(var t=e.raw().qDataPages[0].qMatrix,r=function(e){var t=e.raw().qColumnOrder,r=e.fields();return t&&t.length===r.length?t:r.map(function(e,t){return t})}(e),n=e.fields(),a=e.fields().filter(function(e){return"dimension"===e.type()}).map(function(e){return r.indexOf(n.indexOf(e))}),o=e.fields().filter(function(e){return"measure"===e.type()}).map(function(e){return r.indexOf(n.indexOf(e))}),i={__root:{__id:"__root",qValues:[]}},u=0;u<t.length;u++){for(var c=t[u],l="__root",f=!1,s=0;s<a.length;s++){var p=c[a[s]],h="".concat(l,"__").concat(p.qText);i[h]||(i[h]=Object.assign({__id:h,__parent:l,qValues:[]},p),f=!0),l=h}if(f)for(var d=0;d<o.length;d++){var m=c[o[d]];i[l].qValues.push(m)}}var v=Object.keys(i).map(function(e){return i[e]});return A().id(function(e){return e.__id}).parentId(function(e){return e.__parent})(v)}(t):L(a,r,e);if(!i)return null;for(var u=i.height,c=[],l=0;l<=u;l++){var f=null;if(l>0)if("S"===a.qMode){var s=R(a)[l-1];f=r.fields[s]}else{var p=a.qEffectiveInterColumnSortOrder[l-1];l>a.qEffectiveInterColumnSortOrder.length&&(p=a.qDimensionInfo.length),f=r.fields[p]}var h=n.normalizeConfig(Object.assign({},e,{field:f?f.key():void 0}),t),d=h.props,m=h.main,v=Object.keys(d);c[l]={propsArr:v,props:d,main:m};var y=f?H(f,{cube:a,cache:r}):{fieldDepth:0};B({propsArr:v,props:d,cube:a,cache:r,itemDepthObject:y,f:f})}var g=i.copy().descendants();return i.descendants().forEach(function(e,t){var r=c[e.depth].propsArr,n=c[e.depth].props,a=c[e.depth].main,i=g[t],u=i.data,l=Y(a,u,{key:o});z({propsArr:r,props:n,item:i,itemData:u,ret:l,sourceKey:o,isTree:!0}),e.data=l}),i}function U(e,t,r,n){var a=[];return(Array.isArray(e)?e:[e]).forEach(function(o){if(void 0!==o.field){var i=t.raw(),u=t.key();if(!L(i,r,e))return;var c="object"===j(o.field)?o.field:t.field(o.field),l=n.normalizeConfig(o,t),f=l.props,s=l.main,p=Object.keys(f),h=H(c,{cube:i,cache:r}),d=V({fieldDepth:0},h),m=d.nodeFn,v=d.attrFn,y=d.valueFn;B({propsArr:p,props:f,cube:i,cache:r,itemDepthObject:h,f:c});for(var g=!!o.trackBy,b=j(o.trackBy),q={},x=[],M=m(r.tree),A=[],w=0;w<M.length;w++){var D=M[w],I=v?v(y(D)):y(D);if(!(s.filter&&!s.filter(I))){var C=Y(s,I,{key:u});z({propsArr:p,props:f,item:D,itemData:I,ret:C,sourceKey:u}),g&&n.track({cfg:o,itemData:I,obj:C,target:x,tracker:q,trackType:b}),A.push(C)}}g?a.push.apply(a,F(n.collect(x,{main:s,propsArr:p,props:f}))):a.push.apply(a,A)}}),a}var W=r(1),$=r.n(W);function J(e,t,r){return(J=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&X(a,r.prototype),a}).apply(null,arguments)}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Q(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Z={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},ee=/%$/,te=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,re=/^\(oct\)/i,ne=/^\(dec\)/i,ae=/^\(hex\)/i,oe=/^\(bin\)/i,ie=/^\(rom\)/i,ue=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,ce=/#|0/g;function le(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function fe(e,t,r){var n;return te.test(t)?e=le(e,Number(/\d{2}/.exec(t)[0]),t,r):re.test(t)?e=le(e,8,t,r):ne.test(t)?e=le(e,10,t,r):ae.test(t)?e=le(e,16,t,r):oe.test(t)?e=le(e,2,t,r):ie.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=function(e,t){for(var r,n="",a=Number(String(e).slice(-3)),o=(e-a)/1e3,i=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),u=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();a>0;)for(r=0;r<i.length;r++)if(i[r]<=a){n+=u[r],a-=i[r];break}for(r=0;r<o;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t)):t+n+e.toExponential(0)),e}function se(e,t,r){var n=Q(e);return r?n:new RegExp(n||"",t)}function pe(e,t,r){var n,a,o,i,u,c,l,f,s,p=e.pattern;p.indexOf("A")>=0&&(p=p.replace("A",""),e.abbreviate=!0),s=function(e,t){return t&&(t=Q(t)),e&&(e=Q(e)),new RegExp("(?:[#0]+".concat(e,")?[#0]+(?:").concat(t,"[#0]+)?"))}(t,r),i=(o=(o=p.match(s))?o[0]:"")?p.substr(0,p.indexOf(o)):p,u=o?p.substring(p.indexOf(o)+o.length):"",o||(o=p?"#":"##########"),t&&t===r&&(a=(n=o.split(r)).pop(),o=n.join("")+r+a,t=""),c=t,t=/,/.test(r)?"¤":",",c&&(o=o.replace(se(c,"g"),t)),l=r,r=".",l&&(o=o.replace(se(l,"g"),r)),f=(f=o.match(/#/g))?f.length:0;var h,d=p.split(l);d[1]&&(h=d[1].match(ce)),e.prefix=i||"",e.postfix=u||"",e.pattern=p,e.maxPrecision=h?h.length:2,e.percentage=ee.test(p),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(se(t,null,!0),"|").concat(se(r,null,!0)),"g"),e.groupTemp=c,e.decTemp=l,e.t=t,e.d=r,e.temp=f}var he=function(){function e(t,r,n,a,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=a||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return Z;var r={};return e.qNumericalAbbreviation.split(t).forEach(function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])}),r}(t,this.patternSeparator),this.prepare()}return function(e,t,r){t&&G(e.prototype,t),r&&G(e,r)}(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],ue.test(e[0])&&(n.positive.isFunctional=!0),e[1]?ue.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?ue.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||pe(n.positive,t,r),n.negative&&!n.negative.isFunctional&&pe(n.negative,t,r),n.zero&&!n.zero.isFunctional&&pe(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,a,o,i,u,c,l,f=this._prepared,s="",p="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===f.pattern)return e.toString();if(0===e&&f.zero)return(f=f.zero).pattern;if(e<0&&f.negative?(f=f.negative,e=-e):f=f.positive,o=f.d,i=f.t,f.isFunctional)e=fe(e,f.pattern,o);else{if(f.percentage&&(e*=100),f.abbreviate){var d,m,v=Object.keys(this.abbreviations).map(function(e){return parseInt(e,10)}).sort(function(e,t){return e-t}),y=v[0];for(u=0,r=Number(Number(e).toExponential().split("e")[1]);y<=r&&u<v.length;)y=v[++u];u>0&&(d=v[u-1]),d&&r>0&&d>0?m=d:(r<0&&d<0||!d)&&(y<0&&y-r<=f.maxPrecision?m=y:d<=r&&!(y>0&&-r<=f.maxPrecision)&&(m=d)),m&&(s=this.abbreviations[m],e/=Math.pow(10,m))}if(n=Math.abs(e),t=f.temp,l=(c=f.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),a=e,l||"#"!==c.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var g=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=c.split(o)[0];if(b+=o,e=$()(b,g)||"0",l){var q=Math.max(0,Math.min(14,l.length)),x=l.replace(/#+$/,"").length,M=("I"===this.type?0:n%1).toFixed(q).slice(2).replace(/0+$/,"");for(u=M.length;u<x;u++)M+="0";M&&(e+=o+M)}else 0===g&&(a=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=a.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(c+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),u=0;u<t;u++)c+="#";e=$()(c,e)}e=e.replace(f.numericRegex,function(e){return e===i?f.groupTemp:e===o?f.decTemp:""}),a<0&&!/^-/.test(e)&&(e="-".concat(e))}return f.prefix+e+p+s+f.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function de(e,t,r,n,a){var o=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return J(he,t)}(a,e,t,r,n);function i(e){return o.formatValue(e)}return i.format=function(e,t,r,n){return o.format(t,e,r,n)},i.pattern=function(e){return e&&(o.pattern=e,o.prepare()),o.pattern},i}var me={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"};function ve(e,t,r){return(ve=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&ye(a,r.prototype),a}).apply(null,arguments)}function ye(e,t){return(ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function be(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var qe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Me=["January","February","March","April","May","June","July","August","September","October","November","December"],Ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function we(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function De(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function Ie(e,t){var r,n=function(e){var t=e,r=24*De(t),n=60*De(r),a=60*De(n),o=1e3*De(a);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(a),f:Math.round(o)}}(e),a=n.d,o=n.h,i=n.m,u=n.s,c=n.f,l=0;/w+|t+/gi.test(t)&&(r=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(o+=24*a),/h+/gi.test(t)||(i+=60*o),/m+/gi.test(t)||(u+=60*i),/w+/gi.test(t)&&(l=r?r.getDay()-1:0)<0&&(l=6);var f="";return r&&(f=r.getHours()>=12?"pm":"am"),{year:0,month:0,day:l,date:a,h:o,m:i,s:u,f:c,t:f}}var Ce=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a,o=t||{};(o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:qe,qDayNames:xe,qLongMonthNames:Me,qMonthNames:Ae}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),r)||(r=(ge(a={},me.TIME,o.qTimeFmt||"hh:mm:ss"),ge(a,me.DATE,o.qDateFmt||"YYYY-MM-DD"),ge(a,me.DATE_TIME,o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),a)[n]);this.pattern=r}return function(e,t,r){t&&be(e.prototype,t),r&&be(e,r)}(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var r,n=/t+/gi.test(t);e instanceof Date?r=function(e,t){var r=e.getHours(),n=e.getDay()-1;return t&&((r%=12)||(r=12)),n<0&&(n=6),{year:e.getFullYear(),month:e.getMonth(),day:n,date:e.getDate(),h:r,m:e.getMinutes(),s:e.getSeconds(),f:e.getMilliseconds(),t:e.getHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=Ie(e,t));var a=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:we("".concat(t.year).slice(-2),2),YYY:we("".concat(t.year).slice(-3),3),def:function(e){return we("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:we("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:we("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return we("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return we("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return we("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return we("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var a=0;a<n;a++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r=r.slice(0,e.length)}}}}(this,r),o=[];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&o.push(i);var u=new RegExp(o.join("|"),"g");return t.replace(u,function(e){var t,r,n;for(r in a)if(Object.prototype.hasOwnProperty.call(a,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var o in a[r])if(o===e||o.toLowerCase()===e){void 0===(n=a[r][o])&&(n=a[r][o.toLowerCase()]);break}return void 0===n&&(n=a[r].def),"function"==typeof n&&(n=n(e)),n})}}]),e}();function Se(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ve(Ce,t)}function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",r=Se(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t);function n(e){return t!==me.INTERVAL?function(e){return new Date(1899,11,30+Math.floor(e),0,0,0,864e5*(e-Math.floor(e)))}(e):e}function a(e){return e=n(e),r.format(e)}return a.format=function(e,t){return t=n(t),r.format(t,e)},a.locale=function(n){return r=Se(n,e,t),this},a.qtype=function(e){return void 0!==e&&(t=e),t},a}function Oe(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,a=t.key,o=t.localeInfo,i=t.fieldExtractor,u=t.value,c=t.type,l=u||("dimension"===c?function(e){return e.qElemNo}:function(e){return e.qValue}),f="dimension"===c?"first":"avg",s=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ee(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",a=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",i=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,a=e.qNumFormat.qDec||a,o=e.qNumFormat.qType||o,i=i&&-1===["M"].indexOf(e.qNumFormat.qType)):i=!0,(i||"U"===o)&&(r="#".concat(a,"##A"),o="U"),de(r,n,a,o,t)}(r,o),p={id:function(){return n},key:function(){return a},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return c},items:function(){return e||(e=i(p)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:l,label:function(e){return e.qText||""},reduce:f,formatter:function(){return s},tags:function(){return r.qTags}};return p}function Te(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Fe(e,t,r,n,o){return(t[e]||[]).map(function(t,i){var u="".concat(n?"".concat(n,"/"):"").concat(e,"/").concat(i),c={instance:Oe(a()({id:"".concat(r?"".concat(r,"/"):"").concat(u),key:u,meta:t},o))};return c.attrDims=Fe("qAttrDimInfo",t,r,u,a()({},o,{value:function(e){return e.qElemNo},type:"dimension"})),c.attrExps=Fe("qAttrExprInfo",t,r,u,a()({},o,{value:function(e){return e.qNum},type:"measure"})),c.measures=Fe("qMeasureInfo",t,r,u,a()({},o,{value:function(e){return e.qValue},type:"measure"})),c})}function je(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.key,o=r.data,i=r.config,u=void 0===i?{}:i,c={fields:[],wrappedFields:[],allFields:[]},f=o;if(!f)throw new Error('Missing "data" input');if(!f.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var s=je.util,p={cache:c,cube:f,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null}},h={key:function(){return n},raw:function(){return f},field:function(e){return function(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var a=0;a<n.length;a++)if(e(n[a]))return n[a];return!1}if("string"==typeof e){for(var o=0;o<n.length;o++)if(n[o].key()===e||n[o].title()===e)return n[o]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,p)},fields:function(){return c.fields.slice()},extract:function(e){return p.extractor(e,h,c,s)},hierarchy:function(e){return p.hierarchy(e,h,c,s)},_cache:function(){return c}};"K"===f.qMode||"T"===f.qMode||!f.qMode&&f.qNodesOnDim?(p.extractor=U,p.hierarchy=K,p.pages="K"===f.qMode?f.qStackedDataPages:f.qTreeDataPages):"S"===f.qMode?(p.extractor=l,p.pages=f.qDataPages,p.hierarchy=K):p.extractor=function(){return[]},p.fieldExtractor=function(e){return p.extractor({field:e},h,c,s)};var d="S"===f.qMode?function(e){return e.qElemNumber}:void 0,m="S"===f.qMode?function(e){return e.qNum}:void 0;(e=c.wrappedFields).push.apply(e,Te(Fe("qDimensionInfo",f,n,"",a()({},p,{value:d,type:"dimension"})))),(t=c.wrappedFields).push.apply(t,Te(Fe("qMeasureInfo",f,n,"",a()({},p,{value:m,type:"measure"})))),c.fields=c.wrappedFields.map(function(e){return e.instance});return function e(t){t.forEach(function(t){c.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)})}(c.wrappedFields),h}function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,a=!1,o=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ke=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Ne=/\/qDimensionInfo(?:\/(\d+))?/,Pe=/\/qMeasureInfo\/(\d+)/,Re=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,He=/\/qAttrExprInfo\/(\d+)/,Ve=/\/?qHyperCube/,Ye=/\/?qTreeData/,ze=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Le=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.byCells,a=t.primarySource,o=[],i={},u=e.isActive(),c=!1;return e.brushes().forEach(function(e){var t=function(e,t){var r=e,n=-1,a=-1,o="",i=function(e){return e};Ve.test(e)?(o="".concat(r.substr(0,r.indexOf("qHyperCube")+10)),i=ze):Ye.test(e)&&(o="".concat(r.substr(0,r.indexOf("qTreeData")+9)),i=Le);var u=!0;if(Ne.test(e)&&(n=+Ne.exec(e)[1]),Pe.test(e)&&(a=+Pe.exec(e)[1]),Re.test(e)){a=-1,n=0;var c=+Re.exec(r)[2];isNaN(c)||(n=c,r=r.replace(/\/\d+$/,"")),u=!1}if(He.test(e)){var l=a;if(t){a=0;var f=E(o,t);a+=(f.qMeasureInfo||[]).length,n>-1?(a=f.qDimensionInfo.slice(0,n).reduce(function(e,t){return e+t.qAttrExprInfo.length},a),n=-1):(a=f.qDimensionInfo.reduce(function(e,t){return e+t.qAttrExprInfo.length},a),a=f.qMeasureInfo.slice(0,l).reduce(function(e,t){return e+t.qAttrExprInfo.length},a)),a+=+He.exec(r)[1]}else n>-1?(n=-1,a=+He.exec(r)[1]):a+=+He.exec(r)[1]+1}return ke.forEach(function(e){var t=_e(e,2),n=t[0],a=t[1];r=r.replace(n,a)}),u&&(r=i(r)),r&&"/"!==r[0]&&(r="/".concat(r)),{measureIdx:a,dimensionIdx:n,path:r}}(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var u=e.brush.ranges();u.length&&(c=!0,i.multiRangeSelectTreeDataValues||(i.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),u.forEach(function(e){return i.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})}))}else{if("range"===e.type&&t.measureIdx>-1){var l=e.brush.ranges();l.length&&(c=!0,i.rangeSelectHyperCubeValues||(i.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach(function(e){return i.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})}))}if("range"===e.type&&t.dimensionIdx>-1){var f=e.brush.ranges();f.length&&(c=!0,i.selectHyperCubeContinuousRange||(i.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),f.forEach(function(e){return i.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})}))}if("value"===e.type&&t.dimensionIdx>-1)if(n)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode)){var s=r.qHyperCube,p=s.qNoOfLeftDims,h=s.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(i.selectPivotCells||(i.selectPivotCells={path:t.path,cells:[]}),e.id===a||!a&&0===i.selectPivotCells.cells.length){var d=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});(0===p||h>=p)&&p>-1?d.forEach(function(e){i.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:h-p})}):d.forEach(function(e){i.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),c=!!i.selectPivotCells.cells.length}}else i.selectHyperCubeCells||(i.selectHyperCubeCells={path:t.path,cols:[]}),i.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==a&&(a||i.selectHyperCubeCells.values)||(i.selectHyperCubeCells.values=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)}),c=!!i.selectHyperCubeCells.values.length);else{var m=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});c=!!m.length,o.push({params:[t.path,t.dimensionIdx,m,!1],method:"selectHyperCubeValues"})}}}),!c&&u?[{method:"resetMadeSelections",params:[]}]:(i.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[i.rangeSelectHyperCubeValues.path,i.rangeSelectHyperCubeValues.ranges,[],!0]}),i.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[i.selectHyperCubeContinuousRange.path,i.selectHyperCubeContinuousRange.ranges]}),i.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[i.selectHyperCubeCells.path,i.selectHyperCubeCells.values,i.selectHyperCubeCells.cols]}),i.selectPivotCells&&o.push({method:"selectPivotCells",params:[i.selectPivotCells.path,i.selectPivotCells.cells]}),i.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[i.multiRangeSelectTreeDataValues.path,i.multiRangeSelectTreeDataValues.ranges]}),o)}function Ke(e){je.util=e.data("matrix").util,e.data("q",je),e.formatter("q-number",de),e.formatter("q-time",Ee)}r.d(t,"default",function(){return Ke}),Ke.qBrushHelper=Be,Ke.selections=Be}]).default});
//# sourceMappingURL=picasso-q.js.map
/*
* picasso-plugin-q v0.13.2
* Copyright (c) 2018 QlikTech International AB
* Released under the MIT license.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.picassoQ=t()}(this,function(){"use strict";function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,r){return(c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&i(a,r.prototype),a}).apply(null,arguments)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function S(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var a=Object.prototype.hasOwnProperty,l=Object.prototype.toString,r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,f=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===l.call(e)},p=function(e){if(!e||"[object Object]"!==l.call(e))return!1;var t,r=a.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&a.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||a.call(e,t)},h=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,t){if("__proto__"===t){if(!a.call(e,t))return;if(s)return s(e,t).value}return e[t]},q=function e(){var t,r,n,a,i,o,u=arguments[0],c=1,l=arguments.length,s=!1;for("boolean"==typeof u&&(s=u,u=arguments[1]||{},c=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});c<l;++c)if(null!=(t=arguments[c]))for(r in t)n=d(u,r),u!==(a=d(t,r))&&(s&&a&&(p(a)||(i=f(a)))?(o=i?(i=!1,n&&f(n)?n:[]):n&&p(n)?n:{},h(u,{name:r,newValue:e(s,o,a)})):void 0!==a&&h(u,{name:r,newValue:a}));return u};function x(e,t,r){if(!e)return-1;var n=r.cache,a=n.fields.indexOf(e),i=-1,o=-1;if(-1===a)for(var u=0;u<n.wrappedFields.length;u++)if(o=n.wrappedFields[u].attrDims.map(function(e){return e.instance}).indexOf(e),i=n.wrappedFields[u].attrExps.map(function(e){return e.instance}).indexOf(e),-1!==o||-1!==i){a=u;break}if((a-=t.qArea.qLeft)<0||a>=t.qArea.qWidth)return-1;var c="row[".concat(a,"]");return 0<=o?Function("row","return ".concat(c,".qAttrDims.qValues[").concat(o,"];")):0<=i?Function("row","return ".concat(c,".qAttrExps.qValues[").concat(i,"];")):Function("row","return ".concat(c,";"))}function M(e,t,r){var n=r.key,a={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return a.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(a.value),e.field&&(a.source={key:n,field:e.field.key()}),a}function m(e,i,g,b){var t=Array.isArray(e)?e:[e],o=[];return t.forEach(function(r){if(void 0!==r.field){var e=i.raw(),s=i.key(),f="object"===E(r.field)?r.field:i.field(r.field),t=b.normalizeConfig(r,i),p=t.props,n=t.main,a=Object.keys(p),h=!!r.trackBy,d=E(r.trackBy),m={},v=[],y=[];e.qDataPages.forEach(function(l){var t=x(f,l,{cache:g});-1!==t&&l.qMatrix.forEach(function(i,e){var o=l.qArea.qTop+e,u=q({qRow:o},t(i)),c=M(n,u,{key:s});n.filter&&!n.filter(u)||(a.forEach(function(r){var n=p[r],e=n.fields||[n];if(n.fields&&(c[r]=[]),e.forEach(function(e,t){!function(e){var t=e.cache,r=e.f,n=e.mainCell,a=e.p,i=(e.prop,e.page),o=e.rowIdx,u=e.row,c=e.sourceKey,l=e.target,s=e.targetProp,f=n;if(a.field&&a.field!==r){var p=x(a.field,i,{cache:t});if(-1===p)return;f=q({qRow:o},p(u))}l[s]=M(a,f,{key:c})}({cache:g,f:f,mainCell:u,p:e,prop:r,props:p,page:l,rowIdx:o,row:i,sourceKey:s,target:n.fields?c[r]:c,targetProp:n.fields?t:r})}),n.fields){var t=c[r].map(function(e){return e.value}),a=c[r].map(function(e){return e.label});c[r]={value:"function"==typeof n.value?n.value(t):void 0!==n.value?n.value:t},c[r].label="function"==typeof n.label?n.label(a):void 0!==n.label?String(n.label):String(c[r].value)}}),h&&b.track({cfg:r,itemData:u,obj:c,target:v,tracker:m,trackType:d}),y.push(c))})}),h?o.push.apply(o,S(b.collect(v,{main:n,propsArr:a,props:p}))):o.push.apply(o,y)}}),o}function t(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;0<=--n;)t+=r[n].value;else t=1;e.value=t}function y(e,t){var r,n,a,i,o,u=new I(e),c=+e.value&&(u.value=e.value),l=[u];for(null==t&&(t=g);r=l.pop();)if(c&&(r.value=+r.data.value),(a=t(r.data))&&(o=a.length))for(r.children=new Array(o),i=o-1;0<=i;--i)l.push(n=r.children[i]=new I(a[i])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(D)}function g(e){return e.children}function b(e){e.data=e.data.data}function D(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function I(e){this.data=e,this.depth=this.height=0,this.parent=null}function C(e){if("function"!=typeof e)throw new Error;return e}I.prototype=y.prototype={constructor:I,count:function(){return this.eachAfter(t)},each:function(e){var t,r,n,a,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(e(i),r=i.children)for(n=0,a=r.length;n<a;++n)o.push(r[n])}while(o.length);return this},eachAfter:function(e){for(var t,r,n,a=this,i=[a],o=[];a=i.pop();)if(o.push(a),t=a.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;a=o.pop();)e(a);return this},eachBefore:function(e){for(var t,r,n=this,a=[n];n=a.pop();)if(e(n),t=n.children)for(r=t.length-1;0<=r;--r)a.push(t[r]);return this},sum:function(a){return this.eachAfter(function(e){for(var t=+a(e.data)||0,r=e.children,n=r&&r.length;0<=--n;)t+=r[n].value;e.value=t})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),a=null;for(e=r.pop(),t=n.pop();e===t;)a=e,e=r.pop(),t=n.pop();return a}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var a=n.length;e!==r;)n.splice(a,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r},copy:function(){return y(this).eachBefore(b)}};var w="$",A={depth:-1},O={};function T(e){return e.id}function F(e){return e.parentId}function N(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var r,n=e.split("/"),a=t,i=0;i<n.length;i++){if("*"===n[i]&&Array.isArray(a)){var o=[];r=n.slice(i+1).join("/");for(var u=0;u<a.length;u++){var c=N(r,a[u]);Array.isArray(c)?o.push.apply(o,S(c)):o.push(c)}return o}if(!n[i]&&Array.isArray(a)){var l=new Array(a.length);r=n.slice(i+1).join("/");for(var s=0;s<a.length;s++)l[s]=N(r,a[s]);return l}n[i]in a&&(a=a[n[i]])}return a}function k(e,t,r){if(e===t)return function(e){return e};if(t<e){var n=Math.max(0,Math.min(100,e-t)),a=S(Array(n)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(a,";"))}if(e<t){var i=Math.max(0,Math.min(100,t-e));return function(e){return function e(t,r,n){var a=[];if(!t||!t.length)return a;if(r<=0){var i=0<=n?[t[n]]:t;a.push.apply(a,S(i))}else for(var o=0;o<t.length;o++)t[o].children&&t[o].children.length&&a.push.apply(a,S(e(t[o].children,r-1,n)));return a}(e.children,i-1,r)}}return!1}var _=/^qDimensionInfo(?:\/(\d+))?/,H=/^\/?qMeasureInfo\/(\d+)/,j=/\/qAttrExprInfo\/(\d+)/,V=/\/qAttrDimInfo\/(\d+)/;function R(t){return(t.qColumnOrder&&t.qColumnOrder.length?t.qColumnOrder:t.qDimensionInfo.map(function(e,t){return t})).filter(function(e){return e<t.qDimensionInfo.length})}function P(e,t){var r=t.cube;if(!e)return-1;var n=e.key(),a=!1,i=-1,o=-1,u=-1,c=-1,l=-1,s=n,f=r.qEffectiveInterColumnSortOrder,p=R(r);return _.test(s)&&(a=!0,i=+_.exec(s)[1],s=n.replace(_,"")),H.test(s)&&("K"===r.qMode?c=+H.exec(s)[1]:l=f&&-1!==f.indexOf(-1)?(c=+H.exec(s)[1],0):+H.exec(s)[1],s=s.replace(H,"")),s&&(V.exec(s)?u=+V.exec(s)[1]:j.exec(s)&&(o=+j.exec(s)[1])),{fieldDepth:(a?"S"===r.qMode?p[i]:f?f.indexOf(i):i:f&&-1!==f.indexOf(-1)?f.indexOf(-1):r.qDimensionInfo.length-("K"===r.qMode?0:1))+1,pseudoMeasureIndex:c,measureIdx:l,attrDimIdx:u,attrIdx:o}}function Y(e,t){var r,n,a=k(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return r=0<=t.measureIdx?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},0<=t.attrDimIdx?n=function(e){return e.qAttrDims.qValues[t.attrDimIdx]}:0<=t.attrIdx&&(n=function(e){return e.qAttrExps.qValues[t.attrIdx]}),{nodeFn:a,attrFn:n,valueFn:r}}function z(e,t,r){var n=r.key,a={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return a.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(a.value),e.field&&(a.source={key:n,field:e.field.key()}),a}function L(e){var t=e.propsArr,r=e.props,o=e.item,u=e.itemData,c=e.ret,l=e.sourceKey;t.forEach(function(n){var a,i=r[n],e=i.fields||[i];i.fields&&(a=[]),e.forEach(function(t){var e,r;r="primitive"===t.type?t.value:("function"==typeof t.value&&(e=function(e){return t.value(e,o)}),t.accessor?(r=t.accessor(o),Array.isArray(r)?(r=r.map(t.valueAccessor),t.attrAccessor&&(r=r.map(t.attrAccessor)),e&&(r=r.map(e),e=null),t.reduce?t.reduce(r):r):t.attrAccessor?t.attrAccessor(t.valueAccessor(r)):t.valueAccessor(r)):u),i.fields?a.push(e?e(r):r):(c[n]={value:e?e(r):r},c[n].label=String(c[n].value),t.field&&(c[n].source={field:t.field.key(),key:l}))}),a&&(c[n]={value:"function"==typeof i.value?i.value(a,o):a},c[n].label=String(c[n].value))})}var B=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",a="K"===e.qMode?"qSubNodes":"qNodes",i=N(n,e);return i&&i[0]?(t.tree=y(i[0],r.children||function(e){return e[a]}),t.tree):null};function K(e){for(var t,r,n,a=e.raw().qDataPages[0].qMatrix,i=(r=(t=e).raw().qColumnOrder,n=t.fields(),r&&r.length===n.length?r:n.map(function(e,t){return t})),o=e.fields(),u=e.fields().filter(function(e){return"dimension"===e.type()}).map(function(e){return i.indexOf(o.indexOf(e))}),c=e.fields().filter(function(e){return"measure"===e.type()}).map(function(e){return i.indexOf(o.indexOf(e))}),l={__root:{__id:"__root",qValues:[]}},s=0;s<a.length;s++){for(var f=a[s],p="__root",h=!1,d=0;d<u.length;d++){var m=f[u[d]],v="".concat(p,"__").concat(m.qText);l[v]||(l[v]=Object.assign({__id:v,__parent:p,qValues:[]},m),h=!0),p=v}if(h)for(var y=0;y<c.length;y++){var g=f[c[y]];l[p].qValues.push(g)}}var b=Object.keys(l).map(function(e){return l[e]});return function(){var f=T,p=F;function t(e){var t,r,n,a,i,o,u,c=e.length,l=new Array(c),s={};for(r=0;r<c;++r)t=e[r],i=l[r]=new I(t),null!=(o=f(t,r,e))&&(o+="")&&(s[u=w+(i.id=o)]=u in s?O:i);for(r=0;r<c;++r)if(i=l[r],null!=(o=p(e[r],r,e))&&(o+="")){if(!(a=s[w+o]))throw new Error("missing: "+o);if(a===O)throw new Error("ambiguous: "+o);a.children?a.children.push(i):a.children=[i],i.parent=a}else{if(n)throw new Error("multiple roots");n=i}if(!n)throw new Error("no root");if(n.parent=A,n.eachBefore(function(e){e.depth=e.parent.depth+1,--c}).eachBefore(D),n.parent=null,0<c)throw new Error("cycle");return n}return t.id=function(e){return arguments.length?(f=C(e),t):f},t.parentId=function(e){return arguments.length?(p=C(e),t):p},t}().id(function(e){return e.__id}).parentId(function(e){return e.__parent})(b)}var U=function(e){var t=e.propsArr,r=e.props,n=e.cube,a=e.cache,i=e.itemDepthObject,o=e.f;t.forEach(function(e){var t=r[e];(t.fields?t.fields:[t]).forEach(function(e){if(e.field!==o){var t=P(e.field,{cube:n,cache:a}),r=Y(i,t);e.accessor=r.nodeFn,e.valueAccessor=r.valueFn,e.attrAccessor=r.attrFn}})})};function W(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length?arguments[1]:void 0,r=2<arguments.length?arguments[2]:void 0,n=3<arguments.length?arguments[3]:void 0,a=t.raw(),c=t.key(),i="S"===a.qMode?K(t):B(a,r,e);if(!i)return null;for(var o=i.height,l=[],u=0;u<=o;u++){var s=null;if(0<u)if("S"===a.qMode){var f=R(a)[u-1];s=r.fields[f]}else{var p=a.qEffectiveInterColumnSortOrder[u-1];u>a.qEffectiveInterColumnSortOrder.length&&(p=a.qDimensionInfo.length),s=r.fields[p]}var h=n.normalizeConfig(Object.assign({},e,{field:s?s.key():void 0}),t),d=h.props,m=h.main,v=Object.keys(d);l[u]={propsArr:v,props:d,main:m};var y=s?P(s,{cube:a,cache:r}):{fieldDepth:0};U({propsArr:v,props:d,cube:a,cache:r,itemDepthObject:y,f:s})}var g=i.copy().descendants();return i.descendants().forEach(function(e,t){var r=l[e.depth].propsArr,n=l[e.depth].props,a=l[e.depth].main,i=g[t],o=i.data,u=z(a,o,{key:c});L({propsArr:r,props:n,item:i,itemData:o,ret:u,sourceKey:c,isTree:!0}),e.data=u}),i}function $(D,I,C,w){var e=Array.isArray(D)?D:[D],A=[];return e.forEach(function(e){if(void 0!==e.field){var t=I.raw(),r=I.key();if(!B(t,C,D))return;var n="object"===E(e.field)?e.field:I.field(e.field),a=w.normalizeConfig(e,I),i=a.props,o=a.main,u=Object.keys(i),c=P(n,{cube:t,cache:C}),l=Y({fieldDepth:0},c),s=l.nodeFn,f=l.attrFn,p=l.valueFn;U({propsArr:u,props:i,cube:t,cache:C,itemDepthObject:c,f:n});for(var h=!!e.trackBy,d=E(e.trackBy),m={},v=[],y=s(C.tree),g=[],b=0;b<y.length;b++){var q=y[b],x=f?f(p(q)):p(q);if(!(o.filter&&!o.filter(x))){var M=z(o,x,{key:r});L({propsArr:u,props:i,item:q,itemData:x,ret:M,sourceKey:r}),h&&w.track({cfg:e,itemData:x,obj:M,target:v,tracker:m,trackType:d}),g.push(M)}}h?A.push.apply(A,S(w.collect(v,{main:o,propsArr:u,props:i}))):A.push.apply(A,g)}}),A}"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var J,X=(function(e){e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,a,i,o,u,c,l,s,f,p=e.length,h=e.search(/[0-9\-\+#]/),d=0<h?e.substring(0,h):"",m=e.split("").reverse().join(""),v=m.search(/[0-9\-\+#]/),y=p-v,g=e.substring(y,y+1),b=y+("."===g||","===g?1:0),q=0<v?e.substring(b,p):"";if(e=e.substring(h,b),t="-"===e.charAt(0)?-t:+t,r=t<0?t=-t:0,n=e.match(/[^\d\-\+#]/g),a=n&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(a),t=+(t=t.toFixed(e[1]&&e[1].length))+"",u=e[1]&&e[1].lastIndexOf("0"),(!(l=t.split("."))[1]||l[1]&&l[1].length<=u)&&(t=(+t).toFixed(u+1)),s=e[0].split(i),e[0]=s.join(""),-1<(o=e[0]&&e[0].indexOf("0")))for(;l[0].length<e[0].length-o;)l[0]="0"+l[0];else 0==+l[0]&&(l[0]="");if((t=t.split("."))[0]=l[0],c=s[1]&&s[s.length-1].length){for(f=t[0],m="",y=f.length%c,p=f.length,b=0;b<p;b++)m+=f.charAt(b),!((b-y+1)%c)&&b<p-c&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?a+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),d+(r?"-":"")+n+q}}(J={exports:{}},J.exports),J.exports);function G(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Q={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},Z=/%$/,ee=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,te=/^\(oct\)/i,re=/^\(dec\)/i,ne=/^\(hex\)/i,ae=/^\(bin\)/i,ie=/^\(rom\)/i,oe=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,ue=/#|0/g;function ce(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),10<e.length-e.indexOf(".")&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function le(e,t,r){var n;return ee.test(t)?e=ce(e,Number(/\d{2}/.exec(t)[0]),t,r):te.test(t)?e=ce(e,8,t,r):re.test(t)?e=ce(e,10,t,r):ne.test(t)?e=ce(e,16,t,r):ae.test(t)?e=ce(e,2,t,r):ie.test(t)&&(n="",e<0&&(n="-",e=-e),e=0===(e=Math.floor(e))?"0":e<=5e5?n+(e=function(e,t){for(var r,n="",a=Number(String(e).slice(-3)),i=(e-a)/1e3,o=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),u=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();0<a;)for(r=0;r<o.length;r++)if(o[r]<=a){n+=u[r],a-=o[r];break}for(r=0;r<i;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t)):t+n+e.toExponential(0)),e}function se(e,t,r){var n=G(e);return r?n:new RegExp(n||"",t)}function fe(e,t,r){var n,a,i,o,u,c,l,s,f,p,h,d=e.pattern;0<=d.indexOf("A")&&(d=d.replace("A",""),e.abbreviate=!0),p=t,(h=r)&&(h=G(h)),p&&(p=G(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(h,"[#0]+)?")),o=(i=(i=d.match(f))?i[0]:"")?d.substr(0,d.indexOf(i)):d,u=i?d.substring(d.indexOf(i)+i.length):"",i||(i=d?"#":"##########"),t&&t===r&&(a=(n=i.split(r)).pop(),i=n.join("")+r+a,t=""),c=t,t=/,/.test(r)?"¤":",",c&&(i=i.replace(se(c,"g"),t)),l=r,r=".",l&&(i=i.replace(se(l,"g"),r)),s=(s=i.match(/#/g))?s.length:0;var m,v=d.split(l);v[1]&&(m=v[1].match(ue)),e.prefix=o||"",e.postfix=u||"",e.pattern=d,e.maxPrecision=m?m.length:2,e.percentage=Z.test(d),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(se(t,null,!0),"|").concat(se(r,null,!0)),"g"),e.groupTemp=c,e.decTemp=l,e.t=t,e.d=r,e.temp=s}var pe=function(){function i(e,t,r,n,a){o(this,i),this.localeInfo=e,this.pattern=t,this.thousandDelimiter=r||",",this.decimalDelimiter=n||".",this.type=a||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return Q;var r={};return e.qNumericalAbbreviation.split(t).forEach(function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])}),r}(e,this.patternSeparator),this.prepare()}return e(i,[{key:"clone",value:function(){var e=new i(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}},{key:"format",value:function(e,t,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],oe.test(e[0])&&(n.positive.isFunctional=!0),e[1]?oe.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?oe.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||fe(n.positive,t,r),n.negative&&!n.negative.isFunctional&&fe(n.negative,t,r),n.zero&&!n.zero.isFunctional&&fe(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,a,i,o,u,c,l,s=this._prepared,f="",p="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===s.pattern)return e.toString();if(0===e&&s.zero)return(s=s.zero).pattern;if(e<0&&s.negative?(s=s.negative,e=-e):s=s.positive,i=s.d,o=s.t,s.isFunctional)e=le(e,s.pattern,i);else{if(s.percentage&&(e*=100),s.abbreviate){var d,m,v=Object.keys(this.abbreviations).map(function(e){return parseInt(e,10)}).sort(function(e,t){return e-t}),y=v[0];for(u=0,r=Number(Number(e).toExponential().split("e")[1]);y<=r&&u<v.length;)y=v[++u];0<u&&(d=v[u-1]),d&&0<r&&0<d?m=d:(r<0&&d<0||!d)&&(y<0&&y-r<=s.maxPrecision?m=y:d<=r&&!(0<y&&-r<=s.maxPrecision)&&(m=d)),m&&(f=this.abbreviations[m],e/=Math.pow(10,m))}if(n=Math.abs(e),t=s.temp,l=(c=s.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),a=e,l||"#"!==c.slice(-1)[0])if(1e15<=n||0<n&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var g=Number(e.toFixed(Math.min(20,l?l.length:0)).split(".")[0]),b=c.split(i)[0];if(e=X(b+=i,g)||"0",l){var q=Math.max(0,Math.min(14,l.length)),x=l.replace(/#+$/,"").length,M=("I"===this.type?0:n%1).toFixed(q).slice(2).replace(/0+$/,"");for(u=M.length;u<x;u++)M+="0";M&&(e+=i+M)}else 0===g&&(a=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||1e20<=n?(e=(e=a.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):0<=(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(c+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),u=0;u<t;u++)c+="#";e=X(c,e)}e=e.replace(s.numericRegex,function(e){return e===o?s.groupTemp:e===i?s.decTemp:""}),a<0&&!/^-/.test(e)&&(e="-".concat(e))}return s.prefix+e+p+f+s.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),i}();function he(e,t,r,n,a){var i=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return c(pe,t)}(a,e,t,r,n);function o(e){return i.formatValue(e)}return o.format=function(e,t,r,n){return i.format(t,e,r,n)},o.pattern=function(e){return e&&(i.pattern=e,i.prepare()),i.pattern},o}var de={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},me=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ve=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ye=["January","February","March","April","May","June","July","August","September","October","November","December"],ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function be(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function qe(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function xe(e,t){var r,n,a,i,o,u,c=(a=24*qe(n=e),i=60*qe(a),o=60*qe(i),u=1e3*qe(o),{d:Math.floor(n),h:Math.floor(a),m:Math.floor(i),s:Math.floor(o),f:Math.round(u)}),l=c.d,s=c.h,f=c.m,p=c.s,h=c.f,d=0;/w+|t+/gi.test(t)&&(r=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(s+=24*l),/h+/gi.test(t)||(f+=60*s),/m+/gi.test(t)||(p+=60*f),/w+/gi.test(t)&&(d=r?r.getDay()-1:0)<0&&(d=6);var m="";return r&&(m=12<=r.getHours()?"pm":"am"),{year:0,month:0,day:d,date:l,h:s,m:f,s:p,f:h,t:m}}var Me=function(){function i(e,t,r){o(this,i);var n,a=e||{};(a.qCalendarStrings||(a.qCalendarStrings={qLongDayNames:me,qDayNames:ve,qLongMonthNames:ye,qMonthNames:ge}),this.localeInfo=a,this.locale_days=a.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=a.qCalendarStrings.qDayNames.slice(),this.locale_months=a.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=a.qCalendarStrings.qMonthNames.slice(),t)||(t=(u(n={},de.TIME,a.qTimeFmt||"hh:mm:ss"),u(n,de.DATE,a.qDateFmt||"YYYY-MM-DD"),u(n,de.DATE_TIME,a.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),n)[r]);this.pattern=t}return e(i,[{key:"clone",value:function(){var e=new i(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var r,n,a,i,o,u=/t+/gi.test(t);r=e instanceof Date?(a=u,i=(n=e).getHours(),o=n.getDay()-1,a&&((i%=12)||(i=12)),o<0&&(o=6),{year:n.getFullYear(),month:n.getMonth(),day:o,date:n.getDate(),h:i,m:n.getMinutes(),s:n.getSeconds(),f:n.getMilliseconds(),t:12<=n.getHours()?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),xe(e,t));var c,l,s=(c=this,l=r,{"Y+|y+":{Y:"".concat(Number("".concat(l.year).slice(-2))),YY:be("".concat(l.year).slice(-2),2),YYY:be("".concat(l.year).slice(-3),3),def:function(e){return be("".concat(l.year),e.length)}},"M+":{M:l.month+1,MM:be("".concat(l.month+1),2),MMM:c.locale_months_abbr[l.month],def:c.locale_months[l.month]},"W+|w+":{W:l.day,WW:be("".concat(l.day),2),WWW:c.locale_days_abbr[l.day],def:c.locale_days[l.day]},"D+|d+":{D:l.date,def:function(e){return be("".concat(l.date),e.length)}},"h+|H+":{h:l.h,def:function(e){return be("".concat(l.h),e.length)}},"m+":{m:l.m,def:function(e){return be("".concat(l.m),e.length)}},"s+|S+":{s:l.s,def:function(e){return be("".concat(l.s),e.length)}},"f+|F+":{def:function(e){var t="".concat(l.f),r=e.length-t.length;if(0<r)for(var n=0;n<r;n++)t+="0";else r<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def:function(e){var t=l.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length)}}}),f=[];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&f.push(p);var h=new RegExp(f.join("|"),"g");return t.replace(h,function(e){var t,r,n;for(r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var a in s[r])if(a===e||a.toLowerCase()===e){void 0===(n=s[r][a])&&(n=s[r][a.toLowerCase()]);break}return void 0===n&&(n=s[r].def),"function"==typeof n&&(n=n(e)),n})}}]),i}();function De(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return c(Me,t)}function Ie(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"TS",n=De(2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,t,r);function a(e){return r!==de.INTERVAL?(t=e,new Date(1899,11,30+Math.floor(t),0,0,0,864e5*(t-Math.floor(t)))):e;var t}function e(e){return e=a(e),n.format(e)}return e.format=function(e,t){return t=a(t),n.format(t,e)},e.locale=function(e){return n=De(e,t,r),this},e.qtype=function(e){return void 0!==e&&(r=e),r},e}function Ce(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=t.meta,n=t.id,a=t.key,i=t.localeInfo,o=t.fieldExtractor,u=t.value,c=t.type,l=u||("dimension"===c?function(e){return e.qElemNo}:function(e){return e.qValue}),s="dimension"===c?"first":"avg",f=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return Ie(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var r="#",n=t&&void 0!==t.qThousandSep?t.qThousandSep:",",a=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",o=e&&!!e.qIsAutoFormat;return((o=!e||!e.qNumFormat||(r=e.qNumFormat.qFmt||r,n=e.qNumFormat.qThou||n,a=e.qNumFormat.qDec||a,i=e.qNumFormat.qType||i,o&&-1===["M"].indexOf(e.qNumFormat.qType)))||"U"===i)&&(r="#".concat(a,"##A"),i="U"),he(r,n,a,i,t)}(r,i),p={id:function(){return n},key:function(){return a},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return c},items:function(){return e||(e=o(p)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:l,label:function(e){return e.qText||""},reduce:s,formatter:function(){return f},tags:function(){return r.qTags}};return p}function we(a,e,i,o,u){return(e[a]||[]).map(function(e,t){var r="".concat(o?"".concat(o,"/"):"").concat(a,"/").concat(t),n={instance:Ce(q({id:"".concat(i?"".concat(i,"/"):"").concat(r),key:r,meta:e},u))};return n.attrDims=we("qAttrDimInfo",e,i,r,q({},u,{value:function(e){return e.qElemNo},type:"dimension"})),n.attrExps=we("qAttrExprInfo",e,i,r,q({},u,{value:function(e){return e.qNum},type:"measure"})),n.measures=we("qMeasureInfo",e,i,r,q({},u,{value:function(e){return e.qValue},type:"measure"})),n})}function Ae(){var e,t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=r.key,a=r.data,i=r.config,o=void 0===i?{}:i,u={fields:[],wrappedFields:[],allFields:[]},c=a;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var l=Ae.util,s={cache:u,cube:c,localeInfo:o.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null}},f={key:function(){return n},raw:function(){return c},field:function(e){return function(e,t){var r=t.cache;if("number"==typeof e)return r.fields[e];var n=r.allFields;if("function"==typeof e){for(var a=0;a<n.length;a++)if(e(n[a]))return n[a];return!1}if("string"==typeof e){for(var i=0;i<n.length;i++)if(n[i].key()===e||n[i].title()===e)return n[i]}else if(e&&-1!==n.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,s)},fields:function(){return u.fields.slice()},extract:function(e){return s.extractor(e,f,u,l)},hierarchy:function(e){return s.hierarchy(e,f,u,l)},_cache:function(){return u}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(s.extractor=$,s.hierarchy=W,s.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(s.extractor=m,s.pages=c.qDataPages,s.hierarchy=W):s.extractor=function(){return[]},s.fieldExtractor=function(e){return s.extractor({field:e},f,u,l)};var p="S"===c.qMode?function(e){return e.qElemNumber}:void 0,h="S"===c.qMode?function(e){return e.qNum}:void 0;(e=u.wrappedFields).push.apply(e,S(we("qDimensionInfo",c,n,"",q({},s,{value:p,type:"dimension"})))),(t=u.wrappedFields).push.apply(t,S(we("qMeasureInfo",c,n,"",q({},s,{value:h,type:"measure"})))),u.fields=u.wrappedFields.map(function(e){return e.instance});return function t(e){e.forEach(function(e){u.allFields.push(e.instance),t(e.measures),t(e.attrDims),t(e.attrExps)})}(u.wrappedFields),f}var Ee=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Se=/\/qDimensionInfo(?:\/(\d+))?/,Oe=/\/qMeasureInfo\/(\d+)/,Te=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Fe=/\/qAttrExprInfo\/(\d+)/,Ne=/\/?qHyperCube/,ke=/\/?qTreeData/,_e=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},He=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function je(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=2<arguments.length?arguments[2]:void 0,f=t.byCells,p=t.primarySource,h=[],d={},r=e.isActive(),m=!1;return e.brushes().forEach(function(e){var t=function(e,t){var a=e,r=-1,n=-1,i="",o=function(e){return e};Ne.test(e)?(i="".concat(a.substr(0,a.indexOf("qHyperCube")+10)),o=_e):ke.test(e)&&(i="".concat(a.substr(0,a.indexOf("qTreeData")+9)),o=He);var u=!0;if(Se.test(e)&&(r=+Se.exec(e)[1]),Oe.test(e)&&(n=+Oe.exec(e)[1]),Te.test(e)){n=-1,r=0;var c=+Te.exec(a)[2];isNaN(c)||(r=c,a=a.replace(/\/\d+$/,"")),u=!1}if(Fe.test(e)){var l=n;if(t){n=0;var s=N(i,t);n+=(s.qMeasureInfo||[]).length,-1<r?(n=s.qDimensionInfo.slice(0,r).reduce(function(e,t){return e+t.qAttrExprInfo.length},n),r=-1):(n=s.qDimensionInfo.reduce(function(e,t){return e+t.qAttrExprInfo.length},n),n=s.qMeasureInfo.slice(0,l).reduce(function(e,t){return e+t.qAttrExprInfo.length},n)),n+=+Fe.exec(a)[1]}else-1<r?(r=-1,n=+Fe.exec(a)[1]):n+=+Fe.exec(a)[1]+1}return Ee.forEach(function(e){var t=v(e,2),r=t[0],n=t[1];a=a.replace(r,n)}),u&&(a=o(a)),a&&"/"!==a[0]&&(a="/".concat(a)),{measureIdx:n,dimensionIdx:r,path:a}}(e.id,s);if("range"===e.type&&-1<t.measureIdx&&-1<t.dimensionIdx){var r=e.brush.ranges();r.length&&(m=!0,d.multiRangeSelectTreeDataValues||(d.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach(function(e){return d.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})}))}else{if("range"===e.type&&-1<t.measureIdx){var n=e.brush.ranges();n.length&&(m=!0,d.rangeSelectHyperCubeValues||(d.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(function(e){return d.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})}))}if("range"===e.type&&-1<t.dimensionIdx){var a=e.brush.ranges();a.length&&(m=!0,d.selectHyperCubeContinuousRange||(d.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),a.forEach(function(e){return d.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})}))}if("value"===e.type&&-1<t.dimensionIdx)if(f)if(s&&s.qHyperCube&&("P"===s.qHyperCube.qMode||"T"===s.qHyperCube.qMode)){var i=s.qHyperCube,o=i.qNoOfLeftDims,u=i.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(d.selectPivotCells||(d.selectPivotCells={path:t.path,cells:[]}),e.id===p||!p&&0===d.selectPivotCells.cells.length){var c=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});(0===o||o<=u)&&-1<o?c.forEach(function(e){d.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:u-o})}):c.forEach(function(e){d.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),m=!!d.selectPivotCells.cells.length}}else d.selectHyperCubeCells||(d.selectHyperCubeCells={path:t.path,cols:[]}),d.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==p&&(p||d.selectHyperCubeCells.values)||(d.selectHyperCubeCells.values=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)}),m=!!d.selectHyperCubeCells.values.length);else{var l=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});m=!!l.length,h.push({params:[t.path,t.dimensionIdx,l,!1],method:"selectHyperCubeValues"})}}}),!m&&r?[{method:"resetMadeSelections",params:[]}]:(d.rangeSelectHyperCubeValues&&h.push({method:"rangeSelectHyperCubeValues",params:[d.rangeSelectHyperCubeValues.path,d.rangeSelectHyperCubeValues.ranges,[],!0]}),d.selectHyperCubeContinuousRange&&h.push({method:"selectHyperCubeContinuousRange",params:[d.selectHyperCubeContinuousRange.path,d.selectHyperCubeContinuousRange.ranges]}),d.selectHyperCubeCells&&h.push({method:"selectHyperCubeCells",params:[d.selectHyperCubeCells.path,d.selectHyperCubeCells.values,d.selectHyperCubeCells.cols]}),d.selectPivotCells&&h.push({method:"selectPivotCells",params:[d.selectPivotCells.path,d.selectPivotCells.cells]}),d.multiRangeSelectTreeDataValues&&h.push({method:"multiRangeSelectTreeDataValues",params:[d.multiRangeSelectTreeDataValues.path,d.multiRangeSelectTreeDataValues.ranges]}),h)}function Ve(e){Ae.util=e.data("matrix").util,e.data("q",Ae),e.formatter("q-number",he),e.formatter("q-time",Ie)}return Ve.qBrushHelper=je,Ve.selections=je,Ve});
//# sourceMappingURL=picasso-q.js.map

10

package.json
{
"name": "picasso-plugin-q",
"version": "0.13.1",
"version": "0.13.2",
"description": "QIX plugin for picasso.js",

@@ -15,6 +15,6 @@ "license": "MIT",

"main": "dist/picasso-q.js",
"module": "dist/picasso-q.esm.js",
"scripts": {
"build": "cross-env NODE_ENV=production webpack --config ../../webpack.config.js",
"build:dev": "webpack --config ../../webpack.config.js",
"build:watch": "npm run build:dev -- -w",
"build": "cross-env NODE_ENV=production rollup --config ../../rollup.config.js",
"build:watch": "yarn run build -w",
"lint": "eslint src test",

@@ -29,3 +29,3 @@ "prepublishOnly": "rm -rf dist && npm run build"

},
"gitHead": "f347007bd4ab3694310b8e96b7c9158094084b2d"
"gitHead": "bc6aecc33e827c9601a397a78123a0d46a371f92"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc