@nebula.js/sn-table 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
1
  /*
2
- * @nebula.js/sn-table v2.3.0
2
+ * @nebula.js/sn-table v2.3.1
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["@nebula.js/stardust","react-dom","react"],(function(e){"use strict";var t,r,n,o,i,a,s,l,c,u,d,p,f,m,h,g,v,b,y,x,S,C,w,E,R,O,L,k,A,M,I,T,D,P,_,N,q,$,z,B;return{setters:[function(e){t=e.useMemo,r=e.useEffect,n=e.useTheme,o=e.usePromise,i=e.useState,a=e.useOptions,s=e.onContextMenu,l=e.onTakeSnapshot,c=e.useImperativeHandle,u=e.useElement,d=e.useStaleLayout,p=e.useApp,f=e.useModel,m=e.useInteractionState,h=e.useTranslator,g=e.useSelections,v=e.useKeyboard,b=e.useRect,y=e.useEmbed},function(e){x=e.default,S=e},function(e){C=e.default,w=e.useState,E=e.useMemo,R=e.useEffect,O=e.useContext,L=e.createElement,k=e.useRef,A=e,M=e.Children,I=e.isValidElement,T=e.cloneElement,D=e.createContext,P=e.useCallback,_=e.useReducer,N=e.memo,q=e.forwardRef,$=e.useLayoutEffect,z=e.PureComponent,B=e.useImperativeHandle}],execute:function(){e("default",(function(e){return{qae:{properties:{initial:G},data:U()},ext:qr(e),component:function(){var t,r=u(),n=Br(r),o=d(),i=p(),l=f(),c=m(),x=h(),S=g(),C=v(),w=a().freeResize,E=b(),R=(null===(t=null==o?void 0:o.snapshotData)||void 0===t?void 0:t.content)&&!w?F(F({},E),o.snapshotData.content.size):E,O=AX(o),L=y(),k=Yr(r),A=Fr(o.qHyperCube,l),M=LX(o.qHyperCube,l),I=kX(k,o);!function(){var e=this;null==s||s((function(t,r){r.target&&r.target.closest(".sn-table-cell")&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:function(){return H(e,void 0,void 0,(function(){return W(this,(function(e){return YV(r),[2]}))}))}})}))}(),TX({layout:o,viewService:O,model:l,rootElement:r,contentRect:E}),CX({app:i,layout:o,model:l,rect:R,theme:k,keyboard:C,translator:x,interactions:c,selectionsAPI:S,changeSortOrder:A,rootElement:r,embed:L,reactRoot:n,applyColumnWidths:M,isFontLoaded:I,viewService:O}),OX({env:e,app:i,model:l,rootElement:r,layout:o,interactions:c,translator:x,selectionsAPI:S,theme:k,changeSortOrder:A,keyboard:C,rect:R,embed:L,reactRoot:n,applyColumnWidths:M,isFontLoaded:I,viewService:O})}}}));var F=function(){return F=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},F.apply(this,arguments)};function j(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function H(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function W(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function V(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}const G={version:JSON.stringify("2.3.0"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals",label:"Totals"},usePagination:!1,components:[]};var U=function(){return{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]}};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function X(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var K={};!function(e){(()=>{var t={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,c,u,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=n&&i(n)?n:[]):u=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,u,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{n.r(o),n.d(o,{default:()=>Ie});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},i=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=b(u(n[0],o),m(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(n&&2===n.length){var d=u(n[0],o),p=u(n[1],o),f=m(0),h=m(1),g=b(d,f),v=b(p,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const C={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(i,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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(e)}var R=t().bind(null,!0),O={},L=Array.isArray;function k(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function A(e){return void 0===e}function M(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=A(e[r||t])?i:e[t],e=e[r||t]}})),e}function T(e,t){var r=!0;if(k(e)&&k(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){T(e[n],t[n])||(r=!1)})),r);if(L(e)&&L(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!T(e[n],t[n]))return!1;return!0}return e===t}O.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?R({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);T(i,a)||M(t,o)||(A(a)?n.push({op:"add",path:s,value:i}):k(i)&&k(a)?n=n.concat(O.generate(a,i,s)):L(i)&&L(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&A(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(T(t,o))return n;if(!A(t[0])&&A(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(O.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){A(t[o])&&!M(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},O.apply=function(e,t){t.forEach((function(t){var r,n,o=I(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(L(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(L(a)&&L(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return w(e)}(n=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(k(a)&&k(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!M(r,e)&&delete r[e]})),R(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var u=I(e,t.from);L(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(L(o)?o.splice(+i,1):delete o[i])}))},O.clone=function(e){return R({},e)},O.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},O.updateObject=function(e,t){Object.keys(e).length?O.apply(e,O.generate(e,t)):R(e,t)};const D=O,P=function(e,r,n){if(!e)return Promise.resolve();var o=D.generate(r,n);return t()(!0,r,n),o&&o.length?(o=o.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(o,!0)):Promise.resolve()};var _="accumulation";function N(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===_)return r[n]}function q(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===_)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const z={translationKey:"properties.modifier.accumulation",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=C.getNumStepComp(r,l),p=C.getAboveComp(r,l,u,d),f=C.getRangeComp("RangeSum",p);if(C.needDimension({modifier:r,properties:n,layout:o})){var m=C.getDimComp(c,1),h=C.getDimComp(c,0),g=C.getAggrComp(f,m,h);f=r.showExcludedValues?C.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(q(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(q(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(q(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(q(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=N(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=N(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(q(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(_))return!1;var i=N(t,e);return i&&!i.disabled}};return r}};var B="movingAverage";function F(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===B)return r[n]}function j(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===B)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var c=s;void 0===c&&(c=C.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=C.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=C.getNumStepComp(n,c),m=C.getAboveComp(n,c,p,f);if(n.nullSuppression)t=C.getRangeComp("RangeAvg",m);else{var h=C.getRangeComp("RangeSum",m),g=function(e,t){var r=C.getRowNoComp(e,t);if(!C.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,c);t="".concat(h," / ").concat(g)}var v=t;if(C.needDimension({modifier:n,properties:o,layout:a})){var b=C.getDimComp(u,1),y=C.getDimComp(u,0),x=C.getAggrComp(v,b,y);v=n.showExcludedValues?C.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=F(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=F(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=F(t,e);return i&&!i.disabled}};return r}};var V="timeSeriesDecomposition";function G(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function U(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const X={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?C.generateTSDExpression(r,t,n):t},extractInputExpression:C.extractInputExpression,initModifier:function(e,t){C.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=C.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=G(t,e);if(n){var o=n.steps;n.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e})),e}))}},show:function(t){var r=G(t,e);return r&&!r.fullRange}}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;var i=G(t,e);return i&&!i.disabled}};return r}};var K="difference";function Z(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===K)return r[n]}function J(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===K)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:C.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=C.getAboveComp(r,l,u),p="".concat(u," - ").concat(d);if(C.needDimension({modifier:r,properties:n,layout:o})){var f=C.getDimComp(c,1),m=C.getDimComp(c,0),h=C.getAggrComp(p,f,m);p=r.showExcludedValues?C.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(J(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(J(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(J(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(K))return!1;var i=Z(t,e);return i&&!i.disabled}};return r}};var te="normalization";function re(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function oe(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(C.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,r){return 0===e&&t>1?"<".concat(C.getDimDefWithWrapper(r),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:C.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ae(t),l=se(t,r,n),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=C.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach((function(t){void 0===e[t]&&(e[t]=ie[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=re(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,he)?he:me},getLibraryId:function(e){return i(e,he)||i(e,me)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",be="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",Ce="qDef.qLabelExpression",we="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Re="qDef.qAggrFunc",Oe="qDef.base.qAggrFunc",Le={initBase:function(e,t){(t||Le.isValid(e))&&(r(e,be,i(e,ve)),r(e,xe,i(e,ye)),r(e,we,i(e,Se)),r(e,Ee,i(e,Ce)))},restoreBase:function(e){Le.isValid(e)&&(r(e,ve,i(e,be)),r(e,ye,i(e,xe)),r(e,Se,i(e,we)),r(e,Ce,i(e,Ee)),i(e,Re)&&i(e,Oe)&&r(e,Re,i(e,Oe)),delete e.qDef.base)},isValid:function(e){var t=i(e,be),r=i(e,xe);return void 0!==t||void 0!==r}};const ke=Le;function Ae(e){return Ae="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},Ae(e)}var Me={accumulation:z,movingAverage:W,difference:ee,normalization:ue,timeSeriesDecomposition:X};const Ie={modifiers:Me,apply:De,applyModifiers:Pe,cleanUpMeasure:_e,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:Ne,getActiveModifier:qe,initBase:ke.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Me[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Me[e]&&Me[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Be(e);Ue({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Je({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:$e};var Te={};function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;Te[r.id]=Te[r.id]||{isFirstTime:!0};var c=Te[r.id].isFirstTime;if(Te[r.id].isFirstTime=!1,n&&"object"===Ae(n))return Pe({model:r,properties:n});var u=r?r.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=Te[r.id].lastReloadTime;if(Te[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var m=function(e){var t=e.measures,r=e.layout,n=e.model,o=e.lastReloadTime;return i(n,"app.layout.qLastReloadTime")!==o&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ge({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:u,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:Be(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);je(n);var o=Qe(n);return Ye({model:r}).then((function(t){return Xe({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===Ae(e)&&!e.disabled){if(r++,"object"!==Ae(Me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Me[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&We(t)&&C.simplifyExpression(t.qDef.base.qDef)!==C.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Pe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===Ae(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=Qe(n);return et({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return ze(n).forEach((function(e){return _e(e)})),Ze({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function Pe(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},o):o),je(o);var p=Qe(o);return et({model:r,libraryIds:p,masterItem:c}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=ze(n)),!r.length)return Promise.resolve();if(!Ne({measures:r,properties:n}))return r.forEach((function(e){return _e(e)})),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:o,dimensionAndFieldList:s}).then((function(e){return Xe({libraryIds:l,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;ke.isValid(r)||ke.initBase(r,!0);var l=r.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===Ae(e)&&!e.disabled){if(s++,"object"!==Ae(Me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Me[e.type].initModifier(e,r);var l=r.qLibraryId||u&&u.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Me[n.type].generateExpression({expression:s,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Me[n.type].updateModifier&&Me[n.type].updateModifier(n,o.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Me[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||$e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&$e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:o,dimensionAndFieldList:e}),He(r)):_e(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Ze({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function _e(e){!function(e){var t=Be(e);return Array.isArray(t)&&t.some((function(e){return"object"===Ae(e)&&!e.disabled&&!Me[e.type]}))}(e)?ke.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({modifiers:Be(e),properties:r,layout:n})}))}function qe(e){var t=Be(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Me[n.type]&&!n.disabled)return n}}function $e(e){var t=qe(e);return!t||Me[t.type].enableTotalsFunction(e)}function ze(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Be(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Fe(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function je(e){ze(e).forEach((function(e){return function(e){var r=qe(e);r&&(void 0!==r.outputExpression&&Fe(r)!==e.qDef.qDef?delete e.qDef.base:!ke.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function He(e){var t=Be(e);Array.isArray(t)&&t.forEach((function(t){"object"===Ae(t)&&(t.disabled||!Me[t.type]&&Fe(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function We(e){return e.base||e.qDef&&e.qDef.base}function Ve(e){var t=We(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,r=e.properties,n=e.layout;return!Ve(t)&&Ue({modifiers:Be(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==Ae(e)||e.disabled||!Me[e.type])&&(void 0===o[e.type]&&(o[e.type]=Me[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Xe(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ze(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Ke)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),Ke)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ke)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ke);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):P(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Je(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===Ae(e)&&!e.disabled&&Me[e.type]&&Me[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Qe(e){var t=ze(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Be(t);if(Ue({modifiers:n,properties:e})){var i=Ve(t);i&&r.push(i),o=o||Je({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i(e,r)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function u(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(u(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return De({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Te[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),e.default=o.default,Object.defineProperty(e,"__esModule",{value:!0})})()}(K);var Z,J,Q,ee,te,re,ne=Y(K);!function(e){e.SELECTED="selected",e.POSSIBLE="possible",e.EXCLUDED="excluded",e.INACTIVE="inactive"}(Z||(Z={})),function(e){e.SELECT="select",e.SELECT_MOUSE_DOWN="selectMouseDown",e.SELECT_MOUSE_UP="selectMouseUp",e.SELECT_MULTI_ADD="selectMultiAdd",e.SELECT_MULTI_END="selectMultiEnd",e.RESET="reset",e.CLEAR="clear",e.UPDATE_PAGE_ROWS="updatePageRows"}(J||(J={})),function(e){e.ENTER="Enter",e.SPACE=" ",e.ESC="Escape",e.TAB="Tab",e.SHIFT="Shift",e.LEFT="ArrowLeft",e.RIGHT="ArrowRight",e.UP="ArrowUp",e.DOWN="ArrowDown",e.C="c"}(Q||(Q={})),function(e){e.FOCUS="focus",e.FOCUS_BUTTON="focusButton",e.BLUR="blur",e.ADD_TAB="addTab",e.REMOVE_TAB="removeTab"}(ee||(ee={})),function(e){e.A="ascending",e.D="descending"}(te||(te={})),function(e){e.PIXELS="pixels",e.PERCENTAGE="percentage",e.FIT_TO_CONTENT="fitToContent",e.AUTO="auto"}(re||(re={}));var oe=120,ie=24,ae=[0,0],se=[1,0];const le={textAlignAuto:{ref:"qDef.textAlign.auto",type:"boolean",component:"switch",translation:"Common.Text.TextAlignment",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},textAlign:{ref:"qDef.textAlign.align",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:e=>void 0!==e.qDef.textAlign&&!e.qDef.textAlign.auto}},ce=e=>{var t,r,n,o,i,a;return{type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!ne.hasActiveModifiers({measures:[e],properties:t.properties})||ne.ifEnableTotalsFunction(e)?[{value:"Expr",translation:"Common.Auto"}]:[]).concat([{value:"Avg",translation:"Object.Table.AggrFunc.Avg"},{value:"Count",translation:"Object.Table.AggrFunc.Count"},{value:"Max",translation:"Object.Table.AggrFunc.Max"},{value:"Min",translation:"Object.Table.AggrFunc.Min"},{value:"Sum",translation:"Object.Table.AggrFunc.Sum"},{value:"None",translation:"Object.Table.AggrFunc.None"}]),defaultValue:null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(r=t.sense)&&void 0!==r&&null!==(n=r.isUnsupportedFeature)&&void 0!==n&&n.call(r,"totals")?"None":"Expr"}}}},show:!(null!=e&&null!==(o=e.anything)&&void 0!==o&&null!==(i=o.sense)&&void 0!==i&&null!==(a=i.isUnsupportedFeature)&&void 0!==a&&a.call(i,"totals"))}},ue={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:re.AUTO,translation:"Common.Auto"},{value:re.FIT_TO_CONTENT,translation:"Object.Table.Column.FitToContent"},{value:re.PIXELS,translation:"Object.Table.Column.Pixels"},{value:re.PERCENTAGE,translation:"Object.Table.Column.Percentage"}],defaultValue:re.AUTO},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:200,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===re.PIXELS},change(e){e.qDef.columnWidth.pixels=void 0===e.qDef.columnWidth.pixels?e.qDef.columnWidth.pixels:Math.max(1,Math.min(7680,e.qDef.columnWidth.pixels))}},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:20,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===re.PERCENTAGE},change(e){e.qDef.columnWidth.percentage=void 0===e.qDef.columnWidth.percentage?e.qDef.columnWidth.percentage:Math.max(1,Math.min(100,e.qDef.columnWidth.percentage))}}},de={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},tableCellColoring:{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"}]},...le,...ue},pe={libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}},fe=e=>({libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:ce(e)}),me=e=>e.flags.isEnabled("PS_18291_TABLE_EXPLORATION")?{type:"items",translation:"Common.Data",component:"data-assets-panel",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:pe},presentation:{type:"items",translation:"properties.presentation",items:de}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:fe(e)},presentation:{type:"items",translation:"properties.presentation",items:de}}}}}:{type:"items",component:"columns",translation:"Common.Data",sortIndexRef:"qHyperCubeDef.qColumnOrder",allowMove:!0,allowAdd:!0,addTranslation:"Common.Columns",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",grouped:!0,items:{...pe,...de}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",grouped:!0,items:{...fe(e),...de}}}},he={type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,defaultValue:[],items:{headerSection:{translation:"properties.Header",component:"panel-section",items:{headerFontItem:{component:"items",ref:"components",key:"theme",items:{headerFontWrapper:{component:"inline-wrapper",items:{headerFontSize:{component:"integer",ref:"header.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return parseInt(null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.header)||void 0===a?void 0:a.fontSize)&&void 0!==n?n:s.fontSize,10)},change(e){e.header.fontSize=e.header.fontSize?Math.max(5,Math.min(300,Math.floor(e.header.fontSize))):e.header.fontSize}},headerFontColor:{show:!0,ref:"header.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return{color:null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.header)||void 0===a?void 0:a.color)&&void 0!==n?n:s.color}},dualOutput:!0}}}}}}},contentSection:{component:"panel-section",translation:"properties.Content",items:{contentFontItem:{component:"items",ref:"components",key:"theme",items:{contentFontWrapper:{component:"inline-wrapper",items:{contentFontSize:{component:"integer",ref:"content.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return parseInt(null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.fontSize)&&void 0!==n?n:s.fontSize,10)},change(e){e.content.fontSize=e.content.fontSize?Math.max(5,Math.min(300,Math.floor(e.content.fontSize))):e.content.fontSize}},contentFontColor:{ref:"content.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return{color:null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.color)&&void 0!==n?n:s.color}},dualOutput:!0}}}}}}},hoverEffectSection:{translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{hoverEffectSwitch:{ref:"content.hoverEffect",translation:"ThemeStyleEditor.style.hoverEffect",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},hoverEffectColorItem:{show(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}}}}]},ge=e=>{var t,r,n;return{type:"items",items:[{ref:"totals.show",type:"boolean",translation:"properties.totals",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},{ref:"totals.position",translation:"Common.Position",type:"string",component:"dropdown",options:[{value:"noTotals",translation:"Common.None"},{value:"top",translation:"Common.Top"},{value:"bottom",translation:"Common.Bottom"}],defaultValue:"noTotals",show:e=>!e.totals.show},{ref:"totals.label",translation:"properties.totals.label",type:"string",expression:"optional",defaultValue:()=>e.translator.get("Object.Table.Totals")}],show:!(null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(r=t.sense)&&void 0!==r&&null!==(n=r.isUnsupportedFeature)&&void 0!==n&&n.call(r,"totals"))}},ve=e=>e.flags.isEnabled("PS_18291_TABLE_EXPLORATION")&&{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}},be=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[he,ge(e),{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1}]},...ve(e)}}),ye={uses:"sorting"},xe={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},Se=e=>({type:"items",component:"accordion",items:{data:me(e),sorting:ye,addOns:xe,settings:be(e)}});function Ce(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function we(e,t){let r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function Ee(e){return e>0?0:1}function Re(e){return e.translator.get("Visualizations.Descriptions.Column")}function Oe(e){return{measures:{min:Ee,max:1e3,description:()=>Re(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;Ce(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties;we(o,(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n)}},dimensions:{min:Ee,max:1e3,description:()=>Re(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return Ce(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(null!=e&&e.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;we(o,n)}}}}var Le={exports:{}};window,Le.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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="/conversion/",r(r.s=2)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=u(d,r),d!==(o=u(t,r))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},c(d,{name:r,newValue:e(m,a,o)})):void 0!==o&&c(d,{name:r,newValue:o}));return d}},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=u(d,r),d!==(o=u(t,r))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},c(d,{name:r,newValue:e(m,a,o)})):void 0!==o&&c(d,{name:r,newValue:o}));return d}},function(e,t,r){r.r(t);var n=r(0),o=r.n(n),i=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},a=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function b(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=v(u(n[0],o),m(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(n&&2===n.length){var d=u(n[0],o),p=u(n[1],o),f=m(0),h=m(1),g=v(d,f),b=v(p,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function y(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var S={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!r.showExcludedValues)return a;var s=b({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:y,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return y(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=x({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function C(e){return(C="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 w=o.a.bind(null,!0),E={},R=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function L(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=L(e[r||t])?i:e[t],e=e[r||t]}})),e}function M(e,t){var r=!0;if(O(e)&&O(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){M(e[n],t[n])||(r=!1)})),r);if(R(e)&&R(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!M(e[n],t[n]))return!1;return!0}return e===t}E.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?w({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);M(i,a)||k(t,o)||(L(a)?n.push({op:"add",path:s,value:i}):O(i)&&O(a)?n=n.concat(E.generate(a,i,s)):R(i)&&R(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&L(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(M(t,o))return n;if(!L(t[0])&&L(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(E.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){L(t[o])&&!k(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},E.apply=function(e,t){t.forEach((function(t){var r,n=A(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?n[o]:n[+o]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(R(n))"-"===o&&(o=n.length),n.splice(+o,"add"===t.op?0:1,t.value);else if(R(i)&&R(t.value)){var s,l=t.value.slice();i.length=0,(s=i).push.apply(s,function(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")}()}(l))}else if(O(i)&&O(t.value))r=i,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!k(r,e)&&delete r[e]})),w(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[o]=t.value}else if("move"===t.op){var c=A(e,t.from);R(n)?n.splice(+o,0,c.splice(+a,1)[0]):(n[o]=c[a],delete c[a])}else"remove"===t.op&&(R(n)?n.splice(+o,1):delete n[o])}))},E.clone=function(e){return w({},e)},E.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},E.updateObject=function(e,t){Object.keys(e).length?E.apply(e,E.generate(e,t)):w(e,t)};var I=E,T=function(e,t,r){if(!e)return Promise.resolve();var n=I.generate(t,r);return o()(!0,t,r),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(n,!0)):Promise.resolve()},D="accumulation";function P(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===D)return r[n]}function _(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===D)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var N={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},q={translationKey:"properties.modifier.accumulation",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=i;void 0===l&&(l=S.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=S.getNumStepComp(r,l),p=S.getAboveComp(r,l,u,d),f=S.getRangeComp("RangeSum",p);if(S.needDimension({modifier:r,properties:n,layout:o})){var m=S.getDimComp(c,1),h=S.getDimComp(c,0),g=S.getAggrComp(f,m,h);f=r.showExcludedValues?S.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:S.extractInputExpression,initModifier:function(e){S.initModifier(e,N)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=P(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=P(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(D))return!1;var i=P(t,e);return i&&!i.disabled}};return r}},$="movingAverage";function z(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===$)return r[n]}function B(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===$)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},j={translationKey:"properties.modifier.movingAverage",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,i=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var c=s;void 0===c&&(c=S.getNumDimensions({properties:o,layout:i}));var u=a(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=S.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=S.getNumStepComp(n,c),m=S.getAboveComp(n,c,p,f);if(n.nullSuppression)t=S.getRangeComp("RangeAvg",m);else{var h=S.getRangeComp("RangeSum",m),g=function(e,t){var r=S.getRowNoComp(e,t);if(!S.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,c);t="".concat(h," / ").concat(g)}var v=t;if(S.needDimension({modifier:n,properties:o,layout:i})){var b=S.getDimComp(u,1),y=S.getDimComp(u,0),x=S.getAggrComp(v,b,y);v=n.showExcludedValues?S.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:S.extractInputExpression,initModifier:function(e){S.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=z(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=z(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf($))return!1;var i=z(t,e);return i&&!i.disabled}};return r}},H="difference";function W(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===H)return r[n]}function V(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===H)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},U={translationKey:"properties.modifier.difference",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:S.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=i;void 0===l&&(l=S.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=S.getAboveComp(r,l,u),p="".concat(u," - ").concat(d);if(S.needDimension({modifier:r,properties:n,layout:o})){var f=S.getDimComp(c,1),m=S.getDimComp(c,0),h=S.getAggrComp(p,f,m);p=r.showExcludedValues?S.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(G).forEach((function(t){void 0===e[t]&&(e[t]=G[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(H))return!1;var i=W(t,e);return i&&!i.disabled}};return r}},Y={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},X={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},K="normalization";function Z(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===K)return r[n]}function J(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===K)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function Q(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function ee(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:X.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:X.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:X.DISREGARD_ALL_DIMENSIONS,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=Q(t,0);t.splice(n,1)}return t}(o,i),function(e,t,r){if(0===e){var n=Q(t,1);t.splice(n,1)}return t}(Z(e,n).selectionScope,i)}function te(e,t,r){var n=[{value:Y.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:Y.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:Y.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Q(t,0);t.splice(n,1)}return t}(Z(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:X.DISREGARD_ALL_DIMENSIONS,selectionScope:Y.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function oe(e,t,r){return 1===e?"{$<".concat(S.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(S.getDimDefWithWrapper(r),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:S.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=i;void 0===l&&(l=S.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ne(t),l=oe(t,r,n),c=""===s&&""===l?"":s||l,u=ie(o,i),d=ae(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=S.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(J(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.DISREGARD_SELECTION,options:function(r){return te(r,t,e)}},field:{refFn:function(t){return"".concat(J(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===Y.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(J(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===Y.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(J(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return ee(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(J(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return(Z(t,e).dimensionalScope||0)===X.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(K))return!1;var i=Z(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ne,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(i(e,"qDef.base.qDef",a(e,"qDef.qDef")),i(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),i(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),i(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(i(e,"qDef.qDef",a(e,"qDef.base.qDef")),i(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),i(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),i(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&i(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),r=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},ue=ce;function de(e){return(de="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 pe={accumulation:q,movingAverage:j,difference:U,normalization:se},fe=(t.default={modifiers:pe,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ve,getActiveModifier:be,initBase:ue.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return pe[e]&&pe[e].isApplicable({properties:r,layout:n})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Se(e);ke({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||De({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:ye},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,i=void 0!==n&&n,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,r&&"object"===de(r))return he({model:t,properties:r});var c=t?t.layout:void 0,u=a(c,"qSelectionInfo.qInSelections");if(i||u)return Promise.resolve(!1);var d=a(c,"qHyperCube.qMeasureInfo"),p=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ve({measures:d,layout:c})){var f=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Le({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:d,layout:c,model:t,lastReloadTime:p});return f||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return ke({modifiers:Se(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=o()(!0,{},e);we(r);var n=Pe(r);return Ae({model:t}).then((function(o){return Me({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Le({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===de(e)&&!e.disabled){if(r++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Re(t)&&S.simplifyExpression(t.qDef.base.qDef)!==S.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Pe(r);return _e({model:t,libraryIds:n}).then((function(){var e=o()(!0,{},r);return xe(r).forEach((function(e){return ge(e)})),Te({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,r=e.oldProperties,n=e.properties,i=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?o()(!0,{},n):n),we(n);var p=Pe(n);return _e({model:t,libraryIds:p,masterItem:c}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(r)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=i?void 0:Pe(r);return Ae({model:n,dimensionAndFieldList:s}).then((function(e){return Me({libraryIds:l,model:n,libraryItemsProps:i}).then((function(n){t.forEach((function(t){ke({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;ue.isValid(t)||ue.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");pe[e.type].initModifier(e);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=pe[r.type].generateExpression({expression:s,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=l,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,r.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:i}):function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList;"function"==typeof pe[r.type].updateModifier&&pe[r.type].updateModifier(r,n.qHyperCubeDef);var a=le.getExpression(t),s=pe[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:i}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||ye(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ye(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:r,libraryItemsProps:n,dimensionAndFieldList:e}),Ee(t)):ge(t)}))}))}))}({measures:i,properties:n,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Te({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=Se(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!pe[e.type]}))}(e)?ue.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ee(e)}function ve(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return ke({modifiers:Se(e),properties:r,layout:n})}))}function be(e){var t=Se(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(pe[n.type]&&!n.disabled)return n}}function ye(e){var t=be(e);return!t||pe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Se(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function we(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&Ce(t)!==e.qDef.qDef?delete e.qDef.base:!ue.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function Ee(e){var t=Se(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!pe[t.type]&&Ce(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Re(e){return e.base||e.qDef&&e.qDef.base}function Oe(e){var t=Re(e);return e.qLibraryId||t&&t.qLibraryId}function Le(e){var t=e.measure,r=e.properties,n=e.layout;return!Oe(t)&&ke({modifiers:Se(t),properties:r,layout:n})}function ke(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=pe[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ae(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Me(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ie(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Te(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qMeasures"),Ie)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&a(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):T(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function De(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&pe[e.type]&&pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Pe(e){var t=xe(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Se(t);if(ke({modifiers:n,properties:e})){var i=Oe(t);i&&r.push(i),o=o||De({modifiers:n,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function _e(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},i={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=a(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=a(e,r)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function u(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),i={},t.forEach((function(e){i[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:a}),Object.keys(n).forEach((function(e){o[e]||i[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(u(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},function(e,t,r){function n(e){var t=function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}(e%62),r=Math.floor(e/62);return r>0?n(r)+t:t}function o(e){return(o="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)}r.r(t);var i={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(""!==a){if(void 0===o[a]||null===o[a])return r;o=o[a]}}return o},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return n(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var o=e.indexOf(t[n]);if(r>o)return!1;r=o}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:u},p=r(1),f=r.n(p),m={addDimensions:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.dimensions).push.apply(t,a(n.qDimensions));var s,l=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.measures).push.apply(t,l(n.qMeasures));var a,s=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var o=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,n.interColumnSortOrder)&&(n.interColumnSortOrder=o.concat())},copyProperties:function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!i.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,r){var n,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(n=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(n)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var g=r(0),v=r.n(g);function b(e,t){var r=v()(!0,{},t,e);return i.getValue(r,"qOtherTotalSpec.qOtherCounted")||i.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(r,"qOtherTotalSpec.qOtherLimit")||i.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function y(e,t){return v()(!0,{},t,e)}function x(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var S=Math.pow(2,53)-1;function C(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var O={importCommonProperties:function(e,t,r){var n="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(r,"qInfo.qType");i.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},copyPropertyIfExist:function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},copyPropertyOrSetDefault:function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,r=e.exportFormat,n=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=b(s.dimensions[t],a);i.qDimensions.length<n?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=b(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},addMeasures:function(e){var t,r=e.exportFormat,n=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=y(s.measures[t],a);i.qMeasures.length<n?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=y(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,o=t.data[0],i=n.dimensions||{max:0},a=n.measures||{max:0},s=x(a.max,o.dimensions.length,S),l=x(a.min,o.dimensions.length,0);return{maxDimensions:x(i.max,s,S),minDimensions:x(i.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var i=r.qInterColumnSortOrder.length;if(i!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(r.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(r.qInterColumnSortOrder,i))},createNewProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=v()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?i.setValue(o,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=v()(!0,{},r,o)).components&&(o.components=[]),o},shouldInitLayoutExclude:function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!r&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var o=i.getValue(t,n||"").qHyperCubeDef,a=C(o.qDimensions);o.qDimensions=[],a.forEach((function(e){o.qDimensions.push(e),r.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var o=i.getValue(t,n||"").qHyperCubeDef,a=E(o.qMeasures);o.qMeasures=[],a.forEach((function(e){o.qMeasures.push(e),r.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function L(e,t){var r=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){i.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var k={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:l}),m.addMeasures({exportFormat:o,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),r&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:o,properties:a}),n||m.storeMeasuresModifiers(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(h(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(h(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(h(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=O.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:c}),v=i.getValue(n,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=O.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,C=y.maxMeasures,w=y.minMeasures,E=l.defaultDimension,R=void 0===E?O.getDefaultDimension():E,k=l.defaultMeasure,A=void 0===k?O.getDefaultMeasure():k;b.qDimensions.length=0,b.qMeasures.length=0,O.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:C,minMeasures:w})&&O.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:C,minMeasures:w,newHyperCubeDef:b}),O.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:b,defaultDimension:R}),O.addMeasures({exportFormat:t,maxMeasures:C,minMeasures:w,newHyperCubeDef:b,defaultMeasure:A}),O.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),O.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),O.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),O.copyPropertyIfExist("qMaxStackedCells",v,b),O.copyPropertyIfExist("qNoOfLeftDims",v,b),O.copyPropertyOrSetDefault("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),O.copyPropertyOrSetDefault("qMode",v,b,"S"),O.copyPropertyOrSetDefault("qReductionMode",v,b,"N"),O.copyPropertyOrSetDefault("qSortbyYValue",v,b),O.copyPropertyOrSetDefault("qIndentMode",v,b),O.copyPropertyOrSetDefault("qShowTotalsAbove",v,b),O.importCommonProperties(g,t,n),h.qProperty=g;var M=i.getValue(u||{},"support.modifiers");return O.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:M}),p&&L(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&L(h.qProperty,"dynamicScript"),h}},A={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function M(e,t,r,n){t=t||[];var o=u(e,n,r),i=u(t,n,r);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function I(e,t){return e.length!==t}var T={create:function(e,t){if(!e||!A[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,o){r=r||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][r],s=t.length;if(M(a,t,n,o),I(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},D={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},P={colorModeOptions:{primary:function(){return!0},dimension:function(e){return D.getNumDimensions(e)>0&&D.getNumMeasures(e)<=1},multiColor:function(e){return D.getNumMeasures(e)>1},measure:function(e){return D.getNumDimensions(e)>0},expression:function(e){return D.getNumMeasures(e)>=1}}},_={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return D.getNumMeasures(e)>=1}}},N={scatterplot:_,"sn-scatter-plot":_,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return D.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return D.getNumDimensions(e)>1},multiColor:function(e){return D.getNumMeasures(e)>1},measure:function(e){return D.getNumDimensions(e)<=1},expression:function(e){return D.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return D.getNumDimensions(e)>=1},multiColor:function(e){return D.getNumMeasures(e)>1},measure:function(e){return D.getNumDimensions(e)>=1},expression:function(e){return D.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return D.getNumDimensions(e)>=1}}}};function q(e,t,r){if(Array.isArray(e[t])){var n=d.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function $(e,t){var r=T.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){q(e,"qAttributeDimensions",r),q(e,"qAttributeExpressions",r)})),t.forEach((function(e){q(e,"qAttributeDimensions",r),q(e,"qAttributeExpressions",r)}))}function z(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function B(e){var t=e.properties,r=e.isDimension,n=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;$(n,o);var l=n[n.length-1];if(l){var c=r?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),u=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=T.create(T.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,o?t.qDef=n.key:(t.qExpression=n.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:r,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;o||(t.matchMeasure=d.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=a)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:c,isDimension:r,qNumFormat:u,isCustomFormatted:p})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function F(e,t,r,n){var o,i,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(o=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(r,t))?(s.type="measure",s.name=o,s.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n))&&(s.expression=i)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var j={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function H(e,t,r,n){var o=r?"expression":t.type,i=e.color,a=i.mode,s=D.getItemLabel(t);switch(z(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||D.wrapFieldName(t.name),key:D.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:r||s,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&j.useMasterNumberFormat(i.formatting)}n||(i.auto=!1,i.mode=a)}function W(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=i.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],o=T.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",o);return H(e,F("dimension",!!a,a||n)),!!a}function V(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&z(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var o=F("dimension",!1,r[n.activeDimensionIndex]);o.activeDimensionIndex=n.activeDimensionIndex,H(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;B({properties:e,isDimension:!0,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byDimDef.label")})}function G(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&z(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qMeasures"),[]),n=i.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var o=F("measure",!1,r[n.activeMeasureIndex],!0);o.activeMeasureIndex=n.activeMeasureIndex,H(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=r[r.length-1],a=T.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return H(e,F("measure",!!s,s||n[0])),!!s}(e,t))return;B({properties:e,isDimension:!1,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byMeasureDef.label")})}var U={changeProperty:function(e,t,r){i.setValue(e,t,r),i.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:i.getValue(e,t),to:r})}(e,t,r)},getCanColorBy:function(e,t){var r={primary:!0};if(e){var n=(N[t]||P).colorModeOptions||P.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},shouldUpdateColorBy:function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,o=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!o.length))},updateColorBy:function(e,t){var r=i.getValue(e,"color.mode"),n=i.getValue(e,"color.auto"),o=i.getValue(e,"".concat(t,"qDimensions"),[]),a=i.getValue(e,"".concat(t,"qMeasures"),[]),s=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);n?$(o,s):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}({auto:n,colorMode:r,dimensions:o})?V(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!o.length)}({auto:n,colorMode:r,dimensions:o,measures:a,properties:e})?G(e,t):function(e,t){var r=i.getValue(e,"color.mode"),n=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&o.length<2&&i.setValue(e,"color.mode","primary"),$(n,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=i.getValue(r,"qHyperCubeDef.qMeasures",[]),o=i.getValue(r,"color.mode","");return!t&&"byExpression"===o&&n.length>0},addColorByExpression:function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),r=i.getValue(e,"color.persistent",!1);return t.length>1&&!r}},Y={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=k.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=T.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return T.moveByIdFromGroup(a,[],"qAttributeDimensions",c),T.moveByIdFromGroup(a,[],"qAttributeExpressions",c),T.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=k.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),m=i.getValue(d,"color.mode",""),h=i.getValue(d,"color.auto",""),g=U.getCanColorBy(d,p),v=U.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?U.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:d})&&U.addColorByExpression(d):U.switchToAutoColor(d),v&&U.updateColorBy(d,"qHyperCubeDef."),U.shouldSwitchToColorPersistent(d)&&U.changeProperty(d,"color.persistent",!0),U.deleteTotalMode(f),u}},X=["bar","marker","line"],K={handleAutoMinMax:function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?L(r,"unsupportedAutoMinMax")||v()(r.measureAxis,t.measureAxis):L(r,"supportedAutoMinMax")||v()(r.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,r=e.exportFormat,n=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),X.includes(n)&&t[o].type[n]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&v()(s,r.properties.measureAxes[t[0].axis])):v()(s,r.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}}},Z={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=Y.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return i?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=Y.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return K.handleAutoMinMax({initialProperties:r,properties:d}),K.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:d,measureType:a}),K.setInterColumnSortOrder(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function J(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Q(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=J(r,n,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}function ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=J(r,n,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:k,colorChart:Y,axisChart:Z,quarantineProperty:h,unquarantineProperty:L,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}]);var ke=Y(Le.exports);function Ae(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Me(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ie(){}var Te=1/.7,De="\\s*([+-]?\\d+)\\s*",Pe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ne=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[De,De,De]+"\\)$"),$e=new RegExp("^rgb\\("+[_e,_e,_e]+"\\)$"),ze=new RegExp("^rgba\\("+[De,De,De,Pe]+"\\)$"),Be=new RegExp("^rgba\\("+[_e,_e,_e,Pe]+"\\)$"),Fe=new RegExp("^hsl\\("+[Pe,_e,_e]+"\\)$"),je=new RegExp("^hsla\\("+[Pe,_e,_e,Pe]+"\\)$"),He={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function We(){return this.rgb().formatHex()}function Ve(){return this.rgb().formatRgb()}function Ge(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ne.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ue(t):3===r?new Ke(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ye(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ye(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qe.exec(e))?new Ke(t[1],t[2],t[3],1):(t=$e.exec(e))?new Ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ze.exec(e))?Ye(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Ye(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fe.exec(e))?et(t[1],t[2]/100,t[3]/100,1):(t=je.exec(e))?et(t[1],t[2]/100,t[3]/100,t[4]):He.hasOwnProperty(e)?Ue(He[e]):"transparent"===e?new Ke(NaN,NaN,NaN,0):null}function Ue(e){return new Ke(e>>16&255,e>>8&255,255&e,1)}function Ye(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ke(e,t,r,n)}function Xe(e,t,r,n){return 1===arguments.length?function(e){return e instanceof Ie||(e=Ge(e)),e?new Ke((e=e.rgb()).r,e.g,e.b,e.opacity):new Ke}(e):new Ke(e,t,r,null==n?1:n)}function Ke(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ze(){return"#"+Qe(this.r)+Qe(this.g)+Qe(this.b)}function Je(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Qe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function et(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new rt(e,t,r,n)}function tt(e){if(e instanceof rt)return new rt(e.h,e.s,e.l,e.opacity);if(e instanceof Ie||(e=Ge(e)),!e)return new rt;if(e instanceof rt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new rt(a,s,l,e.opacity)}function rt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function nt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function ot(e){return function(){return e}}function it(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):ot(isNaN(e)?t:e)}function at(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function st(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function lt(){}Ae(Ie,Ge,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:We,formatHex:We,formatHsl:function(){return tt(this).formatHsl()},formatRgb:Ve,toString:Ve}),Ae(Ke,Xe,Me(Ie,{brighter:function(e){return e=null==e?Te:Math.pow(Te,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ze,formatHex:Ze,formatRgb:Je,toString:Je})),Ae(rt,(function(e,t,r,n){return 1===arguments.length?tt(e):new rt(e,t,r,null==n?1:n)}),Me(Ie,{brighter:function(e){return e=null==e?Te:Math.pow(Te,e),new rt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new rt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Ke(nt(e>=240?e-240:e+120,o,n),nt(e,o,n),nt(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}})),function e(t){var r=function(e){return 1==(e=+e)?it:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):ot(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Xe(e)).r,(t=Xe(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=it(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var ct=1/.7,ut="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ft=/^#([0-9a-f]{3,8})$/,mt=new RegExp(`^rgb\\(${ut},${ut},${ut}\\)$`),ht=new RegExp(`^rgb\\(${pt},${pt},${pt}\\)$`),gt=new RegExp(`^rgba\\(${ut},${ut},${ut},${dt}\\)$`),vt=new RegExp(`^rgba\\(${pt},${pt},${pt},${dt}\\)$`),bt=new RegExp(`^hsl\\(${dt},${pt},${pt}\\)$`),yt=new RegExp(`^hsla\\(${dt},${pt},${pt},${dt}\\)$`),xt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function St(){return this.rgb().formatHex()}function Ct(){return this.rgb().formatRgb()}function wt(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ft.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Et(t):3===r?new Lt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Rt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Rt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mt.exec(e))?new Lt(t[1],t[2],t[3],1):(t=ht.exec(e))?new Lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gt.exec(e))?Rt(t[1],t[2],t[3],t[4]):(t=vt.exec(e))?Rt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=bt.exec(e))?Dt(t[1],t[2]/100,t[3]/100,1):(t=yt.exec(e))?Dt(t[1],t[2]/100,t[3]/100,t[4]):xt.hasOwnProperty(e)?Et(xt[e]):"transparent"===e?new Lt(NaN,NaN,NaN,0):null}function Et(e){return new Lt(e>>16&255,e>>8&255,255&e,1)}function Rt(e,t,r,n){return n<=0&&(e=t=r=NaN),new Lt(e,t,r,n)}function Ot(e){return e instanceof lt||(e=wt(e)),e?new Lt((e=e.rgb()).r,e.g,e.b,e.opacity):new Lt}function Lt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function kt(){return`#${Tt(this.r)}${Tt(this.g)}${Tt(this.b)}`}function At(){const e=Mt(this.opacity);return`${1===e?"rgb(":"rgba("}${It(this.r)}, ${It(this.g)}, ${It(this.b)}${1===e?")":`, ${e})`}`}function Mt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function It(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tt(e){return((e=It(e))<16?"0":"")+e.toString(16)}function Dt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _t(e,t,r,n)}function Pt(e){if(e instanceof _t)return new _t(e.h,e.s,e.l,e.opacity);if(e instanceof lt||(e=wt(e)),!e)return new _t;if(e instanceof _t)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new _t(a,s,l,e.opacity)}function _t(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Nt(e){return(e=(e||0)%360)<0?e+360:e}function qt(e){return Math.max(0,Math.min(1,e||0))}function $t(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}at(lt,wt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:St,formatHex:St,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Pt(this).formatHsl()},formatRgb:Ct,toString:Ct}),at(Lt,(function(e,t,r,n){return 1===arguments.length?Ot(e):new Lt(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return e=null==e?ct:Math.pow(ct,e),new Lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Lt(It(this.r),It(this.g),It(this.b),Mt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kt,formatHex:kt,formatHex8:function(){return`#${Tt(this.r)}${Tt(this.g)}${Tt(this.b)}${Tt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:At,toString:At})),at(_t,(function(e,t,r,n){return 1===arguments.length?Pt(e):new _t(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return e=null==e?ct:Math.pow(ct,e),new _t(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new _t(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Lt($t(e>=240?e-240:e+120,o,n),$t(e,o,n),$t(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new _t(Nt(this.h),qt(this.s),qt(this.l),Mt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mt(this.opacity);return`${1===e?"hsl(":"hsla("}${Nt(this.h)}, ${100*qt(this.s)}%, ${100*qt(this.l)}%${1===e?")":`, ${e})`}`}}));const zt=Math.PI/180,Bt=180/Math.PI,Ft=4/29,jt=6/29,Ht=3*jt*jt;function Wt(e){if(e instanceof Vt)return new Vt(e.l,e.a,e.b,e.opacity);if(e instanceof Kt)return Zt(e);e instanceof Lt||(e=Ot(e));var t,r,n=Xt(e.r),o=Xt(e.g),i=Xt(e.b),a=Gt((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=Gt((.4360747*n+.3850649*o+.1430804*i)/.96422),r=Gt((.0139322*n+.0971045*o+.7141733*i)/.82521)),new Vt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Vt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Gt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ht+Ft}function Ut(e){return e>jt?e*e*e:Ht*(e-Ft)}function Yt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Xt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Kt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Zt(e){if(isNaN(e.h))return new Vt(e.l,0,0,e.opacity);var t=e.h*zt;return new Vt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Jt(e,t,r){if(void 0!==e&&void 0!==t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0===i[s]&&(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}}function Qt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=function(){var e={};return{get:function(t){return e[t]},set:function(t,r){return e[t]=r,r},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(n){var o=t(n);return r.has(o)?r.get(o):r.set(o,e(n))}}function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(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 rr(e,t,r){return t&&tr(e.prototype,t),r&&tr(e,r),e}function nr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function or(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 ir(e,t){var r,n,o,i,a,s=new cr(e),l=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=ar);r=c.pop();)if(l&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)c.push(n=r.children[i]=new cr(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(lr)}function ar(e){return e.children}function sr(e){e.data=e.data.data}function lr(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function cr(e){this.data=e,this.depth=this.height=0,this.parent=null}at(Vt,(function(e,t,r,n){return 1===arguments.length?Wt(e):new Vt(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return new Vt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Vt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Lt(Yt(3.1338561*(t=.96422*Ut(t))-1.6168667*(e=1*Ut(e))-.4906146*(r=.82521*Ut(r))),Yt(-.9787684*t+1.9161415*e+.033454*r),Yt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),at(Kt,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Kt)return new Kt(e.h,e.c,e.l,e.opacity);if(e instanceof Vt||(e=Wt(e)),0===e.a&&0===e.b)return new Kt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Bt;return new Kt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Kt(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return new Kt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Kt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Zt(this).rgb()}})),cr.prototype=ir.prototype={constructor:cr,count:function(){return this.eachAfter(or)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].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(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,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 ir(this).eachBefore(sr)}};var ur,dr,pr=(ur=function(e){
7
+ System.register(["@nebula.js/stardust","react-dom","react"],(function(e){"use strict";var t,r,n,o,i,a,s,l,c,u,d,p,f,m,h,g,v,b,y,x,S,C,w,E,R,O,L,k,A,M,I,T,D,P,_,N,q,$,z,B;return{setters:[function(e){t=e.useMemo,r=e.useEffect,n=e.useTheme,o=e.usePromise,i=e.useState,a=e.useOptions,s=e.onContextMenu,l=e.onTakeSnapshot,c=e.useImperativeHandle,u=e.useElement,d=e.useStaleLayout,p=e.useApp,f=e.useModel,m=e.useInteractionState,h=e.useTranslator,g=e.useSelections,v=e.useKeyboard,b=e.useRect,y=e.useEmbed},function(e){x=e.default,S=e},function(e){C=e.default,w=e.useState,E=e.useMemo,R=e.useEffect,O=e.useContext,L=e.createElement,k=e.useRef,A=e,M=e.Children,I=e.isValidElement,T=e.cloneElement,D=e.createContext,P=e.useCallback,_=e.useReducer,N=e.memo,q=e.forwardRef,$=e.useLayoutEffect,z=e.PureComponent,B=e.useImperativeHandle}],execute:function(){e("default",(function(e){return{qae:{properties:{initial:G},data:U()},ext:qr(e),component:function(){var t,r=u(),n=Br(r),o=d(),i=p(),l=f(),c=m(),x=h(),S=g(),C=v(),w=a().freeResize,E=b(),R=(null===(t=null==o?void 0:o.snapshotData)||void 0===t?void 0:t.content)&&!w?F(F({},E),o.snapshotData.content.size):E,O=AX(o),L=y(),k=Yr(r),A=Fr(o.qHyperCube,l),M=LX(o.qHyperCube,l),I=kX(k,o);!function(){var e=this;null==s||s((function(t,r){r.target&&r.target.closest(".sn-table-cell")&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:function(){return H(e,void 0,void 0,(function(){return W(this,(function(e){return YV(r),[2]}))}))}})}))}(),e.flags.isEnabled("PS_20907_TABLE_DOWNLOAD")&&TX({layout:o,viewService:O,model:l,rootElement:r,contentRect:E}),CX({app:i,layout:o,model:l,rect:R,theme:k,keyboard:C,translator:x,interactions:c,selectionsAPI:S,changeSortOrder:A,rootElement:r,embed:L,reactRoot:n,applyColumnWidths:M,isFontLoaded:I,viewService:O}),OX({env:e,app:i,model:l,rootElement:r,layout:o,interactions:c,translator:x,selectionsAPI:S,theme:k,changeSortOrder:A,keyboard:C,rect:R,embed:L,reactRoot:n,applyColumnWidths:M,isFontLoaded:I,viewService:O})}}}));var F=function(){return F=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},F.apply(this,arguments)};function j(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function H(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function W(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function V(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}const G={version:JSON.stringify("2.3.1"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals",label:"Totals"},usePagination:!1,components:[]};var U=function(){return{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]}};function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function X(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var K={};!function(e){(()=>{var t={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,c,u,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=n&&i(n)?n:[]):u=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,u,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{n.r(o),n.d(o,{default:()=>Ie});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},i=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=b(u(n[0],o),m(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(n&&2===n.length){var d=u(n[0],o),p=u(n[1],o),f=m(0),h=m(1),g=b(d,f),v=b(p,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const C={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(i,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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(e)}var R=t().bind(null,!0),O={},L=Array.isArray;function k(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function A(e){return void 0===e}function M(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=A(e[r||t])?i:e[t],e=e[r||t]}})),e}function T(e,t){var r=!0;if(k(e)&&k(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){T(e[n],t[n])||(r=!1)})),r);if(L(e)&&L(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!T(e[n],t[n]))return!1;return!0}return e===t}O.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?R({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);T(i,a)||M(t,o)||(A(a)?n.push({op:"add",path:s,value:i}):k(i)&&k(a)?n=n.concat(O.generate(a,i,s)):L(i)&&L(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&A(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(T(t,o))return n;if(!A(t[0])&&A(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(O.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){A(t[o])&&!M(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},O.apply=function(e,t){t.forEach((function(t){var r,n,o=I(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(L(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(L(a)&&L(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return w(e)}(n=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(k(a)&&k(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!M(r,e)&&delete r[e]})),R(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var u=I(e,t.from);L(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(L(o)?o.splice(+i,1):delete o[i])}))},O.clone=function(e){return R({},e)},O.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},O.updateObject=function(e,t){Object.keys(e).length?O.apply(e,O.generate(e,t)):R(e,t)};const D=O,P=function(e,r,n){if(!e)return Promise.resolve();var o=D.generate(r,n);return t()(!0,r,n),o&&o.length?(o=o.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(o,!0)):Promise.resolve()};var _="accumulation";function N(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===_)return r[n]}function q(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===_)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const z={translationKey:"properties.modifier.accumulation",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=C.getNumStepComp(r,l),p=C.getAboveComp(r,l,u,d),f=C.getRangeComp("RangeSum",p);if(C.needDimension({modifier:r,properties:n,layout:o})){var m=C.getDimComp(c,1),h=C.getDimComp(c,0),g=C.getAggrComp(f,m,h);f=r.showExcludedValues?C.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(q(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(q(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(q(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(q(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=N(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=N(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(q(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(_))return!1;var i=N(t,e);return i&&!i.disabled}};return r}};var B="movingAverage";function F(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===B)return r[n]}function j(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===B)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var c=s;void 0===c&&(c=C.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=C.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=C.getNumStepComp(n,c),m=C.getAboveComp(n,c,p,f);if(n.nullSuppression)t=C.getRangeComp("RangeAvg",m);else{var h=C.getRangeComp("RangeSum",m),g=function(e,t){var r=C.getRowNoComp(e,t);if(!C.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,c);t="".concat(h," / ").concat(g)}var v=t;if(C.needDimension({modifier:n,properties:o,layout:a})){var b=C.getDimComp(u,1),y=C.getDimComp(u,0),x=C.getAggrComp(v,b,y);v=n.showExcludedValues?C.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=F(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=F(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=F(t,e);return i&&!i.disabled}};return r}};var V="timeSeriesDecomposition";function G(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function U(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const X={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?C.generateTSDExpression(r,t,n):t},extractInputExpression:C.extractInputExpression,initModifier:function(e,t){C.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=C.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=G(t,e);if(n){var o=n.steps;n.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e})),e}))}},show:function(t){var r=G(t,e);return r&&!r.fullRange}}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;var i=G(t,e);return i&&!i.disabled}};return r}};var K="difference";function Z(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===K)return r[n]}function J(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===K)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:C.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:C.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=C.getAboveComp(r,l,u),p="".concat(u," - ").concat(d);if(C.needDimension({modifier:r,properties:n,layout:o})){var f=C.getDimComp(c,1),m=C.getDimComp(c,0),h=C.getAggrComp(p,f,m);p=r.showExcludedValues?C.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(J(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(J(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(J(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(K))return!1;var i=Z(t,e);return i&&!i.disabled}};return r}};var te="normalization";function re(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function oe(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(C.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,r){return 0===e&&t>1?"<".concat(C.getDimDefWithWrapper(r),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return C.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:C.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ae(t),l=se(t,r,n),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=C.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach((function(t){void 0===e[t]&&(e[t]=ie[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!C.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=re(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,he)?he:me},getLibraryId:function(e){return i(e,he)||i(e,me)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",be="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",Ce="qDef.qLabelExpression",we="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Re="qDef.qAggrFunc",Oe="qDef.base.qAggrFunc",Le={initBase:function(e,t){(t||Le.isValid(e))&&(r(e,be,i(e,ve)),r(e,xe,i(e,ye)),r(e,we,i(e,Se)),r(e,Ee,i(e,Ce)))},restoreBase:function(e){Le.isValid(e)&&(r(e,ve,i(e,be)),r(e,ye,i(e,xe)),r(e,Se,i(e,we)),r(e,Ce,i(e,Ee)),i(e,Re)&&i(e,Oe)&&r(e,Re,i(e,Oe)),delete e.qDef.base)},isValid:function(e){var t=i(e,be),r=i(e,xe);return void 0!==t||void 0!==r}};const ke=Le;function Ae(e){return Ae="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},Ae(e)}var Me={accumulation:z,movingAverage:W,difference:ee,normalization:ue,timeSeriesDecomposition:X};const Ie={modifiers:Me,apply:De,applyModifiers:Pe,cleanUpMeasure:_e,destroy:function(e){e&&Te[e.id]&&Te[e.id].masterItemSubscriber&&(Te[e.id].masterItemSubscriber&&Te[e.id].masterItemSubscriber.unsubscribe(),delete Te[e.id])},hasActiveModifiers:Ne,getActiveModifier:qe,initBase:ke.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Me[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Me[e]&&Me[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Be(e);Ue({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Je({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:$e};var Te={};function De(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;Te[r.id]=Te[r.id]||{isFirstTime:!0};var c=Te[r.id].isFirstTime;if(Te[r.id].isFirstTime=!1,n&&"object"===Ae(n))return Pe({model:r,properties:n});var u=r?r.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=Te[r.id].lastReloadTime;if(Te[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var m=function(e){var t=e.measures,r=e.layout,n=e.model,o=e.lastReloadTime;return i(n,"app.layout.qLastReloadTime")!==o&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ge({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:u,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:Be(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);je(n);var o=Qe(n);return Ye({model:r}).then((function(t){return Xe({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===Ae(e)&&!e.disabled){if(r++,"object"!==Ae(Me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Me[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&We(t)&&C.simplifyExpression(t.qDef.base.qDef)!==C.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Pe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===Ae(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=Qe(n);return et({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return ze(n).forEach((function(e){return _e(e)})),Ze({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function Pe(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},o):o),je(o);var p=Qe(o);return et({model:r,libraryIds:p,masterItem:c}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=ze(n)),!r.length)return Promise.resolve();if(!Ne({measures:r,properties:n}))return r.forEach((function(e){return _e(e)})),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:o,dimensionAndFieldList:s}).then((function(e){return Xe({libraryIds:l,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;ke.isValid(r)||ke.initBase(r,!0);var l=r.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===Ae(e)&&!e.disabled){if(s++,"object"!==Ae(Me[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Me[e.type].initModifier(e,r);var l=r.qLibraryId||u&&u.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Me[n.type].generateExpression({expression:s,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Me[n.type].updateModifier&&Me[n.type].updateModifier(n,o.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Me[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||$e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&$e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:o,dimensionAndFieldList:e}),He(r)):_e(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Ze({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function _e(e){!function(e){var t=Be(e);return Array.isArray(t)&&t.some((function(e){return"object"===Ae(e)&&!e.disabled&&!Me[e.type]}))}(e)?ke.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({modifiers:Be(e),properties:r,layout:n})}))}function qe(e){var t=Be(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Me[n.type]&&!n.disabled)return n}}function $e(e){var t=qe(e);return!t||Me[t.type].enableTotalsFunction(e)}function ze(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Be(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Fe(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function je(e){ze(e).forEach((function(e){return function(e){var r=qe(e);r&&(void 0!==r.outputExpression&&Fe(r)!==e.qDef.qDef?delete e.qDef.base:!ke.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function He(e){var t=Be(e);Array.isArray(t)&&t.forEach((function(t){"object"===Ae(t)&&(t.disabled||!Me[t.type]&&Fe(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function We(e){return e.base||e.qDef&&e.qDef.base}function Ve(e){var t=We(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,r=e.properties,n=e.layout;return!Ve(t)&&Ue({modifiers:Be(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==Ae(e)||e.disabled||!Me[e.type])&&(void 0===o[e.type]&&(o[e.type]=Me[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Xe(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ze(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Ke)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),Ke)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ke)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ke);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):P(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Je(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===Ae(e)&&!e.disabled&&Me[e.type]&&Me[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Qe(e){var t=ze(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Be(t);if(Ue({modifiers:n,properties:e})){var i=Ve(t);i&&r.push(i),o=o||Je({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(Te[t.id].masterItemSubscriber=Te[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i(e,r)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function u(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(u(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return De({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Te[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),e.default=o.default,Object.defineProperty(e,"__esModule",{value:!0})})()}(K);var Z,J,Q,ee,te,re,ne=Y(K);!function(e){e.SELECTED="selected",e.POSSIBLE="possible",e.EXCLUDED="excluded",e.INACTIVE="inactive"}(Z||(Z={})),function(e){e.SELECT="select",e.SELECT_MOUSE_DOWN="selectMouseDown",e.SELECT_MOUSE_UP="selectMouseUp",e.SELECT_MULTI_ADD="selectMultiAdd",e.SELECT_MULTI_END="selectMultiEnd",e.RESET="reset",e.CLEAR="clear",e.UPDATE_PAGE_ROWS="updatePageRows"}(J||(J={})),function(e){e.ENTER="Enter",e.SPACE=" ",e.ESC="Escape",e.TAB="Tab",e.SHIFT="Shift",e.LEFT="ArrowLeft",e.RIGHT="ArrowRight",e.UP="ArrowUp",e.DOWN="ArrowDown",e.C="c"}(Q||(Q={})),function(e){e.FOCUS="focus",e.FOCUS_BUTTON="focusButton",e.BLUR="blur",e.ADD_TAB="addTab",e.REMOVE_TAB="removeTab"}(ee||(ee={})),function(e){e.A="ascending",e.D="descending"}(te||(te={})),function(e){e.PIXELS="pixels",e.PERCENTAGE="percentage",e.FIT_TO_CONTENT="fitToContent",e.AUTO="auto"}(re||(re={}));var oe=120,ie=24,ae=[0,0],se=[1,0];const le={textAlignAuto:{ref:"qDef.textAlign.auto",type:"boolean",component:"switch",translation:"Common.Text.TextAlignment",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},textAlign:{ref:"qDef.textAlign.align",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:e=>void 0!==e.qDef.textAlign&&!e.qDef.textAlign.auto}},ce=e=>{var t,r,n,o,i,a;return{type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!ne.hasActiveModifiers({measures:[e],properties:t.properties})||ne.ifEnableTotalsFunction(e)?[{value:"Expr",translation:"Common.Auto"}]:[]).concat([{value:"Avg",translation:"Object.Table.AggrFunc.Avg"},{value:"Count",translation:"Object.Table.AggrFunc.Count"},{value:"Max",translation:"Object.Table.AggrFunc.Max"},{value:"Min",translation:"Object.Table.AggrFunc.Min"},{value:"Sum",translation:"Object.Table.AggrFunc.Sum"},{value:"None",translation:"Object.Table.AggrFunc.None"}]),defaultValue:null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(r=t.sense)&&void 0!==r&&null!==(n=r.isUnsupportedFeature)&&void 0!==n&&n.call(r,"totals")?"None":"Expr"}}}},show:!(null!=e&&null!==(o=e.anything)&&void 0!==o&&null!==(i=o.sense)&&void 0!==i&&null!==(a=i.isUnsupportedFeature)&&void 0!==a&&a.call(i,"totals"))}},ue={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:re.AUTO,translation:"Common.Auto"},{value:re.FIT_TO_CONTENT,translation:"Object.Table.Column.FitToContent"},{value:re.PIXELS,translation:"Object.Table.Column.Pixels"},{value:re.PERCENTAGE,translation:"Object.Table.Column.Percentage"}],defaultValue:re.AUTO},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:200,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===re.PIXELS},change(e){e.qDef.columnWidth.pixels=void 0===e.qDef.columnWidth.pixels?e.qDef.columnWidth.pixels:Math.max(1,Math.min(7680,e.qDef.columnWidth.pixels))}},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:20,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===re.PERCENTAGE},change(e){e.qDef.columnWidth.percentage=void 0===e.qDef.columnWidth.percentage?e.qDef.columnWidth.percentage:Math.max(1,Math.min(100,e.qDef.columnWidth.percentage))}}},de={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},tableCellColoring:{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"}]},...le,...ue},pe={libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}},fe=e=>({libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:ce(e)}),me=e=>e.flags.isEnabled("PS_18291_TABLE_EXPLORATION")?{type:"items",translation:"Common.Data",component:"data-assets-panel",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:pe},presentation:{type:"items",translation:"properties.presentation",items:de}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:fe(e)},presentation:{type:"items",translation:"properties.presentation",items:de}}}}}:{type:"items",component:"columns",translation:"Common.Data",sortIndexRef:"qHyperCubeDef.qColumnOrder",allowMove:!0,allowAdd:!0,addTranslation:"Common.Columns",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",grouped:!0,items:{...pe,...de}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",grouped:!0,items:{...fe(e),...de}}}},he={type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,defaultValue:[],items:{headerSection:{translation:"properties.Header",component:"panel-section",items:{headerFontItem:{component:"items",ref:"components",key:"theme",items:{headerFontWrapper:{component:"inline-wrapper",items:{headerFontSize:{component:"integer",ref:"header.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return parseInt(null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.header)||void 0===a?void 0:a.fontSize)&&void 0!==n?n:s.fontSize,10)},change(e){e.header.fontSize=e.header.fontSize?Math.max(5,Math.min(300,Math.floor(e.header.fontSize))):e.header.fontSize}},headerFontColor:{show:!0,ref:"header.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return{color:null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.header)||void 0===a?void 0:a.color)&&void 0!==n?n:s.color}},dualOutput:!0}}}}}}},contentSection:{component:"panel-section",translation:"properties.Content",items:{contentFontItem:{component:"items",ref:"components",key:"theme",items:{contentFontWrapper:{component:"inline-wrapper",items:{contentFontSize:{component:"integer",ref:"content.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return parseInt(null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.fontSize)&&void 0!==n?n:s.fontSize,10)},change(e){e.content.fontSize=e.content.fontSize?Math.max(5,Math.min(300,Math.floor(e.content.fontSize))):e.content.fontSize}},contentFontColor:{ref:"content.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o,i,a;const s=r.theme.current();return{color:null!==(n=null===(o=s.object)||void 0===o||null===(i=o.straightTableV2)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.color)&&void 0!==n?n:s.color}},dualOutput:!0}}}}}}},hoverEffectSection:{translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{hoverEffectSwitch:{ref:"content.hoverEffect",translation:"ThemeStyleEditor.style.hoverEffect",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},hoverEffectColorItem:{show(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}}}}]},ge=e=>{var t,r,n;return{type:"items",items:[{ref:"totals.show",type:"boolean",translation:"properties.totals",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},{ref:"totals.position",translation:"Common.Position",type:"string",component:"dropdown",options:[{value:"noTotals",translation:"Common.None"},{value:"top",translation:"Common.Top"},{value:"bottom",translation:"Common.Bottom"}],defaultValue:"noTotals",show:e=>!e.totals.show},{ref:"totals.label",translation:"properties.totals.label",type:"string",expression:"optional",defaultValue:()=>e.translator.get("Object.Table.Totals")}],show:!(null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(r=t.sense)&&void 0!==r&&null!==(n=r.isUnsupportedFeature)&&void 0!==n&&n.call(r,"totals"))}},ve=e=>e.flags.isEnabled("PS_18291_TABLE_EXPLORATION")&&{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}},be=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[he,ge(e),{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1}]},...ve(e)}}),ye={uses:"sorting"},xe={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},Se=e=>({type:"items",component:"accordion",items:{data:me(e),sorting:ye,addOns:xe,settings:be(e)}});function Ce(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function we(e,t){let r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function Ee(e){return e>0?0:1}function Re(e){return e.translator.get("Visualizations.Descriptions.Column")}function Oe(e){return{measures:{min:Ee,max:1e3,description:()=>Re(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;Ce(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties;we(o,(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n)}},dimensions:{min:Ee,max:1e3,description:()=>Re(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return Ce(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(null!=e&&e.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;we(o,n)}}}}var Le={exports:{}};window,Le.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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="/conversion/",r(r.s=2)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=u(d,r),d!==(o=u(t,r))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},c(d,{name:r,newValue:e(m,a,o)})):void 0!==o&&c(d,{name:r,newValue:o}));return d}},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.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 o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));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="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,r=n.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!i)return!1;for(t in e);return void 0===t||n.call(e,t)},c=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=u(d,r),d!==(o=u(t,r))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},c(d,{name:r,newValue:e(m,a,o)})):void 0!==o&&c(d,{name:r,newValue:o}));return d}},function(e,t,r){r.r(t);var n=r(0),o=r.n(n),i=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},a=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function b(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var c=v(u(n[0],o),m(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(n&&2===n.length){var d=u(n[0],o),p=u(n[1],o),f=m(0),h=m(1),g=v(d,f),b=v(p,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function y(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var S={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!r.showExcludedValues)return a;var s=b({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:y,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return y(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:u,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=x({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function C(e){return(C="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 w=o.a.bind(null,!0),E={},R=Array.isArray;function O(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function L(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=L(e[r||t])?i:e[t],e=e[r||t]}})),e}function M(e,t){var r=!0;if(O(e)&&O(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){M(e[n],t[n])||(r=!1)})),r);if(R(e)&&R(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!M(e[n],t[n]))return!1;return!0}return e===t}E.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?w({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);M(i,a)||k(t,o)||(L(a)?n.push({op:"add",path:s,value:i}):O(i)&&O(a)?n=n.concat(E.generate(a,i,s)):R(i)&&R(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&L(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(M(t,o))return n;if(!L(t[0])&&L(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(E.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){L(t[o])&&!k(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},E.apply=function(e,t){t.forEach((function(t){var r,n=A(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?n[o]:n[+o]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(R(n))"-"===o&&(o=n.length),n.splice(+o,"add"===t.op?0:1,t.value);else if(R(i)&&R(t.value)){var s,l=t.value.slice();i.length=0,(s=i).push.apply(s,function(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")}()}(l))}else if(O(i)&&O(t.value))r=i,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!k(r,e)&&delete r[e]})),w(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[o]=t.value}else if("move"===t.op){var c=A(e,t.from);R(n)?n.splice(+o,0,c.splice(+a,1)[0]):(n[o]=c[a],delete c[a])}else"remove"===t.op&&(R(n)?n.splice(+o,1):delete n[o])}))},E.clone=function(e){return w({},e)},E.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},E.updateObject=function(e,t){Object.keys(e).length?E.apply(e,E.generate(e,t)):w(e,t)};var I=E,T=function(e,t,r){if(!e)return Promise.resolve();var n=I.generate(t,r);return o()(!0,t,r),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(n,!0)):Promise.resolve()},D="accumulation";function P(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===D)return r[n]}function _(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===D)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var N={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},q={translationKey:"properties.modifier.accumulation",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=i;void 0===l&&(l=S.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=S.getNumStepComp(r,l),p=S.getAboveComp(r,l,u,d),f=S.getRangeComp("RangeSum",p);if(S.needDimension({modifier:r,properties:n,layout:o})){var m=S.getDimComp(c,1),h=S.getDimComp(c,0),g=S.getAggrComp(f,m,h);f=r.showExcludedValues?S.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:S.extractInputExpression,initModifier:function(e){S.initModifier(e,N)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=P(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=P(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(D))return!1;var i=P(t,e);return i&&!i.disabled}};return r}},$="movingAverage";function z(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===$)return r[n]}function B(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===$)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},j={translationKey:"properties.modifier.movingAverage",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,i=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var c=s;void 0===c&&(c=S.getNumDimensions({properties:o,layout:i}));var u=a(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=S.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=S.getNumStepComp(n,c),m=S.getAboveComp(n,c,p,f);if(n.nullSuppression)t=S.getRangeComp("RangeAvg",m);else{var h=S.getRangeComp("RangeSum",m),g=function(e,t){var r=S.getRowNoComp(e,t);if(!S.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,c);t="".concat(h," / ").concat(g)}var v=t;if(S.needDimension({modifier:n,properties:o,layout:i})){var b=S.getDimComp(u,1),y=S.getDimComp(u,0),x=S.getAggrComp(v,b,y);v=n.showExcludedValues?S.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:S.extractInputExpression,initModifier:function(e){S.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=z(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=z(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf($))return!1;var i=z(t,e);return i&&!i.disabled}};return r}},H="difference";function W(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===H)return r[n]}function V(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===H)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},U={translationKey:"properties.modifier.difference",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:S.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=i;void 0===l&&(l=S.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=S.getAboveComp(r,l,u),p="".concat(u," - ").concat(d);if(S.needDimension({modifier:r,properties:n,layout:o})){var f=S.getDimComp(c,1),m=S.getDimComp(c,0),h=S.getAggrComp(p,f,m);p=r.showExcludedValues?S.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(G).forEach((function(t){void 0===e[t]&&(e[t]=G[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(V(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(H))return!1;var i=W(t,e);return i&&!i.disabled}};return r}},Y={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},X={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},K="normalization";function Z(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===K)return r[n]}function J(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===K)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function Q(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function ee(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:X.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:X.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:X.DISREGARD_ALL_DIMENSIONS,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=Q(t,0);t.splice(n,1)}return t}(o,i),function(e,t,r){if(0===e){var n=Q(t,1);t.splice(n,1)}return t}(Z(e,n).selectionScope,i)}function te(e,t,r){var n=[{value:Y.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:Y.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:Y.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Q(t,0);t.splice(n,1)}return t}(Z(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:X.DISREGARD_ALL_DIMENSIONS,selectionScope:Y.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function oe(e,t,r){return 1===e?"{$<".concat(S.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(S.getDimDefWithWrapper(r),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return S.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:S.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=i;void 0===l&&(l=S.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ne(t),l=oe(t,r,n),c=""===s&&""===l?"":s||l,u=ie(o,i),d=ae(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=S.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(re).forEach((function(t){void 0===e[t]&&(e[t]=re[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(J(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.DISREGARD_SELECTION,options:function(r){return te(r,t,e)}},field:{refFn:function(t){return"".concat(J(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===Y.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(J(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===Y.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(J(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:X.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return ee(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(J(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return(Z(t,e).dimensionalScope||0)===X.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(K))return!1;var i=Z(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ne,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ce={initBase:function(e,t){(t||ce.isValid(e))&&(i(e,"qDef.base.qDef",a(e,"qDef.qDef")),i(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),i(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),i(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ce.isValid(e)&&(i(e,"qDef.qDef",a(e,"qDef.base.qDef")),i(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),i(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),i(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&i(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),r=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},ue=ce;function de(e){return(de="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 pe={accumulation:q,movingAverage:j,difference:U,normalization:se},fe=(t.default={modifiers:pe,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ve,getActiveModifier:be,initBase:ue.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return pe[e]&&pe[e].isApplicable({properties:r,layout:n})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Se(e);ke({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||De({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:ye},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,i=void 0!==n&&n,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,r&&"object"===de(r))return he({model:t,properties:r});var c=t?t.layout:void 0,u=a(c,"qSelectionInfo.qInSelections");if(i||u)return Promise.resolve(!1);var d=a(c,"qHyperCube.qMeasureInfo"),p=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ve({measures:d,layout:c})){var f=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Le({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:d,layout:c,model:t,lastReloadTime:p});return f||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return ke({modifiers:Se(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=o()(!0,{},e);we(r);var n=Pe(r);return Ae({model:t}).then((function(o){return Me({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Le({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===de(e)&&!e.disabled){if(r++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Re(t)&&S.simplifyExpression(t.qDef.base.qDef)!==S.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Pe(r);return _e({model:t,libraryIds:n}).then((function(){var e=o()(!0,{},r);return xe(r).forEach((function(e){return ge(e)})),Te({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,r=e.oldProperties,n=e.properties,i=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?o()(!0,{},n):n),we(n);var p=Pe(n);return _e({model:t,libraryIds:p,masterItem:c}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(r)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=i?void 0:Pe(r);return Ae({model:n,dimensionAndFieldList:s}).then((function(e){return Me({libraryIds:l,model:n,libraryItemsProps:i}).then((function(n){t.forEach((function(t){ke({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;ue.isValid(t)||ue.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");pe[e.type].initModifier(e);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=pe[r.type].generateExpression({expression:s,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=l,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,r.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:i}):function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList;"function"==typeof pe[r.type].updateModifier&&pe[r.type].updateModifier(r,n.qHyperCubeDef);var a=le.getExpression(t),s=pe[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:i}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||ye(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ye(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:r,libraryItemsProps:n,dimensionAndFieldList:e}),Ee(t)):ge(t)}))}))}))}({measures:i,properties:n,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return l?Te({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=Se(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!pe[e.type]}))}(e)?ue.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ee(e)}function ve(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return ke({modifiers:Se(e),properties:r,layout:n})}))}function be(e){var t=Se(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(pe[n.type]&&!n.disabled)return n}}function ye(e){var t=be(e);return!t||pe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Se(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function we(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&Ce(t)!==e.qDef.qDef?delete e.qDef.base:!ue.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function Ee(e){var t=Se(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!pe[t.type]&&Ce(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Re(e){return e.base||e.qDef&&e.qDef.base}function Oe(e){var t=Re(e);return e.qLibraryId||t&&t.qLibraryId}function Le(e){var t=e.measure,r=e.properties,n=e.layout;return!Oe(t)&&ke({modifiers:Se(t),properties:r,layout:n})}function ke(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=pe[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ae(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Me(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Ie(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Te(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qMeasures"),Ie)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&a(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):T(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function De(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&pe[e.type]&&pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Pe(e){var t=xe(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Se(t);if(ke({modifiers:n,properties:e})){var i=Oe(t);i&&r.push(i),o=o||De({modifiers:n,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function _e(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},i={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=a(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=a(e,r)})),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function u(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),i={},t.forEach((function(e){i[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:a}),Object.keys(n).forEach((function(e){o[e]||i[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(u(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(u(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},function(e,t,r){function n(e){var t=function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}(e%62),r=Math.floor(e/62);return r>0?n(r)+t:t}function o(e){return(o="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)}r.r(t);var i={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(""!==a){if(void 0===o[a]||null===o[a])return r;o=o[a]}}return o},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return n(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var o=e.indexOf(t[n]);if(r>o)return!1;r=o}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:u},p=r(1),f=r.n(p),m={addDimensions:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.dimensions).push.apply(t,a(n.qDimensions));var s,l=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.measures).push.apply(t,l(n.qMeasures));var a,s=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var o=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,n.interColumnSortOrder)&&(n.interColumnSortOrder=o.concat())},copyProperties:function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!i.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,r){var n,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(n=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(n)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var g=r(0),v=r.n(g);function b(e,t){var r=v()(!0,{},t,e);return i.getValue(r,"qOtherTotalSpec.qOtherCounted")||i.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(r,"qOtherTotalSpec.qOtherLimit")||i.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function y(e,t){return v()(!0,{},t,e)}function x(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var S=Math.pow(2,53)-1;function C(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function E(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var O={importCommonProperties:function(e,t,r){var n="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(r,"qInfo.qType");i.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},copyPropertyIfExist:function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},copyPropertyOrSetDefault:function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,r=e.exportFormat,n=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=b(s.dimensions[t],a);i.qDimensions.length<n?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=b(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},addMeasures:function(e){var t,r=e.exportFormat,n=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=y(s.measures[t],a);i.qMeasures.length<n?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=y(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,o=t.data[0],i=n.dimensions||{max:0},a=n.measures||{max:0},s=x(a.max,o.dimensions.length,S),l=x(a.min,o.dimensions.length,0);return{maxDimensions:x(i.max,s,S),minDimensions:x(i.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var i=r.qInterColumnSortOrder.length;if(i!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(r.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(r.qInterColumnSortOrder,i))},createNewProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=v()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?i.setValue(o,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=v()(!0,{},r,o)).components&&(o.components=[]),o},shouldInitLayoutExclude:function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!r&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var o=i.getValue(t,n||"").qHyperCubeDef,a=C(o.qDimensions);o.qDimensions=[],a.forEach((function(e){o.qDimensions.push(e),r.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var o=i.getValue(t,n||"").qHyperCubeDef,a=E(o.qMeasures);o.qMeasures=[],a.forEach((function(e){o.qMeasures.push(e),r.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function L(e,t){var r=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){i.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var k={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:l}),m.addMeasures({exportFormat:o,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),r&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:o,properties:a}),n||m.storeMeasuresModifiers(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(h(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(h(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(h(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=O.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:c}),v=i.getValue(n,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=O.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,C=y.maxMeasures,w=y.minMeasures,E=l.defaultDimension,R=void 0===E?O.getDefaultDimension():E,k=l.defaultMeasure,A=void 0===k?O.getDefaultMeasure():k;b.qDimensions.length=0,b.qMeasures.length=0,O.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:C,minMeasures:w})&&O.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:C,minMeasures:w,newHyperCubeDef:b}),O.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:b,defaultDimension:R}),O.addMeasures({exportFormat:t,maxMeasures:C,minMeasures:w,newHyperCubeDef:b,defaultMeasure:A}),O.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),O.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),O.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),O.copyPropertyIfExist("qMaxStackedCells",v,b),O.copyPropertyIfExist("qNoOfLeftDims",v,b),O.copyPropertyOrSetDefault("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),O.copyPropertyOrSetDefault("qMode",v,b,"S"),O.copyPropertyOrSetDefault("qReductionMode",v,b,"N"),O.copyPropertyOrSetDefault("qSortbyYValue",v,b),O.copyPropertyOrSetDefault("qIndentMode",v,b),O.copyPropertyOrSetDefault("qShowTotalsAbove",v,b),O.importCommonProperties(g,t,n),h.qProperty=g;var M=i.getValue(u||{},"support.modifiers");return O.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:M}),p&&L(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&L(h.qProperty,"dynamicScript"),h}},A={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function M(e,t,r,n){t=t||[];var o=u(e,n,r),i=u(t,n,r);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function I(e,t){return e.length!==t}var T={create:function(e,t){if(!e||!A[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,o){r=r||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][r],s=t.length;if(M(a,t,n,o),I(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},D={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},P={colorModeOptions:{primary:function(){return!0},dimension:function(e){return D.getNumDimensions(e)>0&&D.getNumMeasures(e)<=1},multiColor:function(e){return D.getNumMeasures(e)>1},measure:function(e){return D.getNumDimensions(e)>0},expression:function(e){return D.getNumMeasures(e)>=1}}},_={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return D.getNumMeasures(e)>=1}}},N={scatterplot:_,"sn-scatter-plot":_,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return D.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return D.getNumDimensions(e)>1},multiColor:function(e){return D.getNumMeasures(e)>1},measure:function(e){return D.getNumDimensions(e)<=1},expression:function(e){return D.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return D.getNumDimensions(e)>=1},multiColor:function(e){return D.getNumMeasures(e)>1},measure:function(e){return D.getNumDimensions(e)>=1},expression:function(e){return D.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return D.getNumDimensions(e)>=1}}}};function q(e,t,r){if(Array.isArray(e[t])){var n=d.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function $(e,t){var r=T.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){q(e,"qAttributeDimensions",r),q(e,"qAttributeExpressions",r)})),t.forEach((function(e){q(e,"qAttributeDimensions",r),q(e,"qAttributeExpressions",r)}))}function z(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function B(e){var t=e.properties,r=e.isDimension,n=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;$(n,o);var l=n[n.length-1];if(l){var c=r?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),u=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=T.create(T.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,o?t.qDef=n.key:(t.qExpression=n.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:r,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;o||(t.matchMeasure=d.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=a)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:c,isDimension:r,qNumFormat:u,isCustomFormatted:p})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function F(e,t,r,n){var o,i,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(o=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(r,t))?(s.type="measure",s.name=o,s.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n))&&(s.expression=i)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var j={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function H(e,t,r,n){var o=r?"expression":t.type,i=e.color,a=i.mode,s=D.getItemLabel(t);switch(z(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||D.wrapFieldName(t.name),key:D.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:r||s,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&j.useMasterNumberFormat(i.formatting)}n||(i.auto=!1,i.mode=a)}function W(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=i.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],o=T.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",o);return H(e,F("dimension",!!a,a||n)),!!a}function V(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&z(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var o=F("dimension",!1,r[n.activeDimensionIndex]);o.activeDimensionIndex=n.activeDimensionIndex,H(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&W(e,t))return;B({properties:e,isDimension:!0,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byDimDef.label")})}function G(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&z(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qMeasures"),[]),n=i.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var o=F("measure",!1,r[n.activeMeasureIndex],!0);o.activeMeasureIndex=n.activeMeasureIndex,H(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=r[r.length-1],a=T.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return H(e,F("measure",!!s,s||n[0])),!!s}(e,t))return;B({properties:e,isDimension:!1,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byMeasureDef.label")})}var U={changeProperty:function(e,t,r){i.setValue(e,t,r),i.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:i.getValue(e,t),to:r})}(e,t,r)},getCanColorBy:function(e,t){var r={primary:!0};if(e){var n=(N[t]||P).colorModeOptions||P.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},shouldUpdateColorBy:function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,o=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!o.length))},updateColorBy:function(e,t){var r=i.getValue(e,"color.mode"),n=i.getValue(e,"color.auto"),o=i.getValue(e,"".concat(t,"qDimensions"),[]),a=i.getValue(e,"".concat(t,"qMeasures"),[]),s=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);n?$(o,s):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}({auto:n,colorMode:r,dimensions:o})?V(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!o.length)}({auto:n,colorMode:r,dimensions:o,measures:a,properties:e})?G(e,t):function(e,t){var r=i.getValue(e,"color.mode"),n=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&o.length<2&&i.setValue(e,"color.mode","primary"),$(n,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=i.getValue(r,"qHyperCubeDef.qMeasures",[]),o=i.getValue(r,"color.mode","");return!t&&"byExpression"===o&&n.length>0},addColorByExpression:function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),r=i.getValue(e,"color.persistent",!1);return t.length>1&&!r}},Y={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=k.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=T.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return T.moveByIdFromGroup(a,[],"qAttributeDimensions",c),T.moveByIdFromGroup(a,[],"qAttributeExpressions",c),T.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=k.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),m=i.getValue(d,"color.mode",""),h=i.getValue(d,"color.auto",""),g=U.getCanColorBy(d,p),v=U.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?U.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:d})&&U.addColorByExpression(d):U.switchToAutoColor(d),v&&U.updateColorBy(d,"qHyperCubeDef."),U.shouldSwitchToColorPersistent(d)&&U.changeProperty(d,"color.persistent",!0),U.deleteTotalMode(f),u}},X=["bar","marker","line"],K={handleAutoMinMax:function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?L(r,"unsupportedAutoMinMax")||v()(r.measureAxis,t.measureAxis):L(r,"supportedAutoMinMax")||v()(r.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,r=e.exportFormat,n=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),X.includes(n)&&t[o].type[n]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&v()(s,r.properties.measureAxes[t[0].axis])):v()(s,r.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}}},Z={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=Y.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return i?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=Y.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return K.handleAutoMinMax({initialProperties:r,properties:d}),K.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:d,measureType:a}),K.setInterColumnSortOrder(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function J(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Q(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=J(r,n,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}function ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=J(r,n,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:k,colorChart:Y,axisChart:Z,quarantineProperty:h,unquarantineProperty:L,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}]);var ke=Y(Le.exports);function Ae(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Me(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ie(){}var Te=1/.7,De="\\s*([+-]?\\d+)\\s*",Pe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ne=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[De,De,De]+"\\)$"),$e=new RegExp("^rgb\\("+[_e,_e,_e]+"\\)$"),ze=new RegExp("^rgba\\("+[De,De,De,Pe]+"\\)$"),Be=new RegExp("^rgba\\("+[_e,_e,_e,Pe]+"\\)$"),Fe=new RegExp("^hsl\\("+[Pe,_e,_e]+"\\)$"),je=new RegExp("^hsla\\("+[Pe,_e,_e,Pe]+"\\)$"),He={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function We(){return this.rgb().formatHex()}function Ve(){return this.rgb().formatRgb()}function Ge(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ne.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ue(t):3===r?new Ke(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ye(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ye(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qe.exec(e))?new Ke(t[1],t[2],t[3],1):(t=$e.exec(e))?new Ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ze.exec(e))?Ye(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Ye(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fe.exec(e))?et(t[1],t[2]/100,t[3]/100,1):(t=je.exec(e))?et(t[1],t[2]/100,t[3]/100,t[4]):He.hasOwnProperty(e)?Ue(He[e]):"transparent"===e?new Ke(NaN,NaN,NaN,0):null}function Ue(e){return new Ke(e>>16&255,e>>8&255,255&e,1)}function Ye(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ke(e,t,r,n)}function Xe(e,t,r,n){return 1===arguments.length?function(e){return e instanceof Ie||(e=Ge(e)),e?new Ke((e=e.rgb()).r,e.g,e.b,e.opacity):new Ke}(e):new Ke(e,t,r,null==n?1:n)}function Ke(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ze(){return"#"+Qe(this.r)+Qe(this.g)+Qe(this.b)}function Je(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Qe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function et(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new rt(e,t,r,n)}function tt(e){if(e instanceof rt)return new rt(e.h,e.s,e.l,e.opacity);if(e instanceof Ie||(e=Ge(e)),!e)return new rt;if(e instanceof rt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new rt(a,s,l,e.opacity)}function rt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function nt(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function ot(e){return function(){return e}}function it(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):ot(isNaN(e)?t:e)}function at(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function st(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function lt(){}Ae(Ie,Ge,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:We,formatHex:We,formatHsl:function(){return tt(this).formatHsl()},formatRgb:Ve,toString:Ve}),Ae(Ke,Xe,Me(Ie,{brighter:function(e){return e=null==e?Te:Math.pow(Te,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ze,formatHex:Ze,formatRgb:Je,toString:Je})),Ae(rt,(function(e,t,r,n){return 1===arguments.length?tt(e):new rt(e,t,r,null==n?1:n)}),Me(Ie,{brighter:function(e){return e=null==e?Te:Math.pow(Te,e),new rt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new rt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Ke(nt(e>=240?e-240:e+120,o,n),nt(e,o,n),nt(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}})),function e(t){var r=function(e){return 1==(e=+e)?it:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):ot(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Xe(e)).r,(t=Xe(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=it(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var ct=1/.7,ut="\\s*([+-]?\\d+)\\s*",dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ft=/^#([0-9a-f]{3,8})$/,mt=new RegExp(`^rgb\\(${ut},${ut},${ut}\\)$`),ht=new RegExp(`^rgb\\(${pt},${pt},${pt}\\)$`),gt=new RegExp(`^rgba\\(${ut},${ut},${ut},${dt}\\)$`),vt=new RegExp(`^rgba\\(${pt},${pt},${pt},${dt}\\)$`),bt=new RegExp(`^hsl\\(${dt},${pt},${pt}\\)$`),yt=new RegExp(`^hsla\\(${dt},${pt},${pt},${dt}\\)$`),xt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function St(){return this.rgb().formatHex()}function Ct(){return this.rgb().formatRgb()}function wt(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ft.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Et(t):3===r?new Lt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Rt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Rt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mt.exec(e))?new Lt(t[1],t[2],t[3],1):(t=ht.exec(e))?new Lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gt.exec(e))?Rt(t[1],t[2],t[3],t[4]):(t=vt.exec(e))?Rt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=bt.exec(e))?Dt(t[1],t[2]/100,t[3]/100,1):(t=yt.exec(e))?Dt(t[1],t[2]/100,t[3]/100,t[4]):xt.hasOwnProperty(e)?Et(xt[e]):"transparent"===e?new Lt(NaN,NaN,NaN,0):null}function Et(e){return new Lt(e>>16&255,e>>8&255,255&e,1)}function Rt(e,t,r,n){return n<=0&&(e=t=r=NaN),new Lt(e,t,r,n)}function Ot(e){return e instanceof lt||(e=wt(e)),e?new Lt((e=e.rgb()).r,e.g,e.b,e.opacity):new Lt}function Lt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function kt(){return`#${Tt(this.r)}${Tt(this.g)}${Tt(this.b)}`}function At(){const e=Mt(this.opacity);return`${1===e?"rgb(":"rgba("}${It(this.r)}, ${It(this.g)}, ${It(this.b)}${1===e?")":`, ${e})`}`}function Mt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function It(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tt(e){return((e=It(e))<16?"0":"")+e.toString(16)}function Dt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _t(e,t,r,n)}function Pt(e){if(e instanceof _t)return new _t(e.h,e.s,e.l,e.opacity);if(e instanceof lt||(e=wt(e)),!e)return new _t;if(e instanceof _t)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new _t(a,s,l,e.opacity)}function _t(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Nt(e){return(e=(e||0)%360)<0?e+360:e}function qt(e){return Math.max(0,Math.min(1,e||0))}function $t(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}at(lt,wt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:St,formatHex:St,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Pt(this).formatHsl()},formatRgb:Ct,toString:Ct}),at(Lt,(function(e,t,r,n){return 1===arguments.length?Ot(e):new Lt(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return e=null==e?ct:Math.pow(ct,e),new Lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Lt(It(this.r),It(this.g),It(this.b),Mt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kt,formatHex:kt,formatHex8:function(){return`#${Tt(this.r)}${Tt(this.g)}${Tt(this.b)}${Tt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:At,toString:At})),at(_t,(function(e,t,r,n){return 1===arguments.length?Pt(e):new _t(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return e=null==e?ct:Math.pow(ct,e),new _t(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new _t(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Lt($t(e>=240?e-240:e+120,o,n),$t(e,o,n),$t(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new _t(Nt(this.h),qt(this.s),qt(this.l),Mt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Mt(this.opacity);return`${1===e?"hsl(":"hsla("}${Nt(this.h)}, ${100*qt(this.s)}%, ${100*qt(this.l)}%${1===e?")":`, ${e})`}`}}));const zt=Math.PI/180,Bt=180/Math.PI,Ft=4/29,jt=6/29,Ht=3*jt*jt;function Wt(e){if(e instanceof Vt)return new Vt(e.l,e.a,e.b,e.opacity);if(e instanceof Kt)return Zt(e);e instanceof Lt||(e=Ot(e));var t,r,n=Xt(e.r),o=Xt(e.g),i=Xt(e.b),a=Gt((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=Gt((.4360747*n+.3850649*o+.1430804*i)/.96422),r=Gt((.0139322*n+.0971045*o+.7141733*i)/.82521)),new Vt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Vt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Gt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ht+Ft}function Ut(e){return e>jt?e*e*e:Ht*(e-Ft)}function Yt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Xt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Kt(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Zt(e){if(isNaN(e.h))return new Vt(e.l,0,0,e.opacity);var t=e.h*zt;return new Vt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Jt(e,t,r){if(void 0!==e&&void 0!==t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0===i[s]&&(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}}function Qt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=function(){var e={};return{get:function(t){return e[t]},set:function(t,r){return e[t]=r,r},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(n){var o=t(n);return r.has(o)?r.get(o):r.set(o,e(n))}}function er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tr(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 rr(e,t,r){return t&&tr(e.prototype,t),r&&tr(e,r),e}function nr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function or(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 ir(e,t){var r,n,o,i,a,s=new cr(e),l=+e.value&&(s.value=e.value),c=[s];for(null==t&&(t=ar);r=c.pop();)if(l&&(r.value=+r.data.value),(o=t(r.data))&&(a=o.length))for(r.children=new Array(a),i=a-1;i>=0;--i)c.push(n=r.children[i]=new cr(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(lr)}function ar(e){return e.children}function sr(e){e.data=e.data.data}function lr(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function cr(e){this.data=e,this.depth=this.height=0,this.parent=null}at(Vt,(function(e,t,r,n){return 1===arguments.length?Wt(e):new Vt(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return new Vt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Vt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Lt(Yt(3.1338561*(t=.96422*Ut(t))-1.6168667*(e=1*Ut(e))-.4906146*(r=.82521*Ut(r))),Yt(-.9787684*t+1.9161415*e+.033454*r),Yt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),at(Kt,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Kt)return new Kt(e.h,e.c,e.l,e.opacity);if(e instanceof Vt||(e=Wt(e)),0===e.a&&0===e.b)return new Kt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Bt;return new Kt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Kt(e,t,r,null==n?1:n)}),st(lt,{brighter(e){return new Kt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Kt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Zt(this).rgb()}})),cr.prototype=ir.prototype={constructor:cr,count:function(){return this.eachAfter(or)},each:function(e){var t,r,n,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,r,n=this,o=[n];n=o.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)o.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].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(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,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 ir(this).eachBefore(sr)}};var ur,dr,pr=(ur=function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),v=p-g,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=g>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(h="",v=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)h+=d.charAt(y),!((y-v+1)%l)&&y<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},ur(dr={exports:{}}),dr.exports);function fr(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var mr={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"},hr=/%$/,gr=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,vr=/^\(oct\)/i,br=/^\(dec\)/i,yr=/^\(hex\)/i,xr=/^\(bin\)/i,Sr=/^\(rom\)/i,Cr=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,wr=/#|0/g;function Er(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 Rr(e,t,r){var n=fr(e);return r?n:new RegExp(n||"",t)}function Or(e,t,r){var n,o,i,a,s,l,c,u,d,p,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),p=t,(f=r)&&(f=fr(f)),p&&(p=fr(p)),d=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(d))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===r&&(o=(n=i.split(r)).pop(),i=n.join("")+r+o,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(i=i.replace(Rr(l,"g"),t)),c=r,r=".",c&&(i=i.replace(Rr(c,"g"),r)),u=(u=i.match(/#/g))?u.length:0;var h,g=m.split(c);g[1]&&(h=g[1].match(wr)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=hr.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(Rr(t,null,!0),"|").concat(Rr(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=c,e.t=t,e.d=r,e.temp=u}!function(){function e(t,r,n,o,i){er(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return mr;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()}rr(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],Cr.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Cr.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Cr.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Or(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Or(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Or(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,o,i,a,s,l,c,u=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return(u=u.zero).pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,i=u.d,a=u.t,u.isFunctional)e=function(e,t,r){var n;return gr.test(t)?e=Er(e,Number(/\d{2}/.exec(t)[0]),t,r):vr.test(t)?e=Er(e,8,t,r):br.test(t)?e=Er(e,10,t,r):yr.test(t)?e=Er(e,16,t,r):xr.test(t)?e=Er(e,2,t,r):Sr.test(t)&&(n="",e<0&&(n="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var r,n="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();o>0;)for(r=0;r<a.length;r++)if(a[r]<=o){n+=s[r],o-=a[r];break}for(r=0;r<i;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t),e=n+e):e=t+n+e.toExponential(0)),e}(e,u.pattern,i);else{if(u.percentage&&(e*=100),u.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),v=g[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);v<=r&&s<g.length;)v=g[++s];s>0&&(m=g[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(v<0&&v-r<=u.maxPrecision?h=v:m<=r&&!(v>0&&-r<=u.maxPrecision)&&(h=m)),h&&(d=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=u.temp,c=(l=u.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,c||"#"!==l.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var b=Number(e.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),y=l.split(i)[0];if(e=pr(y+=i,b)||"0",c){var x=Math.max(0,Math.min(14,c.length)),S=c.replace(/#+$/,"").length,C=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=C.length;s<S;s++)C+="0";C&&(e+=i+C)}else 0===b&&(o=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=o.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(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=pr(l,e)}e=e.replace(u.numericRegex,(function(e){return e===a?u.groupTemp:e===i?u.decTemp:""})),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}])}();var Lr=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],kr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ar=["January","February","March","April","May","June","July","August","September","October","November","December"],Mr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ir(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Tr(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){er(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Lr,qDayNames:kr,qLongMonthNames:Ar,qMonthNames:Mr}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),r||(r=(nr(o={},"T",i.qTimeFmt||"hh:mm:ss"),nr(o,"D",i.qDateFmt||"YYYY-MM-DD"),nr(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[n]),this.pattern=r}rr(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,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(n=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:i,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:n.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){var r,n=function(e){var t=e,r=24*Tr(t),n=60*Tr(r),o=60*Tr(n),i=1e3*Tr(o);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(o),f:Math.round(i)}}(e),o=n.d,i=n.h,a=n.m,s=n.s,l=n.f,c=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=r?r.getDay()-1:0)<0&&(c=6);var u="";return r&&(u=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:o,h:i,m:a,s:s,f:l,t:u}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Ir("".concat(t.year).slice(-2),2),YYY:Ir("".concat(t.year).slice(-3),3),def:function(e){return Ir("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Ir("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ir("".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 Ir("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Ir("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Ir("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Ir("".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 o=0;o<n;o++)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.slice(0,e.length)}}}}(this,r),c=[];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&c.push(u);var d=new RegExp(c.join("|"),"g"),p=t.replace(d,(function(e){var t,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var o in l[r])if(o===e||o.toLowerCase()===e){void 0===(n=l[r][o])&&(n=l[r][o.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}));return p}}])}();var Dr=function(e,t,r,n){var o=t;n&&(o=t-n);var i=JSON.parse(JSON.stringify(e[o]));if(Array.isArray(r)&&r.length>0){var a=r[t];i.qDef.columnWidth=-1===a?{type:re.FIT_TO_CONTENT}:{type:re.PIXELS,pixels:a}}return i},Pr=function(e,t,r,n){var o=ke.hypercube.importProperties({exportFormat:e,initialProperties:t,dataDefinition:U().targets[0],defaultPropertyValues:{defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},hypercubePath:n,extension:r});ke.unquarantineProperty(o.qProperty,"straightTableColumnOrder");var i=o.qProperty.qHyperCubeDef,a=i.qDimensions,s=i.qMeasures,l=i.qColumnOrder,c=i.columnWidths,u=function(e,t,r,n){var o=e.length,i=o+t.length,a=(null==r?void 0:r.length)===i?r:Array.from(Array(i).keys());return{dimensions:a.filter((function(e){return e<o})).map((function(t){return Dr(e,t,n)})),measures:a.filter((function(e){return e>=o})).map((function(e){return Dr(t,e,n,o)}))}}(a,s,l,c),d=u.dimensions,p=u.measures;return Array.isArray(c)&&c.length>0&&(Jt(o,"qProperty.qHyperCubeDef.qDimensions",d),Jt(o,"qProperty.qHyperCubeDef.qMeasures",p)),ke.conditionalShow.unquarantine(o.qProperty),o},_r=function(e,t){var r=ke.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),n=r.properties.qHyperCubeDef,o=n.qColumnOrder,i=function(e,t,r){var n=e.length+t.length,o=((null==r?void 0:r.length)===n?r:Array.from(Array(n).keys())).map((function(r){return function(e,t,r){var n,o=t.length,i=(e<o?t[e]:r[e-o]).qDef.columnWidth;return"pixels"===(null==i?void 0:i.type)?null!==(n=i.pixels)&&void 0!==n?n:200:-1}(r,e,t)}));return o}(n.qDimensions,n.qMeasures,o);return Jt(r,"properties.qHyperCubeDef",F(F({},r.properties.qHyperCubeDef),{columnWidths:i})),ke.quarantineProperty(r.properties,"qHyperCubeDef.columnWidths","straightTableColumnWidths"),ke.quarantineProperty(r.properties,"qHyperCubeDef.qColumnOrder","straightTableColumnOrder"),ke.quarantineProperty(r.properties,"qHyperCubeDef.columnOrder","straightTableColumnOrder"),r};const Nr=e=>e.flags.isEnabled("PS_18291_TABLE_EXPLORATION")&&{exploration:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}}};function qr(e){return{definition:Se(e),...Nr(e),data:Oe(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0},importProperties:Pr,exportProperties:_r}}var $r,zr=x;$r=zr.createRoot,zr.hydrateRoot;var Br=function(e){var n=t((function(){return $r(e)}),[e]);return r((function(){return function(){return n.unmount()}}),[n]),n},Fr=function(e,r){return t((function(){return function(e,t){if(t)return function(r){return H(void 0,void 0,void 0,(function(){var n,o,i,a,s,l,c;return W(this,(function(u){switch(u.label){case 0:return n=r.isDim,o=r.colIdx,i=r.qReverseSort,a=n?o:o-e,[4,t.getEffectiveProperties()];case 1:return s=u.sent(),l=s.qHyperCubeDef.qInterColumnSortOrder,c=[],o!==l[0]?(l.splice(l.indexOf(o),1),l.unshift(o),c.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:"[".concat(l.join(","),"]")})):c.push({qPath:"/qHyperCubeDef/".concat(n?"qDimensions":"qMeasures","/").concat(a,"/qDef/qReverseSort"),qOp:"Replace",qValue:(!i).toString()}),t.applyPatches(c,!0),[2]}}))}))}}(e.qDimensionInfo.length,r)}),[e.qDimensionInfo.length,r])},jr={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Hr=function(e){return parseInt(e.repeat(2/e.length),16)},Wr=function(e){var t=Math.floor((e.length-1)/3),r=function(e,t){return e.match(new RegExp(".{".concat(t,"}"),"g"))}(e.slice(1),t),n=r.map(Hr),o=n[0],i=n[1],a=n[2],s=n[3];return void 0!==s?"rgba(".concat(o,",").concat(i,",").concat(a,",").concat(s/255,")"):"rgb(".concat(o,",").concat(i,",").concat(a,")")};function Vr(e){var t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return"rgb(".concat(t[1],",").concat(t[2],",").concat(t[3],")");if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e))return"rgba(".concat(t[1],",").concat(t[2],",").concat(t[3],",").concat(t[4],")");if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e)){var r=Math.round(+t[1]/2.55)/100;return"rgba(".concat(t[2],",").concat(t[3],",").concat(t[4],",").concat(r,")")}if(t=/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i.exec(e))return Wr(e);var n=e&&jr[e.toLowerCase()];return n?void 0!==n.a?"rgba(".concat(n.r,",").concat(n.g,",").concat(n.b,",").concat(n.a,")"):"rgb(".concat(n.r,",").concat(n.g,",").concat(n.b,")"):"none"}function Gr(e){if(null==e)return!1;var t=Vr(e),r=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t)||/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),n=null==r?void 0:r[1],o=null==r?void 0:r[2],i=null==r?void 0:r[3];return!!(void 0!==n&&void 0!==o&&void 0!==i)&&.299*+n+.587*+o+.114*+i<125}var Ur=function(e,t){var r=null==t?void 0:t.closest(".qv-object .qv-inner-object"),n=r&&window.getComputedStyle(r).backgroundColor,o=null==t?void 0:t.closest(".qv-panel-sheet"),i=o&&window.getComputedStyle(o).backgroundColor,a=e.getStyle("","","object.straightTableV2.backgroundColor"),s=e.getStyle("object","straightTableV2","backgroundColor"),l=a||n||s,c=function(e){if(void 0===e)return!1;var t=Vr(e),r=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),n=null==r?void 0:r[4];return void 0!==n&&0==+n}(l);return{tableColorFromTheme:a||"inherit",color:l,isDark:Gr(c?i:l),isTransparent:c}},Yr=function(e){var r=n();return t((function(){return F(F({},r),{background:Ur(r,e)})}),[r.name(),e])},Xr={exports:{}},Kr={},Zr=60103,Jr=60106,Qr=60107,en=60108,tn=60114,rn=60109,nn=60110,on=60112,an=60113,sn=60120,ln=60115,cn=60116,un=60121,dn=60122,pn=60117,fn=60129,mn=60131;if("function"==typeof Symbol&&Symbol.for){var hn=Symbol.for;Zr=hn("react.element"),Jr=hn("react.portal"),Qr=hn("react.fragment"),en=hn("react.strict_mode"),tn=hn("react.profiler"),rn=hn("react.provider"),nn=hn("react.context"),on=hn("react.forward_ref"),an=hn("react.suspense"),sn=hn("react.suspense_list"),ln=hn("react.memo"),cn=hn("react.lazy"),un=hn("react.block"),dn=hn("react.server.block"),pn=hn("react.fundamental"),fn=hn("react.debug_trace_mode"),mn=hn("react.legacy_hidden")}function gn(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Zr:switch(e=e.type){case Qr:case tn:case en:case an:case sn:return e;default:switch(e=e&&e.$$typeof){case nn:case on:case cn:case ln:case rn:return e;default:return t}}case Jr:return t}}}var vn=rn,bn=Zr,yn=on,xn=Qr,Sn=cn,Cn=ln,wn=Jr,En=tn,Rn=en,On=an;Kr.ContextConsumer=nn,Kr.ContextProvider=vn,Kr.Element=bn,Kr.ForwardRef=yn,Kr.Fragment=xn,Kr.Lazy=Sn,Kr.Memo=Cn,Kr.Portal=wn,Kr.Profiler=En,Kr.StrictMode=Rn,Kr.Suspense=On,Kr.isAsyncMode=function(){return!1},Kr.isConcurrentMode=function(){return!1},Kr.isContextConsumer=function(e){return gn(e)===nn},Kr.isContextProvider=function(e){return gn(e)===rn},Kr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Zr},Kr.isForwardRef=function(e){return gn(e)===on},Kr.isFragment=function(e){return gn(e)===Qr},Kr.isLazy=function(e){return gn(e)===cn},Kr.isMemo=function(e){return gn(e)===ln},Kr.isPortal=function(e){return gn(e)===Jr},Kr.isProfiler=function(e){return gn(e)===tn},Kr.isStrictMode=function(e){return gn(e)===en},Kr.isSuspense=function(e){return gn(e)===an},Kr.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Qr||e===tn||e===fn||e===en||e===an||e===sn||e===mn||"object"==typeof e&&null!==e&&(e.$$typeof===cn||e.$$typeof===ln||e.$$typeof===rn||e.$$typeof===nn||e.$$typeof===on||e.$$typeof===pn||e.$$typeof===un||e[0]===dn)},Kr.typeOf=gn,Xr.exports=Kr;var Ln=Xr.exports,kn=function(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=r?r.call(n,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0},An=Y(kn);function Mn(e){function t(e,n,l,c,p){for(var f,m,h,g,x,C=0,w=0,E=0,R=0,O=0,T=0,P=h=f=0,N=0,q=0,$=0,z=0,B=l.length,F=B-1,j="",H="",W="",V="";N<B;){if(m=l.charCodeAt(N),N===F&&0!==w+R+E+C&&(0!==w&&(m=47===w?10:47),R=E=C=0,B++,F++),0===w+R+E+C){if(N===F&&(0<q&&(j=j.replace(d,"")),0<j.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:j+=l.charAt(N)}m=59}switch(m){case 123:for(f=(j=j.trim()).charCodeAt(0),h=1,z=++N;N<B;){switch(m=l.charCodeAt(N)){case 123:h++;break;case 125:h--;break;case 47:switch(m=l.charCodeAt(N+1)){case 42:case 47:e:{for(P=N+1;P<F;++P)switch(l.charCodeAt(P)){case 47:if(42===m&&42===l.charCodeAt(P-1)&&N+2!==P){N=P+1;break e}break;case 10:if(47===m){N=P+1;break e}}N=P}}break;case 91:m++;case 40:m++;case 34:case 39:for(;N++<F&&l.charCodeAt(N)!==m;);}if(0===h)break;N++}if(h=l.substring(z,N),0===f&&(f=(j=j.replace(u,"").trim()).charCodeAt(0)),64===f){switch(0<q&&(j=j.replace(d,"")),m=j.charCodeAt(1)){case 100:case 109:case 115:case 45:q=n;break;default:q=I}if(z=(h=t(n,q,h,m,p+1)).length,0<D&&(x=s(3,h,q=r(I,j,$),n,k,L,z,m,p,c),j=q.join(""),void 0!==x&&0===(z=(h=x.trim()).length)&&(m=0,h="")),0<z)switch(m){case 115:j=j.replace(S,a);case 100:case 109:case 45:h=j+"{"+h+"}";break;case 107:h=(j=j.replace(v,"$1 $2"))+"{"+h+"}",h=1===M||2===M&&i("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=j+h,112===c&&(H+=h,h="")}else h=""}else h=t(n,r(n,j,$),h,c,p+1);W+=h,h=$=q=P=f=0,j="",m=l.charCodeAt(++N);break;case 125:case 59:if(1<(z=(j=(0<q?j.replace(d,""):j).trim()).length))switch(0===P&&(f=j.charCodeAt(0),45===f||96<f&&123>f)&&(z=(j=j.replace(" ",":")).length),0<D&&void 0!==(x=s(1,j,n,e,k,L,H.length,c,p,c))&&0===(z=(j=x.trim()).length)&&(j="\0\0"),f=j.charCodeAt(0),m=j.charCodeAt(1),f){case 0:break;case 64:if(105===m||99===m){V+=j+l.charAt(N);break}default:58!==j.charCodeAt(z-1)&&(H+=o(j,f,m,j.charCodeAt(2)))}$=q=P=f=0,j="",m=l.charCodeAt(++N)}}switch(m){case 13:case 10:47===w?w=0:0===1+f&&107!==c&&0<j.length&&(q=1,j+="\0"),0<D*_&&s(0,j,n,e,k,L,H.length,c,p,c),L=1,k++;break;case 59:case 125:if(0===w+R+E+C){L++;break}default:switch(L++,g=l.charAt(N),m){case 9:case 32:if(0===R+C+w)switch(O){case 44:case 58:case 9:case 32:g="";break;default:32!==m&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===R+w+C&&(q=$=1,g="\f"+g);break;case 108:if(0===R+w+C+A&&0<P)switch(N-P){case 2:112===O&&58===l.charCodeAt(N-3)&&(A=O);case 8:111===T&&(A=T)}break;case 58:0===R+w+C&&(P=N);break;case 44:0===w+E+R+C&&(q=1,g+="\r");break;case 34:case 39:0===w&&(R=R===m?0:0===R?m:R);break;case 91:0===R+w+E&&C++;break;case 93:0===R+w+E&&C--;break;case 41:0===R+w+C&&E--;break;case 40:if(0===R+w+C){if(0===f)if(2*O+3*T==533);else f=1;E++}break;case 64:0===w+E+R+C+P+h&&(h=1);break;case 42:case 47:if(!(0<R+C+E))switch(w){case 0:switch(2*m+3*l.charCodeAt(N+1)){case 235:w=47;break;case 220:z=N,w=42}break;case 42:47===m&&42===O&&z+2!==N&&(33===l.charCodeAt(z+2)&&(H+=l.substring(z,N+1)),g="",w=0)}}0===w&&(j+=g)}T=O,O=m,N++}if(0<(z=H.length)){if(q=n,0<D&&(void 0!==(x=s(2,H,q,e,k,L,z,c,p,c))&&0===(H=x).length))return V+H+W;if(H=q.join(",")+"{"+H+"}",0!=M*A){switch(2!==M||i(H,2)||(A=0),A){case 111:H=H.replace(y,":-moz-$1")+H;break;case 112:H=H.replace(b,"::-webkit-input-$1")+H.replace(b,"::-moz-$1")+H.replace(b,":-ms-input-$1")+H}A=0}}return V+H+W}function r(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[l++]=n(e[c]+" ",o[s],r).trim()}return t}function n(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,r,n){var a=e+";",s=2*t+3*r+4*n;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===M||2===M&&i(l,1)?"-webkit-"+l+l:l}if(0===M||2===M&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(O,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(x,"tb");break;case 232:l=a.replace(x,"tb-rl");break;case 220:l=a.replace(x,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(w,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(w,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===R.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),P(2!==t?n:n.replace(E,"$1"),r,t)}function a(e,t){var r=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(C," or ($1)").substring(4):"("+t+")"}function s(e,t,r,n,o,i,a,s,l,u){for(var d,p=0,f=t;p<D;++p)switch(d=T[p].call(c,e,f,r,n,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function l(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?M=1:(M=2,P=e):M=0),l}function c(e,r){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<D){var o=s(-1,r,n,n,k,L,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=t(I,n,r,0,0);return 0<D&&(void 0!==(o=s(-2,i,n,n,k,L,i.length,0,0,0))&&(i=o)),"",A=0,L=k=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,m=/([,: ])(transform)/g,h=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,y=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,w=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,R=/stretch|:\s*\w+\-(?:conte|avail)/,O=/([^-])(image-set\()/,L=1,k=1,A=0,M=1,I=[],T=[],D=0,P=null,_=0;return c.use=function e(t){switch(t){case void 0:case null:D=T.length=0;break;default:if("function"==typeof t)T[D++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else _=0|!!t}return e},c.set=l,void 0!==e&&l(e),c}var In={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Tn(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var Dn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Pn=Tn((function(e){return Dn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),_n={exports:{}},Nn={},qn="function"==typeof Symbol&&Symbol.for,$n=qn?Symbol.for("react.element"):60103,zn=qn?Symbol.for("react.portal"):60106,Bn=qn?Symbol.for("react.fragment"):60107,Fn=qn?Symbol.for("react.strict_mode"):60108,jn=qn?Symbol.for("react.profiler"):60114,Hn=qn?Symbol.for("react.provider"):60109,Wn=qn?Symbol.for("react.context"):60110,Vn=qn?Symbol.for("react.async_mode"):60111,Gn=qn?Symbol.for("react.concurrent_mode"):60111,Un=qn?Symbol.for("react.forward_ref"):60112,Yn=qn?Symbol.for("react.suspense"):60113,Xn=qn?Symbol.for("react.suspense_list"):60120,Kn=qn?Symbol.for("react.memo"):60115,Zn=qn?Symbol.for("react.lazy"):60116,Jn=qn?Symbol.for("react.block"):60121,Qn=qn?Symbol.for("react.fundamental"):60117,eo=qn?Symbol.for("react.responder"):60118,to=qn?Symbol.for("react.scope"):60119;function ro(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case $n:switch(e=e.type){case Vn:case Gn:case Bn:case jn:case Fn:case Yn:return e;default:switch(e=e&&e.$$typeof){case Wn:case Un:case Zn:case Kn:case Hn:return e;default:return t}}case zn:return t}}}function no(e){return ro(e)===Gn}Nn.AsyncMode=Vn,Nn.ConcurrentMode=Gn,Nn.ContextConsumer=Wn,Nn.ContextProvider=Hn,Nn.Element=$n,Nn.ForwardRef=Un,Nn.Fragment=Bn,Nn.Lazy=Zn,Nn.Memo=Kn,Nn.Portal=zn,Nn.Profiler=jn,Nn.StrictMode=Fn,Nn.Suspense=Yn,Nn.isAsyncMode=function(e){return no(e)||ro(e)===Vn},Nn.isConcurrentMode=no,Nn.isContextConsumer=function(e){return ro(e)===Wn},Nn.isContextProvider=function(e){return ro(e)===Hn},Nn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===$n},Nn.isForwardRef=function(e){return ro(e)===Un},Nn.isFragment=function(e){return ro(e)===Bn},Nn.isLazy=function(e){return ro(e)===Zn},Nn.isMemo=function(e){return ro(e)===Kn},Nn.isPortal=function(e){return ro(e)===zn},Nn.isProfiler=function(e){return ro(e)===jn},Nn.isStrictMode=function(e){return ro(e)===Fn},Nn.isSuspense=function(e){return ro(e)===Yn},Nn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Bn||e===Gn||e===jn||e===Fn||e===Yn||e===Xn||"object"==typeof e&&null!==e&&(e.$$typeof===Zn||e.$$typeof===Kn||e.$$typeof===Hn||e.$$typeof===Wn||e.$$typeof===Un||e.$$typeof===Qn||e.$$typeof===eo||e.$$typeof===to||e.$$typeof===Jn)},Nn.typeOf=ro,_n.exports=Nn;var oo=_n.exports,io={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ao={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},so={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},lo={};function co(e){return oo.isMemo(e)?so:lo[e.$$typeof]||io}lo[oo.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lo[oo.Memo]=so;var uo=Object.defineProperty,po=Object.getOwnPropertyNames,fo=Object.getOwnPropertySymbols,mo=Object.getOwnPropertyDescriptor,ho=Object.getPrototypeOf,go=Object.prototype;var vo=function e(t,r,n){if("string"!=typeof r){if(go){var o=ho(r);o&&o!==go&&e(t,o,n)}var i=po(r);fo&&(i=i.concat(fo(r)));for(var a=co(t),s=co(r),l=0;l<i.length;++l){var c=i[l];if(!(ao[c]||n&&n[c]||s&&s[c]||a&&a[c])){var u=mo(r,c);try{uo(t,c,u)}catch(e){}}}}return t},bo=Y(vo);function yo(){return(yo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var xo=function(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r},So=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Ln.typeOf(e)},Co=Object.freeze([]),wo=Object.freeze({});function Eo(e){return"function"==typeof e}function Ro(e){return e.displayName||e.name||"Component"}function Oo(e){return e&&"string"==typeof e.styledComponentId}var Lo="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ko="undefined"!=typeof window&&"HTMLElement"in window,Ao=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY))),Mo={};function Io(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var To=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)(o<<=1)<0&&Io(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),Do=new Map,Po=new Map,_o=1,No=function(e){if(Do.has(e))return Do.get(e);for(;Po.has(_o);)_o++;var t=_o++;return Do.set(e,t),Po.set(t,e),t},qo=function(e){return Po.get(e)},$o=function(e,t){t>=_o&&(_o=t+1),Do.set(e,t),Po.set(t,e)},zo="style["+Lo+'][data-styled-version="5.3.11"]',Bo=new RegExp("^"+Lo+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Fo=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},jo=function(e,t){for(var r=(t.textContent||"").split("/*!sc*/\n"),n=[],o=0,i=r.length;o<i;o++){var a=r[o].trim();if(a){var s=a.match(Bo);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&($o(c,l),Fo(e,c,s[3]),e.getTag().insertRules(l,n)),n.length=0}else n.push(a)}}},Ho=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(Lo))return n}}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(Lo,"active"),n.setAttribute("data-styled-version","5.3.11");var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},Wo=function(){function e(e){var t=this.element=Ho(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}Io(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Vo=function(){function e(e){var t=this.element=Ho(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Go=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Uo=ko,Yo={isServer:!ko,useCSSOMInjection:!Ao},Xo=function(){function e(e,t,r){void 0===e&&(e=wo),void 0===t&&(t={}),this.options=yo({},Yo,{},e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&ko&&Uo&&(Uo=!1,function(e){for(var t=document.querySelectorAll(zo),r=0,n=t.length;r<n;r++){var o=t[r];o&&"active"!==o.getAttribute(Lo)&&(jo(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return No(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(yo({},this.options,{},t),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(t=this.options).isServer,n=t.useCSSOMInjection,o=t.target,e=r?new Go(o):n?new Wo(o):new Vo(o),new To(e)));var e,t,r,n,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(No(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},t.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(No(e),r)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(No(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=0;o<r;o++){var i=qo(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var l=Lo+".g"+o+'[id="'+i+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),n+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return n}(this)},e}(),Ko=/(a)(d)/gi,Zo=function(e){return String.fromCharCode(e+(e>25?39:97))};function Jo(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Zo(t%52)+r;return(Zo(t%52)+r).replace(Ko,"$1-$2")}var Qo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},ei=function(e){return Qo(5381,e)};function ti(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Eo(r)&&!Oo(r))return!1}return!0}var ri=ei("5.3.11"),ni=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&ti(e),this.componentId=t,this.baseHash=Qo(ri,t),this.baseStyle=r,Xo.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))o.push(this.staticRulesId);else{var i=Si(this.rules,e,t,r).join(""),a=Jo(Qo(this.baseHash,i)>>>0);if(!t.hasNameForId(n,a)){var s=r(i,"."+a,void 0,n);t.insertRules(n,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=Qo(this.baseHash,r.hash),u="",d=0;d<l;d++){var p=this.rules[d];if("string"==typeof p)u+=p;else if(p){var f=Si(p,e,t,r),m=Array.isArray(f)?f.join(""):f;c=Qo(c,m+d),u+=m}}if(u){var h=Jo(c>>>0);if(!t.hasNameForId(n,h)){var g=r(u,"."+h,void 0,n);t.insertRules(n,h,g)}o.push(h)}}return o.join(" ")},e}(),oi=/^\s*\/\/.*$/gm,ii=[":","[",".","#"];function ai(e){var t,r,n,o,i=void 0===e?wo:e,a=i.options,s=void 0===a?wo:a,l=i.plugins,c=void 0===l?Co:l,u=new Mn(s),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,o,i,a,s,l,c,u,d){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+n),"";default:return n+(0===d?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),f=function(e,n,i){return 0===n&&-1!==ii.indexOf(i[r.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var l=e.replace(oi,""),c=i&&a?a+" "+i+" { "+l+" }":l;return t=s,r=i,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(a||!i?"":i,c)}return u.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(r)>0&&(o[0]=o[0].replace(n,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=c.length?c.reduce((function(e,t){return t.name||Io(15),Qo(e,t.name)}),5381).toString():"",m}var si=C.createContext();si.Consumer;var li=C.createContext(),ci=(li.Consumer,new Xo),ui=ai();function di(){return O(si)||ci}function pi(){return O(li)||ui}function fi(e){var t=w(e.stylisPlugins),r=t[0],n=t[1],o=di(),i=E((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),a=E((function(){return ai({options:{prefix:!e.disableVendorPrefixes},plugins:r})}),[e.disableVendorPrefixes,r]);return R((function(){An(r,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]),C.createElement(si.Provider,{value:i},C.createElement(li.Provider,{value:a},e.children))}var mi=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=ui);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return Io(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ui),this.name+e.hash},e}(),hi=/([A-Z])/,gi=/([A-Z])/g,vi=/^ms-/,bi=function(e){return"-"+e.toLowerCase()};function yi(e){return hi.test(e)?e.replace(gi,bi).replace(vi,"-ms-"):e}var xi=function(e){return null==e||!1===e||""===e};function Si(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=Si(e[a],t,r,n))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return xi(e)?"":Oo(e)?"."+e.styledComponentId:Eo(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:Si(e(t),t,r,n):e instanceof mi?r?(e.inject(r,n),e.getName(n)):e:So(e)?function e(t,r){var n,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!xi(t[a])&&(Array.isArray(t[a])&&t[a].isCss||Eo(t[a])?i.push(yi(a)+":",t[a],";"):So(t[a])?i.push.apply(i,e(t[a],a)):i.push(yi(a)+": "+(n=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in In||n.startsWith("--")?String(o).trim():o+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString();var l}var Ci=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function wi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Eo(e)||So(e)?Ci(Si(xo(Co,[e].concat(r)))):0===r.length&&1===e.length&&"string"==typeof e[0]?e:Ci(Si(xo(e,r)))}var Ei=function(e,t,r){return void 0===r&&(r=wo),e.theme!==r.theme&&e.theme||t||r.theme},Ri=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Oi=/(^-|-$)/g;function Li(e){return e.replace(Ri,"-").replace(Oi,"")}var ki=function(e){return Jo(ei(e)>>>0)};function Ai(e){return"string"==typeof e&&!0}var Mi=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ii=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ti(e,t,r){var n=e[r];Mi(t)&&Mi(n)?Di(n,t):e[r]=t}function Di(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var o=0,i=r;o<i.length;o++){var a=i[o];if(Mi(a))for(var s in a)Ii(s)&&Ti(e,a[s],s)}return e}var Pi=C.createContext();Pi.Consumer;var _i={};function Ni(e,t,r){var n=Oo(e),o=!Ai(e),i=t.attrs,a=void 0===i?Co:i,s=t.componentId,l=void 0===s?function(e,t){var r="string"!=typeof e?"sc":Li(e);_i[r]=(_i[r]||0)+1;var n=r+"-"+ki("5.3.11"+r+_i[r]);return t?t+"-"+n:n}(t.displayName,t.parentComponentId):s,c=t.displayName,u=void 0===c?function(e){return Ai(e)?"styled."+e:"Styled("+Ro(e)+")"}(e):c,d=t.displayName&&t.componentId?Li(t.displayName)+"-"+t.componentId:t.componentId||l,p=n&&e.attrs?Array.prototype.concat(e.attrs,a).filter(Boolean):a,f=t.shouldForwardProp;n&&e.shouldForwardProp&&(f=t.shouldForwardProp?function(r,n,o){return e.shouldForwardProp(r,n,o)&&t.shouldForwardProp(r,n,o)}:e.shouldForwardProp);var m,h=new ni(r,d,n?e.componentStyle:void 0),g=h.isStatic&&0===a.length,v=function(e,t){return function(e,t,r,n){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,l=e.shouldForwardProp,c=e.styledComponentId,u=e.target,d=function(e,t,r){void 0===e&&(e=wo);var n=yo({},t,{theme:e}),o={};return r.forEach((function(e){var t,r,i,a=e;for(t in Eo(a)&&(a=a(n)),a)n[t]=o[t]="className"===t?(r=o[t],i=a[t],r&&i?r+" "+i:r||i):a[t]})),[n,o]}(Ei(t,O(Pi),a)||wo,t,o),p=d[0],f=d[1],m=function(e,t,r,n){var o=di(),i=pi();return t?e.generateAndInjectStyles(wo,o,i):e.generateAndInjectStyles(r,o,i)}(i,n,p),h=r,g=f.$as||t.$as||f.as||t.as||u,v=Ai(g),b=f!==t?yo({},t,{},f):t,y={};for(var x in b)"$"!==x[0]&&"as"!==x&&("forwardedAs"===x?y.as=b[x]:(l?l(x,Pn,g):!v||Pn(x))&&(y[x]=b[x]));return t.style&&f.style!==t.style&&(y.style=yo({},t.style,{},f.style)),y.className=Array.prototype.concat(s,c,m!==c?m:null,t.className,f.className).filter(Boolean).join(" "),y.ref=h,L(g,y)}(m,e,t,g)};return v.displayName=u,(m=C.forwardRef(v)).attrs=p,m.componentStyle=h,m.displayName=u,m.shouldForwardProp=f,m.foldedComponentIds=n?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Co,m.styledComponentId=d,m.target=n?e.target:e,m.withComponent=function(e){var n=t.componentId,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(t,["componentId"]),i=n&&n+"-"+(Ai(e)?e:Li(Ro(e)));return Ni(e,yo({},o,{attrs:p,componentId:i}),r)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=n?Di({},e.defaultProps,t):t}}),Object.defineProperty(m,"toString",{value:function(){return"."+m.styledComponentId}}),o&&bo(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var qi=function(e){return function e(t,r,n){if(void 0===n&&(n=wo),!Ln.isValidElementType(r))return Io(1,String(r));var o=function(){return t(r,n,wi.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,r,yo({},n,{},o))},o.attrs=function(o){return e(t,r,yo({},n,{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o}(Ni,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){qi[e]=qi(e)}));var $i=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ti(e),Xo.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,r,n){var o=n(Si(this.rules,t,r,n).join(""),""),i=this.componentId+e;r.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,r,n){e>2&&Xo.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}();function zi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=wi.apply(void 0,[e].concat(r)).join(""),i=ki(o);return new mi(i,o)}var Bi=qi;function Fi(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function ji(e){if(!Fi(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=ji(e[r])})),t}function Hi(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Fi(e)&&Fi(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(Fi(t[o])&&o in e&&Fi(e[o])?n[o]=Hi(e[o],t[o],r):r.clone?n[o]=Fi(t[o])?ji(t[o]):t[o]:n[o]=t[o])})),n}var Wi={exports:{}};function Vi(){}function Gi(){}Gi.resetWarningCache=Vi;Wi.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Gi,resetWarningCache:Vi};return r.PropTypes=r,r}();var Ui=Y(Wi.exports);function Yi(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Xi(e){if("string"!=typeof e)throw new Error(Yi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ki(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}function Zi(e,t=166){let r;function n(...n){clearTimeout(r),r=setTimeout((()=>{e.apply(this,n)}),t)}return n.clear=()=>{clearTimeout(r)},n}function Ji(e,t){return A.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}function Qi(e){return e&&e.ownerDocument||document}function ea(e){return Qi(e).defaultView||window}function ta(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var ra="undefined"!=typeof window?A.useLayoutEffect:A.useEffect;let na=0;const oa=A["useId".toString()];function ia(e){if(void 0!==oa){const t=oa();return null!=e?e:t}return function(e){const[t,r]=A.useState(e),n=e||t;return A.useEffect((()=>{null==t&&(na+=1,r(`mui-${na}`))}),[t]),n}(e)}function aa({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=A.useRef(void 0!==e),[i,a]=A.useState(t);return[o?e:i,A.useCallback((e=>{o||a(e)}),[])]}function sa(e){const t=A.useRef(e);return ra((()=>{t.current=e})),A.useCallback(((...e)=>(0,t.current)(...e)),[])}function la(...e){return A.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{ta(e,t)}))}),e)}let ca,ua=!0,da=!1;const pa={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function fa(e){e.metaKey||e.altKey||e.ctrlKey||(ua=!0)}function ma(){ua=!1}function ha(){"hidden"===this.visibilityState&&da&&(ua=!0)}function ga(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return ua||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!pa[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function va(){const e=A.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",fa,!0),t.addEventListener("mousedown",ma,!0),t.addEventListener("pointerdown",ma,!0),t.addEventListener("touchstart",ma,!0),t.addEventListener("visibilitychange",ha,!0))}),[]),t=A.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!ga(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(da=!0,window.clearTimeout(ca),ca=window.setTimeout((()=>{da=!1}),100),t.current=!1,!0)},ref:e}}function ba(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let ya;function xa(){if(ya)return ya;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),ya="reverse",e.scrollLeft>0?ya="default":(e.scrollLeft=1,0===e.scrollLeft&&(ya="negative")),document.body.removeChild(e),ya}function Sa(e,t){const r=e.scrollLeft;if("rtl"!==t)return r;switch(xa()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}var Ca=e=>{const t=A.useRef({});return A.useEffect((()=>{t.current=e})),t.current};var wa={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Ea(e,t){const r={...t};return Object.keys(e).forEach((n=>{if(n.toString().match(/^(components|slots)$/))r[n]={...e[n],...r[n]};else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},i&&Object.keys(i)?o&&Object.keys(o)?(r[n]={...i},Object.keys(o).forEach((e=>{r[n][e]=Ea(o[e],i[e])}))):r[n]=i:r[n]=o}else void 0===r[n]&&(r[n]=e[n])})),r}function Ra(e,t,r=void 0){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}const Oa=e=>e;var La=(()=>{let e=Oa;return{configure(t){e=t},generate:t=>e(t),reset(){e=Oa}}})();const ka={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Aa(e,t,r="Mui"){const n=ka[t];return n?`${r}-${n}`:`${La.generate(e)}-${t}`}function Ma(e,t,r="Mui"){const n={};return t.forEach((t=>{n[t]=Aa(e,t,r)})),n}var Ia="$$material";function Ta(){return Ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ta.apply(this,arguments)}function Da(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function Pa(e){const{injectFirst:t,children:r}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return r}Pa.propTypes={children:Ui.node,injectFirst:Ui.bool};const _a=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=wi.apply(void 0,[e].concat(r)),i="sc-global-"+ki(JSON.stringify(o)),a=new $i(o,i);function s(e){var t=di(),r=pi(),n=O(Pi),o=k(t.allocateGSInstance(i)).current;return t.server&&l(o,e,t,n,r),null}function l(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,Mo,r,o);else{var i=yo({},t,{theme:Ei(t,n,s.defaultProps)});a.renderStyles(e,i,r,o)}}return C.memo(s)}((e=>{const{styles:t,defaultTheme:r={}}=e;return"function"==typeof t?t(null==(n=e.theme)||0===Object.keys(n).length?r:e.theme):t;var n}));var Na=_a;
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),v=p-g,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=g>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(h="",v=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)h+=d.charAt(y),!((y-v+1)%l)&&y<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},ur(dr={exports:{}}),dr.exports);function fr(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var mr={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"},hr=/%$/,gr=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,vr=/^\(oct\)/i,br=/^\(dec\)/i,yr=/^\(hex\)/i,xr=/^\(bin\)/i,Sr=/^\(rom\)/i,Cr=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,wr=/#|0/g;function Er(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 Rr(e,t,r){var n=fr(e);return r?n:new RegExp(n||"",t)}function Or(e,t,r){var n,o,i,a,s,l,c,u,d,p,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),p=t,(f=r)&&(f=fr(f)),p&&(p=fr(p)),d=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(d))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===r&&(o=(n=i.split(r)).pop(),i=n.join("")+r+o,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(i=i.replace(Rr(l,"g"),t)),c=r,r=".",c&&(i=i.replace(Rr(c,"g"),r)),u=(u=i.match(/#/g))?u.length:0;var h,g=m.split(c);g[1]&&(h=g[1].match(wr)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=hr.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(Rr(t,null,!0),"|").concat(Rr(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=c,e.t=t,e.d=r,e.temp=u}!function(){function e(t,r,n,o,i){er(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return mr;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()}rr(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],Cr.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Cr.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Cr.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Or(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Or(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Or(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,o,i,a,s,l,c,u=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return(u=u.zero).pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,i=u.d,a=u.t,u.isFunctional)e=function(e,t,r){var n;return gr.test(t)?e=Er(e,Number(/\d{2}/.exec(t)[0]),t,r):vr.test(t)?e=Er(e,8,t,r):br.test(t)?e=Er(e,10,t,r):yr.test(t)?e=Er(e,16,t,r):xr.test(t)?e=Er(e,2,t,r):Sr.test(t)&&(n="",e<0&&(n="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var r,n="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();o>0;)for(r=0;r<a.length;r++)if(a[r]<=o){n+=s[r],o-=a[r];break}for(r=0;r<i;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t),e=n+e):e=t+n+e.toExponential(0)),e}(e,u.pattern,i);else{if(u.percentage&&(e*=100),u.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),v=g[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);v<=r&&s<g.length;)v=g[++s];s>0&&(m=g[s-1]),m&&r>0&&m>0?h=m:(r<0&&m<0||!m)&&(v<0&&v-r<=u.maxPrecision?h=v:m<=r&&!(v>0&&-r<=u.maxPrecision)&&(h=m)),h&&(d=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=u.temp,c=(l=u.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,c||"#"!==l.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var b=Number(e.toFixed(Math.min(20,c?c.length:0)).split(".")[0]),y=l.split(i)[0];if(e=pr(y+=i,b)||"0",c){var x=Math.max(0,Math.min(14,c.length)),S=c.replace(/#+$/,"").length,C=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=C.length;s<S;s++)C+="0";C&&(e+=i+C)}else 0===b&&(o=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=o.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(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=pr(l,e)}e=e.replace(u.numericRegex,(function(e){return e===a?u.groupTemp:e===i?u.decTemp:""})),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+p+d+u.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}])}();var Lr=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],kr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ar=["January","February","March","April","May","June","July","August","September","October","November","December"],Mr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ir(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Tr(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){er(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Lr,qDayNames:kr,qLongMonthNames:Ar,qMonthNames:Mr}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),r||(r=(nr(o={},"T",i.qTimeFmt||"hh:mm:ss"),nr(o,"D",i.qDateFmt||"YYYY-MM-DD"),nr(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[n]),this.pattern=r}rr(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,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(n=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:i,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:n.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){var r,n=function(e){var t=e,r=24*Tr(t),n=60*Tr(r),o=60*Tr(n),i=1e3*Tr(o);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(o),f:Math.round(i)}}(e),o=n.d,i=n.h,a=n.m,s=n.s,l=n.f,c=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=r?r.getDay()-1:0)<0&&(c=6);var u="";return r&&(u=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:o,h:i,m:a,s:s,f:l,t:u}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Ir("".concat(t.year).slice(-2),2),YYY:Ir("".concat(t.year).slice(-3),3),def:function(e){return Ir("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Ir("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ir("".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 Ir("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Ir("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Ir("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Ir("".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 o=0;o<n;o++)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.slice(0,e.length)}}}}(this,r),c=[];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&c.push(u);var d=new RegExp(c.join("|"),"g"),p=t.replace(d,(function(e){var t,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var o in l[r])if(o===e||o.toLowerCase()===e){void 0===(n=l[r][o])&&(n=l[r][o.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}));return p}}])}();var Dr=function(e,t,r,n){var o=t;n&&(o=t-n);var i=JSON.parse(JSON.stringify(e[o]));if(Array.isArray(r)&&r.length>0){var a=r[t];i.qDef.columnWidth=-1===a?{type:re.FIT_TO_CONTENT}:{type:re.PIXELS,pixels:a}}return i},Pr=function(e,t,r,n){var o=ke.hypercube.importProperties({exportFormat:e,initialProperties:t,dataDefinition:U().targets[0],defaultPropertyValues:{defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},hypercubePath:n,extension:r});ke.unquarantineProperty(o.qProperty,"straightTableColumnOrder");var i=o.qProperty.qHyperCubeDef,a=i.qDimensions,s=i.qMeasures,l=i.qColumnOrder,c=i.columnWidths,u=function(e,t,r,n){var o=e.length,i=o+t.length,a=(null==r?void 0:r.length)===i?r:Array.from(Array(i).keys());return{dimensions:a.filter((function(e){return e<o})).map((function(t){return Dr(e,t,n)})),measures:a.filter((function(e){return e>=o})).map((function(e){return Dr(t,e,n,o)}))}}(a,s,l,c),d=u.dimensions,p=u.measures;return Array.isArray(c)&&c.length>0&&(Jt(o,"qProperty.qHyperCubeDef.qDimensions",d),Jt(o,"qProperty.qHyperCubeDef.qMeasures",p)),ke.conditionalShow.unquarantine(o.qProperty),o},_r=function(e,t){var r=ke.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),n=r.properties.qHyperCubeDef,o=n.qColumnOrder,i=function(e,t,r){var n=e.length+t.length,o=((null==r?void 0:r.length)===n?r:Array.from(Array(n).keys())).map((function(r){return function(e,t,r){var n,o=t.length,i=(e<o?t[e]:r[e-o]).qDef.columnWidth;return"pixels"===(null==i?void 0:i.type)?null!==(n=i.pixels)&&void 0!==n?n:200:-1}(r,e,t)}));return o}(n.qDimensions,n.qMeasures,o);return Jt(r,"properties.qHyperCubeDef",F(F({},r.properties.qHyperCubeDef),{columnWidths:i})),ke.quarantineProperty(r.properties,"qHyperCubeDef.columnWidths","straightTableColumnWidths"),ke.quarantineProperty(r.properties,"qHyperCubeDef.qColumnOrder","straightTableColumnOrder"),ke.quarantineProperty(r.properties,"qHyperCubeDef.columnOrder","straightTableColumnOrder"),r};const Nr=e=>e.flags.isEnabled("PS_18291_TABLE_EXPLORATION")&&{exploration:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}}};function qr(e){return{definition:Se(e),...Nr(e),data:Oe(e),support:{export:e.flags.isEnabled("PS_20907_TABLE_DOWNLOAD"),exportData:!0,snapshot:e.flags.isEnabled("PS_20907_TABLE_DOWNLOAD"),viewData:!1,exploration:!0,cssScaling:!0},importProperties:Pr,exportProperties:_r}}var $r,zr=x;$r=zr.createRoot,zr.hydrateRoot;var Br=function(e){var n=t((function(){return $r(e)}),[e]);return r((function(){return function(){return n.unmount()}}),[n]),n},Fr=function(e,r){return t((function(){return function(e,t){if(t)return function(r){return H(void 0,void 0,void 0,(function(){var n,o,i,a,s,l,c;return W(this,(function(u){switch(u.label){case 0:return n=r.isDim,o=r.colIdx,i=r.qReverseSort,a=n?o:o-e,[4,t.getEffectiveProperties()];case 1:return s=u.sent(),l=s.qHyperCubeDef.qInterColumnSortOrder,c=[],o!==l[0]?(l.splice(l.indexOf(o),1),l.unshift(o),c.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:"[".concat(l.join(","),"]")})):c.push({qPath:"/qHyperCubeDef/".concat(n?"qDimensions":"qMeasures","/").concat(a,"/qDef/qReverseSort"),qOp:"Replace",qValue:(!i).toString()}),t.applyPatches(c,!0),[2]}}))}))}}(e.qDimensionInfo.length,r)}),[e.qDimensionInfo.length,r])},jr={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Hr=function(e){return parseInt(e.repeat(2/e.length),16)},Wr=function(e){var t=Math.floor((e.length-1)/3),r=function(e,t){return e.match(new RegExp(".{".concat(t,"}"),"g"))}(e.slice(1),t),n=r.map(Hr),o=n[0],i=n[1],a=n[2],s=n[3];return void 0!==s?"rgba(".concat(o,",").concat(i,",").concat(a,",").concat(s/255,")"):"rgb(".concat(o,",").concat(i,",").concat(a,")")};function Vr(e){var t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return"rgb(".concat(t[1],",").concat(t[2],",").concat(t[3],")");if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e))return"rgba(".concat(t[1],",").concat(t[2],",").concat(t[3],",").concat(t[4],")");if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e)){var r=Math.round(+t[1]/2.55)/100;return"rgba(".concat(t[2],",").concat(t[3],",").concat(t[4],",").concat(r,")")}if(t=/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i.exec(e))return Wr(e);var n=e&&jr[e.toLowerCase()];return n?void 0!==n.a?"rgba(".concat(n.r,",").concat(n.g,",").concat(n.b,",").concat(n.a,")"):"rgb(".concat(n.r,",").concat(n.g,",").concat(n.b,")"):"none"}function Gr(e){if(null==e)return!1;var t=Vr(e),r=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t)||/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),n=null==r?void 0:r[1],o=null==r?void 0:r[2],i=null==r?void 0:r[3];return!!(void 0!==n&&void 0!==o&&void 0!==i)&&.299*+n+.587*+o+.114*+i<125}var Ur=function(e,t){var r=null==t?void 0:t.closest(".qv-object .qv-inner-object"),n=r&&window.getComputedStyle(r).backgroundColor,o=null==t?void 0:t.closest(".qv-panel-sheet"),i=o&&window.getComputedStyle(o).backgroundColor,a=e.getStyle("","","object.straightTableV2.backgroundColor"),s=e.getStyle("object","straightTableV2","backgroundColor"),l=a||n||s,c=function(e){if(void 0===e)return!1;var t=Vr(e),r=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),n=null==r?void 0:r[4];return void 0!==n&&0==+n}(l);return{tableColorFromTheme:a||"inherit",color:l,isDark:Gr(c?i:l),isTransparent:c}},Yr=function(e){var r=n();return t((function(){return F(F({},r),{background:Ur(r,e)})}),[r.name(),e])},Xr={exports:{}},Kr={},Zr=60103,Jr=60106,Qr=60107,en=60108,tn=60114,rn=60109,nn=60110,on=60112,an=60113,sn=60120,ln=60115,cn=60116,un=60121,dn=60122,pn=60117,fn=60129,mn=60131;if("function"==typeof Symbol&&Symbol.for){var hn=Symbol.for;Zr=hn("react.element"),Jr=hn("react.portal"),Qr=hn("react.fragment"),en=hn("react.strict_mode"),tn=hn("react.profiler"),rn=hn("react.provider"),nn=hn("react.context"),on=hn("react.forward_ref"),an=hn("react.suspense"),sn=hn("react.suspense_list"),ln=hn("react.memo"),cn=hn("react.lazy"),un=hn("react.block"),dn=hn("react.server.block"),pn=hn("react.fundamental"),fn=hn("react.debug_trace_mode"),mn=hn("react.legacy_hidden")}function gn(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Zr:switch(e=e.type){case Qr:case tn:case en:case an:case sn:return e;default:switch(e=e&&e.$$typeof){case nn:case on:case cn:case ln:case rn:return e;default:return t}}case Jr:return t}}}var vn=rn,bn=Zr,yn=on,xn=Qr,Sn=cn,Cn=ln,wn=Jr,En=tn,Rn=en,On=an;Kr.ContextConsumer=nn,Kr.ContextProvider=vn,Kr.Element=bn,Kr.ForwardRef=yn,Kr.Fragment=xn,Kr.Lazy=Sn,Kr.Memo=Cn,Kr.Portal=wn,Kr.Profiler=En,Kr.StrictMode=Rn,Kr.Suspense=On,Kr.isAsyncMode=function(){return!1},Kr.isConcurrentMode=function(){return!1},Kr.isContextConsumer=function(e){return gn(e)===nn},Kr.isContextProvider=function(e){return gn(e)===rn},Kr.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Zr},Kr.isForwardRef=function(e){return gn(e)===on},Kr.isFragment=function(e){return gn(e)===Qr},Kr.isLazy=function(e){return gn(e)===cn},Kr.isMemo=function(e){return gn(e)===ln},Kr.isPortal=function(e){return gn(e)===Jr},Kr.isProfiler=function(e){return gn(e)===tn},Kr.isStrictMode=function(e){return gn(e)===en},Kr.isSuspense=function(e){return gn(e)===an},Kr.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Qr||e===tn||e===fn||e===en||e===an||e===sn||e===mn||"object"==typeof e&&null!==e&&(e.$$typeof===cn||e.$$typeof===ln||e.$$typeof===rn||e.$$typeof===nn||e.$$typeof===on||e.$$typeof===pn||e.$$typeof===un||e[0]===dn)},Kr.typeOf=gn,Xr.exports=Kr;var Ln=Xr.exports,kn=function(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=r?r.call(n,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0},An=Y(kn);function Mn(e){function t(e,n,l,c,p){for(var f,m,h,g,x,C=0,w=0,E=0,R=0,O=0,T=0,P=h=f=0,N=0,q=0,$=0,z=0,B=l.length,F=B-1,j="",H="",W="",V="";N<B;){if(m=l.charCodeAt(N),N===F&&0!==w+R+E+C&&(0!==w&&(m=47===w?10:47),R=E=C=0,B++,F++),0===w+R+E+C){if(N===F&&(0<q&&(j=j.replace(d,"")),0<j.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:j+=l.charAt(N)}m=59}switch(m){case 123:for(f=(j=j.trim()).charCodeAt(0),h=1,z=++N;N<B;){switch(m=l.charCodeAt(N)){case 123:h++;break;case 125:h--;break;case 47:switch(m=l.charCodeAt(N+1)){case 42:case 47:e:{for(P=N+1;P<F;++P)switch(l.charCodeAt(P)){case 47:if(42===m&&42===l.charCodeAt(P-1)&&N+2!==P){N=P+1;break e}break;case 10:if(47===m){N=P+1;break e}}N=P}}break;case 91:m++;case 40:m++;case 34:case 39:for(;N++<F&&l.charCodeAt(N)!==m;);}if(0===h)break;N++}if(h=l.substring(z,N),0===f&&(f=(j=j.replace(u,"").trim()).charCodeAt(0)),64===f){switch(0<q&&(j=j.replace(d,"")),m=j.charCodeAt(1)){case 100:case 109:case 115:case 45:q=n;break;default:q=I}if(z=(h=t(n,q,h,m,p+1)).length,0<D&&(x=s(3,h,q=r(I,j,$),n,k,L,z,m,p,c),j=q.join(""),void 0!==x&&0===(z=(h=x.trim()).length)&&(m=0,h="")),0<z)switch(m){case 115:j=j.replace(S,a);case 100:case 109:case 45:h=j+"{"+h+"}";break;case 107:h=(j=j.replace(v,"$1 $2"))+"{"+h+"}",h=1===M||2===M&&i("@"+h,3)?"@-webkit-"+h+"@"+h:"@"+h;break;default:h=j+h,112===c&&(H+=h,h="")}else h=""}else h=t(n,r(n,j,$),h,c,p+1);W+=h,h=$=q=P=f=0,j="",m=l.charCodeAt(++N);break;case 125:case 59:if(1<(z=(j=(0<q?j.replace(d,""):j).trim()).length))switch(0===P&&(f=j.charCodeAt(0),45===f||96<f&&123>f)&&(z=(j=j.replace(" ",":")).length),0<D&&void 0!==(x=s(1,j,n,e,k,L,H.length,c,p,c))&&0===(z=(j=x.trim()).length)&&(j="\0\0"),f=j.charCodeAt(0),m=j.charCodeAt(1),f){case 0:break;case 64:if(105===m||99===m){V+=j+l.charAt(N);break}default:58!==j.charCodeAt(z-1)&&(H+=o(j,f,m,j.charCodeAt(2)))}$=q=P=f=0,j="",m=l.charCodeAt(++N)}}switch(m){case 13:case 10:47===w?w=0:0===1+f&&107!==c&&0<j.length&&(q=1,j+="\0"),0<D*_&&s(0,j,n,e,k,L,H.length,c,p,c),L=1,k++;break;case 59:case 125:if(0===w+R+E+C){L++;break}default:switch(L++,g=l.charAt(N),m){case 9:case 32:if(0===R+C+w)switch(O){case 44:case 58:case 9:case 32:g="";break;default:32!==m&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===R+w+C&&(q=$=1,g="\f"+g);break;case 108:if(0===R+w+C+A&&0<P)switch(N-P){case 2:112===O&&58===l.charCodeAt(N-3)&&(A=O);case 8:111===T&&(A=T)}break;case 58:0===R+w+C&&(P=N);break;case 44:0===w+E+R+C&&(q=1,g+="\r");break;case 34:case 39:0===w&&(R=R===m?0:0===R?m:R);break;case 91:0===R+w+E&&C++;break;case 93:0===R+w+E&&C--;break;case 41:0===R+w+C&&E--;break;case 40:if(0===R+w+C){if(0===f)if(2*O+3*T==533);else f=1;E++}break;case 64:0===w+E+R+C+P+h&&(h=1);break;case 42:case 47:if(!(0<R+C+E))switch(w){case 0:switch(2*m+3*l.charCodeAt(N+1)){case 235:w=47;break;case 220:z=N,w=42}break;case 42:47===m&&42===O&&z+2!==N&&(33===l.charCodeAt(z+2)&&(H+=l.substring(z,N+1)),g="",w=0)}}0===w&&(j+=g)}T=O,O=m,N++}if(0<(z=H.length)){if(q=n,0<D&&(void 0!==(x=s(2,H,q,e,k,L,z,c,p,c))&&0===(H=x).length))return V+H+W;if(H=q.join(",")+"{"+H+"}",0!=M*A){switch(2!==M||i(H,2)||(A=0),A){case 111:H=H.replace(y,":-moz-$1")+H;break;case 112:H=H.replace(b,"::-webkit-input-$1")+H.replace(b,"::-moz-$1")+H.replace(b,":-ms-input-$1")+H}A=0}}return V+H+W}function r(e,t,r){var o=t.trim().split(h);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=n(e,t[s],r).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var c=0;c<a;++c)t[l++]=n(e[c]+" ",o[s],r).trim()}return t}function n(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,r,n){var a=e+";",s=2*t+3*r+4*n;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===M||2===M&&i(l,1)?"-webkit-"+l+l:l}if(0===M||2===M&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(O,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return f.test(a)?a.replace(p,":-webkit-")+a.replace(p,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(x,"tb");break;case 232:l=a.replace(x,"tb-rl");break;case 220:l=a.replace(x,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(w,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(w,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===R.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,r,n).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===r+n&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+a}return a}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),P(2!==t?n:n.replace(E,"$1"),r,t)}function a(e,t){var r=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(C," or ($1)").substring(4):"("+t+")"}function s(e,t,r,n,o,i,a,s,l,u){for(var d,p=0,f=t;p<D;++p)switch(d=T[p].call(c,e,f,r,n,o,i,a,s,l,u)){case void 0:case!1:case!0:case null:break;default:f=d}if(f!==t)return f}function l(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!=typeof e?M=1:(M=2,P=e):M=0),l}function c(e,r){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<D){var o=s(-1,r,n,n,k,L,0,0,0,0);void 0!==o&&"string"==typeof o&&(r=o)}var i=t(I,n,r,0,0);return 0<D&&(void 0!==(o=s(-2,i,n,n,k,L,i.length,0,0,0))&&(i=o)),"",A=0,L=k=1,i}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,f=/zoo|gra/,m=/([,: ])(transform)/g,h=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,y=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,w=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,R=/stretch|:\s*\w+\-(?:conte|avail)/,O=/([^-])(image-set\()/,L=1,k=1,A=0,M=1,I=[],T=[],D=0,P=null,_=0;return c.use=function e(t){switch(t){case void 0:case null:D=T.length=0;break;default:if("function"==typeof t)T[D++]=t;else if("object"==typeof t)for(var r=0,n=t.length;r<n;++r)e(t[r]);else _=0|!!t}return e},c.set=l,void 0!==e&&l(e),c}var In={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Tn(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var Dn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Pn=Tn((function(e){return Dn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),_n={exports:{}},Nn={},qn="function"==typeof Symbol&&Symbol.for,$n=qn?Symbol.for("react.element"):60103,zn=qn?Symbol.for("react.portal"):60106,Bn=qn?Symbol.for("react.fragment"):60107,Fn=qn?Symbol.for("react.strict_mode"):60108,jn=qn?Symbol.for("react.profiler"):60114,Hn=qn?Symbol.for("react.provider"):60109,Wn=qn?Symbol.for("react.context"):60110,Vn=qn?Symbol.for("react.async_mode"):60111,Gn=qn?Symbol.for("react.concurrent_mode"):60111,Un=qn?Symbol.for("react.forward_ref"):60112,Yn=qn?Symbol.for("react.suspense"):60113,Xn=qn?Symbol.for("react.suspense_list"):60120,Kn=qn?Symbol.for("react.memo"):60115,Zn=qn?Symbol.for("react.lazy"):60116,Jn=qn?Symbol.for("react.block"):60121,Qn=qn?Symbol.for("react.fundamental"):60117,eo=qn?Symbol.for("react.responder"):60118,to=qn?Symbol.for("react.scope"):60119;function ro(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case $n:switch(e=e.type){case Vn:case Gn:case Bn:case jn:case Fn:case Yn:return e;default:switch(e=e&&e.$$typeof){case Wn:case Un:case Zn:case Kn:case Hn:return e;default:return t}}case zn:return t}}}function no(e){return ro(e)===Gn}Nn.AsyncMode=Vn,Nn.ConcurrentMode=Gn,Nn.ContextConsumer=Wn,Nn.ContextProvider=Hn,Nn.Element=$n,Nn.ForwardRef=Un,Nn.Fragment=Bn,Nn.Lazy=Zn,Nn.Memo=Kn,Nn.Portal=zn,Nn.Profiler=jn,Nn.StrictMode=Fn,Nn.Suspense=Yn,Nn.isAsyncMode=function(e){return no(e)||ro(e)===Vn},Nn.isConcurrentMode=no,Nn.isContextConsumer=function(e){return ro(e)===Wn},Nn.isContextProvider=function(e){return ro(e)===Hn},Nn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===$n},Nn.isForwardRef=function(e){return ro(e)===Un},Nn.isFragment=function(e){return ro(e)===Bn},Nn.isLazy=function(e){return ro(e)===Zn},Nn.isMemo=function(e){return ro(e)===Kn},Nn.isPortal=function(e){return ro(e)===zn},Nn.isProfiler=function(e){return ro(e)===jn},Nn.isStrictMode=function(e){return ro(e)===Fn},Nn.isSuspense=function(e){return ro(e)===Yn},Nn.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Bn||e===Gn||e===jn||e===Fn||e===Yn||e===Xn||"object"==typeof e&&null!==e&&(e.$$typeof===Zn||e.$$typeof===Kn||e.$$typeof===Hn||e.$$typeof===Wn||e.$$typeof===Un||e.$$typeof===Qn||e.$$typeof===eo||e.$$typeof===to||e.$$typeof===Jn)},Nn.typeOf=ro,_n.exports=Nn;var oo=_n.exports,io={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ao={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},so={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},lo={};function co(e){return oo.isMemo(e)?so:lo[e.$$typeof]||io}lo[oo.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},lo[oo.Memo]=so;var uo=Object.defineProperty,po=Object.getOwnPropertyNames,fo=Object.getOwnPropertySymbols,mo=Object.getOwnPropertyDescriptor,ho=Object.getPrototypeOf,go=Object.prototype;var vo=function e(t,r,n){if("string"!=typeof r){if(go){var o=ho(r);o&&o!==go&&e(t,o,n)}var i=po(r);fo&&(i=i.concat(fo(r)));for(var a=co(t),s=co(r),l=0;l<i.length;++l){var c=i[l];if(!(ao[c]||n&&n[c]||s&&s[c]||a&&a[c])){var u=mo(r,c);try{uo(t,c,u)}catch(e){}}}}return t},bo=Y(vo);function yo(){return(yo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var xo=function(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r},So=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!Ln.typeOf(e)},Co=Object.freeze([]),wo=Object.freeze({});function Eo(e){return"function"==typeof e}function Ro(e){return e.displayName||e.name||"Component"}function Oo(e){return e&&"string"==typeof e.styledComponentId}var Lo="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",ko="undefined"!=typeof window&&"HTMLElement"in window,Ao=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY))),Mo={};function Io(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var To=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)(o<<=1)<0&&Io(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),Do=new Map,Po=new Map,_o=1,No=function(e){if(Do.has(e))return Do.get(e);for(;Po.has(_o);)_o++;var t=_o++;return Do.set(e,t),Po.set(t,e),t},qo=function(e){return Po.get(e)},$o=function(e,t){t>=_o&&(_o=t+1),Do.set(e,t),Po.set(t,e)},zo="style["+Lo+'][data-styled-version="5.3.11"]',Bo=new RegExp("^"+Lo+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Fo=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},jo=function(e,t){for(var r=(t.textContent||"").split("/*!sc*/\n"),n=[],o=0,i=r.length;o<i;o++){var a=r[o].trim();if(a){var s=a.match(Bo);if(s){var l=0|parseInt(s[1],10),c=s[2];0!==l&&($o(c,l),Fo(e,c,s[3]),e.getTag().insertRules(l,n)),n.length=0}else n.push(a)}}},Ho=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var n=t[r];if(n&&1===n.nodeType&&n.hasAttribute(Lo))return n}}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(Lo,"active"),n.setAttribute("data-styled-version","5.3.11");var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},Wo=function(){function e(e){var t=this.element=Ho(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}Io(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Vo=function(){function e(e){var t=this.element=Ho(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t),n=this.nodes[e];return this.element.insertBefore(r,n||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Go=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Uo=ko,Yo={isServer:!ko,useCSSOMInjection:!Ao},Xo=function(){function e(e,t,r){void 0===e&&(e=wo),void 0===t&&(t={}),this.options=yo({},Yo,{},e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&ko&&Uo&&(Uo=!1,function(e){for(var t=document.querySelectorAll(zo),r=0,n=t.length;r<n;r++){var o=t[r];o&&"active"!==o.getAttribute(Lo)&&(jo(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return No(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(yo({},this.options,{},t),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(t=this.options).isServer,n=t.useCSSOMInjection,o=t.target,e=r?new Go(o):n?new Wo(o):new Vo(o),new To(e)));var e,t,r,n,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(No(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},t.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(No(e),r)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(No(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=0;o<r;o++){var i=qo(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var l=Lo+".g"+o+'[id="'+i+'"]',c="";void 0!==a&&a.forEach((function(e){e.length>0&&(c+=e+",")})),n+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return n}(this)},e}(),Ko=/(a)(d)/gi,Zo=function(e){return String.fromCharCode(e+(e>25?39:97))};function Jo(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Zo(t%52)+r;return(Zo(t%52)+r).replace(Ko,"$1-$2")}var Qo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},ei=function(e){return Qo(5381,e)};function ti(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Eo(r)&&!Oo(r))return!1}return!0}var ri=ei("5.3.11"),ni=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&ti(e),this.componentId=t,this.baseHash=Qo(ri,t),this.baseStyle=r,Xo.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))o.push(this.staticRulesId);else{var i=Si(this.rules,e,t,r).join(""),a=Jo(Qo(this.baseHash,i)>>>0);if(!t.hasNameForId(n,a)){var s=r(i,"."+a,void 0,n);t.insertRules(n,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=Qo(this.baseHash,r.hash),u="",d=0;d<l;d++){var p=this.rules[d];if("string"==typeof p)u+=p;else if(p){var f=Si(p,e,t,r),m=Array.isArray(f)?f.join(""):f;c=Qo(c,m+d),u+=m}}if(u){var h=Jo(c>>>0);if(!t.hasNameForId(n,h)){var g=r(u,"."+h,void 0,n);t.insertRules(n,h,g)}o.push(h)}}return o.join(" ")},e}(),oi=/^\s*\/\/.*$/gm,ii=[":","[",".","#"];function ai(e){var t,r,n,o,i=void 0===e?wo:e,a=i.options,s=void 0===a?wo:a,l=i.plugins,c=void 0===l?Co:l,u=new Mn(s),d=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(r,n,o,i,a,s,l,c,u,d){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===c)return n+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+n),"";default:return n+(0===d?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),f=function(e,n,i){return 0===n&&-1!==ii.indexOf(i[r.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var l=e.replace(oi,""),c=i&&a?a+" "+i+" { "+l+" }":l;return t=s,r=i,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(a||!i?"":i,c)}return u.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(r)>0&&(o[0]=o[0].replace(n,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=c.length?c.reduce((function(e,t){return t.name||Io(15),Qo(e,t.name)}),5381).toString():"",m}var si=C.createContext();si.Consumer;var li=C.createContext(),ci=(li.Consumer,new Xo),ui=ai();function di(){return O(si)||ci}function pi(){return O(li)||ui}function fi(e){var t=w(e.stylisPlugins),r=t[0],n=t[1],o=di(),i=E((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),a=E((function(){return ai({options:{prefix:!e.disableVendorPrefixes},plugins:r})}),[e.disableVendorPrefixes,r]);return R((function(){An(r,e.stylisPlugins)||n(e.stylisPlugins)}),[e.stylisPlugins]),C.createElement(si.Provider,{value:i},C.createElement(li.Provider,{value:a},e.children))}var mi=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=ui);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){return Io(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=ui),this.name+e.hash},e}(),hi=/([A-Z])/,gi=/([A-Z])/g,vi=/^ms-/,bi=function(e){return"-"+e.toLowerCase()};function yi(e){return hi.test(e)?e.replace(gi,bi).replace(vi,"-ms-"):e}var xi=function(e){return null==e||!1===e||""===e};function Si(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=Si(e[a],t,r,n))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return xi(e)?"":Oo(e)?"."+e.styledComponentId:Eo(e)?"function"!=typeof(l=e)||l.prototype&&l.prototype.isReactComponent||!t?e:Si(e(t),t,r,n):e instanceof mi?r?(e.inject(r,n),e.getName(n)):e:So(e)?function e(t,r){var n,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!xi(t[a])&&(Array.isArray(t[a])&&t[a].isCss||Eo(t[a])?i.push(yi(a)+":",t[a],";"):So(t[a])?i.push.apply(i,e(t[a],a)):i.push(yi(a)+": "+(n=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in In||n.startsWith("--")?String(o).trim():o+"px")+";")));return r?[r+" {"].concat(i,["}"]):i}(e):e.toString();var l}var Ci=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function wi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Eo(e)||So(e)?Ci(Si(xo(Co,[e].concat(r)))):0===r.length&&1===e.length&&"string"==typeof e[0]?e:Ci(Si(xo(e,r)))}var Ei=function(e,t,r){return void 0===r&&(r=wo),e.theme!==r.theme&&e.theme||t||r.theme},Ri=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Oi=/(^-|-$)/g;function Li(e){return e.replace(Ri,"-").replace(Oi,"")}var ki=function(e){return Jo(ei(e)>>>0)};function Ai(e){return"string"==typeof e&&!0}var Mi=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ii=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ti(e,t,r){var n=e[r];Mi(t)&&Mi(n)?Di(n,t):e[r]=t}function Di(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var o=0,i=r;o<i.length;o++){var a=i[o];if(Mi(a))for(var s in a)Ii(s)&&Ti(e,a[s],s)}return e}var Pi=C.createContext();Pi.Consumer;var _i={};function Ni(e,t,r){var n=Oo(e),o=!Ai(e),i=t.attrs,a=void 0===i?Co:i,s=t.componentId,l=void 0===s?function(e,t){var r="string"!=typeof e?"sc":Li(e);_i[r]=(_i[r]||0)+1;var n=r+"-"+ki("5.3.11"+r+_i[r]);return t?t+"-"+n:n}(t.displayName,t.parentComponentId):s,c=t.displayName,u=void 0===c?function(e){return Ai(e)?"styled."+e:"Styled("+Ro(e)+")"}(e):c,d=t.displayName&&t.componentId?Li(t.displayName)+"-"+t.componentId:t.componentId||l,p=n&&e.attrs?Array.prototype.concat(e.attrs,a).filter(Boolean):a,f=t.shouldForwardProp;n&&e.shouldForwardProp&&(f=t.shouldForwardProp?function(r,n,o){return e.shouldForwardProp(r,n,o)&&t.shouldForwardProp(r,n,o)}:e.shouldForwardProp);var m,h=new ni(r,d,n?e.componentStyle:void 0),g=h.isStatic&&0===a.length,v=function(e,t){return function(e,t,r,n){var o=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,l=e.shouldForwardProp,c=e.styledComponentId,u=e.target,d=function(e,t,r){void 0===e&&(e=wo);var n=yo({},t,{theme:e}),o={};return r.forEach((function(e){var t,r,i,a=e;for(t in Eo(a)&&(a=a(n)),a)n[t]=o[t]="className"===t?(r=o[t],i=a[t],r&&i?r+" "+i:r||i):a[t]})),[n,o]}(Ei(t,O(Pi),a)||wo,t,o),p=d[0],f=d[1],m=function(e,t,r,n){var o=di(),i=pi();return t?e.generateAndInjectStyles(wo,o,i):e.generateAndInjectStyles(r,o,i)}(i,n,p),h=r,g=f.$as||t.$as||f.as||t.as||u,v=Ai(g),b=f!==t?yo({},t,{},f):t,y={};for(var x in b)"$"!==x[0]&&"as"!==x&&("forwardedAs"===x?y.as=b[x]:(l?l(x,Pn,g):!v||Pn(x))&&(y[x]=b[x]));return t.style&&f.style!==t.style&&(y.style=yo({},t.style,{},f.style)),y.className=Array.prototype.concat(s,c,m!==c?m:null,t.className,f.className).filter(Boolean).join(" "),y.ref=h,L(g,y)}(m,e,t,g)};return v.displayName=u,(m=C.forwardRef(v)).attrs=p,m.componentStyle=h,m.displayName=u,m.shouldForwardProp=f,m.foldedComponentIds=n?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Co,m.styledComponentId=d,m.target=n?e.target:e,m.withComponent=function(e){var n=t.componentId,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(t,["componentId"]),i=n&&n+"-"+(Ai(e)?e:Li(Ro(e)));return Ni(e,yo({},o,{attrs:p,componentId:i}),r)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=n?Di({},e.defaultProps,t):t}}),Object.defineProperty(m,"toString",{value:function(){return"."+m.styledComponentId}}),o&&bo(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var qi=function(e){return function e(t,r,n){if(void 0===n&&(n=wo),!Ln.isValidElementType(r))return Io(1,String(r));var o=function(){return t(r,n,wi.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,r,yo({},n,{},o))},o.attrs=function(o){return e(t,r,yo({},n,{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},o}(Ni,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){qi[e]=qi(e)}));var $i=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ti(e),Xo.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,r,n){var o=n(Si(this.rules,t,r,n).join(""),""),i=this.componentId+e;r.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,r,n){e>2&&Xo.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}();function zi(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=wi.apply(void 0,[e].concat(r)).join(""),i=ki(o);return new mi(i,o)}var Bi=qi;function Fi(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function ji(e){if(!Fi(e))return e;const t={};return Object.keys(e).forEach((r=>{t[r]=ji(e[r])})),t}function Hi(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Fi(e)&&Fi(t)&&Object.keys(t).forEach((o=>{"__proto__"!==o&&(Fi(t[o])&&o in e&&Fi(e[o])?n[o]=Hi(e[o],t[o],r):r.clone?n[o]=Fi(t[o])?ji(t[o]):t[o]:n[o]=t[o])})),n}var Wi={exports:{}};function Vi(){}function Gi(){}Gi.resetWarningCache=Vi;Wi.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Gi,resetWarningCache:Vi};return r.PropTypes=r,r}();var Ui=Y(Wi.exports);function Yi(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Xi(e){if("string"!=typeof e)throw new Error(Yi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ki(...e){return e.reduce(((e,t)=>null==t?e:function(...r){e.apply(this,r),t.apply(this,r)}),(()=>{}))}function Zi(e,t=166){let r;function n(...n){clearTimeout(r),r=setTimeout((()=>{e.apply(this,n)}),t)}return n.clear=()=>{clearTimeout(r)},n}function Ji(e,t){return A.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}function Qi(e){return e&&e.ownerDocument||document}function ea(e){return Qi(e).defaultView||window}function ta(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var ra="undefined"!=typeof window?A.useLayoutEffect:A.useEffect;let na=0;const oa=A["useId".toString()];function ia(e){if(void 0!==oa){const t=oa();return null!=e?e:t}return function(e){const[t,r]=A.useState(e),n=e||t;return A.useEffect((()=>{null==t&&(na+=1,r(`mui-${na}`))}),[t]),n}(e)}function aa({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=A.useRef(void 0!==e),[i,a]=A.useState(t);return[o?e:i,A.useCallback((e=>{o||a(e)}),[])]}function sa(e){const t=A.useRef(e);return ra((()=>{t.current=e})),A.useCallback(((...e)=>(0,t.current)(...e)),[])}function la(...e){return A.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{ta(e,t)}))}),e)}let ca,ua=!0,da=!1;const pa={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function fa(e){e.metaKey||e.altKey||e.ctrlKey||(ua=!0)}function ma(){ua=!1}function ha(){"hidden"===this.visibilityState&&da&&(ua=!0)}function ga(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return ua||function(e){const{type:t,tagName:r}=e;return!("INPUT"!==r||!pa[t]||e.readOnly)||"TEXTAREA"===r&&!e.readOnly||!!e.isContentEditable}(t)}function va(){const e=A.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",fa,!0),t.addEventListener("mousedown",ma,!0),t.addEventListener("pointerdown",ma,!0),t.addEventListener("touchstart",ma,!0),t.addEventListener("visibilitychange",ha,!0))}),[]),t=A.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!ga(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(da=!0,window.clearTimeout(ca),ca=window.setTimeout((()=>{da=!1}),100),t.current=!1,!0)},ref:e}}function ba(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let ya;function xa(){if(ya)return ya;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),ya="reverse",e.scrollLeft>0?ya="default":(e.scrollLeft=1,0===e.scrollLeft&&(ya="negative")),document.body.removeChild(e),ya}function Sa(e,t){const r=e.scrollLeft;if("rtl"!==t)return r;switch(xa()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}var Ca=e=>{const t=A.useRef({});return A.useEffect((()=>{t.current=e})),t.current};var wa={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Ea(e,t){const r={...t};return Object.keys(e).forEach((n=>{if(n.toString().match(/^(components|slots)$/))r[n]={...e[n],...r[n]};else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},i&&Object.keys(i)?o&&Object.keys(o)?(r[n]={...i},Object.keys(o).forEach((e=>{r[n][e]=Ea(o[e],i[e])}))):r[n]=i:r[n]=o}else void 0===r[n]&&(r[n]=e[n])})),r}function Ra(e,t,r=void 0){const n={};return Object.keys(e).forEach((o=>{n[o]=e[o].reduce(((e,n)=>{if(n){const o=t(n);""!==o&&e.push(o),r&&r[n]&&e.push(r[n])}return e}),[]).join(" ")})),n}const Oa=e=>e;var La=(()=>{let e=Oa;return{configure(t){e=t},generate:t=>e(t),reset(){e=Oa}}})();const ka={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Aa(e,t,r="Mui"){const n=ka[t];return n?`${r}-${n}`:`${La.generate(e)}-${t}`}function Ma(e,t,r="Mui"){const n={};return t.forEach((t=>{n[t]=Aa(e,t,r)})),n}var Ia="$$material";function Ta(){return Ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ta.apply(this,arguments)}function Da(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function Pa(e){const{injectFirst:t,children:r}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return r}Pa.propTypes={children:Ui.node,injectFirst:Ui.bool};const _a=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=wi.apply(void 0,[e].concat(r)),i="sc-global-"+ki(JSON.stringify(o)),a=new $i(o,i);function s(e){var t=di(),r=pi(),n=O(Pi),o=k(t.allocateGSInstance(i)).current;return t.server&&l(o,e,t,n,r),null}function l(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,Mo,r,o);else{var i=yo({},t,{theme:Ei(t,n,s.defaultProps)});a.renderStyles(e,i,r,o)}}return C.memo(s)}((e=>{const{styles:t,defaultTheme:r={}}=e;return"function"==typeof t?t(null==(n=e.theme)||0===Object.keys(n).length?r:e.theme):t;var n}));var Na=_a;
10
10
  /** @license MUI v5.10.0
11
11
  *
12
12
  * This source code is licensed under the MIT license found in the