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
8
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.21.0 to 0.22.0

11

CHANGELOG.md

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

# [0.22.0](https://github.com/qlik-oss/picasso.js/compare/v0.21.0...v0.22.0) (2019-04-01)
### Performance Improvements
* **q:** switch for each loops to for loops in extractor-t ([#340](https://github.com/qlik-oss/picasso.js/issues/340)) ([a56ca70](https://github.com/qlik-oss/picasso.js/commit/a56ca70))
# [0.21.0](https://github.com/qlik-oss/picasso.js/compare/v0.20.0...v0.21.0) (2019-03-14)

@@ -8,0 +19,0 @@

4

dist/picasso-q.js
/*
* picasso-plugin-q v0.21.0
* picasso-plugin-q v0.22.0
* Copyright (c) 2019 QlikTech International AB

@@ -8,3 +8,3 @@ * 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=e||self).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 m(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 l(e,t,r){return(l=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 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")}()}var a=Object.prototype.hasOwnProperty,u=Object.prototype.toString,r=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===u.call(e)},p=function(e){if(!e||"[object Object]"!==u.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(c)return c(e,t).value}return e[t]},q=function e(){var t,r,n,a,i,o,u=arguments[0],l=1,c=arguments.length,s=!1;for("boolean"==typeof u&&(s=u,u=arguments[1]||{},l=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))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=e.origin?e.origin():null;a&&(e=a);var i=n.fields.indexOf(e),o=-1,u=-1;if(-1===i)for(var l=0;l<n.wrappedFields.length;l++)if(u=n.wrappedFields[l].attrDims.map(function(e){return e.instance}).indexOf(e),o=n.wrappedFields[l].attrExps.map(function(e){return e.instance}).indexOf(e),-1!==u||-1!==o){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:0<=u?function(e){return e[i].qAttrDims.qValues[u]}:0<=o?function(e){return e[i].qAttrExps.qValues[o]}:function(e){return e[i]}}function D(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 y(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(c){var t=x(f,c,{cache:g});-1!==t&&c.qMatrix.forEach(function(i,e){var o=c.qArea.qTop+e,u=q({qRow:o},t(i)),l=D(n,u,{key:s});n.filter&&!n.filter(u)||(a.forEach(function(r){var n=p[r],e=n.fields||[n];if(n.fields&&(l[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,l=e.sourceKey,c=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))}c[s]=D(a,f,{key:l})}({cache:g,f:f,mainCell:u,p:e,prop:r,props:p,page:c,rowIdx:o,row:i,sourceKey:s,target:n.fields?l[r]:l,targetProp:n.fields?t:r})}),n.fields){var t=l[r].map(function(e){return e.value}),a=l[r].map(function(e){return e.label});l[r]={value:"function"==typeof n.value?n.value(t):void 0!==n.value?n.value:t,label:"function"==typeof n.label?n.label(a):void 0!==n.label?String(n.label):String(l[r].value)}}}),h&&b.track({cfg:r,itemData:u,obj:l,target:v,tracker:m,trackType:d}),y.push(l))})}),h?o.push.apply(o,O(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 s(e,t){var r,n,a,i,o,u=new C(e),l=+e.value&&(u.value=e.value),c=[u];for(null==t&&(t=g);r=c.pop();)if(l&&(r.value=+r.data.value),(a=t(r.data))&&(o=a.length))for(r.children=new Array(o),i=o-1;0<=i;--i)c.push(n=r.children[i]=new C(a[i])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(M)}function g(e){return e.children}function b(e){e.data=e.data.data}function M(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function C(e){this.data=e,this.depth=this.height=0,this.parent=null}function I(e){if("function"!=typeof e)throw new Error;return e}C.prototype=s.prototype={constructor:C,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 s(this).eachBefore(b)}};var w="$",A={depth:-1},T={};function S(e){return e.id}function F(e){return e.parentId}function k(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 l=k(r,a[u]);Array.isArray(l)?o.push.apply(o,O(l)):o.push(l)}return o}if(!n[i]&&Array.isArray(a)){var c=new Array(a.length);r=n.slice(i+1).join("/");for(var s=0;s<a.length;s++)c[s]=k(r,a[s]);return c}n[i]in a&&(a=a[n[i]])}return a}function N(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=O(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,O(i))}else for(var o=0;o<t.length;o++)t[o].children&&t[o].children.length&&a.push.apply(a,O(e(t[o].children,r-1,n)));return a}(e.children,i-1,r)}}return!1}var _=/^qDimensionInfo(?:\/(\d+))?/,j=/^\/?qMeasureInfo\/(\d+)/,P=/\/qAttrExprInfo\/(\d+)/,H=/\/qAttrDimInfo\/(\d+)/;function V(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 R(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),a=!1,i=-1,o=-1,u=-1,l=-1,c=-1,s=n,f=r.qEffectiveInterColumnSortOrder,p=V(r);return _.test(s)&&(a=!0,i=+_.exec(s)[1],s=n.replace(_,"")),j.test(s)&&("K"===r.qMode?l=+j.exec(s)[1]:c=f&&-1!==f.indexOf(-1)?(l=+j.exec(s)[1],0):+j.exec(s)[1],s=s.replace(j,"")),s&&(H.exec(s)?u=+H.exec(s)[1]:P.exec(s)&&(o=+P.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:l,measureIdx:c,attrDimIdx:u,attrIdx:o}}function U(e,t){var r,n,a=N(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 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 L(e){var t=e.propsArr,r=e.props,h=e.item,d=e.itemData,m=e.ret,v=e.sourceKey;t.forEach(function(c){var s,f,p=r[c],e=p.fields||[p];p.fields&&(s=[],f=[]),e.forEach(function(t){var e,r,n,a,i,o;if(o="primitive"===t.type?(n=t.value,String(t.value)):("function"==typeof t.value&&(e=function(e){return t.value(e,h)}),"function"==typeof t.label&&(r=function(e){return t.label(e,h)}),t.accessor?(a=t.accessor(h),Array.isArray(a)?(i=a.map(t.valueAccessor),t.attrAccessor&&(i=i.map(t.attrAccessor)),e&&(n=i.map(e),e=null),r&&(o=i.map(r),r=null),n=t.reduce?t.reduce(n):n,t.reduceLabel?t.reduceLabel(o,n):String(n)):n=t.attrAccessor?t.attrAccessor(t.valueAccessor(a)):t.valueAccessor(a)):n=d),p.fields){var u=e?e(n):n;s.push(u),f.push(r&&null!=o?r(o):null!=o?o:String(u))}else{var l=e?e(n):n;m[c]={value:l,label:r?r(o):null!=o?o:String(l)},t.field&&(m[c].source={field:t.field.key(),key:v})}}),s&&(m[c]={value:"function"==typeof p.value?p.value(s,h):s,label:"function"==typeof p.label?p.label(f,h):f})})}var z=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",a="K"===e.qMode?"qSubNodes":"qNodes",i=k(n,e);return i&&i[0]?(t.tree=s(i[0],r.children||function(e){return e[a]}),t.tree):null};function K(e){for(var t,r,n,a=e.raw().qDataPages.length?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))}),l=e.fields().filter(function(e){return"measure"===e.type()}).map(function(e){return i.indexOf(o.indexOf(e))}),c={__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);c[v]||(c[v]=Object.assign({__id:v,__parent:p,qValues:[]},m),h=!0),p=v}if(h)for(var y=0;y<l.length;y++){var g=f[l[y]];c[p].qValues.push(g)}}var b=Object.keys(c).map(function(e){return c[e]});return function(){var f=S,p=F;function t(e){var t,r,n,a,i,o,u,l=e.length,c=new Array(l),s={};for(r=0;r<l;++r)t=e[r],i=c[r]=new C(t),null!=(o=f(t,r,e))&&(o+="")&&(s[u=w+(i.id=o)]=u in s?T:i);for(r=0;r<l;++r)if(i=c[r],null!=(o=p(e[r],r,e))&&(o+="")){if(!(a=s[w+o]))throw new Error("missing: "+o);if(a===T)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,--l}).eachBefore(M),n.parent=null,0<l)throw new Error("cycle");return n}return t.id=function(e){return arguments.length?(f=I(e),t):f},t.parentId=function(e){return arguments.length?(p=I(e),t):p},t}().id(function(e){return e.__id}).parentId(function(e){return e.__parent})(b)}var B=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=R(e.field,{cube:n,cache:a}),r=U(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(),l=t.key(),i="S"===a.qMode?K(t):z(a,r,e);if(!i)return null;for(var o=i.height,c=[],u=0;u<=o;u++){var s=null;if(0<u)if("S"===a.qMode){var f=V(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);c[u]={propsArr:v,props:d,main:m};var y=s?R(s,{cube:a,cache:r}):{fieldDepth:0};B({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=c[e.depth].propsArr,n=c[e.depth].props,a=c[e.depth].main,i=g[t],o=i.data,u=Y(a,o,{key:l});L({propsArr:r,props:n,item:i,itemData:o,ret:u,sourceKey:l,isTree:!0}),e.data=u}),i}function $(M,C,I,w){var e=Array.isArray(M)?M:[M],A=[];return e.forEach(function(e){if(void 0!==e.field){var t=C.raw(),r=C.key();if(!z(t,I,M))return;var n="object"===E(e.field)?e.field:C.field(e.field),a=w.normalizeConfig(e,C),i=a.props,o=a.main,u=Object.keys(i),l=R(n,{cube:t,cache:I}),c=U({fieldDepth:0},l),s=c.nodeFn,f=c.attrFn,p=c.valueFn;B({propsArr:u,props:i,cube:t,cache:I,itemDepthObject:l,f:n});for(var h=!!e.trackBy,d=E(e.trackBy),m={},v=[],y=s(I.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 D=Y(o,x,{key:r});L({propsArr:u,props:i,item:q,itemData:x,ret:D,sourceKey:r}),h&&w.track({cfg:e,itemData:x,obj:D,target:v,tracker:m,trackType:d}),g.push(D)}}h?A.push.apply(A,O(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,l,c,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"),(!(c=t.split("."))[1]||c[1]&&c[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(;c[0].length<e[0].length-o;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=s[1]&&s[s.length-1].length){for(f=t[0],m="",y=f.length%l,p=f.length,b=0;b<p;b++)m+=f.charAt(b),!((b-y+1)%l)&&b<p-l&&(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 le(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 ce(e,t,r){var n;return ee.test(t)?e=le(e,Number(/\d{2}/.exec(t)[0]),t,r):te.test(t)?e=le(e,8,t,r):re.test(t)?e=le(e,10,t,r):ne.test(t)?e=le(e,16,t,r):ae.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)),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,l,c,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=""),l=t,t=/,/.test(r)?"¤":",",l&&(i=i.replace(se(l,"g"),t)),c=r,r=".",c&&(i=i.replace(se(c,"g"),r)),s=(s=i.match(/#/g))?s.length:0;var m,v=d.split(c);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=l,e.decTemp=c,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,l,c,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=ce(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,c=(l=s.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),a=e,c||"#"!==l.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,c?c.length:0)).split(".")[0]),b=l.split(i)[0];if(e=X(b+=i,g)||"0",c){var q=Math.max(0,Math.min(14,c.length)),x=c.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(q).slice(2).replace(/0+$/,"");for(u=D.length;u<x;u++)D+="0";D&&(e+=i+D)}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(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),u=0;u<t;u++)l+="#";e=X(l,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(t){var r,n,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=e.size,i=void 0===a?5e3:a,o=e.multipleArguments,u=void 0!==o&&o,l=e.toKey,c=void 0===l?function(e){return e}:l,s=Object.create(null),f=Object.create(null),p=0,h=0;return(r=u?function(){return n=c.apply(void 0,arguments),r.has(n)?r.get(n):r.set(n,t.apply(void 0,arguments))}:function(e){return n=c(e),r.has(n)?r.get(n):r.set(n,t(e))}).set=function(e,t){return i<=p&&(delete s[f[h]],delete f[h],p--,h++),s[e]=t,f[p]=e,p++,t},r.get=function(e){return s[e]},r.has=function(e){return e in s},r.clear=function(){s=Object.create(null),f=Object.create(null),h=p=0},r.size=function(){return p},r}function de(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 l(pe,t)}(a,e,t,r,n),o=he(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function u(e){return o(e)}return u.format=function(e,t,r,n){return o.clear(),i.format(t,e,r,n)},u.pattern=function(e){return e&&(o.clear(),i.pattern=e,i.prepare()),i.pattern},u}var me={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},ve=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ye=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ge=["January","February","March","April","May","June","July","August","September","October","November","December"],be=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qe(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function xe(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}function De(e,t){var r,n,a,i,o,u,l=(a=24*xe(n=e),i=60*xe(a),o=60*xe(i),u=1e3*xe(o),{d:Math.floor(n),h:Math.floor(a),m:Math.floor(i),s:Math.floor(o),f:Math.round(u)}),c=l.d,s=l.h,f=l.m,p=l.s,h=l.f,d=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e)))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(s+=24*c),/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.getUTCHours()?"pm":"am"),{year:0,month:0,day:d,date:c,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:ve,qDayNames:ye,qLongMonthNames:ge,qMonthNames:be}),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=(m(n={},me.TIME,a.qTimeFmt||"hh:mm:ss"),m(n,me.DATE,a.qDateFmt||"YYYY-MM-DD"),m(n,me.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).getUTCHours(),o=n.getUTCDay()-1,a&&((i%=12)||(i=12)),o<0&&(o=6),{year:n.getUTCFullYear(),month:n.getUTCMonth(),day:o,date:n.getUTCDate(),h:i,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:12<=n.getUTCHours()?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),De(e,t));var l,c,s=(l=this,c=r,{"Y+|y+":{Y:"".concat(Number("".concat(c.year).slice(-2))),YY:qe("".concat(c.year).slice(-2),2),YYY:qe("".concat(c.year).slice(-3),3),def:function(e){return qe("".concat(c.year),e.length)}},"M+":{M:c.month+1,MM:qe("".concat(c.month+1),2),MMM:l.locale_months_abbr[c.month],def:l.locale_months[c.month]},"W+|w+":{W:c.day,WW:qe("".concat(c.day),2),WWW:l.locale_days_abbr[c.day],def:l.locale_days[c.day]},"D+|d+":{D:c.date,def:function(e){return qe("".concat(c.date),e.length)}},"h+|H+":{h:c.h,def:function(e){return qe("".concat(c.h),e.length)}},"m+":{m:c.m,def:function(e){return qe("".concat(c.m),e.length)}},"s+|S+":{s:c.s,def:function(e){return qe("".concat(c.s),e.length)}},"f+|F+":{def:function(e){var t="".concat(c.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=c.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 Ce(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(Me,t)}function Ie(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"TS",n=Ce(2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,t,r),a=he(n.format.bind(n),{toKey:function(e){return"object"===E(e)?e.getTime():e}});function i(e){return r!==me.INTERVAL?(t=e,new Date(Date.UTC(1899,11,30+Math.floor(t),0,0,0,864e5*(t-Math.floor(t))))):e;var t}function e(e){return e=i(e),a(e)}return e.format=function(e,t){return a.clear(),t=i(t),n.format(t,e)},e.locale=function(e){return n=Ce(e,t,r),a=he(n.format.bind(n),{toKey:function(e){return"object"===E(e)?e.getTime():e}}),this},e.qtype=function(e){return void 0!==e&&(r=e,a.clear()),r},e}function we(){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,l=t.type,c=t.sourceField,s=u||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),f="dimension"===l?"first":"avg",p=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"),de(r,n,a,i,t)}(r,i),h={id:function(){return n},key:function(){return a},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return l},origin:function(){return c},items:function(){return e||(e=o(h)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:s,label:function(e){return e.qText||""},reduce:f,reduceLabel:"dimension"===l?"first":function(e,t){return p(t)},formatter:function(){return p},tags:function(){return r.qTags}};return h}function Ae(a,e,i,o,u){return(e[a]||[]).map(function(e,t){var r="".concat(o?"".concat(o,"/"):"").concat(a,"/").concat(t),n={instance:we(q({id:"".concat(i?"".concat(i,"/"):"").concat(r),key:r,meta:e},u))};return n.attrDims=Ae("qAttrDimInfo",e,i,r,q({},u,{value:function(e){return e.qElemNo},type:"dimension"})),n.attrExps=Ae("qAttrExprInfo",e,i,r,q({},u,{value:function(e){return e.qNum},type:"measure"})),n.measures=Ae("qMeasureInfo",e,i,r,q({},u,{value:function(e){return e.qValue},type:"measure"})),n})}function Ee(){var e,t,r,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=n.key,i=n.data,o=n.config,u=void 0===o?{}:o,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=i;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var s=Ee.util,f={cache:l,cube:c,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:u.virtualFields},p={key:function(){return a},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,f)},fields:function(){return l.fields.slice()},extract:function(e){return f.extractor(e,p,l,s)},hierarchy:function(e){return f.hierarchy(e,p,l,s)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(f.extractor=$,f.hierarchy=W,f.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(f.extractor=y,f.pages=c.qDataPages,f.hierarchy=W):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},p,l,s)};var h="S"===c.qMode?function(e){return e.qElemNumber}:void 0,d="S"===c.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,O(Ae("qDimensionInfo",c,a,"",q({},f,{value:h,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,O(Ae("qMeasureInfo",c,a,"",q({},f,{value:d,type:"measure"})))),l.fields=l.wrappedFields.map(function(e){return e.instance});return function t(e){e.forEach(function(e){l.allFields.push(e.instance),t(e.measures),t(e.attrDims),t(e.attrExps)})}(l.wrappedFields),(u.virtualFields||[]).forEach(function(e){var t=p.field(e.from),r=we(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(e){m(t,e,r[e])})}return t}({meta:t.raw(),id:"".concat(a,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},p,l,s)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(r)}),(r=l.allFields).push.apply(r,O(l.virtualFields)),p}var Oe=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Te=/\/qDimensionInfo(?:\/(\d+))?/,Se=/\/qMeasureInfo\/(\d+)/,Fe=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,ke=/\/qAttrExprInfo\/(\d+)/,Ne=/\/?qHyperCube/,_e=/\/?qTreeData/,je=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Pe=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function He(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=je):_e.test(e)&&(i="".concat(a.substr(0,a.indexOf("qTreeData")+9)),o=Pe);var u=!0;if(Te.test(e)&&(r=+Te.exec(e)[1]),Se.test(e)&&(n=+Se.exec(e)[1]),Fe.test(e)){n=-1,r=0;var l=+Fe.exec(a)[2];isNaN(l)||(r=l,a=a.replace(/\/\d+$/,"")),u=!1}if(ke.test(e)){var c=n;if(t){n=0;var s=k(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,c).reduce(function(e,t){return e+t.qAttrExprInfo.length},n)),n+=+ke.exec(a)[1]}else-1<r?(r=-1,n=+ke.exec(a)[1]):n+=+ke.exec(a)[1]+1}return Oe.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 l=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});(0===o||o<=u)&&-1<o?l.forEach(function(e){d.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:u-o})}):l.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 c=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});m=!!c.length,h.push({params:[t.path,t.dimensionIdx,c,!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){Ee.util=e.data("matrix").util,e.data("q",Ee),e.formatter("q-number",de),e.formatter("q-time",Ie)}return Ve.qBrushHelper=He,Ve.selections=He,Ve});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).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 v(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 l(e,t,r){return(l=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 m(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 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")}()}var a=Object.prototype.hasOwnProperty,u=Object.prototype.toString,r=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===u.call(e)},p=function(e){if(!e||"[object Object]"!==u.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)},d=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},h=function(e,t){if("__proto__"===t){if(!a.call(e,t))return;if(c)return c(e,t).value}return e[t]},k=function e(){var t,r,n,a,i,o,u=arguments[0],l=1,c=arguments.length,s=!1;for("boolean"==typeof u&&(s=u,u=arguments[1]||{},l=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});l<c;++l)if(null!=(t=arguments[l]))for(r in t)n=h(u,r),u!==(a=h(t,r))&&(s&&a&&(p(a)||(i=f(a)))?(o=i?(i=!1,n&&f(n)?n:[]):n&&p(n)?n:{},d(u,{name:r,newValue:e(s,o,a)})):void 0!==a&&d(u,{name:r,newValue:a}));return u};function N(e,t,r){if(!e)return-1;var n=r.cache,a=e.origin?e.origin():null;a&&(e=a);var i=n.fields.indexOf(e),o=-1,u=-1;if(-1===i)for(var l=0;l<n.wrappedFields.length;l++)if(u=n.wrappedFields[l].attrDims.map(function(e){return e.instance}).indexOf(e),o=n.wrappedFields[l].attrExps.map(function(e){return e.instance}).indexOf(e),-1!==u||-1!==o){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:0<=u?function(e){return e[i].qAttrDims.qValues[u]}:0<=o?function(e){return e[i].qAttrExps.qValues[o]}:function(e){return e[i]}}function _(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 j(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,l=e.sourceKey,c=e.target,s=e.targetProp,f=n;if(a.field&&a.field!==r){var p=N(a.field,i,{cache:t});if(-1===p)return;f=k({qRow:o},p(u))}c[s]=_(a,f,{key:l})}function g(e,t,r,n){for(var a=Array.isArray(e)?e:[e],i=[],o=0;o<a.length;o++)if(void 0!==a[o].field){for(var u=t.raw(),l=t.key(),c="object"===E(a[o].field)?a[o].field:t.field(a[o].field),s=n.normalizeConfig(a[o],t),f=s.props,p=s.main,d=Object.keys(f),h=!!a[o].trackBy,v=E(a[o].trackBy),m={},g=[],y=[],b=0;b<u.qDataPages.length;b++){var q=N(c,u.qDataPages[b],{cache:r});if(-1!==q)for(var x=0;x<u.qDataPages[b].qMatrix.length;x++){var D=u.qDataPages[b].qArea.qTop+x,M=k({qRow:D},q(u.qDataPages[b].qMatrix[x])),C=_(p,M,{key:l});if(!(p.filter&&!p.filter(M))){for(var I=0;I<d.length;I++){var w=f[d[I]],A=w.fields||[w];w.fields&&(C[d[I]]=[]);for(var O=0;O<A.length;O++)j({cache:r,f:c,mainCell:M,p:A[O],prop:d[I],props:f,page:u.qDataPages[b],rowIdx:D,row:u.qDataPages[b].qMatrix[x],sourceKey:l,target:w.fields?C[d[I]]:C,targetProp:w.fields?O:d[I]});if(w.fields){var T=C[d[I]].map(function(e){return e.value}),S=C[d[I]].map(function(e){return e.label});C[d[I]]={value:"function"==typeof w.value?w.value(T):void 0!==w.value?w.value:T,label:"function"==typeof w.label?w.label(S):void 0!==w.label?String(w.label):String(C[d[I]].value)}}}h&&n.track({cfg:a[o],itemData:M,obj:C,target:g,tracker:m,trackType:v}),y.push(C)}}}h?i.push.apply(i,F(n.collect(g,{main:p,propsArr:d,props:f}))):i.push.apply(i,y)}return i}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 s(e,t){var r,n,a,i,o,u=new x(e),l=+e.value&&(u.value=e.value),c=[u];for(null==t&&(t=y);r=c.pop();)if(l&&(r.value=+r.data.value),(a=t(r.data))&&(o=a.length))for(r.children=new Array(o),i=o-1;0<=i;--i)c.push(n=r.children[i]=new x(a[i])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(q)}function y(e){return e.children}function b(e){e.data=e.data.data}function q(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function x(e){this.data=e,this.depth=this.height=0,this.parent=null}function D(e){if("function"!=typeof e)throw new Error;return e}x.prototype=s.prototype={constructor:x,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 s(this).eachBefore(b)}};var M="$",C={depth:-1},I={};function w(e){return e.id}function A(e){return e.parentId}function O(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 l=O(r,a[u]);Array.isArray(l)?o.push.apply(o,F(l)):o.push(l)}return o}if(!n[i]&&Array.isArray(a)){var c=new Array(a.length);r=n.slice(i+1).join("/");for(var s=0;s<a.length;s++)c[s]=O(r,a[s]);return c}n[i]in a&&(a=a[n[i]])}return a}function T(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=F(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,F(i))}else for(var o=0;o<t.length;o++)t[o].children&&t[o].children.length&&a.push.apply(a,F(e(t[o].children,r-1,n)));return a}(e.children,i-1,r)}}return!1}var S=/^qDimensionInfo(?:\/(\d+))?/,P=/^\/?qMeasureInfo\/(\d+)/,H=/\/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 U(e,t){var r=t.cube;if(!e)return-1;var n=e.origin&&e.origin()?e.origin().key():e.key(),a=!1,i=-1,o=-1,u=-1,l=-1,c=-1,s=n,f=r.qEffectiveInterColumnSortOrder,p=R(r);return S.test(s)&&(a=!0,i=+S.exec(s)[1],s=n.replace(S,"")),P.test(s)&&("K"===r.qMode?l=+P.exec(s)[1]:c=f&&-1!==f.indexOf(-1)?(l=+P.exec(s)[1],0):+P.exec(s)[1],s=s.replace(P,"")),s&&(V.exec(s)?u=+V.exec(s)[1]:H.exec(s)&&(o=+H.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:l,measureIdx:c,attrDimIdx:u,attrIdx:o}}function Y(e,t){var r,n,a=T(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 L(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){for(var s=e.propsArr,t=e.props,f=e.item,p=e.itemData,d=e.ret,h=e.sourceKey,v=0;v<s.length;v++){var m=t[s[v]],g=m.fields||[m],y=void 0,b=void 0;m.fields&&(y=[],b=[]);for(var r=function(e){var t=g[e],r=void 0,n=void 0,a=void 0,i=void 0,o=void 0,u=void 0;if(u="primitive"===t.type?(a=t.value,String(t.value)):("function"==typeof t.value&&(r=function(e){return t.value(e,f)}),"function"==typeof t.label&&(n=function(e){return t.label(e,f)}),t.accessor?(i=t.accessor(f),Array.isArray(i)?(o=i.map(t.valueAccessor),t.attrAccessor&&(o=o.map(t.attrAccessor)),r&&(a=o.map(r),r=null),n&&(u=o.map(n),n=null),a=t.reduce?t.reduce(a):a,t.reduceLabel?t.reduceLabel(u,a):String(a)):a=t.attrAccessor?t.attrAccessor(t.valueAccessor(i)):t.valueAccessor(i)):a=p),m.fields){var l=r?r(a):a;y.push(l),b.push(n&&null!=u?n(u):null!=u?u:String(l))}else{var c=r?r(a):a;d[s[v]]={value:c,label:n?n(u):null!=u?u:String(c)},t.field&&(d[s[v]].source={field:t.field.key(),key:h})}},n=0;n<g.length;n++)r(n);y&&(d[s[v]]={value:"function"==typeof m.value?m.value(y,f):y,label:"function"==typeof m.label?m.label(b,f):b})}}var K=function(e,t,r){var n="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",a="K"===e.qMode?"qSubNodes":"qNodes",i=O(n,e);return i&&i[0]?(t.tree=s(i[0],r.children||function(e){return e[a]}),t.tree):null};function B(e){for(var t,r,n,a=e.raw().qDataPages.length?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))}),l=e.fields().filter(function(e){return"measure"===e.type()}).map(function(e){return i.indexOf(o.indexOf(e))}),c={__root:{__id:"__root",qValues:[]}},s=0;s<a.length;s++){for(var f=a[s],p="__root",d=!1,h=0;h<u.length;h++){var v=f[u[h]],m="".concat(p,"__").concat(v.qText);c[m]||(c[m]=Object.assign({__id:m,__parent:p,qValues:[]},v),d=!0),p=m}if(d)for(var g=0;g<l.length;g++){var y=f[l[g]];c[p].qValues.push(y)}}var b=Object.keys(c).map(function(e){return c[e]});return function(){var f=w,p=A;function t(e){var t,r,n,a,i,o,u,l=e.length,c=new Array(l),s={};for(r=0;r<l;++r)t=e[r],i=c[r]=new x(t),null!=(o=f(t,r,e))&&(o+="")&&(s[u=M+(i.id=o)]=u in s?I:i);for(r=0;r<l;++r)if(i=c[r],null!=(o=p(e[r],r,e))&&(o+="")){if(!(a=s[M+o]))throw new Error("missing: "+o);if(a===I)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=C,n.eachBefore(function(e){e.depth=e.parent.depth+1,--l}).eachBefore(q),n.parent=null,0<l)throw new Error("cycle");return n}return t.id=function(e){return arguments.length?(f=D(e),t):f},t.parentId=function(e){return arguments.length?(p=D(e),t):p},t}().id(function(e){return e.__id}).parentId(function(e){return e.__parent})(b)}var W=function(e){for(var t=e.propsArr,r=e.props,n=e.cube,a=e.cache,i=e.itemDepthObject,o=e.f,u=0;u<t.length;u++)for(var l=r[t[u]],c=l.fields?l.fields:[l],s=0;s<c.length;s++){var f=c[s];if(f.field!==o){var p=Y(i,U(f.field,{cube:n,cache:a}));f.accessor=p.nodeFn,f.valueAccessor=p.valueFn,f.attrAccessor=p.attrFn}}};function $(){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(),i=t.key(),o="S"===a.qMode?B(t):K(a,r,e);if(!o)return null;for(var u=o.height,l=[],c=0;c<=u;c++){var s=null;if(0<c)if("S"===a.qMode){var f=R(a)[c-1];s=r.fields[f]}else{var p=a.qEffectiveInterColumnSortOrder[c-1];c>a.qEffectiveInterColumnSortOrder.length&&(p=a.qDimensionInfo.length),s=r.fields[p]}var d=n.normalizeConfig(Object.assign({},e,{field:s?s.key():void 0}),t),h=d.props,v=d.main,m=Object.keys(h);l[c]={propsArr:m,props:h,main:v};var g=s?U(s,{cube:a,cache:r}):{fieldDepth:0};W({propsArr:m,props:h,cube:a,cache:r,itemDepthObject:g,f:s})}for(var y=o.copy().descendants(),b=o.descendants(),q=0;q<b.length;q++){var x=l[b[q].depth].propsArr,D=(h=l[b[q].depth].props,v=l[b[q].depth].main,y[q]),M=D.data,C=L(v,M,{key:i});z({propsArr:x,props:h,item:D,itemData:M,ret:C,sourceKey:i,isTree:!0}),b[q].data=C}return o}function J(e,t,r,n){for(var a=Array.isArray(e)?e:[e],i=[],o=0;o<a.length;o++)if(void 0!==a[o].field){var u=t.raw(),l=t.key();if(!K(u,r,e))continue;var c="object"===E(a[o].field)?a[o].field:t.field(a[o].field),s=n.normalizeConfig(a[o],t),f=s.props,p=s.main,d=Object.keys(f),h=U(c,{cube:u,cache:r}),v=Y({fieldDepth:0},h),m=v.nodeFn,g=v.attrFn,y=v.valueFn;W({propsArr:d,props:f,cube:u,cache:r,itemDepthObject:h,f:c});for(var b=!!a[o].trackBy,q=E(a[o].trackBy),x={},D=[],M=m(r.tree),C=[],I=0;I<M.length;I++){var w=M[I],A=g?g(y(w)):y(w);if(!(p.filter&&!p.filter(A))){var O=L(p,A,{key:l});z({propsArr:d,props:f,item:w,itemData:A,ret:O,sourceKey:l}),b&&n.track({cfg:a[o],itemData:A,obj:O,target:D,tracker:x,trackType:q}),C.push(O)}}b?i.push.apply(i,F(n.collect(D,{main:p,propsArr:d,props:f}))):i.push.apply(i,C)}return i}"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var X,G=(function(e){e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,a,i,o,u,l,c,s,f,p=e.length,d=e.search(/[0-9\-\+#]/),h=0<d?e.substring(0,d):"",v=e.split("").reverse().join(""),m=v.search(/[0-9\-\+#]/),g=p-m,y=e.substring(g,g+1),b=g+("."===y||","===y?1:0),q=0<m?e.substring(b,p):"";if(e=e.substring(d,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"),(!(c=t.split("."))[1]||c[1]&&c[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(;c[0].length<e[0].length-o;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=s[1]&&s[s.length-1].length){for(f=t[0],v="",g=f.length%l,p=f.length,b=0;b<p;b++)v+=f.charAt(b),!((b-g+1)%l)&&b<p-l&&(v+=i);t[0]=v}return t[1]=e[1]&&t[1]?a+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),h+(r?"-":"")+n+q}}(X={exports:{}},X.exports),X.exports);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,ie=/^\(bin\)/i,oe=/^\(rom\)/i,ue=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,le=/#|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 se(e,t,r){var n;return te.test(t)?e=ce(e,Number(/\d{2}/.exec(t)[0]),t,r):re.test(t)?e=ce(e,8,t,r):ne.test(t)?e=ce(e,10,t,r):ae.test(t)?e=ce(e,16,t,r):ie.test(t)?e=ce(e,2,t,r):oe.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 fe(e,t,r){var n=Q(e);return r?n:new RegExp(n||"",t)}function pe(e,t,r){var n,a,i,o,u,l,c,s,f,p,d,h=e.pattern;0<=h.indexOf("A")&&(h=h.replace("A",""),e.abbreviate=!0),p=t,(d=r)&&(d=Q(d)),p&&(p=Q(p)),f=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(d,"[#0]+)?")),o=(i=(i=h.match(f))?i[0]:"")?h.substr(0,h.indexOf(i)):h,u=i?h.substring(h.indexOf(i)+i.length):"",i||(i=h?"#":"##########"),t&&t===r&&(a=(n=i.split(r)).pop(),i=n.join("")+r+a,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(i=i.replace(fe(l,"g"),t)),c=r,r=".",c&&(i=i.replace(fe(c,"g"),r)),s=(s=i.match(/#/g))?s.length:0;var v,m=h.split(c);m[1]&&(v=m[1].match(le)),e.prefix=o||"",e.postfix=u||"",e.pattern=h,e.maxPrecision=v?v.length:2,e.percentage=ee.test(h),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(fe(t,null,!0),"|").concat(fe(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=c,e.t=t,e.d=r,e.temp=s}var de=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 Z;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],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,i,o,u,l,c,s=this._prepared,f="",p="",d=e;if(isNaN(e))return"".concat(d);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=se(e,s.pattern,i);else{if(s.percentage&&(e*=100),s.abbreviate){var h,v,m=Object.keys(this.abbreviations).map(function(e){return parseInt(e,10)}).sort(function(e,t){return e-t}),g=m[0];for(u=0,r=Number(Number(e).toExponential().split("e")[1]);g<=r&&u<m.length;)g=m[++u];0<u&&(h=m[u-1]),h&&0<r&&0<h?v=h:(r<0&&h<0||!h)&&(g<0&&g-r<=s.maxPrecision?v=g:h<=r&&!(0<g&&-r<=s.maxPrecision)&&(v=h)),v&&(f=this.abbreviations[v],e/=Math.pow(10,v))}if(n=Math.abs(e),t=s.temp,c=(l=s.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),a=e,c||"#"!==l.slice(-1)[0])if(1e15<=n||0<n&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var y=Number(e.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),b=l.split(i)[0];if(e=G(b+=i,y)||"0",c){var q=Math.max(0,Math.min(14,c.length)),x=c.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(q).slice(2).replace(/0+$/,"");for(u=D.length;u<x;u++)D+="0";D&&(e+=i+D)}else 0===y&&(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(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),u=0;u<t;u++)l+="#";e=G(l,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(t){var r,n,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=e.size,i=void 0===a?5e3:a,o=e.multipleArguments,u=void 0!==o&&o,l=e.toKey,c=void 0===l?function(e){return e}:l,s=Object.create(null),f=Object.create(null),p=0,d=0;return(r=u?function(){return n=c.apply(void 0,arguments),r.has(n)?r.get(n):r.set(n,t.apply(void 0,arguments))}:function(e){return n=c(e),r.has(n)?r.get(n):r.set(n,t(e))}).set=function(e,t){return i<=p&&(delete s[f[d]],delete f[d],p--,d++),s[e]=t,f[p]=e,p++,t},r.get=function(e){return s[e]},r.has=function(e){return e in s},r.clear=function(){s=Object.create(null),f=Object.create(null),d=p=0},r.size=function(){return p},r}function ve(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 l(de,t)}(a,e,t,r,n),o=he(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function u(e){return o(e)}return u.format=function(e,t,r,n){return o.clear(),i.format(t,e,r,n)},u.pattern=function(e){return e&&(o.clear(),i.pattern=e,i.prepare()),i.pattern},u}var me={AUTO:"U",INTEGER:"I",NUMBER:"R",FIXED_TO:"F",MONEY:"M",DATE:"D",TIME:"T",DATE_TIME:"TS",INTERVAL:"IV"},ge=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ye=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],be=["January","February","March","April","May","June","July","August","September","October","November","December"],qe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(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 Me(e,t){var r,n,a,i,o,u,l=(a=24*De(n=e),i=60*De(a),o=60*De(i),u=1e3*De(o),{d:Math.floor(n),h:Math.floor(a),m:Math.floor(i),s:Math.floor(o),f:Math.round(u)}),c=l.d,s=l.h,f=l.m,p=l.s,d=l.f,h=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e)))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(s+=24*c),/h+/gi.test(t)||(f+=60*s),/m+/gi.test(t)||(p+=60*f),/w+/gi.test(t)&&(h=r?r.getDay()-1:0)<0&&(h=6);var v="";return r&&(v=12<=r.getUTCHours()?"pm":"am"),{year:0,month:0,day:h,date:c,h:s,m:f,s:p,f:d,t:v}}var Ce=function(){function i(e,t,r){o(this,i);var n,a=e||{};(a.qCalendarStrings||(a.qCalendarStrings={qLongDayNames:ge,qDayNames:ye,qLongMonthNames:be,qMonthNames:qe}),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=(v(n={},me.TIME,a.qTimeFmt||"hh:mm:ss"),v(n,me.DATE,a.qDateFmt||"YYYY-MM-DD"),v(n,me.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).getUTCHours(),o=n.getUTCDay()-1,a&&((i%=12)||(i=12)),o<0&&(o=6),{year:n.getUTCFullYear(),month:n.getUTCMonth(),day:o,date:n.getUTCDate(),h:i,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:12<=n.getUTCHours()?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),Me(e,t));var l,c,s=(l=this,c=r,{"Y+|y+":{Y:"".concat(Number("".concat(c.year).slice(-2))),YY:xe("".concat(c.year).slice(-2),2),YYY:xe("".concat(c.year).slice(-3),3),def:function(e){return xe("".concat(c.year),e.length)}},"M+":{M:c.month+1,MM:xe("".concat(c.month+1),2),MMM:l.locale_months_abbr[c.month],def:l.locale_months[c.month]},"W+|w+":{W:c.day,WW:xe("".concat(c.day),2),WWW:l.locale_days_abbr[c.day],def:l.locale_days[c.day]},"D+|d+":{D:c.date,def:function(e){return xe("".concat(c.date),e.length)}},"h+|H+":{h:c.h,def:function(e){return xe("".concat(c.h),e.length)}},"m+":{m:c.m,def:function(e){return xe("".concat(c.m),e.length)}},"s+|S+":{s:c.s,def:function(e){return xe("".concat(c.s),e.length)}},"f+|F+":{def:function(e){var t="".concat(c.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=c.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 d=new RegExp(f.join("|"),"g");return t.replace(d,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 Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(Ce,t)}function we(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"TS",n=Ie(2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,t,r),a=he(n.format.bind(n),{toKey:function(e){return"object"===E(e)?e.getTime():e}});function i(e){return r!==me.INTERVAL?(t=e,new Date(Date.UTC(1899,11,30+Math.floor(t),0,0,0,864e5*(t-Math.floor(t))))):e;var t}function e(e){return e=i(e),a(e)}return e.format=function(e,t){return a.clear(),t=i(t),n.format(t,e)},e.locale=function(e){return n=Ie(e,t,r),a=he(n.format.bind(n),{toKey:function(e){return"object"===E(e)?e.getTime():e}}),this},e.qtype=function(e){return void 0!==e&&(r=e,a.clear()),r},e}function Ae(){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,l=t.type,c=t.sourceField,s=u||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),f="dimension"===l?"first":"avg",p=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return we(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"),ve(r,n,a,i,t)}(r,i),d={id:function(){return n},key:function(){return a},raw:function(){return r},title:function(){return r.qFallbackTitle||r.label},type:function(){return l},origin:function(){return c},items:function(){return e||(e=o(d)),e},min:function(){return r.qMin},max:function(){return r.qMax},value:s,label:function(e){return e.qText||""},reduce:f,reduceLabel:"dimension"===l?"first":function(e,t){return p(t)},formatter:function(){return p},tags:function(){return r.qTags}};return d}function Oe(a,e,i,o,u){return(e[a]||[]).map(function(e,t){var r="".concat(o?"".concat(o,"/"):"").concat(a,"/").concat(t),n={instance:Ae(k({id:"".concat(i?"".concat(i,"/"):"").concat(r),key:r,meta:e},u))};return n.attrDims=Oe("qAttrDimInfo",e,i,r,k({},u,{value:function(e){return e.qElemNo},type:"dimension"})),n.attrExps=Oe("qAttrExprInfo",e,i,r,k({},u,{value:function(e){return e.qNum},type:"measure"})),n.measures=Oe("qMeasureInfo",e,i,r,k({},u,{value:function(e){return e.qValue},type:"measure"})),n})}function Te(){var e,t,r,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},a=n.key,i=n.data,o=n.config,u=void 0===o?{}:o,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},c=i;if(!c)throw new Error('Missing "data" input');if(!c.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var s=Te.util,f={cache:l,cube:c,localeInfo:u.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:u.virtualFields},p={key:function(){return a},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,f)},fields:function(){return l.fields.slice()},extract:function(e){return f.extractor(e,p,l,s)},hierarchy:function(e){return f.hierarchy(e,p,l,s)},_cache:function(){return l}};"K"===c.qMode||"T"===c.qMode||!c.qMode&&c.qNodesOnDim?(f.extractor=J,f.hierarchy=$,f.pages="K"===c.qMode?c.qStackedDataPages:c.qTreeDataPages):"S"===c.qMode?(f.extractor=g,f.pages=c.qDataPages,f.hierarchy=$):f.extractor=function(){return[]},f.fieldExtractor=function(e){return f.extractor({field:e},p,l,s)};var d="S"===c.qMode?function(e){return e.qElemNumber}:void 0,h="S"===c.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,F(Oe("qDimensionInfo",c,a,"",k({},f,{value:d,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,F(Oe("qMeasureInfo",c,a,"",k({},f,{value:h,type:"measure"})))),l.fields=l.wrappedFields.map(function(e){return e.instance});return function t(e){e.forEach(function(e){l.allFields.push(e.instance),t(e.measures),t(e.attrDims),t(e.attrExps)})}(l.wrappedFields),(u.virtualFields||[]).forEach(function(e){var t=p.field(e.from),r=Ae(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(e){v(t,e,r[e])})}return t}({meta:t.raw(),id:"".concat(a,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return f.extractor({field:e},p,l,s)},key:e.key,type:t.type(),localeInfo:f.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(r)}),(r=l.allFields).push.apply(r,F(l.virtualFields)),p}var Se=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Ee=/\/qDimensionInfo(?:\/(\d+))?/,Fe=/\/qMeasureInfo\/(\d+)/,ke=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Ne=/\/qAttrExprInfo\/(\d+)/,_e=/\/?qHyperCube/,je=/\/?qTreeData/,Pe=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},He=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Ve(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,d=[],h={},r=e.isActive(),v=!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};_e.test(e)?(i="".concat(a.substr(0,a.indexOf("qHyperCube")+10)),o=Pe):je.test(e)&&(i="".concat(a.substr(0,a.indexOf("qTreeData")+9)),o=He);var u=!0;if(Ee.test(e)&&(r=+Ee.exec(e)[1]),Fe.test(e)&&(n=+Fe.exec(e)[1]),ke.test(e)){n=-1,r=0;var l=+ke.exec(a)[2];isNaN(l)||(r=l,a=a.replace(/\/\d+$/,"")),u=!1}if(Ne.test(e)){var c=n;if(t){n=0;var s=O(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,c).reduce(function(e,t){return e+t.qAttrExprInfo.length},n)),n+=+Ne.exec(a)[1]}else-1<r?(r=-1,n=+Ne.exec(a)[1]):n+=+Ne.exec(a)[1]+1}return Se.forEach(function(e){var t=m(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&&(v=!0,h.multiRangeSelectTreeDataValues||(h.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),r.forEach(function(e){return h.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&&(v=!0,h.rangeSelectHyperCubeValues||(h.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(function(e){return h.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&&(v=!0,h.selectHyperCubeContinuousRange||(h.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),a.forEach(function(e){return h.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(h.selectPivotCells||(h.selectPivotCells={path:t.path,cells:[]}),e.id===p||!p&&0===h.selectPivotCells.cells.length){var l=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});(0===o||o<=u)&&-1<o?l.forEach(function(e){h.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:u-o})}):l.forEach(function(e){h.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),v=!!h.selectPivotCells.cells.length}}else h.selectHyperCubeCells||(h.selectHyperCubeCells={path:t.path,cols:[]}),h.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==p&&(p||h.selectHyperCubeCells.values)||(h.selectHyperCubeCells.values=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)}),v=!!h.selectHyperCubeCells.values.length);else{var c=e.brush.values().map(function(e){return+e}).filter(function(e){return!isNaN(e)});v=!!c.length,d.push({params:[t.path,t.dimensionIdx,c,!1],method:"selectHyperCubeValues"})}}}),!v&&r?[{method:"resetMadeSelections",params:[]}]:(h.rangeSelectHyperCubeValues&&d.push({method:"rangeSelectHyperCubeValues",params:[h.rangeSelectHyperCubeValues.path,h.rangeSelectHyperCubeValues.ranges,[],!0]}),h.selectHyperCubeContinuousRange&&d.push({method:"selectHyperCubeContinuousRange",params:[h.selectHyperCubeContinuousRange.path,h.selectHyperCubeContinuousRange.ranges]}),h.selectHyperCubeCells&&d.push({method:"selectHyperCubeCells",params:[h.selectHyperCubeCells.path,h.selectHyperCubeCells.values,h.selectHyperCubeCells.cols]}),h.selectPivotCells&&d.push({method:"selectPivotCells",params:[h.selectPivotCells.path,h.selectPivotCells.cells]}),h.multiRangeSelectTreeDataValues&&d.push({method:"multiRangeSelectTreeDataValues",params:[h.multiRangeSelectTreeDataValues.path,h.multiRangeSelectTreeDataValues.ranges]}),d)}function Re(e){Te.util=e.data("matrix").util,e.data("q",Te),e.formatter("q-number",ve),e.formatter("q-time",we)}return Re.qBrushHelper=Ve,Re.selections=Ve,Re});
//# sourceMappingURL=picasso-q.js.map
{
"name": "picasso-plugin-q",
"version": "0.21.0",
"version": "0.22.0",
"description": "QIX plugin for picasso.js",

@@ -28,3 +28,3 @@ "license": "MIT",

},
"gitHead": "27a3c98a56269b2f227d06c31367a2932b618eba"
"gitHead": "aa1d3e64613fbe0ba67741316a42fb4375caca3d"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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