@nebula.js/sn-table 2.2.0 → 2.2.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.
package/dist/sn-table.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-table v2.2.0
2
+ * @nebula.js/sn-table v2.2.1
3
3
  * Copyright (c) 2023 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-table"]=t(e.stardust)}(this,(function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}const r={version:JSON.stringify("2.2.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 n=()=>({targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]});function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(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 a={};!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)},l=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},s=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=s(d,r),d!==(o=s(t,r))&&(m&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=n&&i(n)?n:[]):u=n&&a(n)?n:{},l(d,{name:r,newValue:e(m,u,o)})):void 0!==o&&l(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:()=>$e});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 l=a[i];return a[i]=r,{updated:r,previous:l}}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 l="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function c(e){return l+e+s}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],l=0;l<a.qFieldDefs.length;++l){var s=a.qFieldDefs[l];if(s.qName===o)return s}}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,l=e.valueComp,s=void 0===l?"0":l;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(s,")")}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(s,")")}return"".concat(a,"({1}").concat(s,")")}function S(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const C={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 l=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),s=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(l).concat(s,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(l).concat(s,")")}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:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(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===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(l);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+l.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 l=x({properties:t,layout:r});return l>=o&&l<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(l),r=e.indexOf(s);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),k={},O=Array.isArray;function L(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function A(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]=M(e[r||t])?i:e[t],e=e[r||t]}})),e}function T(e,t){var r=!0;if(L(e)&&L(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(O(e)&&O(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}k.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],l="".concat(r,"/").concat(o);T(i,a)||A(t,o)||(M(a)?n.push({op:"add",path:l,value:i}):L(i)&&L(a)?n=n.concat(k.generate(a,i,l)):O(i)&&O(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&M(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(!M(t[0])&&M(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var l=o.length-1;l>=0;l-=1)-1===(i=a(t,o[l].qInfo&&o[l].qInfo.qId,l))?(n.push({op:"remove",path:"".concat(r,"/").concat(l)}),o.splice(l,1)):n=n.concat(k.generate(o[l],t[i],"".concat(r,"/").concat(l)));for(var s=0,c=t.length;s<c;s+=1)-1===(i=a(o,t[s].qInfo&&t[s].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(s),value:t[s]}),o.splice(s,0,t[s])):i!==s&&(n.push({op:"move",path:"".concat(r,"/").concat(s),from:"".concat(r,"/").concat(i)}),o.splice(s,0,o.splice(i,1)[0]));return n}(a,i,l)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){M(t[o])&&!A(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},k.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,l=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(O(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(O(a)&&O(t.value)){var s,c=t.value.slice();a.length=0,(s=a).push.apply(s,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(L(a)&&L(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!A(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);O(o)?o.splice(+i,0,u.splice(+l,1)[0]):(o[i]=u[l],delete u[l])}else"remove"===t.op&&(O(o)?o.splice(+i,1):delete o[i])}))},k.clone=function(e){return R({},e)},k.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},k.updateObject=function(e,t){Object.keys(e).length?k.apply(e,k.generate(e,t)):R(e,t)};const D=k,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 $(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 z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const q={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,l=e.dimensionAndFieldList;if(!r)return t;var s=a;void 0===s&&(s=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=C.getNumStepComp(r,s),p=C.getAboveComp(r,s,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:l,valueComp:g}):g}return f},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,z)},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($(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=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($(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 F="movingAverage";function j(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===F)return r[n]}function B(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===F)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var W={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const H={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,l=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return r;var c=l;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:s,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),S=C.getAggrComp(v,b,y);v=n.showExcludedValues?C.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:S}):S}return v},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,W)},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(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=j(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=j(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 C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(F))return!1;var i=j(t,e);return i&&!i.disabled}};return r}};var U="timeSeriesDecomposition";function V(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===U)return r[n]}function G(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===U)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(G(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(G(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=V(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=V(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(U))return!1;var i=V(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,l=e.dimensionAndFieldList;if(!r)return t;var s=a;void 0===s&&(s=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=C.getAboveComp(r,s,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:l,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}},te=0,re=1,ne=2,oe=0,ie=1,ae=2;var le="normalization";function se(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===le)return r[n]}function ce(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===le)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ue(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var de={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:ae,selectionScope:ne};function pe(e){return 2===e?"{1}":""}function fe(e,t,r){return 1===e?"{$<".concat(C.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function me(e,t){return 0===e&&t>1||2===e?"Total":""}function he(e,t,r){return 0===e&&t>1?"<".concat(C.getDimDefWithWrapper(r),">"):""}const ge={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,l=e.dimensionAndFieldList;if(!r)return t;var s=a;void 0===s&&(s=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var l=pe(t),s=fe(t,r,n),c=""===l&&""===s?"":l||s,u=me(o,i),d=he(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,s,r.primaryDimension)},initModifier:function(e){Object.keys(de).forEach((function(t){void 0===e[t]&&(e[t]=de[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(ce(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:ne,options:function(r){return function(e,t,r){var n=[{value:te,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:re,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:ne,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=ue(t,0);t.splice(n,1)}return t}(se(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ce(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 se(t,e).selectionScope===re}},value:{refFn:function(t){return"".concat(ce(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return se(t,e).selectionScope===re}},dimensionalScope:{refFn:function(t){return"".concat(ce(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:ae,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:oe,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:ie,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:ae,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=ue(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=ue(t,1);t.splice(n,1)}return t}(se(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ce(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(se(t,e).dimensionalScope||0)===oe&&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(le))return!1;var i=se(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:pe,getFieldSelectionComp:fe,getTotalComp:me,getSelectedDimComp:he};var ve="qDef.base",be="qDef.qDef",ye="qDef.base.qDef",Se="qLibraryId",xe="qDef.base.qLibraryId";const Ce={getExpression:function(e){var t=i(e,ye);return void 0!==t?t:i(e,be)},getExpressionRef:function(e){return void 0!==i(e,ye)?ye:be},getLibraryIdRef:function(e){return i(e,xe)?xe:Se},getLibraryId:function(e){return i(e,xe)||i(e,Se)},getLabelRef:function(e){return i(e,ve)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,ve)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var we="qDef.qDef",Ee="qDef.base.qDef",Re="qLibraryId",ke="qDef.base.qLibraryId",Oe="qDef.qLabel",Le="qDef.qLabelExpression",Me="qDef.base.qLabel",Ae="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",Te="qDef.base.qAggrFunc",De={initBase:function(e,t){(t||De.isValid(e))&&(r(e,Ee,i(e,we)),r(e,ke,i(e,Re)),r(e,Me,i(e,Oe)),r(e,Ae,i(e,Le)))},restoreBase:function(e){De.isValid(e)&&(r(e,we,i(e,Ee)),r(e,Re,i(e,ke)),r(e,Oe,i(e,Me)),r(e,Le,i(e,Ae)),i(e,Ie)&&i(e,Te)&&r(e,Ie,i(e,Te)),delete e.qDef.base)},isValid:function(e){var t=i(e,Ee),r=i(e,ke);return void 0!==t||void 0!==r}};const Pe=De;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 Ne={accumulation:q,movingAverage:H,difference:ee,normalization:ge,timeSeriesDecomposition:X};const $e={modifiers:Ne,apply:qe,applyModifiers:Fe,cleanUpMeasure:je,destroy:function(e){e&&ze[e.id]&&ze[e.id].masterItemSubscriber&&(ze[e.id].masterItemSubscriber&&ze[e.id].masterItemSubscriber.unsubscribe(),delete ze[e.id])},hasActiveModifiers:Be,getActiveModifier:We,initBase:Pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Ne[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Ne[e]&&Ne[e].isApplicable({properties:r,layout:n})}))},measureBase:Ce,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Ve(e);Qe({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||ot({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:He};var ze={};function qe(){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,l=e.masterItem,s=!1;ze[r.id]=ze[r.id]||{isFirstTime:!0};var c=ze[r.id].isFirstTime;if(ze[r.id].isFirstTime=!1,n&&"object"===_e(n))return Fe({model:r,properties:n});var u=r?r.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(s);var p=i(u,"qHyperCube.qMeasureInfo"),f=ze[r.id].lastReloadTime;if(ze[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),Be({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 Je({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 Qe({modifiers:Ve(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:l,isFirstTime:c})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);Ye(n);var o=it(n);return et({model:r}).then((function(t){return tt({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;Ue(t).forEach((function(e){return function(e){var t=e.measure;if(Je({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===_e(e)&&!e.disabled){if(r++,"object"!==_e(Ne[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=Ne[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Ke(t)&&C.simplifyExpression(t.qDef.base.qDef)!==C.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Fe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:l,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(s)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===_e(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=it(n);return at({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return Ue(n).forEach((function(e){return je(e)})),nt({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(s)}function Fe(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,l=e.runUpdateIfChange,s=void 0!==l&&l,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=s?t()(!0,{},o):o),Ye(o);var p=it(o);return at({model:r,libraryIds:p,masterItem:c}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,l=e.dimensionAndFieldList;if(r||(r=Ue(n)),!r.length)return Promise.resolve();if(!Be({measures:r,properties:n}))return r.forEach((function(e){return je(e)})),Promise.resolve();var s=a?void 0:it(n);return et({model:o,dimensionAndFieldList:l}).then((function(e){return tt({libraryIds:s,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Qe({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,l=0;Pe.isValid(r)||Pe.initBase(r,!0);var s=r.qDef,c=s.modifiers,u=s.base;Array.isArray(c)&&c.forEach((function(e){if("object"===_e(e)&&!e.disabled){if(l++,"object"!==_e(Ne[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(l>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ne[e.type].initModifier(e,r);var s=r.qLibraryId||u&&u.qLibraryId;s?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],l=a.qMeasure.qDef,s=""===l?l:Ne[n.type].generateExpression({expression:l,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,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:s,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ne[n.type].updateModifier&&Ne[n.type].updateModifier(n,o.qHyperCubeDef);var a=Ce.getExpression(r),l=""===a?a:Ne[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,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||He(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&He(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}),Xe(r)):je(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return s?nt({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function je(e){!function(e){var t=Ve(e);return Array.isArray(t)&&t.some((function(e){return"object"===_e(e)&&!e.disabled&&!Ne[e.type]}))}(e)?Pe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Xe(e)}function Be(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Qe({modifiers:Ve(e),properties:r,layout:n})}))}function We(e){var t=Ve(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Ne[n.type]&&!n.disabled)return n}}function He(e){var t=We(e);return!t||Ne[t.type].enableTotalsFunction(e)}function Ue(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ve(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ge(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function Ye(e){Ue(e).forEach((function(e){return function(e){var r=We(e);r&&(void 0!==r.outputExpression&&Ge(r)!==e.qDef.qDef?delete e.qDef.base:!Pe.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function Xe(e){var t=Ve(e);Array.isArray(t)&&t.forEach((function(t){"object"===_e(t)&&(t.disabled||!Ne[t.type]&&Ge(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ke(e){return e.base||e.qDef&&e.qDef.base}function Ze(e){var t=Ke(e);return e.qLibraryId||t&&t.qLibraryId}function Je(e){var t=e.measure,r=e.properties,n=e.layout;return!Ze(t)&&Qe({modifiers:Ve(t),properties:r,layout:n})}function Qe(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==_e(e)||e.disabled||!Ne[e.type])&&(void 0===o[e.type]&&(o[e.type]=Ne[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function et(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 tt(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={},l=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),Promise.all(l).then((function(){return a}))}function rt(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function nt(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),rt)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),rt)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),rt)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),rt);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 ot(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===_e(e)&&!e.disabled&&Ne[e.type]&&Ne[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function it(e){var t=Ue(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Ve(t);if(Qe({modifiers:n,properties:e})){var i=Ze(t);i&&r.push(i),o=o||ot({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function at(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(ze[t.id].masterItemSubscriber=ze[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},l={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},r=i(e,"qInfo.qType");return r&&l[r]&&l[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=s(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:s(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,l=[];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]&&l.push(u(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&l.push(u(e,"getDimension"))}))),Promise.all(l)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return qe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ze[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),e.default=o.default,Object.defineProperty(e,"__esModule",{value:!0})})()}(a);var l=o(a);let s=function(e){return e.SELECTED="selected",e.POSSIBLE="possible",e.EXCLUDED="excluded",e.INACTIVE="inactive",e}({}),c=function(e){return 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",e}({}),u=function(e){return 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",e}({}),d=function(e){return e.FOCUS="focus",e.FOCUS_BUTTON="focusButton",e.BLUR="blur",e.ADD_TAB="addTab",e.REMOVE_TAB="removeTab",e}({}),p=function(e){return e.A="ascending",e.D="descending",e}({}),f=function(e){return e.PIXELS="pixels",e.PERCENTAGE="percentage",e.FIT_TO_CONTENT="fitToContent",e.AUTO="auto",e}({});const m=120,h=[0,0],g=[1,0],v={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}},b=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)=>(!l.hasActiveModifiers({measures:[e],properties:t.properties})||l.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"))}},y={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:f.AUTO,translation:"Common.Auto"},{value:f.FIT_TO_CONTENT,translation:"Object.Table.Column.FitToContent"},{value:f.PIXELS,translation:"Object.Table.Column.Pixels"},{value:f.PERCENTAGE,translation:"Object.Table.Column.Percentage"}],defaultValue:f.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)===f.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)===f.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))}}},S={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"}]},...v,...y},x={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"}},C=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:b(e)}),w=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:x},presentation:{type:"items",translation:"properties.presentation",items:S}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:C(e)},presentation:{type:"items",translation:"properties.presentation",items:S}}}}}:{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:{...x,...S}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",grouped:!0,items:{...C(e),...S}}}},E={type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,key:"theme",defaultValue:[],items:{headerSection:{translation:"properties.Header",component:"panel-section",items:{headerFontItem:{component:"items",ref:"components",key:"general",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 l=r.theme.current();return parseInt(null!==(n=null===(o=l.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:l.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 l=r.theme.current();return{color:null!==(n=null===(o=l.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:l.color}},dualOutput:!0}}}}}}},contentSection:{component:"panel-section",translation:"properties.Content",items:{contentFontItem:{component:"items",ref:"components",key:"general",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 l=r.theme.current();return parseInt(null!==(n=null===(o=l.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:l.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 l=r.theme.current();return{color:null!==(n=null===(o=l.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:l.color}},dualOutput:!0}}}}}}},hoverEffectSection:{translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"general",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}}}}}}}]},R=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"))}},k=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"}]}}}},O=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[E,R(e),{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1}]},...k(e)}}),L={uses:"sorting"},M={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},A=e=>({type:"items",component:"accordion",items:{data:w(e),sorting:L,addOns:M,settings:O(e)}});function I(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function T(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 D(e){return e>0?0:1}function P(e){return e.translator.get("Visualizations.Descriptions.Column")}function _(e){return{measures:{min:D,max:1e3,description:()=>P(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;I(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties;T(o,(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n)}},dimensions:{min:D,max:1e3,description:()=>P(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return I(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(null!=e&&e.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;T(o,n)}}}}var N={},$={get exports(){return N},set exports(e){N=e}};!function(e,t){window,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="/conversion/",r(r.s=2)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},s=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&&(s(o)||(i=l(o)))?(i?(i=!1,a=n&&l(n)?n:[]):a=n&&s(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,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},s=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&&(s(o)||(i=l(o)))?(i?(i=!1,a=n&&l(n)?n:[]):a=n&&s(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 l=a[i];return a[i]=r,{updated:r,previous:l}}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},l="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function c(e){return l+e+s}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],l=0;l<a.qFieldDefs.length;++l){var s=a.qFieldDefs[l];if(s.qName===o)return s}}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,l=e.valueComp,s=void 0===l?"0":l;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(s,")")}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(s,")")}return"".concat(a,"({1}").concat(s,")")}function y(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var x={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 l=b({modifier:r,dimensions:n,dimensionAndFieldList:o}),s=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(l).concat(s,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(l).concat(s,")")}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===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(l);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+l.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 l=S({properties:t,layout:r});return l>=o&&l<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(l),r=e.indexOf(s);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 k(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function O(e){return void 0===e}function L(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(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]=O(e[r||t])?i:e[t],e=e[r||t]}})),e}function A(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){A(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(!A(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],l="".concat(r,"/").concat(o);A(i,a)||L(t,o)||(O(a)?n.push({op:"add",path:l,value:i}):k(i)&&k(a)?n=n.concat(E.generate(a,i,l)):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]&&O(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(A(t,o))return n;if(!O(t[0])&&O(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var l=o.length-1;l>=0;l-=1)-1===(i=a(t,o[l].qInfo&&o[l].qInfo.qId,l))?(n.push({op:"remove",path:"".concat(r,"/").concat(l)}),o.splice(l,1)):n=n.concat(E.generate(o[l],t[i],"".concat(r,"/").concat(l)));for(var s=0,c=t.length;s<c;s+=1)-1===(i=a(o,t[s].qInfo&&t[s].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(s),value:t[s]}),o.splice(s,0,t[s])):i!==s&&(n.push({op:"move",path:"".concat(r,"/").concat(s),from:"".concat(r,"/").concat(i)}),o.splice(s,0,o.splice(i,1)[0]));return n}(a,i,l)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){O(t[o])&&!L(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},E.apply=function(e,t){t.forEach((function(t){var r,n=M(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 l,s=t.value.slice();i.length=0,(l=i).push.apply(l,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")}()}(s))}else if(k(i)&&k(t.value))r=i,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!L(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=M(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:""},$={translationKey:"properties.modifier.accumulation",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.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,l=e.dimensionAndFieldList;if(!r)return t;var s=i;void 0===s&&(s=x.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=x.getNumStepComp(r,s),p=x.getAboveComp(r,s,u,d),f=x.getRangeComp("RangeSum",p);if(x.needDimension({modifier:r,properties:n,layout:o})){var m=x.getDimComp(c,1),h=x.getDimComp(c,0),g=x.getAggrComp(f,m,h);f=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,valueComp:g}):g}return f},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.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!x.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 x.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}},z="movingAverage";function q(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===z)return r[n]}function F(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===z)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var j={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},B={translationKey:"properties.modifier.movingAverage",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.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,l=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return r;var c=l;void 0===c&&(c=x.getNumDimensions({properties:o,layout:i}));var u=a(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=x.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:u,dimensionAndFieldList:s,treatMissingAsNull:d}),f=x.getNumStepComp(n,c),m=x.getAboveComp(n,c,p,f);if(n.nullSuppression)t=x.getRangeComp("RangeAvg",m);else{var h=x.getRangeComp("RangeSum",m),g=function(e,t){var r=x.getRowNoComp(e,t);if(!x.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(x.needDimension({modifier:n,properties:o,layout:i})){var b=x.getDimComp(u,1),y=x.getDimComp(u,0),S=x.getAggrComp(v,b,y);v=n.showExcludedValues?x.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:S}):S}return v},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.initModifier(e,j)},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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(F(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(F(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(F(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(F(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=q(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=q(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(F(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(F(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=q(t,e);return i&&!i.disabled}};return r}},W="difference";function H(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function U(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===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var V={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},G={translationKey:"properties.modifier.difference",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return t;var s=i;void 0===s&&(s=x.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=x.getAboveComp(r,s,u),p="".concat(u," - ").concat(d);if(x.needDimension({modifier:r,properties:n,layout:o})){var f=x.getDimComp(c,1),m=x.getDimComp(c,0),h=x.getAggrComp(p,f,m);p=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(V).forEach((function(t){void 0===e[t]&&(e[t]=V[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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(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(U(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(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(W))return!1;var i=H(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(x.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(x.getDimDefWithWrapper(r),">"):""}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return t;var s=i;void 0===s&&(s=x.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var l=ne(t),s=oe(t,r,n),c=""===l&&""===s?"":l||s,u=ie(o,i),d=ae(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=x.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,s,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!x.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 x.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},se={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:$,movingAverage:B,difference:G,normalization:le},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:se,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=xe(e);Le({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,l=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var s=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 Oe({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 Le({modifiers:xe(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:l,isFirstTime:s})?t.getEffectiveProperties().then((function(e){var r=o()(!0,{},e);we(r);var n=Pe(r);return Me({model:t}).then((function(o){return Ae({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;Se(t).forEach((function(e){return function(e){var t=e.measure;if(Oe({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)&&x.simplifyExpression(t.qDef.base.qDef)!==x.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:l,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 Se(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,l=e.runUpdateIfChange,s=void 0!==l&&l,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=s?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,l=e.dimensionAndFieldList;if(t||(t=Se(r)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var s=i?void 0:Pe(r);return Me({model:n,dimensionAndFieldList:l}).then((function(e){return Ae({libraryIds:s,model:n,libraryItemsProps:i}).then((function(n){t.forEach((function(t){Le({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,i=e.dimensionAndFieldList,l=0;ue.isValid(t)||ue.initBase(t,!0);var s=t.qDef,c=s.modifiers,u=s.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(l++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(l>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");pe[e.type].initModifier(e);var s=t.qLibraryId||u&&u.qLibraryId;s?function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],l=a.qMeasure.qDef,s=pe[r.type].generateExpression({expression:l,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=s,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:s,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=se.getExpression(t),l=pe[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=l,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 s?Te({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=xe(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 Le({modifiers:xe(e),properties:r,layout:n})}))}function be(e){var t=xe(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 Se(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function xe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function we(e){Se(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=xe(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 ke(e){var t=Re(e);return e.qLibraryId||t&&t.qLibraryId}function Oe(e){var t=e.measure,r=e.properties,n=e.layout;return!ke(t)&&Le({modifiers:xe(t),properties:r,layout:n})}function Le(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 Me(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 Ae(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={},l=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),Promise.all(l).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=Se(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=xe(t);if(Le({modifiers:n,properties:e})){var i=ke(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={},l={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},r=a(e,"qInfo.qType");return r&&l[r]&&l[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=s(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:s(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,a=e.dimensionLibraryIds,l=[];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]&&l.push(u(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!n[e]&&l.push(u(e,"getDimension"))}))),Promise.all(l)},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 l=n[a];void 0!==i[l]&&null!==i[l]||(i[l]=Number.isNaN(+n[a+1])?{}:[]),i=i[l]}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 l(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 l(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)?l(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 l(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 s(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 l,s=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");s&&(l=o.excludedDimensions).push.apply(l,a(s))},addMeasures:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.measures).push.apply(t,s(n.qMeasures));var a,l=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");l&&(a=o.excludedMeasures).push.apply(a,s(l))},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 l=i.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[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 S(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var x=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 k={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,l=r.data[0];for(t=0;t<l.dimensions.length;++t){var s=b(l.dimensions[t],a);i.qDimensions.length<n?i.qDimensions.push(s):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(s)}for(t=0;t<l.excludedDimensions.length;++t){var c=b(l.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,l=r.data[0];for(t=0;t<l.measures.length;++t){var s=y(l.measures[t],a);i.qMeasures.length<n?i.qMeasures.push(s):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(s)}for(t=0;t<l.excludedMeasures.length;++t){var c=y(l.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},l=S(a.max,o.dimensions.length,x),s=S(a.min,o.dimensions.length,0);return{maxDimensions:S(i.max,l,x),minDimensions:S(i.min,s,0),maxMeasures:l,minMeasures:s}},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,l=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(l.dimensions.length>r&&r>0||l.excludedDimensions&&l.excludedDimensions.length&&l.dimensions.length+l.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(l.measures.length>o&&o>0||l.excludedMeasures&&l.excludedMeasures.length&&l.measures.length+l.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&l.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&l.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 O(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 L={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,l=i.getValue(a,r||""),s=l.qHyperCubeDef;return s.qInterColumnSortOrder||(s.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:s}),m.addMeasures({exportFormat:o,qHyperCubeDef:s}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:s}),delete s.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),r&&(o.properties.qHyperCubeDef=s,delete l.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,l=e.defaultPropertyValues,s=void 0===l?{}:l,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=k.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:c}),v=i.getValue(n,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=k.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),S=y.maxDimensions,x=y.minDimensions,C=y.maxMeasures,w=y.minMeasures,E=s.defaultDimension,R=void 0===E?k.getDefaultDimension():E,L=s.defaultMeasure,M=void 0===L?k.getDefaultMeasure():L;b.qDimensions.length=0,b.qMeasures.length=0,k.shouldInitLayoutExclude({exportFormat:t,maxDimensions:S,minDimensions:x,maxMeasures:C,minMeasures:w})&&k.initLayoutExclude({exportFormat:t,maxDimensions:S,minDimensions:x,maxMeasures:C,minMeasures:w,newHyperCubeDef:b}),k.addDimensions({exportFormat:t,maxDimensions:S,minDimensions:x,newHyperCubeDef:b,defaultDimension:R}),k.addMeasures({exportFormat:t,maxMeasures:C,minMeasures:w,newHyperCubeDef:b,defaultMeasure:M}),k.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),k.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),k.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),k.copyPropertyIfExist("qMaxStackedCells",v,b),k.copyPropertyIfExist("qNoOfLeftDims",v,b),k.copyPropertyOrSetDefault("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),k.copyPropertyOrSetDefault("qMode",v,b,"S"),k.copyPropertyOrSetDefault("qReductionMode",v,b,"N"),k.copyPropertyOrSetDefault("qSortbyYValue",v,b),k.copyPropertyOrSetDefault("qIndentMode",v,b),k.copyPropertyOrSetDefault("qShowTotalsAbove",v,b),k.importCommonProperties(g,t,n),h.qProperty=g;var A=i.getValue(u||{},"support.modifiers");return k.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:A}),p&&O(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&O(h.qProperty,"dynamicScript"),h}},M={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function A(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||!M[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],l=t.length;if(A(a,t,n,o),I(t,l))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 $(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 z(e,t){var r=T.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){$(e,"qAttributeDimensions",r),$(e,"qAttributeExpressions",r)})),t.forEach((function(e){$(e,"qAttributeDimensions",r),$(e,"qAttributeExpressions",r)}))}function q(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function F(e){var t=e.properties,r=e.isDimension,n=e.dimensions,o=e.excludedDimensions,a=e.measures,l=e.label;z(n,o);var s=n[n.length-1];if(s){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:l,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},s.qAttributeDimensions.push(f)):s.qAttributeExpressions.push(f)}}}function j(e,t,r,n){var o,i,a,l={};switch(e){case"dimension":r.qLibraryId?(l.type="dimension",l.name=r.qLibraryId,l.id=r.qLibraryId):(l.type="field",t?(l.name=r.label||r.qDef,l.id=r.qDef):(l.name=r.qDef.qFieldDefs[0],l.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))?(l.type="measure",l.name=o,l.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n))&&(l.expression=i)):(l.type="expression",t?(l.name=r.label||r.qExpression,l.id=r.qExpression):(l.name=r.qDef.qDef,l.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 l}var B={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function W(e,t,r,n){var o=r?"expression":t.type,i=e.color,a=i.mode,l=D.getItemLabel(t);switch(q(e,l||""),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||l,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&&B.useMasterNumberFormat(i.formatting)}n||(i.auto=!1,i.mode=a)}function H(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]),l=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===l}(r,e,t)?0:r.length-1],o=T.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",o);return W(e,j("dimension",!!a,a||n)),!!a}function U(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&&q(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=j("dimension",!1,r[n.activeDimensionIndex]);o.activeDimensionIndex=n.activeDimensionIndex,W(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&H(e,t))return;F({properties:e,isDimension:!0,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byDimDef.label")})}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.byMeasureDef");if(a&&q(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=j("measure",!1,r[n.activeMeasureIndex],!0);o.activeMeasureIndex=n.activeMeasureIndex,W(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,l=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return W(e,j("measure",!!l,l||n[0])),!!l}(e,t))return;F({properties:e,isDimension:!1,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byMeasureDef.label")})}var G={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"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);n?z(o,l):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})?U(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,o=e.measures,a=e.properties,l=i.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==l&&!o.length)}({auto:n,colorMode:r,dimensions:o,measures:a,properties:e})?V(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"),z(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=L.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),l=i.measures.concat(i.excludedMeasures),s=T.IDMAP,c=s.COLOR_BY_ALTERNATIVE,u=s.COLOR_BY_EXPRESSION;return T.moveByIdFromGroup(a,[],"qAttributeDimensions",c),T.moveByIdFromGroup(a,[],"qAttributeExpressions",c),T.moveByIdFromGroup(l,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,l=e.extension,s=e.supportedFilters,c=e.isHCModifierSupported,u=L.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:a,extension:l,supportedFilters:s,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=G.getCanColorBy(d,p),v=G.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?G.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:d})&&G.addColorByExpression(d):G.switchToAutoColor(d),v&&G.updateColorBy(d,"qHyperCubeDef."),G.shouldSwitchToColorPersistent(d)&&G.changeProperty(d,"color.persistent",!0),G.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?O(r,"unsupportedAutoMinMax")||v()(r.measureAxis,t.measureAxis):O(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,l=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 s=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);s.length?(i&&(t=s.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=s.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&v()(l,r.properties.measureAxes[t[0].axis])):v()(l,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}),l=a.properties;return i?(h(l,"measureAxis.min","supportedAutoMinMax"),h(l,"measureAxis.max","supportedAutoMinMax")):(h(l,"measureAxis.min","unsupportedAutoMinMax"),h(l,"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,l=e.extension,s=e.supportedFilters,c=e.isHCModifierSupported,u=Y.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:i,extension:l,supportedFilters:s,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),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,l=i.getValue(o,a);if(void 0!==l){var s=i.getValue(o,"qDef.cId");s||(s=i.generateId(),i.setValue(o,"qDef.cId",s));var c=J(r,n,s);i.setValue(t,c,l),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,l=i.getValue(o,"qDef.cId");if(l){var s=J(r,n,l),c=i.getValue(t,s);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,s,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:L,colorChart:Y,axisChart:Z,quarantineProperty:h,unquarantineProperty:O,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}])}($);var z=o(N);function q(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function F(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function j(){}var B=1/.7,W="\\s*([+-]?\\d+)\\s*",H="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",U="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",V=/^#([0-9a-f]{3,8})$/,G=new RegExp("^rgb\\("+[W,W,W]+"\\)$"),Y=new RegExp("^rgb\\("+[U,U,U]+"\\)$"),X=new RegExp("^rgba\\("+[W,W,W,H]+"\\)$"),K=new RegExp("^rgba\\("+[U,U,U,H]+"\\)$"),Z=new RegExp("^hsl\\("+[H,U,U]+"\\)$"),J=new RegExp("^hsla\\("+[H,U,U,H]+"\\)$"),Q={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 ee(){return this.rgb().formatHex()}function te(){return this.rgb().formatRgb()}function re(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=V.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?ne(t):3===r?new ae(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?oe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?oe(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=G.exec(e))?new ae(t[1],t[2],t[3],1):(t=Y.exec(e))?new ae(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=X.exec(e))?oe(t[1],t[2],t[3],t[4]):(t=K.exec(e))?oe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Z.exec(e))?ue(t[1],t[2]/100,t[3]/100,1):(t=J.exec(e))?ue(t[1],t[2]/100,t[3]/100,t[4]):Q.hasOwnProperty(e)?ne(Q[e]):"transparent"===e?new ae(NaN,NaN,NaN,0):null}function ne(e){return new ae(e>>16&255,e>>8&255,255&e,1)}function oe(e,t,r,n){return n<=0&&(e=t=r=NaN),new ae(e,t,r,n)}function ie(e,t,r,n){return 1===arguments.length?function(e){return e instanceof j||(e=re(e)),e?new ae((e=e.rgb()).r,e.g,e.b,e.opacity):new ae}(e):new ae(e,t,r,null==n?1:n)}function ae(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function le(){return"#"+ce(this.r)+ce(this.g)+ce(this.b)}function se(){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 ce(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ue(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new pe(e,t,r,n)}function de(e){if(e instanceof pe)return new pe(e.h,e.s,e.l,e.opacity);if(e instanceof j||(e=re(e)),!e)return new pe;if(e instanceof pe)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(r-n)/l+6*(r<n):r===i?(n-t)/l+2:(t-r)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new pe(a,l,s,e.opacity)}function pe(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function fe(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 me(e){return function(){return e}}function he(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):me(isNaN(e)?t:e)}function ge(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ve(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function be(){}q(j,re,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ee,formatHex:ee,formatHsl:function(){return de(this).formatHsl()},formatRgb:te,toString:te}),q(ae,ie,F(j,{brighter:function(e){return e=null==e?B:Math.pow(B,e),new ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ae(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:le,formatHex:le,formatRgb:se,toString:se})),q(pe,(function(e,t,r,n){return 1===arguments.length?de(e):new pe(e,t,r,null==n?1:n)}),F(j,{brighter:function(e){return e=null==e?B:Math.pow(B,e),new pe(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new pe(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 ae(fe(e>=240?e-240:e+120,o,n),fe(e,o,n),fe(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)?he: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):me(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=ie(e)).r,(t=ie(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=he(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 ye=1/.7,Se="\\s*([+-]?\\d+)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,Ee=new RegExp(`^rgb\\(${Se},${Se},${Se}\\)$`),Re=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),ke=new RegExp(`^rgba\\(${Se},${Se},${Se},${xe}\\)$`),Oe=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${xe}\\)$`),Le=new RegExp(`^hsl\\(${xe},${Ce},${Ce}\\)$`),Me=new RegExp(`^hsla\\(${xe},${Ce},${Ce},${xe}\\)$`),Ae={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 Ie(){return this.rgb().formatHex()}function Te(){return this.rgb().formatRgb()}function De(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=we.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Pe(t):3===r?new $e(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?_e(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?_e(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=Ee.exec(e))?new $e(t[1],t[2],t[3],1):(t=Re.exec(e))?new $e(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ke.exec(e))?_e(t[1],t[2],t[3],t[4]):(t=Oe.exec(e))?_e(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Le.exec(e))?We(t[1],t[2]/100,t[3]/100,1):(t=Me.exec(e))?We(t[1],t[2]/100,t[3]/100,t[4]):Ae.hasOwnProperty(e)?Pe(Ae[e]):"transparent"===e?new $e(NaN,NaN,NaN,0):null}function Pe(e){return new $e(e>>16&255,e>>8&255,255&e,1)}function _e(e,t,r,n){return n<=0&&(e=t=r=NaN),new $e(e,t,r,n)}function Ne(e){return e instanceof be||(e=De(e)),e?new $e((e=e.rgb()).r,e.g,e.b,e.opacity):new $e}function $e(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function ze(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}`}function qe(){const e=Fe(this.opacity);return`${1===e?"rgb(":"rgba("}${je(this.r)}, ${je(this.g)}, ${je(this.b)}${1===e?")":`, ${e})`}`}function Fe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function je(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Be(e){return((e=je(e))<16?"0":"")+e.toString(16)}function We(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ue(e,t,r,n)}function He(e){if(e instanceof Ue)return new Ue(e.h,e.s,e.l,e.opacity);if(e instanceof be||(e=De(e)),!e)return new Ue;if(e instanceof Ue)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(r-n)/l+6*(r<n):r===i?(n-t)/l+2:(t-r)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new Ue(a,l,s,e.opacity)}function Ue(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ve(e){return(e=(e||0)%360)<0?e+360:e}function Ge(e){return Math.max(0,Math.min(1,e||0))}function Ye(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ge(be,De,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ie,formatHex:Ie,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return He(this).formatHsl()},formatRgb:Te,toString:Te}),ge($e,(function(e,t,r,n){return 1===arguments.length?Ne(e):new $e(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return e=null==e?ye:Math.pow(ye,e),new $e(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new $e(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $e(je(this.r),je(this.g),je(this.b),Fe(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:ze,formatHex:ze,formatHex8:function(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}${Be(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:qe,toString:qe})),ge(Ue,(function(e,t,r,n){return 1===arguments.length?He(e):new Ue(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return e=null==e?ye:Math.pow(ye,e),new Ue(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ue(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 $e(Ye(e>=240?e-240:e+120,o,n),Ye(e,o,n),Ye(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Ue(Ve(this.h),Ge(this.s),Ge(this.l),Fe(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=Fe(this.opacity);return`${1===e?"hsl(":"hsla("}${Ve(this.h)}, ${100*Ge(this.s)}%, ${100*Ge(this.l)}%${1===e?")":`, ${e})`}`}}));const Xe=Math.PI/180,Ke=180/Math.PI,Ze=4/29,Je=6/29,Qe=3*Je*Je;function et(e){if(e instanceof tt)return new tt(e.l,e.a,e.b,e.opacity);if(e instanceof at)return lt(e);e instanceof $e||(e=Ne(e));var t,r,n=it(e.r),o=it(e.g),i=it(e.b),a=rt((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=rt((.4360747*n+.3850649*o+.1430804*i)/.96422),r=rt((.0139322*n+.0971045*o+.7141733*i)/.82521)),new tt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function tt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function rt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Qe+Ze}function nt(e){return e>Je?e*e*e:Qe*(e-Ze)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function it(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function at(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function lt(e){if(isNaN(e.h))return new tt(e.l,0,0,e.opacity);var t=e.h*Xe;return new tt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function st(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 l=n[a];void 0===i[l]&&(i[l]=Number.isNaN(+n[a+1])?{}:[]),i=i[l]}void 0!==r?i[o]=r:delete i[o]}}function ct(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 ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dt(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 pt(e,t,r){return t&&dt(e.prototype,t),r&&dt(e,r),e}function ft(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mt(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 ht(e,t){var r,n,o,i,a,l=new yt(e),s=+e.value&&(l.value=e.value),c=[l];for(null==t&&(t=gt);r=c.pop();)if(s&&(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 yt(o[i])),n.parent=r,n.depth=r.depth+1;return l.eachBefore(bt)}function gt(e){return e.children}function vt(e){e.data=e.data.data}function bt(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function yt(e){this.data=e,this.depth=this.height=0,this.parent=null}ge(tt,(function(e,t,r,n){return 1===arguments.length?et(e):new tt(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return new tt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new tt(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 $e(ot(3.1338561*(t=.96422*nt(t))-1.6168667*(e=1*nt(e))-.4906146*(r=.82521*nt(r))),ot(-.9787684*t+1.9161415*e+.033454*r),ot(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ge(at,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof at)return new at(e.h,e.c,e.l,e.opacity);if(e instanceof tt||(e=et(e)),0===e.a&&0===e.b)return new at(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ke;return new at(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new at(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return new at(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new at(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return lt(this).rgb()}})),yt.prototype=ht.prototype={constructor:yt,count:function(){return this.eachAfter(mt)},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 ht(this).eachBefore(vt)}};var St,xt,Ct=(St=function(e){
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-table"]=t(e.stardust)}(this,(function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}const r={version:JSON.stringify("2.2.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 n=()=>({targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]});function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(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 a={};!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)},l=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},s=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=s(d,r),d!==(o=s(t,r))&&(m&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=n&&i(n)?n:[]):u=n&&a(n)?n:{},l(d,{name:r,newValue:e(m,u,o)})):void 0!==o&&l(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:()=>$e});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 l=a[i];return a[i]=r,{updated:r,previous:l}}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 l="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function c(e){return l+e+s}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],l=0;l<a.qFieldDefs.length;++l){var s=a.qFieldDefs[l];if(s.qName===o)return s}}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,l=e.valueComp,s=void 0===l?"0":l;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(s,")")}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(s,")")}return"".concat(a,"({1}").concat(s,")")}function S(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const C={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 l=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),s=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(l).concat(s,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(l).concat(s,")")}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:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(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===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(l);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+l.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 l=x({properties:t,layout:r});return l>=o&&l<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(l),r=e.indexOf(s);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),k={},O=Array.isArray;function L(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function A(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]=M(e[r||t])?i:e[t],e=e[r||t]}})),e}function T(e,t){var r=!0;if(L(e)&&L(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(O(e)&&O(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}k.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],l="".concat(r,"/").concat(o);T(i,a)||A(t,o)||(M(a)?n.push({op:"add",path:l,value:i}):L(i)&&L(a)?n=n.concat(k.generate(a,i,l)):O(i)&&O(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&M(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(!M(t[0])&&M(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var l=o.length-1;l>=0;l-=1)-1===(i=a(t,o[l].qInfo&&o[l].qInfo.qId,l))?(n.push({op:"remove",path:"".concat(r,"/").concat(l)}),o.splice(l,1)):n=n.concat(k.generate(o[l],t[i],"".concat(r,"/").concat(l)));for(var s=0,c=t.length;s<c;s+=1)-1===(i=a(o,t[s].qInfo&&t[s].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(s),value:t[s]}),o.splice(s,0,t[s])):i!==s&&(n.push({op:"move",path:"".concat(r,"/").concat(s),from:"".concat(r,"/").concat(i)}),o.splice(s,0,o.splice(i,1)[0]));return n}(a,i,l)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){M(t[o])&&!A(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},k.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,l=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(O(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(O(a)&&O(t.value)){var s,c=t.value.slice();a.length=0,(s=a).push.apply(s,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(L(a)&&L(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!A(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);O(o)?o.splice(+i,0,u.splice(+l,1)[0]):(o[i]=u[l],delete u[l])}else"remove"===t.op&&(O(o)?o.splice(+i,1):delete o[i])}))},k.clone=function(e){return R({},e)},k.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},k.updateObject=function(e,t){Object.keys(e).length?k.apply(e,k.generate(e,t)):R(e,t)};const D=k,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 $(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 z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const q={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,l=e.dimensionAndFieldList;if(!r)return t;var s=a;void 0===s&&(s=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=C.getNumStepComp(r,s),p=C.getAboveComp(r,s,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:l,valueComp:g}):g}return f},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,z)},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($(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=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($(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 F="movingAverage";function j(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===F)return r[n]}function B(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===F)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var W={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const H={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,l=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return r;var c=l;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:s,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),S=C.getAggrComp(v,b,y);v=n.showExcludedValues?C.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:S}):S}return v},extractInputExpression:C.extractInputExpression,initModifier:function(e){C.initModifier(e,W)},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(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=j(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=j(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 C.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(F))return!1;var i=j(t,e);return i&&!i.disabled}};return r}};var U="timeSeriesDecomposition";function V(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===U)return r[n]}function G(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===U)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(G(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(G(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=V(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=V(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(U))return!1;var i=V(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,l=e.dimensionAndFieldList;if(!r)return t;var s=a;void 0===s&&(s=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=C.getAboveComp(r,s,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:l,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}},te=0,re=1,ne=2,oe=0,ie=1,ae=2;var le="normalization";function se(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===le)return r[n]}function ce(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===le)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ue(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var de={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:ae,selectionScope:ne};function pe(e){return 2===e?"{1}":""}function fe(e,t,r){return 1===e?"{$<".concat(C.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function me(e,t){return 0===e&&t>1||2===e?"Total":""}function he(e,t,r){return 0===e&&t>1?"<".concat(C.getDimDefWithWrapper(r),">"):""}const ge={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,l=e.dimensionAndFieldList;if(!r)return t;var s=a;void 0===s&&(s=C.getNumDimensions({properties:n,layout:o}));var c=i(n,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var l=pe(t),s=fe(t,r,n),c=""===l&&""===s?"":l||s,u=me(o,i),d=he(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,s,r.primaryDimension)},initModifier:function(e){Object.keys(de).forEach((function(t){void 0===e[t]&&(e[t]=de[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(ce(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:ne,options:function(r){return function(e,t,r){var n=[{value:te,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:re,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:ne,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=ue(t,0);t.splice(n,1)}return t}(se(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ce(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 se(t,e).selectionScope===re}},value:{refFn:function(t){return"".concat(ce(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return se(t,e).selectionScope===re}},dimensionalScope:{refFn:function(t){return"".concat(ce(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:ae,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:oe,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:ie,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:ae,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=ue(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=ue(t,1);t.splice(n,1)}return t}(se(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ce(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(se(t,e).dimensionalScope||0)===oe&&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(le))return!1;var i=se(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:pe,getFieldSelectionComp:fe,getTotalComp:me,getSelectedDimComp:he};var ve="qDef.base",be="qDef.qDef",ye="qDef.base.qDef",Se="qLibraryId",xe="qDef.base.qLibraryId";const Ce={getExpression:function(e){var t=i(e,ye);return void 0!==t?t:i(e,be)},getExpressionRef:function(e){return void 0!==i(e,ye)?ye:be},getLibraryIdRef:function(e){return i(e,xe)?xe:Se},getLibraryId:function(e){return i(e,xe)||i(e,Se)},getLabelRef:function(e){return i(e,ve)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,ve)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var we="qDef.qDef",Ee="qDef.base.qDef",Re="qLibraryId",ke="qDef.base.qLibraryId",Oe="qDef.qLabel",Le="qDef.qLabelExpression",Me="qDef.base.qLabel",Ae="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",Te="qDef.base.qAggrFunc",De={initBase:function(e,t){(t||De.isValid(e))&&(r(e,Ee,i(e,we)),r(e,ke,i(e,Re)),r(e,Me,i(e,Oe)),r(e,Ae,i(e,Le)))},restoreBase:function(e){De.isValid(e)&&(r(e,we,i(e,Ee)),r(e,Re,i(e,ke)),r(e,Oe,i(e,Me)),r(e,Le,i(e,Ae)),i(e,Ie)&&i(e,Te)&&r(e,Ie,i(e,Te)),delete e.qDef.base)},isValid:function(e){var t=i(e,Ee),r=i(e,ke);return void 0!==t||void 0!==r}};const Pe=De;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 Ne={accumulation:q,movingAverage:H,difference:ee,normalization:ge,timeSeriesDecomposition:X};const $e={modifiers:Ne,apply:qe,applyModifiers:Fe,cleanUpMeasure:je,destroy:function(e){e&&ze[e.id]&&ze[e.id].masterItemSubscriber&&(ze[e.id].masterItemSubscriber&&ze[e.id].masterItemSubscriber.unsubscribe(),delete ze[e.id])},hasActiveModifiers:Be,getActiveModifier:We,initBase:Pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Ne[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Ne[e]&&Ne[e].isApplicable({properties:r,layout:n})}))},measureBase:Ce,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=Ve(e);Qe({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||ot({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:He};var ze={};function qe(){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,l=e.masterItem,s=!1;ze[r.id]=ze[r.id]||{isFirstTime:!0};var c=ze[r.id].isFirstTime;if(ze[r.id].isFirstTime=!1,n&&"object"===_e(n))return Fe({model:r,properties:n});var u=r?r.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(s);var p=i(u,"qHyperCube.qMeasureInfo"),f=ze[r.id].lastReloadTime;if(ze[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),Be({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 Je({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 Qe({modifiers:Ve(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:l,isFirstTime:c})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);Ye(n);var o=it(n);return et({model:r}).then((function(t){return tt({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;Ue(t).forEach((function(e){return function(e){var t=e.measure;if(Je({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===_e(e)&&!e.disabled){if(r++,"object"!==_e(Ne[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=Ne[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Ke(t)&&C.simplifyExpression(t.qDef.base.qDef)!==C.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Fe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:l,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(s)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===_e(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=it(n);return at({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return Ue(n).forEach((function(e){return je(e)})),nt({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(s)}function Fe(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,l=e.runUpdateIfChange,s=void 0!==l&&l,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=s?t()(!0,{},o):o),Ye(o);var p=it(o);return at({model:r,libraryIds:p,masterItem:c}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,l=e.dimensionAndFieldList;if(r||(r=Ue(n)),!r.length)return Promise.resolve();if(!Be({measures:r,properties:n}))return r.forEach((function(e){return je(e)})),Promise.resolve();var s=a?void 0:it(n);return et({model:o,dimensionAndFieldList:l}).then((function(e){return tt({libraryIds:s,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Qe({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,l=0;Pe.isValid(r)||Pe.initBase(r,!0);var s=r.qDef,c=s.modifiers,u=s.base;Array.isArray(c)&&c.forEach((function(e){if("object"===_e(e)&&!e.disabled){if(l++,"object"!==_e(Ne[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(l>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ne[e.type].initModifier(e,r);var s=r.qLibraryId||u&&u.qLibraryId;s?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],l=a.qMeasure.qDef,s=""===l?l:Ne[n.type].generateExpression({expression:l,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,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:s,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ne[n.type].updateModifier&&Ne[n.type].updateModifier(n,o.qHyperCubeDef);var a=Ce.getExpression(r),l=""===a?a:Ne[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,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||He(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&He(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}),Xe(r)):je(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:u,dimensionAndFieldList:d}).then((function(){return s?nt({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function je(e){!function(e){var t=Ve(e);return Array.isArray(t)&&t.some((function(e){return"object"===_e(e)&&!e.disabled&&!Ne[e.type]}))}(e)?Pe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Xe(e)}function Be(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Qe({modifiers:Ve(e),properties:r,layout:n})}))}function We(e){var t=Ve(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Ne[n.type]&&!n.disabled)return n}}function He(e){var t=We(e);return!t||Ne[t.type].enableTotalsFunction(e)}function Ue(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ve(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ge(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function Ye(e){Ue(e).forEach((function(e){return function(e){var r=We(e);r&&(void 0!==r.outputExpression&&Ge(r)!==e.qDef.qDef?delete e.qDef.base:!Pe.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function Xe(e){var t=Ve(e);Array.isArray(t)&&t.forEach((function(t){"object"===_e(t)&&(t.disabled||!Ne[t.type]&&Ge(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ke(e){return e.base||e.qDef&&e.qDef.base}function Ze(e){var t=Ke(e);return e.qLibraryId||t&&t.qLibraryId}function Je(e){var t=e.measure,r=e.properties,n=e.layout;return!Ze(t)&&Qe({modifiers:Ve(t),properties:r,layout:n})}function Qe(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==_e(e)||e.disabled||!Ne[e.type])&&(void 0===o[e.type]&&(o[e.type]=Ne[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function et(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 tt(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={},l=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),Promise.all(l).then((function(){return a}))}function rt(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function nt(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),rt)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),rt)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),rt)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),rt);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 ot(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===_e(e)&&!e.disabled&&Ne[e.type]&&Ne[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function it(e){var t=Ue(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=Ve(t);if(Qe({modifiers:n,properties:e})){var i=Ze(t);i&&r.push(i),o=o||ot({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function at(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(ze[t.id].masterItemSubscriber=ze[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},l={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},r=i(e,"qInfo.qType");return r&&l[r]&&l[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=s(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:s(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,l=[];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]&&l.push(u(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&l.push(u(e,"getDimension"))}))),Promise.all(l)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return qe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),ze[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),e.default=o.default,Object.defineProperty(e,"__esModule",{value:!0})})()}(a);var l=o(a);let s=function(e){return e.SELECTED="selected",e.POSSIBLE="possible",e.EXCLUDED="excluded",e.INACTIVE="inactive",e}({}),c=function(e){return 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",e}({}),u=function(e){return 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",e}({}),d=function(e){return e.FOCUS="focus",e.FOCUS_BUTTON="focusButton",e.BLUR="blur",e.ADD_TAB="addTab",e.REMOVE_TAB="removeTab",e}({}),p=function(e){return e.A="ascending",e.D="descending",e}({}),f=function(e){return e.PIXELS="pixels",e.PERCENTAGE="percentage",e.FIT_TO_CONTENT="fitToContent",e.AUTO="auto",e}({});const m=120,h=[0,0],g=[1,0],v={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}},b=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)=>(!l.hasActiveModifiers({measures:[e],properties:t.properties})||l.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"))}},y={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:f.AUTO,translation:"Common.Auto"},{value:f.FIT_TO_CONTENT,translation:"Object.Table.Column.FitToContent"},{value:f.PIXELS,translation:"Object.Table.Column.Pixels"},{value:f.PERCENTAGE,translation:"Object.Table.Column.Percentage"}],defaultValue:f.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)===f.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)===f.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))}}},S={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"}]},...v,...y},x={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"}},C=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:b(e)}),w=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:x},presentation:{type:"items",translation:"properties.presentation",items:S}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:C(e)},presentation:{type:"items",translation:"properties.presentation",items:S}}}}}:{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:{...x,...S}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",grouped:!0,items:{...C(e),...S}}}},E={type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,key:"theme",defaultValue:[],items:{headerSection:{translation:"properties.Header",component:"panel-section",items:{headerFontItem:{component:"items",ref:"components",key:"general",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 l=r.theme.current();return parseInt(null!==(n=null===(o=l.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:l.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 l=r.theme.current();return{color:null!==(n=null===(o=l.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:l.color}},dualOutput:!0}}}}}}},contentSection:{component:"panel-section",translation:"properties.Content",items:{contentFontItem:{component:"items",ref:"components",key:"general",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 l=r.theme.current();return parseInt(null!==(n=null===(o=l.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:l.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 l=r.theme.current();return{color:null!==(n=null===(o=l.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:l.color}},dualOutput:!0}}}}}}},hoverEffectSection:{translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"general",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}}}}}}}]},R=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"))}},k=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"}]}}}},O=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[E,R(e),{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1}]},...k(e)}}),L={uses:"sorting"},M={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},A=e=>({type:"items",component:"accordion",items:{data:w(e),sorting:L,addOns:M,settings:O(e)}});function I(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function T(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 D(e){return e>0?0:1}function P(e){return e.translator.get("Visualizations.Descriptions.Column")}function _(e){return{measures:{min:D,max:1e3,description:()=>P(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;I(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties;T(o,(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n)}},dimensions:{min:D,max:1e3,description:()=>P(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return I(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(null!=e&&e.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;T(o,n)}}}}var N={},$={get exports(){return N},set exports(e){N=e}};!function(e,t){window,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="/conversion/",r(r.s=2)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},s=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&&(s(o)||(i=l(o)))?(i?(i=!1,a=n&&l(n)?n:[]):a=n&&s(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,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},s=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&&(s(o)||(i=l(o)))?(i?(i=!1,a=n&&l(n)?n:[]):a=n&&s(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 l=a[i];return a[i]=r,{updated:r,previous:l}}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},l="".concat(" ","(").concat(" "),s="".concat(" ",")").concat(" ");function c(e){return l+e+s}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],l=0;l<a.qFieldDefs.length;++l){var s=a.qFieldDefs[l];if(s.qName===o)return s}}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,l=e.valueComp,s=void 0===l?"0":l;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(s,")")}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(s,")")}return"".concat(a,"({1}").concat(s,")")}function y(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var x={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 l=b({modifier:r,dimensions:n,dimensionAndFieldList:o}),s=i?"":", 0";if(n&&1===n.length){var u=m(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(l).concat(s,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(l).concat(s,")")}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===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(l);if(-1!==r){var n=t.indexOf(s);if(-1!==n)return t.substring(r+l.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 l=S({properties:t,layout:r});return l>=o&&l<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(l),r=e.indexOf(s);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 k(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function O(e){return void 0===e}function L(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(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]=O(e[r||t])?i:e[t],e=e[r||t]}})),e}function A(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){A(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(!A(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],l="".concat(r,"/").concat(o);A(i,a)||L(t,o)||(O(a)?n.push({op:"add",path:l,value:i}):k(i)&&k(a)?n=n.concat(E.generate(a,i,l)):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]&&O(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(A(t,o))return n;if(!O(t[0])&&O(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var l=o.length-1;l>=0;l-=1)-1===(i=a(t,o[l].qInfo&&o[l].qInfo.qId,l))?(n.push({op:"remove",path:"".concat(r,"/").concat(l)}),o.splice(l,1)):n=n.concat(E.generate(o[l],t[i],"".concat(r,"/").concat(l)));for(var s=0,c=t.length;s<c;s+=1)-1===(i=a(o,t[s].qInfo&&t[s].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(s),value:t[s]}),o.splice(s,0,t[s])):i!==s&&(n.push({op:"move",path:"".concat(r,"/").concat(s),from:"".concat(r,"/").concat(i)}),o.splice(s,0,o.splice(i,1)[0]));return n}(a,i,l)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){O(t[o])&&!L(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},E.apply=function(e,t){t.forEach((function(t){var r,n=M(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 l,s=t.value.slice();i.length=0,(l=i).push.apply(l,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")}()}(s))}else if(k(i)&&k(t.value))r=i,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!L(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=M(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:""},$={translationKey:"properties.modifier.accumulation",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.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,l=e.dimensionAndFieldList;if(!r)return t;var s=i;void 0===s&&(s=x.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=x.getNumStepComp(r,s),p=x.getAboveComp(r,s,u,d),f=x.getRangeComp("RangeSum",p);if(x.needDimension({modifier:r,properties:n,layout:o})){var m=x.getDimComp(c,1),h=x.getDimComp(c,0),g=x.getAggrComp(f,m,h);f=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,valueComp:g}):g}return f},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.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!x.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 x.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}},z="movingAverage";function q(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===z)return r[n]}function F(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===z)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var j={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},B={translationKey:"properties.modifier.movingAverage",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.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,l=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return r;var c=l;void 0===c&&(c=x.getNumDimensions({properties:o,layout:i}));var u=a(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=x.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:u,dimensionAndFieldList:s,treatMissingAsNull:d}),f=x.getNumStepComp(n,c),m=x.getAboveComp(n,c,p,f);if(n.nullSuppression)t=x.getRangeComp("RangeAvg",m);else{var h=x.getRangeComp("RangeSum",m),g=function(e,t){var r=x.getRowNoComp(e,t);if(!x.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(x.needDimension({modifier:n,properties:o,layout:i})){var b=x.getDimComp(u,1),y=x.getDimComp(u,0),S=x.getAggrComp(v,b,y);v=n.showExcludedValues?x.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:S}):S}return v},extractInputExpression:x.extractInputExpression,initModifier:function(e){x.initModifier(e,j)},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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(F(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(F(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(F(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(F(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=q(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=q(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(F(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(F(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=q(t,e);return i&&!i.disabled}};return r}},W="difference";function H(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function U(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===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var V={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},G={translationKey:"properties.modifier.difference",needDimension:x.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return t;var s=i;void 0===s&&(s=x.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=x.getAboveComp(r,s,u),p="".concat(u," - ").concat(d);if(x.needDimension({modifier:r,properties:n,layout:o})){var f=x.getDimComp(c,1),m=x.getDimComp(c,0),h=x.getAggrComp(p,f,m);p=r.showExcludedValues?x.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(V).forEach((function(t){void 0===e[t]&&(e[t]=V[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!x.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(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(U(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(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return x.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(W))return!1;var i=H(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(x.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(x.getDimDefWithWrapper(r),">"):""}var le={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return x.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:x.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,i=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return t;var s=i;void 0===s&&(s=x.getNumDimensions({properties:n,layout:o}));var c=a(n,"qHyperCubeDef.qDimensions",[]),u=x.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:c,dimensionAndFieldList:l}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var l=ne(t),s=oe(t,r,n),c=""===l&&""===s?"":l||s,u=ie(o,i),d=ae(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=x.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,s,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!x.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 x.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},se={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:$,movingAverage:B,difference:G,normalization:le},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:se,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=xe(e);Le({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,l=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var s=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 Oe({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 Le({modifiers:xe(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:l,isFirstTime:s})?t.getEffectiveProperties().then((function(e){var r=o()(!0,{},e);we(r);var n=Pe(r);return Me({model:t}).then((function(o){return Ae({libraryIds:n,model:t}).then((function(n){return f&&function(e){var t=e.properties;Se(t).forEach((function(e){return function(e){var t=e.measure;if(Oe({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)&&x.simplifyExpression(t.qDef.base.qDef)!==x.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:l,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 Se(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,l=e.runUpdateIfChange,s=void 0!==l&&l,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=s?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,l=e.dimensionAndFieldList;if(t||(t=Se(r)),!t.length)return Promise.resolve();if(!ve({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var s=i?void 0:Pe(r);return Me({model:n,dimensionAndFieldList:l}).then((function(e){return Ae({libraryIds:s,model:n,libraryItemsProps:i}).then((function(n){t.forEach((function(t){Le({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,i=e.dimensionAndFieldList,l=0;ue.isValid(t)||ue.initBase(t,!0);var s=t.qDef,c=s.modifiers,u=s.base;Array.isArray(c)&&c.forEach((function(e){if("object"===de(e)&&!e.disabled){if(l++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(l>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");pe[e.type].initModifier(e);var s=t.qLibraryId||u&&u.qLibraryId;s?function(e){var t=e.measure,r=e.modifier,n=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],l=a.qMeasure.qDef,s=pe[r.type].generateExpression({expression:l,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=s,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:s,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=se.getExpression(t),l=pe[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:i});r.outputExpression=l,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 s?Te({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=xe(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 Le({modifiers:xe(e),properties:r,layout:n})}))}function be(e){var t=xe(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 Se(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function xe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ce(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function we(e){Se(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=xe(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 ke(e){var t=Re(e);return e.qLibraryId||t&&t.qLibraryId}function Oe(e){var t=e.measure,r=e.properties,n=e.layout;return!ke(t)&&Le({modifiers:xe(t),properties:r,layout:n})}function Le(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 Me(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 Ae(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={},l=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));l.push(t)})),Promise.all(l).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=Se(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=xe(t);if(Le({modifiers:n,properties:e})){var i=ke(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={},l={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){var t={},r=a(e,"qInfo.qType");return r&&l[r]&&l[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=s(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:s(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,a=e.dimensionLibraryIds,l=[];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]&&l.push(u(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!n[e]&&l.push(u(e,"getDimension"))}))),Promise.all(l)},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 l=n[a];void 0!==i[l]&&null!==i[l]||(i[l]=Number.isNaN(+n[a+1])?{}:[]),i=i[l]}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 l(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 l(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)?l(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 l(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 s(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 l,s=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");s&&(l=o.excludedDimensions).push.apply(l,a(s))},addMeasures:function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.measures).push.apply(t,s(n.qMeasures));var a,l=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");l&&(a=o.excludedMeasures).push.apply(a,s(l))},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 l=i.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[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 S(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var x=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 k={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,l=r.data[0];for(t=0;t<l.dimensions.length;++t){var s=b(l.dimensions[t],a);i.qDimensions.length<n?i.qDimensions.push(s):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(s)}for(t=0;t<l.excludedDimensions.length;++t){var c=b(l.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,l=r.data[0];for(t=0;t<l.measures.length;++t){var s=y(l.measures[t],a);i.qMeasures.length<n?i.qMeasures.push(s):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(s)}for(t=0;t<l.excludedMeasures.length;++t){var c=y(l.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},l=S(a.max,o.dimensions.length,x),s=S(a.min,o.dimensions.length,0);return{maxDimensions:S(i.max,l,x),minDimensions:S(i.min,s,0),maxMeasures:l,minMeasures:s}},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,l=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(l.dimensions.length>r&&r>0||l.excludedDimensions&&l.excludedDimensions.length&&l.dimensions.length+l.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(l.measures.length>o&&o>0||l.excludedMeasures&&l.excludedMeasures.length&&l.measures.length+l.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&l.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&l.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 O(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 L={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,l=i.getValue(a,r||""),s=l.qHyperCubeDef;return s.qInterColumnSortOrder||(s.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:s}),m.addMeasures({exportFormat:o,qHyperCubeDef:s}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:s}),delete s.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),r&&(o.properties.qHyperCubeDef=s,delete l.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,l=e.defaultPropertyValues,s=void 0===l?{}:l,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=k.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:c}),v=i.getValue(n,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=k.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),S=y.maxDimensions,x=y.minDimensions,C=y.maxMeasures,w=y.minMeasures,E=s.defaultDimension,R=void 0===E?k.getDefaultDimension():E,L=s.defaultMeasure,M=void 0===L?k.getDefaultMeasure():L;b.qDimensions.length=0,b.qMeasures.length=0,k.shouldInitLayoutExclude({exportFormat:t,maxDimensions:S,minDimensions:x,maxMeasures:C,minMeasures:w})&&k.initLayoutExclude({exportFormat:t,maxDimensions:S,minDimensions:x,maxMeasures:C,minMeasures:w,newHyperCubeDef:b}),k.addDimensions({exportFormat:t,maxDimensions:S,minDimensions:x,newHyperCubeDef:b,defaultDimension:R}),k.addMeasures({exportFormat:t,maxMeasures:C,minMeasures:w,newHyperCubeDef:b,defaultMeasure:M}),k.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),k.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:c}),k.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),k.copyPropertyIfExist("qMaxStackedCells",v,b),k.copyPropertyIfExist("qNoOfLeftDims",v,b),k.copyPropertyOrSetDefault("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),k.copyPropertyOrSetDefault("qMode",v,b,"S"),k.copyPropertyOrSetDefault("qReductionMode",v,b,"N"),k.copyPropertyOrSetDefault("qSortbyYValue",v,b),k.copyPropertyOrSetDefault("qIndentMode",v,b),k.copyPropertyOrSetDefault("qShowTotalsAbove",v,b),k.importCommonProperties(g,t,n),h.qProperty=g;var A=i.getValue(u||{},"support.modifiers");return k.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:A}),p&&O(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&O(h.qProperty,"dynamicScript"),h}},M={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function A(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||!M[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],l=t.length;if(A(a,t,n,o),I(t,l))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 $(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 z(e,t){var r=T.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){$(e,"qAttributeDimensions",r),$(e,"qAttributeExpressions",r)})),t.forEach((function(e){$(e,"qAttributeDimensions",r),$(e,"qAttributeExpressions",r)}))}function q(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function F(e){var t=e.properties,r=e.isDimension,n=e.dimensions,o=e.excludedDimensions,a=e.measures,l=e.label;z(n,o);var s=n[n.length-1];if(s){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:l,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},s.qAttributeDimensions.push(f)):s.qAttributeExpressions.push(f)}}}function j(e,t,r,n){var o,i,a,l={};switch(e){case"dimension":r.qLibraryId?(l.type="dimension",l.name=r.qLibraryId,l.id=r.qLibraryId):(l.type="field",t?(l.name=r.label||r.qDef,l.id=r.qDef):(l.name=r.qDef.qFieldDefs[0],l.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))?(l.type="measure",l.name=o,l.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n))&&(l.expression=i)):(l.type="expression",t?(l.name=r.label||r.qExpression,l.id=r.qExpression):(l.name=r.qDef.qDef,l.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 l}var B={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function W(e,t,r,n){var o=r?"expression":t.type,i=e.color,a=i.mode,l=D.getItemLabel(t);switch(q(e,l||""),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||l,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&&B.useMasterNumberFormat(i.formatting)}n||(i.auto=!1,i.mode=a)}function H(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]),l=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===l}(r,e,t)?0:r.length-1],o=T.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",o);return W(e,j("dimension",!!a,a||n)),!!a}function U(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&&q(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=j("dimension",!1,r[n.activeDimensionIndex]);o.activeDimensionIndex=n.activeDimensionIndex,W(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&H(e,t))return;F({properties:e,isDimension:!0,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byDimDef.label")})}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.byMeasureDef");if(a&&q(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=j("measure",!1,r[n.activeMeasureIndex],!0);o.activeMeasureIndex=n.activeMeasureIndex,W(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,l=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return W(e,j("measure",!!l,l||n[0])),!!l}(e,t))return;F({properties:e,isDimension:!1,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byMeasureDef.label")})}var G={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"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);n?z(o,l):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})?U(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,o=e.measures,a=e.properties,l=i.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==l&&!o.length)}({auto:n,colorMode:r,dimensions:o,measures:a,properties:e})?V(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"),z(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=L.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),l=i.measures.concat(i.excludedMeasures),s=T.IDMAP,c=s.COLOR_BY_ALTERNATIVE,u=s.COLOR_BY_EXPRESSION;return T.moveByIdFromGroup(a,[],"qAttributeDimensions",c),T.moveByIdFromGroup(a,[],"qAttributeExpressions",c),T.moveByIdFromGroup(l,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,l=e.extension,s=e.supportedFilters,c=e.isHCModifierSupported,u=L.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:a,extension:l,supportedFilters:s,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=G.getCanColorBy(d,p),v=G.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?G.shouldAddColorByExpression({shouldUpdateColorBy:v,properties:d})&&G.addColorByExpression(d):G.switchToAutoColor(d),v&&G.updateColorBy(d,"qHyperCubeDef."),G.shouldSwitchToColorPersistent(d)&&G.changeProperty(d,"color.persistent",!0),G.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?O(r,"unsupportedAutoMinMax")||v()(r.measureAxis,t.measureAxis):O(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,l=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 s=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);s.length?(i&&(t=s.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=s.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&v()(l,r.properties.measureAxes[t[0].axis])):v()(l,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}),l=a.properties;return i?(h(l,"measureAxis.min","supportedAutoMinMax"),h(l,"measureAxis.max","supportedAutoMinMax")):(h(l,"measureAxis.min","unsupportedAutoMinMax"),h(l,"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,l=e.extension,s=e.supportedFilters,c=e.isHCModifierSupported,u=Y.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:i,extension:l,supportedFilters:s,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),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,l=i.getValue(o,a);if(void 0!==l){var s=i.getValue(o,"qDef.cId");s||(s=i.generateId(),i.setValue(o,"qDef.cId",s));var c=J(r,n,s);i.setValue(t,c,l),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,l=i.getValue(o,"qDef.cId");if(l){var s=J(r,n,l),c=i.getValue(t,s);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,s,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:L,colorChart:Y,axisChart:Z,quarantineProperty:h,unquarantineProperty:O,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}])}($);var z=o(N);function q(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function F(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function j(){}var B=1/.7,W="\\s*([+-]?\\d+)\\s*",H="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",U="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",V=/^#([0-9a-f]{3,8})$/,G=new RegExp("^rgb\\("+[W,W,W]+"\\)$"),Y=new RegExp("^rgb\\("+[U,U,U]+"\\)$"),X=new RegExp("^rgba\\("+[W,W,W,H]+"\\)$"),K=new RegExp("^rgba\\("+[U,U,U,H]+"\\)$"),Z=new RegExp("^hsl\\("+[H,U,U]+"\\)$"),J=new RegExp("^hsla\\("+[H,U,U,H]+"\\)$"),Q={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 ee(){return this.rgb().formatHex()}function te(){return this.rgb().formatRgb()}function re(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=V.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?ne(t):3===r?new ae(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?oe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?oe(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=G.exec(e))?new ae(t[1],t[2],t[3],1):(t=Y.exec(e))?new ae(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=X.exec(e))?oe(t[1],t[2],t[3],t[4]):(t=K.exec(e))?oe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Z.exec(e))?ue(t[1],t[2]/100,t[3]/100,1):(t=J.exec(e))?ue(t[1],t[2]/100,t[3]/100,t[4]):Q.hasOwnProperty(e)?ne(Q[e]):"transparent"===e?new ae(NaN,NaN,NaN,0):null}function ne(e){return new ae(e>>16&255,e>>8&255,255&e,1)}function oe(e,t,r,n){return n<=0&&(e=t=r=NaN),new ae(e,t,r,n)}function ie(e,t,r,n){return 1===arguments.length?function(e){return e instanceof j||(e=re(e)),e?new ae((e=e.rgb()).r,e.g,e.b,e.opacity):new ae}(e):new ae(e,t,r,null==n?1:n)}function ae(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function le(){return"#"+ce(this.r)+ce(this.g)+ce(this.b)}function se(){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 ce(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ue(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new pe(e,t,r,n)}function de(e){if(e instanceof pe)return new pe(e.h,e.s,e.l,e.opacity);if(e instanceof j||(e=re(e)),!e)return new pe;if(e instanceof pe)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(r-n)/l+6*(r<n):r===i?(n-t)/l+2:(t-r)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new pe(a,l,s,e.opacity)}function pe(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function fe(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 me(e){return function(){return e}}function he(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):me(isNaN(e)?t:e)}function ge(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ve(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function be(){}q(j,re,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ee,formatHex:ee,formatHsl:function(){return de(this).formatHsl()},formatRgb:te,toString:te}),q(ae,ie,F(j,{brighter:function(e){return e=null==e?B:Math.pow(B,e),new ae(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ae(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:le,formatHex:le,formatRgb:se,toString:se})),q(pe,(function(e,t,r,n){return 1===arguments.length?de(e):new pe(e,t,r,null==n?1:n)}),F(j,{brighter:function(e){return e=null==e?B:Math.pow(B,e),new pe(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new pe(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 ae(fe(e>=240?e-240:e+120,o,n),fe(e,o,n),fe(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)?he: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):me(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=ie(e)).r,(t=ie(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=he(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 ye=1/.7,Se="\\s*([+-]?\\d+)\\s*",xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,Ee=new RegExp(`^rgb\\(${Se},${Se},${Se}\\)$`),Re=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),ke=new RegExp(`^rgba\\(${Se},${Se},${Se},${xe}\\)$`),Oe=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${xe}\\)$`),Le=new RegExp(`^hsl\\(${xe},${Ce},${Ce}\\)$`),Me=new RegExp(`^hsla\\(${xe},${Ce},${Ce},${xe}\\)$`),Ae={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 Ie(){return this.rgb().formatHex()}function Te(){return this.rgb().formatRgb()}function De(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=we.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Pe(t):3===r?new $e(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?_e(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?_e(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=Ee.exec(e))?new $e(t[1],t[2],t[3],1):(t=Re.exec(e))?new $e(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ke.exec(e))?_e(t[1],t[2],t[3],t[4]):(t=Oe.exec(e))?_e(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Le.exec(e))?We(t[1],t[2]/100,t[3]/100,1):(t=Me.exec(e))?We(t[1],t[2]/100,t[3]/100,t[4]):Ae.hasOwnProperty(e)?Pe(Ae[e]):"transparent"===e?new $e(NaN,NaN,NaN,0):null}function Pe(e){return new $e(e>>16&255,e>>8&255,255&e,1)}function _e(e,t,r,n){return n<=0&&(e=t=r=NaN),new $e(e,t,r,n)}function Ne(e){return e instanceof be||(e=De(e)),e?new $e((e=e.rgb()).r,e.g,e.b,e.opacity):new $e}function $e(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function ze(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}`}function qe(){const e=Fe(this.opacity);return`${1===e?"rgb(":"rgba("}${je(this.r)}, ${je(this.g)}, ${je(this.b)}${1===e?")":`, ${e})`}`}function Fe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function je(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Be(e){return((e=je(e))<16?"0":"")+e.toString(16)}function We(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ue(e,t,r,n)}function He(e){if(e instanceof Ue)return new Ue(e.h,e.s,e.l,e.opacity);if(e instanceof be||(e=De(e)),!e)return new Ue;if(e instanceof Ue)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,l=i-o,s=(i+o)/2;return l?(a=t===i?(r-n)/l+6*(r<n):r===i?(n-t)/l+2:(t-r)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new Ue(a,l,s,e.opacity)}function Ue(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ve(e){return(e=(e||0)%360)<0?e+360:e}function Ge(e){return Math.max(0,Math.min(1,e||0))}function Ye(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}ge(be,De,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ie,formatHex:Ie,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return He(this).formatHsl()},formatRgb:Te,toString:Te}),ge($e,(function(e,t,r,n){return 1===arguments.length?Ne(e):new $e(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return e=null==e?ye:Math.pow(ye,e),new $e(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new $e(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $e(je(this.r),je(this.g),je(this.b),Fe(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:ze,formatHex:ze,formatHex8:function(){return`#${Be(this.r)}${Be(this.g)}${Be(this.b)}${Be(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:qe,toString:qe})),ge(Ue,(function(e,t,r,n){return 1===arguments.length?He(e):new Ue(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return e=null==e?ye:Math.pow(ye,e),new Ue(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ue(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 $e(Ye(e>=240?e-240:e+120,o,n),Ye(e,o,n),Ye(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Ue(Ve(this.h),Ge(this.s),Ge(this.l),Fe(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=Fe(this.opacity);return`${1===e?"hsl(":"hsla("}${Ve(this.h)}, ${100*Ge(this.s)}%, ${100*Ge(this.l)}%${1===e?")":`, ${e})`}`}}));const Xe=Math.PI/180,Ke=180/Math.PI,Ze=4/29,Je=6/29,Qe=3*Je*Je;function et(e){if(e instanceof tt)return new tt(e.l,e.a,e.b,e.opacity);if(e instanceof at)return lt(e);e instanceof $e||(e=Ne(e));var t,r,n=it(e.r),o=it(e.g),i=it(e.b),a=rt((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=rt((.4360747*n+.3850649*o+.1430804*i)/.96422),r=rt((.0139322*n+.0971045*o+.7141733*i)/.82521)),new tt(116*a-16,500*(t-a),200*(a-r),e.opacity)}function tt(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function rt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Qe+Ze}function nt(e){return e>Je?e*e*e:Qe*(e-Ze)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function it(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function at(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function lt(e){if(isNaN(e.h))return new tt(e.l,0,0,e.opacity);var t=e.h*Xe;return new tt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function st(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 l=n[a];void 0===i[l]&&(i[l]=Number.isNaN(+n[a+1])?{}:[]),i=i[l]}void 0!==r?i[o]=r:delete i[o]}}function ct(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 ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dt(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 pt(e,t,r){return t&&dt(e.prototype,t),r&&dt(e,r),e}function ft(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mt(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 ht(e,t){var r,n,o,i,a,l=new yt(e),s=+e.value&&(l.value=e.value),c=[l];for(null==t&&(t=gt);r=c.pop();)if(s&&(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 yt(o[i])),n.parent=r,n.depth=r.depth+1;return l.eachBefore(bt)}function gt(e){return e.children}function vt(e){e.data=e.data.data}function bt(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function yt(e){this.data=e,this.depth=this.height=0,this.parent=null}ge(tt,(function(e,t,r,n){return 1===arguments.length?et(e):new tt(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return new tt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new tt(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 $e(ot(3.1338561*(t=.96422*nt(t))-1.6168667*(e=1*nt(e))-.4906146*(r=.82521*nt(r))),ot(-.9787684*t+1.9161415*e+.033454*r),ot(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),ge(at,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof at)return new at(e.h,e.c,e.l,e.opacity);if(e instanceof tt||(e=et(e)),0===e.a&&0===e.b)return new at(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ke;return new at(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new at(e,t,r,null==n?1:n)}),ve(be,{brighter(e){return new at(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new at(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return lt(this).rgb()}})),yt.prototype=ht.prototype={constructor:yt,count:function(){return this.eachAfter(mt)},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 ht(this).eachBefore(vt)}};var St,xt,Ct=(St=function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
9
  e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,l,s,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),S=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))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=l)&&(t=(+t).toFixed(l+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],s=u[1]&&u[u.length-1].length){for(h="",v=(d=t[0]).length%s,p=d.length,y=0;y<p;y++)h+=d.charAt(y),!((y-v+1)%s)&&y<p-s&&(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+S}},St(xt={exports:{}}),xt.exports);function wt(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var Et={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"},Rt=/%$/,kt=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Ot=/^\(oct\)/i,Lt=/^\(dec\)/i,Mt=/^\(hex\)/i,At=/^\(bin\)/i,It=/^\(rom\)/i,Tt=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Dt=/#|0/g;function Pt(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 _t(e,t,r){var n=wt(e);return r?n:new RegExp(n||"",t)}function Nt(e,t,r){var n,o,i,a,l,s,c,u,d,p,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),p=t,(f=r)&&(f=wt(f)),p&&(p=wt(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,l=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=""),s=t,t=/,/.test(r)?"¤":",",s&&(i=i.replace(_t(s,"g"),t)),c=r,r=".",c&&(i=i.replace(_t(c,"g"),r)),u=(u=i.match(/#/g))?u.length:0;var h,g=m.split(c);g[1]&&(h=g[1].match(Dt)),e.prefix=a||"",e.postfix=l||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=Rt.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(_t(t,null,!0),"|").concat(_t(r,null,!0)),"g"),e.groupTemp=s,e.decTemp=c,e.t=t,e.d=r,e.temp=u}!function(){function e(t,r,n,o,i){ut(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 Et;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()}pt(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],Tt.test(e[0])&&(n.positive.isFunctional=!0),e[1]?Tt.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?Tt.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Nt(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Nt(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Nt(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,o,i,a,l,s,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 kt.test(t)?e=Pt(e,Number(/\d{2}/.exec(t)[0]),t,r):Ot.test(t)?e=Pt(e,8,t,r):Lt.test(t)?e=Pt(e,10,t,r):Mt.test(t)?e=Pt(e,16,t,r):At.test(t)?e=Pt(e,2,t,r):It.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(),l=["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+=l[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(l=0,r=Number(Number(e).toExponential().split("e")[1]);v<=r&&l<g.length;)v=g[++l];l>0&&(m=g[l-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=(s=u.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,c||"#"!==s.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=s.split(i)[0];if(e=Ct(y+=i,b)||"0",c){var S=Math.max(0,Math.min(14,c.length)),x=c.replace(/#+$/,"").length,C=("I"===this.type?0:n%1).toFixed(S).slice(2).replace(/0+$/,"");for(l=C.length;l<x;l++)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(s+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),l=0;l<t;l++)s+="#";e=Ct(s,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 $t="D",zt="T",qt="TS",Ft=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],jt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Bt=["January","February","March","April","May","June","July","August","September","October","November","December"],Wt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ht(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Ut(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){ut(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Ft,qDayNames:jt,qLongMonthNames:Bt,qMonthNames:Wt}),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=(ft(o={},zt,i.qTimeFmt||"hh:mm:ss"),ft(o,$t,i.qDateFmt||"YYYY-MM-DD"),ft(o,qt,i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[n]),this.pattern=r}pt(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,l=/t+/gi.test(t);e instanceof Date?(o=l,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*Ut(t),n=60*Ut(r),o=60*Ut(n),i=1e3*Ut(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,l=n.s,s=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)||(l+=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:l,f:s,t:u}}(e,t));var s=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Ht("".concat(t.year).slice(-2),2),YYY:Ht("".concat(t.year).slice(-3),3),def:function(e){return Ht("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Ht("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ht("".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 Ht("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Ht("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Ht("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Ht("".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 s)Object.prototype.hasOwnProperty.call(s,u)&&c.push(u);var d=new RegExp(c.join("|"),"g"),p=t.replace(d,(function(e){var t,r,n;for(r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var o in s[r])if(o===e||o.toLowerCase()===e){void 0===(n=s[r][o])&&(n=s[r][o.toLowerCase()]);break}return void 0===n&&(n=s[r].def),"function"==typeof n&&(n=n(e)),n}));return p}}])}();const Vt=(e,t,r,n)=>{let o=t;n&&(o=t-n);const i=JSON.parse(JSON.stringify(e[o]));if(Array.isArray(r)&&r.length>0){const e=r[t];i.qDef.columnWidth=-1===e?{type:f.FIT_TO_CONTENT}:{type:f.PIXELS,pixels:e}}return i},Gt=(e,t,r,o)=>{const i=z.hypercube.importProperties({exportFormat:e,initialProperties:t,dataDefinition:n().targets[0],defaultPropertyValues:{defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},hypercubePath:o,extension:r}),{qHyperCubeDef:{qDimensions:a,qMeasures:l,qColumnOrder:s,columnWidths:c}}=i.qProperty,{dimensions:u,measures:d}=((e,t,r,n)=>{const 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((e=>e<o)).map((t=>Vt(e,t,n))),measures:a.filter((e=>e>=o)).map((e=>Vt(t,e,n,o)))}})(a,l,s,c);return Array.isArray(c)&&c.length>0&&(st(i,"qProperty.qHyperCubeDef.qDimensions",u),st(i,"qProperty.qHyperCubeDef.qMeasures",d)),z.conditionalShow.unquarantine(i.qProperty),i},Yt=(e,t)=>{const r=z.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),{qHyperCubeDef:{qColumnOrder:n,qDimensions:o,qMeasures:i}}=r.properties,a=((e,t,r)=>{const n=e.length+t.length,o=((null==r?void 0:r.length)===n?r:Array.from(Array(n).keys())).map((r=>((e,t,r)=>{const n=t.length,o=e<n?t[e]:r[e-n],{columnWidth:i}=o.qDef;return"pixels"===(null==i?void 0:i.type)?i.pixels:-1})(r,e,t)));return o})(o,i,n);return st(r,"properties.qHyperCubeDef",{...r.properties.qHyperCubeDef,columnWidths:a}),z.quarantineProperty(r.properties,"qHyperCubeDef.columnWidths","straightTableColumnWidths"),r},Xt=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 Kt(e){return{definition:A(e),...Xt(e),data:_(e),support:{export:!1,exportData:!0,snapshot:!0,viewData:!1,exploration:!0},importProperties:Gt,exportProperties:Yt}}var Zt={},Jt={get exports(){return Zt},set exports(e){Zt=e}},Qt={},er={},tr={get exports(){return er},set exports(e){er=e}},rr={},nr=Symbol.for("react.element"),or=Symbol.for("react.portal"),ir=Symbol.for("react.fragment"),ar=Symbol.for("react.strict_mode"),lr=Symbol.for("react.profiler"),sr=Symbol.for("react.provider"),cr=Symbol.for("react.context"),ur=Symbol.for("react.forward_ref"),dr=Symbol.for("react.suspense"),pr=Symbol.for("react.memo"),fr=Symbol.for("react.lazy"),mr=Symbol.iterator;var hr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gr=Object.assign,vr={};function br(e,t,r){this.props=e,this.context=t,this.refs=vr,this.updater=r||hr}function yr(){}function Sr(e,t,r){this.props=e,this.context=t,this.refs=vr,this.updater=r||hr}br.prototype.isReactComponent={},br.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},yr.prototype=br.prototype;var xr=Sr.prototype=new yr;xr.constructor=Sr,gr(xr,br.prototype),xr.isPureReactComponent=!0;var Cr=Array.isArray,wr=Object.prototype.hasOwnProperty,Er={current:null},Rr={key:!0,ref:!0,__self:!0,__source:!0};function kr(e,t,r){var n,o={},i=null,a=null;if(null!=t)for(n in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)wr.call(t,n)&&!Rr.hasOwnProperty(n)&&(o[n]=t[n]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var s=Array(l),c=0;c<l;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===o[n]&&(o[n]=l[n]);return{$$typeof:nr,type:e,key:i,ref:a,props:o,_owner:Er.current}}function Or(e){return"object"==typeof e&&null!==e&&e.$$typeof===nr}var Lr=/\/+/g;function Mr(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function Ar(e,t,r,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case nr:case or:a=!0}}if(a)return o=o(a=e),e=""===n?"."+Mr(a,0):n,Cr(o)?(r="",null!=e&&(r=e.replace(Lr,"$&/")+"/"),Ar(o,t,r,"",(function(e){return e}))):null!=o&&(Or(o)&&(o=function(e,t){return{$$typeof:nr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Lr,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=""===n?".":n+":",Cr(e))for(var l=0;l<e.length;l++){var s=n+Mr(i=e[l],l);a+=Ar(i,t,r,s,o)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=mr&&e[mr]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),l=0;!(i=e.next()).done;)a+=Ar(i=i.value,t,r,s=n+Mr(i,l++),o);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Ir(e,t,r){if(null==e)return e;var n=[],o=0;return Ar(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function Tr(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var Dr={current:null},Pr={transition:null},_r={ReactCurrentDispatcher:Dr,ReactCurrentBatchConfig:Pr,ReactCurrentOwner:Er};rr.Children={map:Ir,forEach:function(e,t,r){Ir(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return Ir(e,(function(){t++})),t},toArray:function(e){return Ir(e,(function(e){return e}))||[]},only:function(e){if(!Or(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},rr.Component=br,rr.Fragment=ir,rr.Profiler=lr,rr.PureComponent=Sr,rr.StrictMode=ar,rr.Suspense=dr,rr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_r,rr.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=gr({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=Er.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)wr.call(t,s)&&!Rr.hasOwnProperty(s)&&(n[s]=void 0===t[s]&&void 0!==l?l[s]:t[s])}var s=arguments.length-2;if(1===s)n.children=r;else if(1<s){l=Array(s);for(var c=0;c<s;c++)l[c]=arguments[c+2];n.children=l}return{$$typeof:nr,type:e.type,key:o,ref:i,props:n,_owner:a}},rr.createContext=function(e){return(e={$$typeof:cr,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:sr,_context:e},e.Consumer=e},rr.createElement=kr,rr.createFactory=function(e){var t=kr.bind(null,e);return t.type=e,t},rr.createRef=function(){return{current:null}},rr.forwardRef=function(e){return{$$typeof:ur,render:e}},rr.isValidElement=Or,rr.lazy=function(e){return{$$typeof:fr,_payload:{_status:-1,_result:e},_init:Tr}},rr.memo=function(e,t){return{$$typeof:pr,type:e,compare:void 0===t?null:t}},rr.startTransition=function(e){var t=Pr.transition;Pr.transition={};try{e()}finally{Pr.transition=t}},rr.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},rr.useCallback=function(e,t){return Dr.current.useCallback(e,t)},rr.useContext=function(e){return Dr.current.useContext(e)},rr.useDebugValue=function(){},rr.useDeferredValue=function(e){return Dr.current.useDeferredValue(e)},rr.useEffect=function(e,t){return Dr.current.useEffect(e,t)},rr.useId=function(){return Dr.current.useId()},rr.useImperativeHandle=function(e,t,r){return Dr.current.useImperativeHandle(e,t,r)},rr.useInsertionEffect=function(e,t){return Dr.current.useInsertionEffect(e,t)},rr.useLayoutEffect=function(e,t){return Dr.current.useLayoutEffect(e,t)},rr.useMemo=function(e,t){return Dr.current.useMemo(e,t)},rr.useReducer=function(e,t,r){return Dr.current.useReducer(e,t,r)},rr.useRef=function(e){return Dr.current.useRef(e)},rr.useState=function(e){return Dr.current.useState(e)},rr.useSyncExternalStore=function(e,t,r){return Dr.current.useSyncExternalStore(e,t,r)},rr.useTransition=function(){return Dr.current.useTransition()},rr.version="18.2.0",function(e){e.exports=rr}(tr);var Nr=o(er),$r=t({__proto__:null,default:Nr},[er]),zr={},qr={get exports(){return zr},set exports(e){zr=e}},Fr={};
10
10
  /**
@@ -258,4 +258,4 @@ function Sv(e,t){let r;return r=t?Cg(e).withConfig({displayName:t.label,shouldFo
258
258
  * This source code is licensed under the MIT license found in the
259
259
  * LICENSE file in the root directory of this source tree.
260
260
  */
261
- var $0=Object.freeze({__proto__:null,Accordion:q_,AccordionActions:U_,AccordionDetails:Z_,AccordionSummary:RN,Alert:VN,AlertTitle:a$,AppBar:f$,Autocomplete:yz,Avatar:Lz,AvatarGroup:Nz,Backdrop:Vz,Badge:Qz,BottomNavigation:iq,BottomNavigationAction:pq,Box:mq,Breadcrumbs:Lq,Button:zq,ButtonBase:vN,ButtonGroup:Hq,Card:Kq,CardActionArea:nF,CardActions:cF,CardContent:hF,CardHeader:EF,CardMedia:TF,Checkbox:KF,Chip:T$,CircularProgress:pj,ClickAwayListener:cC,Collapse:k_,Container:mj,CssBaseline:function(e){const t=vx({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:n=!1}=t;return Nb.jsxs(er.Fragment,{children:[Nb.jsx(N$,{styles:e=>bj(e,n)}),r]})},Dialog:_j,DialogActions:jj,DialogContent:Xj,DialogContentText:tB,DialogTitle:iB,Divider:pB,Drawer:MB,Experimental_CssVarsProvider:Nx,Fab:_B,Fade:Fz,FilledInput:FB,FormControl:VB,FormControlLabel:JB,FormGroup:oW,FormHelperText:dW,FormLabel:bW,FormLabelRoot:hW,GlobalStyles:N$,Grid:AW,Grow:jW,Hidden:function(e){const{implementation:t="js",lgDown:r=!1,lgUp:n=!1,mdDown:o=!1,mdUp:i=!1,smDown:a=!1,smUp:l=!1,xlDown:s=!1,xlUp:c=!1,xsDown:u=!1,xsUp:d=!1}=e,p=gv(e,nH);return"js"===t?Nb.jsx(ZW,hv({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:l,xlDown:s,xlUp:c,xsDown:u,xsUp:d},p)):Nb.jsx(rH,hv({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:l,xlDown:s,xlUp:c,xsDown:u,xsUp:d},p))},Icon:cH,IconButton:DN,ImageList:gH,ImageListItem:CH,ImageListItemBar:TH,Input:$H,InputAdornment:HH,InputBase:Y$,InputLabel:KH,LinearProgress:gU,Link:EU,List:IU,ListItem:ZU,ListItemAvatar:nV,ListItemButton:qU,ListItemIcon:cV,ListItemSecondaryAction:UU,ListItemText:hV,ListSubheader:w$,Menu:UV,MenuItem:ZV,MenuList:CV,MobileStepper:aG,Modal:Rj,ModalManager:Yw,NativeSelect:xG,NoSsr:tE,OutlinedInput:AG,Pagination:QG,PaginationItem:GG,Paper:T_,Popover:PV,Popper:v$,Portal:Pw,Radio:hY,RadioGroup:bY,Rating:NY,ScopedCssBaseline:BY,Select:aX,Skeleton:yX,Slide:gB,Slider:_X,SliderMark:IX,SliderMarkLabel:TX,SliderRail:OX,SliderRoot:kX,SliderThumb:MX,SliderTrack:LX,SliderValueLabel:AX,Snackbar:KX,SnackbarContent:WX,SpeedDial:dK,SpeedDialAction:IK,SpeedDialIcon:zK,Stack:FK,Step:ZK,StepButton:CZ,StepConnector:MZ,StepContent:NZ,StepContext:UK,StepIcon:lZ,StepLabel:gZ,Stepper:WZ,StepperContext:WK,StyledEngineProvider:vv,SvgIcon:ZP,SwipeableDrawer:nJ,Switch:pJ,Tab:bJ,TabScrollButton:QQ,Table:BE,TableBody:OJ,TableCell:DJ,TableContainer:PE,TableFooter:jJ,TableHead:XJ,TablePagination:MQ,TableRow:NQ,TableSortLabel:HQ,Tabs:f0,TextField:S0,TextareaAutosize:xE,ThemeProvider:Ty,ToggleButton:k0,ToggleButtonGroup:D0,Toolbar:cQ,Tooltip:wK,Typography:e$,Unstable_Grid2:TW,Unstable_TrapFocus:fC,Zoom:eK,accordionActionsClasses:j_,accordionClasses:__,accordionDetailsClasses:G_,accordionSummaryClasses:yN,adaptV4Theme:LS,alertClasses:ON,alertTitleClasses:r$,alpha:Cy,appBarClasses:s$,ariaHidden:Ww,autocompleteClasses:iz,avatarClasses:Cz,avatarGroupClasses:Az,backdropClasses:Bz,badgeClasses:Yz,bottomNavigationActionClasses:lq,bottomNavigationClasses:tq,breadcrumbsClasses:xq,buttonBaseClasses:fN,buttonClasses:Aq,buttonGroupClasses:Fq,capitalize:Dg,cardActionAreaClasses:Jq,cardActionsClasses:iF,cardClasses:Vq,cardContentClasses:dF,cardHeaderClasses:vF,cardMediaClasses:kF,checkboxClasses:WF,chipClasses:k$,circularProgressClasses:JF,collapseClasses:S_,colors:UP,containerClasses:hj,createChainedFunction:Pg,createFilterOptions:wE,createMuiTheme:ax,createStyles:cx,createSvgIcon:JP,createTheme:ix,css:ig,darkScrollbar:function(e=yj){return{scrollbarColor:`${e.thumb} ${e.track}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:e.track},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:e.thumb,minHeight:24,border:`3px solid ${e.track}`},"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:e.active},"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner":{backgroundColor:e.track}}},darken:Ey,debounce:_g,decomposeColor:hy,deprecatedPropType:function(e,t){return()=>null},dialogActionsClasses:$j,dialogClasses:Oj,dialogContentClasses:Wj,dialogContentTextClasses:Zj,dialogTitleClasses:Uj,dividerClasses:lB,drawerClasses:bB,duration:QS,easing:JS,emphasize:Ly,experimentalStyled:Sx,experimental_extendTheme:Dx,experimental_sx:qx,fabClasses:IB,filledInputClasses:ez,formControlClasses:BB,formControlLabelClasses:YB,formGroupClasses:eW,formHelperTextClasses:lW,formLabelClasses:fW,generateUtilityClass:fv,generateUtilityClasses:mv,getAccordionActionsUtilityClass:F_,getAccordionDetailsUtilityClass:V_,getAccordionSummaryUtilityClass:bN,getAccordionUtilityClass:P_,getAlertTitleUtilityClass:t$,getAlertUtilityClass:kN,getAppBarUtilityClass:l$,getAutocompleteUtilityClass:rz,getAvatarGroupUtilityClass:Mz,getAvatarUtilityClass:xz,getBackdropUtilityClass:jz,getBadgeUtilityClass:Gz,getBottomNavigationActionUtilityClass:aq,getBottomNavigationUtilityClass:eq,getBreadcrumbsUtilityClass:Sq,getButtonBaseUtilityClass:pN,getButtonGroupUtilityClass:qq,getButtonUtilityClass:Mq,getCardActionAreaUtilityClass:Zq,getCardActionsUtilityClass:oF,getCardContentUtilityClass:uF,getCardHeaderUtilityClass:gF,getCardMediaUtilityClass:RF,getCardUtilityClass:Uq,getCheckboxUtilityClass:BF,getChipUtilityClass:R$,getCircularProgressUtilityClass:ZF,getCollapseUtilityClass:y_,getContainerUtilityClass:function(e){return fv("MuiContainer",e)},getContrastRatio:xy,getDialogActionsUtilityClass:Nj,getDialogContentTextUtilityClass:Kj,getDialogContentUtilityClass:Bj,getDialogTitleUtilityClass:Hj,getDialogUtilityClass:kj,getDividerUtilityClass:aB,getDrawerUtilityClass:vB,getFabUtilityClass:AB,getFilledInputUtilityClass:Q$,getFormControlLabelUtilityClasses:GB,getFormControlUtilityClasses:jB,getFormGroupUtilityClass:QB,getFormHelperTextUtilityClasses:iW,getFormLabelUtilityClasses:pW,getGrid2UtilityClass:function(e){return fv("MuiGrid2",e)},getGridUtilityClass:SW,getIconButtonUtilityClass:LN,getIconUtilityClass:oH,getImageListItemBarUtilityClass:wH,getImageListItemUtilityClass:vH,getImageListUtilityClass:uH,getInitColorSchemeScript:zx,getInputAdornmentUtilityClass:zH,getInputBaseUtilityClass:q$,getInputLabelUtilityClasses:UH,getInputUtilityClass:X$,getLinearProgressUtilityClass:ZH,getLinkUtilityClass:vU,getListItemAvatarUtilityClass:JU,getListItemButtonUtilityClass:PU,getListItemIconUtilityClass:oV,getListItemSecondaryActionClassesUtilityClass:FU,getListItemTextUtilityClass:uV,getListItemUtilityClass:TU,getListSubheaderUtilityClass:b$,getListUtilityClass:kU,getLuminance:Sy,getMenuItemUtilityClass:VV,getMenuUtilityClass:_V,getMobileStepperUtilityClass:JV,getModalUtilityClass:Xw,getNativeSelectUtilityClasses:lG,getOffsetLeft:LV,getOffsetTop:OV,getOutlinedInputUtilityClass:Z$,getOverlayAlpha:Rx,getPaginationItemUtilityClass:_G,getPaginationUtilityClass:IG,getPaperUtilityClass:O_,getPopoverUtilityClass:wV,getRadioUtilityClass:sY,getRatingUtilityClass:xY,getScopedCssBaselineUtilityClass:$Y,getSelectUtilityClasses:WY,getSkeletonUtilityClass:lX,getSliderUtilityClass:xX,getSnackbarContentUtilityClass:NX,getSnackbarUtilityClass:HX,getSpeedDialActionUtilityClass:EK,getSpeedDialIconUtilityClass:DK,getSpeedDialUtilityClass:tK,getStepButtonUtilityClass:vZ,getStepConnectorUtilityClass:wZ,getStepContentUtilityClass:AZ,getStepIconUtilityClass:eZ,getStepLabelUtilityClass:sZ,getStepUtilityClass:VK,getStepperUtilityClass:$Z,getSvgIconUtilityClass:VP,getSwitchUtilityClass:oJ,getTabScrollButtonUtilityClass:YQ,getTabUtilityClass:fJ,getTableBodyUtilityClass:SJ,getTableCellUtilityClass:LJ,getTableContainerUtilityClass:ME,getTableFooterUtilityClass:PJ,getTableHeadUtilityClass:BJ,getTablePaginationUtilityClass:hQ,getTableRowUtilityClass:AQ,getTableSortLabelUtilityClass:zQ,getTableUtilityClass:NE,getTabsUtilityClass:e0,getTextFieldUtilityClass:m0,getToggleButtonGroupUtilityClass:L0,getToggleButtonUtilityClass:x0,getToolbarUtilityClass:KJ,getTooltipUtilityClass:pK,getTouchRippleUtilityClass:function(e){return fv("MuiTouchRipple",e)},getTypographyUtilityClass:GN,grid2Classes:_W,gridClasses:wW,hexToRgb:my,hslToRgb:yy,iconButtonClasses:MN,iconClasses:iH,imageListClasses:dH,imageListItemBarClasses:EH,imageListItemClasses:bH,inputAdornmentClasses:FH,inputBaseClasses:F$,inputClasses:K$,inputLabelClasses:VH,isMuiElement:Ng,keyframes:xg,lighten:ky,linearProgressClasses:JH,linkClasses:bU,listClasses:OU,listItemAvatarClasses:QU,listItemButtonClasses:_U,listItemClasses:DU,listItemIconClasses:iV,listItemSecondaryActionClasses:jU,listItemTextClasses:dV,listSubheaderClasses:y$,makeStyles:xx,menuClasses:NV,menuItemClasses:GV,mobileStepperClasses:QV,modalClasses:xj,modalUnstyledClasses:Kw,nativeSelectClasses:sG,outlinedInputClasses:J$,ownerDocument:$g,ownerWindow:zg,paginationClasses:TG,paginationItemClasses:NG,paperClasses:L_,popoverClasses:EV,private_createTypography:US,private_excludeVariablesFromRoot:Px,radioClasses:cY,ratingClasses:CY,recomposeColor:vy,requirePropFactory:function(e,t){return()=>null},responsiveFontSizes:mx,rgbToHex:by,scopedCssBaselineClasses:zY,selectClasses:UY,setRef:qg,shouldSkipGeneratingVar:Ex,skeletonClasses:sX,sliderClasses:CX,snackbarClasses:UX,snackbarContentClasses:$X,speedDialActionClasses:RK,speedDialClasses:rK,speedDialIconClasses:PK,stackClasses:jK,stepButtonClasses:bZ,stepClasses:GK,stepConnectorClasses:EZ,stepContentClasses:IZ,stepIconClasses:rZ,stepLabelClasses:cZ,stepperClasses:zZ,styled:Sx,svgIconClasses:GP,switchClasses:iJ,tabClasses:mJ,tabScrollButtonClasses:XQ,tableBodyClasses:xJ,tableCellClasses:MJ,tableClasses:$E,tableContainerClasses:AE,tableFooterClasses:_J,tableHeadClasses:WJ,tablePaginationClasses:vQ,tableRowClasses:IQ,tableSortLabelClasses:qQ,tabsClasses:t0,textFieldClasses:h0,toggleButtonClasses:C0,toggleButtonGroupClasses:M0,toolbarClasses:ZJ,tooltipClasses:fK,touchRippleClasses:J_,typographyClasses:YN,unstable_ClassNameGenerator:QP,unstable_composeClasses:cv,unstable_createMuiStrictModeTheme:lx,unstable_getUnit:dx,unstable_toUnitless:px,unstable_useEnhancedEffect:Fg,unstable_useId:Wg,unsupportedProp:function(e,t,r,n,o){return null},useAutocomplete:LE,useColorScheme:$x,useControlled:Hg,useEventCallback:Ug,useForkRef:Vg,useFormControl:_$,useIsFocusVisible:tv,useMediaQuery:UW,usePagination:PG,useRadioGroup:lY,useScrollTrigger:function(e={}){const{getTrigger:t=_0,target:r=N0}=e,n=gv(e,P0),o=er.useRef(),[i,a]=er.useState((()=>t(o,n)));return er.useEffect((()=>{const e=()=>{a(t(o,hv({target:r},n)))};return e(),r.addEventListener("scroll",e,{passive:!0}),()=>{r.removeEventListener("scroll",e,{passive:!0})}}),[r,t,JSON.stringify(n)]),i},useStepContext:function(){return er.useContext(HK)},useStepperContext:function(){return er.useContext(BK)},useTheme:gx,useThemeProps:vx,withStyles:Cx,withTheme:wx}),z0=er,q0=i($0),F0=WD,j0=rP,B0=iP,W0=sP,H0=dP,U0=mP,V0=vP,G0=sM,Y0=tI;const X0={MuiAccordion:{styleOverrides:{root:{backgroundColor:G0.COLORS.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:G0.COLORS.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:z0.createElement(F0.SvgArrowDown,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${G0.COLORS.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`,borderRadius:G0.SIZES.BORDER_RADIUS,backgroundColor:G0.COLORS.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${G0.COLORS.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:G0.COLORS.WHITE,color:G0.COLORS.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:G0.SIZES.BORDER_RADIUS},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:G0.COLORS.GREYSCALE_0_15,backgroundColor:G0.COLORS.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${G0.COLORS.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:G0.COLORS.GREEN_PALE},"&:active":{backgroundColor:G0.COLORS.GREEN_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:G0.COLORS.BLUE_PALE},"&:active":{backgroundColor:G0.COLORS.BLUE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:G0.SIZES.BORDER_RADIUS,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:G0.COLORS.GREYSCALE_0_15,backgroundColor:G0.COLORS.GREYSCALE_100_60,"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${G0.COLORS.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:G0.COLORS.PURPLE,"&.Mui-focusVisible":{borderColor:G0.COLORS.PURPLE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:G0.COLORS.GREEN,"&.Mui-focusVisible":{borderColor:G0.COLORS.GREEN,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:G0.COLORS.BLUE,"&.Mui-focusVisible":{borderColor:G0.COLORS.BLUE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:G0.COLORS.ORANGE,"&.Mui-focusVisible":{borderColor:G0.COLORS.ORANGE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:G0.COLORS.RED,"&.Mui-focusVisible":{borderColor:G0.COLORS.RED,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:G0.COLORS.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:G0.COLORS.PURPLE_PALE},"&:active":{backgroundColor:G0.COLORS.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.PURPLE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:G0.COLORS.GREEN_PALE},"&:active":{backgroundColor:G0.COLORS.GREEN_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:G0.COLORS.BLUE_PALE},"&:active":{backgroundColor:G0.COLORS.BLUE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:G0.COLORS.ORANGE_PALE},"&:active":{backgroundColor:G0.COLORS.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.ORANGE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:G0.COLORS.RED_PALE},"&:active":{backgroundColor:G0.COLORS.RED_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.RED_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:G0.COLORS.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:G0.COLORS.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`inset 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:z0.createElement(F0.SvgClose,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:G0.SIZES.TEXT_SMALL,borderRadius:G0.SIZES.BORDER_RADIUS,color:G0.COLORS.TEXT_PRIMARY,backgroundColor:G0.COLORS.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{backgroundColor:G0.COLORS.GREYSCALE_0_05,color:G0.COLORS.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:G0.COLORS.GREEN,borderColor:G0.COLORS.GREEN},"&.MuiChip-outlinedInfo":{color:G0.COLORS.BLUE,borderColor:G0.COLORS.BLUE},"&.MuiChip-outlinedWarning":{color:G0.COLORS.ORANGE,borderColor:G0.COLORS.ORANGE},"&.MuiChip-outlinedError":{color:G0.COLORS.RED,borderColor:G0.COLORS.RED}},outlined:{border:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`,backgroundColor:G0.COLORS.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:"none",backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:G0.COLORS.GREEN,borderColor:G0.COLORS.GREEN},outlinedSecondary:{color:G0.COLORS.BLUE,borderColor:G0.COLORS.BLUE},label:{fontFamily:G0.VARIOUS.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:z0.createElement(F0.SvgClose,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:z0.createElement(F0.SvgArrowDown,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:G0.SIZES.BORDER_RADIUS},listbox:{paddingTop:0,paddingBottom:0},option:{height:"48px",'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:G0.COLORS.GREYSCALE_95,"&.Mui-focused":{backgroundColor:G0.COLORS.GREYSCALE_0_10}}},endAdornment:{top:"auto",bottom:"4px",right:"4px !important",position:"absolute"},popupIndicator:{borderRadius:G0.SIZES.BORDER_RADIUS,border:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`,color:G0.COLORS.GREYSCALE_0_60,marginRight:0,width:G0.SIZES.TEXT_EXTRA_LARGE,height:G0.SIZES.TEXT_EXTRA_LARGE},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${G0.COLORS.GREYSCALE_0_15}`},clearIndicator:{borderRadius:G0.SIZES.BORDER_RADIUS,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:G0.COLORS.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:G0.SIZES.TEXT_MEDIUM}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:G0.SIZES.TEXT_SMALL,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:G0.COLORS.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:G0.COLORS.GREYSCALE_25,fontSize:G0.SIZES.TEXT_SMALL,fontFamily:G0.VARIOUS.FONT_FAMILY,fontWeight:G0.WEIGHTS.MEDIUM,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:G0.COLORS.TEXT_PRIMARY},"&.Mui-error":{color:G0.COLORS.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:G0.COLORS.TEXT_SECONDARY,content:"'(optional)'",fontWeight:G0.WEIGHTS.REGULAR,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:G0.COLORS.TEXT_SECONDARY,content:"'(required)'",fontWeight:G0.WEIGHTS.REGULAR,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:"14px",lineHeight:"16px",backgroundColor:G0.COLORS.WHITE,borderRadius:G0.SIZES.BORDER_RADIUS,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.GREYSCALE_0_05}`,borderColor:G0.COLORS.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${G0.COLORS.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${G0.COLORS.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.RED}`,boxShadow:`0px 0px 0px 1px ${G0.COLORS.RED}, inset 0 2px 0 0 ${G0.COLORS.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.GREYSCALE_0_10}`,borderColor:G0.COLORS.GREYSCALE_0_10,backgroundColor:G0.COLORS.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:G0.COLORS.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:G0.COLORS.GREYSCALE_0_15,borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`inset 0 2px 0 0 ${G0.COLORS.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>z0.createElement(F0.SvgArrowDown,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{borderRadius:"3px !important",minHeight:"1em","& em":{color:G0.COLORS.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:G0.COLORS.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03},"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&:focus":{backgroundColor:G0.COLORS.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${G0.COLORS.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:G0.COLORS.GREYSCALE_0_30,"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_0,borderColor:G0.COLORS.GREYSCALE_0_15},"& ~svg":{color:G0.COLORS.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:G0.COLORS.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{input:{fontSize:G0.SIZES.TEXT_MEDIUM,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:G0.SIZES.TEXT_SMALL,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:G0.SIZES.TEXT_SMALL,fontWeight:G0.WEIGHTS.MEDIUM,color:G0.COLORS.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:G0.WEIGHTS.MEDIUM}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"}}}},MuiRadio:{defaultProps:{size:"small",icon:z0.createElement(H0,null),checkedIcon:z0.createElement(U0,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:G0.COLORS.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:G0.COLORS.GREYSCALE_0_20}},"&.Mui-disabled":{fill:G0.COLORS.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:z0.createElement(j0,null),checkedIcon:z0.createElement(B0,null),indeterminateIcon:z0.createElement(W0,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:G0.SIZES.BORDER_RADIUS},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:G0.COLORS.WHITE}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:G0.COLORS.GREYSCALE_0_25}},"&.MuiCheckbox-indeterminate":{color:G0.COLORS.GREYSCALE_55}},colorPrimary:{"&.sprout-focus-visible i":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible i":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"8px",backgroundColor:G0.COLORS.GREYSCALE_98,borderTop:`1px ${G0.COLORS.GREYSCALE_0_15} solid`}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",height:"24px",padding:"12px 8px 12px 24px",fontSize:"16px",lineHeight:"24px",backgroundColor:G0.COLORS.GREYSCALE_98,borderBottom:`1px ${G0.COLORS.GREYSCALE_0_15} solid`}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:G0.COLORS.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:G0.COLORS.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:G0.SIZES.TEXT_MEDIUM,color:G0.COLORS.TEXT_PRIMARY,lineHeight:"16px",fontWeight:G0.WEIGHTS.MEDIUM},secondary:{fontSize:G0.SIZES.TEXT_SMALL,color:G0.COLORS.GREYSCALE_45,fontWeight:G0.WEIGHTS.REGULAR,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{height:"48px"},gutters:{paddingLeft:"12px",paddingRight:"12px"},button:{"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03},"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_05}}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:G0.COLORS.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:G0.SIZES.TEXT_SMALL,borderBottom:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:G0.SIZES.TEXT_MEDIUM,color:G0.COLORS.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:`url('${Y0.tickUrl}')`,fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:G0.COLORS.RED}}},"&.Mui-focusVisible":{backgroundColor:G0.COLORS.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:G0.COLORS.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:G0.COLORS.GREEN,height:"24px","&.Mui-disabled":{color:G0.COLORS.GREYSCALE_0_15}},rail:{backgroundColor:G0.COLORS.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${G0.COLORS.GREYSCALE_0_05}`,borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`inset 0px 0px 0px 1px ${G0.COLORS.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${G0.COLORS.GREYSCALE_0_05}`,borderRadius:G0.SIZES.BORDER_RADIUS},thumb:{height:"16px",width:"16px",borderRadius:G0.SIZES.BORDER_RADIUS,backgroundColor:G0.COLORS.WHITE,boxShadow:`0px 1px 2px 0px ${G0.COLORS.GREYSCALE_0_15}, 0px 0px 0px 1px ${G0.COLORS.GREYSCALE_0_05}`,"&:hover":{borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`0 2px 4px 0 ${G0.COLORS.GREYSCALE_0_30}, 0 0 0 1px ${G0.COLORS.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${G0.COLORS.GREYSCALE_0_15}, 0 0 0 1px ${G0.COLORS.GREYSCALE_0_06}, 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${G0.COLORS.GREYSCALE_0_15}, 0 0 0 1px ${G0.COLORS.GREYSCALE_0_06}, 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:G0.COLORS.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:G0.COLORS.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:G0.COLORS.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:G0.COLORS.GREYSCALE_0_15},markLabel:{color:G0.COLORS.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:G0.COLORS.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:G0.COLORS.WHITE,color:G0.COLORS.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:G0.COLORS.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:G0.COLORS.GREYSCALE_0_15,borderRadius:G0.SIZES.BORDER_RADIUS},thumb:{height:"16px",width:"16px",borderRadius:G0.SIZES.BORDER_RADIUS,backgroundColor:G0.COLORS.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:G0.SIZES.TEXT_MEDIUM,fontWeight:G0.WEIGHTS.MEDIUM,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${G0.COLORS.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`,backgroundColor:G0.COLORS.GREYSCALE_0_03,borderRadius:G0.SIZES.BORDER_RADIUS},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:G0.COLORS.GREYSCALE_25,"&.Mui-selected":{color:G0.COLORS.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:G0.SIZES.TEXT_MEDIUM,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{height:"100%",marginLeft:2,marginRight:2},indicator:{height:2},vertical:{borderRight:`1px solid ${G0.COLORS.GREYSCALE_0_15}`,"& .MuiTab-root":{"&:hover":{borderBottomColor:"transparent",boxShadow:`2px 0px 0px ${G0.COLORS.GREYSCALE_80}`}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${G0.COLORS.GREYSCALE_85}`,borderRight:`1px solid ${G0.COLORS.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:G0.WEIGHTS.MEDIUM,backgroundColor:G0.COLORS.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:G0.COLORS.GREYSCALE_98,borderBottom:`1px solid ${G0.COLORS.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${G0.COLORS.GREYSCALE_85}`,borderTop:`1px solid ${G0.COLORS.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:G0.COLORS.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:G0.COLORS.GREYSCALE_0_05,"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03}},"&&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>z0.createElement(V0,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${G0.COLORS.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:16,width:32,fontSize:G0.SIZES.TEXT_MEDIUM,borderRadius:G0.SIZES.BORDER_RADIUS,padding:"7px 16px",border:`1px solid ${G0.COLORS.GREYSCALE_0_15}`,backgroundColor:G0.COLORS.GREYSCALE_100_60,color:G0.COLORS.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10,border:`1px solid ${G0.COLORS.GREYSCALE_0_30}`},"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03,border:`1px solid ${G0.COLORS.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:G0.COLORS.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${G0.COLORS.MISC_FOCUS_BORDER}`,border:`1px solid ${G0.COLORS.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:G0.COLORS.GREYSCALE_25,backgroundColor:G0.COLORS.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_10,border:`1px solid ${G0.COLORS.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:G0.SIZES.TEXT_SMALL,height:24,width:24,padding:7},sizeLarge:{fontSize:G0.SIZES.TEXT_LARGE,height:40,width:40,lineHeight:20}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:G0.SIZES.TEXT_MEDIUM,borderRadius:G0.SIZES.BORDER_RADIUS}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:G0.COLORS.GREYSCALE_20},tooltip:{backgroundColor:G0.COLORS.GREYSCALE_20,fontSize:G0.SIZES.TEXT_SMALL,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};var K0=X0,Z0=e=>K0,J0=sM;var Q0={mode:"light",primary:{light:J0.COLORS.GREEN_PALE,main:J0.COLORS.GREEN,dark:J0.COLORS.GREEN_DARK,contrastText:J0.COLORS.WHITE},secondary:{light:J0.COLORS.BLUE_PALE,main:J0.COLORS.BLUE,dark:J0.COLORS.BLUE_DARK,contrastText:J0.COLORS.WHITE},error:{light:J0.COLORS.RED_PALE,main:J0.COLORS.RED,dark:J0.COLORS.RED_DARK,contrastText:J0.COLORS.WHITE},warning:{light:J0.COLORS.ORANGE_PALE,main:J0.COLORS.ORANGE,dark:J0.COLORS.ORANGE_DARK,contrastText:J0.COLORS.WHITE},success:{light:J0.COLORS.GREEN_PALE,main:J0.COLORS.GREEN,dark:J0.COLORS.GREEN_DARK,contrastText:J0.COLORS.WHITE},info:{light:J0.COLORS.BLUE_PALE,main:J0.COLORS.BLUE,dark:J0.COLORS.BLUE_DARK,contrastText:J0.COLORS.WHITE},text:{primary:J0.COLORS.TEXT_PRIMARY,secondary:J0.COLORS.TEXT_SECONDARY,disabled:J0.COLORS.GREYSCALE_0_30},action:{hover:J0.COLORS.GREYSCALE_0_03,hoverOpacity:.05,selected:J0.COLORS.GREYSCALE_0_05},amethyst:{main:J0.COLORS.PURPLE,light:J0.COLORS.PURPLE_PALE,dark:J0.COLORS.PURPLE_DARK,contrastText:J0.COLORS.WHITE},background:{paper:J0.COLORS.WHITE,default:J0.COLORS.GREYSCALE_95},divider:J0.COLORS.GREYSCALE_0_15};var e1=Z0,t1=e=>Q0,r1=sM;var n1=e=>({components:e1(e),palette:t1(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:r1.SIZES.TEXT_MEDIUM,fontWeightLight:r1.WEIGHTS.LIGHT,fontWeightRegular:r1.WEIGHTS.REGULAR,fontWeightMedium:r1.WEIGHTS.MEDIUM,fontWeightBold:r1.WEIGHTS.BOLD,htmlFontSize:r1.SIZES.TEXT_MEDIUM,fontFamily:r1.VARIOUS.FONT_FAMILY,button:{fontWeight:r1.WEIGHTS.MEDIUM,fontSize:r1.SIZES.TEXT_MEDIUM,textTransform:"none"},body1:{fontSize:r1.SIZES.TEXT_LARGE,lineHeight:"24px"},body2:{fontSize:r1.SIZES.TEXT_MEDIUM,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:r1.SIZES.TEXT_EXTRA_LARGE,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:r1.SIZES.TEXT_LARGE,fontWeight:r1.WEIGHTS.MEDIUM,lineHeight:"16px"},h6:{fontSize:r1.SIZES.TEXT_MEDIUM,fontWeight:r1.WEIGHTS.MEDIUM,lineHeight:"16px"},caption:{color:r1.COLORS.TEXT_SECONDARY},subtitle1:{fontSize:r1.SIZES.TEXT_MEDIUM,color:r1.COLORS.TEXT_SECONDARY},subtitle2:{fontSize:r1.SIZES.TEXT_SMALL,color:r1.COLORS.TEXT_SECONDARY}},shape:{borderRadius:r1.SIZES.BORDER_RADIUS}}),o1={},i1=sM;const a1={...i1.GREYSCALE,MISC_FOCUS_BORDER:i1.COLORS.MISC_FOCUS_BORDER};o1.COLORS=a1;var l1={},s1=WE,c1=aM,u1=TP,d1=n1,p1=o1;const f1=(e="light")=>s1.createTheme(d1(e)),m1=(e="light")=>c1.createTheme(u1(e)),h1=(e="light")=>d1(e),g1=(e="light")=>u1(e);var v1=Object.freeze({__proto__:null,COLORS:p1.COLORS,createTheme:m1,createThemeOptions:g1,createV5Theme:f1,createV5ThemeOptions:h1});l1.createTheme=m1,l1.createThemeOptions=g1,l1.createV5Theme=f1,l1.createV5ThemeOptions=h1,l1.themeModule=v1;var b1=l1,y1=o1.COLORS,S1=b1.createV5ThemeOptions;const x1=S1().palette,C1={TEXT:x1.text.primary,DISABLED:x1.text.disabled,HOVER:x1.action.hover,WHITE:y1.GREYSCALE_100,BORDER_LIGHT:y1.GREYSCALE_90,BORDER_MEDIUM:y1.GREYSCALE_85,BORDER_HEAVY:y1.GREYSCALE_50,DARK_MODE_TEXT:y1.GREYSCALE_95,DARK_MODE_BORDER:y1.GREYSCALE_95,DARK_MODE_DISABLED:y1.GREYSCALE_70,DARK_MODE_BACKGROUND:y1.GREYSCALE_20},w1={SELECTED:{color:y1.GREYSCALE_100,background:x1.primary.light,selectedCellClass:s.SELECTED},POSSIBLE:{color:x1.text.primary,background:y1.GREYSCALE_100},EXCLUDED_BACKGROUND:"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"},E1=4,R1=1,k1=4/3,O1="12px",L1={height:"auto",fontSize:O1,lineHeight:"unset",padding:`${E1}px`,borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},M1=70+R1,A1=Sx("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),I1=Sx(PE,{shouldForwardProp:e=>"fullHeight"!==e&&"constraints"!==e})((({fullHeight:e,constraints:t})=>({height:e?"100%":`calc(100% - ${40+R1}px)`,overflow:t.active?"hidden":"auto",border:"none"}))),T1=Sx(BE,{shouldForwardProp:e=>"showRightBorder"!==e&&"styling"!==e})((({showRightBorder:e,styling:t})=>({tableLayout:"fixed",width:"min-content",borderRight:e?`1px solid ${t.body.borderRightColor}`:void 0}))),D1=()=>Nr.createElement(Nr.Fragment,null,Nr.createElement(A1,{id:"sn-table-announcer--01","aria-live":"polite","aria-atomic":"true"}),Nr.createElement(A1,{id:"sn-table-announcer--02","aria-live":"polite","aria-atomic":"true"})),P1=Sx(OJ,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),_1=Sx(NQ,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e})((({hover:e,hoverColors:t})=>({"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),N1=Sx(DJ,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...L1,...e,padding:t.spacing(.5,1.5)}))),$1=Sx(DJ,{shouldForwardProp:e=>"atTop"!==e&&"headRowHeight"!==e&&"totalsStyle"!==e})((({totalsStyle:e,atTop:t,headRowHeight:r,theme:n})=>({...L1,...e,fontWeight:"600",position:"sticky",padding:n.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t&&r,bottom:!t&&0}))),z1={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}},q1=e=>parseInt(e.repeat(2/e.length),16),F1=e=>{const t=Math.floor((e.length-1)/3),r=((e,t)=>e.match(new RegExp(`.{${t}}`,"g")))(e.slice(1),t),[n,o,i,a]=r.map(q1);return void 0!==a?`rgba(${n},${o},${i},${a/255})`:`rgb(${n},${o},${i})`};function j1(e){let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${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),t)return`rgba(${t[1]},${t[2]},${t[3]},${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),t){const e=Math.round(+t[1]/2.55)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i.exec(e),t)return F1(e);const r=e&&z1[e.toLowerCase()];return r?void 0!==r.a?`rgba(${r.r},${r.g},${r.b},${r.a})`:`rgb(${r.r},${r.g},${r.b})`:"none"}function B1(e){if(null==e)return!1;const t=j1(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}const W1=4/3,H1=e=>parseInt(e,10)*W1+8+1,U1=e=>!!e&&(null!==e.color||e.index>-1);function V1(e,t,r={}){const n=t.getColorPickerColor(r);return n&&"none"!==n?n:e}const G1=e=>B1(e)?C1.WHITE:C1.TEXT,Y1=(e,t)=>e?{borderBottomColor:C1.DARK_MODE_BORDER,borderRightColor:C1.DARK_MODE_BORDER,borderLeftColor:C1.DARK_MODE_BORDER,borderTopColor:C1.DARK_MODE_BORDER}:{borderLeftColor:C1.BORDER_MEDIUM,borderRightColor:C1.BORDER_MEDIUM,borderTopColor:C1.BORDER_HEAVY,borderBottomColor:t?C1.BORDER_HEAVY:C1.BORDER_LIGHT},X1=(e,t,r)=>{if(e&&t&&r){return H1(e)*(t+2)<r.clientHeight-40?"1px":"0px"}return"0px"},K1=(e,t,r,n=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),l={fontFamily:o,color:U1(null==r?void 0:r.fontColor)?V1(C1.TEXT,t,null==r?void 0:r.fontColor):i||C1.TEXT,fontSize:(null==r?void 0:r.fontSize)&&`${r.fontSize}px`||a,padding:r&&"padding"in r?null==r?void 0:r.padding:void 0,...Y1(t.background.isDark,n)};return Object.keys(l).forEach((e=>{const t=e;null==l[t]&&delete l[t]})),l};function Z1(e,t,r){var n,o,i;const a=null===(n=e.components)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.header,l=K1("header",t,a,r);return l.background=t.background.isTransparent?C1.WHITE:function(e){if(void 0!==e){const t=j1(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);if(r)return`rgb(${r[1]},${r[2]},${r[3]})`}return e}(t.background.color),l.color=null!==(i=l.color)&&void 0!==i?i:B1(l.background)?C1.DARK_MODE_TEXT:C1.TEXT,l}function J1(e,t,r,n){var o,i;const a=null===(o=e.components)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.content,l=K1("content",t,a);l.background=t.background.color;const s=X1(null==l?void 0:l.fontSize,r,n),c=null==a?void 0:a.hoverColor,u=null==a?void 0:a.hoverFontColor,d=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),p=t.getStyle("object","","straightTableV2.content.hover.color"),f=U1(u)||!!p,m=U1(c)||!!d,h=f||m;let g;g=U1(c)?V1(C1.HOVER,t,c):d||(f?"":C1.HOVER);const v=h?V1(G1(g),t,U1(u)?u:p):"";return{...l,lastRowBottomBorder:s,hoverColors:{background:g,color:v}}}const Q1=e=>e.isDark?{background:e.color,borderColor:C1.DARK_MODE_BORDER,color:C1.DARK_MODE_TEXT,disabledColor:C1.DARK_MODE_DISABLED,iconColor:C1.DARK_MODE_TEXT}:{background:e.color,borderColor:C1.BORDER_MEDIUM,color:C1.TEXT,disabledColor:C1.DISABLED};function e2(e,t,r){const n={};return null==t||t.qValues.forEach(((e,t)=>{const o=e.qText&&j1(e.qText);o&&"none"!==o&&(n[r[t]]=o)})),n.cellBackgroundColor&&!n.cellForegroundColor&&(n.cellForegroundColor=G1(n.cellBackgroundColor)),{...e,color:n.cellForegroundColor||e.color,background:n.cellBackgroundColor||e.background}}const t2=new Map;function r2(e,t){const r=function(e){return t2.get(e)}(e),[n,o]=er.useContext(r),[,i]=er.useReducer((e=>e+1),0),a=er.useRef(t),l=er.useRef(),s=n();if(void 0===s)throw new Error("You must call useContextSelector inside a valid context.");const c=er.useMemo((()=>t(s)),[s,t]);return er.useEffect((()=>{a.current=t,l.current=c}),[s,c,t]),er.useEffect((()=>{const e=e=>{(a.current&&a.current(e))!==l.current&&i()};return o.add(e),()=>{o.delete(e)}}),[o]),c}const n2=(e,t)=>{var r;return null===(r=e.getElementsByClassName("sn-table-row")[t[0]])||void 0===r?void 0:r.getElementsByClassName("sn-table-cell")[t[1]]},o2=e=>e.querySelector("td[tabindex='0'], th[tabindex='0']"),i2=e=>{const t=e.nextElementSibling;var r,n;return t?"HR"===t.tagName?i2(t):t:null===(r=e.parentElement)||void 0===r||null===(n=r.children)||void 0===n?void 0:n[0]},a2=e=>{const t=e.previousElementSibling;if(!t){var r,n,o,i;const t=null===(r=e.parentElement)||void 0===r||null===(n=r.children)||void 0===n?void 0:n.length;return null===(o=e.parentElement)||void 0===o||null===(i=o.children)||void 0===i?void 0:i[t-1]}return"HR"===t.tagName?a2(t):t},l2=e=>!e.enabled||e.active,s2=e=>{setTimeout((()=>{var t,r;const n=null===(t=e.current)||void 0===t||null===(r=t.closest(".sn-table-cell"))||void 0===r?void 0:r.querySelector("#adjuster-hit-area");null==n||n.setAttribute("tabIndex","0"),null==n||n.focus()}),0)},c2=e=>{var t;const r=e.target;r.setAttribute("tabIndex","-1");const n=null==r||null===(t=r.closest(".sn-table-cell"))||void 0===t?void 0:t.querySelector("#sn-table-head-menu-button");null==n||n.focus()},u2=({focusType:e,cell:t})=>{if(t)switch(e){case d.FOCUS:t.focus(),t.setAttribute("tabIndex","0");break;case d.FOCUS_BUTTON:t.querySelector(".sn-table-head-label").focus();break;case d.BLUR:t.blur(),t.setAttribute("tabIndex","-1");break;case d.ADD_TAB:t.setAttribute("tabIndex","0");break;case d.REMOVE_TAB:t.setAttribute("tabIndex","-1")}},d2=(e,t,r,n,o,i)=>{const a=((e,t,r,n={top:0,bottom:0})=>{const o=t.getElementsByClassName("sn-table-row").length,i=t.getElementsByClassName("sn-table-head-cell").length;let[a,l]=r;switch(e.key){case u.DOWN:a<o-1-n.bottom&&a++;break;case u.UP:a>n.top&&a--;break;case u.RIGHT:if(n.top>0)break;l<i-1?l++:a<o-1&&(a++,l=0);break;case u.LEFT:if(n.top>0)break;l>0?l--:a>0&&(a--,l=i-1)}return[a,l]})(e,t,r,i),l=n2(t,a);return u2({focusType:o,cell:l}),n(a),l},p2=(e,t)=>{let r=o2(e);const n=r?((e,t)=>{const r=e.getElementsByClassName("sn-table-head-cell").length,n=e.getElementsByClassName("sn-table-cell");let o=0;for(let e=0;e<n.length;e++)if(n[e]===t){o=e;break}return[Math.ceil(o/r),o%r]})(e,r):g;r=r||n2(e,g),u2({cell:r,focusType:d.FOCUS}),t(n)},f2=(e,t,r,n)=>{var o;(u2({focusType:d.REMOVE_TAB,cell:o2(t)}),r(e),n.enabled&&!n.active)?null===(o=n.focus)||void 0===o||o.call(n):u2({focusType:d.ADD_TAB,cell:n2(t,e)})},m2=({focusedCellCoord:e,rootElement:t,shouldRefocus:r,isSelectionMode:n,setFocusedCellCoord:o,keyboard:i,announce:a,totalsPosition:l})=>{u2({focusType:d.REMOVE_TAB,cell:o2(t)});const s=[l.atTop?2:1,e[1]],c=n?s:g;if(l2(i)){const e=r.current?d.FOCUS:d.ADD_TAB;r.current=!1;const o=n2(t,c);if(u2({focusType:e,cell:o}),n){var u;const e=null==o||null===(u=o.classList)||void 0===u?void 0:u.contains("selected");a({keys:[`${o.textContent},`,e?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.NotSelectedValue"]})}}o(c)},h2=(e,t,r)=>{var n,o,i;const a=null===(n=e.closest(".qv-object-wrapper"))||void 0===n||null===(o=n.querySelector(".sel-toolbar-confirm"))||void 0===o?void 0:o.parentElement;a?a.focus():null===(i=t.focusSelection)||void 0===i||i.call(t,r)},g2=e=>{e.stopPropagation(),e.preventDefault()},v2=e=>e.ctrlKey||e.metaKey,b2=e=>e.shiftKey&&v2(e),y2=e=>[u.LEFT,u.RIGHT,u.UP,u.DOWN].includes(e),S2=e=>e.shiftKey&&y2(e.key),x2=(e,t=!1)=>e.key===u.ESC&&!t||(e.key===u.LEFT||e.key===u.RIGHT)&&b2(e),C2=(e,t)=>{const r=t.key===u.UP&&1===e[0],n=t.key===u.LEFT&&1===e[0]&&0===e[1];return r||n?d.FOCUS_BUTTON:d.FOCUS},w2=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:l,isSelectionMode:s})=>{const p=l.atTop?2:1,f=[r.pageRowIdx+p,r.pageColIdx],m={top:s?p:0,bottom:s&&l.atBottom?1:0},h=C2(f,e);h===d.FOCUS&&u2({focusType:d.REMOVE_TAB,cell:e.target});const g=d2(e,t,f,i,h,m);e.key!==u.UP&&e.key!==u.DOWN||(e.key===u.UP&&((e,t)=>{const r=t.getElementsByClassName("sn-table-container")[0];if(null==r||!r.scrollTo)return;const[n,o]=e;if(n<2)r.scrollTo({top:0,behavior:"auto"});else{var i;const e=t.getElementsByClassName("sn-table-head-cell")[0],a=null===(i=t.getElementsByClassName("sn-table-row")[n])||void 0===i?void 0:i.getElementsByClassName("sn-table-cell")[o];if(!a)return;if(a.offsetTop-e.offsetHeight<r.scrollTop){const t=r.scrollTop-a.offsetHeight-e.offsetHeight;r.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})([r.pageRowIdx,r.pageColIdx],t),((e,t,r)=>t.shiftKey&&(t.key===u.UP&&0!==r.pageRowIdx||t.key===u.DOWN&&!r.isLastRow)&&e&&r.isSelectable)(o,e,r)?n({type:c.SELECT_MULTI_ADD,payload:{cell:r,evt:e,announce:a}}):((e,t,r)=>{r&&e(t.classList.contains("selected")?{keys:["SNTable.SelectionLabel.SelectedValue"]}:{keys:["SNTable.SelectionLabel.NotSelectedValue"]})})(a,g,s))},E2=({evt:e,rootElement:t,setFocusedCellCoord:r,keyboard:n,isSelectionMode:o,paginationNeeded:i})=>{if((null==n?void 0:n.enabled)&&o&&(e.shiftKey||!e.shiftKey&&!i))g2(e),h2(e.target,n,e.shiftKey);else if(e.shiftKey){r([0,t.querySelectorAll(".sn-table-head-cell").length-1])}},R2=(e,t)=>{const{colIdx:r,rows:n,api:o}=t;let i=s.INACTIVE;return o.isModal()&&(i=r!==e.selectionColIdx?s.EXCLUDED:void 0!==n[e.qElemNumber]?s.SELECTED:s.POSSIBLE),i},k2=(e,t,r)=>{const n=Object.keys(r).length,o=n>=Object.keys(t).length;if(n){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===n?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",n.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},O2=(e,t)=>{const{api:r,rows:n,colIdx:o}=e,{cell:i,announce:a,evt:l}=t;let s={};if(-1===o)r.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;s={...n}}return s=((e,t,r)=>{const{qElemNumber:n,rowIdx:o}=t;return r.ctrlKey||r.metaKey?{[n]:o}:(void 0!==e[n]?delete e[n]:e[n]=o,{...e})})(s,i,l),k2(a,n,s),Object.keys(s).length?(r.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(s),[i.selectionColIdx]]}),{...e,rows:s,colIdx:i.selectionColIdx}):(r.cancel(),{...e,rows:s,colIdx:-1})},L2=(e,t)=>{var r;const{api:n,rows:o,colIdx:i,pageRows:a,firstCell:l}=e,{cell:s,announce:c,evt:d}=t;let p={};return l||"key"in d&&S2(d)?(-1===i?n.begin(["/qHyperCubeDef"]):p={...o},p=((e,t,r,n,o)=>{const i={...t};if("key"in n&&S2(n)){i[r.qElemNumber]=r.rowIdx;const t=n.key===u.DOWN?1:-1;return i[e[r.pageRowIdx+t][`col-${r.pageColIdx}`].qElemNumber]=r.rowIdx+t,i}if(!o)return t;const a=Math.min(o.pageRowIdx,r.pageRowIdx),l=Math.max(o.pageRowIdx,r.pageRowIdx);for(let t=a;t<=l;t++){const r=e[t][`col-${o.pageColIdx}`];i[r.qElemNumber]=r.rowIdx}return i})(a,p,s,d,l),k2(c,o,p),{...e,rows:p,colIdx:null!==(r=null==l?void 0:l.selectionColIdx)&&void 0!==r?r:s.selectionColIdx,isSelectMultiValues:!0}):e},M2=e=>{const{api:t,rows:r,colIdx:n,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&t.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(r),[n]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},A2=(e,t)=>{switch(t.type){case c.SELECT:return O2(e,t.payload);case c.SELECT_MOUSE_DOWN:return((e,{cell:t,mouseupOutsideCallback:r})=>!r||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",r),{...e,firstCell:t,mouseupOutsideCallback:r}))(e,t.payload);case c.SELECT_MOUSE_UP:return((e,t)=>M2(e.isSelectMultiValues||e.firstCell!==t.cell?e:O2(e,t)))(e,t.payload);case c.SELECT_MULTI_ADD:return L2(e,t.payload);case c.SELECT_MULTI_END:return M2(e);case c.RESET:return e.api.isModal()?e:{...e,rows:{},colIdx:-1};case c.CLEAR:return Object.keys(e.rows).length?{...e,rows:{}}:e;case c.UPDATE_PAGE_ROWS:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},I2=25e4,T2=3,D2="N";function P2(e,t,r){let n=0,o=e.length;if(e.length<=1)return null;if(r(e)<=t)return null;for(;n<=o;){const i=Math.floor((n+o)/2),a=e.slice(0,i),l=e.slice(0,i-1),s=r(a),c=r(l);if(s>t&&c<=t)return e.slice(i-1)||null;if(s===t)return e.slice(i)||null;s<t?n=i+1:o=i}return null}function _2(e,t,r){const{estimateWidth:n,measureText:o,estimateLineCount:i}=er.useMemo((()=>{const n=document.createElement("canvas").getContext("2d");n.font=`${r?"600":""} ${e} ${t}`;const o=ct(n.measureText.bind(n)),i=e=>+o(e).width.toFixed(2),a=ct((({text:e,maxWidth:t,isNumeric:r=!1})=>{if(r)return 1;let n=0,o=e;do{n+=1,o=P2(o,t,i)}while(null!==o&&n<T2);return n}),(({text:e,maxWidth:t,isNumeric:r})=>`${e}-${t}-${r}`));return{measureText:e=>o(e).width,estimateWidth:e=>o(D2).width*e,estimateLineCount:a}}),[e,t,r]);return{estimateWidth:n,measureText:o,estimateLineCount:i}}function N2(e,t){const[r,n]=er.useState(t),o=r.some(((e,r)=>e!==t[r]));o&&(n(t),e())}const $2=(e,t,r)=>{if(null==e||!e.length)return[];const n=[],o=[];let i=t;if(e.forEach(((e,a)=>{if(e.columnWidth){const{columnWidth:{type:l,pixels:s,percentage:c},label:u,qApprMaxGlyphCount:d,totalInfo:p}=e;let h=0;const g=()=>{n[a]=Math.min(7680,Math.max(m,h)),i-=n[a]};switch(l){case f.PIXELS:h=s||200,g();break;case f.PERCENTAGE:h=(c||20)/100*t,g();break;case f.FIT_TO_CONTENT:h=r(u,p,d,e.isLocked),g();break;case f.AUTO:o.push(a);break;default:throw new Error(`${l} is not a valid column width type`)}}else o.push(a)})),o.length){const e=i/o.length;o.forEach((t=>{n[t]=Math.max(m,e)}))}return n},z2=(e,t,r,n)=>{const o=er.useMemo((()=>{const o=r.totalsPosition.atTop,i=J1(e,t,r.rows.length,n),a=Z1(e,t,!o),l=function(e,t,r){var n,o;const i=null===(n=e.components)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.content,a=K1("content",t,i),{borderBottomColor:l,borderTopColor:s,background:c}=Z1(e,t,r);return{...a,borderBottomColor:l,background:c,borderTopColor:s}}(e,t,o);return{body:i,head:a,totals:l}}),[e,t.name(),r,n]);return o},q2=er.createContext({}),F2=function(e){const t=er.createContext([()=>{},new Set]);return t2.set(e,t),({children:r,value:n})=>{const o=er.useRef(n),i=er.useRef(new Set);er.useEffect((()=>{o.current=n,i.current.forEach((e=>{e(n)}))}),[n]);const a=er.useCallback((()=>o.current),[o]),l=er.useMemo((()=>[a,i.current]),[o]);return Nr.createElement(e.Provider,{value:n},Nr.createElement(t.Provider,{value:l},r))}}(q2),j2={rows:[],columns:[],totalsPosition:{}},B2=({app:e,children:t,tableData:r=j2,selectionsAPI:n,cellCoordMock:o,layout:i,model:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,setPage:g,pageInfo:v,initialDataPages:b,rect:y})=>{const[S,x]=er.useState(0),[C,w]=er.useState(o||h),[E,R]=((e,t)=>{const[r,n]=er.useReducer(A2,{pageRows:e,rows:{},colIdx:-1,api:t,isSelectMultiValues:!1});return[r,n]})(r.rows,n),[k,O]=er.useState(-1),L=z2(i,c,r,d),[M,A,I,T]=((e,t,r,{head:n,body:o})=>{const i=t.atBottom||t.atTop,a=_2(n.fontSize,n.fontFamily,!0).measureText,l=_2(o.fontSize,o.fontFamily,!0).measureText,{estimateWidth:s}=_2(o.fontSize,o.fontFamily),c=er.useMemo((()=>(e,t,r,n)=>{const o=n?24+M1+4:M1;return Math.max(a(e)+o,i?l(t)+24+R1:0,s(r))}),[s,a,l,i]),[u,d]=er.useState(0),[p,f]=er.useState((()=>$2(e,r,c)));N2((()=>{f($2(e,r-u,c))}),[e,r,u,c]);const m=er.useMemo((()=>((e,t,r)=>!!(e&&e.length>0)&&e.reduce(((e,t)=>e+t))+t<r)(p,u,r)),[p,u,r]);return[p,f,d,m]})(r.columns,r.totalsPosition,y.width,L),D=er.useMemo((()=>({app:e,selectionsAPI:n,layout:i,model:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,styling:L,rect:y})),[e,n,i,a,l,s,c.name(),u.active,d,p,f,m,L,y]);return Nr.createElement(F2,{value:{headRowHeight:S,setHeadRowHeight:x,focusedCellCoord:C,setFocusedCellCoord:w,selectionState:E,selectionDispatch:R,hoverIndex:k,setHoverIndex:O,columnWidths:M,setColumnWidths:A,baseProps:D,tableData:r,setYScrollbarWidth:I,setPage:g,pageInfo:v,initialDataPages:b,showRightBorder:T}},t)},W2=(e,t,r,n,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,l=o.atTop?i+2:i+1;f2([l,a],t,r,n)},H2=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,keyboard:o,isInteractionEnabled:i})=>{var a;(e.preventDefault(),i)&&(n(r),o.enabled&&!o.active?null===(a=o.focus)||void 0===a||a.call(o):u2({focusType:d.FOCUS_BUTTON,cell:n2(t,r)}))},U2=(e,t,r,n)=>({handleMouseDown:t=>{if(null==r||r(t),e.isSelectable){const t=()=>n({type:c.SELECT_MULTI_END});n({type:c.SELECT_MOUSE_DOWN,payload:{cell:e,mouseupOutsideCallback:t}})}},handleMouseOver:r=>{1===r.buttons&&n({type:c.SELECT_MULTI_ADD,payload:{cell:e,evt:r,announce:t}})},handleMouseUp:r=>{0===r.button&&n({type:c.SELECT_MOUSE_UP,payload:{cell:e,evt:r,announce:t}})}});function V2(e){return t=>{const{cell:r,styling:n,announce:o,onMouseDown:i}=t,a=r2(q2,(e=>R2(r,e.selectionState))),l=r2(q2,(e=>e.selectionDispatch)),{handleMouseDown:c,handleMouseOver:u,handleMouseUp:d}=U2(r,o,i,l),p=function(e,t){let r={};switch(t){case s.SELECTED:r=w1.SELECTED;break;case s.POSSIBLE:r=w1.POSSIBLE;break;case s.EXCLUDED:r={background:`${w1.EXCLUDED_BACKGROUND}, ${e.background}`,selectedCellClass:s.EXCLUDED}}return{...e,...r}}(n,a);return Nr.createElement(e,Xx({},t,{styling:p,onMouseUp:d,onMouseDown:c,onMouseOver:u}))}}function G2(e,t){let r=(n=N1,e=>{const{styling:{selectedCellClass:t,...r},component:o,align:i,children:a,scope:l,tabIndex:s,onKeyDown:c,onMouseDown:u,onKeyUp:d,onMouseUp:p,onMouseOver:f,title:m}=e;return Nr.createElement(n,{cellStyle:r,component:o,scope:l,align:i,tabIndex:s,className:`sn-table-cell ${t||""}`,title:m,onKeyDown:c,onMouseDown:u,onKeyUp:d,onMouseUp:p,onMouseOver:f},a)});var n;return t&&(r=V2(r)),e&&(r=function(e){return t=>{const{cell:r,column:n,styling:o}=t,i=er.useMemo((()=>e2(o,r.qAttrExps,n.stylingIDs)),[o,r.qAttrExps,n.stylingIDs]);return Nr.createElement(e,Xx({},t,{styling:i}))}}(r)),r}const Y2=async e=>{var t;let r=e.target;r.classList.contains("sn-table-cell")||(r=r.closest(".sn-table-cell"));const n=null===(t=r.querySelector(".sn-table-cell-text"))||void 0===t?void 0:t.textContent;try{n&&await navigator.clipboard.writeText(String(n))}catch(e){console.log(e)}},X2=e=>{var t;const{key:r,target:n}=e,o=null!==(t=document.activeElement)&&void 0!==t?t:n;if(r===u.DOWN||r===u.UP){const t=e=>r===u.DOWN?i2(e):a2(e);g2(e);let n=t(o);for(;n;){if("true"!==n.ariaDisabled){n.focus();break}n=t(n)}}},K2=(e,t)=>{e.key===u.SHIFT&&t({type:c.SELECT_MULTI_END})},Z2=(e,t,r)=>{t&&e.key===u.TAB&&!e.shiftKey&&(g2(e),h2(e.target,r,!1))},J2=({evt:e,totalRowCount:t,page:r,rowsPerPage:n,handleChangePage:o,setShouldRefocus:i,keyboard:a,isSelectionMode:l})=>{if(b2(e)){g2(e);const a=Math.ceil(t/n)-1;e.key===u.RIGHT&&r<a?(i(),o(r+1)):e.key===u.LEFT&&r>0&&(i(),o(r-1))}else if(e.key===u.ESC&&a.enabled&&!l){var s;g2(e),null===(s=a.blur)||void 0===s||s.call(a,!0)}else y2(e.key)&&g2(e)},Q2=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,isInteractionEnabled:o})=>{var i;if(!o)return void g2(e);if(x2(e))return;const a=!(null!==(i=e.target.closest(".sn-table-cell"))&&void 0!==i&&i.nextSibling);switch(e.key){case u.LEFT:case u.RIGHT:g2(e),e.key===u.RIGHT&&a?p2(t,n):d2(e,t,r,n,d.FOCUS_BUTTON);break;case u.DOWN:g2(e),u2({focusType:d.REMOVE_TAB,cell:o2(t)}),d2(e,t,r,n,d.FOCUS);break;case u.TAB:((e,t,r,n,o)=>{const i=e.target.classList.contains("sn-table-head-label");i&&e.shiftKey&&r[1]>0?n([r[0],r[1]-1]):i||e.shiftKey||(o?(g2(e),p2(t,n)):n([r[0],r[1]+1]))})(e,t,r,n,a);break;case u.C:g2(e),v2(e)&&Y2(e)}},e5=(e,t,r,n,o)=>{if(o)g2(e);else if(!x2(e))switch(e.key){case u.LEFT:case u.RIGHT:case u.UP:case u.DOWN:{g2(e);const o=C2(r,e);o===d.FOCUS&&u2({focusType:d.REMOVE_TAB,cell:e.target}),d2(e,t,r,n,o);break}case u.TAB:E2({evt:e,rootElement:t,setFocusedCellCoord:n});break;case u.C:g2(e),v2(e)&&Y2(e);break;case u.SPACE:e.preventDefault()}},t5=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,keyboard:l,paginationNeeded:s,totalsPosition:d,selectionsAPI:p})=>{if(e.target.classList.contains("excluded"))return void g2(e);const f=p.isModal();if(!x2(e,f))switch(e.key){case u.UP:case u.DOWN:case u.LEFT:case u.RIGHT:g2(e),w2({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:d,isSelectionMode:f});break;case u.SPACE:g2(e),r.isSelectable&&o&&n({type:c.SELECT,payload:{cell:r,evt:e,announce:a}});break;case u.ENTER:g2(e),f&&(p.confirm(),a({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}));break;case u.ESC:g2(e),p.cancel(),a({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]});break;case u.TAB:E2({evt:e,rootElement:t,setFocusedCellCoord:i,keyboard:l,isSelectionMode:f,paginationNeeded:s});break;case u.C:g2(e),v2(e)&&Y2(e)}},r5=Sx(mq,{shouldForwardProp:e=>"background"!==e})((({background:e})=>({height:"100%",background:e.tableColorFromTheme}))),n5=Sx(mq,{shouldForwardProp:e=>"lines"!==e&&"wordBreak"!==e})((({lines:e,wordBreak:t})=>({lineHeight:"calc(4/3)",fontSize:"inherit",...t&&{height:"100%",textOverflow:"ellipsis",overflow:"hidden",wordBreak:"break-all",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}}))),o5=Sx(mq)({overflow:"hidden",textOverflow:"ellipsis"});function i5({children:e,fontSize:t="",wordBreak:r=!1,lines:n=3}){const o=parseInt(t||O1,10),i=Nr.createElement(n5,{component:"span",className:"sn-table-cell-text",wordBreak:r,lines:n},e);return r?Nr.createElement(Nr.Fragment,null,i):Nr.createElement(o5,{minHeight:o*k1,maxHeight:o*k1*n},i)}function a5(){const{columns:e,totalsPosition:{atTop:t},rows:r}=r2(q2,(e=>e.tableData)),{rootElement:n,selectionsAPI:o,keyboard:i,styling:a,constraints:l}=r2(q2,(e=>e.baseProps)),s=r2(q2,(e=>e.headRowHeight)),c=r2(q2,(e=>e.setFocusedCellCoord));return Nr.createElement(NQ,{className:"sn-table-row"},e.map(((e,u)=>{const d=[t?1:r.length+1,u],p=t&&0===u&&!i.enabled?0:-1;return Nr.createElement($1,{totalsStyle:a.totals,headRowHeight:s,atTop:t,key:e.id,align:e.totalsTextAlign,className:"sn-table-cell",tabIndex:p,title:l.passive?void 0:e.totalInfo,onKeyDown:e=>{e5(e,n,d,c,o.isModal())},onMouseDown:()=>{f2(d,n,c,i)}},Nr.createElement(i5,{fontSize:a.totals.fontSize},e.totalInfo))})))}var l5=er.memo(a5);const s5=({selectionsAPI:e,selectionDispatch:t,setShouldRefocus:r,keyboard:n,tableWrapperRef:o})=>{er.useEffect((()=>{const i=()=>{t({type:c.RESET})},a=()=>{t({type:c.CLEAR})},l=()=>{var e;if(null!==(e=o.current)&&void 0!==e&&e.contains(document.activeElement))r();else if(n.enabled){var t;null===(t=n.blur)||void 0===t||t.call(n,!0)}i()};return e.on("deactivated",i),e.on("canceled",i),e.on("confirmed",l),e.on("cleared",a),()=>{e.removeListener("deactivated",i),e.removeListener("canceled",i),e.removeListener("confirmed",l),e.removeListener("cleared",a)}}),[e,n,t,r,o])};function c5({setShouldRefocus:e,tableWrapperRef:t,announce:r}){var n,o,i;const{rows:a,columns:l,paginationNeeded:s,totalsPosition:c}=r2(q2,(e=>e.tableData)),{selectionsAPI:u,rootElement:d,keyboard:p,layout:f,constraints:m,styling:{body:{hoverColors:h,lastRowBottomBorder:g,...v}}}=r2(q2,(e=>e.baseProps)),b=r2(q2,(e=>e.setFocusedCellCoord)),y=r2(q2,(e=>e.selectionDispatch)),S=!m.active&&!m.select,x=JSON.stringify(l.map((e=>e.stylingIDs))),C=er.useMemo((()=>JSON.parse(x).map((e=>G2(!!e.length,S)))),[x,S]),w=null===(n=f.components)||void 0===n||null===(o=n[0])||void 0===o||null===(i=o.content)||void 0===i?void 0:i.hoverEffect;return s5({keyboard:p,selectionDispatch:y,selectionsAPI:u,setShouldRefocus:e,tableWrapperRef:t}),Nr.createElement(P1,{lastRowBottomBorder:g},c.atTop?Nr.createElement(l5,null):void 0,a.map(((e,t)=>Nr.createElement(_1,{hoverColors:h,hover:w,tabIndex:-1,key:e.id,className:"sn-table-row"},l.map(((n,o)=>{const{id:i}=n,a=e[i],l=C[o],f=0!==t||0!==o||c.atTop||p.enabled?-1:0;return l&&Nr.createElement(l,{scope:0===o?"row":null,component:0===o?"th":null,cell:a,column:n,key:i,align:a.align,styling:v,tabIndex:f,announce:r,title:m.passive?void 0:a.qText,onKeyDown:e=>{t5({evt:e,rootElement:d,selectionsAPI:u,cell:a,selectionDispatch:y,isSelectionsEnabled:S,setFocusedCellCoord:b,announce:r,keyboard:p,paginationNeeded:s,totalsPosition:c})},onKeyUp:e=>K2(e,y),onMouseDown:()=>W2(a,d,b,p,c)},Nr.createElement(i5,{fontSize:v.fontSize},a.qText))}))))),c.atBottom?Nr.createElement(l5,null):void 0)}var u5=er.memo(c5);function d5(){return d5=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},d5.apply(this,arguments)}const p5=(e,t)=>Nr.createElement("svg",d5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"lock_svg__lock-a",d:"M13 7H8h5V4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3h10Z"})),Nr.createElement("use",{xlinkHref:"#lock_svg__lock-a",fillRule:"evenodd"})),f5=er.forwardRef(p5);function m5(){return m5=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},m5.apply(this,arguments)}const h5=(e,t)=>Nr.createElement("svg",m5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"descending_svg__descending-a",d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5V2Zm12 2H8v1h7V4ZM8 7h6v1H8V7Zm5 3H8v1h5v-1Z"})),Nr.createElement("use",{xlinkHref:"#descending_svg__descending-a"})),g5=er.forwardRef(h5);function v5(){return v5=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},v5.apply(this,arguments)}const b5=(e,t)=>Nr.createElement("svg",v5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"ascending_svg__ascending-a",d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5 3.5 1.793ZM8 4h5v1H8V4Zm0 3h6v1H8V7Zm0 3h7v1H8v-1Z"})),Nr.createElement("use",{xlinkHref:"#ascending_svg__ascending-a"})),y5=er.forwardRef(b5),S5=Sx(zq,{shouldForwardProp:e=>"isActive"!==e&&"textAlign"!==e&&"disabled"!==e})((({isActive:e,textAlign:t,disabled:r,theme:n})=>({textAlign:t,height:"auto",maxWidth:"100%",fontSize:"inherit",fontFamily:"inherit",padding:n.spacing(.5,1),color:"inherit",alignItems:"flex-end",cursor:r?"auto":"pointer",justifySelf:t,"&&:focus, &&:hover":{"& svg":{opacity:e?1:.5}},"& svg":{opacity:e?1:0,fontSize:O1},"& .Mui-disabled":{color:"inherit"},"& .MuiButton-endIcon, .MuiButton-startIcon":{marginBottom:"2px",visibility:r?"hidden":"visible"}}))),x5=Sx("span")({border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1}),C5=Sx(mq,{shouldForwardProp:e=>"isLocked"!==e})((({theme:e,isLocked:t})=>({width:"100%",display:"grid",flexDirection:"inherit",gridAutoFlow:"dense",gap:e.spacing(.5),fontSize:"inherit",fontFamily:"inherit","&&:hover, &&:focus-within":{"& #sn-table-head-menu-button":{opacity:1}},"& > div:last-child":{alignSelf:"flex-end"},"&.aligned-left":{gridTemplateColumns:t?"20px 2fr 24px":"1fr 24px"},"&.aligned-center":{gridTemplateColumns:"24px 2fr 24px","& > div:first-child":{gridColumn:1},"& .sn-table-head-label":{gridColumn:2},"& > div:last-child":{gridColumn:3}},"&.aligned-right":{gridTemplateColumns:t?"24px 2fr 20px":"24px 1fr","& > div:first-child":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:2},"& > div:last-child":{gridColumn:1}}}))),w5=Sx("div")({display:"flex",alignSelf:"flex-end"}),E5=Sx(mq)({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit","&.aligned-right":{justifyContent:"flex-start"},"&.aligned-center, &.aligned-left":{justifyContent:"flex-end"}}),R5=Sx(mq,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({rightAligned:e})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:"24px",display:"flex"}))),k5=Sx(zq,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({isVisible:e})=>({opacity:e?1:0,"&:focus":{opacity:1}}))),O5=Sx(pB)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),L5=Sx(ZV)((({theme:e})=>({borderRadius:"4px",margin:e.spacing(0,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"}}))),M5=Sx("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),A5=Sx(cV)((({theme:e})=>({marginRight:e.spacing(1.5),lineHeight:0})));Sx("div")((({theme:e})=>({height:"350px",boxSizing:"border-box",background:e.palette.common.white})));const I5=Sx(mq,{shouldForwardProp:e=>"isLastColumn"!==e})((({isLastColumn:e})=>({display:"flex",position:"absolute",height:"100%",top:0,left:"100%",cursor:"col-resize",width:`${e?E1:2*E1+R1}px`,justifyContent:e?"flex-end":"center",marginLeft:"-4px","&&:hover:not(:focus, :active)":{"& .sn-table-adjuster-head-border":{background:"#D9D9D9"}},"&&:focus-visible, :active":{outline:"none","& .sn-table-adjuster-head-border":{background:"#177fe6"}}}))),T5=Sx(mq)({position:"absolute",height:"100%",width:"3px"}),D5=({sortDirection:e,isLocked:t,headTextAlign:r})=>{const n="A"===e?Nr.createElement(y5,{height:O1}):Nr.createElement(g5,{height:O1}),o=t?Nr.createElement(E5,{className:`aligned-${r}`},Nr.createElement(f5,{height:O1,"data-testid":"head-cell-lock-icon"})):void 0;return"right"===r?{startIcon:n,lockIcon:o}:{endIcon:n,lockIcon:o}};function P5(){return P5=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},P5.apply(this,arguments)}const _5=(e,t)=>Nr.createElement("svg",P5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"more_svg__more-a",d:"M2 6.5h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1Zm5.5 0h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1Zm5.5 0h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#more_svg__more-a"})),N5=er.forwardRef(_5);function $5(){return $5=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},$5.apply(this,arguments)}const z5=(e,t)=>Nr.createElement("svg",$5({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116.509.509 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a.506.506 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z"})),q5=er.forwardRef(z5);function F5(){return F5=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},F5.apply(this,arguments)}const j5=(e,t)=>Nr.createElement("svg",F5({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1V1.5ZM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1h1.5ZM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1v1.5Zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1v1.5ZM6 0h4v1H6V0ZM0 6h1v4H0V6Zm15 0h1v4h-1V6Zm-9 9h4v1H6v-1Z"})),B5=er.forwardRef(j5);function W5(){return W5=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},W5.apply(this,arguments)}const H5=(e,t)=>Nr.createElement("svg",W5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_all_svg__select_all-a",d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4h2Zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0h10Zm0 1H5v10h10V1Zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28l3.497-3.627Z"})),Nr.createElement("use",{xlinkHref:"#select_all_svg__select_all-a"})),U5=er.forwardRef(H5);function V5(){return V5=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},V5.apply(this,arguments)}const G5=(e,t)=>Nr.createElement("svg",V5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"clear_selections_svg__selections-clear-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM9.166 6.166c1.555-1.555 4.113-1.555 5.668 0 1.555 1.555 1.555 4.113 0 5.668-1.555 1.555-4.113 1.555-5.668 0-1.555-1.555-1.555-4.063 0-5.668Zm4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0c-.25.201-.25.602 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304 1.304-1.304Z"})),Nr.createElement("use",{xlinkHref:"#clear_selections_svg__selections-clear-a"})),Y5=er.forwardRef(G5);function X5(){return X5=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},X5.apply(this,arguments)}const K5=(e,t)=>Nr.createElement("svg",X5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_possible_svg__luiicons_select_possible-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5v-1Zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0Zm-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM4 4v8h8V4H4Zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#select_possible_svg__luiicons_select_possible-a"})),Z5=er.forwardRef(K5);function J5(){return J5=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},J5.apply(this,arguments)}const Q5=(e,t)=>Nr.createElement("svg",J5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_alternative_svg__luiicons_select_alternative-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5v-1Zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0Zm-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM4 4v8l8-8H4Zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#select_alternative_svg__luiicons_select_alternative-a"})),e4=er.forwardRef(Q5);function t4(){return t4=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},t4.apply(this,arguments)}const r4=(e,t)=>Nr.createElement("svg",t4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_excluded_svg__luiicons_select_excluded-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5v-1Zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0Zm-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#select_excluded_svg__luiicons_select_excluded-a"})),n4=er.forwardRef(r4);function o4(){return o4=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},o4.apply(this,arguments)}const i4=(e,t)=>Nr.createElement("svg",o4({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707L3.915 8ZM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h14Zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2h2Z"})),a4=er.forwardRef(i4),l4={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},s4=(e,t)=>e.some((e=>t[e]>0)),c4=e=>{const{app:t}=r2(q2,(e=>e.baseProps)),[r,n]=er.useState(null),[o,i]=er.useState(l4);er.useEffect((()=>{t&&t.getField&&e&&e.isDim&&t.getField(e.fieldId).then(n)}),[t,e]);return{fieldInstance:r,selectionActionsEnabledStatus:o,resetSelectionActionsEnabledStatus:er.useCallback((()=>i(l4)),[]),updateSelectionActionsEnabledStatus:t=>{const r=t.qHyperCube.qDimensionInfo.find((t=>t.qFallbackTitle===e.label));r&&i({canSelectAll:s4(["qOption","qAlternative","qExcluded","qDeselected"],r.qStateCounts),canClearSelections:s4(["qSelected"],r.qStateCounts),canSelectPossible:s4(["qOption"],r.qStateCounts),canSelectAlternative:s4(["qAlternative"],r.qStateCounts),canSelectExcluded:s4(["qAlternative","qExcluded"],r.qStateCounts)})}}};function u4(){return u4=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},u4.apply(this,arguments)}const d4=(e,t)=>Nr.createElement("svg",u4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_right_svg__luiicons_arrow_right-a",d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})),Nr.createElement("use",{xlinkHref:"#arrow_right_svg__luiicons_arrow_right-a"})),p4=er.forwardRef(d4),f4=(e,t)=>e.map((e=>e.map((({onClick:e,...r})=>({...r,...e?{onClick:r=>{Object.entries(t).map((([,e])=>e(!1))),e(r)}}:{}})))));let m4={};const h4=({autoFocus:e,id:t,onClick:r,itemTitle:n,icon:o,enabled:i,subMenus:a})=>{const[l,s]=er.useState(!1),c=er.useRef(null);return Nr.createElement(Nr.Fragment,null,Nr.createElement(L5,{ref:a?c:null,key:t,"data-testid":`menu-item-${t}`,className:"sn-table-head-menu-item",onClick:e=>{r&&(r(e),m4={}),null!=a&&a.length&&(s(!0),m4[n]=s)},disabled:!i,autoFocus:e,onKeyDown:X2},Nr.createElement(M5,null,Nr.createElement(A5,null,o),Nr.createElement(e$,{variant:"body2"},n)),null!=a&&a.length?Nr.createElement(p4,null):null),(null==a?void 0:a.length)&&Nr.createElement(v4,{anchorEl:c.current,open:l,onClose:()=>s(!1),menuGroups:f4(a,m4),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"}}))},g4=({menuGroup:e})=>e.map((e=>Nr.createElement(h4,Xx({key:e.id},e)))),v4=({anchorEl:e,open:t,onClose:r,ariaLabel:n,menuGroups:o,transformOrigin:i,anchorOrigin:a})=>o.length?Nr.createElement(UV,Xx({className:"sn-table-head-menu",open:t,anchorEl:e,onClose:r,"aria-labelledby":n},a?{anchorOrigin:a}:{},i?{transformOrigin:i}:{}),(({itemGroups:e})=>e.map(((t,r)=>[g4({menuGroup:t}),r<e.length-1?Nr.createElement(O5,{"data-testid":"group-divider",variant:"middle",key:"divider"}):void 0])))({itemGroups:o})):null;function b4({column:e,tabIndex:t}){const{isDim:r,qLibraryId:n,fieldId:o,headTextAlign:i}=e,{translator:a,embed:l,model:s}=r2(q2,(e=>e.baseProps)),c=er.useRef(null),u=er.useRef(null),[d,p]=er.useState(!1),[f,m]=er.useState(!1),{fieldInstance:h,selectionActionsEnabledStatus:g,resetSelectionActionsEnabledStatus:v,updateSelectionActionsEnabledStatus:b}=c4(e),y=er.useCallback((()=>{const e=n?{qLibraryId:n,type:"dimension"}:o;l.__DO_NOT_USE__.popover(u.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}),l.on("fieldPopoverClose",(()=>{m(!1)}))}),[l,o,n]),S=er.useMemo((()=>[...r?[[{id:1,itemTitle:a.get("SNTable.MenuItem.Search"),onClick:e=>{e.stopPropagation(),p(!1),m(!0),y()},icon:Nr.createElement(q5,null),enabled:!0}],[{id:1,itemTitle:a.get("SNTable.MenuItem.Selections"),icon:Nr.createElement(B5,null),enabled:!0,subMenus:[[{id:1,itemTitle:a.get("SNTable.MenuItem.SelectAll"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectAll())},icon:Nr.createElement(U5,null),enabled:g.canSelectAll},{id:2,itemTitle:a.get("SNTable.MenuItem.SelectPossible"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectPossible())},icon:Nr.createElement(Z5,null),enabled:g.canSelectPossible},{id:3,itemTitle:a.get("SNTable.MenuItem.SelectAlternative"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectAlternative())},icon:Nr.createElement(e4,null),enabled:g.canSelectAlternative},{id:4,itemTitle:a.get("SNTable.MenuItem.SelectExcluded"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectExcluded())},icon:Nr.createElement(n4,null),enabled:g.canSelectExcluded}],[{id:1,itemTitle:a.get("SNTable.MenuItem.ClearSelections"),onClick:async()=>{p(!1),await(null==h?void 0:h.clear())},icon:Nr.createElement(Y5,null),enabled:g.canClearSelections}]]}]]:[],[{id:1,itemTitle:a.get("SNTable.MenuItem.AdjustColumnSize"),onClick:e=>{g2(e),p(!1),s2(c)},icon:Nr.createElement(a4,null),enabled:!0}]]),[a,r,h,g,y]);return er.useEffect((()=>{d||v()}),[d,v]),S.length?Nr.createElement(R5,{rightAligned:"right"===i},Nr.createElement(k5,{isVisible:f||d,ref:c,size:"small",tabIndex:t,id:"sn-table-head-menu-button","aria-controls":d?"sn-table-head-menu":void 0,"aria-expanded":d?"true":void 0,"aria-haspopup":"true",onClick:async()=>{if(!d&&s){const e=await s.getLayout();b(e)}p(!d)}},Nr.createElement(N5,{height:O1})),Nr.createElement("div",{ref:u}),Nr.createElement(v4,{open:d,anchorEl:c.current,onClose:()=>p(!1),menuGroups:S,ariaLabel:"sn-table-head-menu-button"})):null}function y4({children:e,column:t,isActive:r,isInteractionEnabled:n}){const{keyboard:o,translator:i,changeSortOrder:a}=r2(q2,(e=>e.baseProps)),l=r2(q2,(e=>0===e.focusedCellCoord[0])),{startIcon:s,endIcon:c,lockIcon:u}=D5(t),d=n&&l2(o)?0:-1,p={A:i.get("SNTable.Accessibility.Ascending"),D:i.get("SNTable.Accessibility.Descending")};return Nr.createElement(C5,{isLocked:Boolean(u),className:`aligned-${t.headTextAlign}`},u&&Nr.createElement(w5,null,u),Nr.createElement(S5,{className:"sn-table-head-label",isActive:r,textAlign:t.headTextAlign,color:"inherit",size:"small",startIcon:s,endIcon:c,onClick:()=>n&&a(t),tabIndex:d,disabled:!n},e,l&&Nr.createElement(x5,{"data-testid":`VHL-for-col-${t.pageColIdx}`},`${p[t.sortDirection]} ${i.get("SNTable.SortLabel.PressSpaceToSort")}`)),n&&Nr.createElement(b4,{column:t,tabIndex:d}))}const S4=({column:e,isLastColumn:t,onColumnResize:r})=>{const{pageColIdx:n}=e,{applyColumnWidths:o,constraints:i}=r2(q2,(e=>e.baseProps)),a=r2(q2,(e=>e.columnWidths)),l=r2(q2,(e=>e.setColumnWidths)),s=er.useRef({columnWidth:0,initX:0,initWidth:0});if(i.active)return null;const c=e=>{null==r||r(),s.current.columnWidth=e;const t=[...a];t[n]=e,l(t)},d=()=>{if(s.current.columnWidth!==s.current.initWidth){const t={type:f.PIXELS,pixels:s.current.columnWidth};o(t,e)}},p=e=>{const t=e.clientX-s.current.initX,r=Math.max(s.current.initWidth+t,m);c(r)},h=e=>{g2(e),document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",h),d()};return Nr.createElement(I5,{id:"adjuster-hit-area",isLastColumn:t,key:`adjuster-${n}`,onKeyDown:e=>{if(e.key===u.LEFT||e.key===u.RIGHT){g2(e);const t=5,r=a[n],o=e.key===u.LEFT?r-t:r+t,i=Math.max(o,m);c(i)}else e.key===u.SPACE||e.key===u.ENTER?(g2(e),c2(e),d()):e.key===u.ESC&&(g2(e),c2(e),c(s.current.initWidth))},onMouseDown:e=>{e.stopPropagation(),s.current={initX:e.clientX,initWidth:a[n],columnWidth:a[n]},document.addEventListener("mousemove",p),document.addEventListener("mouseup",h)},onBlur:e=>c2(e),onFocus:()=>{s.current.initWidth=a[n]},onDoubleClick:()=>o({type:f.FIT_TO_CONTENT},e),"data-testid":"sn-table-column-adjuster"},Nr.createElement(T5,{className:"sn-table-adjuster-head-border"}))},x4=Sx(DJ,{shouldForwardProp:e=>"headerStyle"!==e})((({headerStyle:e})=>({...L1,...e,pointer:"cursor",verticalAlign:"bottom","&:focus":{boxShadow:"none"}})));function C4(){const{columns:e}=r2(q2,(e=>e.tableData)),{layout:t,styling:r,constraints:n,rootElement:o,keyboard:i}=r2(q2,(e=>e.baseProps)),a=r2(q2,(e=>e.setHeadRowHeight)),l=r2(q2,(e=>e.columnWidths)),s=r2(q2,(e=>e.setFocusedCellCoord)),c=r2(q2,(e=>e.baseProps.selectionsAPI.isModal())),u=er.useRef(null),d=!n.active&&!c;return er.useEffect((()=>{u.current&&a(u.current.getBoundingClientRect().height)}),[r.head.fontSize,l,a]),Nr.createElement(XJ,null,Nr.createElement(NQ,{ref:u,className:"sn-table-row"},e.map(((a,c)=>{const u=t.qHyperCube.qEffectiveInterColumnSortOrder[0]===a.colIdx,f=u?p[a.sortDirection]:void 0,m=c===e.length-1,h=[0,a.pageColIdx],g={width:l[c]-(m?2*E1:2*E1+R1),zIndex:e.length-c};return Nr.createElement(x4,{headerStyle:r.head,style:g,key:a.id,align:a.headTextAlign,className:"sn-table-head-cell sn-table-cell","aria-sort":f,tabIndex:-1,title:n.passive?void 0:a.label,onKeyDown:e=>Q2({evt:e,rootElement:o,cellCoord:h,setFocusedCellCoord:s,isInteractionEnabled:d}),onMouseDown:e=>H2({evt:e,rootElement:o,cellCoord:h,setFocusedCellCoord:s,keyboard:i,isInteractionEnabled:d})},Nr.createElement(y4,{column:a,isActive:u,isInteractionEnabled:d},Nr.createElement(i5,{fontSize:r.head.fontSize},a.label)),Nr.createElement(S4,{column:a,isLastColumn:m}))}))))}var w4=er.memo(C4);const E4=Sx(mq,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),R4=Sx(aX,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),k4=Sx(zq,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:r})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:r.spacing(1)}))),O4=Sx(e$)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})));function L4({children:e,footerContainer:t,paginationNeeded:r=!0}){const{theme:n}=r2(q2,(e=>e.baseProps)),o=er.useMemo((()=>Q1(n.background)),[n]),i=r?Nr.createElement(E4,{footerStyle:o},e):null;return t?Uf.createPortal(e,t):i}function M4(){return M4=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},M4.apply(this,arguments)}const A4=(e,t)=>Nr.createElement("svg",M4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_left_svg__luiicons_arrow_left-a",d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),Nr.createElement("use",{xlinkHref:"#arrow_left_svg__luiicons_arrow_left-a",fillRule:"evenodd"})),I4=er.forwardRef(A4);function T4(){return T4=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},T4.apply(this,arguments)}const D4=(e,t)=>Nr.createElement("svg",T4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_left_stop_svg__arrow-left-stop-a",d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8l6-6ZM4 2v12H2V2h2Z"})),Nr.createElement("use",{xlinkHref:"#arrow_left_stop_svg__arrow-left-stop-a"})),P4=er.forwardRef(D4);function _4(){return _4=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},_4.apply(this,arguments)}const N4=(e,t)=>Nr.createElement("svg",_4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_right_stop_svg__arrow-right-stop-a",d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5 3.5 2ZM14 2v12h-2V2h2Z"})),Nr.createElement("use",{xlinkHref:"#arrow_right_stop_svg__arrow-right-stop-a"})),$4=er.forwardRef(N4),z4=1e3,q4="…",F4=({totalPages:e,page:t})=>{const r=Math.min(e,z4),n=r<e&&t>500,o=n?Math.min(500+t,e):r,i=n?Math.max(0,o-z4):0,a=Array.from(Array(r).keys()).map((e=>{const t=e+i;return Nr.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(Nr.createElement("option",{key:"startMoreOptions",value:q4,disabled:!0},q4)),o<e-1&&a.push(Nr.createElement("option",{key:"endMoreOptions",value:q4,disabled:!0},q4)),Nr.createElement(Nr.Fragment,null,a)},j4={FirstPage:P4,PreviousPage:I4,NextPage:p4,LastPage:$4,FirstPageRTL:$4,PreviousPageRTL:p4,NextPageRTL:I4,LastPageRTL:P4},B4=(e,t)=>{switch(e){case"selectPage":return t>700;case"rppOptions":return t>550;case"firstLast":return t>350;case"displayedRows":return t>250;default:return!1}};function W4({direction:e,pageInfo:t,setPageInfo:r,footerContainer:n,isSelectionMode:o,handleChangePage:i,announce:a}){const{totalRowCount:l,totalColumnCount:s,totalPages:c}=r2(q2,(e=>e.tableData)),{page:u,rowsPerPage:d,rowsPerPageOptions:p}=t,{keyboard:f,translator:m,theme:h,constraints:g,rect:v}=r2(q2,(e=>e.baseProps)),b=er.useMemo((()=>Q1(h.background)),[h]),y=0===u,S=u>=c-1,x=l2(f)?0:-1,C=n?n.getBoundingClientRect().width:v.width,w=B4("firstLast",C),E=!!t.rowsPerPageOptions.length&&!o&&B4("rppOptions",C)&&s<=100,R=m.get("SNTable.Pagination.DisplayedRowsLabel",[`${u*d+1} - ${Math.min((u+1)*d,l)}`,l.toString()]),k=f.enabled?e=>Z2(e,o,f):null,O=(t,r,n,o)=>{const a=j4[`${n}${"rtl"===e?"RTL":""}`];return Nr.createElement(k4,{footerStyle:b,disabledCondition:t,size:"small","data-testid":"pagination-action-icon-button",onClick:t?null:()=>i(r),"aria-disabled":t,"aria-label":m.get(`SNTable.Pagination.${n}`),title:g.passive?void 0:m.get(`SNTable.Pagination.${n}`),tabIndex:x,onKeyDown:o},Nr.createElement(a,{height:O1}))},L=(e,t,r,n)=>{const o=m.get(`SNTable.Pagination.${e}`),i=`${e}-dropdown`,a=`${i}-label`,l={tabIndex:x,id:i,"data-testid":i};return Nr.createElement(Nr.Fragment,null,Nr.createElement(O4,{variant:"caption",id:a},o,":"),Nr.createElement(R4,{footerStyle:b,size:"small",native:!0,value:t,onChange:n,inputProps:l,"aria-labelledby":a},r))},M=Nr.createElement(Nr.Fragment,null,p.map((e=>Nr.createElement("option",{key:e,value:e},e)))),A=Nr.createElement(F4,{totalPages:c,page:u});return Nr.createElement(Nr.Fragment,null,E&&L("RowsPerPage",d,M,(e=>{r({...t,page:0,rowsPerPage:+e.target.value}),a({keys:[["SNTable.Pagination.RowsPerPageChange",e.target.value.toString()]],politeness:"assertive"})})),B4("selectPage",C)&&L("SelectPage",u,A,(e=>i(+e.target.value))),B4("displayedRows",C)&&Nr.createElement(O4,{variant:"caption"},R),w&&O(y,0,"FirstPage",null),O(y,u-1,"PreviousPage",null),O(S,u+1,"NextPage",w?null:k),w&&O(S,c-1,"LastPage",k))}var H4=er.memo(W4);function U4(e,t){const r=er.useRef(!1);er.useEffect((()=>{r.current?e():r.current=!0}),t)}const V4=(e,t,r)=>{er.useEffect((()=>{const n=e.current;if(!n)return;const o=e=>((e,t,r)=>{const n=e.currentTarget,o=e.relatedTarget,i=n.contains(o),a=null==o?void 0:o.closest(".sn-table-head-menu");var l;!r.enabled||i||a||t.current||(n.querySelector("#sn-table-announcer--01").innerHTML="",n.querySelector("#sn-table-announcer--02").innerHTML="",null===(l=r.blur)||void 0===l||l.call(r,!1))})(e,t,r);return n.addEventListener("focusout",o),()=>{n.removeEventListener("focusout",o)}}),[e,t,r])},G4=(e,t)=>{er.useEffect((()=>{const r=e.current;if(!r)return;const n=e=>((e,t,r)=>{if(0===e.deltaX)return;e.stopPropagation();const n=r.scrollWidth-r.offsetWidth;let{scrollLeft:o}=r,i=o+e.deltaX;t&&(i=n+i),n>0&&(i<0||i>n+1)&&(e.preventDefault(),o=t?Math.min(0,Math.min(n,i)):Math.max(0,Math.min(n,i)))})(e,"rtl"===t,r);return r.addEventListener("wheel",n),()=>{r.removeEventListener("wheel",n)}}),[e,t])},Y4=e=>{const{layout:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.columnWidths)),[n,o]=er.useState(0),[i,a]=er.useState(0);return er.useLayoutEffect((()=>{if(e.current){var t;const{offsetWidth:r=0,offsetHeight:n=0,clientWidth:i=0,clientHeight:l=0}=null!==(t=e.current)&&void 0!==t?t:{},s=n-l;a(r-i),o(s)}}),[e,t,r]),{xScrollbarWidth:n,yScrollbarWidth:i}},X4=()=>{const{rootElement:e,keyboard:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.focusedCellCoord));er.useEffect((()=>{let n=r[0]>0?d.FOCUS:d.FOCUS_BUTTON;n=t.active?n:d.BLUR;const o=t.active?n2(e,r):o2(e);u2({focusType:n,cell:o})}),[t.active,e])};function K4(e){const{pageInfo:t,setPageInfo:r,direction:n,footerContainer:o,announce:i}=e,{page:a,rowsPerPage:l}=t,{totalColumnCount:s,totalRowCount:u,totalPages:d,paginationNeeded:p,rows:f,columns:m,totalsPosition:h}=r2(q2,(e=>e.tableData)),{selectionsAPI:g,rootElement:v,keyboard:b,translator:y,theme:S,constraints:x,styling:C}=r2(q2,(e=>e.baseProps)),w=r2(q2,(e=>e.focusedCellCoord)),E=r2(q2,(e=>e.setFocusedCellCoord)),R=r2(q2,(e=>e.setYScrollbarWidth)),k=r2(q2,(e=>e.showRightBorder)),O=r2(q2,(e=>e.selectionDispatch)),L=er.useRef(!1),M=er.useRef(null),A=er.useRef(null),{yScrollbarWidth:I}=Y4(M),T=g.isModal(),D=`${y.get("SNTable.Accessibility.RowsAndColumns",[String(f.length+1),String(m.length)])} ${y.get("SNTable.Accessibility.NavigationInstructions")}`,P=er.useCallback((()=>{L.current=v.getElementsByTagName("table")[0].contains(document.activeElement)}),[v]),_=er.useCallback((e=>{r({...t,page:e}),i({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),d.toString()]],politeness:"assertive"})}),[t,r,d,i]);return V4(A,L,b),G4(M,n),X4(),er.useEffect((()=>{var e;null===(e=M.current)||void 0===e||e.scrollTo(0,0)}),[t,u]),U4((()=>{m2({focusedCellCoord:w,rootElement:v,shouldRefocus:L,setFocusedCellCoord:E,isSelectionMode:T,keyboard:b,announce:i,totalsPosition:h})}),[f.length,u,s,a]),U4((()=>{R(I)}),[I]),U4((()=>{O({type:c.UPDATE_PAGE_ROWS,payload:{pageRows:f}})}),[f]),Nr.createElement(r5,{ref:A,background:S.background,dir:n,onKeyDown:e=>{J2({evt:e,totalRowCount:u,page:a,rowsPerPage:l,handleChangePage:_,setShouldRefocus:P,keyboard:b,isSelectionMode:T})},"data-testid":"sn-table"},Nr.createElement(D1,null),Nr.createElement(I1,{ref:M,className:"sn-table-container",fullHeight:o||x.active||!p,constraints:x,tabIndex:-1,role:"application","data-testid":"table-container"},Nr.createElement(T1,{styling:C,showRightBorder:k,stickyHeader:!0,"aria-label":D},Nr.createElement(w4,null),Nr.createElement(u5,Xx({},e,{setShouldRefocus:P,tableWrapperRef:A})))),!x.active&&Nr.createElement(L4,{footerContainer:o,paginationNeeded:p},Nr.createElement(H4,Xx({},e,{handleChangePage:_,isSelectionMode:T}))))}var Z4=er.memo(K4);function J4(e){var t,r;const n=S1();return null!=n&&null!==(t=n.components)&&void 0!==t&&null!==(r=t.MuiTable)&&void 0!==r&&r.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),ix({...n,direction:e})}var Q4=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function e3(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||Q4(n)&&Q4(o)))return!1;var n,o;return!0}function t3(e,t){var r;void 0===t&&(t=e3);var n,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}}var r3="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function n3(e){cancelAnimationFrame(e.id)}function o3(e,t){var r=r3();var n={id:requestAnimationFrame((function o(){r3()-r>=t?e.call(null):n.id=requestAnimationFrame(o)}))};return n}var i3=-1;function a3(e){if(void 0===e&&(e=!1),-1===i3||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),i3=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return i3}var l3=null;function s3(e){if(void 0===e&&(e=!1),null===l3||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?l3="positive-descending":(t.scrollLeft=1,l3=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),l3}return l3}var c3=150,u3=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function d3(e){var t,r=e.getColumnOffset,n=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,ZR(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:ZR(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=t3((function(e,t,r,o,i,a,l,s){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),n._callOnScroll=void 0,n._callOnScroll=t3((function(e,t,r,o,i){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var o,a=n.props,l=a.columnWidth,s=a.direction,c=a.rowHeight,p=n._getItemStyleCache(h&&l,h&&s,h&&c),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var m=r(n.props,t,n._instanceProps),g="rtl"===s;p[f]=o={position:"absolute",left:g?void 0:m,right:g?m:void 0,top:d(n.props,e,n._instanceProps),height:u(n.props,e,n._instanceProps),width:i(n.props,t,n._instanceProps)}}return o},n._getItemStyleCache=void 0,n._getItemStyleCache=t3((function(e,t,r){return{}})),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,l=t.scrollHeight,s=t.scrollWidth;n.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=n.props.direction,c=i;if("rtl"===t)switch(s3()){case"negative":c=-i;break;case"positive-descending":c=s-o-i}c=Math.max(0,Math.min(c,s-o));var u=Math.max(0,Math.min(a,l-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&n3(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=o3(n._resetIsScrolling,c3)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1)}))},n}KR(t,e),t.getDerivedStateFromProps=function(e,t){return p3(e,t),g(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}}),this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,f=i.width,m=this.state,h=m.scrollLeft,g=m.scrollTop,v=a3();void 0!==n&&(n=Math.max(0,Math.min(n,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,S=b>d?v:0;this.scrollTo({scrollLeft:void 0!==n?s(this.props,n,r,h,this._instanceProps,S):h,scrollTop:void 0!==o?c(this.props,o,r,g,this._instanceProps,y):g})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(s3()){case"negative":o.scrollLeft=-r;break;case"positive-ascending":o.scrollLeft=r;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-r}else o.scrollLeft=Math.max(0,r);o.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&n3(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,r=e.className,n=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?u3:p,m=e.outerElementType,h=e.outerTagName,g=e.rowCount,v=e.style,b=e.useIsScrolling,y=e.width,S=this.state.isScrolling,x=this._getHorizontalRangeToRender(),C=x[0],w=x[1],E=this._getVerticalRangeToRender(),R=E[0],k=E[1],O=[];if(n>0&&g)for(var L=R;L<=k;L++)for(var M=C;M<=w;M++)O.push(er.createElement(t,{columnIndex:M,data:d,isScrolling:b?S:void 0,key:f({columnIndex:M,data:d,rowIndex:L}),rowIndex:L,style:this._getItemStyle(L,M)}));var A=a(this.props,this._instanceProps),I=l(this.props,this._instanceProps);return er.createElement(m||h||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:HE({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},er.createElement(c||u||"div",{children:O,ref:s,style:{height:A,pointerEvents:S?"none":void 0,width:I}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,o=e.rowCount;if("function"==typeof r&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],l=i[1],s=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],m=u[3];this._callOnItemsRendered(a,l,d,p,s,c,f,m)}if("function"==typeof n){var h=this.state,g=h.horizontalScrollDirection,v=h.scrollLeft,b=h.scrollTop,y=h.scrollUpdateWasRequested,S=h.verticalScrollDirection;this._callOnScroll(v,b,g,S,y)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,l=e.rowCount,s=this.state,c=s.horizontalScrollDirection,u=s.isScrolling,d=s.scrollLeft,p=r||i||a||1;if(0===t||0===l)return[0,0,0,0];var f=n(this.props,d,this._instanceProps),m=o(this.props,f,d,this._instanceProps),h=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-h),Math.max(0,Math.min(t-1,m+g)),f,m]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanCount,n=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,l=a.isScrolling,s=a.verticalScrollDirection,c=a.scrollTop,u=n||o||r||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),m=f(this.props,d,c,this._instanceProps),h=l&&"backward"!==s?1:Math.max(1,u),g=l&&"forward"!==s?1:Math.max(1,u);return[Math.max(0,d-h),Math.max(0,Math.min(i-1,m+g)),d,m]},t}(er.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var p3=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},f3=function(e,t){var r=e.rowCount,n=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=r&&(i=r-1),i>=0){var l=n[i];a=l.offset+l.size}return a+(r-i-1)*o},m3=function(e,t){var r=e.columnCount,n=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=r&&(i=r-1),i>=0){var l=n[i];a=l.offset+l.size}return a+(r-i-1)*o},h3=function(e,t,r,n){var o,i,a;if("column"===e?(o=n.columnMetadataMap,i=t.columnWidth,a=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=t.rowHeight,a=n.lastMeasuredRowIndex),r>a){var l=0;if(a>=0){var s=o[a];l=s.offset+s.size}for(var c=a+1;c<=r;c++){var u=i(c);o[c]={offset:l,size:u},l+=u}"column"===e?n.lastMeasuredColumnIndex=r:n.lastMeasuredRowIndex=r}return o[r]},g3=function(e,t,r,n){var o,i;return"column"===e?(o=r.columnMetadataMap,i=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=r.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=n?v3(e,t,r,i,0,n):b3(e,t,r,Math.max(0,i),n)},v3=function(e,t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),l=h3(e,t,a,r).offset;if(l===i)return a;l<i?o=a+1:l>i&&(n=a-1)}return o>0?o-1:0},b3=function(e,t,r,n,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;n<i&&h3(e,t,n,r).offset<o;)n+=a,a*=2;return v3(e,t,r,Math.min(n,i-1),Math.floor(n/2),o)},y3=function(e,t,r,n,o,i,a){var l="column"===e?t.width:t.height,s=h3(e,t,r,i),c="column"===e?m3(t,i):f3(t,i),u=Math.max(0,Math.min(c-l,s.offset)),d=Math.max(0,s.offset-l+a+s.size);switch("smart"===n&&(n=o>=d-l&&o<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},S3=d3({getColumnOffset:function(e,t,r){return h3("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return g3("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var o=e.columnCount,i=e.width,a=h3("column",e,t,n),l=r+i,s=a.offset+a.size,c=t;c<o-1&&s<l;)c++,s+=h3("column",e,c,n).size;return c},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:f3,getEstimatedTotalWidth:m3,getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){return y3("column",e,t,r,n,o,i)},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){return y3("row",e,t,r,n,o,i)},getRowOffset:function(e,t,r){return h3("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return g3("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var o=e.rowCount,i=e.height,a=h3("row",e,t,n),l=r+i,s=a.offset+a.size,c=t;c<o-1&&s<l;)c++,s+=h3("row",e,c,n).size;return c},initInstanceProps:function(e,t){var r=e,n={columnMetadataMap:{},estimatedColumnWidth:r.estimatedColumnWidth||50,estimatedRowHeight:r.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:r})},t.resetAfterRowIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:r})},t.resetAfterIndices=function(e){var r=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof r&&(n.lastMeasuredColumnIndex=Math.min(n.lastMeasuredColumnIndex,r-1)),"number"==typeof o&&(n.lastMeasuredRowIndex=Math.min(n.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),x3=150,C3=function(e,t){return e};function w3(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=s(n.props,ZR(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:ZR(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=t3((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=t3((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,l=i.itemSize,s=i.layout,u=n._getItemStyleCache(c&&l,c&&s,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=r(n.props,e,n._instanceProps),p=o(n.props,e,n._instanceProps),f="horizontal"===a||"horizontal"===s,m="rtl"===a,h=f?d:0;u[e]=t={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=t3((function(e,t,r){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(s3()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;n.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&n3(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=o3(n._resetIsScrolling,x3)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}KR(t,e),t.getDerivedStateFromProps=function(e,t){return E3(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var r=this.props,n=r.itemCount,o=r.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?a3():0:s.scrollHeight>s.clientHeight?a3():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},d.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(s3()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&n3(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,r=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?C3:d,f=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,v=e.useIsScrolling,b=e.width,y=this.state.isScrolling,S="horizontal"===o||"horizontal"===f,x=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),w=C[0],E=C[1],R=[];if(c>0)for(var k=w;k<=E;k++)R.push(er.createElement(t,{data:u,key:p(k,u),index:k,isScrolling:v?y:void 0,style:this._getItemStyle(k)}));var O=n(this.props,this._instanceProps);return er.createElement(m||h||"div",{className:r,onScroll:x,ref:this._outerRefSetter,style:HE({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},er.createElement(l||s||"div",{children:R,ref:a,style:{height:S?"100%":O,pointerEvents:y?"none":void 0,width:S?O:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,s=n.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,s,this._instanceProps),u=l(this.props,c,s,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(er.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var E3=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},R3=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var l=o[i];a=l.offset+l.size}for(var s=i+1;s<=t;s++){var c=n(s);o[s]={offset:a,size:c},a+=c}r.lastMeasuredIndex=t}return o[t]},k3=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=R3(e,i,t).offset;if(a===o)return i;a<o?n=i+1:a>o&&(r=i-1)}return n>0?n-1:0},O3=function(e,t,r,n){for(var o=e.itemCount,i=1;r<o&&R3(e,r,t).offset<n;)r+=i,i*=2;return k3(e,t,Math.min(r,o-1),Math.floor(r/2),n)},L3=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var l=n[i];a=l.offset+l.size}return a+(r-i-1)*o},M3=w3({getItemOffset:function(e,t,r){return R3(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:L3,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,l=e.height,s=e.layout,c=e.width,u="horizontal"===a||"horizontal"===s?c:l,d=R3(e,t,o),p=L3(e,o),f=Math.max(0,Math.min(p-u,d.offset)),m=Math.max(0,d.offset-u+d.size+i);switch("smart"===r&&(r=n>=m-u&&n<=f+u?"auto":"center"),r){case"start":return f;case"end":return m;case"center":return Math.round(m+(f-m)/2);default:return n>=m&&n<=f?n:n<m?m:f}},getStartIndexForOffset:function(e,t,r){return function(e,t,r){var n=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?n[o].offset:0)>=r?k3(e,t,o,0,r):O3(e,t,Math.max(0,o),r)}(e,r,t)},getStopIndexForStartIndex:function(e,t,r,n){for(var o=e.direction,i=e.height,a=e.itemCount,l=e.layout,s=e.width,c="horizontal"===o||"horizontal"===l?s:i,u=R3(e,t,n),d=r+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=R3(e,f,n).size;return f},initInstanceProps:function(e,t){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,n){void 0===n&&(n=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),n&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function A3(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}var I3=["style"],T3=["style"];function D3(e,t){var r=e.style,n=lR(e,I3),o=t.style,i=lR(t,T3);return!A3(r,o)&&!A3(n,i)}const P3=e=>{const t=er.useRef(e);return t.current=e,t},_3=({qLeft:e,qTop:t,qWidth:r,qHeight:n})=>`${e}-${t}-${r}-${n}`,N3=e=>!Number.isNaN(+e),$3=e=>!(!e.qNum&&0!==e.qNum||!N3(e.qNum)),z3=1e4;function q3(e,t){return[...t].reverse().find((t=>t*e<=z3))||Math.floor(z3/e)}function F3(e){var t;const[r,n,o,i,a]=[e.qHyperCube.qDimensionInfo.length>0,e.qHyperCube.qMeasureInfo.length>0,e.qHyperCube.qGrandTotalRow.length>0,null===(t=e.totals)||void 0===t?void 0:t.show,e.totals.position];if(o&&(r&&n||!i&&!r)){if(i||"top"===a)return{atTop:!0,atBottom:!1};if(!i&&"bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function j3(e,t,r,n){var o,i,a;return t>=n?null!==(o=null===(i=e.qHyperCube.qGrandTotalRow[t-n])||void 0===i?void 0:i.qText)&&void 0!==o?o:"":0===r&&null!==(a=e.totals.label)&&void 0!==a?a:""}function B3(e,t,r){return e&&!e.auto?{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:r?"left":"right",bodyTextAlign:"auto"}}const W3=(e,t)=>"auto"!==t?t:$3(e)?"right":"left";const H3=e=>{const{qHyperCube:{qColumnOrder:t,qDimensionInfo:r,qMeasureInfo:n}}=e,o=r.length,i=o+n.length,a=(null==t?void 0:t.length)===i?t:Array.from(Array(i).keys()),l={};let s=0;return a.filter((e=>{const t=e<o,{qError:i}=t?r[e]:n[e-o],a=7005===(null==i?void 0:i.qErrorCode);return t&&(a?s++:l[e]=e-s),!a})).map(((t,r)=>function(e,t,r,n){const{qDimensionInfo:o,qMeasureInfo:i}=e.qHyperCube,a=o.length,l=t<a,s=l?o[t]:i[t-a];let c,u=0,d="",p=!1;if(l){const e=s;u=e.qGroupPos,d=e.qGroupFieldDefs[u],p=e.qLocked,({qDimensionType:c}=e)}const{qFallbackTitle:f,textAlign:m,qAttrExprInfo:h,qSortIndicator:g,qReverseSort:v,qApprMaxGlyphCount:b,columnWidth:y,qLibraryId:S}=s;return{isDim:l,isLocked:p,fieldId:d,colIdx:t,qLibraryId:S,pageColIdx:r,qApprMaxGlyphCount:b,qReverseSort:v,columnWidth:y,selectionColIdx:null!=n?n:-1,id:`col-${r}`,label:f,stylingIDs:h.map((e=>e.id)),sortDirection:g&&"N"!==g?g:"A",totalInfo:j3(e,t,r,a),...B3(m,c,l)}}(e,t,r,l[t])))};const U3=(e,t,r,n,o)=>{const i=e[r];if(!i)return!0;for(let e=t;e<t+n;e++){const t=i[`col-${e}`];if((null==t?void 0:t.rowIdx)!==o)return!0}return!1},V3=(e,t,r,n)=>{const o=e.slice(r,n);return 0===o.length||o.some((e=>!e[`col-${t}`]))},G3=(e,t,r,n,o,i)=>{e.forEach((e=>{e.qMatrix.forEach(((a,l)=>{const s=e.qArea.qTop-t.page*t.rowsPerPage,{row:c,pageRowIdx:u}=((e,t,r,n,o,i,a,l)=>{var s;const c=n.qTop+r,u=o+r,d=null!==(s=e[u])&&void 0!==s?s:{key:`row-${u}`};return t.forEach(((e,t)=>{var r;const o=t+n.qLeft,{colIdx:s,isDim:p,isLocked:f,id:m,bodyTextAlign:h,selectionColIdx:g}=i[o],v=$3(e);d[m]={...e,align:W3(e,h),rowIdx:c,colIdx:s,isSelectable:p&&!f,pageRowIdx:u,pageColIdx:o,selectionColIdx:g,isLastRow:c===a.qcy-1,isLastColumn:o===a.qcx-1,isNumeric:v},l(null!==(r=e.qText)&&void 0!==r?r:"",u,o,v)})),{row:d,pageRowIdx:u}})(r,a,l,e.qArea,s,n,o.qHyperCube.qSize,i);r[u]=c}))}))},Y3=({layout:e,model:t,theme:r,initialDataPages:n,pageInfo:o,rowCount:i,visibleRowCount:a,visibleColumnCount:l,columns:s,setCellSize:c,gridState:u})=>{const d=er.useRef([]),p=P3(c),f=er.useCallback(((t,r)=>{const n=Array.isArray(r)?r.slice(0,i):(e=>Array(e).fill(void 0))(i);return G3(t,o,n,s,e,p.current),d.current=n,n}),[i,o,s,e,p]),[m,h]=er.useState((()=>f(null!=n?n:[])));N2((()=>{h(f(null!=n?n:[]))}),[n]);const g=((e,t)=>{const r=er.useRef(new Set),n=er.useRef(new Set),o=er.useRef(new Set),i=P3(e),a=P3(t),l=er.useMemo((()=>({enqueue:e=>{const t=_3(e);o.current.has(t)||(r.current.add(e),o.current.add(t),1===r.current.size&&queueMicrotask((async()=>{const e=Array.from(r.current.values());if(0!==e.length){r.current.clear(),n.current.add(e);try{const t=await i.current(e);n.current.has(e)&&a.current(t)}catch(t){e.forEach((e=>{o.current.delete(_3(e))}))}finally{n.current.delete(e)}}})))},clear:()=>{r.current.clear(),n.current.clear(),o.current.clear()}})),[]);return l})((e=>t.getHyperCubeData("/qHyperCubeDef",e)),(e=>h((t=>f(e,t))))),v=er.useCallback(((e,t,r,n)=>{for(let o=e;o<e+r;o++)if(V3(d.current,o,t,n)){const e={qLeft:o,qTop:t,qHeight:n,qWidth:1};g.enqueue(e)}}),[d,g]),b=er.useCallback(((e,t,r,n)=>{for(let i=t;i<t+n;i++){const t=Math.max(0,i-o.page*o.rowsPerPage);if(U3(d.current,e,t,r,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:r};g.enqueue(t)}}}),[d,g,o]),y=r.name();return er.useEffect((()=>{const{qcx:t,qcy:r}=e.qHyperCube.qSize,n=u.current.overscanRowStartIndex,i=u.current.overscanColumnStartIndex,s=n+o.page*o.rowsPerPage,c=t-i,d=o.rowsPerPage-n,p=Math.min(100,c,t,l+5),f=Math.min(100,d,r,a+25);return b(i,s,p,f),()=>{g.clear()}}),[e,a,l,o,g,b,u,y]),{rowsInPage:m,loadRows:b,loadColumns:v}};let X3=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const K3=(e,t,r,n,o)=>{const i=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(i,Math.ceil(r.height/o)),l=er.useMemo((()=>n.reduce(((e,t)=>(e.width<r.width&&(e.width+=t,e.count+=1),e)),{count:0,width:0})),[r,n]).count;return{rowCount:i,visibleRowCount:a,visibleColumnCount:l}},Z3={enabled:!1},J3=()=>{},Q3={current:null};const e6=()=>{},t6=e=>e.preventDefault();const r6=({style:e})=>Nr.createElement("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var n6=Nr.memo(r6,D3);const o6=({columnIndex:e,rowIndex:t,style:r,data:n})=>{var o;const{rowsInPage:i,columns:a,bodyStyle:l,isHoverEnabled:c,maxLineCount:u}=n,d=r2(q2,(e=>e.hoverIndex===t)),p=r2(q2,(e=>e.setHoverIndex)),{constraints:f}=r2(q2,(e=>e.baseProps)),m=r2(q2,(e=>e.showRightBorder)),h=null===(o=i[t])||void 0===o?void 0:o[`col-${e}`],{handleMouseDown:g,handleMouseOver:v,handleMouseUp:b,cellSelectionState:y}=function(e){const{constraints:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.selectionDispatch)),n="object"==typeof e,o=r2(q2,(t=>n?R2(e,t.selectionState):s.INACTIVE)),i=!t.active&&!t.select;if(n&&i){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i}=U2(e,e6,t6,r);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(h);if("object"==typeof h){const n=((e,t,r,n,o)=>{const{hoverColors:i,lastRowBottomBorder:a,...l}=o,c=t.stylingIDs.length?e2(l,e.qAttrExps,t.stylingIDs):l;return n===s.SELECTED?{...c,...w1.SELECTED}:n===s.EXCLUDED?{...c,color:r?null==i?void 0:i.color:c.color,background:`${w1.EXCLUDED_BACKGROUND}, ${r?null==i?void 0:i.background:c.background}`}:r?{...c,...i}:c})(h,a[e],c&&d,y,l);return Nr.createElement("div",{className:`sn-table-cell ${y}`,style:{...r,...n,display:"flex",alignItems:"start",borderWidth:"0px",borderBottomWidth:h.isLastRow?"0px":"1px",borderRightWidth:h.isLastColumn&&!m?"0px":"1px",borderStyle:"solid",justifyContent:h.align,padding:"4px 12px",boxSizing:"border-box",cursor:"default"},onMouseDown:g,onMouseUp:b,onMouseOver:v,onMouseEnter:c?()=>p(t):void 0,onMouseLeave:c?()=>p(-1):void 0,title:f.passive?void 0:h.qText},Nr.createElement(i5,{wordBreak:!h.isNumeric,lines:u},h.qText))}return Nr.createElement(n6,{style:{...r,...l,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box"}})};var i6=Nr.memo(o6,D3);const a6=({columnIndex:e,data:t,rowIndex:r})=>{var n;const o=null===(n=t.rowsInPage[r])||void 0===n?void 0:n[`col-${e}`];return`${null==o?void 0:o.qElemNumber}-${null==o?void 0:o.qText}-${r}-${e}`},l6=({style:e,columnWidths:t,rowHeight:r,pageInfo:n,rowCount:o,gridRef:i,lineRef:a,columns:l,boldText:s,gridState:c})=>{var u;const d=er.useRef({lastScrollToRatio:0,resetAfterRowIndex:0,heights:[],totalHeight:0,count:0,measuredCells:new Map}),{layout:p,rect:f}=r2(q2,(e=>e.baseProps)),[m,h]=er.useState(r||24),{measureText:g,estimateLineCount:v}=_2(e.fontSize,e.fontFamily,s),b=parseInt(null!==(u=e.fontSize)&&void 0!==u?u:L1.fontSize,10)*W1,y=15e6/o-8-1,S=Math.max(0,Math.min(T2,Math.round(y/b))),x=er.useCallback(((e,r,n)=>{const o=l?((e,t)=>{let r=e-M1;return r-=t.isLocked?24:0,r})(t[r],l[r]):(e=>e-24-1)(t[r]),i=Math.min(S,v({text:e.trim(),maxWidth:o,isNumeric:n}));return Math.max(1,i)*b+8+1}),[t,b,S,l,v]),C=er.useCallback(((e,t,r,n=!1,o=!1)=>{const i=`${t}-${r}`;if(d.current.measuredCells.has(i))return;d.current.measuredCells.set(i,[e,t,r,n]);const a=x(e,r,n),l=d.current.heights[t],s=a-l;s>0?(d.current.totalHeight+=s,d.current.heights[t]=a):void 0===l&&(d.current.count+=1,d.current.totalHeight+=a,d.current.heights[t]=a),o||h(d.current.totalHeight/d.current.count)}),[x]),w=er.useCallback((e=>{var t;return null!==(t=d.current.heights[e])&&void 0!==t?t:m}),[d,m]),E=er.useCallback((()=>{d.current.lastScrollToRatio=0,d.current.resetAfterRowIndex=0,d.current.heights=[],d.current.totalHeight=0,d.current.count=0,d.current.measuredCells.clear()}),[d]),R=P3(C),k=er.useCallback((()=>{const e=new Map(d.current.measuredCells);E(),e.forEach((([e,t,r,n])=>{R.current(e,t,r,n,!0)})),h(d.current.totalHeight/d.current.count)}),[E,R]);N2((()=>{E()}),[p,n]),N2((()=>{k()}),[g,f.width]);return null!=i&&i.current?i.current.resetAfterRowIndex(d.current.resetAfterRowIndex,!1):null!=a&&a.current&&a.current.resetAfterIndex(d.current.resetAfterRowIndex,!1),{setCellSize:C,getRowHeight:w,rowMeta:d,estimatedRowHeight:m,maxLineCount:S,resizeVisibleCells:e=>{if(!c)return;E();const{overscanRowStartIndex:t,overscanRowStopIndex:r}=c.current,n=Math.min(r,p.qHyperCube.qSize.qcy-1);for(let r=t;r<=n;r++){var o;const t=null!==(o=e[r])&&void 0!==o?o:{};Object.values(t).forEach((e=>{var t;"object"==typeof e&&C(null!==(t=e.qText)&&void 0!==t?t:"",r,e.pageColIdx,e.isNumeric)}))}},resizeAllCells:k,resetRowMeta:E}},s6=er.forwardRef(((e,t)=>{var r,n,o;const{rect:i,columns:a,innerForwardRef:l,pageInfo:s,bodyStyle:u,rowHeight:d,headerAndTotalsHeight:p,syncHeight:f}=e,{layout:m,model:h,theme:g}=r2(q2,(e=>e.baseProps)),v=r2(q2,(e=>e.columnWidths)),b=r2(q2,(e=>e.initialDataPages)),y=er.useRef(null),S=er.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=!(null===(r=m.components)||void 0===r||null===(n=r[0])||void 0===n||null===(o=n.content)||void 0===o||!o.hoverEffect),{scrollHandler:C,verticalScrollDirection:w,horizontalScrollDirection:E}=(()=>{const e=er.useRef(0),t=er.useRef(0),r=er.useRef(X3.None),n=er.useRef(X3.None);return{scrollHandler:er.useCallback((({scrollTop:o,scrollLeft:i})=>{o>t.current?r.current=X3.Down:o<t.current?r.current=X3.Up:r.current=X3.None,i>e.current?n.current=X3.Right:i<e.current?n.current=X3.Left:n.current=X3.None,t.current=o,e.current=i}),[t,e,r,n]),verticalScrollDirection:r,horizontalScrollDirection:n}})(),{rowCount:R,visibleRowCount:k,visibleColumnCount:O}=K3(m,s,i,v,d),{setCellSize:L,getRowHeight:M,rowMeta:A,estimatedRowHeight:I,maxLineCount:T,resizeVisibleCells:D}=l6({pageInfo:s,style:u,rowHeight:d,columnWidths:v,gridRef:y,rowCount:R,gridState:S}),{rowsInPage:P,loadRows:_,loadColumns:N}=Y3({layout:m,model:h,theme:g,initialDataPages:b,pageInfo:s,rowCount:R,visibleRowCount:k,visibleColumnCount:O,columns:a,setCellSize:L,gridState:S}),$=(({layout:e,loadRows:t,loadColumns:r,verticalScrollDirection:n,horizontalScrollDirection:o,rowCount:i,pageInfo:a,gridState:l})=>er.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:c,overscanRowStartIndex:u,overscanRowStopIndex:d})=>{if(l.current.overscanColumnStartIndex=s,l.current.overscanColumnStopIndex=c,l.current.overscanRowStartIndex=u,l.current.overscanRowStopIndex=d,u>i)return;const p=s,f=u+a.page*a.rowsPerPage,m=c-s+1,h=d-u+1;if(n.current===X3.Down){const e=h+25;t(p,f,m,u+e>i?i-u:e)}else if(n.current===X3.Up){const e=h+25,r=a.page*a.rowsPerPage,n=Math.max(r,f-25);t(p,n,m,e)}if(o.current===X3.Right){const t=e.qHyperCube.qSize.qcx-p,n=m+5,o=Math.min(t,n);r(p,f,o,h)}else if(o.current===X3.Left){const t=Math.max(0,p-5),n=Math.min(e.qHyperCube.qSize.qcx,m+5);r(t,f,n,h)}}),[a,t,r,n,o,i,e.qHyperCube.qSize,l]))({layout:m,loadRows:_,loadColumns:N,verticalScrollDirection:w,horizontalScrollDirection:E,rowCount:R,pageInfo:s,gridState:S}),z=er.useMemo((()=>({rowsInPage:P,columns:a,bodyStyle:u,isHoverEnabled:x,maxLineCount:T})),[P,a,u,x,T]),q=((e,t,r,n)=>{let{height:o}=e;return o-=t,r*n<o&&(o=Math.min(r*n,o)),o})(i,p,R,I);return er.useLayoutEffect((()=>{var e,t;f(null!==(e=null===(t=l.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!0)}),[R,f,l]),er.useLayoutEffect((()=>{var e,t,r;(f(null!==(e=null===(t=l.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!1),1===A.current.lastScrollToRatio)&&(null===(r=y.current)||void 0===r||r.scrollToItem({rowIndex:R-1,align:"start"}))})),function(e){const{selectionsAPI:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.selectionDispatch));er.useEffect((()=>{r({type:c.UPDATE_PAGE_ROWS,payload:{pageRows:e}})}),[r,e]),s5({selectionsAPI:t,selectionDispatch:r,setShouldRefocus:J3,keyboard:Z3,tableWrapperRef:Q3})}(P),N2((()=>{var e;null===(e=y.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[m,s,g.name(),i.width]),er.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{var r,n;const o=(null!==(r=null===(n=l.current)||void 0===n?void 0:n.clientHeight)&&void 0!==r?r:q)-q,i=Math.round(o*e);var a,s,c;(A.current.lastScrollToRatio=e,1===A.current.lastScrollToRatio)?(null===(a=y.current)||void 0===a||a.scrollToItem({rowIndex:R-1,align:"start"}),null===(s=y.current)||void 0===s||s.scrollTo({scrollLeft:t})):null===(c=y.current)||void 0===c||c.scrollTo({scrollTop:i,scrollLeft:t})},resizeCells:()=>{var e;null===(e=y.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),D(P)}})),[l,q,A,R,D,P]),Nr.createElement(S3,{"data-key":"body",ref:y,innerRef:l,style:{overflow:"hidden"},columnCount:m.qHyperCube.qSize.qcx,columnWidth:e=>v[e],height:q,rowCount:R,rowHeight:M,estimatedRowHeight:I,width:i.width,itemData:z,onItemsRendered:$,onScroll:C,itemKey:a6},i6)}));var c6=er.memo(s6);const u6=({width:e,height:t,children:r})=>Nr.createElement("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t}},r),d6=({index:e,style:t,data:r})=>{const{columns:n,headerStyle:{...o},columResizeHandler:i}=r,{layout:a,constraints:l}=r2(q2,(e=>e.baseProps)),s=r2(q2,(e=>e.showRightBorder)),c=r2(q2,(e=>e.baseProps.selectionsAPI.isModal())),u=n[e],d=n.length-1===e,p=a.qHyperCube.qEffectiveInterColumnSortOrder[0]===u.colIdx,f=!l.active&&!c,m="right"===u.headTextAlign?"row-reverse":"row";return Nr.createElement("div",{className:"sn-table-cell",title:l.passive?void 0:u.label,style:{...t,...o,display:"flex",alignItems:"flex-end",borderStyle:"solid",borderWidth:d&&!s?"0px 0px 1px 0px":"0px 1px 1px 0px",padding:"4px",justifyContent:u.headTextAlign,boxSizing:"border-box",cursor:"default",zIndex:n.length-e,flexDirection:m,userSelect:"none"}},Nr.createElement(y4,{column:u,isActive:p,isInteractionEnabled:f},Nr.createElement(i5,{wordBreak:!0,lines:3},u.label)),Nr.createElement(S4,{column:u,isLastColumn:d,onColumnResize:i}))},p6=(e,t,r,n,o)=>{er.useLayoutEffect((()=>{var t;null==e||null===(t=e.current)||void 0===t||t.resetAfterIndex(0,!0)}),[t,r,e,n,o])},f6=e=>{const{rect:t,forwardRef:r,columns:n,pageInfo:o,headerStyle:i,rowHeight:a,columResizeHandler:l}=e,{layout:s,theme:c}=r2(q2,(e=>e.baseProps)),u=r2(q2,(e=>e.columnWidths));return p6(r,s,o,u,c.name()),Nr.createElement(M3,{ref:r,layout:"horizontal",style:{overflow:"hidden",boxSizing:"border-box"},itemCount:s.qHyperCube.qSize.qcx,itemSize:e=>u[e],height:a,width:t.width,itemData:{columns:n,headerStyle:i,columResizeHandler:l}},d6)};var m6=er.memo(f6);const h6=({index:e,style:t,data:r})=>{const{layout:n,constraints:o}=r2(q2,(e=>e.baseProps)),i=r2(q2,(e=>e.showRightBorder)),{totalsStyle:{hoverColors:a,...l},columns:s,totals:c}=r,u=s[e].totalInfo,{totalsTextAlign:d}=s[e],p=n.qHyperCube.qSize.qcx-1===e;return Nr.createElement("div",{className:"sn-table-cell",title:o.passive?void 0:u,style:{...t,...l,display:"flex",alignItems:c.atTop?"end":"start",borderStyle:"solid",borderLeftWidth:"0px",borderRightWidth:p&&!i?"0px":"1px",borderTopWidth:c.atBottom?"1px":"0px",borderBottomWidth:c.atTop?"1px":"0px",padding:"4px 12px",justifyContent:d,boxSizing:"border-box",cursor:"default",fontWeight:"600"}},Nr.createElement(i5,{wordBreak:!N3(u),lines:3},u))},g6=e=>{const{rect:t,forwardRef:r,pageInfo:n,totals:o,rowHeight:i,columns:a}=e,{layout:l,styling:s,theme:c}=r2(q2,(e=>e.baseProps)),u=r2(q2,(e=>e.columnWidths));return p6(r,l,n,u,c.name()),Nr.createElement(M3,{ref:r,layout:"horizontal",style:{overflow:"hidden",boxSizing:"border-box"},itemCount:l.qHyperCube.qSize.qcx,itemSize:e=>u[e],height:i,width:t.width,itemData:{totalsStyle:s.totals,columns:a,totals:o}},h6)};var v6=er.memo(g6);const b6=Nr.forwardRef(((e,t)=>{const{children:r,width:n,height:o,onScroll:i}=e,{constraints:a}=r2(q2,(e=>e.baseProps));return Nr.createElement("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.active?"hidden":"auto",width:n,height:o},onScroll:i},r)})),y6=({children:e,rect:t})=>Nr.createElement("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"0px",width:t.width,height:t.height}},e),S6=({columns:e,columnWidths:t,pageInfo:r,headerRef:n,totalsRef:o,totalsPosition:i})=>{const{styling:a}=r2(q2,(e=>e.baseProps)),l=l6({style:a.head,columnWidths:t,lineRef:n,rowCount:1,pageInfo:r,boldText:!0,columns:e}),s=l6({style:a.totals,columnWidths:t,lineRef:o,rowCount:1,pageInfo:r,boldText:!0});e.forEach(((e,t)=>{l.setCellSize(e.label,0,t),s.setCellSize(e.totalInfo,0,t,N3(e.totalInfo))}));const c=l.getRowHeight(0)+8,u=s.getRowHeight(0);return{headerRowHeight:c,totalsRowHeight:u,bodyRowHeight:(({fontSize:e=L1.fontSize})=>Math.max(24,H1(e)))(a.body),headerAndTotalsHeight:i.atTop||i.atBottom?c+u:c,resizeAllHeaderCells:l.resizeAllCells,resizeAllTotalCells:s.resizeAllCells}},x6=e=>{const{pageInfo:t}=e,{totalsPosition:r,columns:n,paginationNeeded:o}=r2(q2,(e=>e.tableData)),{layout:i,theme:a,styling:l,rect:s}=r2(q2,(e=>e.baseProps)),c=r2(q2,(e=>e.columnWidths)),u=r2(q2,(e=>e.setYScrollbarWidth)),d=er.useRef(null),p=er.useRef(null),f=er.useRef(null),m=er.useRef(null),h=er.useRef(),{xScrollbarWidth:g,yScrollbarWidth:v}=Y4(d),b=er.useMemo((()=>{var e;return{...l.body,background:null!==(e=a.background.color)&&void 0!==e?e:"transparent"}}),[i,a.name()]),{headerRowHeight:y,totalsRowHeight:S,bodyRowHeight:x,headerAndTotalsHeight:C,resizeAllHeaderCells:w,resizeAllTotalCells:E}=S6({columns:n,columnWidths:c,pageInfo:t,totalsPosition:r,headerRef:p,totalsRef:f}),R=er.useMemo((()=>((e,t)=>{const r=e.height-(t?41:0);return{width:e.width,height:r}})(s,o)),[s,o]),k=er.useMemo((()=>((e,t,r)=>({width:e.width-r,height:e.height-t}))(R,g,v)),[R,g,v]),{rowCount:O}=K3(i,t,k,c,x),[L,M]=er.useState(O*x+C),A=c.reduce(((e,t)=>e+t),0),I=((e,t,r)=>er.useCallback((n=>{var o,i,a;const{scrollHeight:l,clientHeight:s,scrollTop:c,scrollLeft:u}=n.currentTarget,d=Math.max(0,Math.min(1,c/(l-s)));null===(o=r.current)||void 0===o||o.interpolatedScrollTo(Number.isNaN(d)?0:d,u),null===(i=e.current)||void 0===i||i.scrollTo(u),null===(a=t.current)||void 0===a||a.scrollTo(u)}),[e,t,r]))(p,f,m),T=er.useCallback(((e,t=!1)=>{const r=e+C;(L<k.height&&r>k.height||t)&&M(r)}),[L,C,k.height]),D=er.useCallback((()=>{var e;d.current&&(d.current.scrollTop=0),null===(e=m.current)||void 0===e||e.resizeCells(),w(),E()}),[d,w,E]);er.useLayoutEffect((()=>{d.current&&(d.current.scrollLeft=0,d.current.scrollTop=0)}),[n.length]);const P=a.name();er.useLayoutEffect((()=>{d.current&&(d.current.scrollTop=0)}),[t,O,P]),U4((()=>{u(v)}),[v]);const _=Nr.createElement(v6,{rect:k,pageInfo:t,columns:n,forwardRef:f,totals:r,rowHeight:S});return Nr.createElement(b6,{ref:d,width:R.width,height:R.height,onScroll:I},Nr.createElement(u6,{width:A,height:L},Nr.createElement(y6,{rect:k},Nr.createElement(m6,{headerStyle:l.head,rect:k,pageInfo:t,columns:n,forwardRef:p,rowHeight:y,columResizeHandler:D}),r.atTop?_:null,Nr.createElement(c6,{ref:m,innerForwardRef:h,bodyStyle:b,rect:k,pageInfo:t,columns:n,rowHeight:x,headerAndTotalsHeight:C,syncHeight:T}),r.atBottom?_:null)))};var C6=er.memo(x6);const w6=()=>{const{theme:e}=r2(q2,(e=>e.baseProps)),{paginationNeeded:t}=r2(q2,(e=>e.tableData)),r=r2(q2,(e=>e.pageInfo)),n=r2(q2,(e=>e.setPage));return Nr.createElement(r5,{"data-testid":"sn-table",background:e.background,dir:"ltr"},Nr.createElement(C6,{pageInfo:r}),t&&Nr.createElement(L4,null,Nr.createElement(H4,{handleChangePage:e=>n(e),isSelectionMode:!1,pageInfo:r,setPageInfo:()=>{},announce:()=>{}})))};var E6=er.memo(w6);function R6(e,t){const{app:r,model:n,direction:o,selectionsAPI:i,layout:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,tableData:h,rect:g,...v}=e,b=J4(o);null==t||t.render(Nr.createElement(Xh,{stylisPlugins:"rtl"===o?[Yx]:void 0},Nr.createElement(Ty,{theme:b},Nr.createElement(B2,{app:r,model:n,tableData:h,selectionsAPI:i,layout:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,rect:g},Nr.createElement(Z4,v)))))}const k6=t=>{const r=e.useMemo((()=>Hf(t)),[t]);return e.useEffect((()=>()=>r.unmount()),[r]),r},O6=(t,r)=>e.useMemo((()=>((e,t)=>{if(e)return async r=>{const{isDim:n,colIdx:o,qReverseSort:i}=r,a=n?o:o-t,l=(await e.getEffectiveProperties()).qHyperCubeDef.qInterColumnSortOrder,s=[];o!==l[0]?(l.splice(l.indexOf(o),1),l.unshift(o),s.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${l.join(",")}]`})):s.push({qPath:`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${a}/qDef/qReverseSort`,qOp:"Replace",qValue:(!i).toString()}),e.applyPatches(s,!0)}})(t,r.qDimensionInfo.length)),[t,r.qDimensionInfo.length]),L6=(e,t)=>{const 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"),l=e.getStyle("object","straightTableV2","backgroundColor"),s=a||n||l,c=function(e){if(void 0===e)return!1;const t=j1(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}(s);return{tableColorFromTheme:a||"inherit",color:s,isDark:B1(c?i:s),isTransparent:c}},M6=t=>{const r=e.useTheme();return e.useMemo((()=>({...r,background:L6(r,t)})),[r.name(),t])};const A6=({model:t,layout:r,shouldRender:n,page:o})=>{const[i]=e.usePromise((async()=>{if(n&&t)return(async(e,t,r)=>{let{qDataPages:n}=t.qHyperCube;if(0!==r||void 0===n||0===n.length){const o=r*Math.min(I2,t.qHyperCube.qSize.qcy);n=await e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:o,qWidth:50,qHeight:100}])}return{initialDataPages:n,derivedFrom:{layout:t,page:r}}})(t,r,o)}),[t,r,o]),a=(null==i?void 0:i.derivedFrom.layout)!==r||(null==i?void 0:i.derivedFrom.page)!==o;return{initialDataPages:null==i?void 0:i.initialDataPages,isLoading:a}},I6=({app:t,layout:r,model:n,rect:o,theme:i,keyboard:a,translator:l,constraints:s,selectionsAPI:c,changeSortOrder:u,rootElement:d,embed:p,reactRoot:f,applyColumnWidths:m,isFontLoaded:h})=>{const g=!1===r.usePagination,v=e.useMemo((()=>function(e,t){const r=F3(e),n=H3(e),o=e.qHyperCube.qSize.qcy,i=Math.min(I2,o),a=o>I2&&!t.active;return{totalsPosition:r,columns:n,rows:[],totalRowCount:o,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(o/i),paginationNeeded:a}}(r,s)),[r,s]),{pageInfo:b,setPage:y}=((t,r)=>{const[n,o]=e.useState(0),i=Math.min(I2,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:n,rowsPerPage:i,rowsPerPageOptions:[]})),[i,n]);if(r){const e=Math.floor(t.qHyperCube.qSize.qcy/I2);e<n&&o(e)}return{pageInfo:a,setPage:o}})(r,g),{initialDataPages:S,isLoading:x}=A6({model:n,layout:r,page:b.page,shouldRender:g});e.useEffect((()=>{g&&n&&u&&S&&!x&&h&&function(e,t){const{app:r,selectionsAPI:n,layout:o,model:i,translator:a,constraints:l,theme:s,keyboard:c,rect:u,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,setPage:g,pageInfo:v,initialDataPages:b}=e,y=J4("ltr");t.render(Nr.createElement(Nr.StrictMode,null,Nr.createElement(Ty,{theme:y},Nr.createElement(B2,{app:r,selectionsAPI:n,layout:o,model:i,translator:a,constraints:l,theme:s,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,rect:u,setPage:g,pageInfo:v,initialDataPages:b},Nr.createElement(E6,null)))))}({app:t,layout:r,model:n,rect:o,theme:i,keyboard:a,translator:l,constraints:s,selectionsAPI:c,rootElement:d,embed:p,changeSortOrder:u,tableData:v,applyColumnWidths:m,setPage:y,pageInfo:b,initialDataPages:S},f)}),[t,r,n,o,i.name(),a.active,l,s,c,u,g,d,p,f,v,m,y,b,x,S,h])};var T6={SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um in den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerungen zu wechseln. Alle Angaben zur Tastaturnavigation finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate in table cells and tab to move to pagination controls. For the full range of keyboard navigation, see the documentation.","es-ES":"Use las teclas de flecha para navegar en las celdas de la tabla y la pestaña para moverse a los controles de paginación. Para conocer la gama completa de navegación con teclado, consulte la documentación.","fr-FR":"Utilisez les touches fléchées pour parcourir les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Pour connaître la gamme complète des commandes de navigation au clavier, voir la documentation.","it-IT":"Utilizzare i tasti freccia per navigare nelle celle della tabella e il tasto TAB per passare ai controlli di paginazione. Per informazioni complete sulla navigazione da tastiera, vedere la documentazione.","ja-JP":"矢印キーで表のセル内を移動し、タブ キーでページネーション コントロールに移動します。キーボード ナビゲーションの全範囲については、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 테이블 셀을 탐색하고 탭을 사용하여 페이지 매김 컨트롤로 이동합니다. 전체 키보드 탐색 범위는 설명서를 참조하십시오.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren in tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Raadpleeg de documentatie voor een volledig overzicht van de toetsenbordnavigatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się po komórkach tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Pełne informacje o nawigacji przy użyciu klawiatury zawiera dokumentacja.","pt-BR":"Use as setas para navegar nas células da tabela e Tab para mover para os controles de paginação. Para toda a gama de navegação do teclado, consulte a documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения по ячейкам таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Полный перечень возможностей навигации с помощью клавиатуры см. в документации.","sv-SE":"Använd piltangenterna för att navigera i tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Se dokumentationen för komplett information om tangentbordsnavigering.","tr-TR":"Tablo hücrelerinde gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Tam kapsamlı klavye gezintisi için belgelere bakın.","zh-CN":"使用箭头键在表格单元格中导航,使用 tab 键移动到分页控件。有关键盘导航的完整范围,请参阅文档。","zh-TW":"使用方向鍵以在表格儲存格中導覽,並使用 Tab 以前往分頁控制。如需完整的鍵盤導覽,請參閱文件。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}},SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"en-US":"Ascending"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"en-US":"Descending"}}};var D6=function(e){return e.FIRST="first-announcer-element",e.SECOND="second-announcer-element",e}(D6||{});const P6=(t,r)=>e.useMemo((()=>(function(e){if(e&&e.get&&e.add){const t="SNTable.Accessibility.RowsAndColumns";if(e.get(t)!==t)return;Object.keys(T6).forEach((t=>{e.add(T6[t])}))}}(r),()=>((e,t,r)=>{let n=r||null;return({keys:r,shouldBeAtomic:o=!0,politeness:i="polite"})=>{const a=r.map((e=>{if(Array.isArray(e)){const[r,...n]=e;return t.get(r,n)}return t.get(e)})).join(" "),l=e.querySelector("#sn-table-announcer--01"),s=e.querySelector("#sn-table-announcer--02");let c;n===D6.FIRST?(c=s,n=D6.SECOND):(c=l,n=D6.FIRST),c.innerHTML=c.innerHTML.endsWith(" ­")?a:`${a} ­`,c.setAttribute("aria-atomic",o.toString()),c.setAttribute("aria-live",i)}})(t,r))),[t,r.language()]),_6={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},N6=({env:t,app:r,model:n,rootElement:o,layout:i,constraints:a,translator:l,selectionsAPI:s,theme:c,changeSortOrder:u,keyboard:d,rect:p,embed:f,reactRoot:m,applyColumnWidths:h,isFontLoaded:g})=>{const v=!t.carbon&&!1!==i.usePagination,{direction:b,footerContainer:y}=e.useOptions(),S=P6(o,l),[x,C]=e.useState(_6),[w]=e.usePromise((async()=>v?async function(e,t,r,n){const{page:o,rowsPerPage:i,rowsPerPageOptions:a}=r,l=t.qHyperCube.qSize.qcx,s=t.qHyperCube.qSize.qcy,c=Math.ceil(s/i),u=o*i,d=Math.min(i,s-u);if(o>0&&u>=s&&r)return n({...r,page:0}),null;if(d*l>z3&&r)return n({...r,rowsPerPage:q3(l,a),page:0}),null;const p=s>10,f=F3(t),m=H3(t),h=(await e.getHyperCubeData("/qHyperCubeDef",[{qTop:u,qLeft:0,qHeight:d,qWidth:l}]))[0].qMatrix.map(((e,t)=>{const r={id:`row-${t}`};return m.forEach(((n,o)=>{r[n.id]={...e[o],align:W3(e[o],n.bodyTextAlign),rowIdx:t+u,colIdx:n.colIdx,pageRowIdx:t,pageColIdx:o,selectionColIdx:n.selectionColIdx,isSelectable:n.isDim&&!n.isLocked,isLastRow:t===d-1}})),r}));return{totalColumnCount:l,totalRowCount:s,totalPages:c,paginationNeeded:p,totalsPosition:f,columns:m,rows:h}}(n,i,x,C):null),[i,x,n,a,v]);e.useEffect((()=>{v&&m&&n&&r&&i&&w&&u&&c&&s&&g&&f&&R6({app:r,model:n,rootElement:o,layout:i,tableData:w,direction:b,pageInfo:x,setPageInfo:C,constraints:a,translator:l,selectionsAPI:s,theme:c,changeSortOrder:u,keyboard:d,rect:p,footerContainer:y,announce:S,embed:f,applyColumnWidths:h},m)}),[r,n,m,w,a,b,c.name(),d.active,S,u,h,v,i,s,f,o,x,C,l,p,y,g])},$6=({env:t,rootElement:r,model:n,theme:o,selectionsAPI:i,app:a,rect:l,layout:s,changeSortOrder:c,translator:u})=>{e.useEffect((()=>{t.carbon&&c&&o&&i&&R6({env:t,rootElement:r,model:n,theme:o,selectionsAPI:i,app:a,rect:l,layout:s,changeSortOrder:c})}),[s,n,null==i?void 0:i.isModal(),o,u.language(),a,c])},z6=(t,r)=>e.useMemo((()=>((e,t)=>(r,{isDim:n,colIdx:o})=>{const i=n?o:o-t.qDimensionInfo.length,a=`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,l=t[n?"qDimensionInfo":"qMeasureInfo"][i].columnWidth,s=l?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...l,...r})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(r)};null==e||e.applyPatches([s],!0)})(t,r)),[t,r]),q6=(t,r)=>{const{fontSize:n,fontFamily:o}=Z1(r,t,!1),{fontSize:i,fontFamily:a}=J1(r,t),[l,s]=e.usePromise((async()=>(await document.fonts.load(`600 ${n} ${o}`),await document.fonts.load(`${i} ${a}`),!0)),[n,o,i,a]);return s?(console.warn("Failed to load font:",s),!0):!!l};return function(t){return{qae:{properties:{initial:r},data:n()},ext:Kt(t),component(){const r=e.useElement(),n=k6(r),o=e.useStaleLayout(),i=e.useApp(),a=e.useModel(),l=e.useConstraints(),s=e.useTranslator(),c=e.useSelections(),u=e.useKeyboard(),d=e.useRect(),p=e.useEmbed(),f=M6(r),m=O6(a,o.qHyperCube),h=z6(a,o.qHyperCube),g=q6(f,o);null===e.onContextMenu||void 0===e.onContextMenu||e.onContextMenu(((e,t)=>{t.target&&t.target.closest(".sn-table-cell")&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{Y2(t)}})})),I6({app:i,layout:o,model:a,rect:d,theme:f,keyboard:u,translator:s,constraints:l,selectionsAPI:c,changeSortOrder:m,rootElement:r,embed:p,reactRoot:n,applyColumnWidths:h,isFontLoaded:g}),N6({env:t,app:i,model:a,rootElement:r,layout:o,constraints:l,translator:s,selectionsAPI:c,theme:f,changeSortOrder:m,keyboard:u,rect:d,embed:p,reactRoot:n,applyColumnWidths:h,isFontLoaded:g}),$6({env:t,rootElement:r,model:a,theme:f,selectionsAPI:c,app:i,rect:d,layout:o,changeSortOrder:m,translator:s})}}}}));
261
+ var $0=Object.freeze({__proto__:null,Accordion:q_,AccordionActions:U_,AccordionDetails:Z_,AccordionSummary:RN,Alert:VN,AlertTitle:a$,AppBar:f$,Autocomplete:yz,Avatar:Lz,AvatarGroup:Nz,Backdrop:Vz,Badge:Qz,BottomNavigation:iq,BottomNavigationAction:pq,Box:mq,Breadcrumbs:Lq,Button:zq,ButtonBase:vN,ButtonGroup:Hq,Card:Kq,CardActionArea:nF,CardActions:cF,CardContent:hF,CardHeader:EF,CardMedia:TF,Checkbox:KF,Chip:T$,CircularProgress:pj,ClickAwayListener:cC,Collapse:k_,Container:mj,CssBaseline:function(e){const t=vx({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:n=!1}=t;return Nb.jsxs(er.Fragment,{children:[Nb.jsx(N$,{styles:e=>bj(e,n)}),r]})},Dialog:_j,DialogActions:jj,DialogContent:Xj,DialogContentText:tB,DialogTitle:iB,Divider:pB,Drawer:MB,Experimental_CssVarsProvider:Nx,Fab:_B,Fade:Fz,FilledInput:FB,FormControl:VB,FormControlLabel:JB,FormGroup:oW,FormHelperText:dW,FormLabel:bW,FormLabelRoot:hW,GlobalStyles:N$,Grid:AW,Grow:jW,Hidden:function(e){const{implementation:t="js",lgDown:r=!1,lgUp:n=!1,mdDown:o=!1,mdUp:i=!1,smDown:a=!1,smUp:l=!1,xlDown:s=!1,xlUp:c=!1,xsDown:u=!1,xsUp:d=!1}=e,p=gv(e,nH);return"js"===t?Nb.jsx(ZW,hv({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:l,xlDown:s,xlUp:c,xsDown:u,xsUp:d},p)):Nb.jsx(rH,hv({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:l,xlDown:s,xlUp:c,xsDown:u,xsUp:d},p))},Icon:cH,IconButton:DN,ImageList:gH,ImageListItem:CH,ImageListItemBar:TH,Input:$H,InputAdornment:HH,InputBase:Y$,InputLabel:KH,LinearProgress:gU,Link:EU,List:IU,ListItem:ZU,ListItemAvatar:nV,ListItemButton:qU,ListItemIcon:cV,ListItemSecondaryAction:UU,ListItemText:hV,ListSubheader:w$,Menu:UV,MenuItem:ZV,MenuList:CV,MobileStepper:aG,Modal:Rj,ModalManager:Yw,NativeSelect:xG,NoSsr:tE,OutlinedInput:AG,Pagination:QG,PaginationItem:GG,Paper:T_,Popover:PV,Popper:v$,Portal:Pw,Radio:hY,RadioGroup:bY,Rating:NY,ScopedCssBaseline:BY,Select:aX,Skeleton:yX,Slide:gB,Slider:_X,SliderMark:IX,SliderMarkLabel:TX,SliderRail:OX,SliderRoot:kX,SliderThumb:MX,SliderTrack:LX,SliderValueLabel:AX,Snackbar:KX,SnackbarContent:WX,SpeedDial:dK,SpeedDialAction:IK,SpeedDialIcon:zK,Stack:FK,Step:ZK,StepButton:CZ,StepConnector:MZ,StepContent:NZ,StepContext:UK,StepIcon:lZ,StepLabel:gZ,Stepper:WZ,StepperContext:WK,StyledEngineProvider:vv,SvgIcon:ZP,SwipeableDrawer:nJ,Switch:pJ,Tab:bJ,TabScrollButton:QQ,Table:BE,TableBody:OJ,TableCell:DJ,TableContainer:PE,TableFooter:jJ,TableHead:XJ,TablePagination:MQ,TableRow:NQ,TableSortLabel:HQ,Tabs:f0,TextField:S0,TextareaAutosize:xE,ThemeProvider:Ty,ToggleButton:k0,ToggleButtonGroup:D0,Toolbar:cQ,Tooltip:wK,Typography:e$,Unstable_Grid2:TW,Unstable_TrapFocus:fC,Zoom:eK,accordionActionsClasses:j_,accordionClasses:__,accordionDetailsClasses:G_,accordionSummaryClasses:yN,adaptV4Theme:LS,alertClasses:ON,alertTitleClasses:r$,alpha:Cy,appBarClasses:s$,ariaHidden:Ww,autocompleteClasses:iz,avatarClasses:Cz,avatarGroupClasses:Az,backdropClasses:Bz,badgeClasses:Yz,bottomNavigationActionClasses:lq,bottomNavigationClasses:tq,breadcrumbsClasses:xq,buttonBaseClasses:fN,buttonClasses:Aq,buttonGroupClasses:Fq,capitalize:Dg,cardActionAreaClasses:Jq,cardActionsClasses:iF,cardClasses:Vq,cardContentClasses:dF,cardHeaderClasses:vF,cardMediaClasses:kF,checkboxClasses:WF,chipClasses:k$,circularProgressClasses:JF,collapseClasses:S_,colors:UP,containerClasses:hj,createChainedFunction:Pg,createFilterOptions:wE,createMuiTheme:ax,createStyles:cx,createSvgIcon:JP,createTheme:ix,css:ig,darkScrollbar:function(e=yj){return{scrollbarColor:`${e.thumb} ${e.track}`,"&::-webkit-scrollbar, & *::-webkit-scrollbar":{backgroundColor:e.track},"&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb":{borderRadius:8,backgroundColor:e.thumb,minHeight:24,border:`3px solid ${e.track}`},"&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active":{backgroundColor:e.active},"&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover":{backgroundColor:e.active},"&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner":{backgroundColor:e.track}}},darken:Ey,debounce:_g,decomposeColor:hy,deprecatedPropType:function(e,t){return()=>null},dialogActionsClasses:$j,dialogClasses:Oj,dialogContentClasses:Wj,dialogContentTextClasses:Zj,dialogTitleClasses:Uj,dividerClasses:lB,drawerClasses:bB,duration:QS,easing:JS,emphasize:Ly,experimentalStyled:Sx,experimental_extendTheme:Dx,experimental_sx:qx,fabClasses:IB,filledInputClasses:ez,formControlClasses:BB,formControlLabelClasses:YB,formGroupClasses:eW,formHelperTextClasses:lW,formLabelClasses:fW,generateUtilityClass:fv,generateUtilityClasses:mv,getAccordionActionsUtilityClass:F_,getAccordionDetailsUtilityClass:V_,getAccordionSummaryUtilityClass:bN,getAccordionUtilityClass:P_,getAlertTitleUtilityClass:t$,getAlertUtilityClass:kN,getAppBarUtilityClass:l$,getAutocompleteUtilityClass:rz,getAvatarGroupUtilityClass:Mz,getAvatarUtilityClass:xz,getBackdropUtilityClass:jz,getBadgeUtilityClass:Gz,getBottomNavigationActionUtilityClass:aq,getBottomNavigationUtilityClass:eq,getBreadcrumbsUtilityClass:Sq,getButtonBaseUtilityClass:pN,getButtonGroupUtilityClass:qq,getButtonUtilityClass:Mq,getCardActionAreaUtilityClass:Zq,getCardActionsUtilityClass:oF,getCardContentUtilityClass:uF,getCardHeaderUtilityClass:gF,getCardMediaUtilityClass:RF,getCardUtilityClass:Uq,getCheckboxUtilityClass:BF,getChipUtilityClass:R$,getCircularProgressUtilityClass:ZF,getCollapseUtilityClass:y_,getContainerUtilityClass:function(e){return fv("MuiContainer",e)},getContrastRatio:xy,getDialogActionsUtilityClass:Nj,getDialogContentTextUtilityClass:Kj,getDialogContentUtilityClass:Bj,getDialogTitleUtilityClass:Hj,getDialogUtilityClass:kj,getDividerUtilityClass:aB,getDrawerUtilityClass:vB,getFabUtilityClass:AB,getFilledInputUtilityClass:Q$,getFormControlLabelUtilityClasses:GB,getFormControlUtilityClasses:jB,getFormGroupUtilityClass:QB,getFormHelperTextUtilityClasses:iW,getFormLabelUtilityClasses:pW,getGrid2UtilityClass:function(e){return fv("MuiGrid2",e)},getGridUtilityClass:SW,getIconButtonUtilityClass:LN,getIconUtilityClass:oH,getImageListItemBarUtilityClass:wH,getImageListItemUtilityClass:vH,getImageListUtilityClass:uH,getInitColorSchemeScript:zx,getInputAdornmentUtilityClass:zH,getInputBaseUtilityClass:q$,getInputLabelUtilityClasses:UH,getInputUtilityClass:X$,getLinearProgressUtilityClass:ZH,getLinkUtilityClass:vU,getListItemAvatarUtilityClass:JU,getListItemButtonUtilityClass:PU,getListItemIconUtilityClass:oV,getListItemSecondaryActionClassesUtilityClass:FU,getListItemTextUtilityClass:uV,getListItemUtilityClass:TU,getListSubheaderUtilityClass:b$,getListUtilityClass:kU,getLuminance:Sy,getMenuItemUtilityClass:VV,getMenuUtilityClass:_V,getMobileStepperUtilityClass:JV,getModalUtilityClass:Xw,getNativeSelectUtilityClasses:lG,getOffsetLeft:LV,getOffsetTop:OV,getOutlinedInputUtilityClass:Z$,getOverlayAlpha:Rx,getPaginationItemUtilityClass:_G,getPaginationUtilityClass:IG,getPaperUtilityClass:O_,getPopoverUtilityClass:wV,getRadioUtilityClass:sY,getRatingUtilityClass:xY,getScopedCssBaselineUtilityClass:$Y,getSelectUtilityClasses:WY,getSkeletonUtilityClass:lX,getSliderUtilityClass:xX,getSnackbarContentUtilityClass:NX,getSnackbarUtilityClass:HX,getSpeedDialActionUtilityClass:EK,getSpeedDialIconUtilityClass:DK,getSpeedDialUtilityClass:tK,getStepButtonUtilityClass:vZ,getStepConnectorUtilityClass:wZ,getStepContentUtilityClass:AZ,getStepIconUtilityClass:eZ,getStepLabelUtilityClass:sZ,getStepUtilityClass:VK,getStepperUtilityClass:$Z,getSvgIconUtilityClass:VP,getSwitchUtilityClass:oJ,getTabScrollButtonUtilityClass:YQ,getTabUtilityClass:fJ,getTableBodyUtilityClass:SJ,getTableCellUtilityClass:LJ,getTableContainerUtilityClass:ME,getTableFooterUtilityClass:PJ,getTableHeadUtilityClass:BJ,getTablePaginationUtilityClass:hQ,getTableRowUtilityClass:AQ,getTableSortLabelUtilityClass:zQ,getTableUtilityClass:NE,getTabsUtilityClass:e0,getTextFieldUtilityClass:m0,getToggleButtonGroupUtilityClass:L0,getToggleButtonUtilityClass:x0,getToolbarUtilityClass:KJ,getTooltipUtilityClass:pK,getTouchRippleUtilityClass:function(e){return fv("MuiTouchRipple",e)},getTypographyUtilityClass:GN,grid2Classes:_W,gridClasses:wW,hexToRgb:my,hslToRgb:yy,iconButtonClasses:MN,iconClasses:iH,imageListClasses:dH,imageListItemBarClasses:EH,imageListItemClasses:bH,inputAdornmentClasses:FH,inputBaseClasses:F$,inputClasses:K$,inputLabelClasses:VH,isMuiElement:Ng,keyframes:xg,lighten:ky,linearProgressClasses:JH,linkClasses:bU,listClasses:OU,listItemAvatarClasses:QU,listItemButtonClasses:_U,listItemClasses:DU,listItemIconClasses:iV,listItemSecondaryActionClasses:jU,listItemTextClasses:dV,listSubheaderClasses:y$,makeStyles:xx,menuClasses:NV,menuItemClasses:GV,mobileStepperClasses:QV,modalClasses:xj,modalUnstyledClasses:Kw,nativeSelectClasses:sG,outlinedInputClasses:J$,ownerDocument:$g,ownerWindow:zg,paginationClasses:TG,paginationItemClasses:NG,paperClasses:L_,popoverClasses:EV,private_createTypography:US,private_excludeVariablesFromRoot:Px,radioClasses:cY,ratingClasses:CY,recomposeColor:vy,requirePropFactory:function(e,t){return()=>null},responsiveFontSizes:mx,rgbToHex:by,scopedCssBaselineClasses:zY,selectClasses:UY,setRef:qg,shouldSkipGeneratingVar:Ex,skeletonClasses:sX,sliderClasses:CX,snackbarClasses:UX,snackbarContentClasses:$X,speedDialActionClasses:RK,speedDialClasses:rK,speedDialIconClasses:PK,stackClasses:jK,stepButtonClasses:bZ,stepClasses:GK,stepConnectorClasses:EZ,stepContentClasses:IZ,stepIconClasses:rZ,stepLabelClasses:cZ,stepperClasses:zZ,styled:Sx,svgIconClasses:GP,switchClasses:iJ,tabClasses:mJ,tabScrollButtonClasses:XQ,tableBodyClasses:xJ,tableCellClasses:MJ,tableClasses:$E,tableContainerClasses:AE,tableFooterClasses:_J,tableHeadClasses:WJ,tablePaginationClasses:vQ,tableRowClasses:IQ,tableSortLabelClasses:qQ,tabsClasses:t0,textFieldClasses:h0,toggleButtonClasses:C0,toggleButtonGroupClasses:M0,toolbarClasses:ZJ,tooltipClasses:fK,touchRippleClasses:J_,typographyClasses:YN,unstable_ClassNameGenerator:QP,unstable_composeClasses:cv,unstable_createMuiStrictModeTheme:lx,unstable_getUnit:dx,unstable_toUnitless:px,unstable_useEnhancedEffect:Fg,unstable_useId:Wg,unsupportedProp:function(e,t,r,n,o){return null},useAutocomplete:LE,useColorScheme:$x,useControlled:Hg,useEventCallback:Ug,useForkRef:Vg,useFormControl:_$,useIsFocusVisible:tv,useMediaQuery:UW,usePagination:PG,useRadioGroup:lY,useScrollTrigger:function(e={}){const{getTrigger:t=_0,target:r=N0}=e,n=gv(e,P0),o=er.useRef(),[i,a]=er.useState((()=>t(o,n)));return er.useEffect((()=>{const e=()=>{a(t(o,hv({target:r},n)))};return e(),r.addEventListener("scroll",e,{passive:!0}),()=>{r.removeEventListener("scroll",e,{passive:!0})}}),[r,t,JSON.stringify(n)]),i},useStepContext:function(){return er.useContext(HK)},useStepperContext:function(){return er.useContext(BK)},useTheme:gx,useThemeProps:vx,withStyles:Cx,withTheme:wx}),z0=er,q0=i($0),F0=WD,j0=rP,B0=iP,W0=sP,H0=dP,U0=mP,V0=vP,G0=sM,Y0=tI;const X0={MuiAccordion:{styleOverrides:{root:{backgroundColor:G0.COLORS.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:G0.COLORS.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:z0.createElement(F0.SvgArrowDown,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${G0.COLORS.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`,borderRadius:G0.SIZES.BORDER_RADIUS,backgroundColor:G0.COLORS.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${G0.COLORS.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:G0.COLORS.WHITE,color:G0.COLORS.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:G0.SIZES.BORDER_RADIUS},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:G0.COLORS.GREYSCALE_0_15,backgroundColor:G0.COLORS.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${G0.COLORS.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:G0.COLORS.GREEN_PALE},"&:active":{backgroundColor:G0.COLORS.GREEN_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:G0.COLORS.BLUE_PALE},"&:active":{backgroundColor:G0.COLORS.BLUE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:G0.SIZES.BORDER_RADIUS,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:G0.COLORS.GREYSCALE_0_15,backgroundColor:G0.COLORS.GREYSCALE_100_60,"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${G0.COLORS.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:G0.COLORS.PURPLE,"&.Mui-focusVisible":{borderColor:G0.COLORS.PURPLE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:G0.COLORS.GREEN,"&.Mui-focusVisible":{borderColor:G0.COLORS.GREEN,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:G0.COLORS.BLUE,"&.Mui-focusVisible":{borderColor:G0.COLORS.BLUE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:G0.COLORS.ORANGE,"&.Mui-focusVisible":{borderColor:G0.COLORS.ORANGE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:G0.COLORS.RED,"&.Mui-focusVisible":{borderColor:G0.COLORS.RED,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:G0.COLORS.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:G0.COLORS.PURPLE_PALE},"&:active":{backgroundColor:G0.COLORS.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.PURPLE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:G0.COLORS.GREEN_PALE},"&:active":{backgroundColor:G0.COLORS.GREEN_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:G0.COLORS.BLUE_PALE},"&:active":{backgroundColor:G0.COLORS.BLUE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:G0.COLORS.ORANGE_PALE},"&:active":{backgroundColor:G0.COLORS.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.ORANGE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:G0.COLORS.RED_PALE},"&:active":{backgroundColor:G0.COLORS.RED_DARK},"&.Mui-focusVisible":{borderColor:G0.COLORS.RED_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:G0.COLORS.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:G0.COLORS.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`inset 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:z0.createElement(F0.SvgClose,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:G0.SIZES.TEXT_SMALL,borderRadius:G0.SIZES.BORDER_RADIUS,color:G0.COLORS.TEXT_PRIMARY,backgroundColor:G0.COLORS.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{backgroundColor:G0.COLORS.GREYSCALE_0_05,color:G0.COLORS.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:G0.COLORS.GREEN,borderColor:G0.COLORS.GREEN},"&.MuiChip-outlinedInfo":{color:G0.COLORS.BLUE,borderColor:G0.COLORS.BLUE},"&.MuiChip-outlinedWarning":{color:G0.COLORS.ORANGE,borderColor:G0.COLORS.ORANGE},"&.MuiChip-outlinedError":{color:G0.COLORS.RED,borderColor:G0.COLORS.RED}},outlined:{border:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`,backgroundColor:G0.COLORS.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:"none",backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:G0.COLORS.GREEN,borderColor:G0.COLORS.GREEN},outlinedSecondary:{color:G0.COLORS.BLUE,borderColor:G0.COLORS.BLUE},label:{fontFamily:G0.VARIOUS.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:z0.createElement(F0.SvgClose,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:z0.createElement(F0.SvgArrowDown,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:G0.SIZES.BORDER_RADIUS},listbox:{paddingTop:0,paddingBottom:0},option:{height:"48px",'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:G0.COLORS.GREYSCALE_95,"&.Mui-focused":{backgroundColor:G0.COLORS.GREYSCALE_0_10}}},endAdornment:{top:"auto",bottom:"4px",right:"4px !important",position:"absolute"},popupIndicator:{borderRadius:G0.SIZES.BORDER_RADIUS,border:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`,color:G0.COLORS.GREYSCALE_0_60,marginRight:0,width:G0.SIZES.TEXT_EXTRA_LARGE,height:G0.SIZES.TEXT_EXTRA_LARGE},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${G0.COLORS.GREYSCALE_0_15}`},clearIndicator:{borderRadius:G0.SIZES.BORDER_RADIUS,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:G0.COLORS.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:G0.SIZES.TEXT_MEDIUM}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:G0.SIZES.TEXT_SMALL,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:G0.COLORS.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:G0.COLORS.GREYSCALE_25,fontSize:G0.SIZES.TEXT_SMALL,fontFamily:G0.VARIOUS.FONT_FAMILY,fontWeight:G0.WEIGHTS.MEDIUM,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:G0.COLORS.TEXT_PRIMARY},"&.Mui-error":{color:G0.COLORS.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:G0.COLORS.TEXT_SECONDARY,content:"'(optional)'",fontWeight:G0.WEIGHTS.REGULAR,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:G0.COLORS.TEXT_SECONDARY,content:"'(required)'",fontWeight:G0.WEIGHTS.REGULAR,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:"14px",lineHeight:"16px",backgroundColor:G0.COLORS.WHITE,borderRadius:G0.SIZES.BORDER_RADIUS,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.GREYSCALE_0_05}`,borderColor:G0.COLORS.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${G0.COLORS.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${G0.COLORS.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.RED}`,boxShadow:`0px 0px 0px 1px ${G0.COLORS.RED}, inset 0 2px 0 0 ${G0.COLORS.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${G0.COLORS.GREYSCALE_0_10}`,borderColor:G0.COLORS.GREYSCALE_0_10,backgroundColor:G0.COLORS.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:G0.COLORS.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:G0.COLORS.GREYSCALE_0_15,borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`inset 0 2px 0 0 ${G0.COLORS.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>z0.createElement(F0.SvgArrowDown,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{borderRadius:"3px !important",minHeight:"1em","& em":{color:G0.COLORS.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:G0.COLORS.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03},"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&:focus":{backgroundColor:G0.COLORS.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${G0.COLORS.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:G0.COLORS.GREYSCALE_0_30,"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_0,borderColor:G0.COLORS.GREYSCALE_0_15},"& ~svg":{color:G0.COLORS.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:G0.COLORS.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:G0.COLORS.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{input:{fontSize:G0.SIZES.TEXT_MEDIUM,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:G0.SIZES.TEXT_SMALL,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:G0.SIZES.TEXT_SMALL,fontWeight:G0.WEIGHTS.MEDIUM,color:G0.COLORS.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:G0.WEIGHTS.MEDIUM}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"}}}},MuiRadio:{defaultProps:{size:"small",icon:z0.createElement(H0,null),checkedIcon:z0.createElement(U0,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:G0.COLORS.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:G0.COLORS.GREYSCALE_0_20}},"&.Mui-disabled":{fill:G0.COLORS.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:z0.createElement(j0,null),checkedIcon:z0.createElement(B0,null),indeterminateIcon:z0.createElement(W0,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:G0.SIZES.BORDER_RADIUS},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:G0.COLORS.WHITE}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:G0.COLORS.GREYSCALE_0_25}},"&.MuiCheckbox-indeterminate":{color:G0.COLORS.GREYSCALE_55}},colorPrimary:{"&.sprout-focus-visible i":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible i":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"8px",backgroundColor:G0.COLORS.GREYSCALE_98,borderTop:`1px ${G0.COLORS.GREYSCALE_0_15} solid`}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",height:"24px",padding:"12px 8px 12px 24px",fontSize:"16px",lineHeight:"24px",backgroundColor:G0.COLORS.GREYSCALE_98,borderBottom:`1px ${G0.COLORS.GREYSCALE_0_15} solid`}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:G0.COLORS.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:G0.COLORS.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:G0.SIZES.TEXT_MEDIUM,color:G0.COLORS.TEXT_PRIMARY,lineHeight:"16px",fontWeight:G0.WEIGHTS.MEDIUM},secondary:{fontSize:G0.SIZES.TEXT_SMALL,color:G0.COLORS.GREYSCALE_45,fontWeight:G0.WEIGHTS.REGULAR,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{height:"48px"},gutters:{paddingLeft:"12px",paddingRight:"12px"},button:{"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03},"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_05}}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:G0.COLORS.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:G0.SIZES.TEXT_SMALL,borderBottom:`solid 1px ${G0.COLORS.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:G0.SIZES.TEXT_MEDIUM,color:G0.COLORS.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:G0.COLORS.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:`url('${Y0.tickUrl}')`,fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:G0.COLORS.RED}}},"&.Mui-focusVisible":{backgroundColor:G0.COLORS.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:G0.COLORS.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:G0.COLORS.GREEN,height:"24px","&.Mui-disabled":{color:G0.COLORS.GREYSCALE_0_15}},rail:{backgroundColor:G0.COLORS.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${G0.COLORS.GREYSCALE_0_05}`,borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`inset 0px 0px 0px 1px ${G0.COLORS.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${G0.COLORS.GREYSCALE_0_05}`,borderRadius:G0.SIZES.BORDER_RADIUS},thumb:{height:"16px",width:"16px",borderRadius:G0.SIZES.BORDER_RADIUS,backgroundColor:G0.COLORS.WHITE,boxShadow:`0px 1px 2px 0px ${G0.COLORS.GREYSCALE_0_15}, 0px 0px 0px 1px ${G0.COLORS.GREYSCALE_0_05}`,"&:hover":{borderRadius:G0.SIZES.BORDER_RADIUS,boxShadow:`0 2px 4px 0 ${G0.COLORS.GREYSCALE_0_30}, 0 0 0 1px ${G0.COLORS.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${G0.COLORS.GREYSCALE_0_15}, 0 0 0 1px ${G0.COLORS.GREYSCALE_0_06}, 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${G0.COLORS.GREYSCALE_0_15}, 0 0 0 1px ${G0.COLORS.GREYSCALE_0_06}, 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:G0.COLORS.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:G0.COLORS.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:G0.COLORS.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:G0.COLORS.GREYSCALE_0_15},markLabel:{color:G0.COLORS.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:G0.COLORS.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:G0.COLORS.WHITE,color:G0.COLORS.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:G0.COLORS.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:G0.COLORS.GREEN_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:G0.COLORS.BLUE_PALE,boxShadow:`0 0 0 3px ${q0.alpha(G0.COLORS.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:G0.COLORS.GREYSCALE_0_15,borderRadius:G0.SIZES.BORDER_RADIUS},thumb:{height:"16px",width:"16px",borderRadius:G0.SIZES.BORDER_RADIUS,backgroundColor:G0.COLORS.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:G0.SIZES.TEXT_MEDIUM,fontWeight:G0.WEIGHTS.MEDIUM,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${G0.COLORS.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${G0.COLORS.MISC_FOCUS_BORDER}`,backgroundColor:G0.COLORS.GREYSCALE_0_03,borderRadius:G0.SIZES.BORDER_RADIUS},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:G0.COLORS.GREYSCALE_25,"&.Mui-selected":{color:G0.COLORS.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:G0.SIZES.TEXT_MEDIUM,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{height:"100%",marginLeft:2,marginRight:2},indicator:{height:2},vertical:{borderRight:`1px solid ${G0.COLORS.GREYSCALE_0_15}`,"& .MuiTab-root":{"&:hover":{borderBottomColor:"transparent",boxShadow:`2px 0px 0px ${G0.COLORS.GREYSCALE_80}`}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${G0.COLORS.GREYSCALE_85}`,borderRight:`1px solid ${G0.COLORS.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:G0.WEIGHTS.MEDIUM,backgroundColor:G0.COLORS.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:G0.COLORS.GREYSCALE_98,borderBottom:`1px solid ${G0.COLORS.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${G0.COLORS.GREYSCALE_85}`,borderTop:`1px solid ${G0.COLORS.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:G0.COLORS.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:G0.COLORS.GREYSCALE_0_05,"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03}},"&&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>z0.createElement(V0,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${G0.COLORS.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:16,width:32,fontSize:G0.SIZES.TEXT_MEDIUM,borderRadius:G0.SIZES.BORDER_RADIUS,padding:"7px 16px",border:`1px solid ${G0.COLORS.GREYSCALE_0_15}`,backgroundColor:G0.COLORS.GREYSCALE_100_60,color:G0.COLORS.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:G0.COLORS.GREYSCALE_0_10,border:`1px solid ${G0.COLORS.GREYSCALE_0_30}`},"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_03,border:`1px solid ${G0.COLORS.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:G0.COLORS.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${G0.COLORS.MISC_FOCUS_BORDER}`,border:`1px solid ${G0.COLORS.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:G0.COLORS.GREYSCALE_25,backgroundColor:G0.COLORS.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:G0.COLORS.GREYSCALE_0_10,border:`1px solid ${G0.COLORS.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:G0.SIZES.TEXT_SMALL,height:24,width:24,padding:7},sizeLarge:{fontSize:G0.SIZES.TEXT_LARGE,height:40,width:40,lineHeight:20}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:G0.SIZES.TEXT_MEDIUM,borderRadius:G0.SIZES.BORDER_RADIUS}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:G0.COLORS.GREYSCALE_20},tooltip:{backgroundColor:G0.COLORS.GREYSCALE_20,fontSize:G0.SIZES.TEXT_SMALL,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};var K0=X0,Z0=e=>K0,J0=sM;var Q0={mode:"light",primary:{light:J0.COLORS.GREEN_PALE,main:J0.COLORS.GREEN,dark:J0.COLORS.GREEN_DARK,contrastText:J0.COLORS.WHITE},secondary:{light:J0.COLORS.BLUE_PALE,main:J0.COLORS.BLUE,dark:J0.COLORS.BLUE_DARK,contrastText:J0.COLORS.WHITE},error:{light:J0.COLORS.RED_PALE,main:J0.COLORS.RED,dark:J0.COLORS.RED_DARK,contrastText:J0.COLORS.WHITE},warning:{light:J0.COLORS.ORANGE_PALE,main:J0.COLORS.ORANGE,dark:J0.COLORS.ORANGE_DARK,contrastText:J0.COLORS.WHITE},success:{light:J0.COLORS.GREEN_PALE,main:J0.COLORS.GREEN,dark:J0.COLORS.GREEN_DARK,contrastText:J0.COLORS.WHITE},info:{light:J0.COLORS.BLUE_PALE,main:J0.COLORS.BLUE,dark:J0.COLORS.BLUE_DARK,contrastText:J0.COLORS.WHITE},text:{primary:J0.COLORS.TEXT_PRIMARY,secondary:J0.COLORS.TEXT_SECONDARY,disabled:J0.COLORS.GREYSCALE_0_30},action:{hover:J0.COLORS.GREYSCALE_0_03,hoverOpacity:.05,selected:J0.COLORS.GREYSCALE_0_05},amethyst:{main:J0.COLORS.PURPLE,light:J0.COLORS.PURPLE_PALE,dark:J0.COLORS.PURPLE_DARK,contrastText:J0.COLORS.WHITE},background:{paper:J0.COLORS.WHITE,default:J0.COLORS.GREYSCALE_95},divider:J0.COLORS.GREYSCALE_0_15};var e1=Z0,t1=e=>Q0,r1=sM;var n1=e=>({components:e1(e),palette:t1(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:r1.SIZES.TEXT_MEDIUM,fontWeightLight:r1.WEIGHTS.LIGHT,fontWeightRegular:r1.WEIGHTS.REGULAR,fontWeightMedium:r1.WEIGHTS.MEDIUM,fontWeightBold:r1.WEIGHTS.BOLD,htmlFontSize:r1.SIZES.TEXT_MEDIUM,fontFamily:r1.VARIOUS.FONT_FAMILY,button:{fontWeight:r1.WEIGHTS.MEDIUM,fontSize:r1.SIZES.TEXT_MEDIUM,textTransform:"none"},body1:{fontSize:r1.SIZES.TEXT_LARGE,lineHeight:"24px"},body2:{fontSize:r1.SIZES.TEXT_MEDIUM,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:r1.SIZES.TEXT_EXTRA_LARGE,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:r1.SIZES.TEXT_LARGE,fontWeight:r1.WEIGHTS.MEDIUM,lineHeight:"16px"},h6:{fontSize:r1.SIZES.TEXT_MEDIUM,fontWeight:r1.WEIGHTS.MEDIUM,lineHeight:"16px"},caption:{color:r1.COLORS.TEXT_SECONDARY},subtitle1:{fontSize:r1.SIZES.TEXT_MEDIUM,color:r1.COLORS.TEXT_SECONDARY},subtitle2:{fontSize:r1.SIZES.TEXT_SMALL,color:r1.COLORS.TEXT_SECONDARY}},shape:{borderRadius:r1.SIZES.BORDER_RADIUS}}),o1={},i1=sM;const a1={...i1.GREYSCALE,MISC_FOCUS_BORDER:i1.COLORS.MISC_FOCUS_BORDER};o1.COLORS=a1;var l1={},s1=WE,c1=aM,u1=TP,d1=n1,p1=o1;const f1=(e="light")=>s1.createTheme(d1(e)),m1=(e="light")=>c1.createTheme(u1(e)),h1=(e="light")=>d1(e),g1=(e="light")=>u1(e);var v1=Object.freeze({__proto__:null,COLORS:p1.COLORS,createTheme:m1,createThemeOptions:g1,createV5Theme:f1,createV5ThemeOptions:h1});l1.createTheme=m1,l1.createThemeOptions=g1,l1.createV5Theme=f1,l1.createV5ThemeOptions=h1,l1.themeModule=v1;var b1=l1,y1=o1.COLORS,S1=b1.createV5ThemeOptions;const x1=S1().palette,C1={TEXT:x1.text.primary,DISABLED:x1.text.disabled,HOVER:x1.action.hover,WHITE:y1.GREYSCALE_100,BORDER_LIGHT:y1.GREYSCALE_90,BORDER_MEDIUM:y1.GREYSCALE_85,BORDER_HEAVY:y1.GREYSCALE_50,DARK_MODE_TEXT:y1.GREYSCALE_95,DARK_MODE_BORDER:y1.GREYSCALE_95,DARK_MODE_DISABLED:y1.GREYSCALE_70,DARK_MODE_BACKGROUND:y1.GREYSCALE_20},w1={SELECTED:{color:y1.GREYSCALE_100,background:x1.primary.light,selectedCellClass:s.SELECTED},POSSIBLE:{color:x1.text.primary,background:y1.GREYSCALE_100},EXCLUDED_BACKGROUND:"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"},E1=4,R1=1,k1=4/3,O1="12px",L1={height:"auto",fontSize:O1,lineHeight:"unset",padding:`${E1}px`,borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},M1=70+R1,A1=Sx("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),I1=Sx(PE,{shouldForwardProp:e=>"fullHeight"!==e&&"constraints"!==e})((({fullHeight:e,constraints:t})=>({height:e?"100%":`calc(100% - ${40+R1}px)`,overflow:t.active?"hidden":"auto",border:"none"}))),T1=Sx(BE,{shouldForwardProp:e=>"showRightBorder"!==e&&"styling"!==e})((({showRightBorder:e,styling:t})=>({tableLayout:"fixed",width:"min-content",borderRight:e?`1px solid ${t.body.borderRightColor}`:void 0}))),D1=()=>Nr.createElement(Nr.Fragment,null,Nr.createElement(A1,{id:"sn-table-announcer--01","aria-live":"polite","aria-atomic":"true"}),Nr.createElement(A1,{id:"sn-table-announcer--02","aria-live":"polite","aria-atomic":"true"})),P1=Sx(OJ,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),_1=Sx(NQ,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e})((({hover:e,hoverColors:t})=>({"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),N1=Sx(DJ,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...L1,...e,padding:t.spacing(.5,1.5)}))),$1=Sx(DJ,{shouldForwardProp:e=>"atTop"!==e&&"headRowHeight"!==e&&"totalsStyle"!==e})((({totalsStyle:e,atTop:t,headRowHeight:r,theme:n})=>({...L1,...e,fontWeight:"600",position:"sticky",padding:n.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t&&r,bottom:!t&&0}))),z1={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}},q1=e=>parseInt(e.repeat(2/e.length),16),F1=e=>{const t=Math.floor((e.length-1)/3),r=((e,t)=>e.match(new RegExp(`.{${t}}`,"g")))(e.slice(1),t),[n,o,i,a]=r.map(q1);return void 0!==a?`rgba(${n},${o},${i},${a/255})`:`rgb(${n},${o},${i})`};function j1(e){let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${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),t)return`rgba(${t[1]},${t[2]},${t[3]},${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),t){const e=Math.round(+t[1]/2.55)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#(?:(?:[\da-f]{3}){1,2}|(?:[\da-f]{4}){1,2})$/i.exec(e),t)return F1(e);const r=e&&z1[e.toLowerCase()];return r?void 0!==r.a?`rgba(${r.r},${r.g},${r.b},${r.a})`:`rgb(${r.r},${r.g},${r.b})`:"none"}function B1(e){if(null==e)return!1;const t=j1(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}const W1=4/3,H1=e=>parseInt(e,10)*W1+8+1,U1=e=>!!e&&(null!==e.color||e.index>-1);function V1(e,t,r={}){const n=t.getColorPickerColor(r);return n&&"none"!==n?n:e}const G1=e=>B1(e)?C1.WHITE:C1.TEXT,Y1=(e,t)=>e?{borderBottomColor:C1.DARK_MODE_BORDER,borderRightColor:C1.DARK_MODE_BORDER,borderLeftColor:C1.DARK_MODE_BORDER,borderTopColor:C1.DARK_MODE_BORDER}:{borderLeftColor:C1.BORDER_MEDIUM,borderRightColor:C1.BORDER_MEDIUM,borderTopColor:C1.BORDER_HEAVY,borderBottomColor:t?C1.BORDER_HEAVY:C1.BORDER_LIGHT},X1=(e,t,r)=>{if(e&&t&&r){return H1(e)*(t+2)<r.clientHeight-40?"1px":"0px"}return"0px"},K1=(e,t,r,n=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),l={fontFamily:o,color:U1(null==r?void 0:r.fontColor)?V1(C1.TEXT,t,null==r?void 0:r.fontColor):i||C1.TEXT,fontSize:(null==r?void 0:r.fontSize)&&`${r.fontSize}px`||a,padding:r&&"padding"in r?null==r?void 0:r.padding:void 0,...Y1(t.background.isDark,n)};return Object.keys(l).forEach((e=>{const t=e;null==l[t]&&delete l[t]})),l};function Z1(e,t,r){var n,o,i;const a=null===(n=e.components)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.header,l=K1("header",t,a,r);return l.background=t.background.isTransparent?C1.WHITE:function(e){if(void 0!==e){const t=j1(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);if(r)return`rgb(${r[1]},${r[2]},${r[3]})`}return e}(t.background.color),l.color=null!==(i=l.color)&&void 0!==i?i:B1(l.background)?C1.DARK_MODE_TEXT:C1.TEXT,l}function J1(e,t,r,n){var o,i;const a=null===(o=e.components)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.content,l=K1("content",t,a);l.background=t.background.color;const s=X1(null==l?void 0:l.fontSize,r,n),c=null==a?void 0:a.hoverColor,u=null==a?void 0:a.hoverFontColor,d=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),p=t.getStyle("object","","straightTableV2.content.hover.color"),f=U1(u)||!!p,m=U1(c)||!!d,h=f||m;let g;g=U1(c)?V1(C1.HOVER,t,c):d||(f?"":C1.HOVER);const v=h?V1(G1(g),t,U1(u)?u:p):"";return{...l,lastRowBottomBorder:s,hoverColors:{background:g,color:v}}}const Q1=e=>e.isDark?{background:e.color,borderColor:C1.DARK_MODE_BORDER,color:C1.DARK_MODE_TEXT,disabledColor:C1.DARK_MODE_DISABLED,iconColor:C1.DARK_MODE_TEXT}:{background:e.color,borderColor:C1.BORDER_MEDIUM,color:C1.TEXT,disabledColor:C1.DISABLED};function e2(e,t,r){const n={};return null==t||t.qValues.forEach(((e,t)=>{const o=e.qText&&j1(e.qText);o&&"none"!==o&&(n[r[t]]=o)})),n.cellBackgroundColor&&!n.cellForegroundColor&&(n.cellForegroundColor=G1(n.cellBackgroundColor)),{...e,color:n.cellForegroundColor||e.color,background:n.cellBackgroundColor||e.background}}const t2=new Map;function r2(e,t){const r=function(e){return t2.get(e)}(e),[n,o]=er.useContext(r),[,i]=er.useReducer((e=>e+1),0),a=er.useRef(t),l=er.useRef(),s=n();if(void 0===s)throw new Error("You must call useContextSelector inside a valid context.");const c=er.useMemo((()=>t(s)),[s,t]);return er.useEffect((()=>{a.current=t,l.current=c}),[s,c,t]),er.useEffect((()=>{const e=e=>{(a.current&&a.current(e))!==l.current&&i()};return o.add(e),()=>{o.delete(e)}}),[o]),c}const n2=(e,t)=>{var r;return null===(r=e.getElementsByClassName("sn-table-row")[t[0]])||void 0===r?void 0:r.getElementsByClassName("sn-table-cell")[t[1]]},o2=e=>e.querySelector("td[tabindex='0'], th[tabindex='0']"),i2=e=>{const t=e.nextElementSibling;var r,n;return t?"HR"===t.tagName?i2(t):t:null===(r=e.parentElement)||void 0===r||null===(n=r.children)||void 0===n?void 0:n[0]},a2=e=>{const t=e.previousElementSibling;if(!t){var r,n,o,i;const t=null===(r=e.parentElement)||void 0===r||null===(n=r.children)||void 0===n?void 0:n.length;return null===(o=e.parentElement)||void 0===o||null===(i=o.children)||void 0===i?void 0:i[t-1]}return"HR"===t.tagName?a2(t):t},l2=e=>!e.enabled||e.active,s2=e=>{setTimeout((()=>{var t,r;const n=null===(t=e.current)||void 0===t||null===(r=t.closest(".sn-table-cell"))||void 0===r?void 0:r.querySelector("#adjuster-hit-area");null==n||n.setAttribute("tabIndex","0"),null==n||n.focus()}),0)},c2=e=>{var t;const r=e.target;r.setAttribute("tabIndex","-1");const n=null==r||null===(t=r.closest(".sn-table-cell"))||void 0===t?void 0:t.querySelector("#sn-table-head-menu-button");null==n||n.focus()},u2=({focusType:e,cell:t})=>{if(t)switch(e){case d.FOCUS:t.focus(),t.setAttribute("tabIndex","0");break;case d.FOCUS_BUTTON:t.querySelector(".sn-table-head-label").focus();break;case d.BLUR:t.blur(),t.setAttribute("tabIndex","-1");break;case d.ADD_TAB:t.setAttribute("tabIndex","0");break;case d.REMOVE_TAB:t.setAttribute("tabIndex","-1")}},d2=(e,t,r,n,o,i)=>{const a=((e,t,r,n={top:0,bottom:0})=>{const o=t.getElementsByClassName("sn-table-row").length,i=t.getElementsByClassName("sn-table-head-cell").length;let[a,l]=r;switch(e.key){case u.DOWN:a<o-1-n.bottom&&a++;break;case u.UP:a>n.top&&a--;break;case u.RIGHT:if(n.top>0)break;l<i-1?l++:a<o-1&&(a++,l=0);break;case u.LEFT:if(n.top>0)break;l>0?l--:a>0&&(a--,l=i-1)}return[a,l]})(e,t,r,i),l=n2(t,a);return u2({focusType:o,cell:l}),n(a),l},p2=(e,t)=>{let r=o2(e);const n=r?((e,t)=>{const r=e.getElementsByClassName("sn-table-head-cell").length,n=e.getElementsByClassName("sn-table-cell");let o=0;for(let e=0;e<n.length;e++)if(n[e]===t){o=e;break}return[Math.ceil(o/r),o%r]})(e,r):g;r=r||n2(e,g),u2({cell:r,focusType:d.FOCUS}),t(n)},f2=(e,t,r,n)=>{var o;(u2({focusType:d.REMOVE_TAB,cell:o2(t)}),r(e),n.enabled&&!n.active)?null===(o=n.focus)||void 0===o||o.call(n):u2({focusType:d.ADD_TAB,cell:n2(t,e)})},m2=({focusedCellCoord:e,rootElement:t,shouldRefocus:r,isSelectionMode:n,setFocusedCellCoord:o,keyboard:i,announce:a,totalsPosition:l})=>{u2({focusType:d.REMOVE_TAB,cell:o2(t)});const s=[l.atTop?2:1,e[1]],c=n?s:g;if(l2(i)){const e=r.current?d.FOCUS:d.ADD_TAB;r.current=!1;const o=n2(t,c);if(u2({focusType:e,cell:o}),n){var u;const e=null==o||null===(u=o.classList)||void 0===u?void 0:u.contains("selected");a({keys:[`${o.textContent},`,e?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.NotSelectedValue"]})}}o(c)},h2=(e,t,r)=>{var n,o,i;const a=null===(n=e.closest(".qv-object-wrapper"))||void 0===n||null===(o=n.querySelector(".sel-toolbar-confirm"))||void 0===o?void 0:o.parentElement;a?a.focus():null===(i=t.focusSelection)||void 0===i||i.call(t,r)},g2=e=>{e.stopPropagation(),e.preventDefault()},v2=e=>e.ctrlKey||e.metaKey,b2=e=>e.shiftKey&&v2(e),y2=e=>[u.LEFT,u.RIGHT,u.UP,u.DOWN].includes(e),S2=e=>e.shiftKey&&y2(e.key),x2=(e,t=!1)=>e.key===u.ESC&&!t||(e.key===u.LEFT||e.key===u.RIGHT)&&b2(e),C2=(e,t)=>{const r=t.key===u.UP&&1===e[0],n=t.key===u.LEFT&&1===e[0]&&0===e[1];return r||n?d.FOCUS_BUTTON:d.FOCUS},w2=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:l,isSelectionMode:s})=>{const p=l.atTop?2:1,f=[r.pageRowIdx+p,r.pageColIdx],m={top:s?p:0,bottom:s&&l.atBottom?1:0},h=C2(f,e);h===d.FOCUS&&u2({focusType:d.REMOVE_TAB,cell:e.target});const g=d2(e,t,f,i,h,m);e.key!==u.UP&&e.key!==u.DOWN||(e.key===u.UP&&((e,t)=>{const r=t.getElementsByClassName("sn-table-container")[0];if(null==r||!r.scrollTo)return;const[n,o]=e;if(n<2)r.scrollTo({top:0,behavior:"auto"});else{var i;const e=t.getElementsByClassName("sn-table-head-cell")[0],a=null===(i=t.getElementsByClassName("sn-table-row")[n])||void 0===i?void 0:i.getElementsByClassName("sn-table-cell")[o];if(!a)return;if(a.offsetTop-e.offsetHeight<r.scrollTop){const t=r.scrollTop-a.offsetHeight-e.offsetHeight;r.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})([r.pageRowIdx,r.pageColIdx],t),((e,t,r)=>t.shiftKey&&(t.key===u.UP&&0!==r.pageRowIdx||t.key===u.DOWN&&!r.isLastRow)&&e&&r.isSelectable)(o,e,r)?n({type:c.SELECT_MULTI_ADD,payload:{cell:r,evt:e,announce:a}}):((e,t,r)=>{r&&e(t.classList.contains("selected")?{keys:["SNTable.SelectionLabel.SelectedValue"]}:{keys:["SNTable.SelectionLabel.NotSelectedValue"]})})(a,g,s))},E2=({evt:e,rootElement:t,setFocusedCellCoord:r,keyboard:n,isSelectionMode:o,paginationNeeded:i})=>{if((null==n?void 0:n.enabled)&&o&&(e.shiftKey||!e.shiftKey&&!i))g2(e),h2(e.target,n,e.shiftKey);else if(e.shiftKey){r([0,t.querySelectorAll(".sn-table-head-cell").length-1])}},R2=(e,t)=>{const{colIdx:r,rows:n,api:o}=t;let i=s.INACTIVE;return o.isModal()&&(i=r!==e.selectionColIdx?s.EXCLUDED:void 0!==n[e.qElemNumber]?s.SELECTED:s.POSSIBLE),i},k2=(e,t,r)=>{const n=Object.keys(r).length,o=n>=Object.keys(t).length;if(n){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===n?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",n.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},O2=(e,t)=>{const{api:r,rows:n,colIdx:o}=e,{cell:i,announce:a,evt:l}=t;let s={};if(-1===o)r.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;s={...n}}return s=((e,t,r)=>{const{qElemNumber:n,rowIdx:o}=t;return r.ctrlKey||r.metaKey?{[n]:o}:(void 0!==e[n]?delete e[n]:e[n]=o,{...e})})(s,i,l),k2(a,n,s),Object.keys(s).length?(r.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(s),[i.selectionColIdx]]}),{...e,rows:s,colIdx:i.selectionColIdx}):(r.cancel(),{...e,rows:s,colIdx:-1})},L2=(e,t)=>{var r;const{api:n,rows:o,colIdx:i,pageRows:a,firstCell:l}=e,{cell:s,announce:c,evt:d}=t;let p={};return l||"key"in d&&S2(d)?(-1===i?n.begin(["/qHyperCubeDef"]):p={...o},p=((e,t,r,n,o)=>{const i={...t};if("key"in n&&S2(n)){i[r.qElemNumber]=r.rowIdx;const t=n.key===u.DOWN?1:-1;return i[e[r.pageRowIdx+t][`col-${r.pageColIdx}`].qElemNumber]=r.rowIdx+t,i}if(!o)return t;const a=Math.min(o.pageRowIdx,r.pageRowIdx),l=Math.max(o.pageRowIdx,r.pageRowIdx);for(let t=a;t<=l;t++){const r=e[t][`col-${o.pageColIdx}`];i[r.qElemNumber]=r.rowIdx}return i})(a,p,s,d,l),k2(c,o,p),{...e,rows:p,colIdx:null!==(r=null==l?void 0:l.selectionColIdx)&&void 0!==r?r:s.selectionColIdx,isSelectMultiValues:!0}):e},M2=e=>{const{api:t,rows:r,colIdx:n,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&t.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(r),[n]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},A2=(e,t)=>{switch(t.type){case c.SELECT:return O2(e,t.payload);case c.SELECT_MOUSE_DOWN:return((e,{cell:t,mouseupOutsideCallback:r})=>!r||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",r),{...e,firstCell:t,mouseupOutsideCallback:r}))(e,t.payload);case c.SELECT_MOUSE_UP:return((e,t)=>M2(e.isSelectMultiValues||e.firstCell!==t.cell?e:O2(e,t)))(e,t.payload);case c.SELECT_MULTI_ADD:return L2(e,t.payload);case c.SELECT_MULTI_END:return M2(e);case c.RESET:return e.api.isModal()?e:{...e,rows:{},colIdx:-1};case c.CLEAR:return Object.keys(e.rows).length?{...e,rows:{}}:e;case c.UPDATE_PAGE_ROWS:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},I2=25e4,T2=3,D2="N";function P2(e,t,r){let n=0,o=e.length;if(e.length<=1)return null;if(r(e)<=t)return null;for(;n<=o;){const i=Math.floor((n+o)/2),a=e.slice(0,i),l=e.slice(0,i-1),s=r(a),c=r(l);if(s>t&&c<=t)return e.slice(i-1)||null;if(s===t)return e.slice(i)||null;s<t?n=i+1:o=i}return null}function _2(e,t,r){const{estimateWidth:n,measureText:o,estimateLineCount:i}=er.useMemo((()=>{const n=document.createElement("canvas").getContext("2d");n.font=`${r?"600":""} ${e} ${t}`;const o=ct(n.measureText.bind(n)),i=e=>+o(e).width.toFixed(2),a=ct((({text:e,maxWidth:t,isNumeric:r=!1})=>{if(r)return 1;let n=0,o=e;do{n+=1,o=P2(o,t,i)}while(null!==o&&n<T2);return n}),(({text:e,maxWidth:t,isNumeric:r})=>`${e}-${t}-${r}`));return{measureText:e=>o(e).width,estimateWidth:e=>o(D2).width*e,estimateLineCount:a}}),[e,t,r]);return{estimateWidth:n,measureText:o,estimateLineCount:i}}function N2(e,t){const[r,n]=er.useState(t),o=r.some(((e,r)=>e!==t[r]));o&&(n(t),e())}const $2=(e,t,r)=>{if(null==e||!e.length)return[];const n=[],o=[];let i=t;if(e.forEach(((e,a)=>{if(e.columnWidth){const{columnWidth:{type:l,pixels:s,percentage:c},label:u,qApprMaxGlyphCount:d,totalInfo:p}=e;let h=0;const g=()=>{n[a]=Math.min(7680,Math.max(m,h)),i-=n[a]};switch(l){case f.PIXELS:h=s||200,g();break;case f.PERCENTAGE:h=(c||20)/100*t,g();break;case f.FIT_TO_CONTENT:h=r(u,p,d,e.isLocked),g();break;case f.AUTO:o.push(a);break;default:throw new Error(`${l} is not a valid column width type`)}}else o.push(a)})),o.length){const e=i/o.length;o.forEach((t=>{n[t]=Math.max(m,e)}))}return n},z2=(e,t,r,n)=>{const o=er.useMemo((()=>{const o=r.totalsPosition.atTop,i=J1(e,t,r.rows.length,n),a=Z1(e,t,!o),l=function(e,t,r){var n,o;const i=null===(n=e.components)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.content,a=K1("content",t,i),{borderBottomColor:l,borderTopColor:s,background:c}=Z1(e,t,r);return{...a,borderBottomColor:l,background:c,borderTopColor:s}}(e,t,o);return{body:i,head:a,totals:l}}),[e,t.name(),r,n]);return o},q2=er.createContext({}),F2=function(e){const t=er.createContext([()=>{},new Set]);return t2.set(e,t),({children:r,value:n})=>{const o=er.useRef(n),i=er.useRef(new Set);er.useEffect((()=>{o.current=n,i.current.forEach((e=>{e(n)}))}),[n]);const a=er.useCallback((()=>o.current),[o]),l=er.useMemo((()=>[a,i.current]),[o]);return Nr.createElement(e.Provider,{value:n},Nr.createElement(t.Provider,{value:l},r))}}(q2),j2={rows:[],columns:[],totalsPosition:{}},B2=({app:e,children:t,tableData:r=j2,selectionsAPI:n,cellCoordMock:o,layout:i,model:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,setPage:g,pageInfo:v,initialDataPages:b,rect:y})=>{const[S,x]=er.useState(0),[C,w]=er.useState(o||h),[E,R]=((e,t)=>{const[r,n]=er.useReducer(A2,{pageRows:e,rows:{},colIdx:-1,api:t,isSelectMultiValues:!1});return[r,n]})(r.rows,n),[k,O]=er.useState(-1),L=z2(i,c,r,d),[M,A,I,T]=((e,t,r,{head:n,body:o})=>{const i=t.atBottom||t.atTop,a=_2(n.fontSize,n.fontFamily,!0).measureText,l=_2(o.fontSize,o.fontFamily,!0).measureText,{estimateWidth:s}=_2(o.fontSize,o.fontFamily),c=er.useMemo((()=>(e,t,r,n)=>{const o=n?24+M1+4:M1;return Math.max(a(e)+o,i?l(t)+24+R1:0,s(r))}),[s,a,l,i]),[u,d]=er.useState(0),[p,f]=er.useState((()=>$2(e,r,c)));N2((()=>{f($2(e,r-u,c))}),[e,r,u,c]);const m=er.useMemo((()=>((e,t,r)=>!!(e&&e.length>0)&&e.reduce(((e,t)=>e+t))+t<r)(p,u,r)),[p,u,r]);return[p,f,d,m]})(r.columns,r.totalsPosition,y.width,L),D=er.useMemo((()=>({app:e,selectionsAPI:n,layout:i,model:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,styling:L,rect:y})),[e,n,i,a,l,s,c.name(),u.active,d,p,f,m,L,y]);return Nr.createElement(F2,{value:{headRowHeight:S,setHeadRowHeight:x,focusedCellCoord:C,setFocusedCellCoord:w,selectionState:E,selectionDispatch:R,hoverIndex:k,setHoverIndex:O,columnWidths:M,setColumnWidths:A,baseProps:D,tableData:r,setYScrollbarWidth:I,setPage:g,pageInfo:v,initialDataPages:b,showRightBorder:T}},t)},W2=(e,t,r,n,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,l=o.atTop?i+2:i+1;f2([l,a],t,r,n)},H2=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,keyboard:o,isInteractionEnabled:i})=>{var a;(e.preventDefault(),i)&&(n(r),o.enabled&&!o.active?null===(a=o.focus)||void 0===a||a.call(o):u2({focusType:d.FOCUS_BUTTON,cell:n2(t,r)}))},U2=(e,t,r,n)=>({handleMouseDown:t=>{if(null==r||r(t),e.isSelectable){const t=()=>n({type:c.SELECT_MULTI_END});n({type:c.SELECT_MOUSE_DOWN,payload:{cell:e,mouseupOutsideCallback:t}})}},handleMouseOver:r=>{1===r.buttons&&n({type:c.SELECT_MULTI_ADD,payload:{cell:e,evt:r,announce:t}})},handleMouseUp:r=>{0===r.button&&n({type:c.SELECT_MOUSE_UP,payload:{cell:e,evt:r,announce:t}})}});function V2(e){return t=>{const{cell:r,styling:n,announce:o,onMouseDown:i}=t,a=r2(q2,(e=>R2(r,e.selectionState))),l=r2(q2,(e=>e.selectionDispatch)),{handleMouseDown:c,handleMouseOver:u,handleMouseUp:d}=U2(r,o,i,l),p=function(e,t){let r={};switch(t){case s.SELECTED:r=w1.SELECTED;break;case s.POSSIBLE:r=w1.POSSIBLE;break;case s.EXCLUDED:r={background:`${w1.EXCLUDED_BACKGROUND}, ${e.background}`,selectedCellClass:s.EXCLUDED}}return{...e,...r}}(n,a);return Nr.createElement(e,Xx({},t,{styling:p,onMouseUp:d,onMouseDown:c,onMouseOver:u}))}}function G2(e,t){let r=(n=N1,e=>{const{styling:{selectedCellClass:t,...r},component:o,align:i,children:a,scope:l,tabIndex:s,onKeyDown:c,onMouseDown:u,onKeyUp:d,onMouseUp:p,onMouseOver:f,title:m}=e;return Nr.createElement(n,{cellStyle:r,component:o,scope:l,align:i,tabIndex:s,className:`sn-table-cell ${t||""}`,title:m,onKeyDown:c,onMouseDown:u,onKeyUp:d,onMouseUp:p,onMouseOver:f},a)});var n;return t&&(r=V2(r)),e&&(r=function(e){return t=>{const{cell:r,column:n,styling:o}=t,i=er.useMemo((()=>e2(o,r.qAttrExps,n.stylingIDs)),[o,r.qAttrExps,n.stylingIDs]);return Nr.createElement(e,Xx({},t,{styling:i}))}}(r)),r}const Y2=async e=>{var t;let r=e.target;r.classList.contains("sn-table-cell")||(r=r.closest(".sn-table-cell"));const n=null===(t=r.querySelector(".sn-table-cell-text"))||void 0===t?void 0:t.textContent;try{n&&await navigator.clipboard.writeText(String(n))}catch(e){console.log(e)}},X2=e=>{var t;const{key:r,target:n}=e,o=null!==(t=document.activeElement)&&void 0!==t?t:n;if(r===u.DOWN||r===u.UP){const t=e=>r===u.DOWN?i2(e):a2(e);g2(e);let n=t(o);for(;n;){if("true"!==n.ariaDisabled){n.focus();break}n=t(n)}}},K2=(e,t)=>{e.key===u.SHIFT&&t({type:c.SELECT_MULTI_END})},Z2=(e,t,r)=>{t&&e.key===u.TAB&&!e.shiftKey&&(g2(e),h2(e.target,r,!1))},J2=({evt:e,totalRowCount:t,page:r,rowsPerPage:n,handleChangePage:o,setShouldRefocus:i,keyboard:a,isSelectionMode:l})=>{if(b2(e)){g2(e);const a=Math.ceil(t/n)-1;e.key===u.RIGHT&&r<a?(i(),o(r+1)):e.key===u.LEFT&&r>0&&(i(),o(r-1))}else if(e.key===u.ESC&&a.enabled&&!l){var s;g2(e),null===(s=a.blur)||void 0===s||s.call(a,!0)}else y2(e.key)&&g2(e)},Q2=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,isInteractionEnabled:o})=>{var i;if(!o)return void g2(e);if(x2(e))return;const a=!(null!==(i=e.target.closest(".sn-table-cell"))&&void 0!==i&&i.nextSibling);switch(e.key){case u.LEFT:case u.RIGHT:g2(e),e.key===u.RIGHT&&a?p2(t,n):d2(e,t,r,n,d.FOCUS_BUTTON);break;case u.DOWN:g2(e),u2({focusType:d.REMOVE_TAB,cell:o2(t)}),d2(e,t,r,n,d.FOCUS);break;case u.TAB:((e,t,r,n,o)=>{const i=e.target.classList.contains("sn-table-head-label");i&&e.shiftKey&&r[1]>0?n([r[0],r[1]-1]):i||e.shiftKey||(o?(g2(e),p2(t,n)):n([r[0],r[1]+1]))})(e,t,r,n,a);break;case u.C:g2(e),v2(e)&&Y2(e)}},e5=(e,t,r,n,o)=>{if(o)g2(e);else if(!x2(e))switch(e.key){case u.LEFT:case u.RIGHT:case u.UP:case u.DOWN:{g2(e);const o=C2(r,e);o===d.FOCUS&&u2({focusType:d.REMOVE_TAB,cell:e.target}),d2(e,t,r,n,o);break}case u.TAB:E2({evt:e,rootElement:t,setFocusedCellCoord:n});break;case u.C:g2(e),v2(e)&&Y2(e);break;case u.SPACE:e.preventDefault()}},t5=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,keyboard:l,paginationNeeded:s,totalsPosition:d,selectionsAPI:p})=>{if(e.target.classList.contains("excluded"))return void g2(e);const f=p.isModal();if(!x2(e,f))switch(e.key){case u.UP:case u.DOWN:case u.LEFT:case u.RIGHT:g2(e),w2({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:d,isSelectionMode:f});break;case u.SPACE:g2(e),r.isSelectable&&o&&n({type:c.SELECT,payload:{cell:r,evt:e,announce:a}});break;case u.ENTER:g2(e),f&&(p.confirm(),a({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}));break;case u.ESC:g2(e),p.cancel(),a({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]});break;case u.TAB:E2({evt:e,rootElement:t,setFocusedCellCoord:i,keyboard:l,isSelectionMode:f,paginationNeeded:s});break;case u.C:g2(e),v2(e)&&Y2(e)}},r5=Sx(mq,{shouldForwardProp:e=>"background"!==e})((({background:e})=>({height:"100%",background:e.tableColorFromTheme}))),n5=Sx(mq,{shouldForwardProp:e=>"lines"!==e&&"wordBreak"!==e})((({lines:e,wordBreak:t})=>({lineHeight:"calc(4/3)",fontSize:"inherit",...t&&{height:"100%",textOverflow:"ellipsis",overflow:"hidden",wordBreak:"break-all",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}}))),o5=Sx(mq)({overflow:"hidden",textOverflow:"ellipsis"});function i5({children:e,fontSize:t="",wordBreak:r=!1,lines:n=3}){const o=parseInt(t||O1,10),i=Nr.createElement(n5,{component:"span",className:"sn-table-cell-text",wordBreak:r,lines:n},e);return r?Nr.createElement(Nr.Fragment,null,i):Nr.createElement(o5,{minHeight:o*k1,maxHeight:o*k1*n},i)}function a5(){const{columns:e,totalsPosition:{atTop:t},rows:r}=r2(q2,(e=>e.tableData)),{rootElement:n,selectionsAPI:o,keyboard:i,styling:a,constraints:l}=r2(q2,(e=>e.baseProps)),s=r2(q2,(e=>e.headRowHeight)),c=r2(q2,(e=>e.setFocusedCellCoord));return Nr.createElement(NQ,{className:"sn-table-row"},e.map(((e,u)=>{const d=[t?1:r.length+1,u],p=t&&0===u&&!i.enabled?0:-1;return Nr.createElement($1,{totalsStyle:a.totals,headRowHeight:s,atTop:t,key:e.id,align:e.totalsTextAlign,className:"sn-table-cell",tabIndex:p,title:l.passive?void 0:e.totalInfo,onKeyDown:e=>{e5(e,n,d,c,o.isModal())},onMouseDown:()=>{f2(d,n,c,i)}},Nr.createElement(i5,{fontSize:a.totals.fontSize},e.totalInfo))})))}var l5=er.memo(a5);const s5=({selectionsAPI:e,selectionDispatch:t,setShouldRefocus:r,keyboard:n,tableWrapperRef:o})=>{er.useEffect((()=>{const i=()=>{t({type:c.RESET})},a=()=>{t({type:c.CLEAR})},l=()=>{var e;if(null!==(e=o.current)&&void 0!==e&&e.contains(document.activeElement))r();else if(n.enabled){var t;null===(t=n.blur)||void 0===t||t.call(n,!0)}i()};return e.on("deactivated",i),e.on("canceled",i),e.on("confirmed",l),e.on("cleared",a),()=>{e.removeListener("deactivated",i),e.removeListener("canceled",i),e.removeListener("confirmed",l),e.removeListener("cleared",a)}}),[e,n,t,r,o])};function c5({setShouldRefocus:e,tableWrapperRef:t,announce:r}){var n,o,i;const{rows:a,columns:l,paginationNeeded:s,totalsPosition:c}=r2(q2,(e=>e.tableData)),{selectionsAPI:u,rootElement:d,keyboard:p,layout:f,constraints:m,styling:{body:{hoverColors:h,lastRowBottomBorder:g,...v}}}=r2(q2,(e=>e.baseProps)),b=r2(q2,(e=>e.setFocusedCellCoord)),y=r2(q2,(e=>e.selectionDispatch)),S=!m.active&&!m.select,x=JSON.stringify(l.map((e=>e.stylingIDs))),C=er.useMemo((()=>JSON.parse(x).map((e=>G2(!!e.length,S)))),[x,S]),w=null===(n=f.components)||void 0===n||null===(o=n[0])||void 0===o||null===(i=o.content)||void 0===i?void 0:i.hoverEffect;return s5({keyboard:p,selectionDispatch:y,selectionsAPI:u,setShouldRefocus:e,tableWrapperRef:t}),Nr.createElement(P1,{lastRowBottomBorder:g},c.atTop?Nr.createElement(l5,null):void 0,a.map(((e,t)=>Nr.createElement(_1,{hoverColors:h,hover:w,tabIndex:-1,key:e.id,className:"sn-table-row"},l.map(((n,o)=>{const{id:i}=n,a=e[i],l=C[o],f=0!==t||0!==o||c.atTop||p.enabled?-1:0;return l&&Nr.createElement(l,{scope:0===o?"row":null,component:0===o?"th":null,cell:a,column:n,key:i,align:a.align,styling:v,tabIndex:f,announce:r,title:m.passive?void 0:a.qText,onKeyDown:e=>{t5({evt:e,rootElement:d,selectionsAPI:u,cell:a,selectionDispatch:y,isSelectionsEnabled:S,setFocusedCellCoord:b,announce:r,keyboard:p,paginationNeeded:s,totalsPosition:c})},onKeyUp:e=>K2(e,y),onMouseDown:()=>W2(a,d,b,p,c)},Nr.createElement(i5,{fontSize:v.fontSize},a.qText))}))))),c.atBottom?Nr.createElement(l5,null):void 0)}var u5=er.memo(c5);function d5(){return d5=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},d5.apply(this,arguments)}const p5=(e,t)=>Nr.createElement("svg",d5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"lock_svg__lock-a",d:"M13 7H8h5V4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3h10Z"})),Nr.createElement("use",{xlinkHref:"#lock_svg__lock-a",fillRule:"evenodd"})),f5=er.forwardRef(p5);function m5(){return m5=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},m5.apply(this,arguments)}const h5=(e,t)=>Nr.createElement("svg",m5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"descending_svg__descending-a",d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5V2Zm12 2H8v1h7V4ZM8 7h6v1H8V7Zm5 3H8v1h5v-1Z"})),Nr.createElement("use",{xlinkHref:"#descending_svg__descending-a"})),g5=er.forwardRef(h5);function v5(){return v5=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},v5.apply(this,arguments)}const b5=(e,t)=>Nr.createElement("svg",v5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"ascending_svg__ascending-a",d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5 3.5 1.793ZM8 4h5v1H8V4Zm0 3h6v1H8V7Zm0 3h7v1H8v-1Z"})),Nr.createElement("use",{xlinkHref:"#ascending_svg__ascending-a"})),y5=er.forwardRef(b5),S5=Sx(zq,{shouldForwardProp:e=>"isActive"!==e&&"textAlign"!==e&&"disabled"!==e})((({isActive:e,textAlign:t,disabled:r,theme:n})=>({textAlign:t,height:"auto",maxWidth:"100%",fontSize:"inherit",fontFamily:"inherit",padding:n.spacing(.5,1),color:"inherit",alignItems:"flex-end",cursor:r?"auto":"pointer",justifySelf:t,"&&:focus, &&:hover":{"& svg":{opacity:e?1:.5}},"& svg":{opacity:e?1:0,fontSize:O1},"& .Mui-disabled":{color:"inherit"},"& .MuiButton-endIcon, .MuiButton-startIcon":{marginBottom:"2px",visibility:r?"hidden":"visible"}}))),x5=Sx("span")({border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1}),C5=Sx(mq,{shouldForwardProp:e=>"isLocked"!==e})((({theme:e,isLocked:t})=>({width:"100%",display:"grid",flexDirection:"inherit",gridAutoFlow:"dense",gap:e.spacing(.5),fontSize:"inherit",fontFamily:"inherit","&&:hover, &&:focus-within":{"& #sn-table-head-menu-button":{opacity:1}},"& > div:last-child":{alignSelf:"flex-end"},"&.aligned-left":{gridTemplateColumns:t?"20px 2fr 24px":"1fr 24px"},"&.aligned-center":{gridTemplateColumns:"24px 2fr 24px","& > div:first-child":{gridColumn:1},"& .sn-table-head-label":{gridColumn:2},"& > div:last-child":{gridColumn:3}},"&.aligned-right":{gridTemplateColumns:t?"24px 2fr 20px":"24px 1fr","& > div:first-child":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:2},"& > div:last-child":{gridColumn:1}}}))),w5=Sx("div")({display:"flex",alignSelf:"flex-end"}),E5=Sx(mq)({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit","&.aligned-right":{justifyContent:"flex-start"},"&.aligned-center, &.aligned-left":{justifyContent:"flex-end"}}),R5=Sx(mq,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({rightAligned:e})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:"24px",display:"flex"}))),k5=Sx(zq,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({isVisible:e})=>({opacity:e?1:0,"&:focus":{opacity:1}}))),O5=Sx(pB)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),L5=Sx(ZV)((({theme:e})=>({borderRadius:"4px",margin:e.spacing(0,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"}}))),M5=Sx("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),A5=Sx(cV)((({theme:e})=>({marginRight:e.spacing(1.5),lineHeight:0})));Sx("div")((({theme:e})=>({height:"350px",boxSizing:"border-box",background:e.palette.common.white})));const I5=Sx(mq,{shouldForwardProp:e=>"isLastColumn"!==e})((({isLastColumn:e})=>({display:"flex",position:"absolute",height:"100%",top:0,left:"100%",cursor:"col-resize",width:`${e?E1:2*E1+R1}px`,justifyContent:e?"flex-end":"center",marginLeft:"-4px","&&:hover:not(:focus, :active)":{"& .sn-table-adjuster-head-border":{background:"#D9D9D9"}},"&&:focus-visible, :active":{outline:"none","& .sn-table-adjuster-head-border":{background:"#177fe6"}}}))),T5=Sx(mq)({position:"absolute",height:"100%",width:"3px"}),D5=({sortDirection:e,isLocked:t,headTextAlign:r})=>{const n="A"===e?Nr.createElement(y5,{height:O1}):Nr.createElement(g5,{height:O1}),o=t?Nr.createElement(E5,{className:`aligned-${r}`},Nr.createElement(f5,{height:O1,"data-testid":"head-cell-lock-icon"})):void 0;return"right"===r?{startIcon:n,lockIcon:o}:{endIcon:n,lockIcon:o}};function P5(){return P5=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},P5.apply(this,arguments)}const _5=(e,t)=>Nr.createElement("svg",P5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"more_svg__more-a",d:"M2 6.5h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1Zm5.5 0h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1Zm5.5 0h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#more_svg__more-a"})),N5=er.forwardRef(_5);function $5(){return $5=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},$5.apply(this,arguments)}const z5=(e,t)=>Nr.createElement("svg",$5({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116.509.509 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a.506.506 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0Z"})),q5=er.forwardRef(z5);function F5(){return F5=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},F5.apply(this,arguments)}const j5=(e,t)=>Nr.createElement("svg",F5({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1V1.5ZM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1h1.5ZM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1v1.5Zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1v1.5ZM6 0h4v1H6V0ZM0 6h1v4H0V6Zm15 0h1v4h-1V6Zm-9 9h4v1H6v-1Z"})),B5=er.forwardRef(j5);function W5(){return W5=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},W5.apply(this,arguments)}const H5=(e,t)=>Nr.createElement("svg",W5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_all_svg__select_all-a",d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4h2Zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0h10Zm0 1H5v10h10V1Zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28l3.497-3.627Z"})),Nr.createElement("use",{xlinkHref:"#select_all_svg__select_all-a"})),U5=er.forwardRef(H5);function V5(){return V5=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},V5.apply(this,arguments)}const G5=(e,t)=>Nr.createElement("svg",V5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"clear_selections_svg__selections-clear-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm-1-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM9.166 6.166c1.555-1.555 4.113-1.555 5.668 0 1.555 1.555 1.555 4.113 0 5.668-1.555 1.555-4.113 1.555-5.668 0-1.555-1.555-1.555-4.063 0-5.668Zm4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0c-.25.201-.25.602 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304 1.304-1.304Z"})),Nr.createElement("use",{xlinkHref:"#clear_selections_svg__selections-clear-a"})),Y5=er.forwardRef(G5);function X5(){return X5=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},X5.apply(this,arguments)}const K5=(e,t)=>Nr.createElement("svg",X5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_possible_svg__luiicons_select_possible-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5v-1Zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0Zm-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM4 4v8h8V4H4Zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#select_possible_svg__luiicons_select_possible-a"})),Z5=er.forwardRef(K5);function J5(){return J5=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},J5.apply(this,arguments)}const Q5=(e,t)=>Nr.createElement("svg",J5({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_alternative_svg__luiicons_select_alternative-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5v-1Zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0Zm-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM4 4v8l8-8H4Zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#select_alternative_svg__luiicons_select_alternative-a"})),e4=er.forwardRef(Q5);function t4(){return t4=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},t4.apply(this,arguments)}const r4=(e,t)=>Nr.createElement("svg",t4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"select_excluded_svg__luiicons_select_excluded-a",d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5Zm-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0Zm14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5v-1Zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0Zm15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0Zm-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0Zm6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5Zm9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0ZM4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z"})),Nr.createElement("use",{xlinkHref:"#select_excluded_svg__luiicons_select_excluded-a"})),n4=er.forwardRef(r4);function o4(){return o4=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},o4.apply(this,arguments)}const i4=(e,t)=>Nr.createElement("svg",o4({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707L3.915 8ZM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h14Zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2h2Z"})),a4=er.forwardRef(i4),l4={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},s4=(e,t)=>e.some((e=>t[e]>0)),c4=e=>{const{app:t}=r2(q2,(e=>e.baseProps)),[r,n]=er.useState(null),[o,i]=er.useState(l4);er.useEffect((()=>{t&&t.getField&&e&&e.isDim&&t.getField(e.fieldId).then(n)}),[t,e]);return{fieldInstance:r,selectionActionsEnabledStatus:o,resetSelectionActionsEnabledStatus:er.useCallback((()=>i(l4)),[]),updateSelectionActionsEnabledStatus:t=>{const r=t.qHyperCube.qDimensionInfo.find((t=>t.qFallbackTitle===e.label));r&&i({canSelectAll:s4(["qOption","qAlternative","qExcluded","qDeselected"],r.qStateCounts),canClearSelections:s4(["qSelected"],r.qStateCounts),canSelectPossible:s4(["qOption"],r.qStateCounts),canSelectAlternative:s4(["qAlternative"],r.qStateCounts),canSelectExcluded:s4(["qAlternative","qExcluded"],r.qStateCounts)})}}};function u4(){return u4=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},u4.apply(this,arguments)}const d4=(e,t)=>Nr.createElement("svg",u4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_right_svg__luiicons_arrow_right-a",d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})),Nr.createElement("use",{xlinkHref:"#arrow_right_svg__luiicons_arrow_right-a"})),p4=er.forwardRef(d4),f4=(e,t)=>e.map((e=>e.map((({onClick:e,...r})=>({...r,...e?{onClick:r=>{Object.entries(t).map((([,e])=>e(!1))),e(r)}}:{}})))));let m4={};const h4=({autoFocus:e,id:t,onClick:r,itemTitle:n,icon:o,enabled:i,subMenus:a})=>{const[l,s]=er.useState(!1),c=er.useRef(null);return Nr.createElement(Nr.Fragment,null,Nr.createElement(L5,{ref:a?c:null,key:t,"data-testid":`menu-item-${t}`,className:"sn-table-head-menu-item",onClick:e=>{r&&(r(e),m4={}),null!=a&&a.length&&(s(!0),m4[n]=s)},disabled:!i,autoFocus:e,onKeyDown:X2},Nr.createElement(M5,null,Nr.createElement(A5,null,o),Nr.createElement(e$,{variant:"body2"},n)),null!=a&&a.length?Nr.createElement(p4,null):null),(null==a?void 0:a.length)&&Nr.createElement(v4,{anchorEl:c.current,open:l,onClose:()=>s(!1),menuGroups:f4(a,m4),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"}}))},g4=({menuGroup:e})=>e.map((e=>Nr.createElement(h4,Xx({key:e.id},e)))),v4=({anchorEl:e,open:t,onClose:r,ariaLabel:n,menuGroups:o,transformOrigin:i,anchorOrigin:a})=>o.length?Nr.createElement(UV,Xx({className:"sn-table-head-menu",open:t,anchorEl:e,onClose:r,"aria-labelledby":n},a?{anchorOrigin:a}:{},i?{transformOrigin:i}:{}),(({itemGroups:e})=>e.map(((t,r)=>[g4({menuGroup:t}),r<e.length-1?Nr.createElement(O5,{"data-testid":"group-divider",variant:"middle",key:"divider"}):void 0])))({itemGroups:o})):null;function b4({column:e,tabIndex:t}){const{isDim:r,qLibraryId:n,fieldId:o,headTextAlign:i}=e,{translator:a,embed:l,model:s}=r2(q2,(e=>e.baseProps)),c=er.useRef(null),u=er.useRef(null),[d,p]=er.useState(!1),[f,m]=er.useState(!1),{fieldInstance:h,selectionActionsEnabledStatus:g,resetSelectionActionsEnabledStatus:v,updateSelectionActionsEnabledStatus:b}=c4(e),y=er.useCallback((()=>{const e=n?{qLibraryId:n,type:"dimension"}:o;l.__DO_NOT_USE__.popover(u.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}),l.on("fieldPopoverClose",(()=>{m(!1)}))}),[l,o,n]),S=er.useMemo((()=>[...r?[[{id:1,itemTitle:a.get("SNTable.MenuItem.Search"),onClick:e=>{e.stopPropagation(),p(!1),m(!0),y()},icon:Nr.createElement(q5,null),enabled:!0}],[{id:1,itemTitle:a.get("SNTable.MenuItem.Selections"),icon:Nr.createElement(B5,null),enabled:!0,subMenus:[[{id:1,itemTitle:a.get("SNTable.MenuItem.SelectAll"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectAll())},icon:Nr.createElement(U5,null),enabled:g.canSelectAll},{id:2,itemTitle:a.get("SNTable.MenuItem.SelectPossible"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectPossible())},icon:Nr.createElement(Z5,null),enabled:g.canSelectPossible},{id:3,itemTitle:a.get("SNTable.MenuItem.SelectAlternative"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectAlternative())},icon:Nr.createElement(e4,null),enabled:g.canSelectAlternative},{id:4,itemTitle:a.get("SNTable.MenuItem.SelectExcluded"),onClick:async()=>{p(!1),await(null==h?void 0:h.selectExcluded())},icon:Nr.createElement(n4,null),enabled:g.canSelectExcluded}],[{id:1,itemTitle:a.get("SNTable.MenuItem.ClearSelections"),onClick:async()=>{p(!1),await(null==h?void 0:h.clear())},icon:Nr.createElement(Y5,null),enabled:g.canClearSelections}]]}]]:[],[{id:1,itemTitle:a.get("SNTable.MenuItem.AdjustColumnSize"),onClick:e=>{g2(e),p(!1),s2(c)},icon:Nr.createElement(a4,null),enabled:!0}]]),[a,r,h,g,y]);return er.useEffect((()=>{d||v()}),[d,v]),S.length?Nr.createElement(R5,{rightAligned:"right"===i},Nr.createElement(k5,{isVisible:f||d,ref:c,size:"small",tabIndex:t,id:"sn-table-head-menu-button","aria-controls":d?"sn-table-head-menu":void 0,"aria-expanded":d?"true":void 0,"aria-haspopup":"true",onClick:async()=>{if(!d&&s){const e=await s.getLayout();b(e)}p(!d)}},Nr.createElement(N5,{height:O1})),Nr.createElement("div",{ref:u}),Nr.createElement(v4,{open:d,anchorEl:c.current,onClose:()=>p(!1),menuGroups:S,ariaLabel:"sn-table-head-menu-button"})):null}function y4({children:e,column:t,isActive:r,isInteractionEnabled:n}){const{keyboard:o,translator:i,changeSortOrder:a}=r2(q2,(e=>e.baseProps)),l=r2(q2,(e=>0===e.focusedCellCoord[0])),{startIcon:s,endIcon:c,lockIcon:u}=D5(t),d=n&&l2(o)?0:-1,p={A:i.get("SNTable.Accessibility.Ascending"),D:i.get("SNTable.Accessibility.Descending")};return Nr.createElement(C5,{isLocked:Boolean(u),className:`aligned-${t.headTextAlign}`},u&&Nr.createElement(w5,null,u),Nr.createElement(S5,{className:"sn-table-head-label",isActive:r,textAlign:t.headTextAlign,color:"inherit",size:"small",startIcon:s,endIcon:c,onClick:()=>n&&a(t),tabIndex:d,disabled:!n},e,l&&Nr.createElement(x5,{"data-testid":`VHL-for-col-${t.pageColIdx}`},`${p[t.sortDirection]} ${i.get("SNTable.SortLabel.PressSpaceToSort")}`)),n&&Nr.createElement(b4,{column:t,tabIndex:d}))}const S4=({column:e,isLastColumn:t,onColumnResize:r})=>{const{pageColIdx:n}=e,{applyColumnWidths:o,constraints:i}=r2(q2,(e=>e.baseProps)),a=r2(q2,(e=>e.columnWidths)),l=r2(q2,(e=>e.setColumnWidths)),s=er.useRef({columnWidth:0,initX:0,initWidth:0});if(i.active)return null;const c=e=>{null==r||r(),s.current.columnWidth=e;const t=[...a];t[n]=e,l(t)},d=()=>{if(s.current.columnWidth!==s.current.initWidth){const t={type:f.PIXELS,pixels:s.current.columnWidth};o(t,e)}},p=e=>{const t=e.clientX-s.current.initX,r=Math.max(s.current.initWidth+t,m);c(r)},h=e=>{g2(e),document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",h),d()};return Nr.createElement(I5,{id:"adjuster-hit-area",isLastColumn:t,key:`adjuster-${n}`,onKeyDown:e=>{if(e.key===u.LEFT||e.key===u.RIGHT){g2(e);const t=5,r=a[n],o=e.key===u.LEFT?r-t:r+t,i=Math.max(o,m);c(i)}else e.key===u.SPACE||e.key===u.ENTER?(g2(e),c2(e),d()):e.key===u.ESC&&(g2(e),c2(e),c(s.current.initWidth))},onMouseDown:e=>{e.stopPropagation(),s.current={initX:e.clientX,initWidth:a[n],columnWidth:a[n]},document.addEventListener("mousemove",p),document.addEventListener("mouseup",h)},onBlur:e=>c2(e),onFocus:()=>{s.current.initWidth=a[n]},onDoubleClick:()=>o({type:f.FIT_TO_CONTENT},e),"data-testid":"sn-table-column-adjuster"},Nr.createElement(T5,{className:"sn-table-adjuster-head-border"}))},x4=Sx(DJ,{shouldForwardProp:e=>"headerStyle"!==e})((({headerStyle:e})=>({...L1,...e,pointer:"cursor",verticalAlign:"bottom","&:focus":{boxShadow:"none"}})));function C4(){const{columns:e}=r2(q2,(e=>e.tableData)),{layout:t,styling:r,constraints:n,rootElement:o,keyboard:i}=r2(q2,(e=>e.baseProps)),a=r2(q2,(e=>e.setHeadRowHeight)),l=r2(q2,(e=>e.columnWidths)),s=r2(q2,(e=>e.setFocusedCellCoord)),c=r2(q2,(e=>e.baseProps.selectionsAPI.isModal())),u=er.useRef(null),d=!n.active&&!c;return er.useEffect((()=>{u.current&&a(u.current.getBoundingClientRect().height)}),[r.head.fontSize,l,a]),Nr.createElement(XJ,null,Nr.createElement(NQ,{ref:u,className:"sn-table-row"},e.map(((a,c)=>{const u=t.qHyperCube.qEffectiveInterColumnSortOrder[0]===a.colIdx,f=u?p[a.sortDirection]:void 0,m=c===e.length-1,h=[0,a.pageColIdx],g={width:l[c]-(m?2*E1:2*E1+R1),zIndex:e.length-c};return Nr.createElement(x4,{headerStyle:r.head,style:g,key:a.id,align:a.headTextAlign,className:"sn-table-head-cell sn-table-cell","aria-sort":f,tabIndex:-1,title:n.passive?void 0:a.label,onKeyDown:e=>Q2({evt:e,rootElement:o,cellCoord:h,setFocusedCellCoord:s,isInteractionEnabled:d}),onMouseDown:e=>H2({evt:e,rootElement:o,cellCoord:h,setFocusedCellCoord:s,keyboard:i,isInteractionEnabled:d})},Nr.createElement(y4,{column:a,isActive:u,isInteractionEnabled:d},Nr.createElement(i5,{fontSize:r.head.fontSize},a.label)),Nr.createElement(S4,{column:a,isLastColumn:m}))}))))}var w4=er.memo(C4);const E4=Sx(mq,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`}))),R4=Sx(aX,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),k4=Sx(zq,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})((({disabledCondition:e,footerStyle:t,theme:r})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:r.spacing(1)}))),O4=Sx(e$)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})));function L4({children:e,footerContainer:t,paginationNeeded:r=!0}){const{theme:n}=r2(q2,(e=>e.baseProps)),o=er.useMemo((()=>Q1(n.background)),[n]),i=r?Nr.createElement(E4,{footerStyle:o},e):null;return t?Uf.createPortal(e,t):i}function M4(){return M4=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},M4.apply(this,arguments)}const A4=(e,t)=>Nr.createElement("svg",M4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_left_svg__luiicons_arrow_left-a",d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),Nr.createElement("use",{xlinkHref:"#arrow_left_svg__luiicons_arrow_left-a",fillRule:"evenodd"})),I4=er.forwardRef(A4);function T4(){return T4=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},T4.apply(this,arguments)}const D4=(e,t)=>Nr.createElement("svg",T4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_left_stop_svg__arrow-left-stop-a",d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8l6-6ZM4 2v12H2V2h2Z"})),Nr.createElement("use",{xlinkHref:"#arrow_left_stop_svg__arrow-left-stop-a"})),P4=er.forwardRef(D4);function _4(){return _4=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},_4.apply(this,arguments)}const N4=(e,t)=>Nr.createElement("svg",_4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",ref:t},e),Nr.createElement("defs",null,Nr.createElement("path",{id:"arrow_right_stop_svg__arrow-right-stop-a",d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5 3.5 2ZM14 2v12h-2V2h2Z"})),Nr.createElement("use",{xlinkHref:"#arrow_right_stop_svg__arrow-right-stop-a"})),$4=er.forwardRef(N4),z4=1e3,q4="…",F4=({totalPages:e,page:t})=>{const r=Math.min(e,z4),n=r<e&&t>500,o=n?Math.min(500+t,e):r,i=n?Math.max(0,o-z4):0,a=Array.from(Array(r).keys()).map((e=>{const t=e+i;return Nr.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(Nr.createElement("option",{key:"startMoreOptions",value:q4,disabled:!0},q4)),o<e-1&&a.push(Nr.createElement("option",{key:"endMoreOptions",value:q4,disabled:!0},q4)),Nr.createElement(Nr.Fragment,null,a)},j4={FirstPage:P4,PreviousPage:I4,NextPage:p4,LastPage:$4,FirstPageRTL:$4,PreviousPageRTL:p4,NextPageRTL:I4,LastPageRTL:P4},B4=(e,t)=>{switch(e){case"selectPage":return t>700;case"rppOptions":return t>550;case"firstLast":return t>350;case"displayedRows":return t>250;default:return!1}};function W4({direction:e,pageInfo:t,setPageInfo:r,footerContainer:n,isSelectionMode:o,handleChangePage:i,announce:a}){const{totalRowCount:l,totalColumnCount:s,totalPages:c}=r2(q2,(e=>e.tableData)),{page:u,rowsPerPage:d,rowsPerPageOptions:p}=t,{keyboard:f,translator:m,theme:h,constraints:g,rect:v}=r2(q2,(e=>e.baseProps)),b=er.useMemo((()=>Q1(h.background)),[h]),y=0===u,S=u>=c-1,x=l2(f)?0:-1,C=n?n.getBoundingClientRect().width:v.width,w=B4("firstLast",C),E=!!t.rowsPerPageOptions.length&&!o&&B4("rppOptions",C)&&s<=100,R=m.get("SNTable.Pagination.DisplayedRowsLabel",[`${u*d+1} - ${Math.min((u+1)*d,l)}`,l.toString()]),k=f.enabled?e=>Z2(e,o,f):null,O=(t,r,n,o)=>{const a=j4[`${n}${"rtl"===e?"RTL":""}`];return Nr.createElement(k4,{footerStyle:b,disabledCondition:t,size:"small","data-testid":"pagination-action-icon-button",onClick:t?null:()=>i(r),"aria-disabled":t,"aria-label":m.get(`SNTable.Pagination.${n}`),title:g.passive?void 0:m.get(`SNTable.Pagination.${n}`),tabIndex:x,onKeyDown:o},Nr.createElement(a,{height:O1}))},L=(e,t,r,n)=>{const o=m.get(`SNTable.Pagination.${e}`),i=`${e}-dropdown`,a=`${i}-label`,l={tabIndex:x,id:i,"data-testid":i};return Nr.createElement(Nr.Fragment,null,Nr.createElement(O4,{variant:"caption",id:a},o,":"),Nr.createElement(R4,{footerStyle:b,size:"small",native:!0,value:t,onChange:n,inputProps:l,"aria-labelledby":a},r))},M=Nr.createElement(Nr.Fragment,null,p.map((e=>Nr.createElement("option",{key:e,value:e},e)))),A=Nr.createElement(F4,{totalPages:c,page:u});return Nr.createElement(Nr.Fragment,null,E&&L("RowsPerPage",d,M,(e=>{r({...t,page:0,rowsPerPage:+e.target.value}),a({keys:[["SNTable.Pagination.RowsPerPageChange",e.target.value.toString()]],politeness:"assertive"})})),B4("selectPage",C)&&L("SelectPage",u,A,(e=>i(+e.target.value))),B4("displayedRows",C)&&Nr.createElement(O4,{variant:"caption"},R),w&&O(y,0,"FirstPage",null),O(y,u-1,"PreviousPage",null),O(S,u+1,"NextPage",w?null:k),w&&O(S,c-1,"LastPage",k))}var H4=er.memo(W4);function U4(e,t){const r=er.useRef(!1);er.useEffect((()=>{r.current?e():r.current=!0}),t)}const V4=(e,t,r)=>{er.useEffect((()=>{const n=e.current;if(!n)return;const o=e=>((e,t,r)=>{const n=e.currentTarget,o=e.relatedTarget,i=n.contains(o),a=null==o?void 0:o.closest(".sn-table-head-menu");var l;!r.enabled||i||a||t.current||(n.querySelector("#sn-table-announcer--01").innerHTML="",n.querySelector("#sn-table-announcer--02").innerHTML="",null===(l=r.blur)||void 0===l||l.call(r,!1))})(e,t,r);return n.addEventListener("focusout",o),()=>{n.removeEventListener("focusout",o)}}),[e,t,r])},G4=(e,t)=>{er.useEffect((()=>{const r=e.current;if(!r)return;const n=e=>((e,t,r)=>{if(0===e.deltaX)return;e.stopPropagation();const n=r.scrollWidth-r.offsetWidth;let{scrollLeft:o}=r,i=o+e.deltaX;t&&(i=n+i),n>0&&(i<0||i>n+1)&&(e.preventDefault(),o=t?Math.min(0,Math.min(n,i)):Math.max(0,Math.min(n,i)))})(e,"rtl"===t,r);return r.addEventListener("wheel",n),()=>{r.removeEventListener("wheel",n)}}),[e,t])},Y4=e=>{const{layout:t,rect:r,theme:n}=r2(q2,(e=>e.baseProps)),o=n.name(),[i,a]=er.useState(0),[l,s]=er.useState(0);return er.useLayoutEffect((()=>{if(e.current){var t;const{offsetWidth:r=0,offsetHeight:n=0,clientWidth:o=0,clientHeight:i=0}=null!==(t=e.current)&&void 0!==t?t:{},l=n-i;s(r-o),a(l)}}),[e,t,r,o]),{xScrollbarWidth:i,yScrollbarWidth:l}},X4=()=>{const{rootElement:e,keyboard:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.focusedCellCoord));er.useEffect((()=>{let n=r[0]>0?d.FOCUS:d.FOCUS_BUTTON;n=t.active?n:d.BLUR;const o=t.active?n2(e,r):o2(e);u2({focusType:n,cell:o})}),[t.active,e])};function K4(e){const{pageInfo:t,setPageInfo:r,direction:n,footerContainer:o,announce:i}=e,{page:a,rowsPerPage:l}=t,{totalColumnCount:s,totalRowCount:u,totalPages:d,paginationNeeded:p,rows:f,columns:m,totalsPosition:h}=r2(q2,(e=>e.tableData)),{selectionsAPI:g,rootElement:v,keyboard:b,translator:y,theme:S,constraints:x,styling:C}=r2(q2,(e=>e.baseProps)),w=r2(q2,(e=>e.focusedCellCoord)),E=r2(q2,(e=>e.setFocusedCellCoord)),R=r2(q2,(e=>e.setYScrollbarWidth)),k=r2(q2,(e=>e.showRightBorder)),O=r2(q2,(e=>e.selectionDispatch)),L=er.useRef(!1),M=er.useRef(null),A=er.useRef(null),{yScrollbarWidth:I}=Y4(M),T=g.isModal(),D=`${y.get("SNTable.Accessibility.RowsAndColumns",[String(f.length+1),String(m.length)])} ${y.get("SNTable.Accessibility.NavigationInstructions")}`,P=er.useCallback((()=>{L.current=v.getElementsByTagName("table")[0].contains(document.activeElement)}),[v]),_=er.useCallback((e=>{r({...t,page:e}),i({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),d.toString()]],politeness:"assertive"})}),[t,r,d,i]);return V4(A,L,b),G4(M,n),X4(),er.useEffect((()=>{var e;null===(e=M.current)||void 0===e||e.scrollTo(0,0)}),[t,u]),U4((()=>{m2({focusedCellCoord:w,rootElement:v,shouldRefocus:L,setFocusedCellCoord:E,isSelectionMode:T,keyboard:b,announce:i,totalsPosition:h})}),[f.length,u,s,a]),U4((()=>{R(I)}),[I]),U4((()=>{O({type:c.UPDATE_PAGE_ROWS,payload:{pageRows:f}})}),[f]),Nr.createElement(r5,{ref:A,background:S.background,dir:n,onKeyDown:e=>{J2({evt:e,totalRowCount:u,page:a,rowsPerPage:l,handleChangePage:_,setShouldRefocus:P,keyboard:b,isSelectionMode:T})},"data-testid":"sn-table"},Nr.createElement(D1,null),Nr.createElement(I1,{ref:M,className:"sn-table-container",fullHeight:o||x.active||!p,constraints:x,tabIndex:-1,role:"application","data-testid":"table-container"},Nr.createElement(T1,{styling:C,showRightBorder:k,stickyHeader:!0,"aria-label":D},Nr.createElement(w4,null),Nr.createElement(u5,Xx({},e,{setShouldRefocus:P,tableWrapperRef:A})))),!x.active&&Nr.createElement(L4,{footerContainer:o,paginationNeeded:p},Nr.createElement(H4,Xx({},e,{handleChangePage:_,isSelectionMode:T}))))}var Z4=er.memo(K4);function J4(e){var t,r;const n=S1();return null!=n&&null!==(t=n.components)&&void 0!==t&&null!==(r=t.MuiTable)&&void 0!==r&&r.styleOverrides&&(n.components.MuiTable.styleOverrides.root={}),ix({...n,direction:e})}var Q4=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function e3(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||Q4(n)&&Q4(o)))return!1;var n,o;return!0}function t3(e,t){var r;void 0===t&&(t=e3);var n,o=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}}var r3="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function n3(e){cancelAnimationFrame(e.id)}function o3(e,t){var r=r3();var n={id:requestAnimationFrame((function o(){r3()-r>=t?e.call(null):n.id=requestAnimationFrame(o)}))};return n}var i3=-1;function a3(e){if(void 0===e&&(e=!1),-1===i3||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),i3=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return i3}var l3=null;function s3(e){if(void 0===e&&(e=!1),null===l3||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?l3="positive-descending":(t.scrollLeft=1,l3=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),l3}return l3}var c3=150,u3=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function d3(e){var t,r=e.getColumnOffset,n=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,s=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,u=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,ZR(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:ZR(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=t3((function(e,t,r,o,i,a,l,s){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),n._callOnScroll=void 0,n._callOnScroll=t3((function(e,t,r,o,i){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var o,a=n.props,l=a.columnWidth,s=a.direction,c=a.rowHeight,p=n._getItemStyleCache(h&&l,h&&s,h&&c),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var m=r(n.props,t,n._instanceProps),g="rtl"===s;p[f]=o={position:"absolute",left:g?void 0:m,right:g?m:void 0,top:d(n.props,e,n._instanceProps),height:u(n.props,e,n._instanceProps),width:i(n.props,t,n._instanceProps)}}return o},n._getItemStyleCache=void 0,n._getItemStyleCache=t3((function(e,t,r){return{}})),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,l=t.scrollHeight,s=t.scrollWidth;n.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=n.props.direction,c=i;if("rtl"===t)switch(s3()){case"negative":c=-i;break;case"positive-descending":c=s-o-i}c=Math.max(0,Math.min(c,s-o));var u=Math.max(0,Math.min(a,l-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&n3(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=o3(n._resetIsScrolling,c3)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1)}))},n}KR(t,e),t.getDerivedStateFromProps=function(e,t){return p3(e,t),g(e),null};var v=t.prototype;return v.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}}),this._resetIsScrollingDebounced)},v.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,f=i.width,m=this.state,h=m.scrollLeft,g=m.scrollTop,v=a3();void 0!==n&&(n=Math.max(0,Math.min(n,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,S=b>d?v:0;this.scrollTo({scrollLeft:void 0!==n?s(this.props,n,r,h,this._instanceProps,S):h,scrollTop:void 0!==o?c(this.props,o,r,g,this._instanceProps,y):g})},v.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},v.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(s3()){case"negative":o.scrollLeft=-r;break;case"positive-ascending":o.scrollLeft=r;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-r}else o.scrollLeft=Math.max(0,r);o.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},v.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&n3(this._resetIsScrollingTimeoutId)},v.render=function(){var e=this.props,t=e.children,r=e.className,n=e.columnCount,o=e.direction,i=e.height,s=e.innerRef,c=e.innerElementType,u=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?u3:p,m=e.outerElementType,h=e.outerTagName,g=e.rowCount,v=e.style,b=e.useIsScrolling,y=e.width,S=this.state.isScrolling,x=this._getHorizontalRangeToRender(),C=x[0],w=x[1],E=this._getVerticalRangeToRender(),R=E[0],k=E[1],O=[];if(n>0&&g)for(var L=R;L<=k;L++)for(var M=C;M<=w;M++)O.push(er.createElement(t,{columnIndex:M,data:d,isScrolling:b?S:void 0,key:f({columnIndex:M,data:d,rowIndex:L}),rowIndex:L,style:this._getItemStyle(L,M)}));var A=a(this.props,this._instanceProps),I=l(this.props,this._instanceProps);return er.createElement(m||h||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:HE({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},er.createElement(c||u||"div",{children:O,ref:s,style:{height:A,pointerEvents:S?"none":void 0,width:I}}))},v._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,o=e.rowCount;if("function"==typeof r&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],l=i[1],s=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],m=u[3];this._callOnItemsRendered(a,l,d,p,s,c,f,m)}if("function"==typeof n){var h=this.state,g=h.horizontalScrollDirection,v=h.scrollLeft,b=h.scrollTop,y=h.scrollUpdateWasRequested,S=h.verticalScrollDirection;this._callOnScroll(v,b,g,S,y)}},v._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,l=e.rowCount,s=this.state,c=s.horizontalScrollDirection,u=s.isScrolling,d=s.scrollLeft,p=r||i||a||1;if(0===t||0===l)return[0,0,0,0];var f=n(this.props,d,this._instanceProps),m=o(this.props,f,d,this._instanceProps),h=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-h),Math.max(0,Math.min(t-1,m+g)),f,m]},v._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanCount,n=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,l=a.isScrolling,s=a.verticalScrollDirection,c=a.scrollTop,u=n||o||r||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,c,this._instanceProps),m=f(this.props,d,c,this._instanceProps),h=l&&"backward"!==s?1:Math.max(1,u),g=l&&"forward"!==s?1:Math.max(1,u);return[Math.max(0,d-h),Math.max(0,Math.min(i-1,m+g)),d,m]},t}(er.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var p3=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},f3=function(e,t){var r=e.rowCount,n=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=r&&(i=r-1),i>=0){var l=n[i];a=l.offset+l.size}return a+(r-i-1)*o},m3=function(e,t){var r=e.columnCount,n=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=r&&(i=r-1),i>=0){var l=n[i];a=l.offset+l.size}return a+(r-i-1)*o},h3=function(e,t,r,n){var o,i,a;if("column"===e?(o=n.columnMetadataMap,i=t.columnWidth,a=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=t.rowHeight,a=n.lastMeasuredRowIndex),r>a){var l=0;if(a>=0){var s=o[a];l=s.offset+s.size}for(var c=a+1;c<=r;c++){var u=i(c);o[c]={offset:l,size:u},l+=u}"column"===e?n.lastMeasuredColumnIndex=r:n.lastMeasuredRowIndex=r}return o[r]},g3=function(e,t,r,n){var o,i;return"column"===e?(o=r.columnMetadataMap,i=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=r.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=n?v3(e,t,r,i,0,n):b3(e,t,r,Math.max(0,i),n)},v3=function(e,t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),l=h3(e,t,a,r).offset;if(l===i)return a;l<i?o=a+1:l>i&&(n=a-1)}return o>0?o-1:0},b3=function(e,t,r,n,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;n<i&&h3(e,t,n,r).offset<o;)n+=a,a*=2;return v3(e,t,r,Math.min(n,i-1),Math.floor(n/2),o)},y3=function(e,t,r,n,o,i,a){var l="column"===e?t.width:t.height,s=h3(e,t,r,i),c="column"===e?m3(t,i):f3(t,i),u=Math.max(0,Math.min(c-l,s.offset)),d=Math.max(0,s.offset-l+a+s.size);switch("smart"===n&&(n=o>=d-l&&o<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},S3=d3({getColumnOffset:function(e,t,r){return h3("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return g3("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var o=e.columnCount,i=e.width,a=h3("column",e,t,n),l=r+i,s=a.offset+a.size,c=t;c<o-1&&s<l;)c++,s+=h3("column",e,c,n).size;return c},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:f3,getEstimatedTotalWidth:m3,getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){return y3("column",e,t,r,n,o,i)},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){return y3("row",e,t,r,n,o,i)},getRowOffset:function(e,t,r){return h3("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return g3("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var o=e.rowCount,i=e.height,a=h3("row",e,t,n),l=r+i,s=a.offset+a.size,c=t;c<o-1&&s<l;)c++,s+=h3("row",e,c,n).size;return c},initInstanceProps:function(e,t){var r=e,n={columnMetadataMap:{},estimatedColumnWidth:r.estimatedColumnWidth||50,estimatedRowHeight:r.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:r})},t.resetAfterRowIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:r})},t.resetAfterIndices=function(e){var r=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof r&&(n.lastMeasuredColumnIndex=Math.min(n.lastMeasuredColumnIndex,r-1)),"number"==typeof o&&(n.lastMeasuredRowIndex=Math.min(n.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),x3=150,C3=function(e,t){return e};function w3(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=s(n.props,ZR(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:ZR(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=t3((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=t3((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,l=i.itemSize,s=i.layout,u=n._getItemStyleCache(c&&l,c&&s,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=r(n.props,e,n._instanceProps),p=o(n.props,e,n._instanceProps),f="horizontal"===a||"horizontal"===s,m="rtl"===a,h=f?d:0;u[e]=t={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=t3((function(e,t,r){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(s3()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;n.setState((function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}}),n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&n3(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=o3(n._resetIsScrolling,x3)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}KR(t,e),t.getDerivedStateFromProps=function(e,t){return E3(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}}),this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var r=this.props,n=r.itemCount,o=r.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var l=0;if(this._outerRef){var s=this._outerRef;l="vertical"===o?s.scrollWidth>s.clientWidth?a3():0:s.scrollHeight>s.clientHeight?a3():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,l))},d.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(s3()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,l=i.scrollWidth;i.scrollLeft=l-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&n3(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,r=e.className,o=e.direction,i=e.height,a=e.innerRef,l=e.innerElementType,s=e.innerTagName,c=e.itemCount,u=e.itemData,d=e.itemKey,p=void 0===d?C3:d,f=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,v=e.useIsScrolling,b=e.width,y=this.state.isScrolling,S="horizontal"===o||"horizontal"===f,x=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),w=C[0],E=C[1],R=[];if(c>0)for(var k=w;k<=E;k++)R.push(er.createElement(t,{data:u,key:p(k,u),index:k,isScrolling:v?y:void 0,style:this._getItemStyle(k)}));var O=n(this.props,this._instanceProps);return er.createElement(m||h||"div",{className:r,onScroll:x,ref:this._outerRefSetter,style:HE({position:"relative",height:i,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},er.createElement(l||s||"div",{children:R,ref:a,style:{height:S?"100%":O,pointerEvents:y?"none":void 0,width:S?O:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,l=i.scrollOffset,s=i.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,s=n.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,s,this._instanceProps),u=l(this.props,c,s,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(er.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var E3=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},R3=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var l=o[i];a=l.offset+l.size}for(var s=i+1;s<=t;s++){var c=n(s);o[s]={offset:a,size:c},a+=c}r.lastMeasuredIndex=t}return o[t]},k3=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=R3(e,i,t).offset;if(a===o)return i;a<o?n=i+1:a>o&&(r=i-1)}return n>0?n-1:0},O3=function(e,t,r,n){for(var o=e.itemCount,i=1;r<o&&R3(e,r,t).offset<n;)r+=i,i*=2;return k3(e,t,Math.min(r,o-1),Math.floor(r/2),n)},L3=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var l=n[i];a=l.offset+l.size}return a+(r-i-1)*o},M3=w3({getItemOffset:function(e,t,r){return R3(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:L3,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,l=e.height,s=e.layout,c=e.width,u="horizontal"===a||"horizontal"===s?c:l,d=R3(e,t,o),p=L3(e,o),f=Math.max(0,Math.min(p-u,d.offset)),m=Math.max(0,d.offset-u+d.size+i);switch("smart"===r&&(r=n>=m-u&&n<=f+u?"auto":"center"),r){case"start":return f;case"end":return m;case"center":return Math.round(m+(f-m)/2);default:return n>=m&&n<=f?n:n<m?m:f}},getStartIndexForOffset:function(e,t,r){return function(e,t,r){var n=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?n[o].offset:0)>=r?k3(e,t,o,0,r):O3(e,t,Math.max(0,o),r)}(e,r,t)},getStopIndexForStartIndex:function(e,t,r,n){for(var o=e.direction,i=e.height,a=e.itemCount,l=e.layout,s=e.width,c="horizontal"===o||"horizontal"===l?s:i,u=R3(e,t,n),d=r+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=R3(e,f,n).size;return f},initInstanceProps:function(e,t){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,n){void 0===n&&(n=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),n&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function A3(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}var I3=["style"],T3=["style"];function D3(e,t){var r=e.style,n=lR(e,I3),o=t.style,i=lR(t,T3);return!A3(r,o)&&!A3(n,i)}const P3=e=>{const t=er.useRef(e);return t.current=e,t},_3=({qLeft:e,qTop:t,qWidth:r,qHeight:n})=>`${e}-${t}-${r}-${n}`,N3=e=>!Number.isNaN(+e),$3=e=>!(!e.qNum&&0!==e.qNum||!N3(e.qNum)),z3=1e4;function q3(e,t){return[...t].reverse().find((t=>t*e<=z3))||Math.floor(z3/e)}function F3(e){var t;const[r,n,o,i,a]=[e.qHyperCube.qDimensionInfo.length>0,e.qHyperCube.qMeasureInfo.length>0,e.qHyperCube.qGrandTotalRow.length>0,null===(t=e.totals)||void 0===t?void 0:t.show,e.totals.position];if(o&&(r&&n||!i&&!r)){if(i||"top"===a)return{atTop:!0,atBottom:!1};if(!i&&"bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function j3(e,t,r,n){var o,i,a;return t>=n?null!==(o=null===(i=e.qHyperCube.qGrandTotalRow[t-n])||void 0===i?void 0:i.qText)&&void 0!==o?o:"":0===r&&null!==(a=e.totals.label)&&void 0!==a?a:""}function B3(e,t,r){return e&&!e.auto?{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:r?"left":"right",bodyTextAlign:"auto"}}const W3=(e,t)=>"auto"!==t?t:$3(e)?"right":"left";const H3=e=>{const{qHyperCube:{qColumnOrder:t,qDimensionInfo:r,qMeasureInfo:n}}=e,o=r.length,i=o+n.length,a=(null==t?void 0:t.length)===i?t:Array.from(Array(i).keys()),l={};let s=0;return a.filter((e=>{const t=e<o,{qError:i}=t?r[e]:n[e-o],a=7005===(null==i?void 0:i.qErrorCode);return t&&(a?s++:l[e]=e-s),!a})).map(((t,r)=>function(e,t,r,n){const{qDimensionInfo:o,qMeasureInfo:i}=e.qHyperCube,a=o.length,l=t<a,s=l?o[t]:i[t-a];let c,u=0,d="",p=!1;if(l){const e=s;u=e.qGroupPos,d=e.qGroupFieldDefs[u],p=e.qLocked,({qDimensionType:c}=e)}const{qFallbackTitle:f,textAlign:m,qAttrExprInfo:h,qSortIndicator:g,qReverseSort:v,qApprMaxGlyphCount:b,columnWidth:y,qLibraryId:S}=s;return{isDim:l,isLocked:p,fieldId:d,colIdx:t,qLibraryId:S,pageColIdx:r,qApprMaxGlyphCount:b,qReverseSort:v,columnWidth:y,selectionColIdx:null!=n?n:-1,id:`col-${r}`,label:f,stylingIDs:h.map((e=>e.id)),sortDirection:g&&"N"!==g?g:"A",totalInfo:j3(e,t,r,a),...B3(m,c,l)}}(e,t,r,l[t])))};const U3=(e,t,r,n,o)=>{const i=e[r];if(!i)return!0;for(let e=t;e<t+n;e++){const t=i[`col-${e}`];if((null==t?void 0:t.rowIdx)!==o)return!0}return!1},V3=(e,t,r,n)=>{const o=e.slice(r,n);return 0===o.length||o.some((e=>!e[`col-${t}`]))},G3=(e,t,r,n,o,i)=>{e.forEach((e=>{e.qMatrix.forEach(((a,l)=>{const s=e.qArea.qTop-t.page*t.rowsPerPage,{row:c,pageRowIdx:u}=((e,t,r,n,o,i,a,l)=>{var s;const c=n.qTop+r,u=o+r,d=null!==(s=e[u])&&void 0!==s?s:{key:`row-${u}`};return t.forEach(((e,t)=>{var r;const o=t+n.qLeft,{colIdx:s,isDim:p,isLocked:f,id:m,bodyTextAlign:h,selectionColIdx:g}=i[o],v=$3(e);d[m]={...e,align:W3(e,h),rowIdx:c,colIdx:s,isSelectable:p&&!f,pageRowIdx:u,pageColIdx:o,selectionColIdx:g,isLastRow:c===a.qcy-1,isLastColumn:o===a.qcx-1,isNumeric:v},l(null!==(r=e.qText)&&void 0!==r?r:"",u,o,v)})),{row:d,pageRowIdx:u}})(r,a,l,e.qArea,s,n,o.qHyperCube.qSize,i);r[u]=c}))}))},Y3=({layout:e,model:t,theme:r,initialDataPages:n,pageInfo:o,rowCount:i,visibleRowCount:a,visibleColumnCount:l,columns:s,setCellSize:c,gridState:u})=>{const d=er.useRef([]),p=P3(c),f=er.useCallback(((t,r)=>{const n=Array.isArray(r)?r.slice(0,i):(e=>Array(e).fill(void 0))(i);return G3(t,o,n,s,e,p.current),d.current=n,n}),[i,o,s,e,p]),[m,h]=er.useState((()=>f(null!=n?n:[])));N2((()=>{h(f(null!=n?n:[]))}),[n]);const g=((e,t)=>{const r=er.useRef(new Set),n=er.useRef(new Set),o=er.useRef(new Set),i=P3(e),a=P3(t),l=er.useMemo((()=>({enqueue:e=>{const t=_3(e);o.current.has(t)||(r.current.add(e),o.current.add(t),1===r.current.size&&queueMicrotask((async()=>{const e=Array.from(r.current.values());if(0!==e.length){r.current.clear(),n.current.add(e);try{const t=await i.current(e);n.current.has(e)&&a.current(t)}catch(t){e.forEach((e=>{o.current.delete(_3(e))}))}finally{n.current.delete(e)}}})))},clear:()=>{r.current.clear(),n.current.clear(),o.current.clear()}})),[]);return l})((e=>t.getHyperCubeData("/qHyperCubeDef",e)),(e=>h((t=>f(e,t))))),v=er.useCallback(((e,t,r,n)=>{for(let o=e;o<e+r;o++)if(V3(d.current,o,t,n)){const e={qLeft:o,qTop:t,qHeight:n,qWidth:1};g.enqueue(e)}}),[d,g]),b=er.useCallback(((e,t,r,n)=>{for(let i=t;i<t+n;i++){const t=Math.max(0,i-o.page*o.rowsPerPage);if(U3(d.current,e,t,r,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:r};g.enqueue(t)}}}),[d,g,o]),y=r.name();return er.useEffect((()=>{const{qcx:t,qcy:r}=e.qHyperCube.qSize,n=u.current.overscanRowStartIndex,i=u.current.overscanColumnStartIndex,s=n+o.page*o.rowsPerPage,c=t-i,d=o.rowsPerPage-n,p=Math.min(100,c,t,l+5),f=Math.min(100,d,r,a+25);return b(i,s,p,f),()=>{g.clear()}}),[e,a,l,o,g,b,u,y]),{rowsInPage:m,loadRows:b,loadColumns:v}};let X3=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const K3=(e,t,r,n,o)=>{const i=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(i,Math.ceil(r.height/o)),l=er.useMemo((()=>n.reduce(((e,t)=>(e.width<r.width&&(e.width+=t,e.count+=1),e)),{count:0,width:0})),[r,n]).count;return{rowCount:i,visibleRowCount:a,visibleColumnCount:l}},Z3={enabled:!1},J3=()=>{},Q3={current:null};const e6=()=>{},t6=e=>e.preventDefault();const r6=({style:e})=>Nr.createElement("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var n6=Nr.memo(r6,D3);const o6=({columnIndex:e,rowIndex:t,style:r,data:n})=>{var o;const{rowsInPage:i,columns:a,bodyStyle:l,isHoverEnabled:c,maxLineCount:u}=n,d=r2(q2,(e=>e.hoverIndex===t)),p=r2(q2,(e=>e.setHoverIndex)),{constraints:f}=r2(q2,(e=>e.baseProps)),m=r2(q2,(e=>e.showRightBorder)),h=null===(o=i[t])||void 0===o?void 0:o[`col-${e}`],{handleMouseDown:g,handleMouseOver:v,handleMouseUp:b,cellSelectionState:y}=function(e){const{constraints:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.selectionDispatch)),n="object"==typeof e,o=r2(q2,(t=>n?R2(e,t.selectionState):s.INACTIVE)),i=!t.active&&!t.select;if(n&&i){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i}=U2(e,e6,t6,r);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(h);if("object"==typeof h){const n=((e,t,r,n,o)=>{const{hoverColors:i,lastRowBottomBorder:a,...l}=o,c=t.stylingIDs.length?e2(l,e.qAttrExps,t.stylingIDs):l;return n===s.SELECTED?{...c,...w1.SELECTED}:n===s.EXCLUDED?{...c,color:r?null==i?void 0:i.color:c.color,background:`${w1.EXCLUDED_BACKGROUND}, ${r?null==i?void 0:i.background:c.background}`}:r?{...c,...i}:c})(h,a[e],c&&d,y,l);return Nr.createElement("div",{className:`sn-table-cell ${y}`,style:{...r,...n,display:"flex",alignItems:"start",borderWidth:"0px",borderBottomWidth:h.isLastRow?"0px":"1px",borderRightWidth:h.isLastColumn&&!m?"0px":"1px",borderStyle:"solid",justifyContent:h.align,padding:"4px 12px",boxSizing:"border-box",cursor:"default"},onMouseDown:g,onMouseUp:b,onMouseOver:v,onMouseEnter:c?()=>p(t):void 0,onMouseLeave:c?()=>p(-1):void 0,title:f.passive?void 0:h.qText},Nr.createElement(i5,{wordBreak:!h.isNumeric,lines:u},h.qText))}return Nr.createElement(n6,{style:{...r,...l,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box"}})};var i6=Nr.memo(o6,D3);const a6=({columnIndex:e,data:t,rowIndex:r})=>{var n;const o=null===(n=t.rowsInPage[r])||void 0===n?void 0:n[`col-${e}`];return`${null==o?void 0:o.qElemNumber}-${null==o?void 0:o.qText}-${r}-${e}`},l6=({style:e,columnWidths:t,rowHeight:r,pageInfo:n,rowCount:o,gridRef:i,lineRef:a,columns:l,boldText:s,gridState:c})=>{var u;const d=er.useRef({lastScrollToRatio:0,resetAfterRowIndex:0,heights:[],totalHeight:0,count:0,measuredCells:new Map}),{layout:p,rect:f}=r2(q2,(e=>e.baseProps)),[m,h]=er.useState(r||24),{measureText:g,estimateLineCount:v}=_2(e.fontSize,e.fontFamily,s),b=parseInt(null!==(u=e.fontSize)&&void 0!==u?u:L1.fontSize,10)*W1,y=15e6/o-8-1,S=Math.max(0,Math.min(T2,Math.round(y/b))),x=er.useCallback(((e,r,n)=>{const o=l?((e,t)=>{let r=e-M1;return r-=t.isLocked?24:0,r})(t[r],l[r]):(e=>e-24-1)(t[r]),i=Math.min(S,v({text:e.trim(),maxWidth:o,isNumeric:n}));return Math.max(1,i)*b+8+1}),[t,b,S,l,v]),C=er.useCallback(((e,t,r,n=!1,o=!1)=>{const i=`${t}-${r}`;if(d.current.measuredCells.has(i))return;d.current.measuredCells.set(i,[e,t,r,n]);const a=x(e,r,n),l=d.current.heights[t],s=a-l;s>0?(d.current.totalHeight+=s,d.current.heights[t]=a):void 0===l&&(d.current.count+=1,d.current.totalHeight+=a,d.current.heights[t]=a),o||h(d.current.totalHeight/d.current.count)}),[x]),w=er.useCallback((e=>{var t;return null!==(t=d.current.heights[e])&&void 0!==t?t:m}),[d,m]),E=er.useCallback((()=>{d.current.lastScrollToRatio=0,d.current.resetAfterRowIndex=0,d.current.heights=[],d.current.totalHeight=0,d.current.count=0,d.current.measuredCells.clear()}),[d]),R=P3(C),k=er.useCallback((()=>{const e=new Map(d.current.measuredCells);E(),e.forEach((([e,t,r,n])=>{R.current(e,t,r,n,!0)})),h(d.current.totalHeight/d.current.count)}),[E,R]);N2((()=>{E()}),[p,n]),N2((()=>{k()}),[g,f.width]);return null!=i&&i.current?i.current.resetAfterRowIndex(d.current.resetAfterRowIndex,!1):null!=a&&a.current&&a.current.resetAfterIndex(d.current.resetAfterRowIndex,!1),{setCellSize:C,getRowHeight:w,rowMeta:d,estimatedRowHeight:m,maxLineCount:S,resizeVisibleCells:e=>{if(!c)return;E();const{overscanRowStartIndex:t,overscanRowStopIndex:r}=c.current,n=Math.min(r,p.qHyperCube.qSize.qcy-1);for(let r=t;r<=n;r++){var o;const t=null!==(o=e[r])&&void 0!==o?o:{};Object.values(t).forEach((e=>{var t;"object"==typeof e&&C(null!==(t=e.qText)&&void 0!==t?t:"",r,e.pageColIdx,e.isNumeric)}))}},resizeAllCells:k,resetRowMeta:E}},s6=er.forwardRef(((e,t)=>{var r,n,o;const{rect:i,columns:a,innerForwardRef:l,pageInfo:s,bodyStyle:u,rowHeight:d,headerAndTotalsHeight:p,syncHeight:f}=e,{layout:m,model:h,theme:g}=r2(q2,(e=>e.baseProps)),v=r2(q2,(e=>e.columnWidths)),b=r2(q2,(e=>e.initialDataPages)),y=er.useRef(null),S=er.useRef({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=!(null===(r=m.components)||void 0===r||null===(n=r[0])||void 0===n||null===(o=n.content)||void 0===o||!o.hoverEffect),{scrollHandler:C,verticalScrollDirection:w,horizontalScrollDirection:E}=(()=>{const e=er.useRef(0),t=er.useRef(0),r=er.useRef(X3.None),n=er.useRef(X3.None);return{scrollHandler:er.useCallback((({scrollTop:o,scrollLeft:i})=>{o>t.current?r.current=X3.Down:o<t.current?r.current=X3.Up:r.current=X3.None,i>e.current?n.current=X3.Right:i<e.current?n.current=X3.Left:n.current=X3.None,t.current=o,e.current=i}),[t,e,r,n]),verticalScrollDirection:r,horizontalScrollDirection:n}})(),{rowCount:R,visibleRowCount:k,visibleColumnCount:O}=K3(m,s,i,v,d),{setCellSize:L,getRowHeight:M,rowMeta:A,estimatedRowHeight:I,maxLineCount:T,resizeVisibleCells:D}=l6({pageInfo:s,style:u,rowHeight:d,columnWidths:v,gridRef:y,rowCount:R,gridState:S}),{rowsInPage:P,loadRows:_,loadColumns:N}=Y3({layout:m,model:h,theme:g,initialDataPages:b,pageInfo:s,rowCount:R,visibleRowCount:k,visibleColumnCount:O,columns:a,setCellSize:L,gridState:S}),$=(({layout:e,loadRows:t,loadColumns:r,verticalScrollDirection:n,horizontalScrollDirection:o,rowCount:i,pageInfo:a,gridState:l})=>er.useCallback((({overscanColumnStartIndex:s,overscanColumnStopIndex:c,overscanRowStartIndex:u,overscanRowStopIndex:d})=>{if(l.current.overscanColumnStartIndex=s,l.current.overscanColumnStopIndex=c,l.current.overscanRowStartIndex=u,l.current.overscanRowStopIndex=d,u>i)return;const p=s,f=u+a.page*a.rowsPerPage,m=c-s+1,h=d-u+1;if(n.current===X3.Down){const e=h+25;t(p,f,m,u+e>i?i-u:e)}else if(n.current===X3.Up){const e=h+25,r=a.page*a.rowsPerPage,n=Math.max(r,f-25);t(p,n,m,e)}if(o.current===X3.Right){const t=e.qHyperCube.qSize.qcx-p,n=m+5,o=Math.min(t,n);r(p,f,o,h)}else if(o.current===X3.Left){const t=Math.max(0,p-5),n=Math.min(e.qHyperCube.qSize.qcx,m+5);r(t,f,n,h)}}),[a,t,r,n,o,i,e.qHyperCube.qSize,l]))({layout:m,loadRows:_,loadColumns:N,verticalScrollDirection:w,horizontalScrollDirection:E,rowCount:R,pageInfo:s,gridState:S}),z=er.useMemo((()=>({rowsInPage:P,columns:a,bodyStyle:u,isHoverEnabled:x,maxLineCount:T})),[P,a,u,x,T]),q=((e,t,r,n)=>{let{height:o}=e;return o-=t,r*n<o&&(o=Math.min(r*n,o)),o})(i,p,R,I);return er.useLayoutEffect((()=>{var e,t;f(null!==(e=null===(t=l.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!0)}),[R,f,l]),er.useLayoutEffect((()=>{var e,t,r;(f(null!==(e=null===(t=l.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!1),1===A.current.lastScrollToRatio)&&(null===(r=y.current)||void 0===r||r.scrollToItem({rowIndex:R-1,align:"start"}))})),function(e){const{selectionsAPI:t}=r2(q2,(e=>e.baseProps)),r=r2(q2,(e=>e.selectionDispatch));er.useEffect((()=>{r({type:c.UPDATE_PAGE_ROWS,payload:{pageRows:e}})}),[r,e]),s5({selectionsAPI:t,selectionDispatch:r,setShouldRefocus:J3,keyboard:Z3,tableWrapperRef:Q3})}(P),N2((()=>{var e;null===(e=y.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[m,s,g.name(),i.width,v]),er.useImperativeHandle(t,(()=>({interpolatedScrollTo:(e,t)=>{var r,n;const o=(null!==(r=null===(n=l.current)||void 0===n?void 0:n.clientHeight)&&void 0!==r?r:q)-q,i=Math.round(o*e);var a,s,c;(A.current.lastScrollToRatio=e,1===A.current.lastScrollToRatio)?(null===(a=y.current)||void 0===a||a.scrollToItem({rowIndex:R-1,align:"start"}),null===(s=y.current)||void 0===s||s.scrollTo({scrollLeft:t})):null===(c=y.current)||void 0===c||c.scrollTo({scrollTop:i,scrollLeft:t})},resizeCells:()=>{var e;null===(e=y.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),D(P)}})),[l,q,A,R,D,P]),Nr.createElement(S3,{"data-key":"body",ref:y,innerRef:l,style:{overflow:"hidden"},columnCount:m.qHyperCube.qSize.qcx,columnWidth:e=>v[e],height:q,rowCount:R,rowHeight:M,estimatedRowHeight:I,width:i.width,itemData:z,onItemsRendered:$,onScroll:C,itemKey:a6},i6)}));var c6=er.memo(s6);const u6=({width:e,height:t,children:r})=>Nr.createElement("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t}},r),d6=({index:e,style:t,data:r})=>{const{columns:n,headerStyle:{...o},columResizeHandler:i}=r,{layout:a,constraints:l}=r2(q2,(e=>e.baseProps)),s=r2(q2,(e=>e.showRightBorder)),c=r2(q2,(e=>e.baseProps.selectionsAPI.isModal())),u=n[e],d=n.length-1===e,p=a.qHyperCube.qEffectiveInterColumnSortOrder[0]===u.colIdx,f=!l.active&&!c,m="right"===u.headTextAlign?"row-reverse":"row";return Nr.createElement("div",{className:"sn-table-cell",title:l.passive?void 0:u.label,style:{...t,...o,display:"flex",alignItems:"flex-end",borderStyle:"solid",borderWidth:d&&!s?"0px 0px 1px 0px":"0px 1px 1px 0px",padding:"4px",justifyContent:u.headTextAlign,boxSizing:"border-box",cursor:"default",zIndex:n.length-e,flexDirection:m,userSelect:"none"}},Nr.createElement(y4,{column:u,isActive:p,isInteractionEnabled:f},Nr.createElement(i5,{wordBreak:!0,lines:3},u.label)),Nr.createElement(S4,{column:u,isLastColumn:d,onColumnResize:i}))},p6=(e,t,r,n,o)=>{er.useLayoutEffect((()=>{var t;null==e||null===(t=e.current)||void 0===t||t.resetAfterIndex(0,!0)}),[t,r,e,n,o])},f6=e=>{const{rect:t,forwardRef:r,columns:n,pageInfo:o,headerStyle:i,rowHeight:a,columResizeHandler:l}=e,{layout:s,theme:c}=r2(q2,(e=>e.baseProps)),u=r2(q2,(e=>e.columnWidths));return p6(r,s,o,u,c.name()),Nr.createElement(M3,{ref:r,layout:"horizontal",style:{overflow:"hidden",boxSizing:"border-box"},itemCount:s.qHyperCube.qSize.qcx,itemSize:e=>u[e],height:a,width:t.width,itemData:{columns:n,headerStyle:i,columResizeHandler:l}},d6)};var m6=er.memo(f6);const h6=({index:e,style:t,data:r})=>{const{layout:n,constraints:o}=r2(q2,(e=>e.baseProps)),i=r2(q2,(e=>e.showRightBorder)),{totalsStyle:{hoverColors:a,...l},columns:s,totals:c}=r,u=s[e].totalInfo,{totalsTextAlign:d}=s[e],p=n.qHyperCube.qSize.qcx-1===e;return Nr.createElement("div",{className:"sn-table-cell",title:o.passive?void 0:u,style:{...t,...l,display:"flex",alignItems:c.atTop?"end":"start",borderStyle:"solid",borderLeftWidth:"0px",borderRightWidth:p&&!i?"0px":"1px",borderTopWidth:c.atBottom?"1px":"0px",borderBottomWidth:c.atTop?"1px":"0px",padding:"4px 12px",justifyContent:d,boxSizing:"border-box",cursor:"default",fontWeight:"600"}},Nr.createElement(i5,{wordBreak:!N3(u),lines:3},u))},g6=e=>{const{rect:t,forwardRef:r,pageInfo:n,totals:o,rowHeight:i,columns:a}=e,{layout:l,styling:s,theme:c}=r2(q2,(e=>e.baseProps)),u=r2(q2,(e=>e.columnWidths));return p6(r,l,n,u,c.name()),Nr.createElement(M3,{ref:r,layout:"horizontal",style:{overflow:"hidden",boxSizing:"border-box"},itemCount:l.qHyperCube.qSize.qcx,itemSize:e=>u[e],height:i,width:t.width,itemData:{totalsStyle:s.totals,columns:a,totals:o}},h6)};var v6=er.memo(g6);const b6=Nr.forwardRef(((e,t)=>{const{children:r,width:n,height:o,onScroll:i}=e,{constraints:a}=r2(q2,(e=>e.baseProps));return Nr.createElement("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.active?"hidden":"auto",width:n,height:o},onScroll:i},r)})),y6=({children:e,rect:t})=>Nr.createElement("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"0px",width:t.width,height:t.height}},e),S6=({columns:e,columnWidths:t,pageInfo:r,headerRef:n,totalsRef:o,totalsPosition:i})=>{const{styling:a}=r2(q2,(e=>e.baseProps)),l=l6({style:a.head,columnWidths:t,lineRef:n,rowCount:1,pageInfo:r,boldText:!0,columns:e}),s=l6({style:a.totals,columnWidths:t,lineRef:o,rowCount:1,pageInfo:r,boldText:!0});e.forEach(((e,t)=>{l.setCellSize(e.label,0,t),s.setCellSize(e.totalInfo,0,t,N3(e.totalInfo))}));const c=l.getRowHeight(0)+8,u=s.getRowHeight(0);return{headerRowHeight:c,totalsRowHeight:u,bodyRowHeight:(({fontSize:e=L1.fontSize})=>Math.max(24,H1(e)))(a.body),headerAndTotalsHeight:i.atTop||i.atBottom?c+u:c,resizeAllHeaderCells:l.resizeAllCells,resizeAllTotalCells:s.resizeAllCells}},x6=e=>{const{pageInfo:t}=e,{totalsPosition:r,columns:n,paginationNeeded:o}=r2(q2,(e=>e.tableData)),{layout:i,theme:a,styling:l,rect:s}=r2(q2,(e=>e.baseProps)),c=r2(q2,(e=>e.columnWidths)),u=r2(q2,(e=>e.setYScrollbarWidth)),d=er.useRef(null),p=er.useRef(null),f=er.useRef(null),m=er.useRef(null),h=er.useRef(),{xScrollbarWidth:g,yScrollbarWidth:v}=Y4(d),b=er.useMemo((()=>{var e;return{...l.body,background:null!==(e=a.background.color)&&void 0!==e?e:"transparent"}}),[i,a.name()]),{headerRowHeight:y,totalsRowHeight:S,bodyRowHeight:x,headerAndTotalsHeight:C,resizeAllHeaderCells:w,resizeAllTotalCells:E}=S6({columns:n,columnWidths:c,pageInfo:t,totalsPosition:r,headerRef:p,totalsRef:f}),R=er.useMemo((()=>((e,t)=>{const r=e.height-(t?41:0);return{width:e.width,height:r}})(s,o)),[s,o]),k=er.useMemo((()=>((e,t,r)=>({width:e.width-r,height:e.height-t}))(R,g,v)),[R,g,v]),{rowCount:O}=K3(i,t,k,c,x),[L,M]=er.useState(O*x+C),A=c.reduce(((e,t)=>e+t),0),I=((e,t,r)=>er.useCallback((n=>{var o,i,a;const{scrollHeight:l,clientHeight:s,scrollTop:c,scrollLeft:u}=n.currentTarget,d=Math.max(0,Math.min(1,c/(l-s)));null===(o=r.current)||void 0===o||o.interpolatedScrollTo(Number.isNaN(d)?0:d,u),null===(i=e.current)||void 0===i||i.scrollTo(u),null===(a=t.current)||void 0===a||a.scrollTo(u)}),[e,t,r]))(p,f,m),T=er.useCallback(((e,t=!1)=>{const r=e+C;(L<k.height&&r>k.height||t)&&M(r)}),[L,C,k.height]),D=er.useCallback((()=>{var e;d.current&&(d.current.scrollTop=0),null===(e=m.current)||void 0===e||e.resizeCells(),w(),E()}),[d,w,E]);er.useLayoutEffect((()=>{d.current&&(d.current.scrollLeft=0,d.current.scrollTop=0)}),[n.length]);const P=a.name();er.useLayoutEffect((()=>{d.current&&(d.current.scrollTop=0)}),[t,O,P]),U4((()=>{u(v)}),[v]);const _=Nr.createElement(v6,{rect:k,pageInfo:t,columns:n,forwardRef:f,totals:r,rowHeight:S});return Nr.createElement(b6,{ref:d,width:R.width,height:R.height,onScroll:I},Nr.createElement(u6,{width:A,height:L},Nr.createElement(y6,{rect:k},Nr.createElement(m6,{headerStyle:l.head,rect:k,pageInfo:t,columns:n,forwardRef:p,rowHeight:y,columResizeHandler:D}),r.atTop?_:null,Nr.createElement(c6,{ref:m,innerForwardRef:h,bodyStyle:b,rect:k,pageInfo:t,columns:n,rowHeight:x,headerAndTotalsHeight:C,syncHeight:T}),r.atBottom?_:null)))};var C6=er.memo(x6);const w6=()=>{const{theme:e}=r2(q2,(e=>e.baseProps)),{paginationNeeded:t}=r2(q2,(e=>e.tableData)),r=r2(q2,(e=>e.pageInfo)),n=r2(q2,(e=>e.setPage));return Nr.createElement(r5,{"data-testid":"sn-table",background:e.background,dir:"ltr"},Nr.createElement(C6,{pageInfo:r}),t&&Nr.createElement(L4,null,Nr.createElement(H4,{handleChangePage:e=>n(e),isSelectionMode:!1,pageInfo:r,setPageInfo:()=>{},announce:()=>{}})))};var E6=er.memo(w6);function R6(e,t){const{app:r,model:n,direction:o,selectionsAPI:i,layout:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,tableData:h,rect:g,...v}=e,b=J4(o);null==t||t.render(Nr.createElement(Xh,{stylisPlugins:"rtl"===o?[Yx]:void 0},Nr.createElement(Ty,{theme:b},Nr.createElement(B2,{app:r,model:n,tableData:h,selectionsAPI:i,layout:a,translator:l,constraints:s,theme:c,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,rect:g},Nr.createElement(Z4,v)))))}const k6=t=>{const r=e.useMemo((()=>Hf(t)),[t]);return e.useEffect((()=>()=>r.unmount()),[r]),r},O6=(t,r)=>e.useMemo((()=>((e,t)=>{if(e)return async r=>{const{isDim:n,colIdx:o,qReverseSort:i}=r,a=n?o:o-t,l=(await e.getEffectiveProperties()).qHyperCubeDef.qInterColumnSortOrder,s=[];o!==l[0]?(l.splice(l.indexOf(o),1),l.unshift(o),s.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${l.join(",")}]`})):s.push({qPath:`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${a}/qDef/qReverseSort`,qOp:"Replace",qValue:(!i).toString()}),e.applyPatches(s,!0)}})(t,r.qDimensionInfo.length)),[t,r.qDimensionInfo.length]),L6=(e,t)=>{const 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"),l=e.getStyle("object","straightTableV2","backgroundColor"),s=a||n||l,c=function(e){if(void 0===e)return!1;const t=j1(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}(s);return{tableColorFromTheme:a||"inherit",color:s,isDark:B1(c?i:s),isTransparent:c}},M6=t=>{const r=e.useTheme();return e.useMemo((()=>({...r,background:L6(r,t)})),[r.name(),t])};const A6=({model:t,layout:r,shouldRender:n,page:o})=>{const[i]=e.usePromise((async()=>{if(n&&t)return(async(e,t,r)=>{let{qDataPages:n}=t.qHyperCube;if(0!==r||void 0===n||0===n.length){const o=r*Math.min(I2,t.qHyperCube.qSize.qcy);n=await e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:o,qWidth:50,qHeight:100}])}return{initialDataPages:n,derivedFrom:{layout:t,page:r}}})(t,r,o)}),[t,r,o]),a=(null==i?void 0:i.derivedFrom.layout)!==r||(null==i?void 0:i.derivedFrom.page)!==o;return{initialDataPages:null==i?void 0:i.initialDataPages,isLoading:a}},I6=({app:t,layout:r,model:n,rect:o,theme:i,keyboard:a,translator:l,constraints:s,selectionsAPI:c,changeSortOrder:u,rootElement:d,embed:p,reactRoot:f,applyColumnWidths:m,isFontLoaded:h})=>{const g=!1===r.usePagination,v=e.useMemo((()=>function(e,t){const r=F3(e),n=H3(e),o=e.qHyperCube.qSize.qcy,i=Math.min(I2,o),a=o>I2&&!t.active;return{totalsPosition:r,columns:n,rows:[],totalRowCount:o,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(o/i),paginationNeeded:a}}(r,s)),[r,s]),{pageInfo:b,setPage:y}=((t,r)=>{const[n,o]=e.useState(0),i=Math.min(I2,t.qHyperCube.qSize.qcy),a=e.useMemo((()=>({page:n,rowsPerPage:i,rowsPerPageOptions:[]})),[i,n]);if(r){const e=Math.floor(t.qHyperCube.qSize.qcy/I2);e<n&&o(e)}return{pageInfo:a,setPage:o}})(r,g),{initialDataPages:S,isLoading:x}=A6({model:n,layout:r,page:b.page,shouldRender:g});e.useEffect((()=>{g&&n&&u&&S&&!x&&h&&function(e,t){const{app:r,selectionsAPI:n,layout:o,model:i,translator:a,constraints:l,theme:s,keyboard:c,rect:u,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,setPage:g,pageInfo:v,initialDataPages:b}=e,y=J4("ltr");t.render(Nr.createElement(Nr.StrictMode,null,Nr.createElement(Ty,{theme:y},Nr.createElement(B2,{app:r,selectionsAPI:n,layout:o,model:i,translator:a,constraints:l,theme:s,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,rect:u,setPage:g,pageInfo:v,initialDataPages:b},Nr.createElement(E6,null)))))}({app:t,layout:r,model:n,rect:o,theme:i,keyboard:a,translator:l,constraints:s,selectionsAPI:c,rootElement:d,embed:p,changeSortOrder:u,tableData:v,applyColumnWidths:m,setPage:y,pageInfo:b,initialDataPages:S},f)}),[t,r,n,o,i.name(),a.active,l,s,c,u,g,d,p,f,v,m,y,b,x,S,h])};var T6={SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um in den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerungen zu wechseln. Alle Angaben zur Tastaturnavigation finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate in table cells and tab to move to pagination controls. For the full range of keyboard navigation, see the documentation.","es-ES":"Use las teclas de flecha para navegar en las celdas de la tabla y la pestaña para moverse a los controles de paginación. Para conocer la gama completa de navegación con teclado, consulte la documentación.","fr-FR":"Utilisez les touches fléchées pour parcourir les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Pour connaître la gamme complète des commandes de navigation au clavier, voir la documentation.","it-IT":"Utilizzare i tasti freccia per navigare nelle celle della tabella e il tasto TAB per passare ai controlli di paginazione. Per informazioni complete sulla navigazione da tastiera, vedere la documentazione.","ja-JP":"矢印キーで表のセル内を移動し、タブ キーでページネーション コントロールに移動します。キーボード ナビゲーションの全範囲については、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 테이블 셀을 탐색하고 탭을 사용하여 페이지 매김 컨트롤로 이동합니다. 전체 키보드 탐색 범위는 설명서를 참조하십시오.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren in tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Raadpleeg de documentatie voor een volledig overzicht van de toetsenbordnavigatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się po komórkach tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Pełne informacje o nawigacji przy użyciu klawiatury zawiera dokumentacja.","pt-BR":"Use as setas para navegar nas células da tabela e Tab para mover para os controles de paginação. Para toda a gama de navegação do teclado, consulte a documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения по ячейкам таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Полный перечень возможностей навигации с помощью клавиатуры см. в документации.","sv-SE":"Använd piltangenterna för att navigera i tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Se dokumentationen för komplett information om tangentbordsnavigering.","tr-TR":"Tablo hücrelerinde gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Tam kapsamlı klavye gezintisi için belgelere bakın.","zh-CN":"使用箭头键在表格单元格中导航,使用 tab 键移动到分页控件。有关键盘导航的完整范围,请参阅文档。","zh-TW":"使用方向鍵以在表格儲存格中導覽,並使用 Tab 以前往分頁控制。如需完整的鍵盤導覽,請參閱文件。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Selecties wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대안 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{1}의 {0}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},SNTable_Pagination_FirstPage:{id:"SNTable.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}},SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"en-US":"Ascending"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"en-US":"Descending"}}};var D6=function(e){return e.FIRST="first-announcer-element",e.SECOND="second-announcer-element",e}(D6||{});const P6=(t,r)=>e.useMemo((()=>(function(e){if(e&&e.get&&e.add){const t="SNTable.Accessibility.RowsAndColumns";if(e.get(t)!==t)return;Object.keys(T6).forEach((t=>{e.add(T6[t])}))}}(r),()=>((e,t,r)=>{let n=r||null;return({keys:r,shouldBeAtomic:o=!0,politeness:i="polite"})=>{const a=r.map((e=>{if(Array.isArray(e)){const[r,...n]=e;return t.get(r,n)}return t.get(e)})).join(" "),l=e.querySelector("#sn-table-announcer--01"),s=e.querySelector("#sn-table-announcer--02");let c;n===D6.FIRST?(c=s,n=D6.SECOND):(c=l,n=D6.FIRST),c.innerHTML=c.innerHTML.endsWith(" ­")?a:`${a} ­`,c.setAttribute("aria-atomic",o.toString()),c.setAttribute("aria-live",i)}})(t,r))),[t,r.language()]),_6={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},N6=({env:t,app:r,model:n,rootElement:o,layout:i,constraints:a,translator:l,selectionsAPI:s,theme:c,changeSortOrder:u,keyboard:d,rect:p,embed:f,reactRoot:m,applyColumnWidths:h,isFontLoaded:g})=>{const v=!t.carbon&&!1!==i.usePagination,{direction:b,footerContainer:y}=e.useOptions(),S=P6(o,l),[x,C]=e.useState(_6),[w]=e.usePromise((async()=>v?async function(e,t,r,n){const{page:o,rowsPerPage:i,rowsPerPageOptions:a}=r,l=t.qHyperCube.qSize.qcx,s=t.qHyperCube.qSize.qcy,c=Math.ceil(s/i),u=o*i,d=Math.min(i,s-u);if(o>0&&u>=s&&r)return n({...r,page:0}),null;if(d*l>z3&&r)return n({...r,rowsPerPage:q3(l,a),page:0}),null;const p=s>10,f=F3(t),m=H3(t),h=(await e.getHyperCubeData("/qHyperCubeDef",[{qTop:u,qLeft:0,qHeight:d,qWidth:l}]))[0].qMatrix.map(((e,t)=>{const r={id:`row-${t}`};return m.forEach(((n,o)=>{r[n.id]={...e[o],align:W3(e[o],n.bodyTextAlign),rowIdx:t+u,colIdx:n.colIdx,pageRowIdx:t,pageColIdx:o,selectionColIdx:n.selectionColIdx,isSelectable:n.isDim&&!n.isLocked,isLastRow:t===d-1}})),r}));return{totalColumnCount:l,totalRowCount:s,totalPages:c,paginationNeeded:p,totalsPosition:f,columns:m,rows:h}}(n,i,x,C):null),[i,x,n,a,v]);e.useEffect((()=>{v&&m&&n&&r&&i&&w&&u&&c&&s&&g&&f&&R6({app:r,model:n,rootElement:o,layout:i,tableData:w,direction:b,pageInfo:x,setPageInfo:C,constraints:a,translator:l,selectionsAPI:s,theme:c,changeSortOrder:u,keyboard:d,rect:p,footerContainer:y,announce:S,embed:f,applyColumnWidths:h},m)}),[r,n,m,w,a,b,c.name(),d.active,S,u,h,v,i,s,f,o,x,C,l,p,y,g])},$6=({env:t,rootElement:r,model:n,theme:o,selectionsAPI:i,app:a,rect:l,layout:s,changeSortOrder:c,translator:u})=>{e.useEffect((()=>{t.carbon&&c&&o&&i&&R6({env:t,rootElement:r,model:n,theme:o,selectionsAPI:i,app:a,rect:l,layout:s,changeSortOrder:c})}),[s,n,null==i?void 0:i.isModal(),o,u.language(),a,c])},z6=(t,r)=>e.useMemo((()=>((e,t)=>(r,{isDim:n,colIdx:o})=>{const i=n?o:o-t.qDimensionInfo.length,a=`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,l=t[n?"qDimensionInfo":"qMeasureInfo"][i].columnWidth,s=l?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...l,...r})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(r)};null==e||e.applyPatches([s],!0)})(t,r)),[t,r]),q6=(t,r)=>{const{fontSize:n,fontFamily:o}=Z1(r,t,!1),{fontSize:i,fontFamily:a}=J1(r,t),[l,s]=e.usePromise((async()=>(await document.fonts.load(`600 ${n} ${o}`),await document.fonts.load(`${i} ${a}`),!0)),[n,o,i,a]);return s?(console.warn("Failed to load font:",s),!0):!!l};return function(t){return{qae:{properties:{initial:r},data:n()},ext:Kt(t),component(){const r=e.useElement(),n=k6(r),o=e.useStaleLayout(),i=e.useApp(),a=e.useModel(),l=e.useConstraints(),s=e.useTranslator(),c=e.useSelections(),u=e.useKeyboard(),d=e.useRect(),p=e.useEmbed(),f=M6(r),m=O6(a,o.qHyperCube),h=z6(a,o.qHyperCube),g=q6(f,o);null===e.onContextMenu||void 0===e.onContextMenu||e.onContextMenu(((e,t)=>{t.target&&t.target.closest(".sn-table-cell")&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",select:async()=>{Y2(t)}})})),I6({app:i,layout:o,model:a,rect:d,theme:f,keyboard:u,translator:s,constraints:l,selectionsAPI:c,changeSortOrder:m,rootElement:r,embed:p,reactRoot:n,applyColumnWidths:h,isFontLoaded:g}),N6({env:t,app:i,model:a,rootElement:r,layout:o,constraints:l,translator:s,selectionsAPI:c,theme:f,changeSortOrder:m,keyboard:u,rect:d,embed:p,reactRoot:n,applyColumnWidths:h,isFontLoaded:g}),$6({env:t,rootElement:r,model:a,theme:f,selectionsAPI:c,app:i,rect:d,layout:o,changeSortOrder:m,translator:s})}}}}));