@nebula.js/sn-pivot-table 7.43.0 → 7.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-pivot-table v7.43.0
2
+ * @nebula.js/sn-pivot-table v7.44.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var n,r,o,i,a,s,l,c,u,d,p,f,h,m,g,v,b,y,x,S,w,C,E,I,D,R,L,M,A,P,q,k,T,O,N,_,j,F,z,W,$,V,H,B,G,U,Y;return{setters:[function(e){n=e.default,r=e.createElement,o=e,i=e.isValidElement,a=e.cloneElement,s=e.Children,l=e.useRef,c=e.createContext,u=e.useReducer,d=e.useEffect,p=e.useDebugValue,f=e.useCallback,h=e.useContext,m=e.useState,g=e.useLayoutEffect,v=e.useMemo,b=e.useInsertionEffect,y=e.memo,x=e.forwardRef,S=e.startTransition,w=e.useImperativeHandle,C=e.PureComponent},function(e){E=e.default,I=e,D=e.flushSync},function(e){R=e.HyperCubeHandler,L=e.useMemo,M=e.useOptions,A=e.usePromise,P=e.useState,q=e.useEffect,k=e.useTheme,T=e.useInteractionState,O=e.onContextMenu,N=e.onTakeSnapshot,_=e.useImperativeHandle,j=e.useTranslator,F=e.useElement,z=e.useStaleLayout,W=e.useModel,$=e.useApp,V=e.useEmbed,H=e.useKeyboard,B=e.useSelections,G=e.useRect},function(e){U=e.default},function(e){Y=e.default}],execute:function(){e("default",function(e){return{qae:{properties:{initial:gz()},data:VA(e)},ext:nq(e),component(){hz(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",ne="#ce93d8",re="#ba68c8",oe="#ab47bc",ie="#9c27b0",ae="#7b1fa2",se="#e3f2fd",le="#90caf9",ce="#42a5f5",ue="#1976d2",de="#1565c0",pe="#4fc3f7",fe="#29b6f6",he="#03a9f4",me="#0288d1",ge="#01579b",ve="#81c784",be="#66bb6a",ye="#4caf50",xe="#388e3c",Se="#2e7d32",we="#1b5e20",Ce="#ffb74d",Ee="#ffa726",Ie="#ff9800",De="#f57c00",Re="#e65100",Le={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Me(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Ae=Object.freeze({__proto__:null,default:Me}),Pe="$$material";function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(null,arguments)}function ke(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var Te="-ms-",Oe="-moz-",Ne="-webkit-",_e="comm",je="rule",Fe="decl",ze="@keyframes",We=Math.abs,$e=String.fromCharCode,Ve=Object.assign;function He(e){return e.trim()}function Be(e,t){return(e=t.exec(e))?e[0]:e}function Ge(e,t,n){return e.replace(t,n)}function Ue(e,t,n){return e.indexOf(t,n)}function Ye(e,t){return 0|e.charCodeAt(t)}function Ke(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Je(e){return e.length}function Ze(e,t){return t.push(e),e}function Qe(e,t){return e.filter(function(e){return!Be(e,t)})}var et,tt,nt=1,rt=1,ot=0,it=0,at=0,st="";function lt(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:nt,column:rt,length:a,return:"",siblings:s}}function ct(e,t){return Ve(lt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ut(e){for(;e.root;)e=ct(e.root,{children:[e]});Ze(e,e.siblings)}function dt(){return at=it>0?Ye(st,--it):0,rt--,10===at&&(rt=1,nt--),at}function pt(){return at=it<ot?Ye(st,it++):0,rt++,10===at&&(rt=1,nt++),at}function ft(){return Ye(st,it)}function ht(){return it}function mt(e,t){return Ke(st,e,t)}function gt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vt(e){return He(mt(it-1,xt(91===e?e+2:40===e?e+1:e)))}function bt(e){for(;(at=ft())&&at<33;)pt();return gt(e)>2||gt(at)>3?"":" "}function yt(e,t){for(;--t&&pt()&&!(at<48||at>102||at>57&&at<65||at>70&&at<97););return mt(e,ht()+(t<6&&32==ft()&&32==pt()))}function xt(e){for(;pt();)switch(at){case e:return it;case 34:case 39:34!==e&&39!==e&&xt(at);break;case 40:41===e&&xt(e);break;case 92:pt()}return it}function St(e,t){for(;pt()&&e+at!==57&&(e+at!==84||47!==ft()););return"/*"+mt(t,it-1)+"*"+$e(47===e?e:pt())}function wt(e){for(;!gt(ft());)pt();return mt(e,it)}function Ct(e){return function(e){return st="",e}(Et("",null,null,null,[""],e=function(e){return nt=rt=1,ot=Xe(st=e),it=0,[]}(e),0,[0],e))}function Et(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,b=0,y="",x=o,S=i,w=r,C=y;g;)switch(h=b,b=pt()){case 40:if(108!=h&&58==Ye(C,d-1)){-1!=Ue(C+=Ge(vt(b),"&","&\f"),"&\f",We(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=vt(b);break;case 9:case 10:case 13:case 32:C+=bt(h);break;case 92:C+=yt(ht()-1,7);continue;case 47:switch(ft()){case 42:case 47:Ze(Dt(St(pt(),ht()),t,n,l),l),5!=gt(h||1)&&5!=gt(ft()||1)||!Xe(C)||" "===Ke(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[c++]=Xe(C)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==v&&(C=Ge(C,/\f/g,"")),f>0&&(Xe(C)-d||0===m&&47===h)&&Ze(f>32?Rt(C+";",r,n,d-1,l):Rt(Ge(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ze(w=It(C,t,n,c,u,o,s,y,x=[],S=[],d,i),i),123===b)if(0===u)Et(C,t,w,w,x,i,d,s,S);else{switch(p){case 99:if(110===Ye(C,3))break;case 108:if(97===Ye(C,2))break;default:u=0;case 100:case 109:case 115:}u?Et(e,w,w,r&&Ze(It(e,w,w,0,0,o,s,y,o,x=[],d,S),S),o,S,d,s,r?x:S):Et(C,w,w,w,[""],S,0,s,S)}}c=u=f=0,m=v=1,y=C="",d=a;break;case 58:d=1+Xe(C),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==dt())continue;switch(C+=$e(b),b*m){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Xe(C)-1)*v,v=1;break;case 64:45===ft()&&(C+=vt(pt())),p=ft(),u=d=Xe(y=C+=wt(ht())),b++;break;case 45:45===h&&2==Xe(C)&&(m=0)}}return i}function It(e,t,n,r,o,i,a,s,l,c,u,d){for(var p=o-1,f=0===o?i:[""],h=Je(f),m=0,g=0,v=0;m<r;++m)for(var b=0,y=Ke(e,p+1,p=We(g=a[m])),x=e;b<h;++b)(x=He(g>0?f[b]+" "+y:Ge(y,/&\f/g,f[b])))&&(l[v++]=x);return lt(e,t,n,0===o?je:s,l,c,u,d)}function Dt(e,t,n,r){return lt(e,t,n,_e,$e(at),Ke(e,2,-2),0,r)}function Rt(e,t,n,r,o){return lt(e,t,n,Fe,Ke(e,0,r),Ke(e,r+1,-1),r,o)}function Lt(e,t,n){switch(function(e,t){return 45^Ye(e,0)?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Ne+e+e;case 4855:return Ne+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Oe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+Oe+e+Te+e+e;case 5936:switch(Ye(e,t+11)){case 114:return Ne+e+Te+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+Te+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+Te+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ne+e+Te+e+e;case 6165:return Ne+e+Te+"flex-"+e+e;case 5187:return Ne+e+Ge(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+Te+"flex-$1$2")+e;case 5443:return Ne+e+Te+"flex-item-"+Ge(e,/flex-|-self/g,"")+(Be(e,/flex-|baseline/)?"":Te+"grid-row-"+Ge(e,/flex-|-self/g,""))+e;case 4675:return Ne+e+Te+"flex-line-pack"+Ge(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ne+e+Te+Ge(e,"shrink","negative")+e;case 5292:return Ne+e+Te+Ge(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Ge(e,"-grow","")+Ne+e+Te+Ge(e,"grow","positive")+e;case 4554:return Ne+Ge(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+Te+"flex-pack:$3"),/space-between/,"justify")+Ne+e+e;case 4200:if(!Be(e,/flex-|baseline/))return Te+"grid-column-align"+Ke(e,t)+e;break;case 2592:case 3360:return Te+Ge(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Be(e.props,/grid-\w+-end/)})?~Ue(e+(n=n[t].value),"span",0)?e:Te+Ge(e,"-start","")+e+Te+"grid-row-span:"+(~Ue(n,"span",0)?Be(n,/\d+/):+Be(n,/\d+/)-+Be(e,/\d+/))+";":Te+Ge(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return Be(e.props,/grid-\w+-start/)})?e:Te+Ge(Ge(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xe(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(45!==Ye(e,t+4))break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+Oe+(108==Ye(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch",0)?Lt(Ge(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ge(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return Te+n+":"+r+s+(o?Te+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===Ye(e,t+6))return Ge(e,":",":"+Ne)+e;break;case 6444:switch(Ye(e,45===Ye(e,14)?18:11)){case 120:return Ge(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ne+(45===Ye(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+Te+"$2box$3")+e;case 100:return Ge(e,":",":"+Te)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ge(e,"scroll-","scroll-snap-")+e}return e}function Mt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function At(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Fe:return e.return=e.return||e.value;case _e:return"";case ze:return e.return=e.value+"{"+Mt(e.children,r)+"}";case je:if(!Xe(e.value=e.props.join(",")))return""}return Xe(n=Mt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Pt(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Fe:return void(e.return=Lt(e.value,e.length,n));case ze:return Mt([ct(e,{value:Ge(e.value,"@","@"+Ne)})],r);case je:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(Be(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ut(ct(e,{props:[Ge(t,/:(read-\w+)/,":-moz-$1")]})),ut(ct(e,{props:[t]})),Ve(e,{props:Qe(n,r)});break;case"::placeholder":ut(ct(e,{props:[Ge(t,/:(plac\w+)/,":"+Ne+"input-$1")]})),ut(ct(e,{props:[Ge(t,/:(plac\w+)/,":-moz-$1")]})),ut(ct(e,{props:[Ge(t,/:(plac\w+)/,Te+"input-$1")]})),ut(ct(e,{props:[t]})),Ve(e,{props:Qe(n,r)})}return""})}}const qt="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",kt="active",Tt="data-styled-version",Ot="6.4.3",Nt="/*!sc*/\n",_t="undefined"!=typeof window&&"undefined"!=typeof document;function jt(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const Ft=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(tt=null!==(et=jt("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==et?et:jt("SC_DISABLE_SPEEDY"))&&void 0!==tt?tt:"undefined"!=typeof process&&void 0!==process.env&&!1),zt="sc-keyframes-",Wt={};function $t(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let Vt=new Map,Ht=new Map,Bt=1;const Gt=e=>{if(Vt.has(e))return Vt.get(e);for(;Ht.has(Bt);)Bt++;const t=Bt++;return Vt.set(e,t),Ht.set(t,e),t},Ut=e=>Ht.get(e),Yt=(e,t)=>{Bt=t+1,Vt.set(e,t),Ht.set(t,e)},Kt=Object.freeze([]),Xt=Object.freeze({});function Jt(e,t,n=Xt){return e.theme!==n.theme&&e.theme||t||n.theme}const Zt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Qt=/(^-|-$)/g;function en(e){return e.replace(Zt,"-").replace(Qt,"")}const tn=/(a)(d)/gi,nn=e=>String.fromCharCode(e+(e>25?39:97));function rn(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=nn(t%52)+n;return(nn(t%52)+n).replace(tn,"$1-$2")}const on=5381,an=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},sn=e=>an(on,e);function ln(e){return rn(sn(e)>>>0)}function cn(e){return"string"==typeof e&&!0}function un(e){return cn(e)?`styled.${e}`:`Styled(${function(e){return e.displayName||e.name||"Component"}(e)})`}const dn=Symbol.for("react.memo"),pn=Symbol.for("react.forward_ref"),fn={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},hn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},gn={[pn]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[dn]:mn};function vn(e){return("type"in(t=e)&&t.type.$$typeof)===dn?mn:"$$typeof"in e?gn[e.$$typeof]:fn;var t}const bn=Object.defineProperty,yn=Object.getOwnPropertyNames,xn=Object.getOwnPropertySymbols,Sn=Object.getOwnPropertyDescriptor,wn=Object.getPrototypeOf,Cn=Object.prototype;function En(e,t,n){if("string"!=typeof t){const r=wn(t);r&&r!==Cn&&En(e,r,n);const o=yn(t).concat(xn(t)),i=vn(e),a=vn(t);for(let r=0;r<o.length;++r){const s=o[r];if(!(s in hn||n&&n[s]||a&&s in a||i&&s in i)){const n=Sn(t,s);try{bn(e,s,n)}catch(e){}}}}return e}function In(e){return"function"==typeof e}const Dn=Symbol.for("react.forward_ref");function Rn(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===Dn&&"styledComponentId"in e}function Ln(e,t){return e&&t?e+" "+t:e||t||""}function Mn(e,t){return e.join("")}function An(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Pn(e,t,n=!1){if(!n&&!An(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=Pn(e[n],t[n]);else if(An(t))for(const n in t)e[n]=Pn(e[n],t[n]);return e}function qn(e,t){Object.defineProperty(e,"toString",{value:t})}const kn=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let r=n;for(;e>=r;)if(r<<=1,r<0)throw $t(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let o=0,i=t.length;o<i;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n;for(let e=r;e<o;e++)t+=this.tag.getRule(e)+Nt;return t}},Tn=`style[${qt}][${Tt}="${Ot}"]`,On=new RegExp(`^${qt}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Nn=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,_n=e=>{if(!e)return document;if(Nn(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(Nn(t))return t}return document},jn=(e,t,n)=>{const r=n.split(",");let o;for(let n=0,i=r.length;n<i;n++)(o=r[n])&&e.registerName(t,o)},Fn=(e,t)=>{var n;const r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Nt),o=[];for(let t=0,n=r.length;t<n;t++){const n=r[t].trim();if(!n)continue;const i=n.match(On);if(i){const t=0|parseInt(i[1],10),n=i[2];0!==t&&(Yt(n,t),jn(e,n,i[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(n)}},zn=e=>{const t=_n(e.options.target).querySelectorAll(Tn);for(let n=0,r=t.length;n<r;n++){const r=t[n];r&&r.getAttribute(qt)!==kt&&(Fn(e,r),r.parentNode&&r.parentNode.removeChild(r))}};let Wn=!1;const $n=(e,t)=>{const n=document.head,r=e||n,o=document.createElement("style"),i=(e=>{const t=Array.from(e.querySelectorAll(`style[${qt}]`));return t[t.length-1]})(r),a=void 0!==i?i.nextSibling:null;o.setAttribute(qt,kt),o.setAttribute(Tt,Ot);const s=t||function(){if(!1!==Wn)return Wn;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Wn=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Wn=t.getAttribute("content")||void 0}return Wn="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}();return s&&o.setAttribute("nonce",s),r.insertBefore(o,a),o},Vn=class{constructor(e,t){this.element=$n(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){const r=n[t];if(r.ownerNode===e)return r}throw $t(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Hn=class{constructor(e,t){this.element=$n(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Bn=_t;const Gn={isServer:!_t,useCSSOMInjection:!Ft};class Un{static registerId(e){return Gt(e)}constructor(e=Xt,t={},n){this.options=Object.assign(Object.assign({},Gn),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&_t&&Bn&&(Bn=!1,zn(this)),qn(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let r="";for(let o=0;o<n;o++){const n=Ut(o);if(void 0===n)continue;const i=e.names.get(n);if(void 0===i||!i.size)continue;const a=t.getGroup(o);if(0===a.length)continue;const s=qt+".g"+o+'[id="'+n+'"]';let l="";for(const e of i)e.length>0&&(l+=e+",");r+=a+s+'{content:"'+l+'"}'+Nt}return r})(this))}rehydrate(){!this.server&&_t&&zn(this)}reconstructWithOptions(e,t=!0){const n=new Un(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&_t&&e.target!==this.options.target&&_n(this.options.target)!==_n(e.target)&&zn(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new Vn(t,n):new Hn(t,n))(this.options),new kn(e)));var e}hasNameForId(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}registerName(e,t){Gt(e),e.startsWith(zt)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(Gt(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(Gt(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const Yn=new WeakSet,Kn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Xn(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Kn||e.startsWith("--")?String(t).trim():t+"px"}const Jn=47;function Zn(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const Qn=Symbol.for("sc-keyframes");function er(e){return In(e)&&!(e.prototype&&e.prototype.isReactComponent)}const tr=e=>null==e||!1===e||""===e,nr=Symbol.for("react.client.reference");function rr(e){return e.$$typeof===nr}function or(e,t){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!tr(r)&&(Array.isArray(r)&&Yn.has(r)||In(r)?t.push(Zn(n)+":",r,";"):An(r)?(t.push(n+" {"),or(r,t),t.push("}")):t.push(Zn(n)+": "+Xn(n,r)+";"))}}function ir(e,t,n,r,o=[]){if(tr(e))return o;const i=typeof e;if("string"===i)return o.push(e),o;if("function"===i){if(rr(e))return o;if(er(e)&&t){return ir(e(t),t,n,r,o)}return o.push(e),o}if(Array.isArray(e)){for(let i=0;i<e.length;i++)ir(e[i],t,n,r,o);return o}return Rn(e)?(o.push(`.${e.styledComponentId}`),o):function(e){return"object"==typeof e&&null!==e&&Qn in e}(e)?(n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o):rr(e)?o:An(e)?e.toString!==Object.prototype.toString?(o.push(e.toString()),o):(or(e,o),o):(o.push(e.toString()),o)}const ar=sn(Ot);class sr{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=an(ar,t),this.baseStyle=n,Un.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let o="";for(let r=0;r<this.rules.length;r++){const i=this.rules[r];if("string"==typeof i)o+=i;else if(i)if(er(i)){const r=i(e);"string"==typeof r?o+=r:null!=r&&!1!==r&&(o+=Mn(ir(r,e,t,n)))}else o+=Mn(ir(i,e,t,n))}if(o){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+o:o;let i=this.dynamicNameCache.get(e);if(!i){if(i=rn(an(an(this.baseHash,n.hash),o)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,i)}if(!t.hasNameForId(this.componentId,i)){const e=n(o,"."+i,void 0,this.componentId);t.insertRules(this.componentId,i,e)}r=Ln(r,i)}}return r}}const lr=/&/g;function cr(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function ur(e){const t=e.length;let n="",r=0,o=0,i=0,a=!1,s=!1;for(let l=0;l<t;l++){const c=e.charCodeAt(l);if(0!==i||a||c!==Jn||42!==e.charCodeAt(l+1))if(a)42===c&&e.charCodeAt(l+1)===Jn&&(a=!1,l++);else if(34!==c&&39!==c||cr(e,l)){if(0===i)if(123===c)o++;else if(125===c){if(o--,o<0){s=!0;let n=l+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,o=0,l=n-1,r=n;continue}0===o&&(n+=e.substring(r,l+1),r=l+1)}else 59===c&&0===o&&(n+=e.substring(r,l+1),r=l+1)}else 0===i?i=c:i===c&&(i=0);else a=!0,l++}return s||0!==o||0!==i?(r<t&&0===o&&0===i&&(n+=e.substring(r)),n):e}function dr(e,t){const n=t+" ",r=","+n;for(let o=0;o<e.length;o++){const i=e[o];if("rule"===i.type){i.value=(n+i.value).replaceAll(",",r);const e=i.props,t=[];for(let r=0;r<e.length;r++)t[r]=n+e[r];i.props=t}Array.isArray(i.children)&&"@keyframes"!==i.type&&dr(i.children,t)}return e}const pr=new Un,fr=function({options:e=Xt,plugins:t=Kt}=Xt){let n,r,o;const i=(e,t,o)=>o.startsWith(r)&&o.endsWith(r)&&o.replaceAll(r,"").length>0?`.${n}`:e,a=t.slice();a.push(e=>{e.type===je&&e.value.includes("&")&&(o||(o=new RegExp(`\\${r}\\b`,"g")),e.props[0]=e.props[0].replace(lr,r).replace(o,i))}),e.prefix&&a.push(Pt),a.push(At);let s=[];const l=function(e){var t=Je(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}(a.concat((d=e=>s.push(e),function(e){e.root||(e=e.return)&&d(e)}))),c=(t,i="",a="",c="&")=>{n=c,r=i,o=void 0;const u=function(e){const t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return ur(e);const r=e.length;let o="",i=0,a=0,s=0,l=0,c=0,u=!1;for(;a<r;){const t=e.charCodeAt(a);if(34!==t&&39!==t||cr(e,a))if(0===s)if(t===Jn&&a+1<r&&42===e.charCodeAt(a+1)){for(a+=2;a+1<r&&(42!==e.charCodeAt(a)||e.charCodeAt(a+1)!==Jn);)a++;a+=2}else if(40!==t)if(41!==t)if(l>0)a++;else if(42===t&&a+1<r&&e.charCodeAt(a+1)===Jn)o+=e.substring(i,a),a+=2,i=a,u=!0;else if(t===Jn&&a+1<r&&e.charCodeAt(a+1)===Jn){for(o+=e.substring(i,a);a<r&&10!==e.charCodeAt(a);)a++;i=a,u=!0}else 123===t?c++:125===t&&c--,a++;else l>0&&l--,a++;else l++,a++;else a++;else 0===s?s=t:s===t&&(s=0),a++}return u?(i<r&&(o+=e.substring(i)),0===c?o:ur(o)):0===c?e:ur(e)}(t);let d=Ct(a||i?a+" "+i+" { "+u+" }":u);return e.namespace&&(d=dr(d,e.namespace)),s=[],Mt(d,l),s},u=e;var d;let p=on;for(let e=0;e<t.length;e++)t[e].name||$t(15),p=an(p,t[e].name);return(null==u?void 0:u.namespace)&&(p=an(p,u.namespace)),(null==u?void 0:u.prefix)&&(p=an(p,"p")),c.hash=p!==on?p.toString():"",c}(),hr=n.createContext({shouldForwardProp:void 0,styleSheet:pr,stylis:fr,stylisPlugins:void 0});function mr(){return n.useContext(hr)}hr.Consumer;const gr=n.createContext(void 0);gr.Consumer;const vr=Object.prototype.hasOwnProperty,br={};function yr(e,t){const n="string"!=typeof e?"sc":en(e);br[n]=(br[n]||0)+1;const r=n+"-"+ln(Ot+n+br[n]);return t?t+"-"+r:r}function xr(e,t,o){const i=Rn(e),a=e,s=!cn(e),{attrs:l=Kt,componentId:c=yr(t.displayName,t.parentComponentId),displayName:u=un(e)}=t,d=t.displayName&&t.componentId?en(t.displayName)+"-"+t.componentId:t.componentId||c,p=i&&a.attrs?a.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=t;if(i&&a.shouldForwardProp){const e=a.shouldForwardProp;if(t.shouldForwardProp){const n=t.shouldForwardProp;f=(t,r)=>e(t,r)&&n(t,r)}else f=e}const h=new sr(o,d,i?a.componentStyle:void 0);function m(e,t){return function(e,t,o){const{attrs:i,componentStyle:a,defaultProps:s,foldedComponentIds:l,styledComponentId:c,target:u}=e,d=n.useContext(gr),p=mr(),f=e.shouldForwardProp||p.shouldForwardProp,h=Jt(t,d,s)||Xt;let m,g;{const e=n.useRef(null),r=e.current;if(null!==r&&r[1]===h&&r[2]===p.styleSheet&&r[3]===p.stylis&&r[7]===a&&function(e,t,n){const r=e,o=t;let i=0;for(const e in o)if(vr.call(o,e)&&(i++,r[e]!==o[e]))return!1;return i===n}(r[0],t,r[4]))m=r[5],g=r[6];else{m=function(e,t,n){const r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),o=e.length>1;for(let n=0;n<e.length;n++){const i=e[n],a=In(i)?i(o?Object.assign({},r):r):i;for(const e in a)"className"===e?r.className=Ln(r.className,a[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),a[e]):e in t&&void 0===t[e]||(r[e]=a[e])}return"className"in t&&"string"==typeof t.className&&(r.className=Ln(r.className,t.className)),r}(i,t,h),g=function(e,t,n,r){return e.generateAndInjectStyles(t,n,r)}(a,m,p.styleSheet,p.stylis);let n=0;for(const e in t)vr.call(t,e)&&n++;e.current=[t,h,p.styleSheet,p.stylis,n,m,g,a]}}const v=m.as||u,b=function(e,t,n,r){const o={};for(const i in e)void 0===e[i]||"$"===i[0]||"as"===i||"theme"===i&&e.theme===n||("forwardedAs"===i?o.as=e.forwardedAs:r&&!r(i,t)||(o[i]=e[i]));return o}(m,v,h,f);let y=Ln(l,c);return g&&(y+=" "+g),m.className&&(y+=" "+m.className),b[cn(v)&&v.includes("-")?"class":"className"]=y,o&&(b.ref=o),r(v,b)}(g,e,t)}m.displayName=u;let g=n.forwardRef(m);return g.attrs=p,g.componentStyle=h,g.displayName=u,g.shouldForwardProp=f,g.foldedComponentIds=i?Ln(a.foldedComponentIds,a.styledComponentId):"",g.styledComponentId=d,g.target=i?a.target:e,Object.defineProperty(g,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e,...t){for(const n of t)Pn(e,n,!0);return e}({},a.defaultProps,e):e}}),qn(g,()=>`.${g.styledComponentId}`),s&&En(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),g}var Sr=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function wr(e,t){const n=[e[0]];for(let r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}const Cr=e=>(Yn.add(e),e);function Er(e,...t){if(In(e)||An(e))return Cr(ir(wr(Kt,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?ir(n):Cr(ir(wr(n,t)))}function Ir(e,t,n=Xt){if(!t)throw $t(1,t);const r=(r,...o)=>e(t,n,Er(r,...o));return r.attrs=r=>Ir(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)})),r.withConfig=r=>Ir(e,t,Object.assign(Object.assign({},n),r)),r}const Dr=e=>Ir(xr,e),Rr=Dr;Sr.forEach(e=>{Rr[e]=Dr(e)});class Lr{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(In(n)&&!Rn(n))return!1}return!0}(e),Un.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,r){const o=this.componentId;if(this.isStatic){if(n.hasNameForId(o,o+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{const i=this.computeRules(e,t,n,r);n.insertRules(o,i.name,i.rules)}return}const i=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&i){const t=i.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,r){const o=Mn(ir(this.rules,t,n,r)),i={name:this.componentId+e,rules:r(o,"")};return this.instanceRules.set(e,i),i}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}}var Mr;class Ar{constructor(e,t){this[Mr]=!0,this.inject=(e,t=fr)=>{const n=this.getName(t);if(!e.hasNameForId(this.id,n)){const r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=zt+e,this.rules=t,Gt(this.id),qn(this,()=>{throw $t(12,String(this.name))})}getName(e=fr){return e.hash?this.name+rn(+e.hash>>>0):this.name}}function Pr(e,...t){const n=Mn(Er(e,...t)),r=ln(n);return new Ar(r,n)}function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch(e){}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}Mr=Qn;var Tr,Or,Nr,_r,jr,Fr={exports:{}};function zr(){if(Or)return Tr;Or=1;return Tr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wr(){if(_r)return Nr;_r=1;var e=zr();function t(){}function n(){}return n.resetWarningCache=t,Nr=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function $r(){return jr||(jr=1,Fr.exports=Wr()()),Fr.exports}var Vr=qr($r());function Hr(e){const{injectFirst:t,children:n}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return n}Hr.propTypes={children:Vr.node,injectFirst:Vr.bool};const Br=function(e,...t){const r=Er(e,...t),o=`sc-global-${ln(JSON.stringify(r))}`,i=new Lr(r,o),a=e=>{const t=mr(),r=n.useContext(gr);let a;{const e=n.useRef(null);null===e.current&&(e.current=t.styleSheet.allocateGSInstance(o)),a=e.current}t.styleSheet.server&&s(a,e,t.styleSheet,r,t.stylis);{const l=i.isStatic?[a,t.styleSheet,i]:[a,e,t.styleSheet,r,t.stylis,i],c=n.useRef(i);n.useLayoutEffect(()=>{t.styleSheet.server||(c.current!==i&&(t.styleSheet.clearRules(o),c.current=i),s(a,e,t.styleSheet,r,t.stylis))},l),n.useLayoutEffect(()=>()=>{t.styleSheet.server||i.removeStyles(a,t.styleSheet)},[a,t.styleSheet,i])}return t.styleSheet.server&&i.instanceRules.delete(a),null};function s(e,t,n,r,o){if(i.isStatic)i.renderStyles(e,Wt,n,o);else{const s=Object.assign(Object.assign({},t),{theme:Jt(t,r,a.defaultProps)});i.renderStyles(e,s,n,o)}}return n.memo(a)}(e=>{const{styles:t,defaultTheme:n={}}=e;return"function"==typeof t?t(null==(r=e.theme)||0===Object.keys(r).length?n:e.theme):t;var r});
7
+ System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var n,r,o,i,a,s,l,c,u,d,p,f,h,m,g,v,b,y,x,S,w,C,E,I,D,R,L,M,A,P,q,k,T,O,N,_,j,F,z,W,$,V,H,B,G,U,Y;return{setters:[function(e){n=e.default,r=e.createElement,o=e,i=e.isValidElement,a=e.cloneElement,s=e.Children,l=e.useRef,c=e.createContext,u=e.useReducer,d=e.useEffect,p=e.useDebugValue,f=e.useCallback,h=e.useContext,m=e.useState,g=e.useLayoutEffect,v=e.useMemo,b=e.useInsertionEffect,y=e.memo,x=e.forwardRef,S=e.startTransition,w=e.useImperativeHandle,C=e.PureComponent},function(e){E=e.default,I=e,D=e.flushSync},function(e){R=e.HyperCubeHandler,L=e.useMemo,M=e.useOptions,A=e.usePromise,P=e.useState,q=e.useEffect,k=e.useTheme,T=e.useInteractionState,O=e.onContextMenu,N=e.onTakeSnapshot,_=e.useImperativeHandle,j=e.useTranslator,F=e.useElement,z=e.useStaleLayout,W=e.useModel,$=e.useApp,V=e.useEmbed,H=e.useKeyboard,B=e.useSelections,G=e.useRect},function(e){U=e.default},function(e){Y=e.default}],execute:function(){e("default",function(e){return{qae:{properties:{initial:gz()},data:VA(e)},ext:nq(e),component(){hz(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",ne="#ce93d8",re="#ba68c8",oe="#ab47bc",ie="#9c27b0",ae="#7b1fa2",se="#e3f2fd",le="#90caf9",ce="#42a5f5",ue="#1976d2",de="#1565c0",pe="#4fc3f7",fe="#29b6f6",he="#03a9f4",me="#0288d1",ge="#01579b",ve="#81c784",be="#66bb6a",ye="#4caf50",xe="#388e3c",Se="#2e7d32",we="#1b5e20",Ce="#ffb74d",Ee="#ffa726",Ie="#ff9800",De="#f57c00",Re="#e65100",Le={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Me(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Ae=Object.freeze({__proto__:null,default:Me}),Pe="$$material";function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qe.apply(null,arguments)}function ke(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var Te="-ms-",Oe="-moz-",Ne="-webkit-",_e="comm",je="rule",Fe="decl",ze="@keyframes",We=Math.abs,$e=String.fromCharCode,Ve=Object.assign;function He(e){return e.trim()}function Be(e,t){return(e=t.exec(e))?e[0]:e}function Ge(e,t,n){return e.replace(t,n)}function Ue(e,t,n){return e.indexOf(t,n)}function Ye(e,t){return 0|e.charCodeAt(t)}function Ke(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Je(e){return e.length}function Ze(e,t){return t.push(e),e}function Qe(e,t){return e.filter(function(e){return!Be(e,t)})}var et,tt,nt=1,rt=1,ot=0,it=0,at=0,st="";function lt(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:nt,column:rt,length:a,return:"",siblings:s}}function ct(e,t){return Ve(lt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ut(e){for(;e.root;)e=ct(e.root,{children:[e]});Ze(e,e.siblings)}function dt(){return at=it>0?Ye(st,--it):0,rt--,10===at&&(rt=1,nt--),at}function pt(){return at=it<ot?Ye(st,it++):0,rt++,10===at&&(rt=1,nt++),at}function ft(){return Ye(st,it)}function ht(){return it}function mt(e,t){return Ke(st,e,t)}function gt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vt(e){return He(mt(it-1,xt(91===e?e+2:40===e?e+1:e)))}function bt(e){for(;(at=ft())&&at<33;)pt();return gt(e)>2||gt(at)>3?"":" "}function yt(e,t){for(;--t&&pt()&&!(at<48||at>102||at>57&&at<65||at>70&&at<97););return mt(e,ht()+(t<6&&32==ft()&&32==pt()))}function xt(e){for(;pt();)switch(at){case e:return it;case 34:case 39:34!==e&&39!==e&&xt(at);break;case 40:41===e&&xt(e);break;case 92:pt()}return it}function St(e,t){for(;pt()&&e+at!==57&&(e+at!==84||47!==ft()););return"/*"+mt(t,it-1)+"*"+$e(47===e?e:pt())}function wt(e){for(;!gt(ft());)pt();return mt(e,it)}function Ct(e){return function(e){return st="",e}(Et("",null,null,null,[""],e=function(e){return nt=rt=1,ot=Xe(st=e),it=0,[]}(e),0,[0],e))}function Et(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,b=0,y="",x=o,S=i,w=r,C=y;g;)switch(h=b,b=pt()){case 40:if(108!=h&&58==Ye(C,d-1)){-1!=Ue(C+=Ge(vt(b),"&","&\f"),"&\f",We(c?s[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=vt(b);break;case 9:case 10:case 13:case 32:C+=bt(h);break;case 92:C+=yt(ht()-1,7);continue;case 47:switch(ft()){case 42:case 47:Ze(Dt(St(pt(),ht()),t,n,l),l),5!=gt(h||1)&&5!=gt(ft()||1)||!Xe(C)||" "===Ke(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[c++]=Xe(C)*v;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==v&&(C=Ge(C,/\f/g,"")),f>0&&(Xe(C)-d||0===m&&47===h)&&Ze(f>32?Rt(C+";",r,n,d-1,l):Rt(Ge(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ze(w=It(C,t,n,c,u,o,s,y,x=[],S=[],d,i),i),123===b)if(0===u)Et(C,t,w,w,x,i,d,s,S);else{switch(p){case 99:if(110===Ye(C,3))break;case 108:if(97===Ye(C,2))break;default:u=0;case 100:case 109:case 115:}u?Et(e,w,w,r&&Ze(It(e,w,w,0,0,o,s,y,o,x=[],d,S),S),o,S,d,s,r?x:S):Et(C,w,w,w,[""],S,0,s,S)}}c=u=f=0,m=v=1,y=C="",d=a;break;case 58:d=1+Xe(C),f=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==dt())continue;switch(C+=$e(b),b*m){case 38:v=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Xe(C)-1)*v,v=1;break;case 64:45===ft()&&(C+=vt(pt())),p=ft(),u=d=Xe(y=C+=wt(ht())),b++;break;case 45:45===h&&2==Xe(C)&&(m=0)}}return i}function It(e,t,n,r,o,i,a,s,l,c,u,d){for(var p=o-1,f=0===o?i:[""],h=Je(f),m=0,g=0,v=0;m<r;++m)for(var b=0,y=Ke(e,p+1,p=We(g=a[m])),x=e;b<h;++b)(x=He(g>0?f[b]+" "+y:Ge(y,/&\f/g,f[b])))&&(l[v++]=x);return lt(e,t,n,0===o?je:s,l,c,u,d)}function Dt(e,t,n,r){return lt(e,t,n,_e,$e(at),Ke(e,2,-2),0,r)}function Rt(e,t,n,r,o){return lt(e,t,n,Fe,Ke(e,0,r),Ke(e,r+1,-1),r,o)}function Lt(e,t,n){switch(function(e,t){return 45^Ye(e,0)?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Ne+e+e;case 4855:return Ne+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Oe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+Oe+e+Te+e+e;case 5936:switch(Ye(e,t+11)){case 114:return Ne+e+Te+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+Te+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+Te+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ne+e+Te+e+e;case 6165:return Ne+e+Te+"flex-"+e+e;case 5187:return Ne+e+Ge(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+Te+"flex-$1$2")+e;case 5443:return Ne+e+Te+"flex-item-"+Ge(e,/flex-|-self/g,"")+(Be(e,/flex-|baseline/)?"":Te+"grid-row-"+Ge(e,/flex-|-self/g,""))+e;case 4675:return Ne+e+Te+"flex-line-pack"+Ge(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ne+e+Te+Ge(e,"shrink","negative")+e;case 5292:return Ne+e+Te+Ge(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Ge(e,"-grow","")+Ne+e+Te+Ge(e,"grow","positive")+e;case 4554:return Ne+Ge(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+Te+"flex-pack:$3"),/space-between/,"justify")+Ne+e+e;case 4200:if(!Be(e,/flex-|baseline/))return Te+"grid-column-align"+Ke(e,t)+e;break;case 2592:case 3360:return Te+Ge(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Be(e.props,/grid-\w+-end/)})?~Ue(e+(n=n[t].value),"span",0)?e:Te+Ge(e,"-start","")+e+Te+"grid-row-span:"+(~Ue(n,"span",0)?Be(n,/\d+/):+Be(n,/\d+/)-+Be(e,/\d+/))+";":Te+Ge(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return Be(e.props,/grid-\w+-start/)})?e:Te+Ge(Ge(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xe(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(45!==Ye(e,t+4))break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+Oe+(108==Ye(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch",0)?Lt(Ge(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ge(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return Te+n+":"+r+s+(o?Te+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===Ye(e,t+6))return Ge(e,":",":"+Ne)+e;break;case 6444:switch(Ye(e,45===Ye(e,14)?18:11)){case 120:return Ge(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ne+(45===Ye(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+Te+"$2box$3")+e;case 100:return Ge(e,":",":"+Te)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ge(e,"scroll-","scroll-snap-")+e}return e}function Mt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function At(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Fe:return e.return=e.return||e.value;case _e:return"";case ze:return e.return=e.value+"{"+Mt(e.children,r)+"}";case je:if(!Xe(e.value=e.props.join(",")))return""}return Xe(n=Mt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Pt(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Fe:return void(e.return=Lt(e.value,e.length,n));case ze:return Mt([ct(e,{value:Ge(e.value,"@","@"+Ne)})],r);case je:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(Be(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ut(ct(e,{props:[Ge(t,/:(read-\w+)/,":-moz-$1")]})),ut(ct(e,{props:[t]})),Ve(e,{props:Qe(n,r)});break;case"::placeholder":ut(ct(e,{props:[Ge(t,/:(plac\w+)/,":"+Ne+"input-$1")]})),ut(ct(e,{props:[Ge(t,/:(plac\w+)/,":-moz-$1")]})),ut(ct(e,{props:[Ge(t,/:(plac\w+)/,Te+"input-$1")]})),ut(ct(e,{props:[t]})),Ve(e,{props:Qe(n,r)})}return""})}}const qt="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",kt="active",Tt="data-styled-version",Ot="6.4.3",Nt="/*!sc*/\n",_t="undefined"!=typeof window&&"undefined"!=typeof document;function jt(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const Ft=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(tt=null!==(et=jt("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==et?et:jt("SC_DISABLE_SPEEDY"))&&void 0!==tt?tt:"undefined"!=typeof process&&void 0!==process.env&&!1),zt="sc-keyframes-",Wt={};function $t(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let Vt=new Map,Ht=new Map,Bt=1;const Gt=e=>{if(Vt.has(e))return Vt.get(e);for(;Ht.has(Bt);)Bt++;const t=Bt++;return Vt.set(e,t),Ht.set(t,e),t},Ut=e=>Ht.get(e),Yt=(e,t)=>{Bt=t+1,Vt.set(e,t),Ht.set(t,e)},Kt=Object.freeze([]),Xt=Object.freeze({});function Jt(e,t,n=Xt){return e.theme!==n.theme&&e.theme||t||n.theme}const Zt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Qt=/(^-|-$)/g;function en(e){return e.replace(Zt,"-").replace(Qt,"")}const tn=/(a)(d)/gi,nn=e=>String.fromCharCode(e+(e>25?39:97));function rn(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=nn(t%52)+n;return(nn(t%52)+n).replace(tn,"$1-$2")}const on=5381,an=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},sn=e=>an(on,e);function ln(e){return rn(sn(e)>>>0)}function cn(e){return"string"==typeof e&&!0}function un(e){return cn(e)?`styled.${e}`:`Styled(${function(e){return e.displayName||e.name||"Component"}(e)})`}const dn=Symbol.for("react.memo"),pn=Symbol.for("react.forward_ref"),fn={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},hn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},gn={[pn]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[dn]:mn};function vn(e){return("type"in(t=e)&&t.type.$$typeof)===dn?mn:"$$typeof"in e?gn[e.$$typeof]:fn;var t}const bn=Object.defineProperty,yn=Object.getOwnPropertyNames,xn=Object.getOwnPropertySymbols,Sn=Object.getOwnPropertyDescriptor,wn=Object.getPrototypeOf,Cn=Object.prototype;function En(e,t,n){if("string"!=typeof t){const r=wn(t);r&&r!==Cn&&En(e,r,n);const o=yn(t).concat(xn(t)),i=vn(e),a=vn(t);for(let r=0;r<o.length;++r){const s=o[r];if(!(s in hn||n&&n[s]||a&&s in a||i&&s in i)){const n=Sn(t,s);try{bn(e,s,n)}catch(e){}}}}return e}function In(e){return"function"==typeof e}const Dn=Symbol.for("react.forward_ref");function Rn(e){return null!=e&&("object"==typeof e||"function"==typeof e)&&e.$$typeof===Dn&&"styledComponentId"in e}function Ln(e,t){return e&&t?e+" "+t:e||t||""}function Mn(e,t){return e.join("")}function An(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Pn(e,t,n=!1){if(!n&&!An(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=Pn(e[n],t[n]);else if(An(t))for(const n in t)e[n]=Pn(e[n],t[n]);return e}function qn(e,t){Object.defineProperty(e,"toString",{value:t})}const kn=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let r=n;for(;e>=r;)if(r<<=1,r<0)throw $t(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let o=0,i=t.length;o<i;o++)this.tag.insertRule(n,t[o])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n;for(let e=r;e<o;e++)t+=this.tag.getRule(e)+Nt;return t}},Tn=`style[${qt}][${Tt}="${Ot}"]`,On=new RegExp(`^${qt}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Nn=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,_n=e=>{if(!e)return document;if(Nn(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(Nn(t))return t}return document},jn=(e,t,n)=>{const r=n.split(",");let o;for(let n=0,i=r.length;n<i;n++)(o=r[n])&&e.registerName(t,o)},Fn=(e,t)=>{var n;const r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Nt),o=[];for(let t=0,n=r.length;t<n;t++){const n=r[t].trim();if(!n)continue;const i=n.match(On);if(i){const t=0|parseInt(i[1],10),n=i[2];0!==t&&(Yt(n,t),jn(e,n,i[3]),e.getTag().insertRules(t,o)),o.length=0}else o.push(n)}},zn=e=>{const t=_n(e.options.target).querySelectorAll(Tn);for(let n=0,r=t.length;n<r;n++){const r=t[n];r&&r.getAttribute(qt)!==kt&&(Fn(e,r),r.parentNode&&r.parentNode.removeChild(r))}};let Wn=!1;const $n=(e,t)=>{const n=document.head,r=e||n,o=document.createElement("style"),i=(e=>{const t=Array.from(e.querySelectorAll(`style[${qt}]`));return t[t.length-1]})(r),a=void 0!==i?i.nextSibling:null;o.setAttribute(qt,kt),o.setAttribute(Tt,Ot);const s=t||function(){if(!1!==Wn)return Wn;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return Wn=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return Wn=t.getAttribute("content")||void 0}return Wn="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}();return s&&o.setAttribute("nonce",s),r.insertBefore(o,a),o},Vn=class{constructor(e,t){this.element=$n(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){const r=n[t];if(r.ownerNode===e)return r}throw $t(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Hn=class{constructor(e,t){this.element=$n(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Bn=_t;const Gn={isServer:!_t,useCSSOMInjection:!Ft};class Un{static registerId(e){return Gt(e)}constructor(e=Xt,t={},n){this.options=Object.assign(Object.assign({},Gn),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&_t&&Bn&&(Bn=!1,zn(this)),qn(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let r="";for(let o=0;o<n;o++){const n=Ut(o);if(void 0===n)continue;const i=e.names.get(n);if(void 0===i||!i.size)continue;const a=t.getGroup(o);if(0===a.length)continue;const s=qt+".g"+o+'[id="'+n+'"]';let l="";for(const e of i)e.length>0&&(l+=e+",");r+=a+s+'{content:"'+l+'"}'+Nt}return r})(this))}rehydrate(){!this.server&&_t&&zn(this)}reconstructWithOptions(e,t=!0){const n=new Un(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&_t&&e.target!==this.options.target&&_n(this.options.target)!==_n(e.target)&&zn(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new Vn(t,n):new Hn(t,n))(this.options),new kn(e)));var e}hasNameForId(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}registerName(e,t){Gt(e),e.startsWith(zt)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(Gt(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(Gt(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const Yn=new WeakSet,Kn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Xn(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Kn||e.startsWith("--")?String(t).trim():t+"px"}const Jn=47;function Zn(e){if(45===e.charCodeAt(0)&&45===e.charCodeAt(1))return e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const Qn=Symbol.for("sc-keyframes");function er(e){return In(e)&&!(e.prototype&&e.prototype.isReactComponent)}const tr=e=>null==e||!1===e||""===e,nr=Symbol.for("react.client.reference");function rr(e){return e.$$typeof===nr}function or(e,t){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!tr(r)&&(Array.isArray(r)&&Yn.has(r)||In(r)?t.push(Zn(n)+":",r,";"):An(r)?(t.push(n+" {"),or(r,t),t.push("}")):t.push(Zn(n)+": "+Xn(n,r)+";"))}}function ir(e,t,n,r,o=[]){if(tr(e))return o;const i=typeof e;if("string"===i)return o.push(e),o;if("function"===i){if(rr(e))return o;if(er(e)&&t){return ir(e(t),t,n,r,o)}return o.push(e),o}if(Array.isArray(e)){for(let i=0;i<e.length;i++)ir(e[i],t,n,r,o);return o}return Rn(e)?(o.push(`.${e.styledComponentId}`),o):function(e){return"object"==typeof e&&null!==e&&Qn in e}(e)?(n?(e.inject(n,r),o.push(e.getName(r))):o.push(e),o):rr(e)?o:An(e)?e.toString!==Object.prototype.toString?(o.push(e.toString()),o):(or(e,o),o):(o.push(e.toString()),o)}const ar=sn(Ot);class sr{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=an(ar,t),this.baseStyle=n,Un.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let o="";for(let r=0;r<this.rules.length;r++){const i=this.rules[r];if("string"==typeof i)o+=i;else if(i)if(er(i)){const r=i(e);"string"==typeof r?o+=r:null!=r&&!1!==r&&(o+=Mn(ir(r,e,t,n)))}else o+=Mn(ir(i,e,t,n))}if(o){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+o:o;let i=this.dynamicNameCache.get(e);if(!i){if(i=rn(an(an(this.baseHash,n.hash),o)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,i)}if(!t.hasNameForId(this.componentId,i)){const e=n(o,"."+i,void 0,this.componentId);t.insertRules(this.componentId,i,e)}r=Ln(r,i)}}return r}}const lr=/&/g;function cr(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function ur(e){const t=e.length;let n="",r=0,o=0,i=0,a=!1,s=!1;for(let l=0;l<t;l++){const c=e.charCodeAt(l);if(0!==i||a||c!==Jn||42!==e.charCodeAt(l+1))if(a)42===c&&e.charCodeAt(l+1)===Jn&&(a=!1,l++);else if(34!==c&&39!==c||cr(e,l)){if(0===i)if(123===c)o++;else if(125===c){if(o--,o<0){s=!0;let n=l+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,o=0,l=n-1,r=n;continue}0===o&&(n+=e.substring(r,l+1),r=l+1)}else 59===c&&0===o&&(n+=e.substring(r,l+1),r=l+1)}else 0===i?i=c:i===c&&(i=0);else a=!0,l++}return s||0!==o||0!==i?(r<t&&0===o&&0===i&&(n+=e.substring(r)),n):e}function dr(e,t){const n=t+" ",r=","+n;for(let o=0;o<e.length;o++){const i=e[o];if("rule"===i.type){i.value=(n+i.value).replaceAll(",",r);const e=i.props,t=[];for(let r=0;r<e.length;r++)t[r]=n+e[r];i.props=t}Array.isArray(i.children)&&"@keyframes"!==i.type&&dr(i.children,t)}return e}const pr=new Un,fr=function({options:e=Xt,plugins:t=Kt}=Xt){let n,r,o;const i=(e,t,o)=>o.startsWith(r)&&o.endsWith(r)&&o.replaceAll(r,"").length>0?`.${n}`:e,a=t.slice();a.push(e=>{e.type===je&&e.value.includes("&")&&(o||(o=new RegExp(`\\${r}\\b`,"g")),e.props[0]=e.props[0].replace(lr,r).replace(o,i))}),e.prefix&&a.push(Pt),a.push(At);let s=[];const l=function(e){var t=Je(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}(a.concat((d=e=>s.push(e),function(e){e.root||(e=e.return)&&d(e)}))),c=(t,i="",a="",c="&")=>{n=c,r=i,o=void 0;const u=function(e){const t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return ur(e);const r=e.length;let o="",i=0,a=0,s=0,l=0,c=0,u=!1;for(;a<r;){const t=e.charCodeAt(a);if(34!==t&&39!==t||cr(e,a))if(0===s)if(t===Jn&&a+1<r&&42===e.charCodeAt(a+1)){for(a+=2;a+1<r&&(42!==e.charCodeAt(a)||e.charCodeAt(a+1)!==Jn);)a++;a+=2}else if(40!==t)if(41!==t)if(l>0)a++;else if(42===t&&a+1<r&&e.charCodeAt(a+1)===Jn)o+=e.substring(i,a),a+=2,i=a,u=!0;else if(t===Jn&&a+1<r&&e.charCodeAt(a+1)===Jn){for(o+=e.substring(i,a);a<r&&10!==e.charCodeAt(a);)a++;i=a,u=!0}else 123===t?c++:125===t&&c--,a++;else l>0&&l--,a++;else l++,a++;else a++;else 0===s?s=t:s===t&&(s=0),a++}return u?(i<r&&(o+=e.substring(i)),0===c?o:ur(o)):0===c?e:ur(e)}(t);let d=Ct(a||i?a+" "+i+" { "+u+" }":u);return e.namespace&&(d=dr(d,e.namespace)),s=[],Mt(d,l),s},u=e;var d;let p=on;for(let e=0;e<t.length;e++)t[e].name||$t(15),p=an(p,t[e].name);return(null==u?void 0:u.namespace)&&(p=an(p,u.namespace)),(null==u?void 0:u.prefix)&&(p=an(p,"p")),c.hash=p!==on?p.toString():"",c}(),hr=n.createContext({shouldForwardProp:void 0,styleSheet:pr,stylis:fr,stylisPlugins:void 0});function mr(){return n.useContext(hr)}hr.Consumer;const gr=n.createContext(void 0);gr.Consumer;const vr=Object.prototype.hasOwnProperty,br={};function yr(e,t){const n="string"!=typeof e?"sc":en(e);br[n]=(br[n]||0)+1;const r=n+"-"+ln(Ot+n+br[n]);return t?t+"-"+r:r}function xr(e,t,o){const i=Rn(e),a=e,s=!cn(e),{attrs:l=Kt,componentId:c=yr(t.displayName,t.parentComponentId),displayName:u=un(e)}=t,d=t.displayName&&t.componentId?en(t.displayName)+"-"+t.componentId:t.componentId||c,p=i&&a.attrs?a.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=t;if(i&&a.shouldForwardProp){const e=a.shouldForwardProp;if(t.shouldForwardProp){const n=t.shouldForwardProp;f=(t,r)=>e(t,r)&&n(t,r)}else f=e}const h=new sr(o,d,i?a.componentStyle:void 0);function m(e,t){return function(e,t,o){const{attrs:i,componentStyle:a,defaultProps:s,foldedComponentIds:l,styledComponentId:c,target:u}=e,d=n.useContext(gr),p=mr(),f=e.shouldForwardProp||p.shouldForwardProp,h=Jt(t,d,s)||Xt;let m,g;{const e=n.useRef(null),r=e.current;if(null!==r&&r[1]===h&&r[2]===p.styleSheet&&r[3]===p.stylis&&r[7]===a&&function(e,t,n){const r=e,o=t;let i=0;for(const e in o)if(vr.call(o,e)&&(i++,r[e]!==o[e]))return!1;return i===n}(r[0],t,r[4]))m=r[5],g=r[6];else{m=function(e,t,n){const r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),o=e.length>1;for(let n=0;n<e.length;n++){const i=e[n],a=In(i)?i(o?Object.assign({},r):r):i;for(const e in a)"className"===e?r.className=Ln(r.className,a[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),a[e]):e in t&&void 0===t[e]||(r[e]=a[e])}return"className"in t&&"string"==typeof t.className&&(r.className=Ln(r.className,t.className)),r}(i,t,h),g=function(e,t,n,r){return e.generateAndInjectStyles(t,n,r)}(a,m,p.styleSheet,p.stylis);let n=0;for(const e in t)vr.call(t,e)&&n++;e.current=[t,h,p.styleSheet,p.stylis,n,m,g,a]}}const v=m.as||u,b=function(e,t,n,r){const o={};for(const i in e)void 0===e[i]||"$"===i[0]||"as"===i||"theme"===i&&e.theme===n||("forwardedAs"===i?o.as=e.forwardedAs:r&&!r(i,t)||(o[i]=e[i]));return o}(m,v,h,f);let y=Ln(l,c);return g&&(y+=" "+g),m.className&&(y+=" "+m.className),b[cn(v)&&v.includes("-")?"class":"className"]=y,o&&(b.ref=o),r(v,b)}(g,e,t)}m.displayName=u;let g=n.forwardRef(m);return g.attrs=p,g.componentStyle=h,g.displayName=u,g.shouldForwardProp=f,g.foldedComponentIds=i?Ln(a.foldedComponentIds,a.styledComponentId):"",g.styledComponentId=d,g.target=i?a.target:e,Object.defineProperty(g,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=i?function(e,...t){for(const n of t)Pn(e,n,!0);return e}({},a.defaultProps,e):e}}),qn(g,()=>`.${g.styledComponentId}`),s&&En(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),g}var Sr=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function wr(e,t){const n=[e[0]];for(let r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}const Cr=e=>(Yn.add(e),e);function Er(e,...t){if(In(e)||An(e))return Cr(ir(wr(Kt,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?ir(n):Cr(ir(wr(n,t)))}function Ir(e,t,n=Xt){if(!t)throw $t(1,t);const r=(r,...o)=>e(t,n,Er(r,...o));return r.attrs=r=>Ir(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)})),r.withConfig=r=>Ir(e,t,Object.assign(Object.assign({},n),r)),r}const Dr=e=>Ir(xr,e),Rr=Dr;Sr.forEach(e=>{Rr[e]=Dr(e)});let Lr=class{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(In(n)&&!Rn(n))return!1}return!0}(e),Un.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,r){const o=this.componentId;if(this.isStatic){if(n.hasNameForId(o,o+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{const i=this.computeRules(e,t,n,r);n.insertRules(o,i.name,i.rules)}return}const i=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&i){const t=i.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,r){const o=Mn(ir(this.rules,t,n,r)),i={name:this.componentId+e,rules:r(o,"")};return this.instanceRules.set(e,i),i}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}};var Mr;class Ar{constructor(e,t){this[Mr]=!0,this.inject=(e,t=fr)=>{const n=this.getName(t);if(!e.hasNameForId(this.id,n)){const r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=zt+e,this.rules=t,Gt(this.id),qn(this,()=>{throw $t(12,String(this.name))})}getName(e=fr){return e.hash?this.name+rn(+e.hash>>>0):this.name}}function Pr(e,...t){const n=Mn(Er(e,...t)),r=ln(n);return new Ar(r,n)}function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kr(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch(e){}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}Mr=Qn;var Tr,Or,Nr,_r,jr,Fr={exports:{}};function zr(){if(Or)return Tr;Or=1;return Tr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wr(){if(_r)return Nr;_r=1;var e=zr();function t(){}function n(){}return n.resetWarningCache=t,Nr=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}function $r(){return jr||(jr=1,Fr.exports=Wr()()),Fr.exports}var Vr=qr($r());function Hr(e){const{injectFirst:t,children:n}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return n}Hr.propTypes={children:Vr.node,injectFirst:Vr.bool};const Br=function(e,...t){const r=Er(e,...t),o=`sc-global-${ln(JSON.stringify(r))}`,i=new Lr(r,o),a=e=>{const t=mr(),r=n.useContext(gr);let a;{const e=n.useRef(null);null===e.current&&(e.current=t.styleSheet.allocateGSInstance(o)),a=e.current}t.styleSheet.server&&s(a,e,t.styleSheet,r,t.stylis);{const l=i.isStatic?[a,t.styleSheet,i]:[a,e,t.styleSheet,r,t.stylis,i],c=n.useRef(i);n.useLayoutEffect(()=>{t.styleSheet.server||(c.current!==i&&(t.styleSheet.clearRules(o),c.current=i),s(a,e,t.styleSheet,r,t.stylis))},l),n.useLayoutEffect(()=>()=>{t.styleSheet.server||i.removeStyles(a,t.styleSheet)},[a,t.styleSheet,i])}return t.styleSheet.server&&i.instanceRules.delete(a),null};function s(e,t,n,r,o){if(i.isStatic)i.renderStyles(e,Wt,n,o);else{const s=Object.assign(Object.assign({},t),{theme:Jt(t,r,a.defaultProps)});i.renderStyles(e,s,n,o)}}return n.memo(a)}(e=>{const{styles:t,defaultTheme:n={}}=e;return"function"==typeof t?t(null==(r=e.theme)||0===Object.keys(r).length?n:e.theme):t;var r});
8
8
  /**
9
9
  * @mui/styled-engine-sc v6.4.3
10
10
  *
@@ -85,6 +85,6 @@ function Gr(e,t){let n;return n=t?Rr(e).withConfig({displayName:t.label,shouldFo
85
85
  animation-iteration-count: infinite;
86
86
  animation-delay: 200ms;
87
87
  }
88
- `),ll.rippleVisible,ml,550,({theme:e})=>e.transitions.easing.easeInOut,ll.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ll.child,ll.childLeaving,gl,550,({theme:e})=>e.transitions.easing.easeInOut,ll.childPulsate,vl,({theme:e})=>e.transitions.easing.easeInOut),xl=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a}=n,s=ke(n,cl),[l,c]=o.useState([]),u=o.useRef(0),d=o.useRef(null);o.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=o.useRef(!1),f=aa(),h=o.useRef(null),m=o.useRef(null),g=o.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c(e=>[...e,hi.jsx(yl,{classes:{ripple:Ci(i.ripple,ll.ripple),rippleVisible:Ci(i.rippleVisible,ll.rippleVisible),ripplePulsate:Ci(i.ripplePulsate,ll.ripplePulsate),child:Ci(i.child,ll.child),childLeaving:Ci(i.childLeaving,ll.childLeaving),childPulsate:Ci(i.childPulsate,ll.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,d.current=a},[i]),v=o.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,()=>{h.current&&(h.current(),h.current=null)})):g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},[r,g,f]),b=o.useCallback(()=>{v({},{pulsate:!0})},[v]),y=o.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,()=>{y(e,t)});h.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[f]);return o.useImperativeHandle(t,()=>({pulsate:b,start:v,stop:y}),[b,v,y]),hi.jsx(bl,qe({className:Ci(ll.root,i.root,a),ref:m},s,{children:hi.jsx(tl,{component:null,exit:!0,children:l})}))});function Sl(e){return Di("MuiButtonBase",e)}const wl=Ri("MuiButtonBase",["root","disabled","focusVisible"]),Cl=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],El=Ms("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${wl.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Il=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:f="a",onBlur:h,onClick:m,onContextMenu:g,onDragLeave:v,onFocus:b,onFocusVisible:y,onKeyDown:x,onKeyUp:S,onMouseDown:w,onMouseLeave:C,onMouseUp:E,onTouchEnd:I,onTouchMove:D,onTouchStart:R,tabIndex:L=0,TouchRippleProps:M,touchRippleRef:A,type:P}=n,q=ke(n,Cl),k=o.useRef(null),T=o.useRef(null),O=na(T,A),{isFocusVisibleRef:N,onFocus:_,onBlur:j,ref:F}=ma(),[z,W]=o.useState(!1);c&&z&&W(!1),o.useImperativeHandle(r,()=>({focusVisible:()=>{W(!0),k.current.focus()}}),[]);const[$,V]=o.useState(!1);o.useEffect(()=>{V(!0)},[]);const H=$&&!u&&!c;function B(e,t,n=d){return ta(r=>{t&&t(r);return!n&&T.current&&T.current[e](r),!0})}o.useEffect(()=>{z&&p&&!u&&$&&T.current.pulsate()},[u,p,z,$]);const G=B("start",w),U=B("stop",g),Y=B("stop",v),K=B("stop",E),X=B("stop",e=>{z&&e.preventDefault(),C&&C(e)}),J=B("start",R),Z=B("stop",I),Q=B("stop",D),ee=B("stop",e=>{j(e),!1===N.current&&W(!1),h&&h(e)},!1),te=ta(e=>{k.current||(k.current=e.currentTarget),_(e),!0===N.current&&(W(!0),y&&y(e)),b&&b(e)}),ne=()=>{const e=k.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=o.useRef(!1),oe=ta(e=>{p&&!re.current&&z&&T.current&&" "===e.key&&(re.current=!0,T.current.stop(e,()=>{T.current.start(e)})),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))}),ie=ta(e=>{p&&" "===e.key&&T.current&&z&&!e.defaultPrevented&&(re.current=!1,T.current.stop(e,()=>{T.current.pulsate(e)})),S&&S(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)});let ae=l;"button"===ae&&(q.href||q.to)&&(ae=f);const se={};"button"===ae?(se.type=void 0===P?"button":P,se.disabled=c):(q.href||q.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=na(t,F,k),ce=qe({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:L,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=va({root:["root",t&&"disabled",n&&"focusVisible"]},Sl,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return hi.jsxs(El,qe({as:ae,className:Ci(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:G,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:L,type:P},se,q,{children:[a,H?hi.jsx(xl,qe({ref:O,center:i},M)):null]}))});function Dl(e){return Di("MuiTypography",e)}Ri("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Rl=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Ll=Ms("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${lo(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>qe({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Ml={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Al={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Pl=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiTypography"}),r=(e=>Al[e]||e)(n.color),o=bi(qe({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Ml}=o,f=ke(o,Rl),h=qe({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Ml[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return va({root:["root",i,"inherit"!==e.align&&`align${lo(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Dl,a)})(h);return hi.jsx(Ll,qe({as:m,ref:t,ownerState:h,className:Ci(g.root,a)},f))});const ql=o.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[a,s]=o.useState(null),l=na(o.isValidElement(n)?Ca(n):null,t);if(Wi(()=>{i||s(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),Wi(()=>{if(a&&!i)return Xi(t,a),()=>{Xi(t,null)}},[t,a,i]),i){if(o.isValidElement(n)){const e={ref:l};return o.cloneElement(n,e)}return hi.jsx(o.Fragment,{children:n})}return hi.jsx(o.Fragment,{children:a?I.createPortal(n,a):a})}),kl=["onChange","maxRows","minRows","style","value"];function Tl(e){return parseInt(e,10)||0}const Ol={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Nl(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const _l=o.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:s}=e,l=ke(e,kl),{current:c}=o.useRef(null!=s),u=o.useRef(null),d=na(t,u),p=o.useRef(null),f=o.useRef(null),h=o.useCallback(()=>{const t=u.current,n=f.current;if(!t||!n)return;const o=Ki(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=Tl(o.paddingBottom)+Tl(o.paddingTop),l=Tl(o.borderBottomWidth)+Tl(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-c)<=1}},[r,i,e.placeholder]),m=ta(()=>{const e=u.current,t=h();if(!e||!t||Nl(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=o.useCallback(()=>{const e=u.current,t=h();if(!e||!t||Nl(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=o.useRef(-1);Wi(()=>{const e=Ui(g),t=null==u?void 0:u.current;if(!t)return;const n=Ki(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),Wi(()=>{g()});return hi.jsxs(o.Fragment,{children:[hi.jsx("textarea",qe({value:s,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:i,style:a},l)),hi.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:qe({},Ol,a,{paddingTop:0,paddingBottom:0})})]})});function jl({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Fl=o.createContext(void 0);function zl(){return o.useContext(Fl)}function Wl(e){return hi.jsx(gi,qe({},e,{defaultTheme:ps,themeId:Pe}))}function $l(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Vl(e,t=!1){return e&&($l(e.value)&&""!==e.value||t&&$l(e.defaultValue)&&""!==e.defaultValue)}function Hl(e){return Di("MuiInputBase",e)}const Bl=Ri("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Gl=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Ul=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${lo(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Yl=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Kl=Ms("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ul})(({theme:e,ownerState:t})=>qe({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Bl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&qe({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Xl=Ms("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=qe({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return qe({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Bl.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Bl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})}),Jl=hi.jsx(Wl,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Zl=o.forwardRef(function(e,t){var n;const r=ks({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,fullWidth:m=!1,id:g,inputComponent:v="input",inputProps:b={},inputRef:y,maxRows:x,minRows:S,multiline:w=!1,name:C,onBlur:E,onChange:I,onClick:D,onFocus:R,onKeyDown:L,onKeyUp:M,placeholder:A,readOnly:P,renderSuffix:q,rows:k,slotProps:T={},slots:O={},startAdornment:N,type:_="text",value:j}=r,F=ke(r,Gl),z=null!=b.value?b.value:j,{current:W}=o.useRef(null!=z),$=o.useRef(),V=o.useCallback(e=>{},[]),H=na($,y,b.ref,V),[B,G]=o.useState(!1),U=zl(),Y=jl({props:r,muiFormControl:U,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Y.focused=U?U.focused:B,o.useEffect(()=>{!U&&p&&B&&(G(!1),E&&E())},[U,p,B,E]);const K=U&&U.onFilled,X=U&&U.onEmpty,J=o.useCallback(e=>{Vl(e)?K&&K():X&&X()},[K,X]);Wi(()=>{W&&J({value:z})},[z,J,W]);o.useEffect(()=>{J($.current)},[]);let Z=v,Q=b;w&&"input"===Z&&(Q=qe(k?{type:void 0,minRows:k,maxRows:k}:{type:void 0,maxRows:x,minRows:S},Q),Z=_l);o.useEffect(()=>{U&&U.setAdornedStart(Boolean(N))},[U,N]);const ee=qe({},r,{color:Y.color||"primary",disabled:Y.disabled,endAdornment:h,error:Y.error,focused:Y.focused,formControl:U,fullWidth:m,hiddenLabel:Y.hiddenLabel,multiline:w,size:Y.size,startAdornment:N,type:_}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return va({root:["root",`color${lo(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${lo(p)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Hl,t)})(ee),ne=O.root||c.Root||Kl,re=T.root||u.root||{},oe=O.input||c.Input||Xl;return Q=qe({},Q,null!=(n=T.input)?n:u.input),hi.jsxs(o.Fragment,{children:[!f&&Jl,hi.jsxs(ne,qe({},re,!ba(ne)&&{ownerState:qe({},ee,re.ownerState)},{ref:t,onClick:e=>{$.current&&e.currentTarget===e.target&&$.current.focus(),D&&D(e)}},F,{className:Ci(te.root,re.className,l,P&&"MuiInputBase-readOnly"),children:[N,hi.jsx(Fl.Provider,{value:null,children:hi.jsx(oe,qe({ownerState:ee,"aria-invalid":Y.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:Y.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?$.current:{value:"x"})},name:C,placeholder:A,readOnly:P,required:Y.required,rows:k,value:z,onKeyDown:L,onKeyUp:M,type:_},Q,!ba(oe)&&{as:Z,ownerState:qe({},ee,Q.ownerState)},{ref:H,className:Ci(te.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),b.onBlur&&b.onBlur(e),U&&U.onBlur?U.onBlur(e):G(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||$.current;if(null==t)throw new Error(Me(1));J({value:t.value})}b.onChange&&b.onChange(e,...t),I&&I(e,...t)},onFocus:e=>{Y.disabled?e.stopPropagation():(R&&R(e),b.onFocus&&b.onFocus(e),U&&U.onFocus?U.onFocus(e):G(!0))}}))}),h,q?q(qe({},Y,{startAdornment:N})):null]}))]})});function Ql(e){return Di("MuiInput",e)}const ec=qe({},Bl,Ri("MuiInput",["root","underline","input"]));function tc(e){return Di("MuiOutlinedInput",e)}const nc=qe({},Bl,Ri("MuiOutlinedInput",["root","notchedOutline","input"]));function rc(e){return Di("MuiFilledInput",e)}const oc=qe({},Bl,Ri("MuiFilledInput",["root","underline","input"]));var ic=js(hi.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const ac=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],sc={entering:{opacity:1},entered:{opacity:1}},lc=o.forwardRef(function(e,t){const n=fs(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:b=Ys}=e,y=ke(e,ac),x=o.useRef(null),S=na(x,Ca(s),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},C=w(p),E=w((e,t)=>{nl(e);const r=rl({style:g,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),I=w(d),D=w(m),R=w(e=>{const t=rl({style:g,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),L=w(h);return hi.jsx(b,qe({appear:a,in:c,nodeRef:x,onEnter:E,onEntered:I,onEntering:C,onExit:R,onExited:L,onExiting:D,addEndListener:e=>{i&&i(x.current,e)},timeout:v},y,{children:(e,t)=>o.cloneElement(s,qe({style:qe({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},sc[e],g,s.props.style),ref:S},t))}))});function cc(e){return Di("MuiBackdrop",e)}Ri("MuiBackdrop",["root","invisible"]);const uc=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],dc=Ms("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>qe({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),pc=o.forwardRef(function(e,t){var n,r,o;const i=ks({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=lc,transitionDuration:g}=i,v=ke(i,uc),b=qe({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return va({root:["root",n&&"invisible"]},cc,t)})(b),x=null!=(n=f.root)?n:u.root;return hi.jsx(m,qe({in:p,timeout:g},v,{children:hi.jsx(dc,qe({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:Ci(y.root,s,null==x?void 0:x.className),ownerState:qe({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}),fc=Ri("MuiBox",["root"]),hc=ds(),mc=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=Gr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(ni);return o.forwardRef(function(e,o){const s=ci(n),l=bi(e),{className:c,component:u="div"}=l,d=ke(l,Ei);return hi.jsx(a,qe({as:u,ref:o,className:Ci(c,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:Pe,defaultTheme:hc,defaultClassName:fc.root,generateClassName:Si.generate});function gc(e){return Di("MuiButton",e)}const vc=Ri("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),bc=o.createContext({}),yc=o.createContext(void 0),xc=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Sc=e=>qe({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),wc=Ms(Il,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${lo(n.color)}`],t[`size${lo(n.size)}`],t[`${n.variant}Size${lo(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return qe({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":qe({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":qe({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${vc.focusVisible}`]:qe({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${vc.disabled}`]:qe({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ba.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${vc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${vc.disabled}`]:{boxShadow:"none"}}),Cc=Ms("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${lo(n.size)}`]]}})(({ownerState:e})=>qe({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Sc(e))),Ec=Ms("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${lo(n.size)}`]]}})(({ownerState:e})=>qe({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Sc(e))),Ic=o.forwardRef(function(e,t){const n=o.useContext(bc),r=o.useContext(yc),i=ks({props:zi(n,e),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:f,focusVisibleClassName:h,fullWidth:m=!1,size:g="medium",startIcon:v,type:b,variant:y="text"}=i,x=ke(i,xc),S=qe({},i,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:m,size:g,type:b,variant:y}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return qe({},a,va({root:["root",i,`${i}${lo(t)}`,`size${lo(o)}`,`${i}Size${lo(o)}`,`color${lo(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${lo(o)}`],endIcon:["icon","endIcon",`iconSize${lo(o)}`]},gc,a))})(S),C=v&&hi.jsx(Cc,{className:w.startIcon,ownerState:S,children:v}),E=f&&hi.jsx(Ec,{className:w.endIcon,ownerState:S,children:f}),I=r||"";return hi.jsxs(wc,qe({ownerState:S,className:Ci(n.className,w.root,c,I),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:Ci(w.focusVisible,h),ref:t,type:b},x,{classes:w,children:[C,a,E]}))});function Dc(e){return Di("PrivateSwitchBase",e)}Ri("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Rc=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Lc=Ms(Il,{name:"MuiSwitchBase"})(({ownerState:e})=>qe({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),Mc=Ms("input",{name:"MuiSwitchBase",shouldForwardProp:Ls})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Ac=o.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:h,onBlur:m,onChange:g,onFocus:v,readOnly:b,required:y=!1,tabIndex:x,type:S,value:w}=e,C=ke(e,Rc),[E,I]=ea({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),D=zl();let R=s;D&&void 0===R&&(R=D.disabled);const L="checkbox"===S||"radio"===S,M=qe({},e,{checked:E,disabled:R,disableFocusRipple:l,edge:c}),A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return va({root:["root",n&&"checked",r&&"disabled",o&&`edge${lo(o)}`],input:["input"]},Dc,t)})(M);return hi.jsxs(Lc,qe({component:"span",className:Ci(A.root,i),centerRipple:!0,focusRipple:!l,disabled:R,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),D&&D.onFocus&&D.onFocus(e)},onBlur:e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},ownerState:M,ref:t},C,{children:[hi.jsx(Mc,qe({autoFocus:n,checked:r,defaultChecked:a,className:A.input,disabled:R,id:L?d:void 0,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;I(t),g&&g(e,t)},readOnly:b,ref:f,required:y,ownerState:M,tabIndex:x,type:S},"checkbox"===S&&void 0===w?{}:{value:w},p)),E?o:u]}))});var Pc=js(hi.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),qc=js(hi.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),kc=js(hi.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Tc(e){return Di("MuiCheckbox",e)}const Oc=Ri("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Nc=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],_c=Ms(Ac,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${lo(n.size)}`],"default"!==n.color&&t[`color${lo(n.color)}`]]}})(({theme:e,ownerState:t})=>qe({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${Oc.checked}, &.${Oc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Oc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),jc=hi.jsx(qc,{}),Fc=hi.jsx(Pc,{}),zc=hi.jsx(kc,{}),Wc=o.forwardRef(function(e,t){var n,r;const i=ks({props:e,name:"MuiCheckbox"}),{checkedIcon:a=jc,color:s="primary",icon:l=Fc,indeterminate:c=!1,indeterminateIcon:u=zc,inputProps:d,size:p="medium",className:f}=i,h=ke(i,Nc),m=c?u:l,g=c?u:a,v=qe({},i,{color:s,indeterminate:c,size:p}),b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e;return qe({},t,va({root:["root",n&&"indeterminate",`color${lo(r)}`,`size${lo(o)}`]},Tc,t))})(v);return hi.jsx(_c,qe({type:"checkbox",inputProps:qe({"data-indeterminate":c},d),icon:o.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:p}),checkedIcon:o.cloneElement(g,{fontSize:null!=(r=g.props.fontSize)?r:p}),ownerState:v,ref:t,className:Ci(b.root,f)},h,{classes:b}))});function $c(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Vc(e){return parseInt(Ki(e).getComputedStyle(e).paddingRight,10)||0}function Hc(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&$c(e,o)})}function Bc(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Gc(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Yi(e);return t.body===e?Ki(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=ga(Yi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Vc(r)+e}px`;const t=Yi(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Vc(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Yi(r).body;else{const t=r.parentElement,n=Ki(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Uc=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Yc(e){const t=[],n=[];return Array.from(e.querySelectorAll(Uc)).forEach((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Kc(){return!0}function Xc(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Yc,isEnabled:s=Kc,open:l}=e,c=o.useRef(!1),u=o.useRef(null),d=o.useRef(null),p=o.useRef(null),f=o.useRef(null),h=o.useRef(!1),m=o.useRef(null),g=na(Ca(t),m),v=o.useRef(null);o.useEffect(()=>{l&&m.current&&(h.current=!n)},[n,l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Yi(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Yi(m.current),t=t=>{v.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var o,i;const e=Boolean((null==(o=v.current)?void 0:o.shiftKey)&&"Tab"===(null==(i=v.current)?void 0:i.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,s,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return hi.jsxs(o.Fragment,{children:[hi.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),hi.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const Jc=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&$c(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Hc(t,e.mount,e.modalRef,r,!0);const o=Bc(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Gc(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&$c(e.modalRef,t),Hc(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&$c(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Zc(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Jc,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=e,f=o.useRef({}),h=o.useRef(null),m=o.useRef(null),g=na(m,p),[v,b]=o.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const S=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),w=()=>{i.mount(S(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},C=ta(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Yi(h.current).body;i.add(S(),e),m.current&&w()}),E=o.useCallback(()=>i.isTopModal(S()),[i]),I=ta(e=>{h.current=e,e&&(d&&E()?w():m.current&&$c(m.current,x))}),D=o.useCallback(()=>{i.remove(S(),x)},[x,i]);o.useEffect(()=>()=>{D()},[D]),o.useEffect(()=>{d?C():y&&a||D()},[d,D,y,a,C]);const R=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&E()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},L=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=ya(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=qe({},n,t);return qe({role:"presentation"},r,{onKeyDown:R(r),ref:g})},getBackdropProps:(e={})=>qe({"aria-hidden":!0},e,{onClick:L(e),open:d}),getTransitionProps:()=>({onEnter:Gi(()=>{b(!1),s&&s()},null==c?void 0:c.props.onEnter),onExited:Gi(()=>{b(!0),l&&l(),a&&D()},null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:I,isTopModal:E,exited:v,hasTransition:y}}function Qc(e){return Di("MuiModal",e)}Ri("MuiModal",["root","hidden","backdrop"]);const eu=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],tu=Ms("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>qe({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),nu=Ms(pc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ru=o.forwardRef(function(e,t){var n,r,i,a,s,l;const c=ks({name:"MuiModal",props:e}),{BackdropComponent:u=nu,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:g,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:S=!1,disablePortal:w=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:D=!1,onBackdropClick:R,open:L,slotProps:M,slots:A}=c,P=ke(c,eu),q=qe({},c,{closeAfterTransition:f,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:S,disablePortal:w,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:I,keepMounted:D}),{getRootProps:k,getBackdropProps:T,getTransitionProps:O,portalRef:N,isTopModal:_,exited:j,hasTransition:F}=Zc(qe({},q,{rootRef:t})),z=qe({},q,{exited:j}),W=(e=>{const{open:t,exited:n,classes:r}=e;return va({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Qc,r)})(z),$={};if(void 0===h.props.tabIndex&&($.tabIndex="-1"),F){const{onEnter:e,onExited:t}=O();$.onEnter=e,$.onExited=t}const V=null!=(n=null!=(r=null==A?void 0:A.root)?r:v.Root)?n:tu,H=null!=(i=null!=(a=null==A?void 0:A.backdrop)?a:v.Backdrop)?i:u,B=null!=(s=null==M?void 0:M.root)?s:b.root,G=null!=(l=null==M?void 0:M.backdrop)?l:b.backdrop,U=wa({elementType:V,externalSlotProps:B,externalForwardedProps:P,getSlotProps:k,additionalProps:{ref:t,as:g},ownerState:z,className:Ci(p,null==B?void 0:B.className,null==W?void 0:W.root,!z.open&&z.exited&&(null==W?void 0:W.hidden))}),Y=wa({elementType:H,externalSlotProps:G,additionalProps:d,getSlotProps:e=>T(qe({},e,{onClick:t=>{R&&R(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ci(null==G?void 0:G.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:z});return D||L||F&&!j?hi.jsx(ql,{ref:N,container:m,disablePortal:w,children:hi.jsxs(V,qe({},U,{children:[!I&&u?hi.jsx(H,qe({},Y)):null,hi.jsx(Xc,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:_,open:L,children:o.cloneElement(h,$)})]}))}):null});function ou(e){return Di("MuiDivider",e)}const iu=Ri("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),au=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],su=Ms("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>qe({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Ba.alpha(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>qe({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>qe({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>qe({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>qe({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),lu=Ms("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>qe({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),cu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=ke(n,au),h=qe({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return va({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},ou,r)})(h);return hi.jsx(su,qe({as:a,className:Ci(m.root,i),role:u,ref:t,ownerState:h},f,{children:o?hi.jsx(lu,{className:m.wrapper,ownerState:h,children:o}):null}))});cu.muiSkipListHighlight=!0;const uu=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],du=Ms(Kl,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Ul(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return qe({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${oc.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${oc.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oc.disabled}, .${oc.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${oc.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&qe({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))}),pu=Ms(Xl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>qe({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),fu=o.forwardRef(function(e,t){var n,r,o,i;const a=ks({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:f={},type:h="text"}=a,m=ke(a,uu),g=qe({},a,{fullWidth:c,inputComponent:u,multiline:d,type:h}),v=(e=>{const{classes:t,disableUnderline:n}=e;return qe({},t,va({root:["root",!n&&"underline"],input:["input"]},rc,t))})(a),b={root:{ownerState:g},input:{ownerState:g}},y=(null!=p?p:l)?Zr(b,null!=p?p:l):b,x=null!=(n=null!=(r=f.root)?r:s.Root)?n:du,S=null!=(o=null!=(i=f.input)?i:s.Input)?o:pu;return hi.jsx(Zl,qe({slots:{root:x,input:S},componentsProps:y,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:h},m,{classes:v}))});fu.muiName="Input";const hu=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function mu(e){return`scale(${e}, ${e**2})`}const gu={entering:{opacity:1,transform:mu(1)},entered:{opacity:1,transform:"none"}},vu="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),bu=o.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=Ys}=e,v=ke(e,hu),b=aa(),y=o.useRef(),x=fs(),S=o.useRef(null),w=na(S,Ca(i),t),C=e=>t=>{if(e){const n=S.current;void 0===t?e(n):e(n,t)}},E=C(u),I=C((e,t)=>{nl(e);const{duration:n,delay:r,easing:o}=rl({style:h,timeout:m,easing:a},{mode:"enter"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=n,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:r}),x.transitions.create("transform",{duration:vu?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)}),D=C(c),R=C(f),L=C(e=>{const{duration:t,delay:n,easing:r}=rl({style:h,timeout:m,easing:a},{mode:"exit"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:vu?o:.666*o,delay:vu?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=mu(.75),d&&d(e)}),M=C(p);return hi.jsx(g,qe({appear:r,in:s,nodeRef:S,onEnter:I,onEntered:D,onEntering:E,onExit:L,onExited:M,onExiting:R,addEndListener:e=>{"auto"===m&&b.start(y.current||0,e),n&&n(S.current,e)},timeout:"auto"===m?null:m},v,{children:(e,t)=>o.cloneElement(i,qe({style:qe({opacity:0,transform:mu(.75),visibility:"exited"!==e||s?void 0:"hidden"},gu[e],h,i.props.style),ref:w},t))}))});bu.muiSupportAuto=!0;const yu=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],xu=Ms(Kl,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Ul(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),qe({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ec.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ec.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ec.disabled}, .${ec.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ec.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Su=Ms(Xl,{name:"MuiInput",slot:"Input",overridesResolver:Yl})({}),wu=o.forwardRef(function(e,t){var n,r,o,i;const a=ks({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:m="text"}=a,g=ke(a,yu),v=(e=>{const{classes:t,disableUnderline:n}=e;return qe({},t,va({root:["root",!n&&"underline"],input:["input"]},Ql,t))})(a),b={root:{ownerState:{disableUnderline:s}}},y=(null!=f?f:c)?Zr(null!=f?f:c,b):b,x=null!=(n=null!=(r=h.root)?r:l.Root)?n:xu,S=null!=(o=null!=(i=h.input)?i:l.Input)?o:Su;return hi.jsx(Zl,qe({slots:{root:x,input:S},slotProps:y,fullWidth:u,inputComponent:d,multiline:p,ref:t,type:m},g,{classes:v}))});function Cu(e){return Di("MuiInputAdornment",e)}wu.muiName="Input";const Eu=Ri("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Iu;const Du=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Ru=Ms("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${lo(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>qe({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Eu.positionStart}&:not(.${Eu.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),Lu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u}=n,d=ke(n,Du),p=zl()||{};let f=u;u&&p.variant,p&&!f&&(f=p.variant);const h=qe({},n,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:s,position:c,variant:f}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return va({root:["root",n&&"disablePointerEvents",o&&`position${lo(o)}`,a,r&&"hiddenLabel",i&&`size${lo(i)}`]},Cu,t)})(h);return hi.jsx(Fl.Provider,{value:null,children:hi.jsx(Ru,qe({as:a,ownerState:h,className:Ci(m.root,i),ref:t},d,{children:"string"!=typeof r||l?hi.jsxs(o.Fragment,{children:["start"===c?Iu||(Iu=hi.jsx("span",{className:"notranslate",children:"​"})):null,r]}):hi.jsx(Pl,{color:"text.secondary",children:r})}))})});function Mu(e){return Di("MuiLink",e)}const Au=Ri("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Pu={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},qu=({theme:e,ownerState:t})=>{const n=(e=>Pu[e]||e)(t.color),r=uo(e,`palette.${n}`,!1)||t.color,o=uo(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Ba.alpha(r,.4)},ku=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Tu=Ms(Pl,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${lo(n.underline)}`],"button"===n.component&&t.button]}})(({theme:e,ownerState:t})=>qe({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&qe({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:qu({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Au.focusVisible}`]:{outline:"auto"}})),Ou=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=n,f=ke(n,ku),{isFocusVisibleRef:h,onBlur:m,onFocus:g,ref:v}=ma(),[b,y]=o.useState(!1),x=na(t,v),S=qe({},n,{color:i,component:a,focusVisible:b,underline:u,variant:d}),w=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e;return va({root:["root",`underline${lo(o)}`,"button"===n&&"button",r&&"focusVisible"]},Mu,t)})(S);return hi.jsx(Tu,qe({color:i,className:Ci(w.root,r),classes:c,component:a,onBlur:e=>{m(e),!1===h.current&&y(!1),s&&s(e)},onFocus:e=>{g(e),!0===h.current&&y(!0),l&&l(e)},ref:x,ownerState:S,variant:d,sx:[...Object.keys(Pu).includes(i)?[]:[{color:i}],...Array.isArray(p)?p:[p]]},f))}),Nu=o.createContext({});function _u(e){return Di("MuiList",e)}Ri("MuiList",["root","padding","dense","subheader"]);const ju=["children","className","component","dense","disablePadding","subheader"],Fu=Ms("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>qe({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),zu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiList"}),{children:r,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=n,u=ke(n,ju),d=o.useMemo(()=>({dense:s}),[s]),p=qe({},n,{component:a,dense:s,disablePadding:l}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return va({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_u,t)})(p);return hi.jsx(Nu.Provider,{value:d,children:hi.jsxs(Fu,qe({as:a,className:Ci(f.root,i),ref:t,ownerState:p},u,{children:[c,r]}))})});function Wu(e){return Di("MuiListItem",e)}const $u=Ri("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Vu=Ri("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Hu(e){return Di("MuiListItemSecondaryAction",e)}Ri("MuiListItemSecondaryAction",["root","disableGutters"]);const Bu=["className"],Gu=Ms("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>qe({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Uu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,i=ke(n,Bu),a=qe({},n,{disableGutters:o.useContext(Nu).disableGutters}),s=(e=>{const{disableGutters:t,classes:n}=e;return va({root:["root",t&&"disableGutters"]},Hu,n)})(a);return hi.jsx(Gu,qe({className:Ci(s.root,r),ownerState:a,ref:t},i))});Uu.muiName="ListItemSecondaryAction";const Yu=["className"],Ku=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Xu=Ms("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>qe({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&qe({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Vu.root}`]:{paddingRight:48}},{[`&.${$u.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${$u.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${$u.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${$u.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${$u.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Ju=Ms("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Zu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:i=!1,button:a=!1,children:s,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:f}={},dense:h=!1,disabled:m=!1,disableGutters:g=!1,disablePadding:v=!1,divider:b=!1,focusVisibleClassName:y,secondaryAction:x,selected:S=!1,slotProps:w={},slots:C={}}=n,E=ke(n.ContainerProps,Yu),I=ke(n,Ku),D=o.useContext(Nu),R=o.useMemo(()=>({dense:h||D.dense||!1,alignItems:r,disableGutters:g}),[r,D.dense,h,g]),L=o.useRef(null);Wi(()=>{i&&L.current&&L.current.focus()},[i]);const M=o.Children.toArray(s),A=M.length&&(P=M[M.length-1],q=["ListItemSecondaryAction"],o.isValidElement(P)&&-1!==q.indexOf(null!=(k=P.type.muiName)?k:null==(T=P.type)||null==(T=T._payload)||null==(T=T.value)?void 0:T.muiName));var P,q,k,T;const O=qe({},n,{alignItems:r,autoFocus:i,button:a,dense:R.dense,disabled:m,disableGutters:g,disablePadding:v,divider:b,hasSecondaryAction:A,selected:S}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return va({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Wu,r)})(O),_=na(L,t),j=C.root||u.Root||Xu,F=w.root||d.root||{},z=qe({className:Ci(N.root,F.className,l),disabled:m},I);let W=c||"li";return a&&(z.component=c||"div",z.focusVisibleClassName=Ci($u.focusVisible,y),W=Il),A?(W=z.component||c?W:"div","li"===p&&("li"===W?W="div":"li"===z.component&&(z.component="div")),hi.jsx(Nu.Provider,{value:R,children:hi.jsxs(Ju,qe({as:p,className:Ci(N.container,f),ref:_,ownerState:O},E,{children:[hi.jsx(j,qe({},F,!ba(j)&&{as:W,ownerState:qe({},O,F.ownerState)},z,{children:M})),M.pop()]}))})):hi.jsx(Nu.Provider,{value:R,children:hi.jsxs(j,qe({},F,{as:W,ref:_},!ba(j)&&{ownerState:qe({},O,F.ownerState)},z,{children:[M,x&&hi.jsx(Uu,{children:x})]}))})});function Qu(e){return Di("MuiListItemIcon",e)}const ed=Ri("MuiListItemIcon",["root","alignItemsFlexStart"]),td=["className"],nd=Ms("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>qe({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),rd=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=ke(n,td),a=qe({},n,{alignItems:o.useContext(Nu).alignItems}),s=(e=>{const{alignItems:t,classes:n}=e;return va({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Qu,n)})(a);return hi.jsx(nd,qe({className:Ci(s.root,r),ownerState:a,ref:t},i))}),od=Ri("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),id=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function ad(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ld(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function cd(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&ld(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const ud=o.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=ke(e,id),f=o.useRef(null),h=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Wi(()=>{r&&f.current.focus()},[r]),o.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${ga(Yi(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=na(f,t);let g=-1;o.Children.forEach(a,(e,t)=>{o.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))});const v=o.Children.map(a,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),o.cloneElement(e,t)}return e});return hi.jsx(zu,qe({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=f.current,n=e.key,r=Yi(t).activeElement;if("ArrowDown"===n)e.preventDefault(),cd(t,r,c,l,ad);else if("ArrowUp"===n)e.preventDefault(),cd(t,r,c,l,sd);else if("Home"===n)e.preventDefault(),cd(t,null,c,l,ad);else if("End"===n)e.preventDefault(),cd(t,null,c,l,sd);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&ld(r,o);o.previousKeyMatched&&(s||cd(t,r,!1,l,ad,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},p,{children:v}))});function dd(e){return Di("MuiPopover",e)}Ri("MuiPopover",["root","paper"]);const pd=["onEntering"],fd=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],hd=["slotProps"];function md(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function gd(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function vd(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function bd(e){return"function"==typeof e?e():e}const yd=Ms(ru,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xd=Ms(sl,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Sd=o.forwardRef(function(e,t){var n,r,i;const a=ks({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:m=8,marginThreshold:g=16,open:v,PaperProps:b={},slots:y,slotProps:x,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w=bu,transitionDuration:C="auto",TransitionProps:{onEntering:E}={},disableScrollLock:I=!1}=a,D=ke(a.TransitionProps,pd),R=ke(a,fd),L=null!=(n=null==x?void 0:x.paper)?n:b,M=o.useRef(),A=na(M,L.ref),P=qe({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:L,transformOrigin:S,TransitionComponent:w,transitionDuration:C,TransitionProps:D}),q=(e=>{const{classes:t}=e;return va({root:["root"],paper:["paper"]},dd,t)})(P),k=o.useCallback(()=>{if("anchorPosition"===d)return u;const e=bd(l),t=(e&&1===e.nodeType?e:Yi(M.current).body).getBoundingClientRect();return{top:t.top+md(t,c.vertical),left:t.left+gd(t,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),T=o.useCallback(e=>({vertical:md(e,S.vertical),horizontal:gd(e,S.horizontal)}),[S.horizontal,S.vertical]),O=o.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if("none"===d)return{top:null,left:null,transformOrigin:vd(n)};const r=k();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=Ki(bd(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:vd(n)}},[l,d,k,T,g]),[N,_]=o.useState(v),j=o.useCallback(()=>{const e=M.current;if(!e)return;const t=O(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,_(!0)},[O]);o.useEffect(()=>(I&&window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)),[l,I,j]);o.useEffect(()=>{v&&j()}),o.useImperativeHandle(s,()=>v?{updatePosition:()=>{j()}}:null,[v,j]),o.useEffect(()=>{if(!v)return;const e=Ui(()=>{j()}),t=Ki(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[l,v,j]);let F=C;"auto"!==C||w.muiSupportAuto||(F=void 0);const z=h||(l?Yi(bd(l)).body:void 0),W=null!=(r=null==y?void 0:y.root)?r:yd,$=null!=(i=null==y?void 0:y.paper)?i:xd,V=wa({elementType:$,externalSlotProps:qe({},L,{style:N?L.style:qe({},L.style,{opacity:0})}),additionalProps:{elevation:m,ref:A},ownerState:P,className:Ci(q.paper,null==L?void 0:L.className)}),H=wa({elementType:W,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:R,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:z,open:v},ownerState:P,className:Ci(q.root,f)}),{slotProps:B}=H,G=ke(H,hd);return hi.jsx(W,qe({},G,!ba(W)&&{slotProps:B,disableScrollLock:I},{children:hi.jsx(w,qe({appear:!0,in:v,onEntering:(e,t)=>{E&&E(e,t),j()},onExited:()=>{_(!1)},timeout:F},D,{children:hi.jsx($,qe({},V,{children:p}))}))}))});function wd(e){return Di("MuiMenu",e)}Ri("MuiMenu",["root","paper","list"]);const Cd=["onEntering"],Ed=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Id={vertical:"top",horizontal:"right"},Dd={vertical:"top",horizontal:"left"},Rd=Ms(Sd,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ld=Ms(xd,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Md=Ms(ud,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Ad=o.forwardRef(function(e,t){var n,r;const i=ks({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:v="selectedMenu",slots:b={},slotProps:y={}}=i,x=ke(i.TransitionProps,Cd),S=ke(i,Ed),w=(()=>{const e=o.useContext(Ma);return null!=e&&e})(),C=qe({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:x,variant:v}),E=(e=>{const{classes:t}=e;return va({root:["root"],paper:["paper"],list:["list"]},wd,t)})(C),I=a&&!c&&p,D=o.useRef(null);let R=-1;o.Children.map(s,(e,t)=>{o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===v&&e.props.selected||-1===R)&&(R=t))});const L=null!=(n=b.paper)?n:Ld,M=null!=(r=y.paper)?r:f,A=wa({elementType:b.root,externalSlotProps:y.root,ownerState:C,className:[E.root,l]}),P=wa({elementType:L,externalSlotProps:M,ownerState:C,className:E.paper});return hi.jsx(Rd,qe({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?Id:Dd,slots:{paper:L,root:b.root},slotProps:{root:A,paper:P},open:p,ref:t,transitionDuration:m,TransitionProps:qe({onEntering:(e,t)=>{D.current&&D.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:C},S,{classes:h,children:hi.jsx(Md,qe({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:D,autoFocus:a&&(-1===R||c),autoFocusItem:I,variant:v},u,{className:Ci(E.list,u.className),children:s}))}))});function Pd(e){return Di("MuiMenuItem",e)}const qd=Ri("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),kd=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Td=Ms(Il,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>qe({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${qd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${qd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${qd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${qd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${qd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${iu.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${iu.inset}`]:{marginLeft:52},[`& .${od.root}`]:{marginTop:0,marginBottom:0},[`& .${od.inset}`]:{paddingLeft:36},[`& .${ed.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&qe({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${ed.root} svg`]:{fontSize:"1.25rem"}}))),Od=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=n,f=ke(n,kd),h=o.useContext(Nu),m=o.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),g=o.useRef(null);Wi(()=>{r&&g.current&&g.current.focus()},[r]);const v=qe({},n,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return qe({},a,va({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Pd,a))})(n),y=na(g,t);let x;return n.disabled||(x=void 0!==d?d:-1),hi.jsx(Nu.Provider,{value:m,children:hi.jsx(Td,qe({ref:y,role:u,tabIndex:x,component:i,focusVisibleClassName:Ci(b.focusVisible,c),className:Ci(b.root,p)},f,{ownerState:v,classes:b}))})});function Nd(e){return Di("MuiNativeSelect",e)}const _d=Ri("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jd=["className","disabled","error","IconComponent","inputRef","variant"],Fd=({ownerState:e,theme:t})=>qe({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":qe({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${_d.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),zd=Ms("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ls,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${_d.multiple}`]:t.multiple}]}})(Fd),Wd=({ownerState:e,theme:t})=>qe({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${_d.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),$d=Ms("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${lo(n.variant)}`],n.open&&t.iconOpen]}})(Wd),Vd=o.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=e,c=ke(e,jd),u=qe({},e,{disabled:r,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return va({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${lo(n)}`,i&&"iconOpen",r&&"disabled"]},Nd,t)})(u);return hi.jsxs(o.Fragment,{children:[hi.jsx(zd,qe({ownerState:u,className:Ci(d.select,n),disabled:r,ref:s||t},c)),e.multiple?null:hi.jsx($d,{as:a,ownerState:u,className:d.icon})]})});var Hd;const Bd=["children","classes","className","label","notched"],Gd=Ms("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ls})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Ud=Ms("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ls})(({ownerState:e,theme:t})=>qe({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&qe({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));const Yd=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Kd=Ms(Kl,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ul})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return qe({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${nc.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${nc.focused} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${nc.error} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${nc.disabled} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&qe({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),Xd=Ms(function(e){const{className:t,label:n,notched:r}=e,o=ke(e,Bd),i=null!=n&&""!==n,a=qe({},e,{notched:r,withLabel:i});return hi.jsx(Gd,qe({"aria-hidden":!0,className:t,ownerState:a},o,{children:hi.jsx(Ud,{ownerState:a,children:i?hi.jsx("span",{children:n}):Hd||(Hd=hi.jsx("span",{className:"notranslate",children:"​"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Jd=Ms(Xl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>qe({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),Zd=o.forwardRef(function(e,t){var n,r,i,a,s;const l=ks({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:f=!1,notched:h,slots:m={},type:g="text"}=l,v=ke(l,Yd),b=(e=>{const{classes:t}=e;return qe({},t,va({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tc,t))})(l),y=zl(),x=jl({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=qe({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:u,hiddenLabel:x.hiddenLabel,multiline:f,size:x.size,type:g}),w=null!=(n=null!=(r=m.root)?r:c.Root)?n:Kd,C=null!=(i=null!=(a=m.input)?a:c.Input)?i:Jd;return hi.jsx(Zl,qe({slots:{root:w,input:C},renderSuffix:e=>hi.jsx(Xd,{ownerState:S,className:b.notchedOutline,label:null!=p&&""!==p&&x.required?s||(s=hi.jsxs(o.Fragment,{children:[p," ","*"]})):p,notched:void 0!==h?h:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:t,type:g},v,{classes:qe({},b,{notchedOutline:null})}))});function Qd(e){return Di("MuiSelect",e)}Zd.muiName="Input";const ep=Ri("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var tp;const np=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],rp=Ms("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ep.select}`]:t.select},{[`&.${ep.select}`]:t[n.variant]},{[`&.${ep.error}`]:t.error},{[`&.${ep.multiple}`]:t.multiple}]}})(Fd,{[`&.${ep.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),op=Ms("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${lo(n.variant)}`],n.open&&t.iconOpen]}})(Wd),ip=Ms("input",{shouldForwardProp:e=>Rs(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ap(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function sp(e){return null==e||"string"==typeof e&&!e.trim()}const lp=o.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:f,error:h=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:b={},multiple:y,name:x,onBlur:S,onChange:w,onClose:C,onFocus:E,onOpen:I,open:D,readOnly:R,renderValue:L,SelectDisplayProps:M={},tabIndex:A,value:P,variant:q="standard"}=e,k=ke(e,np),[T,O]=ea({controlled:P,default:d,name:"Select"}),[N,_]=ea({controlled:D,default:u,name:"Select"}),j=o.useRef(null),F=o.useRef(null),[z,W]=o.useState(null),{current:$}=o.useRef(null!=D),[V,H]=o.useState(),B=na(t,g),G=o.useCallback(e=>{F.current=e,e&&W(e)},[]),U=null==z?void 0:z.parentNode;o.useImperativeHandle(B,()=>({focus:()=>{F.current.focus()},node:j.current,value:T}),[T]),o.useEffect(()=>{u&&N&&z&&!$&&(H(s?null:U.clientWidth),F.current.focus())},[z,s]),o.useEffect(()=>{a&&F.current.focus()},[a]),o.useEffect(()=>{if(!v)return;const e=Yi(F.current).getElementById(v);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[v]);const Y=(e,t)=>{e?I&&I(t):C&&C(t),$||(H(s?null:U.clientWidth),_(e))},K=o.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(T)?T.slice():[];const t=T.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),T!==n&&(O(n),w)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:x}}),w(o,e)}y||Y(!1,t)}},J=null!==z&&N;let Z,Q;delete k["aria-invalid"];const ee=[];let te=!1;(Vl({value:T})||f)&&(L?Z=L(T):te=!0);const ne=K.map(e=>{if(!o.isValidElement(e))return null;let t;if(y){if(!Array.isArray(T))throw new Error(Me(2));t=T.some(t=>ap(t,e.props.value)),t&&te&&ee.push(e.props.children)}else t=ap(T,e.props.value),t&&te&&(Q=e.props.children);return o.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});te&&(Z=y?0===ee.length?null:ee.reduce((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e),[]):Q);let re,oe=V;!s&&$&&z&&(oe=U.clientWidth),re=void 0!==A?A:p?null:0;const ie=M.id||(x?`mui-component-select-${x}`:void 0),ae=qe({},e,{variant:q,value:T,open:J,error:h}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return va({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${lo(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Qd,t)})(ae),le=qe({},b.PaperProps,null==(n=b.slotProps)?void 0:n.paper),ce=Qi();return hi.jsxs(o.Fragment,{children:[hi.jsx(rp,qe({ref:G,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,ie].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!R){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:p||R?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),Y(!0,e))},onBlur:e=>{!J&&S&&(Object.defineProperty(e,"target",{writable:!0,value:{value:T,name:x}}),S(e))},onFocus:E},M,{ownerState:ae,className:Ci(M.className,se.select,c),id:ie,children:sp(Z)?tp||(tp=hi.jsx("span",{className:"notranslate",children:"​"})):Z})),hi.jsx(ip,qe({"aria-invalid":h,value:Array.isArray(T)?T.join(","):T,name:x,ref:j,"aria-hidden":!0,onChange:e=>{const t=K.find(t=>t.props.value===e.target.value);void 0!==t&&(O(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:p,className:se.nativeInput,autoFocus:a,ownerState:ae},k)),hi.jsx(op,{as:m,className:se.icon,ownerState:ae}),hi.jsx(Ad,qe({id:`menu-${x||""}`,anchorEl:U,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:qe({"aria-labelledby":v,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ce},b.MenuListProps),slotProps:qe({},b.slotProps,{paper:qe({},le,{style:qe({minWidth:oe},null!=le?le.style:null)})}),children:ne}))]})}),cp=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],up=["root"],dp={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ls(e)&&"variant"!==e,slot:"Root"},pp=Ms(wu,dp)(""),fp=Ms(Zd,dp)(""),hp=Ms(fu,dp)(""),mp=o.forwardRef(function(e,t){const n=ks({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=ic,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:b=!1,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:C,variant:E="outlined"}=n,I=ke(n,cp),D=b?Vd:lp,R=jl({props:n,muiFormControl:zl(),states:["variant","error"]}),L=R.variant||E,M=qe({},n,{variant:L,classes:a}),A=(e=>{const{classes:t}=e;return t})(M),P=ke(A,up),q=p||{standard:hi.jsx(pp,{ownerState:M}),outlined:hi.jsx(fp,{label:h,ownerState:M}),filled:hi.jsx(hp,{ownerState:M})}[L],k=na(t,Ca(q));return hi.jsx(o.Fragment,{children:o.cloneElement(q,qe({inputComponent:D,inputProps:qe({children:i,error:R.error,IconComponent:u,variant:L,type:void 0,multiple:v},b?{id:d}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:g,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:qe({id:d},C)},f,{classes:f?Zr(P,f.classes):P},p?p.props.inputProps:{})},(v&&b||c)&&"outlined"===L?{notched:!0}:{},{ref:k,className:Ci(q.props.className,s,A.root)},!p&&{variant:L},I))})});mp.muiName="Select";const gp={GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF"},vp={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",...gp,GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},bp=12,yp=14,xp=16,Sp=24,wp=3,Cp=300,Ep=400,Ip=600,Dp=700,Rp={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};function Lp(e){return hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function Mp({fontSize:e="medium",children:t=null,className:n=""}={}){return hi.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function Ap(e={}){return hi.jsx(Mp,{...e,children:hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[hi.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),hi.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function Pp(e={}){return hi.jsx(Mp,{fontSize:"medium",...e,children:hi.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[hi.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),hi.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function qp(e){return hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:hi.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function kp(e={}){return hi.jsx(Mp,{...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[hi.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),hi.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function Tp(e={}){return hi.jsx(Mp,{fontSize:"medium",...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:hi.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function Op({className:e}){return hi.jsx(Mp,{fontSize:"small",className:e,children:hi.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:hi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:hi.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:hi.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[hi.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),hi.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function Np(e={}){return hi.jsx(Mp,{...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:hi.jsx("rect",{stroke:vp.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}var _p=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:vp.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:vp.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:hi.jsx(Lp,{"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 ${vp.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,borderRadius:wp,backgroundColor:vp.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 ${vp.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:vp.WHITE,color:vp.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:wp},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:vp.GREYSCALE_0_15,backgroundColor:vp.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:vp.GREEN_PALE},"&:active":{backgroundColor:vp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:vp.BLUE_PALE},"&:active":{backgroundColor:vp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.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:wp,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:vp.GREYSCALE_0_42,backgroundColor:vp.GREYSCALE_100_60,"&:active":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:vp.PURPLE,"&.Mui-focusVisible":{borderColor:vp.PURPLE,boxShadow:`0 0 0 3px ${Bi(vp.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:vp.GREEN,"&.Mui-focusVisible":{borderColor:vp.GREEN,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:vp.BLUE,"&.Mui-focusVisible":{borderColor:vp.BLUE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:vp.ORANGE,"&.Mui-focusVisible":{borderColor:vp.ORANGE,boxShadow:`0 0 0 3px ${Bi(vp.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:vp.RED,"&.Mui-focusVisible":{borderColor:vp.RED,boxShadow:`0 0 0 3px ${Bi(vp.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:vp.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:vp.PURPLE_PALE},"&:active":{backgroundColor:vp.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:vp.PURPLE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:vp.GREEN_PALE},"&:active":{backgroundColor:vp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:vp.BLUE_PALE},"&:active":{backgroundColor:vp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:vp.ORANGE_PALE},"&:active":{backgroundColor:vp.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:vp.ORANGE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:vp.RED_PALE},"&:active":{backgroundColor:vp.RED_DARK},"&.Mui-focusVisible":{borderColor:vp.RED_PALE,boxShadow:`0 0 0 3px ${Bi(vp.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:vp.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:vp.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:wp,boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:hi.jsx(qp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:bp,borderRadius:wp,color:vp.TEXT_PRIMARY,backgroundColor:vp.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:vp.GREYSCALE_0_05,color:vp.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:vp.GREEN,borderColor:vp.GREEN},"&.MuiChip-outlinedInfo":{color:vp.BLUE,borderColor:vp.BLUE},"&.MuiChip-outlinedWarning":{color:vp.ORANGE,borderColor:vp.ORANGE},"&.MuiChip-outlinedError":{color:vp.RED,borderColor:vp.RED}},outlined:{border:`solid 1px ${vp.GREYSCALE_0_15}`,backgroundColor:vp.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:wp,boxShadow:"none",backgroundColor:vp.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:vp.GREEN,borderColor:vp.GREEN},outlinedSecondary:{color:vp.BLUE,borderColor:vp.BLUE},label:{fontFamily:Rp.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:hi.jsx(qp,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:hi.jsx(Lp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:wp},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:wp,fontSize:yp,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:vp.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${vp.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:vp.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:vp.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_05}}},popupIndicator:{borderRadius:wp,border:`solid 1px ${vp.GREYSCALE_0_15}`,color:vp.GREYSCALE_0_60,marginRight:0,width:Sp,height:Sp},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${vp.GREYSCALE_0_15}`},clearIndicator:{borderRadius:wp,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:vp.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:yp}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:bp,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:vp.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:vp.GREYSCALE_25,fontSize:bp,fontFamily:Rp.FONT_FAMILY,fontWeight:Ip,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:vp.TEXT_PRIMARY},"&.Mui-error":{color:vp.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:vp.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Ep,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:vp.TEXT_SECONDARY,content:"'(required)'",fontWeight:Ep,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:yp,lineHeight:"16px",backgroundColor:vp.WHITE,borderRadius:wp,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.GREYSCALE_0_05}`,borderColor:vp.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.RED}`,boxShadow:`0px 0px 0px 1px ${vp.RED}, inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.GREYSCALE_0_10}`,borderColor:vp.GREYSCALE_0_10,backgroundColor:vp.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:vp.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:vp.GREYSCALE_0_15,borderRadius:wp,boxShadow:`inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>hi.jsx(Lp,{...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:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:vp.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:vp.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&:active":{backgroundColor:vp.GREYSCALE_0_10},"&:focus":{backgroundColor:vp.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${vp.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:vp.GREYSCALE_0_30,"&:hover":{backgroundColor:vp.GREYSCALE_0_0,borderColor:vp.GREYSCALE_0_15},"& ~svg":{color:vp.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${vp.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:wp}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:vp.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:yp,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:bp,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:bp,fontWeight:Ip,color:vp.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Ip}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${vp.GREYSCALE_0_15}, 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:hi.jsx(Tp,{}),checkedIcon:hi.jsx(Pp,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:vp.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:vp.GREYSCALE_0_20}},"&.Mui-disabled":{fill:vp.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:hi.jsx(Np,{}),checkedIcon:hi.jsx(Ap,{}),indeterminateIcon:hi.jsx(kp,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:wp,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:vp.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:vp.GREYSCALE_0_55,color:vp.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:vp.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:vp.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:vp.GREYSCALE_0_55,"&:hover":{color:vp.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:vp.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:vp.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:yp,color:vp.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Ip},secondary:{fontSize:bp,color:vp.GREYSCALE_45,fontWeight:Ep,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:yp,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:yp,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:vp.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:bp,borderBottom:`solid 1px ${vp.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:yp,color:vp.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:vp.RED}}},"&.Mui-focusVisible":{backgroundColor:vp.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:vp.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:vp.GREEN,height:"24px","&.Mui-disabled":{color:vp.GREYSCALE_0_15}},rail:{backgroundColor:vp.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${vp.GREYSCALE_0_05}`,borderRadius:wp,boxShadow:`inset 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${vp.GREYSCALE_0_05}`,borderRadius:wp},thumb:{height:"16px",width:"16px",borderRadius:wp,backgroundColor:vp.WHITE,boxShadow:`0px 1px 2px 0px ${vp.GREYSCALE_0_15}, 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`,"&:hover":{borderRadius:wp,boxShadow:`0 2px 4px 0 ${vp.GREYSCALE_0_30}, 0 0 0 1px ${vp.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${vp.GREYSCALE_0_15}, 0 0 0 1px ${vp.GREYSCALE_0_06}, 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${vp.GREYSCALE_0_15}, 0 0 0 1px ${vp.GREYSCALE_0_06}, 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:vp.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:vp.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:vp.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:vp.GREYSCALE_0_15},markLabel:{color:vp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:vp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:vp.WHITE,color:vp.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:vp.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:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:vp.GREYSCALE_0_15,borderRadius:wp},thumb:{height:"16px",width:"16px",borderRadius:wp,backgroundColor:vp.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:yp,fontWeight:Ip,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${vp.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,backgroundColor:vp.GREYSCALE_0_03,borderRadius:wp},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:vp.GREYSCALE_25,"&.Mui-selected":{color:vp.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:yp,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:wp,"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${vp.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${vp.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:wp,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:vp.GREYSCALE_0_05},"&:hover":{backgroundColor:vp.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${vp.GREYSCALE_85}`,borderRight:`1px solid ${vp.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Ip,backgroundColor:vp.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:vp.GREYSCALE_98,borderBottom:`1px solid ${vp.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${vp.GREYSCALE_85}`,borderTop:`1px solid ${vp.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:vp.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:vp.GREYSCALE_0_05,"&:hover":{backgroundColor:vp.GREYSCALE_0_03}},"&&:hover":{backgroundColor:vp.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>hi.jsx(Op,{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 ${vp.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:yp,borderRadius:wp,padding:"7px 16px",border:`1px solid ${vp.GREYSCALE_0_15}`,backgroundColor:vp.GREYSCALE_100_60,color:vp.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:vp.GREYSCALE_0_10,border:`1px solid ${vp.GREYSCALE_0_30}`},"&:hover":{backgroundColor:vp.GREYSCALE_0_03,border:`1px solid ${vp.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:vp.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`,border:`1px solid ${vp.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:vp.GREYSCALE_25,backgroundColor:vp.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:vp.GREYSCALE_0_10,border:`1px solid ${vp.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:bp,height:24,width:24,padding:7},sizeLarge:{fontSize:xp,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:yp,borderRadius:wp}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:vp.GREYSCALE_20},tooltip:{backgroundColor:vp.GREYSCALE_20,fontSize:bp,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}});const jp=e=>({mode:"light",primary:{ultraLight:vp.GREEN_ULTRA_LIGHT,light:vp.GREEN_PALE,main:vp.GREEN,dark:vp.GREEN_DARK,extraDark:vp.GREEN_EXTRA_DARK,contrastText:vp.WHITE},secondary:{ultraLight:vp.BLUE_ULTRA_LIGHT,light:vp.BLUE_PALE,main:vp.BLUE,dark:vp.BLUE_DARK,extraDark:vp.BLUE_EXTRA_DARK,contrastText:vp.WHITE},error:{ultraLight:vp.RED_ULTRA_LIGHT,light:vp.RED_PALE,main:vp.RED,dark:vp.RED_DARK,extraDark:vp.RED_EXTRA_DARK,contrastText:vp.WHITE},warning:{ultraLight:vp.ORANGE_ULTRA_LIGHT,light:vp.ORANGE_PALE,main:vp.ORANGE,dark:vp.ORANGE_DARK,extraDark:vp.ORANGE_EXTRA_DARK,contrastText:vp.WHITE},success:{ultraLight:vp.GREEN_ULTRA_LIGHT,light:vp.GREEN_PALE,main:vp.GREEN,dark:vp.GREEN_DARK,extraDark:vp.GREEN_EXTRA_DARK,contrastText:vp.WHITE},info:{ultraLight:vp.BLUE_ULTRA_LIGHT,light:vp.BLUE_PALE,main:vp.BLUE,dark:vp.BLUE_DARK,extraDark:vp.BLUE_EXTRA_DARK,contrastText:vp.WHITE},text:{primary:vp.TEXT_PRIMARY,secondary:vp.TEXT_SECONDARY,disabled:vp.GREYSCALE_0_30},action:{hover:vp.GREYSCALE_0_03,hoverOpacity:.03,selected:vp.GREYSCALE_0_05,selectedOpacity:.05,focus:vp.MISC_FOCUS_BORDER},amethyst:{ultraLight:vp.WHITE,main:vp.PURPLE,light:vp.PURPLE_PALE,dark:vp.PURPLE_DARK,extraDark:vp.GREYSCALE_0_0,contrastText:vp.WHITE},background:{paper:vp.WHITE,default:vp.GREYSCALE_95},divider:vp.GREYSCALE_0_15}),Fp=(e="light")=>ds({components:_p(),palette:jp(),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:yp,fontWeightLight:Cp,fontWeightRegular:Ep,fontWeightMedium:Ip,fontWeightBold:Dp,htmlFontSize:yp,fontFamily:Rp.FONT_FAMILY,button:{fontWeight:Ip,fontSize:yp,textTransform:"none"},body1:{fontSize:xp,lineHeight:"24px"},body2:{fontSize:yp,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:Sp,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:xp,fontWeight:Ip,lineHeight:"16px"},h6:{fontSize:yp,fontWeight:Ip,lineHeight:"16px"},caption:{color:vp.TEXT_SECONDARY},subtitle1:{fontSize:yp,color:vp.TEXT_SECONDARY},subtitle2:{fontSize:bp,color:vp.TEXT_SECONDARY}},shape:{borderRadius:wp}});function zp(e){return"init"in e}function Wp(e){return"function"==typeof e.write}function $p(e){return"v"in e||"e"in e}function Vp(e){if("e"in e)throw e.e;if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function Hp(e){return"function"==typeof(null==e?void 0:e.then)}function Bp(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function Gp(e,t,n){const r=n.get(e),o=null==r?void 0:r.t,i=t.p;if(!(null==o?void 0:o.size))return i;if(!i.size)return o;const a=new Set(o);for(const e of i)a.add(e);return a}const Up=()=>{const e={},t=new WeakMap,n=n=>{var r,o;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(o=t.get(n))||o.forEach(e=>e())};return n.add=(n,r)=>{const o=n||e;let i=t.get(o);return i||(i=new Set,t.set(o,i)),i.add(r),()=>{i.delete(r),i.size||t.delete(o)}},n};function Yp(e){return e.i||(e.i=Up()),e.r||(e.r=Up()),e.c||(e.c=Up()),e.m||(e.m=Up()),e.u||(e.u=Up()),e.f||(e.f=(()=>{const e=new Set,t=()=>e.forEach(e=>e());return t.add=t=>(e.add(t),()=>e.delete(t)),t})()),e}const Kp=(e,t,n,...r)=>n.read(...r),Xp=(e,t,n,...r)=>n.write(...r),Jp=(e,t,n)=>n.INTERNAL_onInit(t),Zp=(e,t,n,r)=>{var o;return null==(o=n.onMount)?void 0:o.call(n,r)},Qp=(e,t,n)=>{var r;const o=e[0];let i=o.get(n);if(!i){const a=e[6],s=e[9];i={d:new Map,p:new Set,n:0},o.set(n,i),null==(r=a.i)||r.call(a,n),function(e){return!!e.INTERNAL_onInit}(n)&&s(e,t,n)}return i},ef=(e,t)=>{var n;const r=e[1],o=e[3],i=e[4],a=e[5],s=e[6],l=e[13];if(!(s.f||o.size||i.size||a.size))return;const c=[],u=e=>{try{e()}catch(e){c.push(e)}};do{s.f&&u(s.f);const c=new Set;for(const e of o){const t=null==(n=r.get(e))?void 0:n.l;if(t)for(const e of t)c.add(e)}o.clear();for(const e of a)c.add(e);a.clear();for(const e of i)c.add(e);i.clear();for(const e of c)u(e);o.size&&l(e,t)}while(o.size||a.size||i.size);if(c.length)throw new AggregateError(c)},tf=(e,n)=>{const r=e[1],o=e[2],i=e[3],a=e[11],s=e[14],l=e[17];if(!i.size)return;const c=[],u=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of i)f.push(t),h.push(a(e,n,t));for(;f.length;){const i=f.length-1,s=f[i],l=h[i];if(p.has(s))f.pop(),h.pop();else if(d.has(s)){if(o.get(s)===l.n)c.push(s),u.push(l);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&o.has(s))throw new Error("[Bug] invalidated atom exists");p.add(s),f.pop(),h.pop()}else{d.add(s);for(const t of Gp(s,l,r))d.has(t)||(f.push(t),h.push(a(e,n,t)))}}for(let t=c.length-1;t>=0;--t){const r=c[t],a=u[t];let d=!1;for(const e of a.d.keys())if(e!==r&&i.has(e)){d=!0;break}d&&(o.set(r,a.n),s(e,n,r),l(e,n,r)),o.delete(r)}},nf=new WeakSet,rf=(e,n,r)=>{var o,i;const a=e[1],s=e[2],l=e[3],c=e[6],u=e[7],d=e[11],p=e[12],f=e[13],h=e[14],m=e[16],g=e[17],v=e[20],b=e[26],y=e[28],x=d(e,n,r),S=y[0];if($p(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,o]of x.d)if(h(e,n,r).n!==o){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(r)){const t=!l.size;g(e,n,r),t&&(f(e,n),p(e,n))}},D=t=>{var o;if(t===r){const r=d(e,n,t);if(!$p(r)){if(!zp(t))throw new Error("no atom init");v(e,n,t,t.init)}return Vp(r)}const i=h(e,n,t);try{return Vp(i)}finally{C.delete(t),x.d.set(t,i.n),Hp(x.v)&&Bp(r,x.v,i),a.has(r)&&(null==(o=a.get(t))||o.t.add(r)),w||I()}};let R,L;const M={get signal(){return R||(R=new AbortController),R.signal},get setSelf(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),"production"===(t.meta.env?t.meta.env.MODE:void 0)||Wp(r)||console.warn("setSelf function cannot be used with read-only atom"),!L&&Wp(r)&&(L=(...o)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,r,o)}finally{f(e,n),p(e,n)}}),L}},A=x.n,P=s.get(r)===A;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.delete(n);const i=u(e,n,r,D,M);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.has(n)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,r,i),Hp(i)){b(e,n,i,()=>null==R?void 0:R.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(o=c.r)||o.call(c,r),x.m=S,x}catch(e){if(function(e){if(!(e instanceof Error))return!1;const t=e.name,n=e.message.toLowerCase();return("RangeError"===t||"InternalError"===t)&&(n.includes("call stack")||n.includes("too much recursion")||n.includes("stack overflow"))}(e))throw e;return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==A&&P&&(s.set(r,x.n),l.add(r),null==(i=c.c)||i.call(c,r))}},of=(e,t,n)=>{const r=e[1],o=e[2],i=e[11],a=[n];for(;a.length;){const n=a.pop(),s=i(e,t,n);for(const l of Gp(n,s,r)){const n=i(e,t,l);o.get(l)!==n.n&&(o.set(l,n.n),a.push(l))}}},af=(e,n,r,o)=>{const i=e[3],a=e[6],s=e[8],l=e[11],c=e[12],u=e[13],d=e[14],p=e[15],f=e[16],h=e[17],m=e[20],g=e[28];let v=!0;const b=t=>Vp(d(e,n,t)),y=(o,...s)=>{var d;const b=l(e,n,o);try{if(o===r){if(!zp(o))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.add(n);const r=b.n,l=s[0];return m(e,n,o,l),h(e,n,o),void(r!==b.n&&(++g[0],i.add(o),p(e,n,o),null==(d=a.c)||d.call(a,o)))}return f(e,n,o,s)}finally{v||(u(e,n),c(e,n))}};try{return s(e,n,r,b,y,...o)}finally{v=!1}},sf=(e,t,n)=>{var r;const o=e[1],i=e[3],a=e[6],s=e[11],l=e[15],c=e[18],u=e[19],d=s(e,t,n),p=o.get(n);if(p&&d.d.size>0){for(const[o,u]of d.d)if(!p.d.has(o)){const d=s(e,t,o);c(e,t,o).t.add(n),p.d.add(o),u!==d.n&&(i.add(o),l(e,t,o),null==(r=a.c)||r.call(a,o))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const o=u(e,t,r);null==o||o.t.delete(n)}}},lf=(e,t,n)=>{var r;const o=e[1],i=e[4],a=e[6],s=e[10],l=e[11],c=e[12],u=e[13],d=e[14],p=e[16],f=e[18],h=l(e,t,n);let m=o.get(n);if(!m){d(e,t,n);for(const r of h.d.keys()){f(e,t,r).t.add(n)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},o.set(n,m),Wp(n)&&function(e){return!!e.onMount}(n)){const r=()=>{let r=!0;const o=(...o)=>{try{return p(e,t,n,o)}finally{r||(u(e,t),c(e,t))}};try{const i=s(e,t,n,o);i&&(m.u=()=>{r=!0;try{i()}finally{r=!1}})}finally{r=!1}};i.add(r)}null==(r=a.m)||r.call(a,n)}return m},cf=(e,t,n)=>{var r,o;const i=e[1],a=e[5],s=e[6],l=e[11],c=e[19],u=l(e,t,n);let d=i.get(n);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(r=i.get(e))?void 0:r.d.has(n)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,i.delete(n);for(const r of u.d.keys()){const o=c(e,t,r);null==o||o.t.delete(n)}null==(o=s.u)||o.call(s,n)},uf=(e,t,n,r)=>{const o=e[11],i=e[27],a=o(e,t,n),s="v"in a,l=a.v;if(Hp(r))for(const i of a.d.keys())Bp(n,r,o(e,t,i));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,Hp(l)&&i(e,t,l))},df=(e,t,n)=>Vp((0,e[14])(e,t,n)),pf=(e,t,n,...r)=>{const o=e[3],i=e[12],a=e[13],s=e[16],l=o.size;try{return s(e,t,n,r)}finally{o.size!==l&&(a(e,t),i(e,t))}},ff=(e,t,n,r)=>{const o=e[12],i=e[18],a=e[19],s=i(e,t,n).l;return s.add(r),o(e,t),()=>{s.delete(r),a(e,t,n),o(e,t)}},hf=(e,t,n,r)=>{const o=e[25];let i=o.get(n);if(!i){i=new Set,o.set(n,i);const e=()=>o.delete(n);n.then(e,e)}i.add(r)},mf=(e,t,n)=>{const r=e[25].get(n);null==r||r.forEach(e=>e())},gf=new WeakMap;function vf(e){const n=gf.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");const r=n[24];return r?r(n,e):n}function bf(...e){const t={get:e=>r(n,t,e),set:(e,...r)=>o(n,t,e,...r),sub:(e,r)=>i(n,t,e,r)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Kp,Xp,Jp,Zp,Qp,ef,tf,rf,of,af,sf,lf,cf,uf,df,pf,ff,void 0,new WeakMap,hf,mf,[0]].map((t,n)=>e[n]||t);gf.set(t,Object.freeze(n));const r=n[21],o=n[22],i=n[23];return t}let yf,xf=0;function Sf(e,n){const r="atom"+ ++xf,o={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?o.read=e:(o.init=e,o.read=wf,o.write=Cf),n&&(o.write=n),o}function wf(e){return e(this)}function Cf(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Ef(){return bf()}const If=c(void 0);function Df(e){const n=h(If);return(null==e?void 0:e.store)||n||(yf||(yf=Ef(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=yf),globalThis.__JOTAI_DEFAULT_STORE__!==yf&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),yf)}function Rf({children:e,store:t}){const n=l(null);return t?r(If.Provider,{value:t},e):(null===n.current&&(n.current=Ef()),r(If.Provider,{value:n.current},e))}const Lf=e=>"function"==typeof(null==e?void 0:e.then),Mf=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Af=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Mf(e),e)}),Pf=new WeakMap,qf=(e,t,n)=>{const r=vf(e),o=r[26];let i=Pf.get(t);return i||(i=new Promise((a,s)=>{let l=t;const c=e=>t=>{l===e&&a(t)},u=e=>t=>{l===e&&s(t)},d=()=>{try{const t=n();Lf(t)?(Pf.set(t,i),l=t,t.then(c(t),u(t)),o(r,e,t,d)):a(t)}catch(e){s(e)}};t.then(c(t),u(t)),o(r,e,t,d)}),Pf.set(t,i)),i};function kf(e,t){const{delay:r,unstable_promiseStatus:o=!n.use}={},i=Df(t),[[a,s,l],c]=u(t=>{const n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]);let f=a;if(s===i&&l===e||(c(),f=i.get(e)),d(()=>{const t=i.sub(e,()=>{if(o)try{const t=i.get(e);Lf(t)&&Mf(qf(i,t,()=>i.get(e)))}catch(e){}if("number"==typeof r)return console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n atom: Atom<Value>,\n options: { delay: number },\n): Value {\n const { delay } = options\n const store = useStore(options)\n const [value, setValue] = useState(() => store.get(atom))\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n setTimeout(() => setValue(store.get(atom)), delay)\n })\n return unsub\n }, [store, atom, delay])\n return value\n}\n"),void setTimeout(c,r);c()});return c(),t},[i,e,r,o]),p(f),Lf(f)){const t=qf(i,f,()=>i.get(e));return o&&Mf(t),Af(t)}return f}function Tf(e,n){const r=Df(n);return f((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function Of(e,t){return[kf(e,t),Tf(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let o,i;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}o=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let o;try{o=JSON.parse(e||"",null==n?void 0:n.reviver)}catch(e){o=r}t(o)})))}();const Nf=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),_f=new WeakMap,jf=()=>{};const Ff=new WeakMap;function zf(e,t){const n=Df(t),r=Wf(n);for(const[o,...i]of e)r.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(o),n.set(o,...i))}const Wf=e=>{let t=Ff.get(e);return t||(t=new WeakSet,Ff.set(e,t)),t};function $f(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Vf(e){const t=Sf(()=>[]),n=Sf(function(e){const[r,o,i]=e(t);i.has(n)&&(r.forEach(e),++o.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=vf(e),o=r[1],i=r[3],a=Yp(r[6]),s=r[11],l=r[12],c=r[13],u=r[14],d=r[15],p=r[16],f=r[17],h=r[20],m=new Set;let g,v=0,b=!1,y=!1,x=!1;function S(){if(v)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===n){const t=s(r,e,i);if(!$p(t)){if(!zp(i))throw new Error("no atom init");h(r,e,i,i.init)}return Vp(t)}const a=u(r,e,i);try{return Vp(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(n),t?m.add(i):o.has(i)&&(f(r,e,n),c(r,e),l(r,e))}};w.peek=e.get;const E=(o,...u)=>{const m=s(r,e,o);try{if(++v,o===n){if(!zp(o))throw new Error("atom not writable");const t=m.n,n=u[0];return h(r,e,o,n),f(r,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(r,e,o)))}return p(r,e,o,u)}finally{t||(c(r,e),l(r,e)),--v}};E.recurse=(t,...o)=>{if(x){if($f())throw new Error("set.recurse is not allowed in cleanup")}else try{return b=!0,f(r,e,n),E(t,...o)}finally{c(r,e),b=!1,y&&(y=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!v)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),c(r,e)}}const w=function(e,t){let n=Hf.get(e);n||(n=new Set,Hf.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(n,function(){i.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){b?y=!0:w.add(S)})},$f()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const Hf=new WeakMap;const Bf=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionToAlternative(n):await t.moveMeasureToAlternative(n))},Gf=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionFromAlternative(n):await t.moveMeasureFromAlternative(n))},Uf=e=>{const{type:t,handler:n,model:r,fieldTypeById:o,handlerQueue:i}=e;void 0!==n&&void 0!==r&&i&&i.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Gf(o,n,t);for(const t of e.localUnchecked)await Bf(o,n,t);break;case"checked":await Gf(o,n,e.cId);break;case"unchecked":await Bf(o,n,e.cId)}})},Yf=Sf(),Kf=Sf(),Xf=Sf(),Jf=Sf(e=>e(Xf)?.logInfo??(()=>{})),Zf=Sf(e=>e(Xf)?.translate??(e=>e)),Qf=Sf(""),eh=Sf(e=>{const t=e(Qf).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),th=Sf(e=>e(Xf)?.getBooleanFlag??(()=>!1)),nh=e=>7005!==e.qError?.qErrorCode,rh=e=>"string"==typeof e,oh=e=>"number"==typeof e,ih=e=>"boolean"==typeof e,ah=e=>e instanceof Set,sh=e=>e instanceof Map,lh=e=>{if(e instanceof Error)return e.message;if(null===e)return"null";if(void 0===e)return"undefined";if(rh(e))return e;if(ah(e))try{return JSON.stringify([...e])}catch{return"Failed to serialize Set"}if(sh(e))try{return JSON.stringify(Object.fromEntries(e))}catch{return"Failed to serialize Map"}try{return JSON.stringify(e)}catch{return"Failed to serialize value"}},ch=e=>{if(null!=e){if(rh(e))return e;if(e instanceof Error)return lh(e);if(oh(e)||ih(e))return String(e);if(Array.isArray(e)||ah(e)||sh(e))return lh(e);if((e=>"object"==typeof e&&null!==e&&!Array.isArray(e))(e)){const t={};return Object.entries(e).forEach(([e,n])=>{rh(n)||oh(n)||ih(n)?t[e]=n:t[e]=lh(n)}),t}return lh(e)}},uh=(e,t={})=>{const{tag:n}=t,r=({msg:t,payload:r})=>{const o=((e,t)=>{const n=[];return rh(t)&&t.length>0?n.push(t):Array.isArray(t)&&n.push(...t.filter(e=>"string"==typeof e&&e.length>0)),n.length>0?`${n.map(e=>`[${e}]`).join("")} ${e}`:e})(t,n);return e.anything?.logInfo?.(o,ch(r)),o};return{warn:({msg:e,payload:t})=>{r({msg:e,payload:t})},error:({msg:e,payload:t})=>{r({msg:e,payload:t})}}},dh=new WeakMap,ph={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},fh=function(e,n=jf){return((e,t,n)=>{const r=Nf(()=>new WeakMap,_f,t);return Nf(e,r,n)})(()=>{const r=new WeakMap,o=new WeakMap,i=Sf(0),a=Sf([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(i.debugPrivate=!0,a.debugPrivate=!0);const s=Sf(t=>{let l;t(i);try{l=t(s)}catch(e){}const c=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(c))return{v:c};if(c!==(null==l?void 0:l.p)&&c.then(e=>{o.set(c,e);const[n]=t(a);n()},e=>{r.set(c,e);const[n]=t(a);n()}),r.has(c))throw r.get(c);return o.has(c)?{p:c,v:o.get(c)}:l&&"v"in l?{p:c,f:n(l.v),v:l.v}:{p:c,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),Sf(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(Sf(async e=>{const t=e(Yf),n=e(Jf),r=uh({anything:{logInfo:n}},{tag:"sn-pivot-table"});if(t){if(dh.has(t))return dh.get(t);try{const e=await t.app.createSessionObject(ph);return dh.set(t,e),e}catch(e){return void r.error({msg:"Error creating alternative layout model",payload:e})}}})),hh=Sf(null),mh=Sf(),gh=Vf((e,t)=>{const n=e(Yf),r=e(fh);if(!n||!r)return;const o=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(o.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(o.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures??[])}]);const i=await r.getLayout();t(mh,{layout:structuredClone(e),properties:structuredClone(o),altLayout:structuredClone(i)}),t(hh,null)};return o(),n.Invalidated?.bind(o),()=>{n.Invalidated?.unbind(o)}}),vh=Sf(e=>e(mh)?.layout),bh=Sf(e=>e(mh)?.altLayout),yh=Sf(e=>e(mh)?.properties),xh=Sf(e=>{const t=e(mh)?.layout;return t?.qHyperCube.qDimensionInfo.filter(nh)??[]}),Sh=Sf(e=>{const t=e(mh)?.layout;return t?.qHyperCube.qMeasureInfo.filter(nh)??[]}),wh=(e,t)=>{e?.forEach(e=>{7005===e.qError?.qErrorCode&&t.add(e.cId)})},Ch=Sf(e=>{const t=e(mh),n=new Set;return wh(t?.layout?.qHyperCube.qDimensionInfo,n),wh(t?.altLayout?.qHyperCube.qDimensionInfo,n),n}),Eh=Sf(e=>{const t=e(mh),n=new Set;return wh(t?.layout?.qHyperCube.qMeasureInfo,n),wh(t?.altLayout?.qHyperCube.qMeasureInfo,n),n}),Ih=Sf(e=>{const t=e(yh),n=new Map;return t?(t.qHyperCubeDef.qDimensions.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qMeasures.forEach(e=>{n.set(e.qDef.cId,"measure")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions?.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures?.forEach(e=>{n.set(e.qDef.cId,"measure")}),n):n});class Dh{#e=[];#t=!1;#n=!1;#r;#o;#i;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;var n;await(n=e,new Promise(e=>{setTimeout(e,n)})),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const Rh=Sf(null),Lh=Vf((e,t)=>{const n=e(Yf),r=e(Kf),o=new Dh({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(Rh,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return n?.Invalidated?.bind(i),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{o.abort(),n?.Invalidated?.unbind(i),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),Mh=Sf(e=>{const t=[...e(xh),...e(Sh)].map(e=>e.cId);return new Set(t)}),Ah=Sf(new Set),Ph=Sf(new Set),qh=Sf(e=>{const t=e(Ah),n=e(Ph);return e(Mh).difference(n).union(t)}),kh=Vf((e,t)=>{e(Mh),t(Ah,new Set),t(Ph,new Set)}),Th=Sf(e=>e(qh),(e,t,n)=>{if("string"!=typeof n)return;const r=e(qh).has(n),o=new Set(e(Ph)),i=new Set(e(Ah));r?(o.add(n),i.delete(n)):(i.add(n),o.delete(n)),t(Ph,o),t(Ah,i),Uf({type:r?"unchecked":"checked",cId:n,handler:e(Kf),model:e(Yf),fieldTypeById:e(Ih),handlerQueue:e(Rh)})}),Oh=({props:e,children:t})=>(zf([[Yf,e.args.model],[Xf,e.args.apis],[Kf,e.args.handler]]),kf(kh),kf(gh),kf(Lh),t);function Nh(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function _h(e){return"write"in e}const jh=new WeakMap,Fh={},{read:zh,write:Wh}=Sf(null);function $h(e,t,n){const[r,o,i,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=o.get(t);return r||(r=[Gh(e,t,n),n],o.set(t,r)),r}const l=n??Fh;let c=i.get(l);c||(c=new WeakMap,i.set(l,c));let u=c.get(t);if(!u){const[r,o]=a?$h(a,t,n):[t];u=[t.read===zh?r:Gh(e,t,o),o],c.set(t,u)}return u}function Vh(e){for(const t of e[5])t()}function Hh(e,t,n,r,o){if(n.read===zh&&_h(n)&&_h(t)&&n.write!==Wh&&e!==r){const{write:i}=n;return t.write=Bh(e,n.write.bind(n),r,o),()=>{t.write=i}}}function Bh(e,t,n,r=n){return function(o,i,...a){return t(function(t){const[r]=$h(e,t,n);return o(r)},function(t,...o){const[a]=$h(e,t,n),s=Hh(e,a,t,n,r);try{return i(a,...o)}finally{null==s||s()}},...a)}}function Gh(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,r);return i.read!==zh&&(i.read=function(e,t,n){return function(r,o){return t(function(t){const[o]=$h(e,t,n);return r(o)},o)}}(e,t.read.bind(t),n)),_h(i)&&_h(t)&&i.write!==Wh&&(i.write=Bh(e,t.write.bind(t),n)),i}function Uh({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const o=new WeakSet(e),i=jh.get(n),a=(null==i?void 0:i[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],c=s[5],u=function(e){const t=e[3],n=[...vf(t)],r=n[21],o=n[22],i=n[23],a={};let s,l;return n[21]=h(r),n[22]=p,n[23]=h(i),n[24]=function(e){return s??(s=m(e[0],c)),l??(l=[s,m(e[1],u),m(e[2]),g(e[3]),e[4],e[5],b(e[6]),h(e[7]),h(e[8]),h(e[9]),h(e[10]),d(s,e[11]),(t,...r)=>e[12](n,...r),(t,...r)=>e[13](n,...r),h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e,e[25],(t,...r)=>e[26](n,...r),(t,...r)=>e[27](n,...r),e[28],...e.slice(25)]),l},bf(...n);function c(t){const n=new WeakMap;return function(r){let o=n.get(r);if(o)return o;const i=t(r);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,n)=>"d"===n?a??(a=m(i.d,function(t){return n=>t($h(e,n)[0])})):"p"===n?s??(s=g(i.p)):Reflect.get(i,n)}),n.set(r,o),o}}function u(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const o=e(n);return o?(r={...o,d:g(o.d),t:g(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(n,r),r):void 0}}function d(e,t){const n=h(t);return function(t,r,o){const i=e.get(o);if(i)return i;const a=n(t,r,o);return e.set(o,a),e.get(o)}}function p(t,n,r,...i){const[a,s]=$h(e,r),l=Hh(e,a,r,s,e);try{return o(t,n,a,...i)}finally{null==l||l()}}function f(t,n){return function(r,...o){const[i]=$h(e,r);return(n?n(t):t)(i,...o)}}function h(t){return function(r,o,i,...a){const[s]=$h(e,i);return t(n,o,s,...a)}}function m(e,t){const n={get:f(e.get.bind(e),t),set:f(e.set.bind(e)),has:f(e.has.bind(e)),delete:f(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield $h(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[o]=$h(e,n);return t.add(o,r)},n}function b(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>a[t]??(a[t]=v(e[t])),set(n){delete a[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=u,Object.assign(u,{name:r}),jh.set(u,s);for(const t of new Set(e))l.set(t,[Gh(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[Gh(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[Gh(s,t,s),s])});c.add(t)}return u}const Yh=function(e,t){return function(n){const{atoms:o=[],atomFamilies:i=[],children:a,scope:s,name:l}=n,c=t(),u=Array.from(o,e=>Array.isArray(e)?e[0]:e);function p(){return[s??Uh({atoms:u,atomFamilies:i,parentStore:c,name:l}),function(e){return c!==e.parentStore||!Nh(u,e.atoms)||!Nh(i,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:u,atomFamilies:i,parentStore:c,providedScope:s})){const e=jh.get(f);e&&Vh(e),g(p)}return zf(Array.from(o).filter(Array.isArray),{store:f}),d(()=>{const e=jh.get(f);return()=>{e&&Vh(e)}},[f]),r(e,{store:f,children:a})}}(Rf,Df);var Kh=Object.defineProperty,Xh=Object.defineProperties,Jh=Object.getOwnPropertyDescriptors,Zh=Object.getOwnPropertySymbols,Qh=Object.prototype.hasOwnProperty,em=Object.prototype.propertyIsEnumerable,tm=(e,t,n)=>t in e?Kh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nm=(e,t)=>{for(var n in t||(t={}))Qh.call(t,n)&&tm(e,n,t[n]);if(Zh)for(var n of Zh(t))em.call(t,n)&&tm(e,n,t[n]);return e},rm=(e,t)=>Xh(e,Jh(t));function om(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function im(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function am(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function sm(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(am(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&am(i)){const r=null==i.initialGroup?void 0:im(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:im(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return rm(nm({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return rm(nm({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=im(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&am(i)){const t=null==i.group?void 0:im(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return rm(nm({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return rm(nm({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return rm(nm({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,v=e[u][p];return rm(nm({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),v,...e[d].slice(f+g)]})}(e,t,om)}function lm(e,t){let n=null;const r=new Map,o=new Set;function i(o){let s;if(void 0===t)s=r.get(o);else for(const[e,n]of r)if(t(e,o)){s=n;break}if(void 0!==s){if(!n?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,o]]of r)n(o,e)&&(r.delete(e),a("REMOVE",e,t))},i}const cm=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,um=Sf(),dm=Sf(e=>e(um)?.numberOfSections??0),pm=Sf(e=>e(um)?.numberOfItemsInSection??[]),fm=Sf(e=>e(um)?.keyExtractor??cm),hm=Sf(e=>e(um)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),mm=Sf(e=>e(um)?.onDragEnd),gm=Sf(e=>e(um)?.onDragOver),vm=Sf(e=>e(um)?.itemRenderer),bm=Sf(e=>e(um)?.headerRenderer),ym=Sf(e=>e(um)?.dragOverlayRenderer),xm=Sf(e=>e(um)?.onClick),Sm=Sf(e=>{const t=e(dm),n=e(pm),r=e(fm),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return o}),wm=Sf(null),Cm=Sf(e=>e(wm),(e,t,n)=>{if(null===n)return void t(wm,null);const r=e(wm);t(wm,{...r,...n})}),Em=lm(e=>Sf(null,(t,n,r)=>{let o;"over"===e?o=t(gm):"end"===e&&(o=t(mm),n(Cm,null));const{source:i,target:a}=r.operation;if("start"===e)return void n(Cm,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void n(Cm,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=sm(t(Sm),r)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(Cm)?.startIndex;n(Cm,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(Cm)?.startSection??i.data.sectionKey,event:r})})),Im=[um,dm,pm,fm,hm,mm,vm,bm,xm,Cm],Dm=[Em],Rm=({props:e,children:t})=>{const n=Tf(um);return g(()=>{n(e)},[e,n]),t};var Lm=Symbol.for("preact-signals");function Mm(){if(Tm>1)Tm--;else{var e,t=!1;for(!function(){var e=jm;for(jm=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==km;){var n=km;for(km=void 0,Om++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Vm(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Om=0,Tm--,t)throw e}}function Am(e){if(Tm>0)return e();_m=++Nm,Tm++;try{return e()}finally{Mm()}}var Pm=void 0;function qm(e){var t=Pm;Pm=void 0;try{return e()}finally{Pm=t}}var km=void 0,Tm=0,Om=0,Nm=0,_m=0,jm=void 0,Fm=0;function zm(e){if(void 0!==Pm){var t=e.n;if(void 0===t||t.t!==Pm)return t={i:0,S:e,p:Pm.s,n:void 0,t:Pm,e:void 0,x:void 0,r:t},void 0!==Pm.s&&(Pm.s.n=t),Pm.s=t,e.n=t,32&Pm.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=Pm.s,t.n=void 0,Pm.s.n=t,Pm.s=t),t}}function Wm(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function $m(e,t){return new Wm(e,t)}function Vm(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Hm(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Bm(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Gm(e,t){Wm.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Fm-1,this.f=4}function Um(e,t){return new Gm(e,t)}function Ym(e){var t=e.m;if(e.m=void 0,"function"==typeof t){Tm++;var n=Pm;Pm=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Km(e),t}finally{Pm=n,Mm()}}}function Km(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ym(e)}function Xm(e){if(Pm!==this)throw new Error("Out-of-order effect");Bm(this),Pm=e,this.f&=-2,8&this.f&&Km(this),Mm()}function Jm(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function Zm(e,t){var n=new Jm(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}Wm.prototype.brand=Lm,Wm.prototype.h=function(){return!0},Wm.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:qm(function(){var e;null==(e=t.W)||e.call(t)}))},Wm.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&qm(function(){var e;null==(e=t.Z)||e.call(t)}))}},Wm.prototype.subscribe=function(e){var t=this;return Zm(function(){var n=t.value;qm(function(){return e(n)})},{name:"sub"})},Wm.prototype.valueOf=function(){return this.value},Wm.prototype.toString=function(){return this.value+""},Wm.prototype.toJSON=function(){return this.value},Wm.prototype.peek=function(){var e=this;return qm(function(){return e.value})},Object.defineProperty(Wm.prototype,"value",{get:function(){var e=zm(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Om>100)throw new Error("Cycle detected");!function(e){0!==Tm&&0===Om&&e.l!==_m&&(e.l=_m,jm={S:e,v:e.v,i:e.i,o:jm})}(this),this.v=e,this.i++,Fm++,Tm++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Mm()}}}}),Gm.prototype=new Wm,Gm.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Fm)return!0;if(this.g=Fm,this.f|=1,this.i>0&&!Vm(this))return this.f&=-2,!0;var e=Pm;try{Hm(this),Pm=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Pm=e,Bm(this),this.f&=-2,!0},Gm.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Wm.prototype.S.call(this,e)},Gm.prototype.U=function(e){if(void 0!==this.t&&(Wm.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Gm.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Gm.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=zm(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Jm.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},Jm.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ym(this),Hm(this),Tm++;var e=Pm;return Pm=this,Xm.bind(this,e)},Jm.prototype.N=function(){2&this.f||(this.f|=2,this.u=km,km=this)},Jm.prototype.d=function(){this.f|=8,1&this.f||Km(this)},Jm.prototype.dispose=function(){this.d()};var Qm,eg,tg,ng,rg,og,ig,ag,sg,lg,cg,ug,dg,pg,fg,hg,mg,gg,vg,bg,yg=Object.create,xg=Object.defineProperty,Sg=Object.defineProperties,wg=Object.getOwnPropertyDescriptor,Cg=Object.getOwnPropertyDescriptors,Eg=Object.getOwnPropertySymbols,Ig=Object.prototype.hasOwnProperty,Dg=Object.prototype.propertyIsEnumerable,Rg=e=>{throw TypeError(e)},Lg=(e,t,n)=>t in e?xg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mg=(e,t)=>xg(e,"name",{value:t,configurable:!0}),Ag=["class","method","getter","setter","accessor","field","value","get","set"],Pg=e=>void 0!==e&&"function"!=typeof e?Rg("Function expected"):e,qg=(e,t,n,r,o)=>({kind:Ag[e],name:t,metadata:r,addInitializer:e=>n._?Rg("Already initialized"):o.push(Pg(e||null))}),kg=(e,t)=>{return Lg(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Tg=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Og=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Ag[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&wg(d<4?o:{get[n](){return jg(this,i)},set[n](e){return zg(this,i,e)}},n));d?f&&d<4&&Mg(i,(d>2?"set ":d>1?"get ":"")+n):Mg(o,n);for(var y=r.length-1;y>=0;y--)c=qg(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>_g(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?jg:Wg)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>zg(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?Pg(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?Rg("Object expected"):(Pg(a=s.get)&&(b.get=a),Pg(a=s.set)&&(b.set=a),Pg(a=s.init)&&g.unshift(a));return d||kg(e,o),b&&xg(o,n,b),f?4^d?i:b:o},Ng=(e,t,n)=>t.has(e)||Rg("Cannot "+n),_g=(e,t)=>Object(t)!==t?Rg('Cannot use the "in" operator on this value'):e.has(t),jg=(e,t,n)=>(Ng(e,t,"read from private field"),n?n.call(e):t.get(e)),Fg=(e,t,n)=>t.has(e)?Rg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),zg=(e,t,n,r)=>(Ng(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Wg=(e,t,n)=>(Ng(e,t,"access private method"),n);function $g(e,t){if(t){let n;return Um(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return Um(e)}function Vg(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!Vg(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return!n.some(n=>!Vg(e[n],t[n]))}return!1}function Hg({get:e},t){return{init:e=>$m(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function Bg(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=$g(e.bind(this)),n.set(this,t)),t.value}}function Gg(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>Sg(e,Cg(t)))(((e,t)=>{for(var n in t||(t={}))Ig.call(t,n)&&Lg(e,n,t[n]);if(Eg)for(var n of Eg(t))Dg.call(t,n)&&Lg(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function Ug(...e){const t=e.map(e=>Zm(e));return()=>t.forEach(e=>e())}og=[Hg],rg=[Hg],ng=[Hg],tg=[Gg()],eg=[Gg()],Qm=[Gg()];var Yg,Kg=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Tg(ig,5,this),Fg(this,ug),Fg(this,ag,Tg(ig,8,this)),Tg(ig,11,this),Fg(this,dg,Tg(ig,12,this)),Tg(ig,15,this),Fg(this,mg,Tg(ig,16,this)),Tg(ig,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return jg(this,ug,vg)}get initial(){return jg(this,ug,lg)}get previous(){return jg(this,ug,fg)}set current(e){const t=qm(()=>jg(this,ug,vg));e&&t&&this.equals(t,e)||Am(()=>{jg(this,ug,lg)||zg(this,ug,e,cg),zg(this,ug,t,hg),zg(this,ug,e,bg)})}reset(e=this.defaultValue){Am(()=>{zg(this,ug,void 0,hg),zg(this,ug,e,cg),zg(this,ug,e,bg)})}};function Xg(e){return qm(()=>{const t={};for(const n in e)t[n]=e[n];return t})}ig=[,,,yg(null)],ag=new WeakMap,ug=new WeakSet,dg=new WeakMap,mg=new WeakMap,sg=Og(ig,20,"#initial",og,ug,ag),lg=sg.get,cg=sg.set,pg=Og(ig,20,"#previous",rg,ug,dg),fg=pg.get,hg=pg.set,gg=Og(ig,20,"#current",ng,ug,mg),vg=gg.get,bg=gg.set,Og(ig,2,"current",tg,Kg),Og(ig,2,"initial",eg,Kg),Og(ig,2,"previous",Qm,Kg),kg(ig,Kg);Yg=new WeakMap;var Jg,Zg,Qg,ev,tv,nv=Object.create,rv=Object.defineProperty,ov=Object.getOwnPropertyDescriptor,iv=Object.getOwnPropertySymbols,av=Object.prototype.hasOwnProperty,sv=Object.prototype.propertyIsEnumerable,lv=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),cv=e=>{throw TypeError(e)},uv=Math.pow,dv=(e,t,n)=>t in e?rv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pv=["class","method","getter","setter","accessor","field","value","get","set"],fv=e=>void 0!==e&&"function"!=typeof e?cv("Function expected"):e,hv=(e,t,n,r,o)=>({kind:pv[e],name:t,metadata:r,addInitializer:e=>n._?cv("Already initialized"):o.push(fv(e||null))}),mv=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=pv[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,ov(o,n)),h=r.length-1;h>=0;h--)(l=hv(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,fv(a)&&(f[d]=a);return f&&rv(o,n,f),o},gv=(e,t,n)=>t.has(e)||cv("Cannot "+n),vv=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},bv=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,r+n,i,a);return l.scale=((e,t)=>{for(var n in t||(t={}))av.call(t,n)&&dv(e,n,t[n]);if(iv)for(var n of iv(t))sv.call(t,n)&&dv(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:o,bottom:i}=this;return{width:e,height:t,left:n,top:r,right:o,bottom:i}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new vv((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:o,height:i}=this;return n===t.left&&r===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:o}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new e(n,t,r,o)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==r?o:"end"==r?o+i:o+i/2};return vv.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var yv,xv=class extends(Qg=Kg,Zg=[Bg],Jg=[Bg],Qg){constructor(e){var t,n,r;super(vv.from(e),(e,t)=>vv.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(tv,5,this),t=this,r=0,(n=ev).has(t)?cv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return vv.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=vv.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(gv(a=this,s=ev,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);Am(()=>{((e,t,n)=>{gv(e,t,"write to private field"),t.set(e,n)})(this,ev,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(vv.from(e)),this.velocity={x:0,y:0}}};function Sv({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return"number"==typeof n?Math.sqrt(uv(r,2)+uv(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n&&o>n.y}tv=(e=>{var t;return[,,,nv(null!=(t=null==e?void 0:e[lv("metadata")])?t:null)]})(Qg),ev=new WeakMap,mv(tv,2,"delta",Zg,xv),mv(tv,2,"direction",Jg,xv),yv=tv,dv(xv,lv("metadata"),yv[3]);var wv,Cv,Ev,Iv,Dv=(e=>(e.Horizontal="x",e.Vertical="y",e))(Dv||{}),Rv=Object.values(Dv),Lv=Object.create,Mv=Object.defineProperty,Av=Object.defineProperties,Pv=Object.getOwnPropertyDescriptor,qv=Object.getOwnPropertyDescriptors,kv=Object.getOwnPropertySymbols,Tv=Object.prototype.hasOwnProperty,Ov=Object.prototype.propertyIsEnumerable,Nv=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),_v=e=>{throw TypeError(e)},jv=(e,t,n)=>t in e?Mv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fv=(e,t)=>{for(var n in t||(t={}))Tv.call(t,n)&&jv(e,n,t[n]);if(kv)for(var n of kv(t))Ov.call(t,n)&&jv(e,n,t[n]);return e},zv=(e,t)=>Av(e,qv(t)),Wv=(e,t)=>Mv(e,"name",{value:t,configurable:!0}),$v=(e,t)=>{var n={};for(var r in e)Tv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&kv)for(var r of kv(e))t.indexOf(r)<0&&Ov.call(e,r)&&(n[r]=e[r]);return n},Vv=e=>{var t;return[,,,Lv(null!=(t=null==e?void 0:e[Nv("metadata")])?t:null)]},Hv=["class","method","getter","setter","accessor","field","value","get","set"],Bv=e=>void 0!==e&&"function"!=typeof e?_v("Function expected"):e,Gv=(e,t,n,r,o)=>({kind:Hv[e],name:t,metadata:r,addInitializer:e=>n._?_v("Already initialized"):o.push(Bv(e||null))}),Uv=(e,t)=>jv(t,Nv("metadata"),e[3]),Yv=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Kv=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Hv[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Pv(d<4?o:{get[n](){return Zv(this,i)},set[n](e){return eb(this,i,e)}},n));d?f&&d<4&&Wv(i,(d>2?"set ":d>1?"get ":"")+n):Wv(o,n);for(var y=r.length-1;y>=0;y--)c=Gv(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>Jv(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?Zv:tb)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>eb(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?Bv(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?_v("Object expected"):(Bv(a=s.get)&&(b.get=a),Bv(a=s.set)&&(b.set=a),Bv(a=s.init)&&g.unshift(a));return d||Uv(e,o),b&&Mv(o,n,b),f?4^d?i:b:o},Xv=(e,t,n)=>t.has(e)||_v("Cannot "+n),Jv=(e,t)=>Object(t)!==t?_v('Cannot use the "in" operator on this value'):e.has(t),Zv=(e,t,n)=>(Xv(e,t,"read from private field"),n?n.call(e):t.get(e)),Qv=(e,t,n)=>t.has(e)?_v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),eb=(e,t,n,r)=>(Xv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tb=(e,t,n)=>(Xv(e,t,"access private method"),n);function nb(e,t){return{plugin:e,options:t}}function rb(e){return t=>nb(e,t)}function ob(e){return"function"==typeof e?{plugin:e,options:void 0}:e}wv=[Hg];var ib=class{constructor(e,t){this.manager=e,this.options=t,Qv(this,Ev,Yv(Cv,8,this,!1)),Yv(Cv,11,this),Qv(this,Iv,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return qm(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=Zm(e.bind(this));return Zv(this,Iv).add(t),t}destroy(){Zv(this,Iv).forEach(e=>e())}static configure(e){return nb(this,e)}};Cv=Vv(null),Ev=new WeakMap,Iv=new WeakMap,Kv(Cv,4,"disabled",wv,ib,Ev),Uv(Cv,ib);var ab,sb=class extends ib{},lb=class{constructor(e){this.manager=e,this.instances=new Map,Qv(this,ab,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(ob).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of Zv(this,ab))if(!n.includes(e)){if(e.prototype instanceof sb)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);eb(this,ab,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function cb(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}ab=new WeakMap;var ub,db,pb,fb,hb,mb,gb,vb,bb,yb,xb,Sb,wb=[],Cb=class extends ib{constructor(e){super(e),Qv(this,ub),Qv(this,db),this.computeCollisions=this.computeCollisions.bind(this),eb(this,db,$m(wb)),this.destroy=Ug(()=>{const e=this.computeCollisions(),t=qm(()=>this.manager.dragOperation.position.current);if(e!==wb){const e=Zv(this,ub);if(eb(this,ub,t),e&&t.x==e.x&&t.y==e.y)return}else eb(this,ub,void 0);Zv(this,db).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){qm(()=>{e?Zv(this,db).value=this.computeCollisions():eb(this,ub,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:i,status:a}=r;if(!a.initialized||!i)return wb;const s=[],l=[];for(const i of null!=e?e:n.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const n=qm(()=>e({droppable:i,dragOperation:r}));n&&(null!=i.collisionPriority&&(n.priority=i.collisionPriority),s.push(n))}return 0===l.length?wb:(s.sort(cb),s)}get collisions(){return Zv(this,db).value}};ub=new WeakMap,db=new WeakMap,hb=[Hg],fb=[Hg],pb=[Hg];var Eb=class e{constructor(e,t){Qv(this,bb,Yv(vb,8,this)),Yv(vb,11,this),Qv(this,yb),Qv(this,xb,Yv(vb,12,this)),Yv(vb,15,this),Qv(this,Sb,Yv(vb,16,this)),Yv(vb,19,this);const{effects:n,id:r,data:o={},disabled:i=!1,register:a=!0}=e;let s=r;eb(this,yb,$m(r)),this.manager=t,this.data=o,this.disabled=i,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=Zv(this,yb).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:Zv(this,yb).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return tb(t=e,mb,gb).call(t)})),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};vb=Vv(null),mb=new WeakSet,gb=function(){const e=Eb.pendingIdChanges;Eb.pendingIdChanges=null,e&&Am(()=>{for(const[t,n]of e)Zv(t,yb).value=n})},bb=new WeakMap,yb=new WeakMap,xb=new WeakMap,Sb=new WeakMap,Kv(vb,4,"manager",hb,Eb,bb),Kv(vb,4,"data",fb,Eb,xb),Kv(vb,4,"disabled",pb,Eb,Sb),Qv(Eb,mb),Uv(vb,Eb),Eb.pendingIdChanges=null;var Ib,Db,Rb,Lb,Mb,Ab,Pb,qb,kb,Tb,Ob,Nb,_b,jb,Fb,zb,Wb,$b,Vb,Hb,Bb,Gb,Ub,Yb,Kb=Eb,Xb=class{constructor(){this.map=$m(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const i=new Map(n);for(const[r,o]of n)if(o===t&&r!==e){i.delete(r);break}i.set(e,t),this.map.value=i;const a=Ug(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},Jb=class extends(Pb=Kb,Ab=[Hg],Mb=[Hg],Lb=[Hg],Rb=[Bg],Db=[Bg],Ib=[Bg],Pb){constructor(e,t){var n=e,{modifiers:r,type:o,sensors:i,plugins:a,effects:s}=n,l=$v(n,["modifiers","type","sensors","plugins","effects"]);super(zv(Fv({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=ob(n);e.registry.plugins.register(t)}}]}}),t),Yv(qb,5,this),Qv(this,kb,Yv(qb,8,this)),Yv(qb,11,this),Qv(this,Tb,Yv(qb,12,this)),Yv(qb,15,this),Qv(this,Ob,Yv(qb,16,this,this.isDragSource?"dragging":"idle")),Yv(qb,19,this),this.type=o,this.sensors=i,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=ob(t);if(n.plugin===e)return n.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};qb=Vv(Pb),kb=new WeakMap,Tb=new WeakMap,Ob=new WeakMap,Kv(qb,4,"type",Ab,Jb,kb),Kv(qb,4,"modifiers",Mb,Jb,Tb),Kv(qb,4,"status",Lb,Jb,Ob),Kv(qb,2,"isDropping",Rb,Jb),Kv(qb,2,"isDragging",Db,Jb),Kv(qb,2,"isDragSource",Ib,Jb),Uv(qb,Jb);var Zb=class extends($b=Kb,Wb=[Hg],zb=[Hg],Fb=[Hg],jb=[Hg],_b=[Hg],Nb=[Bg],$b){constructor(e,t){var n=e,{accept:r,collisionDetector:o,collisionPriority:i,type:a}=n;super($v(n,["accept","collisionDetector","collisionPriority","type"]),t),Yv(Vb,5,this),Qv(this,Hb,Yv(Vb,8,this)),Yv(Vb,11,this),Qv(this,Bb,Yv(Vb,12,this)),Yv(Vb,15,this),Qv(this,Gb,Yv(Vb,16,this)),Yv(Vb,19,this),Qv(this,Ub,Yv(Vb,20,this)),Yv(Vb,23,this),Qv(this,Yb,Yv(Vb,24,this)),Yv(Vb,27,this),this.accept=r,this.collisionDetector=o,this.collisionPriority=i,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};Vb=Vv($b),Hb=new WeakMap,Bb=new WeakMap,Gb=new WeakMap,Ub=new WeakMap,Yb=new WeakMap,Kv(Vb,4,"accept",Wb,Zb,Hb),Kv(Vb,4,"type",zb,Zb,Bb),Kv(Vb,4,"collisionDetector",Fb,Zb,Gb),Kv(Vb,4,"collisionPriority",jb,Zb,Ub),Kv(Vb,4,"shape",_b,Zb,Yb),Kv(Vb,2,"isDropTarget",Nb,Zb),Uv(Vb,Zb);var Qb=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},ey=class extends Qb{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function ty(e,t=!0){let n=!1;return zv(Fv({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var ny,ry,oy,iy,ay,sy,ly,cy,uy,dy=class extends sb{constructor(e){super(e);let t=[];this.destroy=Ug(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:o}=n;if(n.isDisabled())return;if(Kb.pendingIdChanges)return;const i=ty({collisions:o});if(r.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;qm(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},py=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(py||{}),fy=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(fy||{});ly=[Hg],sy=[Bg],ay=[Bg],iy=[Bg],oy=[Bg],ry=[Bg],ny=[Bg];var hy=class{constructor(){Yv(cy,5,this),Qv(this,uy,Yv(cy,8,this,"idle")),Yv(cy,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};cy=Vv(null),uy=new WeakMap,Kv(cy,4,"value",ly,hy,uy),Kv(cy,2,"current",sy,hy),Kv(cy,2,"idle",ay,hy),Kv(cy,2,"initializing",iy,hy),Kv(cy,2,"initialized",oy,hy),Kv(cy,2,"dragging",ry,hy),Kv(cy,2,"dropped",ny,hy),Uv(cy,hy);var my,gy=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return qm(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=ty({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return qm(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:o}=e;Am(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(o)});const i=ty({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&Am(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return qm(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:i}=r;if(!o.dragging||!i||i.signal.aborted)return;const a=ty({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};r.position.current=l})})}stop(e={}){return qm(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=qm(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=Zm(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),i?i.then(a).catch(()=>r.reset()):a()})}},vy=class extends ib{constructor(e,t){super(e,t),this.manager=e,this.options=t}},by=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},yy=class{constructor(e){this.options=e,Qv(this,my)}set controller(e){eb(this,my,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=Zv(this,my))||t.activate(e)}};my=new WeakMap;var xy,Sy,wy,Cy,Ey,Iy,Dy,Ry,Ly,My,Ay,Py,qy,ky,Ty,Oy,Ny,_y,jy,Fy=class extends ib{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},zy=class{constructor(e){this.draggables=new Xb,this.droppables=new Xb,this.plugins=new lb(e),this.sensors=new lb(e),this.modifiers=new lb(e)}register(e,t){if(e instanceof Jb)return this.draggables.register(e.id,e);if(e instanceof Zb)return this.droppables.register(e.id,e);if(e.prototype instanceof Fy)return this.modifiers.register(e,t);if(e.prototype instanceof vy)return this.sensors.register(e,t);if(e.prototype instanceof ib)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof Kb)return e instanceof Jb?this.draggables.unregister(e.id,e):e instanceof Zb?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof Fy)return this.modifiers.unregister(e);if(e.prototype instanceof vy)return this.sensors.unregister(e);if(e.prototype instanceof ib)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};Ly=[Bg],Ry=[Hg],Dy=[Hg],Iy=[Hg],Ey=[Hg],Cy=[Hg],wy=[Bg],Sy=[Bg],xy=[Bg];var Wy=class{constructor(e){Yv(qy,5,this),Qv(this,My),Qv(this,Ay),Qv(this,Py,new Kg(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new hy,Qv(this,ky,Yv(qy,8,this,!1)),Yv(qy,11,this),Qv(this,Ty,Yv(qy,12,this,null)),Yv(qy,15,this),Qv(this,Oy,Yv(qy,16,this,null)),Yv(qy,19,this),Qv(this,Ny,Yv(qy,20,this,null)),Yv(qy,23,this),Qv(this,_y,Yv(qy,24,this,[])),Yv(qy,27,this),this.position=new xv({x:0,y:0}),Qv(this,jy,{x:0,y:0}),eb(this,My,e)}get shape(){const{current:e,initial:t,previous:n}=Zv(this,Py);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?Zv(this,Py).current=e:Zv(this,Py).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=Zv(this,My).registry.draggables.get(t);return n&&eb(this,Ay,n),null!=(e=null!=n?n:Zv(this,Ay))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=Zv(this,My).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(zv(Fv({},this.snapshot()),{transform:n}));return eb(this,jy,n),n}snapshot(){return qm(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:Zv(this,jy),shape:this.shape?Xg(this.shape):null,position:Xg(this.position),status:Xg(this.status),canceled:this.canceled}))}reset(){Am(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,Zv(this,Py).reset(),this.position.reset({x:0,y:0}),eb(this,jy,{x:0,y:0}),this.modifiers=[]})}};qy=Vv(null),My=new WeakMap,Ay=new WeakMap,Py=new WeakMap,ky=new WeakMap,Ty=new WeakMap,Oy=new WeakMap,Ny=new WeakMap,_y=new WeakMap,jy=new WeakMap,Kv(qy,2,"shape",Ly,Wy),Kv(qy,4,"canceled",Ry,Wy,ky),Kv(qy,4,"activatorEvent",Dy,Wy,Ty),Kv(qy,4,"sourceIdentifier",Iy,Wy,Oy),Kv(qy,4,"targetIdentifier",Ey,Wy,Ny),Kv(qy,4,"modifiers",Cy,Wy,_y),Kv(qy,2,"source",wy,Wy),Kv(qy,2,"target",Sy,Wy),Kv(qy,2,"transform",xy,Wy),Uv(qy,Wy);var $y={get rendering(){return Promise.resolve()}};function Vy(e,t){return"function"==typeof e?e(t):null!=e?e:t}var Hy=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=Vy(n.plugins,[]),o=Vy(n.sensors,[]),i=Vy(n.modifiers,[]),a=null!=(t=n.renderer)?t:$y,s=new ey(this),l=new zy(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new gy(this),this.dragOperation=new Wy(this),this.collisionObserver=new Cb(this),this.plugins=[dy,...r],this.modifiers=i,this.sensors=o;const{destroy:c}=this,u=Ug(()=>{var e,t,n;const r=qm(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of r)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=ob(e);return new t(this,n)}))?n:o});this.destroy=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},By=e=>{throw TypeError(e)},Gy=(e,t,n)=>t.has(e)||By("Cannot "+n),Uy=(e,t,n)=>(Gy(e,t,"read from private field"),t.get(e)),Yy=(e,t,n)=>t.has(e)?By("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ky=(e,t,n,r)=>(Gy(e,t,"write to private field"),t.set(e,n),n),Xy=(e,t,n)=>(Gy(e,t,"access private method"),n);function Jy(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function Zy(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,o=(Jy(n)?n.getKeyframes():[]).filter(t);o.length>0&&(r=[o[o.length-1],e])}return r}function Qy(e){const{width:t,height:n,top:r,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:i,right:a}}function ex(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function tx(e){return"nodeType"in e}function nx(e){var t,n,r;return e?ex(e)?e:tx(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function rx(e){const{Document:t}=nx(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function ox(e){return!(!e||ex(e))&&(e instanceof nx(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function ix(e){return e instanceof nx(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function ax(e){return e?ex(e)?e.document:tx(e)?rx(e)?e:ox(e)||ix(e)?e.ownerDocument:document:document:document}function sx(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===o}function lx(e,t=e.getBoundingClientRect(),n=0){var r,o,i,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!sx(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),i=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=u.visualViewport,f=null!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i:0,m=null!=(a=null==p?void 0:p.width)?a:u.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:u.innerHeight,v=n*g,b=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+b),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-b),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function cx(e){return{x:e.clientX,y:e.clientY}}var ux="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function dx(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...dx(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...dx(o.document,t))}}catch(e){}return n}function px(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function fx(){var e,t;const n=px()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function hx(e){return!(!e||!tx(e))&&e instanceof nx(e).ShadowRoot}function mx(e){if(e&&tx(e)){let t=e.getRootNode();if(hx(t))return t;if(t instanceof Document)return t}return ax(e)}function gx(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function vx(e){return"value"in e}function bx(e){return"CANVAS"===e.tagName}function yx(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:o,top:i}=r.getBoundingClientRect();return yx(e,{x:t-o,y:n-i})}}return r}var xx=new WeakMap;var Sx=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:i}=t,a=[e,t];e.addEventListener(n,r,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o),i.delete(e)}}}};function wx(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Cx(e,t){const n=()=>performance.now();let r,o;return function(...i){const a=this;o?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,i),o=n()},t-(n()-o))):(e.apply(a,i),o=n())}}var Ex,Ix=ux?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},Dx=class extends Ix{constructor(e){super(t=>{Uy(this,Ex)?e(t,this):Ky(this,Ex,!0)}),Yy(this,Ex,!1)}};Ex=new WeakMap;var Rx,Lx,Mx,Ax,Px,qx,kx,Tx,Ox,Nx,_x,jx=Array.from({length:100},(e,t)=>t/100),Fx=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,Yy(this,Ox),this.disconnect=()=>{var e,t,n;Ky(this,kx,!0),null==(e=Uy(this,Mx))||e.disconnect(),null==(t=Uy(this,Ax))||t.disconnect(),Uy(this,Px).disconnect(),null==(n=Uy(this,qx))||n.remove()},Yy(this,Rx,!0),Yy(this,Lx),Yy(this,Mx),Yy(this,Ax),Yy(this,Px),Yy(this,qx),Yy(this,kx,!1),Yy(this,Tx,Cx(()=>{var e,t,n;const{element:r}=this;if(null==(e=Uy(this,Ax))||e.disconnect(),Uy(this,kx)||!Uy(this,Rx)||!r.isConnected)return;const o=null!=(t=r.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(n=o.defaultView)?n:window,s=r.getBoundingClientRect(),l=lx(r,s),{top:c,left:u,bottom:d,right:p}=l,f=-Math.floor(c),h=-Math.floor(u),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,Ky(this,Ax,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:bv.intersectionRatio(n,lx(r)))&&Uy(this,Tx).call(this)},{threshold:jx,rootMargin:m,root:o})),Uy(this,Ax).observe(r),Xy(this,Ox,Nx).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),Ky(this,Rx,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=lx(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const o=e.ownerDocument;(null==n?void 0:n.debug)&&(Ky(this,qx,document.createElement("div")),Uy(this,qx).style.background="rgba(0,0,0,0.15)",Uy(this,qx).style.position="fixed",Uy(this,qx).style.pointerEvents="none",o.body.appendChild(Uy(this,qx))),Ky(this,Px,new IntersectionObserver(t=>{var n,r;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,c=Uy(this,Rx);Ky(this,Rx,a),(s||l)&&(c&&!a?(null==(n=Uy(this,Ax))||n.disconnect(),this.callback(null),null==(r=Uy(this,Mx))||r.disconnect(),Ky(this,Mx,void 0),Uy(this,qx)&&(Uy(this,qx).style.visibility="hidden")):Uy(this,Tx).call(this),a&&!Uy(this,Mx)&&(Ky(this,Mx,new Dx(Uy(this,Tx))),Uy(this,Mx).observe(e)))},{threshold:jx,root:o})),Uy(this,Rx)&&!n.skipInitial&&this.callback(this.boundingClientRect),Uy(this,Px).observe(e)}};Rx=new WeakMap,Lx=new WeakMap,Mx=new WeakMap,Ax=new WeakMap,Px=new WeakMap,qx=new WeakMap,kx=new WeakMap,Tx=new WeakMap,Ox=new WeakSet,Nx=function(){Uy(this,kx)||(Xy(this,Ox,_x).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,Uy(this,Lx))||(this.callback(this.boundingClientRect),Ky(this,Lx,this.boundingClientRect)))},_x=function(){if(Uy(this,qx)){const{top:e,left:t,width:n,height:r}=lx(this.element);Uy(this,qx).style.overflow="hidden",Uy(this,qx).style.visibility="visible",Uy(this,qx).style.top=`${Math.floor(e)}px`,Uy(this,qx).style.left=`${Math.floor(t)}px`,Uy(this,qx).style.width=`${Math.floor(n)}px`,Uy(this,qx).style.height=`${Math.floor(r)}px`}};var zx,Wx,$x,Vx,Hx=new WeakMap,Bx=new WeakMap;function Gx(e,t){let n=Hx.get(e);if(!n){const t=new Fx(e,t=>{const n=Hx.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),Hx.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(Hx.delete(e),n.disconnect())}}var Ux=class{constructor(e,t,n){this.callback=t,Yy(this,zx),Yy(this,Wx,!1),Yy(this,$x),Yy(this,Vx,Cx(e=>{if(!Uy(this,Wx)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of Uy(this,$x))if(e.target.contains(t)){this.callback(Uy(this,zx).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=wx(e);for(;n;)t.add(n),n=wx(n);return t}(e),o=function(e,t){const n=new Set;for(const r of e){const e=Gx(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),i=function(e,t){var n;const r=e.ownerDocument;if(!Bx.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),Bx.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(n=Bx.get(r))?n:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),Bx.delete(r))}):()=>{}}(e,Uy(this,Vx));Ky(this,$x,r),Ky(this,zx,new Fx(e,t,n)),this.disconnect=()=>{Uy(this,Wx)||(Ky(this,Wx,!0),o(),i(),Uy(this,zx).disconnect())}}};function Yx(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function Kx(e){try{Yx(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function Xx(e){return!(!ux||!e)&&e===ax(e).scrollingElement}function Jx(e){var t,n;const r=nx(e),o=Xx(e)?function(e){var t,n,r,o;const{documentElement:i}=ax(e),a=nx(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:i.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):Qy(e),i=r.visualViewport,a=Xx(e)?{height:null!=(t=null==i?void 0:i.height)?t:r.innerHeight,width:null!=(n=null==i?void 0:i.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function Zx(e,t){const{isTop:n,isBottom:r,isLeft:o,isRight:i,position:a}=Jx(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!o&&a.current.x+s>0,p=!i&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:p,x:d||p,y:c||u}}zx=new WeakMap,Wx=new WeakMap,$x=new WeakMap,Vx=new WeakMap;var Qx=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},eS=new Qx(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),tS=new Qx(e=>setTimeout(e,50)),nS=new Map,rS=nS.clear.bind(nS);function oS(e,t=!1){if(!t)return iS(e);let n=nS.get(e);return n||(n=iS(e),nS.set(e,n),tS.schedule(rS),n)}function iS(e){return nx(e).getComputedStyle(e)}var aS={excludeElement:!0,escapeShadowDOM:!0};function sS(e,t=aS){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=n&&i.size>=n)return i;if(!a)return i;if(rx(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&hx(a))return t(a.host);if(!ox(a))return ix(a)?t(a.parentElement):i;if(i.has(a))return i;const s=oS(a,!0);if(r&&a===e||function(e,t=oS(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&i.add(a),function(e,t=oS(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function lS(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=wx(e);for(;r;){if(r===t)return n;const e=Qy(r),{x:o,y:i}=cS(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*o,n.scaleY=n.scaleY*i,r=wx(r)}return n}function cS(e,t=Qy(e)){const n=Math.round(t.width),r=Math.round(t.height);if(ox(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=oS(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function uS(e){if(!e||"none"===e)return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function dS(e){var t,n,r,o,i,a,s,l,c;const{scale:u,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=uS(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:y+S,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*w,scaleY:v*C}}var pS=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(pS||{}),fS={x:.2,y:.2},hS={x:10,y:10};function mS(e,t,n,r=25,o=fS,i=hS){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:p}=Jx(e),f=lS(e),h=dS(oS(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new bv(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),b={x:0,y:0},y={x:0,y:0},x=v.height*o.y,S=v.width*o.x;return x>0&&(!c||g&&!u)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-i.x&&a<=v.right+i.x?(b.y=g?1:-1,y.y=r*Math.abs((v.top+x-s)/x)):x>0&&(!u||g&&!c)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-i.x&&a<=v.right+i.x&&(b.y=g?-1:1,y.y=r*Math.abs((v.bottom-x-s)/x)),S>0&&(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-i.y&&s<=v.bottom+i.y?(b.x=m?-1:1,y.x=r*Math.abs((v.right-S-a)/S)):S>0&&(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-i.y&&s<=v.bottom+i.y&&(b.x=m?1:-1,y.x=r*Math.abs((v.left+S-a)/S)),{direction:b,speed:y}}function gS(e,{block:t="nearest",inline:n="nearest"}={}){if(!ox(e))return;const r=sS(e),o=[];for(const i of r){if(!ox(i))continue;const{top:r,left:a}=bS(e,i);let s=r,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<i.scrollTop;n!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-i.clientHeight)}if("none"!==n){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===n?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function vS(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!ox(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function bS(e,t){const n=vS(e),r=vS(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function yS({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function xS(e,t=oS(e).translate,n=!0){if(n){const t=Zy(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=uS(e);if(t)return t}}}if(t){const e=uS(t);if(e)return e}return{x:0,y:0,z:0}}var SS=new Qx(e=>setTimeout(e,0)),wS=new Map,CS=wS.clear.bind(wS);function ES(e,t){const n=function(e){const t=e.ownerDocument;let n=wS.get(t);if(n)return n;n=t.getAnimations(),wS.set(t,n),SS.schedule(CS);const r=n.filter(t=>Jy(t.effect)&&t.effect.target===e);return wS.set(e,r),n}(e).filter(e=>{var n,r;if(Jy(e.effect)){const{target:o}=e.effect;if(null==(r=o&&(null==(n=t.isValidTarget)?void 0:n.call(t,o)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var IS=class extends bv{constructor(e,t={}){var n,r,o,i;const{frameTransform:a=lS(e),ignoreTransforms:s,getBoundingClientRect:l=Qy}=t,c=ES(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||px())&&t.contains(e)}),u=l(e);let d,{top:p,left:f,width:h,height:m}=u;const g=oS(e),v=dS(g),b={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},y=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,o,i,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=Jy(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:c}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof c&&c&&(i=c,a=!0)}return a?dS({transform:null!=r?r:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==c||c(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-r)*parseFloat(n),l=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=o?e.height/o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,v,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-r)*parseFloat(n),l=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=o?e.height*o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,b.x=y.scaleX,b.y=y.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function DS(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var RS=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(DS(n))for(const[r,o]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(DS(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(DS(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function LS(e){return!!e&&(e instanceof nx(e).Element||tx(e)&&e.nodeType===Node.ELEMENT_NODE)}function MS(e){if(!e)return!1;const{KeyboardEvent:t}=nx(e.target);return e instanceof t}var AS={};function PS(e){const t=null==AS[e]?0:AS[e]+1;return AS[e]=t,`${e}-${t}`}var qS=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/vv.distance(t.shape.center,n),type:fy.PointerIntersection,priority:py.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=vv.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:fy.ShapeIntersection,priority:py.Normal}}return null})(e)},kS=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const i=r?bv.from(r.current.boundingRectangle).corners:void 0,a=bv.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+vv.distance(vv.from(t),null!=(r=null==i?void 0:i[n])?r:o.current)},0),s=a/4;return{id:n.id,value:1/s,type:fy.Collision,priority:py.Normal}},TS=Object.create,OS=Object.defineProperty,NS=Object.defineProperties,_S=Object.getOwnPropertyDescriptor,jS=Object.getOwnPropertyDescriptors,FS=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,WS=Object.prototype.propertyIsEnumerable,$S=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),VS=e=>{throw TypeError(e)},HS=(e,t,n)=>t in e?OS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BS=(e,t)=>{for(var n in t||(t={}))zS.call(t,n)&&HS(e,n,t[n]);if(FS)for(var n of FS(t))WS.call(t,n)&&HS(e,n,t[n]);return e},GS=(e,t)=>NS(e,jS(t)),US=(e,t)=>OS(e,"name",{value:t,configurable:!0}),YS=(e,t)=>{var n={};for(var r in e)zS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&FS)for(var r of FS(e))t.indexOf(r)<0&&WS.call(e,r)&&(n[r]=e[r]);return n},KS=e=>{var t;return[,,,TS(null!=(t=null==e?void 0:e[$S("metadata")])?t:null)]},XS=["class","method","getter","setter","accessor","field","value","get","set"],JS=e=>void 0!==e&&"function"!=typeof e?VS("Function expected"):e,ZS=(e,t,n,r,o)=>({kind:XS[e],name:t,metadata:r,addInitializer:e=>n._?VS("Already initialized"):o.push(JS(e||null))}),QS=(e,t)=>HS(t,$S("metadata"),e[3]),ew=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},tw=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=XS[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&_S(d<4?o:{get[n](){return ow(this,i)},set[n](e){return aw(this,i,e)}},n));d?f&&d<4&&US(i,(d>2?"set ":d>1?"get ":"")+n):US(o,n);for(var y=r.length-1;y>=0;y--)c=ZS(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>rw(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?ow:sw)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>aw(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?JS(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?VS("Object expected"):(JS(a=s.get)&&(b.get=a),JS(a=s.set)&&(b.set=a),JS(a=s.init)&&g.unshift(a));return d||QS(e,o),b&&OS(o,n,b),f?4^d?i:b:o},nw=(e,t,n)=>t.has(e)||VS("Cannot "+n),rw=(e,t)=>Object(t)!==t?VS('Cannot use the "in" operator on this value'):e.has(t),ow=(e,t,n)=>(nw(e,t,"read from private field"),n?n.call(e):t.get(e)),iw=(e,t,n)=>t.has(e)?VS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),aw=(e,t,n,r)=>(nw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),sw=(e,t,n)=>(nw(e,t,"access private method"),n),lw="button",cw="draggable",uw="dnd-kit-description",dw="dnd-kit-announcement",pw={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},fw={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function hw(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var mw=["dragover","dragmove"];var gw,vw,bw,yw,xw,Sw,ww,Cw,Ew,Iw,Dw,Rw,Lw,Mw=new Map,Aw=class extends(xw=sb,yw=[Hg],bw=[Bg],vw=[Bg],gw=[Bg],xw){constructor(e,t){super(e,t),ew(ww,5,this),iw(this,Ew),iw(this,Sw,new Set),iw(this,Cw,ew(ww,8,this,new Set)),ew(ww,11,this),this.registerEffect(sw(this,Ew,Iw))}register(e){return ow(this,Sw).add(e),()=>{ow(this,Sw).delete(e)}}addRoot(e){return qm(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{qm(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return mx(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return mx(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}};ww=KS(xw),Sw=new WeakMap,Cw=new WeakMap,Ew=new WeakSet,Iw=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of ow(this,Sw))t.push(sw(this,Ew,Dw).call(this,n,e));return()=>{for(const e of t)e()}},Dw=function(e,t){let n=Mw.get(e);n||(n=new Map,Mw.set(e,n));let r=n.get(t);if(!r){const o=rx(e)?sw(this,Ew,Rw).call(this,e,n,t):sw(this,Ew,Lw).call(this,e,n,t);if(!o)return()=>{};r=o,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,0===r.refCount&&r.cleanup())}},Rw=function(e,t,n){var r;const o=e.createElement("style"),{nonce:i}=null!=(r=this.options)?r:{};i&&o.setAttribute("nonce",i),o.textContent=n,e.head.prepend(o);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(n),0===t.size&&Mw.delete(e)}}},Lw=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=r?r:{};if(!o)return null;const i=new o;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var r;if(hx(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&Mw.delete(e)}}},tw(ww,4,"additionalRoots",yw,Aw,Cw),tw(ww,2,"sourceRoot",bw,Aw),tw(ww,2,"targetRoot",vw,Aw),tw(ww,2,"roots",gw,Aw),QS(ww,Aw),Aw.configure=rb(Aw);var Pw=Aw,qw="data-dnd-",kw=`${qw}dropping`,Tw="--dnd-",Ow=`${qw}dragging`,Nw=`${qw}placeholder`,_w=[Ow,Nw,"popover","aria-pressed","aria-grabbing"],jw=["view-transition-name"],Fw=`\n :is(:root,:host) [${Ow}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${Tw}top, 0px) !important;\n left: var(${Tw}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${Tw}width, auto);\n max-width: var(${Tw}width, auto);\n height: var(${Tw}height, auto);\n max-height: var(${Tw}height, auto);\n transform: var(${Tw}transform, none) !important;\n transition: var(${Tw}transition) !important;\n }\n\n :is(:root,:host) [${Nw}] {\n transition: none;\n }\n\n :is(:root,:host) [${Nw}='hidden'] {\n visibility: hidden;\n }\n\n [${Ow}] * {\n pointer-events: none !important;\n }\n\n [${Ow}]:not([${kw}]) {\n translate: var(${Tw}translate) !important;\n }\n\n [${Ow}][style*='${Tw}scale'] {\n scale: var(${Tw}scale) !important;\n transform-origin: var(${Tw}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${Ow}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${Ow}]::backdrop, [${qw}overlay]:not([${Ow}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function zw(e,t="hidden"){return qm(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${qw}${PS("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(vx(e)&&vx(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),bx(e)&&bx(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,o]of e){if(!r.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(o),!i)continue;const a=r.element;r.proxy=i,i.removeAttribute(o),xx.set(a,i),n.push(()=>{xx.delete(a),r.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(Nw,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function Ww(e,t){return e===t||wx(e)===wx(t)}function $w(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&LS(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>Kx(t))}function Vw(e){return"TR"===e.tagName}var Hw,Bw,Gw,Uw,Yw,Kw,Xw,Jw=250,Zw="ease";var Qw=class extends(Bw=ib,Hw=[Hg],Bw){constructor(e,t){super(e,t),iw(this,Yw),iw(this,Uw,ew(Gw,8,this)),ew(Gw,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(Pw),r=null==n?void 0:n.register(Fw);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(sw(this,Yw,Kw).bind(this,n)),this.registerEffect(sw(this,Yw,Xw))}};Gw=KS(Bw),Uw=new WeakMap,Yw=new WeakSet,Kw=function(e){const{overlay:t}=this;if(!t||!e)return;const n=mx(t);return n?e.addRoot(n):void 0},Xw=function(){var e,t,n,r,o,i,a;const{state:s,manager:l,options:c}=this,{dragOperation:u}=l,{position:d,source:p,status:f}=u;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(Qw),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==c?void 0:c.feedback)?t:"default",v="function"==typeof g?g(p,l):g;if(!h||"none"===v||!f.initialized||f.initializing)return;const{initial:b}=s,y=null!=(n=this.overlay)?n:h,x=lS(y),S=lS(h),w=!Ww(h,y),C=new IS(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,I=S.scaleY/x.scaleY;let{width:D,height:R,top:L,left:M}=C;w&&(D/=E,R/=I);const A=new RS(y),P=oS(h),{transition:q,translate:k,boxSizing:T,paddingBlockStart:O,paddingBlockEnd:N,paddingInlineStart:_,paddingInlineEnd:j,borderInlineStartWidth:F,borderInlineEndWidth:z,borderBlockStartWidth:W,borderBlockEndWidth:$}=P,V=q.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),H=dS(P),B=P.transform,G="clone"===v,U="content-box"===T,Y=U?parseInt(_)+parseInt(j)+parseInt(F)+parseInt(z):0,K=U?parseInt(O)+parseInt(N)+parseInt(W)+parseInt($):0,X="move"===v||this.overlay?null:zw(p,G?"clone":"hidden"),J=qm(()=>MS(l.dragOperation.activatorEvent));if(!b.translate)if(this.overlay&&H)b.translate={x:H.x,y:H.y};else if("none"!==k){const e=uS(k);e&&(b.translate=e)}if(!b.transformOrigin){const e=qm(()=>d.current),t=M+(null!=(r=null==H?void 0:H.x)?r:0),n=L+(null!=(o=null==H?void 0:H.y)?o:0);b.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(D*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(R*x.scaleY)}}const{transformOrigin:Z}=b,Q=L*x.scaleY+x.y,ee=M*x.scaleX+x.x;if(!b.coordinates&&(b.coordinates={x:ee,y:Q},1!==E||1!==I)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;b.coordinates.x+=(D*e-D)*n,b.coordinates.y+=(R*t-R)*r}b.dimensions||(b.dimensions={width:D,height:R}),b.frameTransform||(b.frameTransform=x);const te=b.coordinates.x-ee,ne=b.coordinates.y-Q,re=(b.dimensions.width*b.frameTransform.scaleX-D*x.scaleX)*Z.x,oe=(b.dimensions.height*b.frameTransform.scaleY-R*x.scaleY)*Z.y,ie={x:te/x.scaleX+re,y:ne/x.scaleY+oe},ae=M+ie.x,se=L+ie.y;y.setAttribute(Ow,"true");const le=qm(()=>u.transform),ce=null!=(i=b.translate)?i:{x:0,y:0},ue=le.x*x.scaleX+ce.x,de=le.y*x.scaleY+ce.y,pe=fx();if(A.set({width:D-Y,height:R-K,top:se+pe.y,left:ae+pe.x,translate:`${ue}px ${de}px 0`,transform:this.overlay?"none":B,transition:V?`${V}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${I}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},Tw),X&&(h.insertAdjacentElement("afterend",X),null==c?void 0:c.rootElement)){("function"==typeof c.rootElement?c.rootElement(p):c.rootElement).appendChild(h)}let fe,he,me;Yx(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),Kx(y),y.addEventListener("beforetoggle",$w));const ge=(ve={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:D,height:R,top:L,left:M,widthOffset:Y,heightOffset:K,delta:ie,styles:A,dragOperation:u,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new IS(ve.placeholder,{frameTransform:ve.frameTransform,ignoreTransforms:!0}),o=null!=(e=ve.transformOrigin)?e:{x:1,y:1},i=(ve.width-r.width)*o.x+ve.delta.x,a=(ve.height-r.height)*o.y+ve.delta.y,s=fx();if(ve.styles.set({width:r.width-ve.widthOffset,height:r.height-ve.heightOffset,top:ve.top+a+s.y,left:ve.left+i+s.x},Tw),null==(t=ve.getElementMutationObserver())||t.takeRecords(),Vw(ve.element)&&Vw(ve.placeholder)){const e=Array.from(ve.element.cells),t=Array.from(ve.placeholder.cells);ve.getSavedCellWidths()||ve.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=ve.getTranslate())?n:{x:0,y:0},c=ve.left+i+s.x+l.x,u=ve.top+a+s.y+l.y,d=r.width-ve.widthOffset,p=r.height-ve.heightOffset,f=ve.frameTransform;ve.dragOperation.shape=new bv(c*f.scaleX+f.x,u*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var ve;const be=new IS(y);qm(()=>u.shape=be);const ye=nx(y),xe=e=>{this.manager.actions.stop({event:e})},Se=gx(ye);J&&ye.addEventListener("resize",xe),"idle"===qm(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let o=!1;for(const n of r){if(n.target!==e){o=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||_w.includes(r))continue;const i=e.getAttribute(r);if("style"===r){if(DS(e)&&DS(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(jw.includes(e)||e.startsWith(Tw))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==i?t.setAttribute(r,i):t.removeAttribute(r)}o&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,G),he=function(e,t,n){const r=new MutationObserver(r=>{for(const o of r)if(0!==o.addedNodes.length)for(const r of Array.from(o.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void Kx(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void Kx(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),Kx(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,y));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;ox(n)&&n.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),Yx(y)&&(y.removeEventListener("beforetoggle",$w),y.removeAttribute("popover")),y.removeAttribute(Ow),A.reset();const e=()=>{var e;if(me&&Vw(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=u.status.dragging;X&&(!n&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Ie=null==c?void 0:c.dropAnimation,De=this,Re=Ug(()=>{var e,t,n;const{transform:r,status:o}=u;if((r.x||r.y||s.current.translate)&&o.dragging){const o=null!=(e=b.translate)?e:{x:0,y:0},i={x:r.x/x.scaleX+o.x,y:r.y/x.scaleY+o.y},a=s.current.translate,l=qm(()=>u.modifiers),d=qm(()=>{var e;return null==(e=u.shape)?void 0:e.current}),p=null==c?void 0:c.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(A.set({transition:V?`${V}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},Tw),null==fe||fe.takeRecords(),d&&d!==be&&a&&!l.length){const e=vv.delta(i,a);u.shape=bv.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else u.shape=new IS(y);s.current.translate=i}},function(){if(u.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==De.dropAnimation?De.dropAnimation:Ie;let t=s.current.translate;const n=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,o;const{animation:i}=e;if("function"==typeof i){const t=i({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=Jw,easing:s=Zw}=null!=i?i:{};Kx(e.feedbackElement);const[,l]=null!=(t=Zy(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:Ww(e.feedbackElement,c)?null:void 0},d=new IS(e.feedbackElement,u),p=null!=(r=uS(oS(e.feedbackElement).translate))?r:e.translate,f=new IS(c,u),h=bv.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,v=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},b=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},Tw),e.feedbackElement.setAttribute(kw,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),yS({element:e.feedbackElement,keyframes:GS(BS(BS({},v),b),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:gx(nx(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(kw),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:n,transition:q,alignment:p.alignment,styles:A,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Re()}},tw(Gw,4,"overlay",Hw,Qw,Uw),QS(Gw,Qw),Qw.configure=rb(Qw);var eC,tC,nC,rC,oC,iC,aC,sC=Qw,lC=!0;nC=[Hg],rC=pS.Forward,eC=[Hg],tC=pS.Reverse;var cC=class{constructor(){iw(this,iC,ew(oC,8,this,lC)),ew(oC,11,this),iw(this,aC,ew(oC,12,this,lC)),ew(oC,15,this)}isLocked(e){return e!==pS.Idle&&(null==e?this[pS.Forward]===lC&&this[pS.Reverse]===lC:this[e]===lC)}unlock(e){e!==pS.Idle&&(this[e]=false)}};oC=KS(null),iC=new WeakMap,aC=new WeakMap,tw(oC,4,rC,nC,cC,iC),tw(oC,4,tC,eC,cC,aC),QS(oC,cC);var uC,dC,pC,fC,hC,mC,gC=[pS.Forward,pS.Reverse],vC=class{constructor(){this.x=new cC,this.y=new cC}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},bC=class extends ib{constructor(e){super(e);const t=$m(new vC);let n=null;this.signal=t,Zm(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new vC);const{delta:o}=e.dragOperation.position;if(n){const e={x:yC(o.x,n.x),y:yC(o.y,n.y)},r=t.peek();Am(()=>{for(const t of Rv)for(const n of gC)e[t]===n&&r[t].unlock(n);t.value=r})}n=o})}get current(){return this.signal.peek()}};function yC(e,t){return Math.sign(e-t)}var xC=class extends(dC=sb,uC=[Hg],dC){constructor(e){super(e),iw(this,fC,ew(pC,8,this,!1)),ew(pC,11,this),iw(this,hC),iw(this,mC,()=>{if(!ow(this,hC))return;const{element:e,by:t}=ow(this,hC);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return aw(this,hC,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:SC(o.x),y:SC(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=Zx(e,o);if(r.x||r.y){const{speed:r,direction:l}=mS(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(s)for(const e of Rv)s[e].isLocked(l[e])&&(r[e]=0,l[e]=0);if(l.x||l.y){const{x:t,y:i}=null!=o?o:l,a=t*r.x,s=i*r.y;if(a||s){const t=null==(n=ow(this,hC))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!a||t.y&&!s)continue}return aw(this,hC,{element:e,by:{x:a,y:s}}),eS.schedule(ow(this,mC)),!0}}}}}return aw(this,hC,void 0),!1};let t=null,n=null;const r=$g(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const o=yx(mx(null==r?void 0:r.element),n.current);return o&&(t=o),null!=o?o:t}),o=$g(()=>{const t=r.value,{documentElement:o}=ax(t);if(!t||t===o){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=sS(r,{excludeElement:!1});return n=e,e}}if(t){const e=sS(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},Vg);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new bC(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&MS(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function SC(e){return e>0?pS.Forward:e<0?pS.Reverse:pS.Idle}pC=KS(dC),fC=new WeakMap,hC=new WeakMap,mC=new WeakMap,tw(pC,4,"autoScrolling",uC,xC,fC),QS(pC,xC);var wC=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),CC=class extends ib{constructor(e,t){super(e,t);const n=e.registry.plugins.get(xC);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=Zm(()=>{var t,r,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>wC.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};CC.configure=rb(CC);var EC,IC=CC,DC={capture:!0,passive:!0},RC=class extends sb{constructor(e){super(e),iw(this,EC),this.handleScroll=()=>{null==ow(this,EC)&&aw(this,EC,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),aw(this,EC,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=Zm(()=>{var e,n,r;if(t.status.dragging){const o=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return o.addEventListener("scroll",this.handleScroll,DC),()=>{o.removeEventListener("scroll",this.handleScroll,DC)}}})}};EC=new WeakMap;function LC(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var MC,AC=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),PC=class extends vy{constructor(e,t){super(e),this.manager=e,this.options=t,iw(this,MC,[]),this.listeners=new Sx,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!LS(e.target))return;if(t.disabled)return;const{keyboardCodes:r=AC.keyboardCodes,preventActivation:o=AC.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=Zm(()=>{var n;const r=null!=(n=e.handle)?n:e.element,o=n=>{MS(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),gS(r);const{center:o}=new IS(r);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=ax(r),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];ow(this,MC).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=AC.keyboardCodes}=null!=n?n:{};if(TC(e,[...r.end,...r.cancel])){e.preventDefault();const t=TC(e,r.cancel);return void this.handleEnd(e,t)}TC(e,r.up)?this.handleMove("up",e):TC(e,r.down)&&this.handleMove("down",e),TC(e,r.left)?this.handleMove("left",e):TC(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:AC.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(IC);!1===(null==e?void 0:e.disabled)&&(e.disable(),ow(this,MC).push(()=>{e.enable()}))}cleanup(){ow(this,MC).forEach(e=>e()),aw(this,MC,[])}destroy(){this.cleanup(),this.listeners.clear()}};MC=new WeakMap,PC.configure=rb(PC),PC.defaults=AC;var qC,kC=PC;function TC(e,t){return t.includes(e.code)}var OC,NC;qC=new WeakMap;OC=new WeakMap,NC=new WeakMap;var _C=class{};_C.Delay=class extends yy{constructor(){super(...arguments),iw(this,OC),iw(this,NC)}onEvent(e){switch(e.type){case"pointerdown":aw(this,NC,cx(e)),aw(this,OC,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!ow(this,NC))return;const{x:t,y:n}=cx(e);Sv({x:t-ow(this,NC).x,y:n-ow(this,NC).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){ow(this,OC)&&(clearTimeout(ow(this,OC)),aw(this,NC,void 0),aw(this,OC,void 0))}},_C.Distance=class extends yy{constructor(){super(...arguments),iw(this,qC)}onEvent(e){switch(e.type){case"pointerdown":aw(this,qC,cx(e));break;case"pointermove":if(!ow(this,qC))return;const{x:t,y:n}=cx(e),r={x:t-ow(this,qC).x,y:n-ow(this,qC).y},{tolerance:o}=this.options;if(o&&Sv(r,o))return void this.abort();Sv(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){aw(this,qC,void 0)}};var jC,FC=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if("mouse"!==r||!LS(o)||t.handle!==o&&!(null==(n=t.handle)?void 0:n.contains(o)))return"touch"===r?[new _C.Delay({value:250,tolerance:5})]:function(e){if(!LS(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(o)&&!e.defaultPrevented?[new _C.Delay({value:200,tolerance:0})]:[new _C.Delay({value:200,tolerance:10}),new _C.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;if(r===t.element)return!1;if(r===t.handle)return!1;if(!LS(r))return!1;if(null==(n=t.handle)?void 0:n.contains(r))return!1;const o=r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),zC=class extends vy{constructor(e,t){super(e),this.manager=e,this.options=t,iw(this,jC,new Set),this.listeners=new Sx,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=FC.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=Zm(()=>{var n;const r=new AbortController,{signal:o}=r,i=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=nx(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(BC(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!LS(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=FC.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:o}=e,i=ox(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=lS(t.element),{x:s,y:l}=cx(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new by(c,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=dx(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:i?this.handleCancel:$C,options:{capture:!0}}]);ow(this,jC).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=cx(e),r=lS(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,eS.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const o=ax(t.target).body;try{o.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const i=LS(t.target)?[t.target,o]:o,a=this.listeners.bind(i,[{type:"touchmove",listener:$C,options:{passive:!1}},{type:"click",listener:$C},{type:"contextmenu",listener:$C},{type:"keydown",listener:this.handleKeyDown}]);ow(this,jC).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},ow(this,jC).forEach(e=>e()),ow(this,jC).clear()}destroy(){this.cleanup(),this.listeners.clear()}};jC=new WeakMap,zC.configure=rb(zC),zC.defaults=FC;var WC=zC;function $C(e){e.preventDefault()}function VC(){}var HC=new WeakSet;function BC(e){e&&!HC.has(e)&&(e.addEventListener("touchmove",VC,{capture:!1,passive:!1}),HC.add(e))}var GC,UC,YC,KC,XC,JC,ZC,QC,eE,tE,nE,rE,oE,iE,aE,sE,lE={modifiers:[],plugins:[class extends ib{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=uw,announcement:o=dw}={},announcements:i=fw,screenReaderInstructions:a=pw,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:PS(r),c=n?`${o}-${n}`:PS(o);let u,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>eS.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const o=p;if(!o)return;const i=null==t?void 0:t(n,r);i&&o.nodeValue!==i&&(f=i,mw.includes(e)?g():(m(),g.cancel()))})),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||y.add(b),hw(n)&&!px()||n.hasAttribute("tabindex")||y.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||y.add(()=>n.setAttribute("role",lw)),n.hasAttribute("aria-roledescription")||y.add(()=>n.setAttribute("aria-roledescription",cw)),n.hasAttribute("aria-describedby")||y.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&y.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&y.add(()=>n.setAttribute("aria-disabled",e))}}y.size>0&&eS.schedule(x)}),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),v.forEach(e=>e())}}},IC,class extends ib{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(Pw),o=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},sC,class extends ib{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(Pw),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=Zm(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return LC(),document.addEventListener("selectionchange",LC,{capture:!0}),()=>{document.removeEventListener("selectionchange",LC,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[WC,kC]},cE=class extends Hy{constructor(e={}){const t=Vy(e.plugins,lE.plugins),n=Vy(e.sensors,lE.sensors),r=Vy(e.modifiers,lE.modifiers);super(GS(BS({},e),{plugins:[RC,xC,Pw,...t],sensors:n,modifiers:r}))}},uE=class extends(YC=Jb,UC=[Hg],GC=[Hg],YC){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:i}=n,a=YS(n,["element","effects","handle"]);super(BS({effects:()=>[...o(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(ob))?t:[...n.sensors]).map(e=>{const t=e instanceof vy?e:n.registry.register(e.plugin),r=e instanceof vy?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),iw(this,XC,ew(KC,8,this)),ew(KC,11,this),iw(this,JC,ew(KC,12,this)),ew(KC,15,this),this.element=r,this.handle=i}};KC=KS(YC),XC=new WeakMap,JC=new WeakMap,tw(KC,4,"handle",UC,uE,XC),tw(KC,4,"element",GC,uE,JC),QS(KC,uE);var dE=class extends(eE=Zb,QC=[Hg],ZC=[Hg],eE){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,i=YS(n,["element","effects"]);const{collisionDetector:a=qS}=i,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new IS(n),o=qm(()=>this.shape);return r&&(null==o?void 0:o.equals(r))?o:(this.shape=r,r)},l=$m(!1);super(GS(BS({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new Ux(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),iw(this,aE),iw(this,nE,ew(tE,8,this)),ew(tE,11,this),iw(this,sE,ew(tE,12,this)),ew(tE,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){aw(this,aE,e,iE)}get element(){var e;return null!=(e=this.proxy)?e:ow(this,aE,oE)}};function pE(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}tE=KS(eE),nE=new WeakMap,aE=new WeakSet,sE=new WeakMap,rE=tw(tE,20,"#element",QC,aE,nE),oE=rE.get,iE=rE.set,tw(tE,4,"proxy",ZC,dE,sE),QS(tE,dE);var fE="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function hE(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function mE(e,t=[],n=!1){const r=l(e);return r.current=e,function(e,t=!1){const n=l(e.peek()),r=l(!1),o=hE();return fE(()=>Zm(()=>{const i=n.current,a=e.value;if(i!==a){if(n.current=a,!r.current)return;t?D(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}(v(()=>$g(()=>r.current()),t),n)}function gE(e,t){const n=l(new Map),r=hE();return fE(()=>{if(e)return Zm(()=>{var o;let i=!1,a=!1;for(const r of n.current){const[s]=r,l=qm(()=>r[1]),c=e[s];l!==c&&(i=!0,n.current.set(s,c),a=null!=(o=null==t?void 0:t(s,l,c))&&o)}i&&(a?queueMicrotask(()=>D(r)):r())});n.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function vE(e,t){e()}function bE(e){const t=l(e);return fE(()=>{t.current=e},[e]),t}function yE(e,t,n=d,r=Object.is){const o=l(e);n(()=>{const n=o.current;r(e,n)||(o.current=e,t(e,n))},[t,e])}function xE(e,t){const n=l(pE(e));fE(()=>{const r=pE(e);r!==n.current&&(n.current=r,t(r))})}var SE=Object.defineProperty,wE=Object.defineProperties,CE=Object.getOwnPropertyDescriptors,EE=Object.getOwnPropertySymbols,IE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,RE=(e,t,n)=>t in e?SE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LE=new cE,ME=c(LE),AE=y(x(({children:e},t)=>{const[n,r]=m(0),o=l(null),i=l(null),a=v(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return fE(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,n]),w(t,()=>a),null})),PE=[void 0,Vg];function qE(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:c}=t,u=((e,t)=>{var n={};for(var r in e)IE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&EE)for(var r of EE(e))t.indexOf(r)<0&&DE.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=u,g=Vy(f,lE.plugins),v=Vy(m,lE.sensors),y=Vy(h,lE.modifiers),x=bE(o),S=bE(i),w=bE(s),C=bE(a),E=bE(c),I=bE(r),D=function(e){const t=l(null);t.current||(t.current=e());return b(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new cE(u)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),yE(g,()=>D&&(D.plugins=g),...PE),yE(v,()=>D&&(D.sensors=v),...PE),yE(y,()=>D&&(D.modifiers=y),...PE),hi.jsxs(ME.Provider,{value:D,children:[hi.jsx(AE,{ref:p,children:n}),n]})}function kE(){return h(ME)}function TE(e){var t;const n=null!=(t=kE())?t:void 0,[r]=m(()=>e(n));return r.manager!==n&&(r.manager=n),fE(r.register,[n,r]),r}function OE({children:e,className:t,dropAnimation:n,style:o,tag:i,disabled:a}){var s;const c=l(null),u=kE(),p=null!=(s=mE(()=>null==u?void 0:u.dragOperation.source,[u]).value)?s:null,f="function"==typeof a?a(p):a;d(()=>{if(!c.current||!u||f)return;const e=u.plugins.find(e=>e instanceof sC);return e?(e.overlay=c.current,()=>{e.overlay=void 0}):void 0},[u,f]),d(()=>{if(!u)return;const e=u.plugins.find(e=>e instanceof sC);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[u,n]);const h=v(()=>{if(!u)return null;const e=new Proxy(u.registry,{get:(e,t)=>"register"===t||"unregister"===t?NE:e[t]});return new Proxy(u,{get:(t,n)=>"registry"===n?e:t[n]})},[u]);return hi.jsx(ME.Provider,{value:h,children:r(i||"div",{ref:c,className:t,style:o,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return hi.jsx(_E,{source:p,children:e});return e}())})}function NE(){return()=>{}}function _E({children:e,source:t}){return e(gE(t))}var jE,FE,zE,WE,$E,VE=Object.create,HE=Object.defineProperty,BE=Object.getOwnPropertyDescriptor,GE=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),UE=e=>{throw TypeError(e)},YE=["class","method","getter","setter","accessor","field","value","get","set"],KE=e=>void 0!==e&&"function"!=typeof e?UE("Function expected"):e,XE=(e,t,n,r,o)=>({kind:YE[e],name:t,metadata:r,addInitializer:e=>n._?UE("Already initialized"):o.push(KE(e||null))}),JE=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=YE[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,BE(o,n)),h=r.length-1;h>=0;h--)(l=XE(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,KE(a)&&(f[d]=a);return f&&HE(o,n,f),o},ZE=(e,t,n)=>t.has(e)||UE("Cannot "+n),QE=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},eI=class extends(zE=Kg,FE=[Bg],jE=[Bg],zE){constructor(e){var t,n,r;super(QE.from(e),(e,t)=>QE.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})($E,5,this),t=this,r=0,(n=WE).has(t)?UE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return QE.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=QE.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(ZE(a=this,s=WE,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);Am(()=>{((e,t,n)=>{ZE(e,t,"write to private field"),t.set(e,n)})(this,WE,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(QE.from(e)),this.velocity={x:0,y:0}}};$E=(e=>{var t;return[,,,VE(null!=(t=null==e?void 0:e[GE("metadata")])?t:null)]})(zE),WE=new WeakMap,JE($E,2,"delta",FE,eI),JE($E,2,"direction",jE,eI),((e,t)=>{return n=t,r=GE("metadata"),o=e[3],r in n?HE(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var n,r,o})($E,eI);var tI=(e=>(e.Horizontal="x",e.Vertical="y",e))(tI||{});Object.values(tI);var nI=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/QE.distance(t.shape.center,n),type:fy.PointerIntersection,priority:py.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=QE.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:fy.ShapeIntersection,priority:py.Normal}}return null})(e)};function rI(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:i,accept:a,type:s}=e,l=TE(t=>new dE(((e,t)=>wE(e,CE(t)))(((e,t)=>{for(var n in t||(t={}))IE.call(t,n)&&RE(e,n,t[n]);if(EE)for(var n of EE(t))DE.call(t,n)&&RE(e,n,t[n]);return e})({},e),{register:!1,element:pE(o)}),t)),c=gE(l);return yE(i,()=>l.id=i),xE(o,e=>l.element=e),yE(a,()=>l.accept=a,void 0,Vg),yE(t,()=>l.collisionDetector=null!=t?t:nI),yE(n,()=>n&&(l.data=n)),yE(r,()=>l.disabled=!0===r),yE(s,()=>l.type=s),{droppable:c,get isDropTarget(){return c.isDropTarget},ref:f(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const oI=e=>Array.from({length:e},(e,t)=>t),iI=({id:e,sectionIndex:t,itemIndex:n})=>hi.jsx("span",{children:`${e}-${t}-${n}`}),aI=y(()=>{const e=kf(ym)??iI,{startSectionIndex:t,startIndex:n,id:r}=kf(Cm)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:hi.jsx(OE,{dropAnimation:null,children:hi.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:hi.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),sI=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=kf(Cm),o=r?.toSectionIndex===e&&r.toIndex===t;return hi.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},lI=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,cI=y(({sectionIndex:e})=>{const t=kf(pm)[e],n=kf(fm),r=kf(hm),o=null!==kf(Cm),i=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=rI({id:a,type:"section",accept:"item",collisionPriority:py.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:hi.jsxs(mc,{ref:s,sx:{margin:"4px",outline:lI(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[hi.jsx(mc,{sx:{position:"relative",top:"4px"},children:hi.jsx(sI,{sectionIndex:e,itemIndex:0,isDragging:!1})}),hi.jsxs(mc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[hi.jsx(Pl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:i.title}),hi.jsx(Pl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),uI=y(({id:e,sectionIndex:t})=>{const n=kf(bm);return void 0===n?null:r(n,{id:e,sectionIndex:t})});var dI=Object.defineProperty,pI=Object.defineProperties,fI=Object.getOwnPropertyDescriptors,hI=Object.getOwnPropertySymbols,mI=Object.prototype.hasOwnProperty,gI=Object.prototype.propertyIsEnumerable,vI=(e,t,n)=>t in e?dI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bI=(e,t)=>{for(var n in t||(t={}))mI.call(t,n)&&vI(e,n,t[n]);if(hI)for(var n of hI(t))gI.call(t,n)&&vI(e,n,t[n]);return e},yI=(e,t)=>pI(e,fI(t)),xI=class extends Fy{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return yI(bI({},e),{[t]:n})}};xI.configure=rb(xI);var SI=xI,wI=SI.configure({axis:"x",value:0});SI.configure({axis:"y",value:0});var CI=class extends Fy{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,o="number"==typeof n?n:n.y;return yI(bI({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/o)*o})}};CI.configure=rb(CI);var EI=Object.create,II=Object.defineProperty,DI=Object.defineProperties,RI=Object.getOwnPropertyDescriptor,LI=Object.getOwnPropertyDescriptors,MI=Object.getOwnPropertySymbols,AI=Object.prototype.hasOwnProperty,PI=Object.prototype.propertyIsEnumerable,qI=e=>{throw TypeError(e)},kI=(e,t,n)=>t in e?II(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TI=(e,t)=>{for(var n in t||(t={}))AI.call(t,n)&&kI(e,n,t[n]);if(MI)for(var n of MI(t))PI.call(t,n)&&kI(e,n,t[n]);return e},OI=(e,t)=>DI(e,LI(t)),NI=["class","method","getter","setter","accessor","field","value","get","set"],_I=e=>void 0!==e&&"function"!=typeof e?qI("Function expected"):e,jI=(e,t,n,r,o)=>({kind:NI[e],name:t,metadata:r,addInitializer:e=>n._?qI("Already initialized"):o.push(_I(e||null))}),FI=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},zI=(e,t,n,r,o,i)=>{for(var a,s,l,c,u,d=7&t,p=e.length+1,f=NI[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,RI({get[n](){return $I(this,i)},set[n](e){return HI(this,i,e)}},n)),v=r.length-1;v>=0;v--)(c=jI(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},c),l._=1,void 0===s?_I(s)&&(g[f]=s):"object"!=typeof s||null===s?qI("Object expected"):(_I(a=s.get)&&(g.get=a),_I(a=s.set)&&(g.set=a),_I(a=s.init)&&h.unshift(a));return g&&II(o,n,g),o},WI=(e,t,n)=>t.has(e)||qI("Cannot "+n),$I=(e,t,n)=>(WI(e,t,"read from private field"),t.get(e)),VI=(e,t,n)=>t.has(e)?qI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),HI=(e,t,n,r)=>(WI(e,t,"write to private field"),t.set(e,n),n);function BI(e){return e instanceof RD||e instanceof DD}var GI=class extends ib{constructor(e){super(e);const t=Zm(()=>{const{dragOperation:t}=e;if(MS(t.activatorEvent)&&BI(t.source)&&t.status.initialized){const t=e.registry.plugins.get(xC);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!MS(e.nativeEvent))return;if(!BI(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],p=[];Am(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&BI(e)||!e.element)continue;let n=e.shape;const r=new IS(e.element,{getBoundingClientRect:e=>lx(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,kS);Am(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=n;if(!e||!BI(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||v!==s,u=c?l:null==t?void 0:t.element;if(!u)return;gS(u);const d=new IS(u);if(!d)return;const p=bv.delta(d,bv.from(i.current.boundingRectangle),e.alignment);r.move({by:p}),c?r.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{n(),t()}}};var UI=Object.defineProperty,YI=Object.defineProperties,KI=Object.getOwnPropertyDescriptors,XI=Object.getOwnPropertySymbols,JI=Object.prototype.hasOwnProperty,ZI=Object.prototype.propertyIsEnumerable,QI=(e,t,n)=>t in e?UI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eD=(e,t)=>{for(var n in t||(t={}))JI.call(t,n)&&QI(e,n,t[n]);if(XI)for(var n of XI(t))ZI.call(t,n)&&QI(e,n,t[n]);return e},tD=(e,t)=>YI(e,KI(t));function nD(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function rD(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function oD(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function iD(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(oD(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&oD(i)){const r=null==i.initialGroup?void 0:rD(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:rD(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return tD(eD({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return tD(eD({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=rD(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&oD(i)){const t=null==i.group?void 0:rD(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return tD(eD({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return tD(eD({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return tD(eD({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,v=e[u][p];return tD(eD({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),v,...e[d].slice(f+g)]})}(e,t,nD)}function aD(e){const t=new Map;for(const[,n]of e)for(const e of n)t.set(e.id,e.index);return t}function sD(e,t,n){var r;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(r=n.get(o))?void 0:r.has(t)))return!0}return!1}var lD="__default__";function cD(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function uD(e,t){return e.index-t.index}function dD(e,t){return e.initialIndex-t.initialIndex}function pD(e,t=uD){return Array.from(e).sort(t)}var fD=[GI,class extends ib{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof RD){const{sortable:e}=n,{group:r}=e;let o=t.get(r);o||(o=new Set,t.set(r,o)),o.add(e)}return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:o,target:i}=r;if(!BI(o)||!BI(i))return;if(o.sortable===i.sortable)return;const a=t(),s=aD(a),l=o.sortable.group===i.sortable.group,c=a.get(o.sortable.group),u=l?c:a.get(i.sortable.group);c&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,d;const p=t();if(sD(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=pD(c),g=l?m:pD(u),v=null!=(r=o.sortable.group)?r:lD,b=null!=(d=i.sortable.group)?d:lD,y={[v]:m,[b]:g},x=iD(y,e);if(y===x)return;const S=x[b].indexOf(o.sortable),w=x[b].indexOf(i.sortable);n.collisionObserver.disable(),cD(f,S,h,w),Am(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!l)for(const[e,t]of x[b].entries())t.group=i.sortable.group,t.index=e}),n.actions.setDropTarget(o.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:o}=r;BI(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),r=aD(e),i=e.get(o.sortable.initialGroup);i&&n.renderer.rendering.then(()=>{const n=t();if(sD(r,e,n))return;const a=pD(i),s=pD(i,dD),l=o.sortable.element,c=a[s.indexOf(o.sortable)],u=null==c?void 0:c.element;c&&u&&l&&(cD(l,c.index,u,o.index),Am(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],hD={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function mD(e){var t,n;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(n=null==e?void 0:e.droppable)&&n}}var gD,vD,bD,yD,xD,SD,wD,CD,ED=new class{constructor(){Fg(this,Yg,new WeakMap)}get(e,t){var n;return e?null==(n=jg(this,Yg).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return jg(this,Yg).has(e)||jg(this,Yg).set(e,new Map),null==(r=jg(this,Yg).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=jg(this,Yg).get(e))?void 0:t.clear():void 0}};vD=[Hg],gD=[Hg];var ID=class{constructor(e,t){VI(this,yD,FI(bD,8,this)),FI(bD,11,this),VI(this,xD),VI(this,SD),VI(this,wD,FI(bD,12,this)),FI(bD,15,this),VI(this,CD),this.register=()=>(Am(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{Am(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{Am(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:c=hD,plugins:u}=n,d=((e,t)=>{var n={};for(var r in e)AI.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&MI)for(var r of MI(e))t.indexOf(r)<0&&PI.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=Vy(u,fD),f=mD(o);this.droppable=new RD(OI(TI({},d),{disabled:f.droppable}),t,this),this.draggable=new DD(OI(TI({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&ED.clear(this.manager),(null==r?void 0:r.dragging)&&ED.set(this.manager,this.id,qm(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=$I(this,SD),o=$I(this,xD);e===r&&t===o||(HI(this,SD,e),HI(this,xD,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(sC))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:l,sensors:s}),t,this),HI(this,CD,d.element),this.manager=t,this.index=a,HI(this,SD,a),this.group=i,HI(this,xD,i),this.type=l,this.transition=c}get initialIndex(){var e,t;return null!=(t=null==(e=ED.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=ED.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){qm(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=n.boundingRectangle.left-o.boundingRectangle.left,a=n.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=oS(r),l=xS(r,s,!1),c=xS(r,s);if(i||a){const n=gx(nx(r))?OI(TI({},t),{duration:0}):t;yS({element:r,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){Am(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){Am(()=>{const t=$I(this,CD),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),HI(this,CD,e)})}get element(){var e,t;const n=$I(this,CD);if(n)return null!=(t=null!=(e=xx.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=Vy(e,fD)}set disabled(e){const t=mD(e);Am(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){Am(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:qS}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){Am(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};bD=[,,,EI(null)],yD=new WeakMap,xD=new WeakMap,SD=new WeakMap,wD=new WeakMap,CD=new WeakMap,zI(bD,4,"index",vD,ID,yD),zI(bD,4,"group",gD,ID,wD),((e,t)=>{return kI(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(bD,ID);var DD=class extends uE{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},RD=class extends dE{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},LD=Object.defineProperty,MD=Object.defineProperties,AD=Object.getOwnPropertyDescriptors,PD=Object.getOwnPropertySymbols,qD=Object.prototype.hasOwnProperty,kD=Object.prototype.propertyIsEnumerable,TD=(e,t,n)=>t in e?LD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OD=(e,t)=>{for(var n in t||(t={}))qD.call(t,n)&&TD(e,n,t[n]);if(PD)for(var n of PD(t))kD.call(t,n)&&TD(e,n,t[n]);return e};function ND(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:i,element:a,handle:s,index:l,group:c,disabled:u,modifiers:d,sensors:p,target:h,type:m,plugins:g}=e,v=OD(OD({},hD),e.transition),b=TE(t=>new ID(((e,t)=>MD(e,AD(t)))(OD({},e),{transition:v,register:!1,handle:pE(s),element:pE(a),target:pE(h)}),t)),y=gE(b,_D);return yE(o,()=>b.id=o),fE(()=>{Am(()=>{b.group=c,b.index=l})},[b,c,l]),yE(m,()=>b.type=m),yE(t,()=>b.accept=t,void 0,Vg),yE(i,()=>i&&(b.data=i)),yE(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&b.refreshShape()},vE),xE(s,e=>b.handle=e),xE(a,e=>b.element=e),xE(h,e=>b.target=e),yE(u,()=>b.disabled=null!=u&&u,void 0,Vg),yE(p,()=>b.sensors=p,void 0,Vg),yE(n,()=>b.collisionDetector=n),yE(r,()=>b.collisionPriority=r),yE(g,()=>b.plugins=g,void 0,Vg),yE(v,()=>b.transition=v,void 0,Vg),yE(d,()=>b.modifiers=d,void 0,Vg),yE(e.alignment,()=>b.alignment=e.alignment),{sortable:y,get isDragging(){return y.isDragging},get isDropping(){return y.isDropping},get isDragSource(){return y.isDragSource},get isDropTarget(){return y.isDropTarget},handleRef:f(e=>{b.handle=null!=e?e:void 0},[b]),ref:f(e=>{var t,n;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:f(e=>{var t,n;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:f(e=>{var t,n;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function _D(e,t,n){return!("isDragSource"!==e||n||!t)}const jD=({id:e,itemIndex:t,sectionIndex:n})=>hi.jsx("div",{children:`${n}:${t} - ${e}`}),FD=y(({id:e,itemIndex:t,sectionIndex:n})=>{const r=kf(xm),o=kf(vm),i=kf(pm).at(n)??0,a=kf(fm)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:c}=ND({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[wI],plugins:[GI],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),u=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=o??jD;return hi.jsx(Zu,{className:"section-item-container","data-testid":"section-item",onClick:u,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:hi.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[hi.jsx(sI,{isDragging:l,itemIndex:t,sectionIndex:n}),hi.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:c}),t===i-1&&hi.jsx(sI,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})}),zD=y(({sectionIndex:e})=>{const t=kf(fm),n=kf(pm).at(e)??0,r=t({sectionIndex:e});return hi.jsxs(mc,{className:"exploration-list",style:{overflow:"auto"},children:[hi.jsx(cu,{}),hi.jsx(uI,{id:r,sectionIndex:e}),hi.jsx(cu,{}),hi.jsx(cI,{sectionIndex:e}),hi.jsx(zu,{sx:{padding:"2px 8px"},children:oI(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return hi.jsx(FD,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),WD=[WC.configure({activationConstraints:[new _C.Distance({value:5})]}),kC],$D=y(()=>{const e=kf(dm),t=kf(fm),n=Tf(Em("start")),r=Tf(Em("over")),o=Tf(Em("end"));return hi.jsxs(qE,{sensors:WD,onDragEnd:e=>{o(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[hi.jsx(mc,{style:{display:"flex",flexDirection:"column"},children:oI(e).map(e=>hi.jsx(zD,{sectionIndex:e},t({sectionIndex:e})))}),hi.jsx(aI,{})]})}),VD=y(e=>hi.jsx(Yh,{atoms:Im,atomFamilies:Dm,children:hi.jsx(Rm,{props:e,children:hi.jsx($D,{})})})),HD="12px",BD="nebula-table-utils-head-menu-button",GD="sn-copy-cell";let UD=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.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.F2="F2",e}({});const YD="nebula-table-utils-column-adjuster";let KD=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),XD=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const JD={darker:.15,brighter:.3,opacity:.03},ZD={darker:.3,brighter:.5,opacity:.05};let QD=function(e){return e.Cyclic="C",e}({});const eR=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},tR=(e,t,n)=>{if(0===n.size)return t;let r=0,o=0;for(;r<e.length&&o<t;){const t=e[r];"string"==typeof t&&n.has(t)||o++,r++}return r},nR=lm(e=>Sf(t=>{const n=t(yh),r=t(hh)?.[e];if(r)return r;const o=n?.qHyperCubeDef.rankedList?.[e];if(void 0===o){const n=t(Kf);return n?.createRankedList(e)}return o})),rR=lm(e=>Sf(t=>{const n=t(th),r=t(Kf),o=t(vh),i=t(hh)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:o?.qHyperCube.rankedList?.[e];return i||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),oR=e=>"string"==typeof e.id,iR=e=>Sf(t=>{const n=t(e),r=t(Th);if(!n||0===n.length)return"disabled";const o=n.filter(oR);if(0===o.length)return"disabled";const i=o.filter(e=>r.has(e.id)).length;return 0===i?"none":i===o.length?"all":"some"}),aR=e=>Sf(null,(t,n,r)=>{const o=t(e),i=o?.filter(oR);i&&0!==i.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:o}=e,i=r(Th),a=new Set,s=new Set;if(t.forEach(e=>{const t=i.has(e.id);t&&!n&&s.add(e.id),!t&&n&&a.add(e.id)}),0===a.size&&0===s.size)return;const l=new Set(r(Ah)),c=new Set(r(Ph));a.forEach(e=>l.add(e)),a.forEach(e=>c.delete(e)),s.forEach(e=>c.add(e)),s.forEach(e=>l.delete(e)),o(Ah,l),o(Ph,c),Uf({type:"apply",localChecked:a,localUnchecked:s,handler:r(Kf),model:r(Yf),fieldTypeById:r(Ih),handlerQueue:r(Rh)})})({items:i,shouldCheckAll:r,get:t,set:n})}),sR=Sf(e=>{const t=e(bh);return t?.qHyperCube.qDimensionInfo.filter(nh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),lR=Sf(e=>{const t=e(vh),n=e(Zf),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:o}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:o??""}});return r}),cR=Sf(e=>{const t=e(Zf),n=e(sR),r=e(eh),o=e(th)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),i=e(o?nR("columns"):rR("columns")),a=e(o?nR("rows"):rR("rows")),s=e(lR);if(void 0===n||void 0===i||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:eR(l,a)},{id:"columns",title:t("Common.Columns"),items:eR(l,i)}]}),uR=lm(e=>Sf(t=>t(cR).at(e))),dR=lm(({sectionIndex:e,itemIndex:t})=>Sf(n=>n(uR(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),pR=lm(e=>Sf(t=>t(uR(e))?.title)),fR=Sf(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(uR(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),hR=Sf(e=>e(cR).map(e=>e.items.length)),mR=lm(e=>iR(Sf(t=>t(uR(e))?.items))),gR=lm(e=>aR(Sf(t=>t(uR(e))?.items))),vR=Sf(null,(e,t,{event:n,id:r,toIndex:o,toSection:i,startSection:a})=>{const s=e(Kf),l=e(Yf),c=e(Rh),u=e(nR("rows")),d=e(nR("columns")),p=e(Ch),f=i;if(void 0===s||void 0===l||void 0===u||void 0===d||null===c)return;if(n.operation.canceled)return void t(hh,null);if("section"===n.operation.target?.type&&a===i)return void t(hh,null);const h=sm({rows:u,columns:d},n);t(hh,h);const m=("rows"===f?u:d).filter(e=>e!==r),g=tR(m,o,p);c.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:g,toSection:f}):await s.moveDimension({cId:r,toIndex:g,toSection:f})})}),bR={noItems:{row:"ChartExploration.PivotTable.RowSectionEmpty.Title",column:"ChartExploration.PivotTable.ColumnSectionEmpty.Title",measure:"ChartExploration.PivotTable.MeasureSectionEmpty.Title"},noSearchFound:{row:"ChartExploration.PivotTable.NoRowsFound.Title",column:"ChartExploration.PivotTable.NoColumnsFound.Title",measure:"ChartExploration.PivotTable.NoMeasuresFound.Title"}},yR="ChartExploration.PivotTable.DimensionSectionEmpty.Message",xR="ChartExploration.PivotTable.MeasureSectionEmpty.Message",SR="#177fe6",wR=(e,t,n,r)=>{if("measure"===t)return e(r?bR.noSearchFound.measure:bR.noItems.measure);const o=r?bR.noSearchFound:bR.noItems;return e(n?o.row:o.column)},CR=(e,t,n)=>n?"":e("measure"===t?xR:yR),ER=lm(e=>Sf(t=>{const n=t(Zf),r=t(Qf).length>0;return t=>({title:wR(n,e,0===t,r),message:CR(n,e,r)})})),IR=ER("measure"),DR=ER("dimensions"),RR=({children:e})=>hi.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),LR=e=>{const t=kf(dR(e));return hi.jsx(RR,{children:t})},MR=Sf(e=>{const t=e(bh);return t?.qHyperCube.qMeasureInfo.filter(nh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),AR=Sf(e=>{const t=e(th)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(vh),r=e(MR),o=e(eh),i=e(t?nR("measures"):rR("measures"));if(void 0===n||void 0===r||void 0===i)return[];const a=n.qHyperCube.qMeasureInfo.filter(nh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(o);return eR(s,i)}),PR=lm(e=>Sf(t=>t(AR).at(e)?.title??"")),qR=Sf(e=>({itemIndex:t})=>{const n=e(AR);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),kR=Sf(e=>[e(AR).length]),TR=iR(AR),OR=aR(AR),NR=Sf(null,(e,t,{id:n,toIndex:r,event:o})=>{const i=e(Kf),a=e(Yf),s=e(Rh),l=e(nR("measures")),c=e(Eh);if(void 0===i||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=sm({measures:l},o);t(hh,u);const d=l.filter(e=>e!==n),p=tR(d,r,c);s.add(async()=>{await i.moveMeasure({cId:n,toIndex:p})})}),_R={...gp},jR=Fp().palette,FR={TEXT:jR.text.primary,DISABLED:jR.text.disabled,HOVER:jR.action.hover,WHITE:_R.GREYSCALE_100,BORDER_MEDIUM:_R.GREYSCALE_85,DARK_MODE_TEXT:_R.GREYSCALE_95,DARK_MODE_BORDER:_R.GREYSCALE_95,DARK_MODE_DISABLED:_R.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:jR.primary.main,LINK:jR.info.main,ERROR:jR.error.main};function zR(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function WR(e){if("object"==typeof e&&zR(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const $R={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},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:0,g:0,b:0,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}},VR="qcm-color";function HR(...e){const t={type:VR,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===VR)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(zR(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in $R}(e)){const t=$R[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function BR(e){let t,n,r;if(zR(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?WR(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function GR(e){let t,n,r=0;const o="string"==typeof e?HR(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function UR(e){let t,n,r=0;const o="string"==typeof e?HR(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function YR(e){if(zR(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?WR(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function KR(e,t){return zR(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:KR(HR(e))}function XR(e){return zR(e)?1===e.a?YR(e):KR(e):XR(HR(e))}const JR=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function ZR(e){return.2126*JR(e.r)+.7152*JR(e.g)+.0722*JR(e.b)}function QR(...e){const t=HR(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=GR(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=HR(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=HR(...e);return t.invalid||ZR(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=YR(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=KR(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=XR(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=BR(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?HR(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=GR(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=UR(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=UR(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>QR(o(18*e)),getDarkenedColor:(e=1)=>QR(o(18*-e))}}function eL(e,t){if(!e||!t)return;const n=ZR(e),r=ZR(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const tL="#FFFFFF";function nL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rL,oL="top",iL="top-right",aL="right",sL="bottom-right",lL="bottom",cL="bottom-left",uL="left",dL="top-left";nL(nL(nL(nL(nL(nL(nL(nL(nL(nL(rL={},"equal-equal",[oL,lL]),"equal-higher",[lL,sL]),"equal-lower",[oL,iL]),"equal-void",[oL,lL]),"higher-equal",[uL,cL,oL,iL]),"higher-higher-acute",[lL,cL,uL,iL]),"higher-higher-obtuse",[lL,oL]),"higher-lower-negative",[oL,iL,aL]),"higher-lower-positive",[lL,cL,uL]),"higher-void",[oL]),nL(nL(nL(nL(nL(nL(nL(nL(nL(nL(rL,"lower-equal",[oL]),"lower-higher-negative",[oL,dL]),"lower-higher-positive",[sL]),"lower-lower-acute",[oL,dL,uL,iL,aL]),"lower-lower-obtuse",[oL,lL]),"lower-void",[oL]),"void-equal",[oL]),"void-higher",[oL,lL]),"void-lower",[oL,lL,uL]),"void-void",[oL]),nL(rL,"unclassified",[oL,lL,aL,uL,iL,sL,cL,dL]);var pL,fL,hL=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],mL=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function gL(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?mL:hL}var vL=function(){if(fL)return pL;fL=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=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(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return pL=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},pL}();function bL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function yL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xL(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(vL);var SL=.7,wL=1/SL,CL="\\s*([+-]?\\d+)\\s*",EL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",IL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DL=/^#([0-9a-f]{3,8})$/,RL=new RegExp(`^rgb\\(${CL},${CL},${CL}\\)$`),LL=new RegExp(`^rgb\\(${IL},${IL},${IL}\\)$`),ML=new RegExp(`^rgba\\(${CL},${CL},${CL},${EL}\\)$`),AL=new RegExp(`^rgba\\(${IL},${IL},${IL},${EL}\\)$`),PL=new RegExp(`^hsl\\(${EL},${IL},${IL}\\)$`),qL=new RegExp(`^hsla\\(${EL},${IL},${IL},${EL}\\)$`),kL={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 TL(){return this.rgb().formatHex()}function OL(){return this.rgb().formatRgb()}function NL(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=DL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?_L(t):3===n?new WL(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?jL(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?jL(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=RL.exec(e))?new WL(t[1],t[2],t[3],1):(t=LL.exec(e))?new WL(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ML.exec(e))?jL(t[1],t[2],t[3],t[4]):(t=AL.exec(e))?jL(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=PL.exec(e))?UL(t[1],t[2]/100,t[3]/100,1):(t=qL.exec(e))?UL(t[1],t[2]/100,t[3]/100,t[4]):kL.hasOwnProperty(e)?_L(kL[e]):"transparent"===e?new WL(NaN,NaN,NaN,0):null}function _L(e){return new WL(e>>16&255,e>>8&255,255&e,1)}function jL(e,t,n,r){return r<=0&&(e=t=n=NaN),new WL(e,t,n,r)}function FL(e){return e instanceof xL||(e=NL(e)),e?new WL((e=e.rgb()).r,e.g,e.b,e.opacity):new WL}function zL(e,t,n,r){return 1===arguments.length?FL(e):new WL(e,t,n,null==r?1:r)}function WL(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $L(){return`#${GL(this.r)}${GL(this.g)}${GL(this.b)}`}function VL(){const e=HL(this.opacity);return`${1===e?"rgb(":"rgba("}${BL(this.r)}, ${BL(this.g)}, ${BL(this.b)}${1===e?")":`, ${e})`}`}function HL(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function BL(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function GL(e){return((e=BL(e))<16?"0":"")+e.toString(16)}function UL(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new KL(e,t,n,r)}function YL(e){if(e instanceof KL)return new KL(e.h,e.s,e.l,e.opacity);if(e instanceof xL||(e=NL(e)),!e)return new KL;if(e instanceof KL)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new KL(a,s,l,e.opacity)}function KL(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function XL(e){return(e=(e||0)%360)<0?e+360:e}function JL(e){return Math.max(0,Math.min(1,e||0))}function ZL(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}bL(xL,NL,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:TL,formatHex:TL,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return YL(this).formatHsl()},formatRgb:OL,toString:OL}),bL(WL,zL,yL(xL,{brighter(e){return e=null==e?wL:Math.pow(wL,e),new WL(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?SL:Math.pow(SL,e),new WL(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new WL(BL(this.r),BL(this.g),BL(this.b),HL(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:$L,formatHex:$L,formatHex8:function(){return`#${GL(this.r)}${GL(this.g)}${GL(this.b)}${GL(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:VL,toString:VL})),bL(KL,function(e,t,n,r){return 1===arguments.length?YL(e):new KL(e,t,n,null==r?1:r)},yL(xL,{brighter(e){return e=null==e?wL:Math.pow(wL,e),new KL(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?SL:Math.pow(SL,e),new KL(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,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new WL(ZL(e>=240?e-240:e+120,o,r),ZL(e,o,r),ZL(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new KL(XL(this.h),JL(this.s),JL(this.l),HL(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=HL(this.opacity);return`${1===e?"hsl(":"hsla("}${XL(this.h)}, ${100*JL(this.s)}%, ${100*JL(this.l)}%${1===e?")":`, ${e})`}`}}));const QL=Math.PI/180,eM=180/Math.PI,tM=.96422,nM=.82521,rM=4/29,oM=6/29,iM=3*oM*oM,aM=oM*oM*oM;function sM(e){if(e instanceof lM)return new lM(e.l,e.a,e.b,e.opacity);if(e instanceof fM)return hM(e);e instanceof WL||(e=FL(e));var t,n,r=pM(e.r),o=pM(e.g),i=pM(e.b),a=cM((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=cM((.4360747*r+.3850649*o+.1430804*i)/tM),n=cM((.0139322*r+.0971045*o+.7141733*i)/nM)),new lM(116*a-16,500*(t-a),200*(a-n),e.opacity)}function lM(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function cM(e){return e>aM?Math.pow(e,1/3):e/iM+rM}function uM(e){return e>oM?e*e*e:iM*(e-rM)}function dM(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function pM(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fM(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function hM(e){if(isNaN(e.h))return new lM(e.l,0,0,e.opacity);var t=e.h*QL;return new lM(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}bL(lM,function(e,t,n,r){return 1===arguments.length?sM(e):new lM(e,t,n,null==r?1:r)},yL(xL,{brighter(e){return new lM(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new lM(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,n=isNaN(this.b)?e:e-this.b/200;return new WL(dM(3.1338561*(t=tM*uM(t))-1.6168667*(e=1*uM(e))-.4906146*(n=nM*uM(n))),dM(-.9787684*t+1.9161415*e+.033454*n),dM(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),bL(fM,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof fM)return new fM(e.h,e.c,e.l,e.opacity);if(e instanceof lM||(e=sM(e)),0===e.a&&0===e.b)return new fM(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*eM;return new fM(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new fM(e,t,n,null==r?1:r)},yL(xL,{brighter(e){return new fM(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new fM(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return hM(this).rgb()}}));var mM=e=>()=>e;function gM(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):mM(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?gM:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):mM(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=zL(e)).r,(t=zL(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=gM(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var vM="center",bM="bottom";[{key:"NoDataExist",alignment:vM,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:vM,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:vM,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:vM},{key:"DataRangeIncludingZero",alignment:bM},{key:"LimitedData",alignment:bM},{key:"NegativeOrZeroValues",alignment:bM}].reduce(function(e,t){return e[t.key]=t,e},{});var yM,xM=["__proto__","constructor"];function SM(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),o=r[r.length-1];if(!xM.some(function(e){return r.includes(e)})){for(var i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}}function wM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var o=t(r);return n.has(o)?n.get(o):n.set(o,e(r))}}function CM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,i)},n)}}function EM(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function IM(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=RM)):void 0===t&&(t=DM);for(var n,r,o,i,a,s=new AM(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new AM(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(MM)}function DM(e){return e.children}function RM(e){return Array.isArray(e)?e[1]:null}function LM(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function MM(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function AM(e){this.data=e,this.depth=this.height=0,this.parent=null}AM.prototype=IM.prototype={constructor:AM,count:function(){return this.eachAfter(EM)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},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(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return IM(this).eachBefore(LM)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},yM=function(e){
88
+ `),ll.rippleVisible,ml,550,({theme:e})=>e.transitions.easing.easeInOut,ll.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ll.child,ll.childLeaving,gl,550,({theme:e})=>e.transitions.easing.easeInOut,ll.childPulsate,vl,({theme:e})=>e.transitions.easing.easeInOut),xl=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a}=n,s=ke(n,cl),[l,c]=o.useState([]),u=o.useRef(0),d=o.useRef(null);o.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=o.useRef(!1),f=aa(),h=o.useRef(null),m=o.useRef(null),g=o.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c(e=>[...e,hi.jsx(yl,{classes:{ripple:Ci(i.ripple,ll.ripple),rippleVisible:Ci(i.rippleVisible,ll.rippleVisible),ripplePulsate:Ci(i.ripplePulsate,ll.ripplePulsate),child:Ci(i.child,ll.child),childLeaving:Ci(i.childLeaving,ll.childLeaving),childPulsate:Ci(i.childPulsate,ll.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,d.current=a},[i]),v=o.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,()=>{h.current&&(h.current(),h.current=null)})):g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},[r,g,f]),b=o.useCallback(()=>{v({},{pulsate:!0})},[v]),y=o.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,()=>{y(e,t)});h.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[f]);return o.useImperativeHandle(t,()=>({pulsate:b,start:v,stop:y}),[b,v,y]),hi.jsx(bl,qe({className:Ci(ll.root,i.root,a),ref:m},s,{children:hi.jsx(tl,{component:null,exit:!0,children:l})}))});function Sl(e){return Di("MuiButtonBase",e)}const wl=Ri("MuiButtonBase",["root","disabled","focusVisible"]),Cl=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],El=Ms("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${wl.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Il=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:f="a",onBlur:h,onClick:m,onContextMenu:g,onDragLeave:v,onFocus:b,onFocusVisible:y,onKeyDown:x,onKeyUp:S,onMouseDown:w,onMouseLeave:C,onMouseUp:E,onTouchEnd:I,onTouchMove:D,onTouchStart:R,tabIndex:L=0,TouchRippleProps:M,touchRippleRef:A,type:P}=n,q=ke(n,Cl),k=o.useRef(null),T=o.useRef(null),O=na(T,A),{isFocusVisibleRef:N,onFocus:_,onBlur:j,ref:F}=ma(),[z,W]=o.useState(!1);c&&z&&W(!1),o.useImperativeHandle(r,()=>({focusVisible:()=>{W(!0),k.current.focus()}}),[]);const[$,V]=o.useState(!1);o.useEffect(()=>{V(!0)},[]);const H=$&&!u&&!c;function B(e,t,n=d){return ta(r=>{t&&t(r);return!n&&T.current&&T.current[e](r),!0})}o.useEffect(()=>{z&&p&&!u&&$&&T.current.pulsate()},[u,p,z,$]);const G=B("start",w),U=B("stop",g),Y=B("stop",v),K=B("stop",E),X=B("stop",e=>{z&&e.preventDefault(),C&&C(e)}),J=B("start",R),Z=B("stop",I),Q=B("stop",D),ee=B("stop",e=>{j(e),!1===N.current&&W(!1),h&&h(e)},!1),te=ta(e=>{k.current||(k.current=e.currentTarget),_(e),!0===N.current&&(W(!0),y&&y(e)),b&&b(e)}),ne=()=>{const e=k.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=o.useRef(!1),oe=ta(e=>{p&&!re.current&&z&&T.current&&" "===e.key&&(re.current=!0,T.current.stop(e,()=>{T.current.start(e)})),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))}),ie=ta(e=>{p&&" "===e.key&&T.current&&z&&!e.defaultPrevented&&(re.current=!1,T.current.stop(e,()=>{T.current.pulsate(e)})),S&&S(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)});let ae=l;"button"===ae&&(q.href||q.to)&&(ae=f);const se={};"button"===ae?(se.type=void 0===P?"button":P,se.disabled=c):(q.href||q.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=na(t,F,k),ce=qe({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:L,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=va({root:["root",t&&"disabled",n&&"focusVisible"]},Sl,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return hi.jsxs(El,qe({as:ae,className:Ci(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:G,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:L,type:P},se,q,{children:[a,H?hi.jsx(xl,qe({ref:O,center:i},M)):null]}))});function Dl(e){return Di("MuiTypography",e)}Ri("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Rl=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Ll=Ms("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${lo(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>qe({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Ml={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Al={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Pl=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiTypography"}),r=(e=>Al[e]||e)(n.color),o=bi(qe({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Ml}=o,f=ke(o,Rl),h=qe({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Ml[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return va({root:["root",i,"inherit"!==e.align&&`align${lo(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Dl,a)})(h);return hi.jsx(Ll,qe({as:m,ref:t,ownerState:h,className:Ci(g.root,a)},f))});const ql=o.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[a,s]=o.useState(null),l=na(o.isValidElement(n)?Ca(n):null,t);if(Wi(()=>{i||s(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),Wi(()=>{if(a&&!i)return Xi(t,a),()=>{Xi(t,null)}},[t,a,i]),i){if(o.isValidElement(n)){const e={ref:l};return o.cloneElement(n,e)}return hi.jsx(o.Fragment,{children:n})}return hi.jsx(o.Fragment,{children:a?I.createPortal(n,a):a})}),kl=["onChange","maxRows","minRows","style","value"];function Tl(e){return parseInt(e,10)||0}const Ol={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Nl(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const _l=o.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:s}=e,l=ke(e,kl),{current:c}=o.useRef(null!=s),u=o.useRef(null),d=na(t,u),p=o.useRef(null),f=o.useRef(null),h=o.useCallback(()=>{const t=u.current,n=f.current;if(!t||!n)return;const o=Ki(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=Tl(o.paddingBottom)+Tl(o.paddingTop),l=Tl(o.borderBottomWidth)+Tl(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-c)<=1}},[r,i,e.placeholder]),m=ta(()=>{const e=u.current,t=h();if(!e||!t||Nl(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=o.useCallback(()=>{const e=u.current,t=h();if(!e||!t||Nl(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=o.useRef(-1);Wi(()=>{const e=Ui(g),t=null==u?void 0:u.current;if(!t)return;const n=Ki(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),Wi(()=>{g()});return hi.jsxs(o.Fragment,{children:[hi.jsx("textarea",qe({value:s,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:i,style:a},l)),hi.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:qe({},Ol,a,{paddingTop:0,paddingBottom:0})})]})});function jl({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Fl=o.createContext(void 0);function zl(){return o.useContext(Fl)}function Wl(e){return hi.jsx(gi,qe({},e,{defaultTheme:ps,themeId:Pe}))}function $l(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Vl(e,t=!1){return e&&($l(e.value)&&""!==e.value||t&&$l(e.defaultValue)&&""!==e.defaultValue)}function Hl(e){return Di("MuiInputBase",e)}const Bl=Ri("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Gl=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Ul=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${lo(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Yl=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Kl=Ms("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ul})(({theme:e,ownerState:t})=>qe({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Bl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&qe({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Xl=Ms("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=qe({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.42:.5};return qe({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Bl.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${Bl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})}),Jl=hi.jsx(Wl,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Zl=o.forwardRef(function(e,t){var n;const r=ks({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,fullWidth:m=!1,id:g,inputComponent:v="input",inputProps:b={},inputRef:y,maxRows:x,minRows:S,multiline:w=!1,name:C,onBlur:E,onChange:I,onClick:D,onFocus:R,onKeyDown:L,onKeyUp:M,placeholder:A,readOnly:P,renderSuffix:q,rows:k,slotProps:T={},slots:O={},startAdornment:N,type:_="text",value:j}=r,F=ke(r,Gl),z=null!=b.value?b.value:j,{current:W}=o.useRef(null!=z),$=o.useRef(),V=o.useCallback(e=>{},[]),H=na($,y,b.ref,V),[B,G]=o.useState(!1),U=zl(),Y=jl({props:r,muiFormControl:U,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Y.focused=U?U.focused:B,o.useEffect(()=>{!U&&p&&B&&(G(!1),E&&E())},[U,p,B,E]);const K=U&&U.onFilled,X=U&&U.onEmpty,J=o.useCallback(e=>{Vl(e)?K&&K():X&&X()},[K,X]);Wi(()=>{W&&J({value:z})},[z,J,W]);o.useEffect(()=>{J($.current)},[]);let Z=v,Q=b;w&&"input"===Z&&(Q=qe(k?{type:void 0,minRows:k,maxRows:k}:{type:void 0,maxRows:x,minRows:S},Q),Z=_l);o.useEffect(()=>{U&&U.setAdornedStart(Boolean(N))},[U,N]);const ee=qe({},r,{color:Y.color||"primary",disabled:Y.disabled,endAdornment:h,error:Y.error,focused:Y.focused,formControl:U,fullWidth:m,hiddenLabel:Y.hiddenLabel,multiline:w,size:Y.size,startAdornment:N,type:_}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return va({root:["root",`color${lo(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${lo(p)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Hl,t)})(ee),ne=O.root||c.Root||Kl,re=T.root||u.root||{},oe=O.input||c.Input||Xl;return Q=qe({},Q,null!=(n=T.input)?n:u.input),hi.jsxs(o.Fragment,{children:[!f&&Jl,hi.jsxs(ne,qe({},re,!ba(ne)&&{ownerState:qe({},ee,re.ownerState)},{ref:t,onClick:e=>{$.current&&e.currentTarget===e.target&&$.current.focus(),D&&D(e)}},F,{className:Ci(te.root,re.className,l,P&&"MuiInputBase-readOnly"),children:[N,hi.jsx(Fl.Provider,{value:null,children:hi.jsx(oe,qe({ownerState:ee,"aria-invalid":Y.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:Y.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?$.current:{value:"x"})},name:C,placeholder:A,readOnly:P,required:Y.required,rows:k,value:z,onKeyDown:L,onKeyUp:M,type:_},Q,!ba(oe)&&{as:Z,ownerState:qe({},ee,Q.ownerState)},{ref:H,className:Ci(te.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),b.onBlur&&b.onBlur(e),U&&U.onBlur?U.onBlur(e):G(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||$.current;if(null==t)throw new Error(Me(1));J({value:t.value})}b.onChange&&b.onChange(e,...t),I&&I(e,...t)},onFocus:e=>{Y.disabled?e.stopPropagation():(R&&R(e),b.onFocus&&b.onFocus(e),U&&U.onFocus?U.onFocus(e):G(!0))}}))}),h,q?q(qe({},Y,{startAdornment:N})):null]}))]})});function Ql(e){return Di("MuiInput",e)}const ec=qe({},Bl,Ri("MuiInput",["root","underline","input"]));function tc(e){return Di("MuiOutlinedInput",e)}const nc=qe({},Bl,Ri("MuiOutlinedInput",["root","notchedOutline","input"]));function rc(e){return Di("MuiFilledInput",e)}const oc=qe({},Bl,Ri("MuiFilledInput",["root","underline","input"]));var ic=js(hi.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const ac=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],sc={entering:{opacity:1},entered:{opacity:1}},lc=o.forwardRef(function(e,t){const n=fs(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:b=Ys}=e,y=ke(e,ac),x=o.useRef(null),S=na(x,Ca(s),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},C=w(p),E=w((e,t)=>{nl(e);const r=rl({style:g,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),I=w(d),D=w(m),R=w(e=>{const t=rl({style:g,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),L=w(h);return hi.jsx(b,qe({appear:a,in:c,nodeRef:x,onEnter:E,onEntered:I,onEntering:C,onExit:R,onExited:L,onExiting:D,addEndListener:e=>{i&&i(x.current,e)},timeout:v},y,{children:(e,t)=>o.cloneElement(s,qe({style:qe({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},sc[e],g,s.props.style),ref:S},t))}))});function cc(e){return Di("MuiBackdrop",e)}Ri("MuiBackdrop",["root","invisible"]);const uc=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],dc=Ms("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>qe({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),pc=o.forwardRef(function(e,t){var n,r,o;const i=ks({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=lc,transitionDuration:g}=i,v=ke(i,uc),b=qe({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return va({root:["root",n&&"invisible"]},cc,t)})(b),x=null!=(n=f.root)?n:u.root;return hi.jsx(m,qe({in:p,timeout:g},v,{children:hi.jsx(dc,qe({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:Ci(y.root,s,null==x?void 0:x.className),ownerState:qe({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}),fc=Ri("MuiBox",["root"]),hc=ds(),mc=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=Gr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(ni);return o.forwardRef(function(e,o){const s=ci(n),l=bi(e),{className:c,component:u="div"}=l,d=ke(l,Ei);return hi.jsx(a,qe({as:u,ref:o,className:Ci(c,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:Pe,defaultTheme:hc,defaultClassName:fc.root,generateClassName:Si.generate});function gc(e){return Di("MuiButton",e)}const vc=Ri("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),bc=o.createContext({}),yc=o.createContext(void 0),xc=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Sc=e=>qe({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),wc=Ms(Il,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${lo(n.color)}`],t[`size${lo(n.size)}`],t[`${n.variant}Size${lo(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return qe({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":qe({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":qe({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${vc.focusVisible}`]:qe({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${vc.disabled}`]:qe({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ba.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${vc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${vc.disabled}`]:{boxShadow:"none"}}),Cc=Ms("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${lo(n.size)}`]]}})(({ownerState:e})=>qe({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Sc(e))),Ec=Ms("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${lo(n.size)}`]]}})(({ownerState:e})=>qe({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Sc(e))),Ic=o.forwardRef(function(e,t){const n=o.useContext(bc),r=o.useContext(yc),i=ks({props:zi(n,e),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:f,focusVisibleClassName:h,fullWidth:m=!1,size:g="medium",startIcon:v,type:b,variant:y="text"}=i,x=ke(i,xc),S=qe({},i,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:m,size:g,type:b,variant:y}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return qe({},a,va({root:["root",i,`${i}${lo(t)}`,`size${lo(o)}`,`${i}Size${lo(o)}`,`color${lo(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${lo(o)}`],endIcon:["icon","endIcon",`iconSize${lo(o)}`]},gc,a))})(S),C=v&&hi.jsx(Cc,{className:w.startIcon,ownerState:S,children:v}),E=f&&hi.jsx(Ec,{className:w.endIcon,ownerState:S,children:f}),I=r||"";return hi.jsxs(wc,qe({ownerState:S,className:Ci(n.className,w.root,c,I),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:Ci(w.focusVisible,h),ref:t,type:b},x,{classes:w,children:[C,a,E]}))});function Dc(e){return Di("PrivateSwitchBase",e)}Ri("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Rc=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Lc=Ms(Il,{name:"MuiSwitchBase"})(({ownerState:e})=>qe({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),Mc=Ms("input",{name:"MuiSwitchBase",shouldForwardProp:Ls})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Ac=o.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:h,onBlur:m,onChange:g,onFocus:v,readOnly:b,required:y=!1,tabIndex:x,type:S,value:w}=e,C=ke(e,Rc),[E,I]=ea({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),D=zl();let R=s;D&&void 0===R&&(R=D.disabled);const L="checkbox"===S||"radio"===S,M=qe({},e,{checked:E,disabled:R,disableFocusRipple:l,edge:c}),A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return va({root:["root",n&&"checked",r&&"disabled",o&&`edge${lo(o)}`],input:["input"]},Dc,t)})(M);return hi.jsxs(Lc,qe({component:"span",className:Ci(A.root,i),centerRipple:!0,focusRipple:!l,disabled:R,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),D&&D.onFocus&&D.onFocus(e)},onBlur:e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},ownerState:M,ref:t},C,{children:[hi.jsx(Mc,qe({autoFocus:n,checked:r,defaultChecked:a,className:A.input,disabled:R,id:L?d:void 0,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;I(t),g&&g(e,t)},readOnly:b,ref:f,required:y,ownerState:M,tabIndex:x,type:S},"checkbox"===S&&void 0===w?{}:{value:w},p)),E?o:u]}))});var Pc=js(hi.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),qc=js(hi.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),kc=js(hi.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function Tc(e){return Di("MuiCheckbox",e)}const Oc=Ri("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Nc=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],_c=Ms(Ac,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${lo(n.size)}`],"default"!==n.color&&t[`color${lo(n.color)}`]]}})(({theme:e,ownerState:t})=>qe({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${Oc.checked}, &.${Oc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Oc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),jc=hi.jsx(qc,{}),Fc=hi.jsx(Pc,{}),zc=hi.jsx(kc,{}),Wc=o.forwardRef(function(e,t){var n,r;const i=ks({props:e,name:"MuiCheckbox"}),{checkedIcon:a=jc,color:s="primary",icon:l=Fc,indeterminate:c=!1,indeterminateIcon:u=zc,inputProps:d,size:p="medium",className:f}=i,h=ke(i,Nc),m=c?u:l,g=c?u:a,v=qe({},i,{color:s,indeterminate:c,size:p}),b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e;return qe({},t,va({root:["root",n&&"indeterminate",`color${lo(r)}`,`size${lo(o)}`]},Tc,t))})(v);return hi.jsx(_c,qe({type:"checkbox",inputProps:qe({"data-indeterminate":c},d),icon:o.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:p}),checkedIcon:o.cloneElement(g,{fontSize:null!=(r=g.props.fontSize)?r:p}),ownerState:v,ref:t,className:Ci(b.root,f)},h,{classes:b}))});function $c(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Vc(e){return parseInt(Ki(e).getComputedStyle(e).paddingRight,10)||0}function Hc(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&$c(e,o)})}function Bc(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Gc(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Yi(e);return t.body===e?Ki(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=ga(Yi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Vc(r)+e}px`;const t=Yi(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Vc(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Yi(r).body;else{const t=r.parentElement,n=Ki(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Uc=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Yc(e){const t=[],n=[];return Array.from(e.querySelectorAll(Uc)).forEach((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Kc(){return!0}function Xc(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Yc,isEnabled:s=Kc,open:l}=e,c=o.useRef(!1),u=o.useRef(null),d=o.useRef(null),p=o.useRef(null),f=o.useRef(null),h=o.useRef(!1),m=o.useRef(null),g=na(Ca(t),m),v=o.useRef(null);o.useEffect(()=>{l&&m.current&&(h.current=!n)},[n,l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Yi(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Yi(m.current),t=t=>{v.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var o,i;const e=Boolean((null==(o=v.current)?void 0:o.shiftKey)&&"Tab"===(null==(i=v.current)?void 0:i.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,s,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return hi.jsxs(o.Fragment,{children:[hi.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),hi.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const Jc=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&$c(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Hc(t,e.mount,e.modalRef,r,!0);const o=Bc(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Gc(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&$c(e.modalRef,t),Hc(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&$c(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Zc(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Jc,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=e,f=o.useRef({}),h=o.useRef(null),m=o.useRef(null),g=na(m,p),[v,b]=o.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const S=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),w=()=>{i.mount(S(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},C=ta(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Yi(h.current).body;i.add(S(),e),m.current&&w()}),E=o.useCallback(()=>i.isTopModal(S()),[i]),I=ta(e=>{h.current=e,e&&(d&&E()?w():m.current&&$c(m.current,x))}),D=o.useCallback(()=>{i.remove(S(),x)},[x,i]);o.useEffect(()=>()=>{D()},[D]),o.useEffect(()=>{d?C():y&&a||D()},[d,D,y,a,C]);const R=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&E()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},L=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=ya(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=qe({},n,t);return qe({role:"presentation"},r,{onKeyDown:R(r),ref:g})},getBackdropProps:(e={})=>qe({"aria-hidden":!0},e,{onClick:L(e),open:d}),getTransitionProps:()=>({onEnter:Gi(()=>{b(!1),s&&s()},null==c?void 0:c.props.onEnter),onExited:Gi(()=>{b(!0),l&&l(),a&&D()},null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:I,isTopModal:E,exited:v,hasTransition:y}}function Qc(e){return Di("MuiModal",e)}Ri("MuiModal",["root","hidden","backdrop"]);const eu=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],tu=Ms("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>qe({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),nu=Ms(pc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ru=o.forwardRef(function(e,t){var n,r,i,a,s,l;const c=ks({name:"MuiModal",props:e}),{BackdropComponent:u=nu,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:g,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:S=!1,disablePortal:w=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:D=!1,onBackdropClick:R,open:L,slotProps:M,slots:A}=c,P=ke(c,eu),q=qe({},c,{closeAfterTransition:f,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:S,disablePortal:w,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:I,keepMounted:D}),{getRootProps:k,getBackdropProps:T,getTransitionProps:O,portalRef:N,isTopModal:_,exited:j,hasTransition:F}=Zc(qe({},q,{rootRef:t})),z=qe({},q,{exited:j}),W=(e=>{const{open:t,exited:n,classes:r}=e;return va({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Qc,r)})(z),$={};if(void 0===h.props.tabIndex&&($.tabIndex="-1"),F){const{onEnter:e,onExited:t}=O();$.onEnter=e,$.onExited=t}const V=null!=(n=null!=(r=null==A?void 0:A.root)?r:v.Root)?n:tu,H=null!=(i=null!=(a=null==A?void 0:A.backdrop)?a:v.Backdrop)?i:u,B=null!=(s=null==M?void 0:M.root)?s:b.root,G=null!=(l=null==M?void 0:M.backdrop)?l:b.backdrop,U=wa({elementType:V,externalSlotProps:B,externalForwardedProps:P,getSlotProps:k,additionalProps:{ref:t,as:g},ownerState:z,className:Ci(p,null==B?void 0:B.className,null==W?void 0:W.root,!z.open&&z.exited&&(null==W?void 0:W.hidden))}),Y=wa({elementType:H,externalSlotProps:G,additionalProps:d,getSlotProps:e=>T(qe({},e,{onClick:t=>{R&&R(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ci(null==G?void 0:G.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:z});return D||L||F&&!j?hi.jsx(ql,{ref:N,container:m,disablePortal:w,children:hi.jsxs(V,qe({},U,{children:[!I&&u?hi.jsx(H,qe({},Y)):null,hi.jsx(Xc,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:_,open:L,children:o.cloneElement(h,$)})]}))}):null});function ou(e){return Di("MuiDivider",e)}const iu=Ri("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),au=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],su=Ms("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>qe({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Ba.alpha(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>qe({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>qe({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>qe({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>qe({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),lu=Ms("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>qe({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),cu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=ke(n,au),h=qe({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return va({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},ou,r)})(h);return hi.jsx(su,qe({as:a,className:Ci(m.root,i),role:u,ref:t,ownerState:h},f,{children:o?hi.jsx(lu,{className:m.wrapper,ownerState:h,children:o}):null}))});cu.muiSkipListHighlight=!0;const uu=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],du=Ms(Kl,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Ul(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return qe({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${oc.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${oc.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oc.disabled}, .${oc.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${oc.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&qe({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))}),pu=Ms(Xl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>qe({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),fu=o.forwardRef(function(e,t){var n,r,o,i;const a=ks({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:f={},type:h="text"}=a,m=ke(a,uu),g=qe({},a,{fullWidth:c,inputComponent:u,multiline:d,type:h}),v=(e=>{const{classes:t,disableUnderline:n}=e;return qe({},t,va({root:["root",!n&&"underline"],input:["input"]},rc,t))})(a),b={root:{ownerState:g},input:{ownerState:g}},y=(null!=p?p:l)?Zr(b,null!=p?p:l):b,x=null!=(n=null!=(r=f.root)?r:s.Root)?n:du,S=null!=(o=null!=(i=f.input)?i:s.Input)?o:pu;return hi.jsx(Zl,qe({slots:{root:x,input:S},componentsProps:y,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:h},m,{classes:v}))});fu.muiName="Input";const hu=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function mu(e){return`scale(${e}, ${e**2})`}const gu={entering:{opacity:1,transform:mu(1)},entered:{opacity:1,transform:"none"}},vu="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),bu=o.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=Ys}=e,v=ke(e,hu),b=aa(),y=o.useRef(),x=fs(),S=o.useRef(null),w=na(S,Ca(i),t),C=e=>t=>{if(e){const n=S.current;void 0===t?e(n):e(n,t)}},E=C(u),I=C((e,t)=>{nl(e);const{duration:n,delay:r,easing:o}=rl({style:h,timeout:m,easing:a},{mode:"enter"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=n,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:r}),x.transitions.create("transform",{duration:vu?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)}),D=C(c),R=C(f),L=C(e=>{const{duration:t,delay:n,easing:r}=rl({style:h,timeout:m,easing:a},{mode:"exit"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:vu?o:.666*o,delay:vu?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=mu(.75),d&&d(e)}),M=C(p);return hi.jsx(g,qe({appear:r,in:s,nodeRef:S,onEnter:I,onEntered:D,onEntering:E,onExit:L,onExited:M,onExiting:R,addEndListener:e=>{"auto"===m&&b.start(y.current||0,e),n&&n(S.current,e)},timeout:"auto"===m?null:m},v,{children:(e,t)=>o.cloneElement(i,qe({style:qe({opacity:0,transform:mu(.75),visibility:"exited"!==e||s?void 0:"hidden"},gu[e],h,i.props.style),ref:w},t))}))});bu.muiSupportAuto=!0;const yu=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],xu=Ms(Kl,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Ul(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),qe({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ec.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ec.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ec.disabled}, .${ec.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ec.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Su=Ms(Xl,{name:"MuiInput",slot:"Input",overridesResolver:Yl})({}),wu=o.forwardRef(function(e,t){var n,r,o,i;const a=ks({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:m="text"}=a,g=ke(a,yu),v=(e=>{const{classes:t,disableUnderline:n}=e;return qe({},t,va({root:["root",!n&&"underline"],input:["input"]},Ql,t))})(a),b={root:{ownerState:{disableUnderline:s}}},y=(null!=f?f:c)?Zr(null!=f?f:c,b):b,x=null!=(n=null!=(r=h.root)?r:l.Root)?n:xu,S=null!=(o=null!=(i=h.input)?i:l.Input)?o:Su;return hi.jsx(Zl,qe({slots:{root:x,input:S},slotProps:y,fullWidth:u,inputComponent:d,multiline:p,ref:t,type:m},g,{classes:v}))});function Cu(e){return Di("MuiInputAdornment",e)}wu.muiName="Input";const Eu=Ri("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Iu;const Du=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Ru=Ms("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${lo(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>qe({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Eu.positionStart}&:not(.${Eu.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),Lu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u}=n,d=ke(n,Du),p=zl()||{};let f=u;u&&p.variant,p&&!f&&(f=p.variant);const h=qe({},n,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:s,position:c,variant:f}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return va({root:["root",n&&"disablePointerEvents",o&&`position${lo(o)}`,a,r&&"hiddenLabel",i&&`size${lo(i)}`]},Cu,t)})(h);return hi.jsx(Fl.Provider,{value:null,children:hi.jsx(Ru,qe({as:a,ownerState:h,className:Ci(m.root,i),ref:t},d,{children:"string"!=typeof r||l?hi.jsxs(o.Fragment,{children:["start"===c?Iu||(Iu=hi.jsx("span",{className:"notranslate",children:"​"})):null,r]}):hi.jsx(Pl,{color:"text.secondary",children:r})}))})});function Mu(e){return Di("MuiLink",e)}const Au=Ri("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Pu={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},qu=({theme:e,ownerState:t})=>{const n=(e=>Pu[e]||e)(t.color),r=uo(e,`palette.${n}`,!1)||t.color,o=uo(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Ba.alpha(r,.4)},ku=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Tu=Ms(Pl,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${lo(n.underline)}`],"button"===n.component&&t.button]}})(({theme:e,ownerState:t})=>qe({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&qe({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:qu({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Au.focusVisible}`]:{outline:"auto"}})),Ou=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=n,f=ke(n,ku),{isFocusVisibleRef:h,onBlur:m,onFocus:g,ref:v}=ma(),[b,y]=o.useState(!1),x=na(t,v),S=qe({},n,{color:i,component:a,focusVisible:b,underline:u,variant:d}),w=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e;return va({root:["root",`underline${lo(o)}`,"button"===n&&"button",r&&"focusVisible"]},Mu,t)})(S);return hi.jsx(Tu,qe({color:i,className:Ci(w.root,r),classes:c,component:a,onBlur:e=>{m(e),!1===h.current&&y(!1),s&&s(e)},onFocus:e=>{g(e),!0===h.current&&y(!0),l&&l(e)},ref:x,ownerState:S,variant:d,sx:[...Object.keys(Pu).includes(i)?[]:[{color:i}],...Array.isArray(p)?p:[p]]},f))}),Nu=o.createContext({});function _u(e){return Di("MuiList",e)}Ri("MuiList",["root","padding","dense","subheader"]);const ju=["children","className","component","dense","disablePadding","subheader"],Fu=Ms("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>qe({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),zu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiList"}),{children:r,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=n,u=ke(n,ju),d=o.useMemo(()=>({dense:s}),[s]),p=qe({},n,{component:a,dense:s,disablePadding:l}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return va({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_u,t)})(p);return hi.jsx(Nu.Provider,{value:d,children:hi.jsxs(Fu,qe({as:a,className:Ci(f.root,i),ref:t,ownerState:p},u,{children:[c,r]}))})});function Wu(e){return Di("MuiListItem",e)}const $u=Ri("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Vu=Ri("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Hu(e){return Di("MuiListItemSecondaryAction",e)}Ri("MuiListItemSecondaryAction",["root","disableGutters"]);const Bu=["className"],Gu=Ms("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>qe({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Uu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,i=ke(n,Bu),a=qe({},n,{disableGutters:o.useContext(Nu).disableGutters}),s=(e=>{const{disableGutters:t,classes:n}=e;return va({root:["root",t&&"disableGutters"]},Hu,n)})(a);return hi.jsx(Gu,qe({className:Ci(s.root,r),ownerState:a,ref:t},i))});Uu.muiName="ListItemSecondaryAction";const Yu=["className"],Ku=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Xu=Ms("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>qe({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&qe({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Vu.root}`]:{paddingRight:48}},{[`&.${$u.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${$u.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${$u.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${$u.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${$u.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Ju=Ms("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Zu=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:i=!1,button:a=!1,children:s,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:f}={},dense:h=!1,disabled:m=!1,disableGutters:g=!1,disablePadding:v=!1,divider:b=!1,focusVisibleClassName:y,secondaryAction:x,selected:S=!1,slotProps:w={},slots:C={}}=n,E=ke(n.ContainerProps,Yu),I=ke(n,Ku),D=o.useContext(Nu),R=o.useMemo(()=>({dense:h||D.dense||!1,alignItems:r,disableGutters:g}),[r,D.dense,h,g]),L=o.useRef(null);Wi(()=>{i&&L.current&&L.current.focus()},[i]);const M=o.Children.toArray(s),A=M.length&&(P=M[M.length-1],q=["ListItemSecondaryAction"],o.isValidElement(P)&&-1!==q.indexOf(null!=(k=P.type.muiName)?k:null==(T=P.type)||null==(T=T._payload)||null==(T=T.value)?void 0:T.muiName));var P,q,k,T;const O=qe({},n,{alignItems:r,autoFocus:i,button:a,dense:R.dense,disabled:m,disableGutters:g,disablePadding:v,divider:b,hasSecondaryAction:A,selected:S}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return va({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Wu,r)})(O),_=na(L,t),j=C.root||u.Root||Xu,F=w.root||d.root||{},z=qe({className:Ci(N.root,F.className,l),disabled:m},I);let W=c||"li";return a&&(z.component=c||"div",z.focusVisibleClassName=Ci($u.focusVisible,y),W=Il),A?(W=z.component||c?W:"div","li"===p&&("li"===W?W="div":"li"===z.component&&(z.component="div")),hi.jsx(Nu.Provider,{value:R,children:hi.jsxs(Ju,qe({as:p,className:Ci(N.container,f),ref:_,ownerState:O},E,{children:[hi.jsx(j,qe({},F,!ba(j)&&{as:W,ownerState:qe({},O,F.ownerState)},z,{children:M})),M.pop()]}))})):hi.jsx(Nu.Provider,{value:R,children:hi.jsxs(j,qe({},F,{as:W,ref:_},!ba(j)&&{ownerState:qe({},O,F.ownerState)},z,{children:[M,x&&hi.jsx(Uu,{children:x})]}))})});function Qu(e){return Di("MuiListItemIcon",e)}const ed=Ri("MuiListItemIcon",["root","alignItemsFlexStart"]),td=["className"],nd=Ms("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>qe({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),rd=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=ke(n,td),a=qe({},n,{alignItems:o.useContext(Nu).alignItems}),s=(e=>{const{alignItems:t,classes:n}=e;return va({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Qu,n)})(a);return hi.jsx(nd,qe({className:Ci(s.root,r),ownerState:a,ref:t},i))}),od=Ri("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),id=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function ad(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ld(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function cd(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&ld(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const ud=o.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=ke(e,id),f=o.useRef(null),h=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Wi(()=>{r&&f.current.focus()},[r]),o.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${ga(Yi(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=na(f,t);let g=-1;o.Children.forEach(a,(e,t)=>{o.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))});const v=o.Children.map(a,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),o.cloneElement(e,t)}return e});return hi.jsx(zu,qe({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=f.current,n=e.key,r=Yi(t).activeElement;if("ArrowDown"===n)e.preventDefault(),cd(t,r,c,l,ad);else if("ArrowUp"===n)e.preventDefault(),cd(t,r,c,l,sd);else if("Home"===n)e.preventDefault(),cd(t,null,c,l,ad);else if("End"===n)e.preventDefault(),cd(t,null,c,l,sd);else if(1===n.length){const o=h.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&ld(r,o);o.previousKeyMatched&&(s||cd(t,r,!1,l,ad,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},p,{children:v}))});function dd(e){return Di("MuiPopover",e)}Ri("MuiPopover",["root","paper"]);const pd=["onEntering"],fd=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],hd=["slotProps"];function md(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function gd(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function vd(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function bd(e){return"function"==typeof e?e():e}const yd=Ms(ru,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xd=Ms(sl,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Sd=o.forwardRef(function(e,t){var n,r,i;const a=ks({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:m=8,marginThreshold:g=16,open:v,PaperProps:b={},slots:y,slotProps:x,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w=bu,transitionDuration:C="auto",TransitionProps:{onEntering:E}={},disableScrollLock:I=!1}=a,D=ke(a.TransitionProps,pd),R=ke(a,fd),L=null!=(n=null==x?void 0:x.paper)?n:b,M=o.useRef(),A=na(M,L.ref),P=qe({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:L,transformOrigin:S,TransitionComponent:w,transitionDuration:C,TransitionProps:D}),q=(e=>{const{classes:t}=e;return va({root:["root"],paper:["paper"]},dd,t)})(P),k=o.useCallback(()=>{if("anchorPosition"===d)return u;const e=bd(l),t=(e&&1===e.nodeType?e:Yi(M.current).body).getBoundingClientRect();return{top:t.top+md(t,c.vertical),left:t.left+gd(t,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),T=o.useCallback(e=>({vertical:md(e,S.vertical),horizontal:gd(e,S.horizontal)}),[S.horizontal,S.vertical]),O=o.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=T(t);if("none"===d)return{top:null,left:null,transformOrigin:vd(n)};const r=k();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=Ki(bd(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:vd(n)}},[l,d,k,T,g]),[N,_]=o.useState(v),j=o.useCallback(()=>{const e=M.current;if(!e)return;const t=O(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,_(!0)},[O]);o.useEffect(()=>(I&&window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)),[l,I,j]);o.useEffect(()=>{v&&j()}),o.useImperativeHandle(s,()=>v?{updatePosition:()=>{j()}}:null,[v,j]),o.useEffect(()=>{if(!v)return;const e=Ui(()=>{j()}),t=Ki(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[l,v,j]);let F=C;"auto"!==C||w.muiSupportAuto||(F=void 0);const z=h||(l?Yi(bd(l)).body:void 0),W=null!=(r=null==y?void 0:y.root)?r:yd,$=null!=(i=null==y?void 0:y.paper)?i:xd,V=wa({elementType:$,externalSlotProps:qe({},L,{style:N?L.style:qe({},L.style,{opacity:0})}),additionalProps:{elevation:m,ref:A},ownerState:P,className:Ci(q.paper,null==L?void 0:L.className)}),H=wa({elementType:W,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:R,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:z,open:v},ownerState:P,className:Ci(q.root,f)}),{slotProps:B}=H,G=ke(H,hd);return hi.jsx(W,qe({},G,!ba(W)&&{slotProps:B,disableScrollLock:I},{children:hi.jsx(w,qe({appear:!0,in:v,onEntering:(e,t)=>{E&&E(e,t),j()},onExited:()=>{_(!1)},timeout:F},D,{children:hi.jsx($,qe({},V,{children:p}))}))}))});function wd(e){return Di("MuiMenu",e)}Ri("MuiMenu",["root","paper","list"]);const Cd=["onEntering"],Ed=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Id={vertical:"top",horizontal:"right"},Dd={vertical:"top",horizontal:"left"},Rd=Ms(Sd,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ld=Ms(xd,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Md=Ms(ud,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Ad=o.forwardRef(function(e,t){var n,r;const i=ks({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:v="selectedMenu",slots:b={},slotProps:y={}}=i,x=ke(i.TransitionProps,Cd),S=ke(i,Ed),w=(()=>{const e=o.useContext(Ma);return null!=e&&e})(),C=qe({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:x,variant:v}),E=(e=>{const{classes:t}=e;return va({root:["root"],paper:["paper"],list:["list"]},wd,t)})(C),I=a&&!c&&p,D=o.useRef(null);let R=-1;o.Children.map(s,(e,t)=>{o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===v&&e.props.selected||-1===R)&&(R=t))});const L=null!=(n=b.paper)?n:Ld,M=null!=(r=y.paper)?r:f,A=wa({elementType:b.root,externalSlotProps:y.root,ownerState:C,className:[E.root,l]}),P=wa({elementType:L,externalSlotProps:M,ownerState:C,className:E.paper});return hi.jsx(Rd,qe({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?Id:Dd,slots:{paper:L,root:b.root},slotProps:{root:A,paper:P},open:p,ref:t,transitionDuration:m,TransitionProps:qe({onEntering:(e,t)=>{D.current&&D.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:C},S,{classes:h,children:hi.jsx(Md,qe({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:D,autoFocus:a&&(-1===R||c),autoFocusItem:I,variant:v},u,{className:Ci(E.list,u.className),children:s}))}))});function Pd(e){return Di("MuiMenuItem",e)}const qd=Ri("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),kd=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Td=Ms(Il,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>qe({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${qd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${qd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${qd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${qd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${qd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${iu.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${iu.inset}`]:{marginLeft:52},[`& .${od.root}`]:{marginTop:0,marginBottom:0},[`& .${od.inset}`]:{paddingLeft:36},[`& .${ed.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&qe({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${ed.root} svg`]:{fontSize:"1.25rem"}}))),Od=o.forwardRef(function(e,t){const n=ks({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=n,f=ke(n,kd),h=o.useContext(Nu),m=o.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),g=o.useRef(null);Wi(()=>{r&&g.current&&g.current.focus()},[r]);const v=qe({},n,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return qe({},a,va({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Pd,a))})(n),y=na(g,t);let x;return n.disabled||(x=void 0!==d?d:-1),hi.jsx(Nu.Provider,{value:m,children:hi.jsx(Td,qe({ref:y,role:u,tabIndex:x,component:i,focusVisibleClassName:Ci(b.focusVisible,c),className:Ci(b.root,p)},f,{ownerState:v,classes:b}))})});function Nd(e){return Di("MuiNativeSelect",e)}const _d=Ri("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jd=["className","disabled","error","IconComponent","inputRef","variant"],Fd=({ownerState:e,theme:t})=>qe({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":qe({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${_d.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),zd=Ms("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ls,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${_d.multiple}`]:t.multiple}]}})(Fd),Wd=({ownerState:e,theme:t})=>qe({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${_d.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),$d=Ms("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${lo(n.variant)}`],n.open&&t.iconOpen]}})(Wd),Vd=o.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=e,c=ke(e,jd),u=qe({},e,{disabled:r,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return va({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${lo(n)}`,i&&"iconOpen",r&&"disabled"]},Nd,t)})(u);return hi.jsxs(o.Fragment,{children:[hi.jsx(zd,qe({ownerState:u,className:Ci(d.select,n),disabled:r,ref:s||t},c)),e.multiple?null:hi.jsx($d,{as:a,ownerState:u,className:d.icon})]})});var Hd;const Bd=["children","classes","className","label","notched"],Gd=Ms("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Ls})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Ud=Ms("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Ls})(({ownerState:e,theme:t})=>qe({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&qe({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));const Yd=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Kd=Ms(Kl,{shouldForwardProp:e=>Ls(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ul})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return qe({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${nc.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${nc.focused} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${nc.error} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${nc.disabled} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&qe({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),Xd=Ms(function(e){const{className:t,label:n,notched:r}=e,o=ke(e,Bd),i=null!=n&&""!==n,a=qe({},e,{notched:r,withLabel:i});return hi.jsx(Gd,qe({"aria-hidden":!0,className:t,ownerState:a},o,{children:hi.jsx(Ud,{ownerState:a,children:i?hi.jsx("span",{children:n}):Hd||(Hd=hi.jsx("span",{className:"notranslate",children:"​"}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Jd=Ms(Xl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>qe({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),Zd=o.forwardRef(function(e,t){var n,r,i,a,s;const l=ks({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:f=!1,notched:h,slots:m={},type:g="text"}=l,v=ke(l,Yd),b=(e=>{const{classes:t}=e;return qe({},t,va({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tc,t))})(l),y=zl(),x=jl({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=qe({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:u,hiddenLabel:x.hiddenLabel,multiline:f,size:x.size,type:g}),w=null!=(n=null!=(r=m.root)?r:c.Root)?n:Kd,C=null!=(i=null!=(a=m.input)?a:c.Input)?i:Jd;return hi.jsx(Zl,qe({slots:{root:w,input:C},renderSuffix:e=>hi.jsx(Xd,{ownerState:S,className:b.notchedOutline,label:null!=p&&""!==p&&x.required?s||(s=hi.jsxs(o.Fragment,{children:[p," ","*"]})):p,notched:void 0!==h?h:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:t,type:g},v,{classes:qe({},b,{notchedOutline:null})}))});function Qd(e){return Di("MuiSelect",e)}Zd.muiName="Input";const ep=Ri("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var tp;const np=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],rp=Ms("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ep.select}`]:t.select},{[`&.${ep.select}`]:t[n.variant]},{[`&.${ep.error}`]:t.error},{[`&.${ep.multiple}`]:t.multiple}]}})(Fd,{[`&.${ep.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),op=Ms("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${lo(n.variant)}`],n.open&&t.iconOpen]}})(Wd),ip=Ms("input",{shouldForwardProp:e=>Rs(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ap(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function sp(e){return null==e||"string"==typeof e&&!e.trim()}const lp=o.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:f,error:h=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:b={},multiple:y,name:x,onBlur:S,onChange:w,onClose:C,onFocus:E,onOpen:I,open:D,readOnly:R,renderValue:L,SelectDisplayProps:M={},tabIndex:A,value:P,variant:q="standard"}=e,k=ke(e,np),[T,O]=ea({controlled:P,default:d,name:"Select"}),[N,_]=ea({controlled:D,default:u,name:"Select"}),j=o.useRef(null),F=o.useRef(null),[z,W]=o.useState(null),{current:$}=o.useRef(null!=D),[V,H]=o.useState(),B=na(t,g),G=o.useCallback(e=>{F.current=e,e&&W(e)},[]),U=null==z?void 0:z.parentNode;o.useImperativeHandle(B,()=>({focus:()=>{F.current.focus()},node:j.current,value:T}),[T]),o.useEffect(()=>{u&&N&&z&&!$&&(H(s?null:U.clientWidth),F.current.focus())},[z,s]),o.useEffect(()=>{a&&F.current.focus()},[a]),o.useEffect(()=>{if(!v)return;const e=Yi(F.current).getElementById(v);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[v]);const Y=(e,t)=>{e?I&&I(t):C&&C(t),$||(H(s?null:U.clientWidth),_(e))},K=o.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(T)?T.slice():[];const t=T.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),T!==n&&(O(n),w)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:x}}),w(o,e)}y||Y(!1,t)}},J=null!==z&&N;let Z,Q;delete k["aria-invalid"];const ee=[];let te=!1;(Vl({value:T})||f)&&(L?Z=L(T):te=!0);const ne=K.map(e=>{if(!o.isValidElement(e))return null;let t;if(y){if(!Array.isArray(T))throw new Error(Me(2));t=T.some(t=>ap(t,e.props.value)),t&&te&&ee.push(e.props.children)}else t=ap(T,e.props.value),t&&te&&(Q=e.props.children);return o.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});te&&(Z=y?0===ee.length?null:ee.reduce((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e),[]):Q);let re,oe=V;!s&&$&&z&&(oe=U.clientWidth),re=void 0!==A?A:p?null:0;const ie=M.id||(x?`mui-component-select-${x}`:void 0),ae=qe({},e,{variant:q,value:T,open:J,error:h}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return va({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${lo(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Qd,t)})(ae),le=qe({},b.PaperProps,null==(n=b.slotProps)?void 0:n.paper),ce=Qi();return hi.jsxs(o.Fragment,{children:[hi.jsx(rp,qe({ref:G,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,ie].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!R){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:p||R?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),Y(!0,e))},onBlur:e=>{!J&&S&&(Object.defineProperty(e,"target",{writable:!0,value:{value:T,name:x}}),S(e))},onFocus:E},M,{ownerState:ae,className:Ci(M.className,se.select,c),id:ie,children:sp(Z)?tp||(tp=hi.jsx("span",{className:"notranslate",children:"​"})):Z})),hi.jsx(ip,qe({"aria-invalid":h,value:Array.isArray(T)?T.join(","):T,name:x,ref:j,"aria-hidden":!0,onChange:e=>{const t=K.find(t=>t.props.value===e.target.value);void 0!==t&&(O(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:p,className:se.nativeInput,autoFocus:a,ownerState:ae},k)),hi.jsx(op,{as:m,className:se.icon,ownerState:ae}),hi.jsx(Ad,qe({id:`menu-${x||""}`,anchorEl:U,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:qe({"aria-labelledby":v,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ce},b.MenuListProps),slotProps:qe({},b.slotProps,{paper:qe({},le,{style:qe({minWidth:oe},null!=le?le.style:null)})}),children:ne}))]})}),cp=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],up=["root"],dp={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ls(e)&&"variant"!==e,slot:"Root"},pp=Ms(wu,dp)(""),fp=Ms(Zd,dp)(""),hp=Ms(fu,dp)(""),mp=o.forwardRef(function(e,t){const n=ks({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=ic,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:b=!1,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:C,variant:E="outlined"}=n,I=ke(n,cp),D=b?Vd:lp,R=jl({props:n,muiFormControl:zl(),states:["variant","error"]}),L=R.variant||E,M=qe({},n,{variant:L,classes:a}),A=(e=>{const{classes:t}=e;return t})(M),P=ke(A,up),q=p||{standard:hi.jsx(pp,{ownerState:M}),outlined:hi.jsx(fp,{label:h,ownerState:M}),filled:hi.jsx(hp,{ownerState:M})}[L],k=na(t,Ca(q));return hi.jsx(o.Fragment,{children:o.cloneElement(q,qe({inputComponent:D,inputProps:qe({children:i,error:R.error,IconComponent:u,variant:L,type:void 0,multiple:v},b?{id:d}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:g,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:qe({id:d},C)},f,{classes:f?Zr(P,f.classes):P},p?p.props.inputProps:{})},(v&&b||c)&&"outlined"===L?{notched:!0}:{},{ref:k,className:Ci(q.props.className,s,A.root)},!p&&{variant:L},I))})});mp.muiName="Select";const gp={GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF"},vp={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",...gp,GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},bp=12,yp=14,xp=16,Sp=24,wp=3,Cp=300,Ep=400,Ip=600,Dp=700,Rp={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};function Lp(e){return hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function Mp({fontSize:e="medium",children:t=null,className:n=""}={}){return hi.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function Ap(e={}){return hi.jsx(Mp,{...e,children:hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[hi.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),hi.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function Pp(e={}){return hi.jsx(Mp,{fontSize:"medium",...e,children:hi.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[hi.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),hi.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function qp(e){return hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:hi.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function kp(e={}){return hi.jsx(Mp,{...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[hi.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),hi.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function Tp(e={}){return hi.jsx(Mp,{fontSize:"medium",...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:hi.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function Op({className:e}){return hi.jsx(Mp,{fontSize:"small",className:e,children:hi.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:hi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:hi.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:hi.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[hi.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),hi.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function Np(e={}){return hi.jsx(Mp,{...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:hi.jsx("rect",{stroke:vp.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}var _p=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:vp.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:vp.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:hi.jsx(Lp,{"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 ${vp.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,borderRadius:wp,backgroundColor:vp.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 ${vp.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:vp.WHITE,color:vp.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:wp},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:vp.GREYSCALE_0_15,backgroundColor:vp.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:vp.GREEN_PALE},"&:active":{backgroundColor:vp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:vp.BLUE_PALE},"&:active":{backgroundColor:vp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.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:wp,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:vp.GREYSCALE_0_42,backgroundColor:vp.GREYSCALE_100_60,"&:active":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:vp.PURPLE,"&.Mui-focusVisible":{borderColor:vp.PURPLE,boxShadow:`0 0 0 3px ${Bi(vp.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:vp.GREEN,"&.Mui-focusVisible":{borderColor:vp.GREEN,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:vp.BLUE,"&.Mui-focusVisible":{borderColor:vp.BLUE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:vp.ORANGE,"&.Mui-focusVisible":{borderColor:vp.ORANGE,boxShadow:`0 0 0 3px ${Bi(vp.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:vp.RED,"&.Mui-focusVisible":{borderColor:vp.RED,boxShadow:`0 0 0 3px ${Bi(vp.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:vp.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:vp.PURPLE_PALE},"&:active":{backgroundColor:vp.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:vp.PURPLE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:vp.GREEN_PALE},"&:active":{backgroundColor:vp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:vp.BLUE_PALE},"&:active":{backgroundColor:vp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:vp.ORANGE_PALE},"&:active":{backgroundColor:vp.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:vp.ORANGE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:vp.RED_PALE},"&:active":{backgroundColor:vp.RED_DARK},"&.Mui-focusVisible":{borderColor:vp.RED_PALE,boxShadow:`0 0 0 3px ${Bi(vp.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:vp.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:vp.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:wp,boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:hi.jsx(qp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:bp,borderRadius:wp,color:vp.TEXT_PRIMARY,backgroundColor:vp.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:vp.GREYSCALE_0_05,color:vp.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:vp.GREEN,borderColor:vp.GREEN},"&.MuiChip-outlinedInfo":{color:vp.BLUE,borderColor:vp.BLUE},"&.MuiChip-outlinedWarning":{color:vp.ORANGE,borderColor:vp.ORANGE},"&.MuiChip-outlinedError":{color:vp.RED,borderColor:vp.RED}},outlined:{border:`solid 1px ${vp.GREYSCALE_0_15}`,backgroundColor:vp.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:wp,boxShadow:"none",backgroundColor:vp.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:vp.GREEN,borderColor:vp.GREEN},outlinedSecondary:{color:vp.BLUE,borderColor:vp.BLUE},label:{fontFamily:Rp.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:hi.jsx(qp,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:hi.jsx(Lp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:wp},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:wp,fontSize:yp,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:vp.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${vp.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:vp.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:vp.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_05}}},popupIndicator:{borderRadius:wp,border:`solid 1px ${vp.GREYSCALE_0_15}`,color:vp.GREYSCALE_0_60,marginRight:0,width:Sp,height:Sp},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${vp.GREYSCALE_0_15}`},clearIndicator:{borderRadius:wp,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:vp.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:yp}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:bp,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:vp.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:vp.GREYSCALE_25,fontSize:bp,fontFamily:Rp.FONT_FAMILY,fontWeight:Ip,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:vp.TEXT_PRIMARY},"&.Mui-error":{color:vp.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:vp.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Ep,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:vp.TEXT_SECONDARY,content:"'(required)'",fontWeight:Ep,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:yp,lineHeight:"16px",backgroundColor:vp.WHITE,borderRadius:wp,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.GREYSCALE_0_05}`,borderColor:vp.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.RED}`,boxShadow:`0px 0px 0px 1px ${vp.RED}, inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.GREYSCALE_0_10}`,borderColor:vp.GREYSCALE_0_10,backgroundColor:vp.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:vp.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:vp.GREYSCALE_0_15,borderRadius:wp,boxShadow:`inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>hi.jsx(Lp,{...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:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:vp.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:vp.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&:active":{backgroundColor:vp.GREYSCALE_0_10},"&:focus":{backgroundColor:vp.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${vp.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:vp.GREYSCALE_0_30,"&:hover":{backgroundColor:vp.GREYSCALE_0_0,borderColor:vp.GREYSCALE_0_15},"& ~svg":{color:vp.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${vp.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:wp}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:vp.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:yp,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:bp,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:bp,fontWeight:Ip,color:vp.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Ip}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${vp.GREYSCALE_0_15}, 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:hi.jsx(Tp,{}),checkedIcon:hi.jsx(Pp,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:vp.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:vp.GREYSCALE_0_20}},"&.Mui-disabled":{fill:vp.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:hi.jsx(Np,{}),checkedIcon:hi.jsx(Ap,{}),indeterminateIcon:hi.jsx(kp,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:wp,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:vp.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:vp.GREYSCALE_0_55,color:vp.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:vp.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:vp.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:vp.GREYSCALE_0_55,"&:hover":{color:vp.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:vp.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:vp.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:yp,color:vp.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Ip},secondary:{fontSize:bp,color:vp.GREYSCALE_45,fontWeight:Ep,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:yp,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:yp,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:vp.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:bp,borderBottom:`solid 1px ${vp.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:yp,color:vp.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:vp.RED}}},"&.Mui-focusVisible":{backgroundColor:vp.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:vp.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:vp.GREEN,height:"24px","&.Mui-disabled":{color:vp.GREYSCALE_0_15}},rail:{backgroundColor:vp.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${vp.GREYSCALE_0_05}`,borderRadius:wp,boxShadow:`inset 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${vp.GREYSCALE_0_05}`,borderRadius:wp},thumb:{height:"16px",width:"16px",borderRadius:wp,backgroundColor:vp.WHITE,boxShadow:`0px 1px 2px 0px ${vp.GREYSCALE_0_15}, 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`,"&:hover":{borderRadius:wp,boxShadow:`0 2px 4px 0 ${vp.GREYSCALE_0_30}, 0 0 0 1px ${vp.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${vp.GREYSCALE_0_15}, 0 0 0 1px ${vp.GREYSCALE_0_06}, 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${vp.GREYSCALE_0_15}, 0 0 0 1px ${vp.GREYSCALE_0_06}, 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:vp.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:vp.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:vp.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:vp.GREYSCALE_0_15},markLabel:{color:vp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:vp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:vp.WHITE,color:vp.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:vp.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:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:vp.GREYSCALE_0_15,borderRadius:wp},thumb:{height:"16px",width:"16px",borderRadius:wp,backgroundColor:vp.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:yp,fontWeight:Ip,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${vp.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,backgroundColor:vp.GREYSCALE_0_03,borderRadius:wp},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:vp.GREYSCALE_25,"&.Mui-selected":{color:vp.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:yp,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:wp,"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${vp.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${vp.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:wp,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:vp.GREYSCALE_0_05},"&:hover":{backgroundColor:vp.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${vp.GREYSCALE_85}`,borderRight:`1px solid ${vp.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Ip,backgroundColor:vp.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:vp.GREYSCALE_98,borderBottom:`1px solid ${vp.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${vp.GREYSCALE_85}`,borderTop:`1px solid ${vp.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:vp.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:vp.GREYSCALE_0_05,"&:hover":{backgroundColor:vp.GREYSCALE_0_03}},"&&:hover":{backgroundColor:vp.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>hi.jsx(Op,{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 ${vp.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:yp,borderRadius:wp,padding:"7px 16px",border:`1px solid ${vp.GREYSCALE_0_15}`,backgroundColor:vp.GREYSCALE_100_60,color:vp.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:vp.GREYSCALE_0_10,border:`1px solid ${vp.GREYSCALE_0_30}`},"&:hover":{backgroundColor:vp.GREYSCALE_0_03,border:`1px solid ${vp.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:vp.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`,border:`1px solid ${vp.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:vp.GREYSCALE_25,backgroundColor:vp.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:vp.GREYSCALE_0_10,border:`1px solid ${vp.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:bp,height:24,width:24,padding:7},sizeLarge:{fontSize:xp,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:yp,borderRadius:wp}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:vp.GREYSCALE_20},tooltip:{backgroundColor:vp.GREYSCALE_20,fontSize:bp,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}});const jp=e=>({mode:"light",primary:{ultraLight:vp.GREEN_ULTRA_LIGHT,light:vp.GREEN_PALE,main:vp.GREEN,dark:vp.GREEN_DARK,extraDark:vp.GREEN_EXTRA_DARK,contrastText:vp.WHITE},secondary:{ultraLight:vp.BLUE_ULTRA_LIGHT,light:vp.BLUE_PALE,main:vp.BLUE,dark:vp.BLUE_DARK,extraDark:vp.BLUE_EXTRA_DARK,contrastText:vp.WHITE},error:{ultraLight:vp.RED_ULTRA_LIGHT,light:vp.RED_PALE,main:vp.RED,dark:vp.RED_DARK,extraDark:vp.RED_EXTRA_DARK,contrastText:vp.WHITE},warning:{ultraLight:vp.ORANGE_ULTRA_LIGHT,light:vp.ORANGE_PALE,main:vp.ORANGE,dark:vp.ORANGE_DARK,extraDark:vp.ORANGE_EXTRA_DARK,contrastText:vp.WHITE},success:{ultraLight:vp.GREEN_ULTRA_LIGHT,light:vp.GREEN_PALE,main:vp.GREEN,dark:vp.GREEN_DARK,extraDark:vp.GREEN_EXTRA_DARK,contrastText:vp.WHITE},info:{ultraLight:vp.BLUE_ULTRA_LIGHT,light:vp.BLUE_PALE,main:vp.BLUE,dark:vp.BLUE_DARK,extraDark:vp.BLUE_EXTRA_DARK,contrastText:vp.WHITE},text:{primary:vp.TEXT_PRIMARY,secondary:vp.TEXT_SECONDARY,disabled:vp.GREYSCALE_0_30},action:{hover:vp.GREYSCALE_0_03,hoverOpacity:.03,selected:vp.GREYSCALE_0_05,selectedOpacity:.05,focus:vp.MISC_FOCUS_BORDER},amethyst:{ultraLight:vp.WHITE,main:vp.PURPLE,light:vp.PURPLE_PALE,dark:vp.PURPLE_DARK,extraDark:vp.GREYSCALE_0_0,contrastText:vp.WHITE},background:{paper:vp.WHITE,default:vp.GREYSCALE_95},divider:vp.GREYSCALE_0_15}),Fp=(e="light")=>ds({components:_p(),palette:jp(),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:yp,fontWeightLight:Cp,fontWeightRegular:Ep,fontWeightMedium:Ip,fontWeightBold:Dp,htmlFontSize:yp,fontFamily:Rp.FONT_FAMILY,button:{fontWeight:Ip,fontSize:yp,textTransform:"none"},body1:{fontSize:xp,lineHeight:"24px"},body2:{fontSize:yp,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:Sp,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:xp,fontWeight:Ip,lineHeight:"16px"},h6:{fontSize:yp,fontWeight:Ip,lineHeight:"16px"},caption:{color:vp.TEXT_SECONDARY},subtitle1:{fontSize:yp,color:vp.TEXT_SECONDARY},subtitle2:{fontSize:bp,color:vp.TEXT_SECONDARY}},shape:{borderRadius:wp}});function zp(e){return"init"in e}function Wp(e){return"function"==typeof e.write}function $p(e){return"v"in e||"e"in e}function Vp(e){if("e"in e)throw e.e;if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function Hp(e){return"function"==typeof(null==e?void 0:e.then)}function Bp(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function Gp(e,t,n){const r=n.get(e),o=null==r?void 0:r.t,i=t.p;if(!(null==o?void 0:o.size))return i;if(!i.size)return o;const a=new Set(o);for(const e of i)a.add(e);return a}const Up=()=>{const e={},t=new WeakMap,n=n=>{var r,o;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(o=t.get(n))||o.forEach(e=>e())};return n.add=(n,r)=>{const o=n||e;let i=t.get(o);return i||(i=new Set,t.set(o,i)),i.add(r),()=>{i.delete(r),i.size||t.delete(o)}},n};function Yp(e){return e.i||(e.i=Up()),e.r||(e.r=Up()),e.c||(e.c=Up()),e.m||(e.m=Up()),e.u||(e.u=Up()),e.f||(e.f=(()=>{const e=new Set,t=()=>e.forEach(e=>e());return t.add=t=>(e.add(t),()=>e.delete(t)),t})()),e}const Kp=(e,t,n,...r)=>n.read(...r),Xp=(e,t,n,...r)=>n.write(...r),Jp=(e,t,n)=>n.INTERNAL_onInit(t),Zp=(e,t,n,r)=>{var o;return null==(o=n.onMount)?void 0:o.call(n,r)},Qp=(e,t,n)=>{var r;const o=e[0];let i=o.get(n);if(!i){const a=e[6],s=e[9];i={d:new Map,p:new Set,n:0},o.set(n,i),null==(r=a.i)||r.call(a,n),function(e){return!!e.INTERNAL_onInit}(n)&&s(e,t,n)}return i},ef=(e,t)=>{var n;const r=e[1],o=e[3],i=e[4],a=e[5],s=e[6],l=e[13];if(!(s.f||o.size||i.size||a.size))return;const c=[],u=e=>{try{e()}catch(e){c.push(e)}};do{s.f&&u(s.f);const c=new Set;for(const e of o){const t=null==(n=r.get(e))?void 0:n.l;if(t)for(const e of t)c.add(e)}o.clear();for(const e of a)c.add(e);a.clear();for(const e of i)c.add(e);i.clear();for(const e of c)u(e);o.size&&l(e,t)}while(o.size||a.size||i.size);if(c.length)throw new AggregateError(c)},tf=(e,n)=>{const r=e[1],o=e[2],i=e[3],a=e[11],s=e[14],l=e[17];if(!i.size)return;const c=[],u=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of i)f.push(t),h.push(a(e,n,t));for(;f.length;){const i=f.length-1,s=f[i],l=h[i];if(p.has(s))f.pop(),h.pop();else if(d.has(s)){if(o.get(s)===l.n)c.push(s),u.push(l);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&o.has(s))throw new Error("[Bug] invalidated atom exists");p.add(s),f.pop(),h.pop()}else{d.add(s);for(const t of Gp(s,l,r))d.has(t)||(f.push(t),h.push(a(e,n,t)))}}for(let t=c.length-1;t>=0;--t){const r=c[t],a=u[t];let d=!1;for(const e of a.d.keys())if(e!==r&&i.has(e)){d=!0;break}d&&(o.set(r,a.n),s(e,n,r),l(e,n,r)),o.delete(r)}},nf=new WeakSet,rf=(e,n,r)=>{var o,i;const a=e[1],s=e[2],l=e[3],c=e[6],u=e[7],d=e[11],p=e[12],f=e[13],h=e[14],m=e[16],g=e[17],v=e[20],b=e[26],y=e[28],x=d(e,n,r),S=y[0];if($p(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,o]of x.d)if(h(e,n,r).n!==o){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(r)){const t=!l.size;g(e,n,r),t&&(f(e,n),p(e,n))}},D=t=>{var o;if(t===r){const r=d(e,n,t);if(!$p(r)){if(!zp(t))throw new Error("no atom init");v(e,n,t,t.init)}return Vp(r)}const i=h(e,n,t);try{return Vp(i)}finally{C.delete(t),x.d.set(t,i.n),Hp(x.v)&&Bp(r,x.v,i),a.has(r)&&(null==(o=a.get(t))||o.t.add(r)),w||I()}};let R,L;const M={get signal(){return R||(R=new AbortController),R.signal},get setSelf(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),"production"===(t.meta.env?t.meta.env.MODE:void 0)||Wp(r)||console.warn("setSelf function cannot be used with read-only atom"),!L&&Wp(r)&&(L=(...o)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,r,o)}finally{f(e,n),p(e,n)}}),L}},A=x.n,P=s.get(r)===A;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.delete(n);const i=u(e,n,r,D,M);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.has(n)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,r,i),Hp(i)){b(e,n,i,()=>null==R?void 0:R.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(o=c.r)||o.call(c,r),x.m=S,x}catch(e){if(function(e){if(!(e instanceof Error))return!1;const t=e.name,n=e.message.toLowerCase();return("RangeError"===t||"InternalError"===t)&&(n.includes("call stack")||n.includes("too much recursion")||n.includes("stack overflow"))}(e))throw e;return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==A&&P&&(s.set(r,x.n),l.add(r),null==(i=c.c)||i.call(c,r))}},of=(e,t,n)=>{const r=e[1],o=e[2],i=e[11],a=[n];for(;a.length;){const n=a.pop(),s=i(e,t,n);for(const l of Gp(n,s,r)){const n=i(e,t,l);o.get(l)!==n.n&&(o.set(l,n.n),a.push(l))}}},af=(e,n,r,o)=>{const i=e[3],a=e[6],s=e[8],l=e[11],c=e[12],u=e[13],d=e[14],p=e[15],f=e[16],h=e[17],m=e[20],g=e[28];let v=!0;const b=t=>Vp(d(e,n,t)),y=(o,...s)=>{var d;const b=l(e,n,o);try{if(o===r){if(!zp(o))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.add(n);const r=b.n,l=s[0];return m(e,n,o,l),h(e,n,o),void(r!==b.n&&(++g[0],i.add(o),p(e,n,o),null==(d=a.c)||d.call(a,o)))}return f(e,n,o,s)}finally{v||(u(e,n),c(e,n))}};try{return s(e,n,r,b,y,...o)}finally{v=!1}},sf=(e,t,n)=>{var r;const o=e[1],i=e[3],a=e[6],s=e[11],l=e[15],c=e[18],u=e[19],d=s(e,t,n),p=o.get(n);if(p&&d.d.size>0){for(const[o,u]of d.d)if(!p.d.has(o)){const d=s(e,t,o);c(e,t,o).t.add(n),p.d.add(o),u!==d.n&&(i.add(o),l(e,t,o),null==(r=a.c)||r.call(a,o))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const o=u(e,t,r);null==o||o.t.delete(n)}}},lf=(e,t,n)=>{var r;const o=e[1],i=e[4],a=e[6],s=e[10],l=e[11],c=e[12],u=e[13],d=e[14],p=e[16],f=e[18],h=l(e,t,n);let m=o.get(n);if(!m){d(e,t,n);for(const r of h.d.keys()){f(e,t,r).t.add(n)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},o.set(n,m),Wp(n)&&function(e){return!!e.onMount}(n)){const r=()=>{let r=!0;const o=(...o)=>{try{return p(e,t,n,o)}finally{r||(u(e,t),c(e,t))}};try{const i=s(e,t,n,o);i&&(m.u=()=>{r=!0;try{i()}finally{r=!1}})}finally{r=!1}};i.add(r)}null==(r=a.m)||r.call(a,n)}return m},cf=(e,t,n)=>{var r,o;const i=e[1],a=e[5],s=e[6],l=e[11],c=e[19],u=l(e,t,n);let d=i.get(n);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(r=i.get(e))?void 0:r.d.has(n)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,i.delete(n);for(const r of u.d.keys()){const o=c(e,t,r);null==o||o.t.delete(n)}null==(o=s.u)||o.call(s,n)},uf=(e,t,n,r)=>{const o=e[11],i=e[27],a=o(e,t,n),s="v"in a,l=a.v;if(Hp(r))for(const i of a.d.keys())Bp(n,r,o(e,t,i));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,Hp(l)&&i(e,t,l))},df=(e,t,n)=>Vp((0,e[14])(e,t,n)),pf=(e,t,n,...r)=>{const o=e[3],i=e[12],a=e[13],s=e[16],l=o.size;try{return s(e,t,n,r)}finally{o.size!==l&&(a(e,t),i(e,t))}},ff=(e,t,n,r)=>{const o=e[12],i=e[18],a=e[19],s=i(e,t,n).l;return s.add(r),o(e,t),()=>{s.delete(r),a(e,t,n),o(e,t)}},hf=(e,t,n,r)=>{const o=e[25];let i=o.get(n);if(!i){i=new Set,o.set(n,i);const e=()=>o.delete(n);n.then(e,e)}i.add(r)},mf=(e,t,n)=>{const r=e[25].get(n);null==r||r.forEach(e=>e())},gf=new WeakMap;function vf(e){const n=gf.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");const r=n[24];return r?r(n,e):n}function bf(...e){const t={get:e=>r(n,t,e),set:(e,...r)=>o(n,t,e,...r),sub:(e,r)=>i(n,t,e,r)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Kp,Xp,Jp,Zp,Qp,ef,tf,rf,of,af,sf,lf,cf,uf,df,pf,ff,void 0,new WeakMap,hf,mf,[0]].map((t,n)=>e[n]||t);gf.set(t,Object.freeze(n));const r=n[21],o=n[22],i=n[23];return t}let yf,xf=0;function Sf(e,n){const r="atom"+ ++xf,o={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?o.read=e:(o.init=e,o.read=wf,o.write=Cf),n&&(o.write=n),o}function wf(e){return e(this)}function Cf(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Ef(){return bf()}const If=c(void 0);function Df(e){const n=h(If);return(null==e?void 0:e.store)||n||(yf||(yf=Ef(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=yf),globalThis.__JOTAI_DEFAULT_STORE__!==yf&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),yf)}function Rf({children:e,store:t}){const n=l(null);return t?r(If.Provider,{value:t},e):(null===n.current&&(n.current=Ef()),r(If.Provider,{value:n.current},e))}const Lf=e=>"function"==typeof(null==e?void 0:e.then),Mf=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Af=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Mf(e),e)}),Pf=new WeakMap,qf=(e,t,n)=>{const r=vf(e),o=r[26];let i=Pf.get(t);return i||(i=new Promise((a,s)=>{let l=t;const c=e=>t=>{l===e&&a(t)},u=e=>t=>{l===e&&s(t)},d=()=>{try{const t=n();Lf(t)?(Pf.set(t,i),l=t,t.then(c(t),u(t)),o(r,e,t,d)):a(t)}catch(e){s(e)}};t.then(c(t),u(t)),o(r,e,t,d)}),Pf.set(t,i)),i};function kf(e,t){const{delay:r,unstable_promiseStatus:o=!n.use}={},i=Df(t),[[a,s,l],c]=u(t=>{const n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]);let f=a;if(s===i&&l===e||(c(),f=i.get(e)),d(()=>{const t=i.sub(e,()=>{if(o)try{const t=i.get(e);Lf(t)&&Mf(qf(i,t,()=>i.get(e)))}catch(e){}if("number"==typeof r)return console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n atom: Atom<Value>,\n options: { delay: number },\n): Value {\n const { delay } = options\n const store = useStore(options)\n const [value, setValue] = useState(() => store.get(atom))\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n setTimeout(() => setValue(store.get(atom)), delay)\n })\n return unsub\n }, [store, atom, delay])\n return value\n}\n"),void setTimeout(c,r);c()});return c(),t},[i,e,r,o]),p(f),Lf(f)){const t=qf(i,f,()=>i.get(e));return o&&Mf(t),Af(t)}return f}function Tf(e,n){const r=Df(n);return f((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function Of(e,t){return[kf(e,t),Tf(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let o,i;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}o=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let o;try{o=JSON.parse(e||"",null==n?void 0:n.reviver)}catch(e){o=r}t(o)})))}();const Nf=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),_f=new WeakMap,jf=()=>{};const Ff=new WeakMap;function zf(e,t){const n=Df(t),r=Wf(n);for(const[o,...i]of e)r.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(o),n.set(o,...i))}const Wf=e=>{let t=Ff.get(e);return t||(t=new WeakSet,Ff.set(e,t)),t};function $f(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Vf(e){const t=Sf(()=>[]),n=Sf(function(e){const[r,o,i]=e(t);i.has(n)&&(r.forEach(e),++o.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=vf(e),o=r[1],i=r[3],a=Yp(r[6]),s=r[11],l=r[12],c=r[13],u=r[14],d=r[15],p=r[16],f=r[17],h=r[20],m=new Set;let g,v=0,b=!1,y=!1,x=!1;function S(){if(v)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===n){const t=s(r,e,i);if(!$p(t)){if(!zp(i))throw new Error("no atom init");h(r,e,i,i.init)}return Vp(t)}const a=u(r,e,i);try{return Vp(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(n),t?m.add(i):o.has(i)&&(f(r,e,n),c(r,e),l(r,e))}};w.peek=e.get;const E=(o,...u)=>{const m=s(r,e,o);try{if(++v,o===n){if(!zp(o))throw new Error("atom not writable");const t=m.n,n=u[0];return h(r,e,o,n),f(r,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(r,e,o)))}return p(r,e,o,u)}finally{t||(c(r,e),l(r,e)),--v}};E.recurse=(t,...o)=>{if(x){if($f())throw new Error("set.recurse is not allowed in cleanup")}else try{return b=!0,f(r,e,n),E(t,...o)}finally{c(r,e),b=!1,y&&(y=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!v)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),c(r,e)}}const w=function(e,t){let n=Hf.get(e);n||(n=new Set,Hf.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(n,function(){i.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){b?y=!0:w.add(S)})},$f()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const Hf=new WeakMap;const Bf=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionToAlternative(n):await t.moveMeasureToAlternative(n))},Gf=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionFromAlternative(n):await t.moveMeasureFromAlternative(n))},Uf=e=>{const{type:t,handler:n,model:r,fieldTypeById:o,handlerQueue:i}=e;void 0!==n&&void 0!==r&&i&&i.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Gf(o,n,t);for(const t of e.localUnchecked)await Bf(o,n,t);break;case"checked":await Gf(o,n,e.cId);break;case"unchecked":await Bf(o,n,e.cId)}})},Yf=Sf(),Kf=Sf(),Xf=Sf(),Jf=Sf(e=>e(Xf)?.logInfo??(()=>{})),Zf=Sf(e=>e(Xf)?.translate??(e=>e)),Qf=Sf(""),eh=Sf(e=>{const t=e(Qf).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),th=Sf(e=>e(Xf)?.getBooleanFlag??(()=>!1)),nh=e=>7005!==e.qError?.qErrorCode,rh=e=>"string"==typeof e,oh=e=>"number"==typeof e,ih=e=>"boolean"==typeof e,ah=e=>e instanceof Set,sh=e=>e instanceof Map,lh=e=>{if(e instanceof Error)return e.message;if(null===e)return"null";if(void 0===e)return"undefined";if(rh(e))return e;if(ah(e))try{return JSON.stringify([...e])}catch{return"Failed to serialize Set"}if(sh(e))try{return JSON.stringify(Object.fromEntries(e))}catch{return"Failed to serialize Map"}try{return JSON.stringify(e)}catch{return"Failed to serialize value"}},ch=e=>{if(null!=e){if(rh(e))return e;if(e instanceof Error)return lh(e);if(oh(e)||ih(e))return String(e);if(Array.isArray(e)||ah(e)||sh(e))return lh(e);if((e=>"object"==typeof e&&null!==e&&!Array.isArray(e))(e)){const t={};return Object.entries(e).forEach(([e,n])=>{rh(n)||oh(n)||ih(n)?t[e]=n:t[e]=lh(n)}),t}return lh(e)}},uh=(e,t={})=>{const{tag:n}=t,r=({msg:t,payload:r})=>{const o=((e,t)=>{const n=[];return rh(t)&&t.length>0?n.push(t):Array.isArray(t)&&n.push(...t.filter(e=>"string"==typeof e&&e.length>0)),n.length>0?`${n.map(e=>`[${e}]`).join("")} ${e}`:e})(t,n);return e.anything?.logInfo?.(o,ch(r)),o};return{warn:({msg:e,payload:t})=>{r({msg:e,payload:t})},error:({msg:e,payload:t})=>{r({msg:e,payload:t})}}},dh=new WeakMap,ph={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},fh=function(e,n=jf){return((e,t,n)=>{const r=Nf(()=>new WeakMap,_f,t);return Nf(e,r,n)})(()=>{const r=new WeakMap,o=new WeakMap,i=Sf(0),a=Sf([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(i.debugPrivate=!0,a.debugPrivate=!0);const s=Sf(t=>{let l;t(i);try{l=t(s)}catch(e){}const c=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(c))return{v:c};if(c!==(null==l?void 0:l.p)&&c.then(e=>{o.set(c,e);const[n]=t(a);n()},e=>{r.set(c,e);const[n]=t(a);n()}),r.has(c))throw r.get(c);return o.has(c)?{p:c,v:o.get(c)}:l&&"v"in l?{p:c,f:n(l.v),v:l.v}:{p:c,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),Sf(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(Sf(async e=>{const t=e(Yf),n=e(Jf),r=uh({anything:{logInfo:n}},{tag:"sn-pivot-table"});if(t){if(dh.has(t))return dh.get(t);try{const e=await t.app.createSessionObject(ph);return dh.set(t,e),e}catch(e){return void r.error({msg:"Error creating alternative layout model",payload:e})}}})),hh=Sf(null),mh=Sf(),gh=Vf((e,t)=>{const n=e(Yf),r=e(fh);if(!n||!r)return;const o=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(o.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(o.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures??[])}]);const i=await r.getLayout();t(mh,{layout:structuredClone(e),properties:structuredClone(o),altLayout:structuredClone(i)}),t(hh,null)};return o(),n.Invalidated?.bind(o),()=>{n.Invalidated?.unbind(o)}}),vh=Sf(e=>e(mh)?.layout),bh=Sf(e=>e(mh)?.altLayout),yh=Sf(e=>e(mh)?.properties),xh=Sf(e=>{const t=e(mh)?.layout;return t?.qHyperCube.qDimensionInfo.filter(nh)??[]}),Sh=Sf(e=>{const t=e(mh)?.layout;return t?.qHyperCube.qMeasureInfo.filter(nh)??[]}),wh=(e,t)=>{e?.forEach(e=>{7005===e.qError?.qErrorCode&&t.add(e.cId)})},Ch=Sf(e=>{const t=e(mh),n=new Set;return wh(t?.layout?.qHyperCube.qDimensionInfo,n),wh(t?.altLayout?.qHyperCube.qDimensionInfo,n),n}),Eh=Sf(e=>{const t=e(mh),n=new Set;return wh(t?.layout?.qHyperCube.qMeasureInfo,n),wh(t?.altLayout?.qHyperCube.qMeasureInfo,n),n}),Ih=Sf(e=>{const t=e(yh),n=new Map;return t?(t.qHyperCubeDef.qDimensions.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qMeasures.forEach(e=>{n.set(e.qDef.cId,"measure")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions?.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures?.forEach(e=>{n.set(e.qDef.cId,"measure")}),n):n});class Dh{#e=[];#t=!1;#n=!1;#r;#o;#i;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;var n;await(n=e,new Promise(e=>{setTimeout(e,n)})),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const Rh=Sf(null),Lh=Vf((e,t)=>{const n=e(Yf),r=e(Kf),o=new Dh({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(Rh,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return n?.Invalidated?.bind(i),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{o.abort(),n?.Invalidated?.unbind(i),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),Mh=Sf(e=>{const t=[...e(xh),...e(Sh)].map(e=>e.cId);return new Set(t)}),Ah=Sf(new Set),Ph=Sf(new Set),qh=Sf(e=>{const t=e(Ah),n=e(Ph);return e(Mh).difference(n).union(t)}),kh=Vf((e,t)=>{e(Mh),t(Ah,new Set),t(Ph,new Set)}),Th=Sf(e=>e(qh),(e,t,n)=>{if("string"!=typeof n)return;const r=e(qh).has(n),o=new Set(e(Ph)),i=new Set(e(Ah));r?(o.add(n),i.delete(n)):(i.add(n),o.delete(n)),t(Ph,o),t(Ah,i),Uf({type:r?"unchecked":"checked",cId:n,handler:e(Kf),model:e(Yf),fieldTypeById:e(Ih),handlerQueue:e(Rh)})}),Oh=({props:e,children:t})=>(zf([[Yf,e.args.model],[Xf,e.args.apis],[Kf,e.args.handler]]),kf(kh),kf(gh),kf(Lh),t);function Nh(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function _h(e){return"write"in e}const jh=new WeakMap,Fh={},{read:zh,write:Wh}=Sf(null);function $h(e,t,n){const[r,o,i,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=o.get(t);return r||(r=[Gh(e,t,n),n],o.set(t,r)),r}const l=n??Fh;let c=i.get(l);c||(c=new WeakMap,i.set(l,c));let u=c.get(t);if(!u){const[r,o]=a?$h(a,t,n):[t];u=[t.read===zh?r:Gh(e,t,o),o],c.set(t,u)}return u}function Vh(e){for(const t of e[5])t()}function Hh(e,t,n,r,o){if(n.read===zh&&_h(n)&&_h(t)&&n.write!==Wh&&e!==r){const{write:i}=n;return t.write=Bh(e,n.write.bind(n),r,o),()=>{t.write=i}}}function Bh(e,t,n,r=n){return function(o,i,...a){return t(function(t){const[r]=$h(e,t,n);return o(r)},function(t,...o){const[a]=$h(e,t,n),s=Hh(e,a,t,n,r);try{return i(a,...o)}finally{null==s||s()}},...a)}}function Gh(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,r);return i.read!==zh&&(i.read=function(e,t,n){return function(r,o){return t(function(t){const[o]=$h(e,t,n);return r(o)},o)}}(e,t.read.bind(t),n)),_h(i)&&_h(t)&&i.write!==Wh&&(i.write=Bh(e,t.write.bind(t),n)),i}function Uh({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const o=new WeakSet(e),i=jh.get(n),a=(null==i?void 0:i[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],c=s[5],u=function(e){const t=e[3],n=[...vf(t)],r=n[21],o=n[22],i=n[23],a={};let s,l;return n[21]=h(r),n[22]=p,n[23]=h(i),n[24]=function(e){return s??(s=m(e[0],c)),l??(l=[s,m(e[1],u),m(e[2]),g(e[3]),e[4],e[5],b(e[6]),h(e[7]),h(e[8]),h(e[9]),h(e[10]),d(s,e[11]),(t,...r)=>e[12](n,...r),(t,...r)=>e[13](n,...r),h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e,e[25],(t,...r)=>e[26](n,...r),(t,...r)=>e[27](n,...r),e[28],...e.slice(25)]),l},bf(...n);function c(t){const n=new WeakMap;return function(r){let o=n.get(r);if(o)return o;const i=t(r);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,n)=>"d"===n?a??(a=m(i.d,function(t){return n=>t($h(e,n)[0])})):"p"===n?s??(s=g(i.p)):Reflect.get(i,n)}),n.set(r,o),o}}function u(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const o=e(n);return o?(r={...o,d:g(o.d),t:g(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(n,r),r):void 0}}function d(e,t){const n=h(t);return function(t,r,o){const i=e.get(o);if(i)return i;const a=n(t,r,o);return e.set(o,a),e.get(o)}}function p(t,n,r,...i){const[a,s]=$h(e,r),l=Hh(e,a,r,s,e);try{return o(t,n,a,...i)}finally{null==l||l()}}function f(t,n){return function(r,...o){const[i]=$h(e,r);return(n?n(t):t)(i,...o)}}function h(t){return function(r,o,i,...a){const[s]=$h(e,i);return t(n,o,s,...a)}}function m(e,t){const n={get:f(e.get.bind(e),t),set:f(e.set.bind(e)),has:f(e.has.bind(e)),delete:f(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield $h(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[o]=$h(e,n);return t.add(o,r)},n}function b(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>a[t]??(a[t]=v(e[t])),set(n){delete a[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=u,Object.assign(u,{name:r}),jh.set(u,s);for(const t of new Set(e))l.set(t,[Gh(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[Gh(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[Gh(s,t,s),s])});c.add(t)}return u}const Yh=function(e,t){return function(n){const{atoms:o=[],atomFamilies:i=[],children:a,scope:s,name:l}=n,c=t(),u=Array.from(o,e=>Array.isArray(e)?e[0]:e);function p(){return[s??Uh({atoms:u,atomFamilies:i,parentStore:c,name:l}),function(e){return c!==e.parentStore||!Nh(u,e.atoms)||!Nh(i,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:u,atomFamilies:i,parentStore:c,providedScope:s})){const e=jh.get(f);e&&Vh(e),g(p)}return zf(Array.from(o).filter(Array.isArray),{store:f}),d(()=>{const e=jh.get(f);return()=>{e&&Vh(e)}},[f]),r(e,{store:f,children:a})}}(Rf,Df);var Kh=Object.defineProperty,Xh=Object.defineProperties,Jh=Object.getOwnPropertyDescriptors,Zh=Object.getOwnPropertySymbols,Qh=Object.prototype.hasOwnProperty,em=Object.prototype.propertyIsEnumerable,tm=(e,t,n)=>t in e?Kh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nm=(e,t)=>{for(var n in t||(t={}))Qh.call(t,n)&&tm(e,n,t[n]);if(Zh)for(var n of Zh(t))em.call(t,n)&&tm(e,n,t[n]);return e},rm=(e,t)=>Xh(e,Jh(t));function om(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function im(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function am(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function sm(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(am(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&am(i)){const r=null==i.initialGroup?void 0:im(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:im(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return rm(nm({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return rm(nm({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=im(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&am(i)){const t=null==i.group?void 0:im(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return rm(nm({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return rm(nm({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return rm(nm({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,v=e[u][p];return rm(nm({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),v,...e[d].slice(f+g)]})}(e,t,om)}function lm(e,t){let n=null;const r=new Map,o=new Set;function i(o){let s;if(void 0===t)s=r.get(o);else for(const[e,n]of r)if(t(e,o)){s=n;break}if(void 0!==s){if(!n?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,o]]of r)n(o,e)&&(r.delete(e),a("REMOVE",e,t))},i}const cm=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,um=Sf(),dm=Sf(e=>e(um)?.numberOfSections??0),pm=Sf(e=>e(um)?.numberOfItemsInSection??[]),fm=Sf(e=>e(um)?.keyExtractor??cm),hm=Sf(e=>e(um)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),mm=Sf(e=>e(um)?.onDragEnd),gm=Sf(e=>e(um)?.onDragOver),vm=Sf(e=>e(um)?.itemRenderer),bm=Sf(e=>e(um)?.headerRenderer),ym=Sf(e=>e(um)?.dragOverlayRenderer),xm=Sf(e=>e(um)?.onClick),Sm=Sf(e=>{const t=e(dm),n=e(pm),r=e(fm),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return o}),wm=Sf(null),Cm=Sf(e=>e(wm),(e,t,n)=>{if(null===n)return void t(wm,null);const r=e(wm);t(wm,{...r,...n})}),Em=lm(e=>Sf(null,(t,n,r)=>{let o;"over"===e?o=t(gm):"end"===e&&(o=t(mm),n(Cm,null));const{source:i,target:a}=r.operation;if("start"===e)return void n(Cm,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void n(Cm,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=sm(t(Sm),r)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(Cm)?.startIndex;n(Cm,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(Cm)?.startSection??i.data.sectionKey,event:r})})),Im=[um,dm,pm,fm,hm,mm,vm,bm,xm,Cm],Dm=[Em],Rm=({props:e,children:t})=>{const n=Tf(um);return g(()=>{n(e)},[e,n]),t};var Lm=Symbol.for("preact-signals");function Mm(){if(Om>1)Om--;else{var e,t=!1;for(!function(){var e=Fm;for(Fm=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var n=t.t;void 0!==n;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}}();void 0!==Tm;){var n=Tm;for(Tm=void 0,Nm++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Hm(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Nm=0,Om--,t)throw e}}function Am(e){if(Om>0)return e();jm=++_m,Om++;try{return e()}finally{Mm()}}var Pm,qm=void 0;function km(e){var t=qm,n=Pm;qm=void 0,Pm=void 0;try{return e()}finally{qm=t,Pm=n}}var Tm=void 0,Om=0,Nm=0,_m=0,jm=0,Fm=void 0,zm=0;function Wm(e){if(void 0!==qm){var t=e.n;if(void 0===t||t.t!==qm)return t={i:0,S:e,p:qm.s,n:void 0,t:qm,e:void 0,x:void 0,r:t},void 0!==qm.s&&(qm.s.n=t),qm.s=t,e.n=t,32&qm.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=qm.s,t.n=void 0,qm.s.n=t,qm.s=t),t}}function $m(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Vm(e,t){return new $m(e,t)}function Hm(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Bm(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Gm(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Um(e,t){$m.call(this,void 0,t),this.x=e,this.s=void 0,this.g=zm-1,this.f=4}function Ym(e,t){return new Um(e,t)}function Km(e){var t=e.m;if(e.m=void 0,"function"==typeof t){Om++;var n=qm;qm=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Xm(e),t}finally{qm=n,Mm()}}}function Xm(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Km(e)}function Jm(e){if(qm!==this)throw new Error("Out-of-order effect");Gm(this),qm=e,this.f&=-2,8&this.f&&Xm(this),Mm()}function Zm(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,Pm&&Pm.push(this)}function Qm(e,t){var n=new Zm(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}$m.prototype.brand=Lm,$m.prototype.h=function(){return!0},$m.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:km(function(){var e;null==(e=t.W)||e.call(t)}))},$m.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&km(function(){var e;null==(e=t.Z)||e.call(t)}))}},$m.prototype.subscribe=function(e){var t=this;return Qm(function(){var n=t.value;km(function(){return e(n)})},{name:"sub"})},$m.prototype.valueOf=function(){return this.value},$m.prototype.toString=function(){return this.value+""},$m.prototype.toJSON=function(){return this.value},$m.prototype.peek=function(){var e=this;return km(function(){return e.value})},Object.defineProperty($m.prototype,"value",{get:function(){var e=Wm(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Nm>100)throw new Error("Cycle detected");!function(e){0!==Om&&0===Nm&&e.l!==jm&&(e.l=jm,Fm={S:e,v:e.v,i:e.i,o:Fm})}(this),this.v=e,this.i++,zm++,Om++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Mm()}}}}),Um.prototype=new $m,Um.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===zm)return!0;if(this.g=zm,this.f|=1,this.i>0&&!Hm(this))return this.f&=-2,!0;var e=qm;try{Bm(this),qm=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return qm=e,Gm(this),this.f&=-2,!0},Um.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}$m.prototype.S.call(this,e)},Um.prototype.U=function(e){if(void 0!==this.t&&($m.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Um.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Um.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Wm(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Zm.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},Zm.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Km(this),Bm(this),Om++;var e=qm;return qm=this,Jm.bind(this,e)},Zm.prototype.N=function(){2&this.f||(this.f|=2,this.u=Tm,Tm=this)},Zm.prototype.d=function(){this.f|=8,1&this.f||Xm(this)},Zm.prototype.dispose=function(){this.d()};var eg,tg,ng,rg,og,ig,ag,sg,lg,cg,ug,dg,pg,fg,hg,mg,gg,vg,bg,yg,xg=Object.create,Sg=Object.defineProperty,wg=Object.defineProperties,Cg=Object.getOwnPropertyDescriptor,Eg=Object.getOwnPropertyDescriptors,Ig=Object.getOwnPropertySymbols,Dg=Object.prototype.hasOwnProperty,Rg=Object.prototype.propertyIsEnumerable,Lg=e=>{throw TypeError(e)},Mg=(e,t,n)=>t in e?Sg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ag=(e,t)=>Sg(e,"name",{value:t,configurable:!0}),Pg=["class","method","getter","setter","accessor","field","value","get","set"],qg=e=>void 0!==e&&"function"!=typeof e?Lg("Function expected"):e,kg=(e,t,n,r,o)=>({kind:Pg[e],name:t,metadata:r,addInitializer:e=>n._?Lg("Already initialized"):o.push(qg(e||null))}),Tg=(e,t)=>{return Mg(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Og=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Ng=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Pg[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Cg(d<4?o:{get[n](){return Fg(this,i)},set[n](e){return Wg(this,i,e)}},n));d?f&&d<4&&Ag(i,(d>2?"set ":d>1?"get ":"")+n):Ag(o,n);for(var y=r.length-1;y>=0;y--)c=kg(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>jg(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?Fg:$g)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>Wg(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?qg(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?Lg("Object expected"):(qg(a=s.get)&&(b.get=a),qg(a=s.set)&&(b.set=a),qg(a=s.init)&&g.unshift(a));return d||Tg(e,o),b&&Sg(o,n,b),f?4^d?i:b:o},_g=(e,t,n)=>t.has(e)||Lg("Cannot "+n),jg=(e,t)=>Object(t)!==t?Lg('Cannot use the "in" operator on this value'):e.has(t),Fg=(e,t,n)=>(_g(e,t,"read from private field"),n?n.call(e):t.get(e)),zg=(e,t,n)=>t.has(e)?Lg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Wg=(e,t,n,r)=>(_g(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$g=(e,t,n)=>(_g(e,t,"access private method"),n);function Vg(e,t){if(t){let n;return Ym(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return Ym(e)}function Hg(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!Hg(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return!n.some(n=>!Hg(e[n],t[n]))}return!1}function Bg({get:e},t){return{init:e=>Vm(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function Gg(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=Vg(e.bind(this)),n.set(this,t)),t.value}}function Ug(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>wg(e,Eg(t)))(((e,t)=>{for(var n in t||(t={}))Dg.call(t,n)&&Mg(e,n,t[n]);if(Ig)for(var n of Ig(t))Rg.call(t,n)&&Mg(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function Yg(...e){const t=e.map(e=>Qm(e));return()=>t.forEach(e=>e())}ig=[Bg],og=[Bg],rg=[Bg],ng=[Ug()],tg=[Ug()],eg=[Ug()];var Kg,Xg=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Og(ag,5,this),zg(this,dg),zg(this,sg,Og(ag,8,this)),Og(ag,11,this),zg(this,pg,Og(ag,12,this)),Og(ag,15,this),zg(this,gg,Og(ag,16,this)),Og(ag,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Fg(this,dg,bg)}get initial(){return Fg(this,dg,cg)}get previous(){return Fg(this,dg,hg)}set current(e){const t=km(()=>Fg(this,dg,bg));e&&t&&this.equals(t,e)||Am(()=>{Fg(this,dg,cg)||Wg(this,dg,e,ug),Wg(this,dg,t,mg),Wg(this,dg,e,yg)})}reset(e=this.defaultValue){Am(()=>{Wg(this,dg,void 0,mg),Wg(this,dg,e,ug),Wg(this,dg,e,yg)})}};function Jg(e){return km(()=>{const t={};for(const n in e)t[n]=e[n];return t})}ag=[,,,xg(null)],sg=new WeakMap,dg=new WeakSet,pg=new WeakMap,gg=new WeakMap,lg=Ng(ag,20,"#initial",ig,dg,sg),cg=lg.get,ug=lg.set,fg=Ng(ag,20,"#previous",og,dg,pg),hg=fg.get,mg=fg.set,vg=Ng(ag,20,"#current",rg,dg,gg),bg=vg.get,yg=vg.set,Ng(ag,2,"current",ng,Xg),Ng(ag,2,"initial",tg,Xg),Ng(ag,2,"previous",eg,Xg),Tg(ag,Xg);Kg=new WeakMap;var Zg,Qg,ev,tv,nv,rv=Object.create,ov=Object.defineProperty,iv=Object.getOwnPropertyDescriptor,av=Object.getOwnPropertySymbols,sv=Object.prototype.hasOwnProperty,lv=Object.prototype.propertyIsEnumerable,cv=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),uv=e=>{throw TypeError(e)},dv=Math.pow,pv=(e,t,n)=>t in e?ov(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fv=["class","method","getter","setter","accessor","field","value","get","set"],hv=e=>void 0!==e&&"function"!=typeof e?uv("Function expected"):e,mv=(e,t,n,r,o)=>({kind:fv[e],name:t,metadata:r,addInitializer:e=>n._?uv("Already initialized"):o.push(hv(e||null))}),gv=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=fv[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,iv(o,n)),h=r.length-1;h>=0;h--)(l=mv(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,hv(a)&&(f[d]=a);return f&&ov(o,n,f),o},vv=(e,t,n)=>t.has(e)||uv("Cannot "+n),bv=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},yv=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,r+n,i,a);return l.scale=((e,t)=>{for(var n in t||(t={}))sv.call(t,n)&&pv(e,n,t[n]);if(av)for(var n of av(t))lv.call(t,n)&&pv(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:o,bottom:i}=this;return{width:e,height:t,left:n,top:r,right:o,bottom:i}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new bv((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:o,height:i}=this;return n===t.left&&r===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:o}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new e(n,t,r,o)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==r?o:"end"==r?o+i:o+i/2};return bv.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var xv,Sv=class extends(ev=Xg,Qg=[Gg],Zg=[Gg],ev){constructor(e){var t,n,r;super(bv.from(e),(e,t)=>bv.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(nv,5,this),t=this,r=0,(n=tv).has(t)?uv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return bv.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=bv.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(vv(a=this,s=tv,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);Am(()=>{((e,t,n)=>{vv(e,t,"write to private field"),t.set(e,n)})(this,tv,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(bv.from(e)),this.velocity={x:0,y:0}}};function wv({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return"number"==typeof n?Math.sqrt(dv(r,2)+dv(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n&&o>n.y}nv=(e=>{var t;return[,,,rv(null!=(t=null==e?void 0:e[cv("metadata")])?t:null)]})(ev),tv=new WeakMap,gv(nv,2,"delta",Qg,Sv),gv(nv,2,"direction",Zg,Sv),xv=nv,pv(Sv,cv("metadata"),xv[3]);var Cv,Ev,Iv,Dv,Rv=(e=>(e.Horizontal="x",e.Vertical="y",e))(Rv||{}),Lv=Object.values(Rv),Mv=Object.create,Av=Object.defineProperty,Pv=Object.defineProperties,qv=Object.getOwnPropertyDescriptor,kv=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,Ov=Object.prototype.hasOwnProperty,Nv=Object.prototype.propertyIsEnumerable,_v=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),jv=e=>{throw TypeError(e)},Fv=(e,t,n)=>t in e?Av(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zv=(e,t)=>{for(var n in t||(t={}))Ov.call(t,n)&&Fv(e,n,t[n]);if(Tv)for(var n of Tv(t))Nv.call(t,n)&&Fv(e,n,t[n]);return e},Wv=(e,t)=>Pv(e,kv(t)),$v=(e,t)=>Av(e,"name",{value:t,configurable:!0}),Vv=(e,t)=>{var n={};for(var r in e)Ov.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Tv)for(var r of Tv(e))t.indexOf(r)<0&&Nv.call(e,r)&&(n[r]=e[r]);return n},Hv=e=>{var t;return[,,,Mv(null!=(t=null==e?void 0:e[_v("metadata")])?t:null)]},Bv=["class","method","getter","setter","accessor","field","value","get","set"],Gv=e=>void 0!==e&&"function"!=typeof e?jv("Function expected"):e,Uv=(e,t,n,r,o)=>({kind:Bv[e],name:t,metadata:r,addInitializer:e=>n._?jv("Already initialized"):o.push(Gv(e||null))}),Yv=(e,t)=>Fv(t,_v("metadata"),e[3]),Kv=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Xv=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Bv[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&qv(d<4?o:{get[n](){return Qv(this,i)},set[n](e){return tb(this,i,e)}},n));d?f&&d<4&&$v(i,(d>2?"set ":d>1?"get ":"")+n):$v(o,n);for(var y=r.length-1;y>=0;y--)c=Uv(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>Zv(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?Qv:nb)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>tb(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?Gv(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?jv("Object expected"):(Gv(a=s.get)&&(b.get=a),Gv(a=s.set)&&(b.set=a),Gv(a=s.init)&&g.unshift(a));return d||Yv(e,o),b&&Av(o,n,b),f?4^d?i:b:o},Jv=(e,t,n)=>t.has(e)||jv("Cannot "+n),Zv=(e,t)=>Object(t)!==t?jv('Cannot use the "in" operator on this value'):e.has(t),Qv=(e,t,n)=>(Jv(e,t,"read from private field"),n?n.call(e):t.get(e)),eb=(e,t,n)=>t.has(e)?jv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),tb=(e,t,n,r)=>(Jv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),nb=(e,t,n)=>(Jv(e,t,"access private method"),n);function rb(e,t){return{plugin:e,options:t}}function ob(e){return t=>rb(e,t)}function ib(e){return"function"==typeof e?{plugin:e,options:void 0}:e}Cv=[Bg];var ab=class{constructor(e,t){this.manager=e,this.options=t,eb(this,Iv,Kv(Ev,8,this,!1)),Kv(Ev,11,this),eb(this,Dv,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return km(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=Qm(e.bind(this));return Qv(this,Dv).add(t),t}destroy(){Qv(this,Dv).forEach(e=>e())}static configure(e){return rb(this,e)}};Ev=Hv(null),Iv=new WeakMap,Dv=new WeakMap,Xv(Ev,4,"disabled",Cv,ab,Iv),Yv(Ev,ab);var sb,lb=class extends ab{},cb=class{constructor(e){this.manager=e,this.instances=new Map,eb(this,sb,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(ib).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of Qv(this,sb))if(!n.includes(e)){if(e.prototype instanceof lb)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);tb(this,sb,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function ub(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}sb=new WeakMap;var db,pb,fb,hb,mb,gb,vb,bb,yb,xb,Sb,wb,Cb=[],Eb=class extends ab{constructor(e){super(e),eb(this,db),eb(this,pb),this.computeCollisions=this.computeCollisions.bind(this),tb(this,pb,Vm(Cb)),this.destroy=Yg(()=>{const e=this.computeCollisions(),t=km(()=>this.manager.dragOperation.position.current);if(e!==Cb){const e=Qv(this,db);if(tb(this,db,t),e&&t.x==e.x&&t.y==e.y)return}else tb(this,db,void 0);Qv(this,pb).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){km(()=>{e?Qv(this,pb).value=this.computeCollisions():tb(this,db,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:i,status:a}=r;if(!a.initialized||!i)return Cb;const s=[],l=[];for(const i of null!=e?e:n.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const n=km(()=>e({droppable:i,dragOperation:r}));n&&(null!=i.collisionPriority&&(n.priority=i.collisionPriority),s.push(n))}return 0===l.length?Cb:(s.sort(ub),s)}get collisions(){return Qv(this,pb).value}};db=new WeakMap,pb=new WeakMap,mb=[Bg],hb=[Bg],fb=[Bg];var Ib=class e{constructor(e,t){eb(this,yb,Kv(bb,8,this)),Kv(bb,11,this),eb(this,xb),eb(this,Sb,Kv(bb,12,this)),Kv(bb,15,this),eb(this,wb,Kv(bb,16,this)),Kv(bb,19,this);const{effects:n,id:r,data:o={},disabled:i=!1,register:a=!0}=e;let s=r;tb(this,xb,Vm(r)),this.manager=t,this.data=o,this.disabled=i,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=Qv(this,xb).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:Qv(this,xb).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return nb(t=e,gb,vb).call(t)})),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};bb=Hv(null),gb=new WeakSet,vb=function(){const e=Ib.pendingIdChanges;Ib.pendingIdChanges=null,e&&Am(()=>{for(const[t,n]of e)Qv(t,xb).value=n})},yb=new WeakMap,xb=new WeakMap,Sb=new WeakMap,wb=new WeakMap,Xv(bb,4,"manager",mb,Ib,yb),Xv(bb,4,"data",hb,Ib,Sb),Xv(bb,4,"disabled",fb,Ib,wb),eb(Ib,gb),Yv(bb,Ib),Ib.pendingIdChanges=null;var Db,Rb,Lb,Mb,Ab,Pb,qb,kb,Tb,Ob,Nb,_b,jb,Fb,zb,Wb,$b,Vb,Hb,Bb,Gb,Ub,Yb,Kb,Xb=Ib,Jb=class{constructor(){this.map=Vm(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const i=new Map(n);for(const[r,o]of n)if(o===t&&r!==e){i.delete(r);break}i.set(e,t),this.map.value=i;const a=Yg(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},Zb=class extends(qb=Xb,Pb=[Bg],Ab=[Bg],Mb=[Bg],Lb=[Gg],Rb=[Gg],Db=[Gg],qb){constructor(e,t){var n=e,{modifiers:r,type:o,sensors:i,plugins:a,effects:s}=n,l=Vv(n,["modifiers","type","sensors","plugins","effects"]);super(Wv(zv({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=ib(n);e.registry.plugins.register(t)}}]}}),t),Kv(kb,5,this),eb(this,Tb,Kv(kb,8,this)),Kv(kb,11,this),eb(this,Ob,Kv(kb,12,this)),Kv(kb,15,this),eb(this,Nb,Kv(kb,16,this,this.isDragSource?"dragging":"idle")),Kv(kb,19,this),this.type=o,this.sensors=i,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=ib(t);if(n.plugin===e)return n.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};kb=Hv(qb),Tb=new WeakMap,Ob=new WeakMap,Nb=new WeakMap,Xv(kb,4,"type",Pb,Zb,Tb),Xv(kb,4,"modifiers",Ab,Zb,Ob),Xv(kb,4,"status",Mb,Zb,Nb),Xv(kb,2,"isDropping",Lb,Zb),Xv(kb,2,"isDragging",Rb,Zb),Xv(kb,2,"isDragSource",Db,Zb),Yv(kb,Zb);var Qb=class extends(Vb=Xb,$b=[Bg],Wb=[Bg],zb=[Bg],Fb=[Bg],jb=[Bg],_b=[Gg],Vb){constructor(e,t){var n=e,{accept:r,collisionDetector:o,collisionPriority:i,type:a}=n;super(Vv(n,["accept","collisionDetector","collisionPriority","type"]),t),Kv(Hb,5,this),eb(this,Bb,Kv(Hb,8,this)),Kv(Hb,11,this),eb(this,Gb,Kv(Hb,12,this)),Kv(Hb,15,this),eb(this,Ub,Kv(Hb,16,this)),Kv(Hb,19,this),eb(this,Yb,Kv(Hb,20,this)),Kv(Hb,23,this),eb(this,Kb,Kv(Hb,24,this)),Kv(Hb,27,this),this.accept=r,this.collisionDetector=o,this.collisionPriority=i,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};Hb=Hv(Vb),Bb=new WeakMap,Gb=new WeakMap,Ub=new WeakMap,Yb=new WeakMap,Kb=new WeakMap,Xv(Hb,4,"accept",$b,Qb,Bb),Xv(Hb,4,"type",Wb,Qb,Gb),Xv(Hb,4,"collisionDetector",zb,Qb,Ub),Xv(Hb,4,"collisionPriority",Fb,Qb,Yb),Xv(Hb,4,"shape",jb,Qb,Kb),Xv(Hb,2,"isDropTarget",_b,Qb),Yv(Hb,Qb);var ey=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},ty=class extends ey{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function ny(e,t=!0){let n=!1;return Wv(zv({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var ry,oy,iy,ay,sy,ly,cy,uy,dy,py=class extends lb{constructor(e){super(e);let t=[];this.destroy=Yg(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:o}=n;if(n.isDisabled())return;if(Xb.pendingIdChanges)return;const i=ny({collisions:o});if(r.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;km(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},fy=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(fy||{}),hy=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(hy||{});cy=[Bg],ly=[Gg],sy=[Gg],ay=[Gg],iy=[Gg],oy=[Gg],ry=[Gg];var my=class{constructor(){Kv(uy,5,this),eb(this,dy,Kv(uy,8,this,"idle")),Kv(uy,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};uy=Hv(null),dy=new WeakMap,Xv(uy,4,"value",cy,my,dy),Xv(uy,2,"current",ly,my),Xv(uy,2,"idle",sy,my),Xv(uy,2,"initializing",ay,my),Xv(uy,2,"initialized",iy,my),Xv(uy,2,"dragging",oy,my),Xv(uy,2,"dropped",ry,my),Yv(uy,my);var gy,vy=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return km(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=ny({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return km(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:o}=e;Am(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(o)});const i=ny({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&Am(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return km(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:i}=r;if(!o.dragging||!i||i.signal.aborted)return;const a=ny({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};r.position.current=l})})}stop(e={}){return km(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=km(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=Qm(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),i?i.then(a).catch(()=>r.reset()):a()})}},by=class extends ab{constructor(e,t){super(e,t),this.manager=e,this.options=t}},yy=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},xy=class{constructor(e){this.options=e,eb(this,gy)}set controller(e){tb(this,gy,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=Qv(this,gy))||t.activate(e)}};gy=new WeakMap;var Sy,wy,Cy,Ey,Iy,Dy,Ry,Ly,My,Ay,Py,qy,ky,Ty,Oy,Ny,_y,jy,Fy,zy=class extends ab{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},Wy=class{constructor(e){this.draggables=new Jb,this.droppables=new Jb,this.plugins=new cb(e),this.sensors=new cb(e),this.modifiers=new cb(e)}register(e,t){if(e instanceof Zb)return this.draggables.register(e.id,e);if(e instanceof Qb)return this.droppables.register(e.id,e);if(e.prototype instanceof zy)return this.modifiers.register(e,t);if(e.prototype instanceof by)return this.sensors.register(e,t);if(e.prototype instanceof ab)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof Xb)return e instanceof Zb?this.draggables.unregister(e.id,e):e instanceof Qb?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof zy)return this.modifiers.unregister(e);if(e.prototype instanceof by)return this.sensors.unregister(e);if(e.prototype instanceof ab)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};My=[Gg],Ly=[Bg],Ry=[Bg],Dy=[Bg],Iy=[Bg],Ey=[Bg],Cy=[Gg],wy=[Gg],Sy=[Gg];var $y=class{constructor(e){Kv(ky,5,this),eb(this,Ay),eb(this,Py),eb(this,qy,new Xg(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new my,eb(this,Ty,Kv(ky,8,this,!1)),Kv(ky,11,this),eb(this,Oy,Kv(ky,12,this,null)),Kv(ky,15,this),eb(this,Ny,Kv(ky,16,this,null)),Kv(ky,19,this),eb(this,_y,Kv(ky,20,this,null)),Kv(ky,23,this),eb(this,jy,Kv(ky,24,this,[])),Kv(ky,27,this),this.position=new Sv({x:0,y:0}),eb(this,Fy,{x:0,y:0}),tb(this,Ay,e)}get shape(){const{current:e,initial:t,previous:n}=Qv(this,qy);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?Qv(this,qy).current=e:Qv(this,qy).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=Qv(this,Ay).registry.draggables.get(t);return n&&tb(this,Py,n),null!=(e=null!=n?n:Qv(this,Py))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=Qv(this,Ay).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(Wv(zv({},this.snapshot()),{transform:n}));return tb(this,Fy,n),n}snapshot(){return km(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:Qv(this,Fy),shape:this.shape?Jg(this.shape):null,position:Jg(this.position),status:Jg(this.status),canceled:this.canceled}))}reset(){Am(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,Qv(this,qy).reset(),this.position.reset({x:0,y:0}),tb(this,Fy,{x:0,y:0}),this.modifiers=[]})}};ky=Hv(null),Ay=new WeakMap,Py=new WeakMap,qy=new WeakMap,Ty=new WeakMap,Oy=new WeakMap,Ny=new WeakMap,_y=new WeakMap,jy=new WeakMap,Fy=new WeakMap,Xv(ky,2,"shape",My,$y),Xv(ky,4,"canceled",Ly,$y,Ty),Xv(ky,4,"activatorEvent",Ry,$y,Oy),Xv(ky,4,"sourceIdentifier",Dy,$y,Ny),Xv(ky,4,"targetIdentifier",Iy,$y,_y),Xv(ky,4,"modifiers",Ey,$y,jy),Xv(ky,2,"source",Cy,$y),Xv(ky,2,"target",wy,$y),Xv(ky,2,"transform",Sy,$y),Yv(ky,$y);var Vy={get rendering(){return Promise.resolve()}};function Hy(e,t){return"function"==typeof e?e(t):null!=e?e:t}var By=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=Hy(n.plugins,[]),o=Hy(n.sensors,[]),i=Hy(n.modifiers,[]),a=null!=(t=n.renderer)?t:Vy,s=new ty(this),l=new Wy(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new vy(this),this.dragOperation=new $y(this),this.collisionObserver=new Eb(this),this.plugins=[py,...r],this.modifiers=i,this.sensors=o;const{destroy:c}=this,u=Yg(()=>{var e,t,n;const r=km(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of r)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=ib(e);return new t(this,n)}))?n:o});this.destroy=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},Gy=e=>{throw TypeError(e)},Uy=(e,t,n)=>t.has(e)||Gy("Cannot "+n),Yy=(e,t,n)=>(Uy(e,t,"read from private field"),t.get(e)),Ky=(e,t,n)=>t.has(e)?Gy("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Xy=(e,t,n,r)=>(Uy(e,t,"write to private field"),t.set(e,n),n),Jy=(e,t,n)=>(Uy(e,t,"access private method"),n);function Zy(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function Qy(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,o=(Zy(n)?n.getKeyframes():[]).filter(t);o.length>0&&(r=[o[o.length-1],e])}return r}function ex(e){const{width:t,height:n,top:r,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:i,right:a}}function tx(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function nx(e){return"nodeType"in e}function rx(e){var t,n,r;return e?tx(e)?e:nx(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function ox(e){const{Document:t}=rx(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function ix(e){return!(!e||tx(e))&&(e instanceof rx(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function ax(e){return e instanceof rx(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function sx(e){return e?tx(e)?e.document:nx(e)?ox(e)?e:ix(e)||ax(e)?e.ownerDocument:document:document:document}function lx(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===o}function cx(e,t=e.getBoundingClientRect(),n=0){var r,o,i,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!lx(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),i=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=u.visualViewport,f=null!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i:0,m=null!=(a=null==p?void 0:p.width)?a:u.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:u.innerHeight,v=n*g,b=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+b),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-b),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function ux(e){return{x:e.clientX,y:e.clientY}}var dx="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function px(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...px(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...px(o.document,t))}}catch(e){}return n}function fx(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function hx(){var e,t;const n=fx()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function mx(e){return!(!e||!nx(e))&&e instanceof rx(e).ShadowRoot}function gx(e){if(e&&nx(e)){let t=e.getRootNode();if(mx(t))return t;if(t instanceof Document)return t}return sx(e)}function vx(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function bx(e){return"value"in e}function yx(e){return"CANVAS"===e.tagName}function xx(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:o,top:i}=r.getBoundingClientRect();return xx(e,{x:t-o,y:n-i})}}return r}var Sx=new WeakMap;var wx=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:i}=t,a=[e,t];e.addEventListener(n,r,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o),i.delete(e)}}}};function Cx(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Ex(e,t){const n=()=>performance.now();let r,o;return function(...i){const a=this;o?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,i),o=n()},t-(n()-o))):(e.apply(a,i),o=n())}}var Ix,Dx=dx?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},Rx=class extends Dx{constructor(e){super(t=>{Yy(this,Ix)?e(t,this):Xy(this,Ix,!0)}),Ky(this,Ix,!1)}};Ix=new WeakMap;var Lx,Mx,Ax,Px,qx,kx,Tx,Ox,Nx,_x,jx,Fx=Array.from({length:100},(e,t)=>t/100),zx=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,Ky(this,Nx),this.disconnect=()=>{var e,t,n;Xy(this,Tx,!0),null==(e=Yy(this,Ax))||e.disconnect(),null==(t=Yy(this,Px))||t.disconnect(),Yy(this,qx).disconnect(),null==(n=Yy(this,kx))||n.remove()},Ky(this,Lx,!0),Ky(this,Mx),Ky(this,Ax),Ky(this,Px),Ky(this,qx),Ky(this,kx),Ky(this,Tx,!1),Ky(this,Ox,Ex(()=>{var e,t,n;const{element:r}=this;if(null==(e=Yy(this,Px))||e.disconnect(),Yy(this,Tx)||!Yy(this,Lx)||!r.isConnected)return;const o=null!=(t=r.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(n=o.defaultView)?n:window,s=r.getBoundingClientRect(),l=cx(r,s),{top:c,left:u,bottom:d,right:p}=l,f=-Math.floor(c),h=-Math.floor(u),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,Xy(this,Px,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:yv.intersectionRatio(n,cx(r)))&&Yy(this,Ox).call(this)},{threshold:Fx,rootMargin:m,root:o})),Yy(this,Px).observe(r),Jy(this,Nx,_x).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),Xy(this,Lx,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=cx(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const o=e.ownerDocument;(null==n?void 0:n.debug)&&(Xy(this,kx,document.createElement("div")),Yy(this,kx).style.background="rgba(0,0,0,0.15)",Yy(this,kx).style.position="fixed",Yy(this,kx).style.pointerEvents="none",o.body.appendChild(Yy(this,kx))),Xy(this,qx,new IntersectionObserver(t=>{var n,r;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,c=Yy(this,Lx);Xy(this,Lx,a),(s||l)&&(c&&!a?(null==(n=Yy(this,Px))||n.disconnect(),this.callback(null),null==(r=Yy(this,Ax))||r.disconnect(),Xy(this,Ax,void 0),Yy(this,kx)&&(Yy(this,kx).style.visibility="hidden")):Yy(this,Ox).call(this),a&&!Yy(this,Ax)&&(Xy(this,Ax,new Rx(Yy(this,Ox))),Yy(this,Ax).observe(e)))},{threshold:Fx,root:o})),Yy(this,Lx)&&!n.skipInitial&&this.callback(this.boundingClientRect),Yy(this,qx).observe(e)}};Lx=new WeakMap,Mx=new WeakMap,Ax=new WeakMap,Px=new WeakMap,qx=new WeakMap,kx=new WeakMap,Tx=new WeakMap,Ox=new WeakMap,Nx=new WeakSet,_x=function(){Yy(this,Tx)||(Jy(this,Nx,jx).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,Yy(this,Mx))||(this.callback(this.boundingClientRect),Xy(this,Mx,this.boundingClientRect)))},jx=function(){if(Yy(this,kx)){const{top:e,left:t,width:n,height:r}=cx(this.element);Yy(this,kx).style.overflow="hidden",Yy(this,kx).style.visibility="visible",Yy(this,kx).style.top=`${Math.floor(e)}px`,Yy(this,kx).style.left=`${Math.floor(t)}px`,Yy(this,kx).style.width=`${Math.floor(n)}px`,Yy(this,kx).style.height=`${Math.floor(r)}px`}};var Wx,$x,Vx,Hx,Bx=new WeakMap,Gx=new WeakMap;function Ux(e,t){let n=Bx.get(e);if(!n){const t=new zx(e,t=>{const n=Bx.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),Bx.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(Bx.delete(e),n.disconnect())}}var Yx=class{constructor(e,t,n){this.callback=t,Ky(this,Wx),Ky(this,$x,!1),Ky(this,Vx),Ky(this,Hx,Ex(e=>{if(!Yy(this,$x)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of Yy(this,Vx))if(e.target.contains(t)){this.callback(Yy(this,Wx).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=Cx(e);for(;n;)t.add(n),n=Cx(n);return t}(e),o=function(e,t){const n=new Set;for(const r of e){const e=Ux(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),i=function(e,t){var n;const r=e.ownerDocument;if(!Gx.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),Gx.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(n=Gx.get(r))?n:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),Gx.delete(r))}):()=>{}}(e,Yy(this,Hx));Xy(this,Vx,r),Xy(this,Wx,new zx(e,t,n)),this.disconnect=()=>{Yy(this,$x)||(Xy(this,$x,!0),o(),i(),Yy(this,Wx).disconnect())}}};function Kx(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function Xx(e){try{Kx(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function Jx(e){return!(!dx||!e)&&e===sx(e).scrollingElement}function Zx(e){var t,n;const r=rx(e),o=Jx(e)?function(e){var t,n,r,o;const{documentElement:i}=sx(e),a=rx(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:i.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):ex(e),i=r.visualViewport,a=Jx(e)?{height:null!=(t=null==i?void 0:i.height)?t:r.innerHeight,width:null!=(n=null==i?void 0:i.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function Qx(e,t){const{isTop:n,isBottom:r,isLeft:o,isRight:i,position:a}=Zx(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!o&&a.current.x+s>0,p=!i&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:p,x:d||p,y:c||u}}Wx=new WeakMap,$x=new WeakMap,Vx=new WeakMap,Hx=new WeakMap;var eS=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},tS=new eS(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),nS=new eS(e=>setTimeout(e,50)),rS=new Map,oS=rS.clear.bind(rS);function iS(e,t=!1){if(!t)return aS(e);let n=rS.get(e);return n||(n=aS(e),rS.set(e,n),nS.schedule(oS),n)}function aS(e){return rx(e).getComputedStyle(e)}var sS={excludeElement:!0,escapeShadowDOM:!0};function lS(e,t=sS){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=n&&i.size>=n)return i;if(!a)return i;if(ox(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&mx(a))return t(a.host);if(!ix(a))return ax(a)?t(a.parentElement):i;if(i.has(a))return i;const s=iS(a,!0);if(r&&a===e||function(e,t=iS(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&i.add(a),function(e,t=iS(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function cS(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=Cx(e);for(;r;){if(r===t)return n;const e=ex(r),{x:o,y:i}=uS(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*o,n.scaleY=n.scaleY*i,r=Cx(r)}return n}function uS(e,t=ex(e)){const n=Math.round(t.width),r=Math.round(t.height);if(ix(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=iS(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function dS(e){if(!e||"none"===e)return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function pS(e){var t,n,r,o,i,a,s,l,c;const{scale:u,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=dS(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:y+S,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*w,scaleY:v*C}}var fS=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(fS||{}),hS={x:.2,y:.2},mS={x:10,y:10};function gS(e,t,n,r=25,o=hS,i=mS){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:p}=Zx(e),f=cS(e),h=pS(iS(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new yv(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),b={x:0,y:0},y={x:0,y:0},x=v.height*o.y,S=v.width*o.x;return x>0&&(!c||g&&!u)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-i.x&&a<=v.right+i.x?(b.y=g?1:-1,y.y=r*Math.abs((v.top+x-s)/x)):x>0&&(!u||g&&!c)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-i.x&&a<=v.right+i.x&&(b.y=g?-1:1,y.y=r*Math.abs((v.bottom-x-s)/x)),S>0&&(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-i.y&&s<=v.bottom+i.y?(b.x=m?-1:1,y.x=r*Math.abs((v.right-S-a)/S)):S>0&&(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-i.y&&s<=v.bottom+i.y&&(b.x=m?1:-1,y.x=r*Math.abs((v.left+S-a)/S)),{direction:b,speed:y}}function vS(e,{block:t="nearest",inline:n="nearest"}={}){if(!ix(e))return;const r=lS(e),o=[];for(const i of r){if(!ix(i))continue;const{top:r,left:a}=yS(e,i);let s=r,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<i.scrollTop;n!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-i.clientHeight)}if("none"!==n){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===n?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function bS(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!ix(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function yS(e,t){const n=bS(e),r=bS(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function xS({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function SS(e,t=iS(e).translate,n=!0){if(n){const t=Qy(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=dS(e);if(t)return t}}}if(t){const e=dS(t);if(e)return e}return{x:0,y:0,z:0}}var wS=new eS(e=>setTimeout(e,0)),CS=new Map,ES=CS.clear.bind(CS);function IS(e,t){const n=function(e){const t=e.ownerDocument;let n=CS.get(t);if(n)return n;n=t.getAnimations(),CS.set(t,n),wS.schedule(ES);const r=n.filter(t=>Zy(t.effect)&&t.effect.target===e);return CS.set(e,r),n}(e).filter(e=>{var n,r;if(Zy(e.effect)){const{target:o}=e.effect;if(null==(r=o&&(null==(n=t.isValidTarget)?void 0:n.call(t,o)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var DS=class extends yv{constructor(e,t={}){var n,r,o,i;const{frameTransform:a=cS(e),ignoreTransforms:s,getBoundingClientRect:l=ex}=t,c=IS(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||fx())&&t.contains(e)}),u=l(e);let d,{top:p,left:f,width:h,height:m}=u;const g=iS(e),v=pS(g),b={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},y=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,o,i,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=Zy(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:c}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof c&&c&&(i=c,a=!0)}return a?pS({transform:null!=r?r:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==c||c(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-r)*parseFloat(n),l=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=o?e.height/o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,v,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-r)*parseFloat(n),l=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=o?e.height*o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,b.x=y.scaleX,b.y=y.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function RS(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var LS=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(RS(n))for(const[r,o]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(RS(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(RS(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function MS(e){return!!e&&(e instanceof rx(e).Element||nx(e)&&e.nodeType===Node.ELEMENT_NODE)}function AS(e){if(!e)return!1;const{KeyboardEvent:t}=rx(e.target);return e instanceof t}var PS={};function qS(e){const t=null==PS[e]?0:PS[e]+1;return PS[e]=t,`${e}-${t}`}var kS=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/bv.distance(t.shape.center,n),type:hy.PointerIntersection,priority:fy.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=bv.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:hy.ShapeIntersection,priority:fy.Normal}}return null})(e)},TS=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const i=r?yv.from(r.current.boundingRectangle).corners:void 0,a=yv.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+bv.distance(bv.from(t),null!=(r=null==i?void 0:i[n])?r:o.current)},0),s=a/4;return{id:n.id,value:1/s,type:hy.Collision,priority:fy.Normal}},OS=Object.create,NS=Object.defineProperty,_S=Object.defineProperties,jS=Object.getOwnPropertyDescriptor,FS=Object.getOwnPropertyDescriptors,zS=Object.getOwnPropertySymbols,WS=Object.prototype.hasOwnProperty,$S=Object.prototype.propertyIsEnumerable,VS=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),HS=e=>{throw TypeError(e)},BS=(e,t,n)=>t in e?NS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GS=(e,t)=>{for(var n in t||(t={}))WS.call(t,n)&&BS(e,n,t[n]);if(zS)for(var n of zS(t))$S.call(t,n)&&BS(e,n,t[n]);return e},US=(e,t)=>_S(e,FS(t)),YS=(e,t)=>NS(e,"name",{value:t,configurable:!0}),KS=(e,t)=>{var n={};for(var r in e)WS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&zS)for(var r of zS(e))t.indexOf(r)<0&&$S.call(e,r)&&(n[r]=e[r]);return n},XS=e=>{var t;return[,,,OS(null!=(t=null==e?void 0:e[VS("metadata")])?t:null)]},JS=["class","method","getter","setter","accessor","field","value","get","set"],ZS=e=>void 0!==e&&"function"!=typeof e?HS("Function expected"):e,QS=(e,t,n,r,o)=>({kind:JS[e],name:t,metadata:r,addInitializer:e=>n._?HS("Already initialized"):o.push(ZS(e||null))}),ew=(e,t)=>BS(t,VS("metadata"),e[3]),tw=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},nw=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=JS[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&jS(d<4?o:{get[n](){return iw(this,i)},set[n](e){return sw(this,i,e)}},n));d?f&&d<4&&YS(i,(d>2?"set ":d>1?"get ":"")+n):YS(o,n);for(var y=r.length-1;y>=0;y--)c=QS(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>ow(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?iw:lw)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>sw(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?ZS(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?HS("Object expected"):(ZS(a=s.get)&&(b.get=a),ZS(a=s.set)&&(b.set=a),ZS(a=s.init)&&g.unshift(a));return d||ew(e,o),b&&NS(o,n,b),f?4^d?i:b:o},rw=(e,t,n)=>t.has(e)||HS("Cannot "+n),ow=(e,t)=>Object(t)!==t?HS('Cannot use the "in" operator on this value'):e.has(t),iw=(e,t,n)=>(rw(e,t,"read from private field"),n?n.call(e):t.get(e)),aw=(e,t,n)=>t.has(e)?HS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),sw=(e,t,n,r)=>(rw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),lw=(e,t,n)=>(rw(e,t,"access private method"),n),cw="button",uw="draggable",dw="dnd-kit-description",pw="dnd-kit-announcement",fw={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},hw={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function mw(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var gw=["dragover","dragmove"];var vw,bw,yw,xw,Sw,ww,Cw,Ew,Iw,Dw,Rw,Lw,Mw,Aw=new Map,Pw=class extends(Sw=lb,xw=[Bg],yw=[Gg],bw=[Gg],vw=[Gg],Sw){constructor(e,t){super(e,t),tw(Cw,5,this),aw(this,Iw),aw(this,ww,new Set),aw(this,Ew,tw(Cw,8,this,new Set)),tw(Cw,11,this),this.registerEffect(lw(this,Iw,Dw))}register(e){return iw(this,ww).add(e),()=>{iw(this,ww).delete(e)}}addRoot(e){return km(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{km(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return gx(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return gx(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}};Cw=XS(Sw),ww=new WeakMap,Ew=new WeakMap,Iw=new WeakSet,Dw=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of iw(this,ww))t.push(lw(this,Iw,Rw).call(this,n,e));return()=>{for(const e of t)e()}},Rw=function(e,t){let n=Aw.get(e);n||(n=new Map,Aw.set(e,n));let r=n.get(t);if(!r){const o=ox(e)?lw(this,Iw,Lw).call(this,e,n,t):lw(this,Iw,Mw).call(this,e,n,t);if(!o)return()=>{};r=o,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,0===r.refCount&&r.cleanup())}},Lw=function(e,t,n){var r;const o=e.createElement("style"),{nonce:i}=null!=(r=this.options)?r:{};i&&o.setAttribute("nonce",i),o.textContent=n,e.head.prepend(o);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(n),0===t.size&&Aw.delete(e)}}},Mw=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=r?r:{};if(!o)return null;const i=new o;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var r;if(mx(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&Aw.delete(e)}}},nw(Cw,4,"additionalRoots",xw,Pw,Ew),nw(Cw,2,"sourceRoot",yw,Pw),nw(Cw,2,"targetRoot",bw,Pw),nw(Cw,2,"roots",vw,Pw),ew(Cw,Pw),Pw.configure=ob(Pw);var qw=Pw,kw="data-dnd-",Tw=`${kw}dropping`,Ow="--dnd-",Nw=`${kw}dragging`,_w=`${kw}placeholder`,jw=[Nw,_w,"popover","aria-pressed","aria-grabbing"],Fw=["view-transition-name"],zw=`\n :is(:root,:host) [${Nw}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${Ow}top, 0px) !important;\n left: var(${Ow}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${Ow}width, auto);\n max-width: var(${Ow}width, auto);\n height: var(${Ow}height, auto);\n max-height: var(${Ow}height, auto);\n transform: var(${Ow}transform, none) !important;\n transition: var(${Ow}transition) !important;\n }\n\n :is(:root,:host) [${_w}] {\n transition: none;\n }\n\n :is(:root,:host) [${_w}='hidden'] {\n visibility: hidden;\n }\n\n [${Nw}] * {\n pointer-events: none !important;\n }\n\n [${Nw}]:not([${Tw}]) {\n translate: var(${Ow}translate) !important;\n }\n\n [${Nw}][style*='${Ow}scale'] {\n scale: var(${Ow}scale) !important;\n transform-origin: var(${Ow}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${Nw}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${Nw}]::backdrop, [${kw}overlay]:not([${Nw}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function Ww(e,t="hidden"){return km(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${kw}${qS("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(bx(e)&&bx(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),yx(e)&&yx(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,o]of e){if(!r.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(o),!i)continue;const a=r.element;r.proxy=i,i.removeAttribute(o),Sx.set(a,i),n.push(()=>{Sx.delete(a),r.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(_w,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function $w(e,t){return e===t||Cx(e)===Cx(t)}function Vw(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&MS(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>Xx(t))}function Hw(e){return"TR"===e.tagName}var Bw,Gw,Uw,Yw,Kw,Xw,Jw,Zw=250,Qw="ease";var eC=class extends(Gw=ab,Bw=[Bg],Gw){constructor(e,t){super(e,t),aw(this,Kw),aw(this,Yw,tw(Uw,8,this)),tw(Uw,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(qw),r=null==n?void 0:n.register(zw);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(lw(this,Kw,Xw).bind(this,n)),this.registerEffect(lw(this,Kw,Jw))}};Uw=XS(Gw),Yw=new WeakMap,Kw=new WeakSet,Xw=function(e){const{overlay:t}=this;if(!t||!e)return;const n=gx(t);return n?e.addRoot(n):void 0},Jw=function(){var e,t,n,r,o,i,a;const{state:s,manager:l,options:c}=this,{dragOperation:u}=l,{position:d,source:p,status:f}=u;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(eC),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==c?void 0:c.feedback)?t:"default",v="function"==typeof g?g(p,l):g;if(!h||"none"===v||!f.initialized||f.initializing)return;const{initial:b}=s,y=null!=(n=this.overlay)?n:h,x=cS(y),S=cS(h),w=!$w(h,y),C=new DS(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,I=S.scaleY/x.scaleY;let{width:D,height:R,top:L,left:M}=C;w&&(D/=E,R/=I);const A=new LS(y),P=iS(h),{transition:q,translate:k,boxSizing:T,paddingBlockStart:O,paddingBlockEnd:N,paddingInlineStart:_,paddingInlineEnd:j,borderInlineStartWidth:F,borderInlineEndWidth:z,borderBlockStartWidth:W,borderBlockEndWidth:$}=P,V=q.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),H=pS(P),B=P.transform,G="clone"===v,U="content-box"===T,Y=U?parseInt(_)+parseInt(j)+parseInt(F)+parseInt(z):0,K=U?parseInt(O)+parseInt(N)+parseInt(W)+parseInt($):0,X="move"===v||this.overlay?null:Ww(p,G?"clone":"hidden"),J=km(()=>AS(l.dragOperation.activatorEvent));if(!b.translate)if(this.overlay&&H)b.translate={x:H.x,y:H.y};else if("none"!==k){const e=dS(k);e&&(b.translate=e)}if(!b.transformOrigin){const e=km(()=>d.current),t=M+(null!=(r=null==H?void 0:H.x)?r:0),n=L+(null!=(o=null==H?void 0:H.y)?o:0);b.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(D*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(R*x.scaleY)}}const{transformOrigin:Z}=b,Q=L*x.scaleY+x.y,ee=M*x.scaleX+x.x;if(!b.coordinates&&(b.coordinates={x:ee,y:Q},1!==E||1!==I)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;b.coordinates.x+=(D*e-D)*n,b.coordinates.y+=(R*t-R)*r}b.dimensions||(b.dimensions={width:D,height:R}),b.frameTransform||(b.frameTransform=x);const te=b.coordinates.x-ee,ne=b.coordinates.y-Q,re=(b.dimensions.width*b.frameTransform.scaleX-D*x.scaleX)*Z.x,oe=(b.dimensions.height*b.frameTransform.scaleY-R*x.scaleY)*Z.y,ie={x:te/x.scaleX+re,y:ne/x.scaleY+oe},ae=M+ie.x,se=L+ie.y;y.setAttribute(Nw,"true");const le=km(()=>u.transform),ce=null!=(i=b.translate)?i:{x:0,y:0},ue=le.x*x.scaleX+ce.x,de=le.y*x.scaleY+ce.y,pe=hx();if(A.set({width:D-Y,height:R-K,top:se+pe.y,left:ae+pe.x,translate:`${ue}px ${de}px 0`,transform:this.overlay?"none":B,transition:V?`${V}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${I}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},Ow),X&&(h.insertAdjacentElement("afterend",X),null==c?void 0:c.rootElement)){("function"==typeof c.rootElement?c.rootElement(p):c.rootElement).appendChild(h)}let fe,he,me;Kx(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),Xx(y),y.addEventListener("beforetoggle",Vw));const ge=(ve={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:D,height:R,top:L,left:M,widthOffset:Y,heightOffset:K,delta:ie,styles:A,dragOperation:u,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new DS(ve.placeholder,{frameTransform:ve.frameTransform,ignoreTransforms:!0}),o=null!=(e=ve.transformOrigin)?e:{x:1,y:1},i=(ve.width-r.width)*o.x+ve.delta.x,a=(ve.height-r.height)*o.y+ve.delta.y,s=hx();if(ve.styles.set({width:r.width-ve.widthOffset,height:r.height-ve.heightOffset,top:ve.top+a+s.y,left:ve.left+i+s.x},Ow),null==(t=ve.getElementMutationObserver())||t.takeRecords(),Hw(ve.element)&&Hw(ve.placeholder)){const e=Array.from(ve.element.cells),t=Array.from(ve.placeholder.cells);ve.getSavedCellWidths()||ve.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=ve.getTranslate())?n:{x:0,y:0},c=ve.left+i+s.x+l.x,u=ve.top+a+s.y+l.y,d=r.width-ve.widthOffset,p=r.height-ve.heightOffset,f=ve.frameTransform;ve.dragOperation.shape=new yv(c*f.scaleX+f.x,u*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var ve;const be=new DS(y);km(()=>u.shape=be);const ye=rx(y),xe=e=>{this.manager.actions.stop({event:e})},Se=vx(ye);J&&ye.addEventListener("resize",xe),"idle"===km(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let o=!1;for(const n of r){if(n.target!==e){o=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||jw.includes(r))continue;const i=e.getAttribute(r);if("style"===r){if(RS(e)&&RS(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(Fw.includes(e)||e.startsWith(Ow))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==i?t.setAttribute(r,i):t.removeAttribute(r)}o&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,G),he=function(e,t,n){const r=new MutationObserver(r=>{for(const o of r)if(0!==o.addedNodes.length)for(const r of Array.from(o.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void Xx(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void Xx(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),Xx(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,y));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;ix(n)&&n.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),Kx(y)&&(y.removeEventListener("beforetoggle",Vw),y.removeAttribute("popover")),y.removeAttribute(Nw),A.reset();const e=()=>{var e;if(me&&Hw(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=u.status.dragging;X&&(!n&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Ie=null==c?void 0:c.dropAnimation,De=this,Re=Yg(()=>{var e,t,n;const{transform:r,status:o}=u;if((r.x||r.y||s.current.translate)&&o.dragging){const o=null!=(e=b.translate)?e:{x:0,y:0},i={x:r.x/x.scaleX+o.x,y:r.y/x.scaleY+o.y},a=s.current.translate,l=km(()=>u.modifiers),d=km(()=>{var e;return null==(e=u.shape)?void 0:e.current}),p=null==c?void 0:c.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(A.set({transition:V?`${V}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},Ow),null==fe||fe.takeRecords(),d&&d!==be&&a&&!l.length){const e=bv.delta(i,a);u.shape=yv.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else u.shape=new DS(y);s.current.translate=i}},function(){if(u.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==De.dropAnimation?De.dropAnimation:Ie;let t=s.current.translate;const n=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,o;const{animation:i}=e;if("function"==typeof i){const t=i({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=Zw,easing:s=Qw}=null!=i?i:{};Xx(e.feedbackElement);const[,l]=null!=(t=Qy(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:$w(e.feedbackElement,c)?null:void 0},d=new DS(e.feedbackElement,u),p=null!=(r=dS(iS(e.feedbackElement).translate))?r:e.translate,f=new DS(c,u),h=yv.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,v=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},b=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},Ow),e.feedbackElement.setAttribute(Tw,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),xS({element:e.feedbackElement,keyframes:US(GS(GS({},v),b),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:vx(rx(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(Tw),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:n,transition:q,alignment:p.alignment,styles:A,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Re()}},nw(Uw,4,"overlay",Bw,eC,Yw),ew(Uw,eC),eC.configure=ob(eC);var tC,nC,rC,oC,iC,aC,sC,lC=eC,cC=!0;rC=[Bg],oC=fS.Forward,tC=[Bg],nC=fS.Reverse;var uC=class{constructor(){aw(this,aC,tw(iC,8,this,cC)),tw(iC,11,this),aw(this,sC,tw(iC,12,this,cC)),tw(iC,15,this)}isLocked(e){return e!==fS.Idle&&(null==e?this[fS.Forward]===cC&&this[fS.Reverse]===cC:this[e]===cC)}unlock(e){e!==fS.Idle&&(this[e]=false)}};iC=XS(null),aC=new WeakMap,sC=new WeakMap,nw(iC,4,oC,rC,uC,aC),nw(iC,4,nC,tC,uC,sC),ew(iC,uC);var dC,pC,fC,hC,mC,gC,vC=[fS.Forward,fS.Reverse],bC=class{constructor(){this.x=new uC,this.y=new uC}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},yC=class extends ab{constructor(e){super(e);const t=Vm(new bC);let n=null;this.signal=t,Qm(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new bC);const{delta:o}=e.dragOperation.position;if(n){const e={x:xC(o.x,n.x),y:xC(o.y,n.y)},r=t.peek();Am(()=>{for(const t of Lv)for(const n of vC)e[t]===n&&r[t].unlock(n);t.value=r})}n=o})}get current(){return this.signal.peek()}};function xC(e,t){return Math.sign(e-t)}var SC=class extends(pC=lb,dC=[Bg],pC){constructor(e){super(e),aw(this,hC,tw(fC,8,this,!1)),tw(fC,11,this),aw(this,mC),aw(this,gC,()=>{if(!iw(this,mC))return;const{element:e,by:t}=iw(this,mC);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return sw(this,mC,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:wC(o.x),y:wC(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=Qx(e,o);if(r.x||r.y){const{speed:r,direction:l}=gS(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(s)for(const e of Lv)s[e].isLocked(l[e])&&(r[e]=0,l[e]=0);if(l.x||l.y){const{x:t,y:i}=null!=o?o:l,a=t*r.x,s=i*r.y;if(a||s){const t=null==(n=iw(this,mC))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!a||t.y&&!s)continue}return sw(this,mC,{element:e,by:{x:a,y:s}}),tS.schedule(iw(this,gC)),!0}}}}}return sw(this,mC,void 0),!1};let t=null,n=null;const r=Vg(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const o=xx(gx(null==r?void 0:r.element),n.current);return o&&(t=o),null!=o?o:t}),o=Vg(()=>{const t=r.value,{documentElement:o}=sx(t);if(!t||t===o){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=lS(r,{excludeElement:!1});return n=e,e}}if(t){const e=lS(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},Hg);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new yC(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&AS(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function wC(e){return e>0?fS.Forward:e<0?fS.Reverse:fS.Idle}fC=XS(pC),hC=new WeakMap,mC=new WeakMap,gC=new WeakMap,nw(fC,4,"autoScrolling",dC,SC,hC),ew(fC,SC);var CC=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),EC=class extends ab{constructor(e,t){super(e,t);const n=e.registry.plugins.get(SC);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=Qm(()=>{var t,r,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>CC.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};EC.configure=ob(EC);var IC,DC=EC,RC={capture:!0,passive:!0},LC=class extends lb{constructor(e){super(e),aw(this,IC),this.handleScroll=()=>{null==iw(this,IC)&&sw(this,IC,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),sw(this,IC,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=Qm(()=>{var e,n,r;if(t.status.dragging){const o=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return o.addEventListener("scroll",this.handleScroll,RC),()=>{o.removeEventListener("scroll",this.handleScroll,RC)}}})}};IC=new WeakMap;function MC(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var AC,PC=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),qC=class extends by{constructor(e,t){super(e),this.manager=e,this.options=t,aw(this,AC,[]),this.listeners=new wx,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!MS(e.target))return;if(t.disabled)return;const{keyboardCodes:r=PC.keyboardCodes,preventActivation:o=PC.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=Qm(()=>{var n;const r=null!=(n=e.handle)?n:e.element,o=n=>{AS(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),vS(r);const{center:o}=new DS(r);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=sx(r),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];iw(this,AC).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=PC.keyboardCodes}=null!=n?n:{};if(OC(e,[...r.end,...r.cancel])){e.preventDefault();const t=OC(e,r.cancel);return void this.handleEnd(e,t)}OC(e,r.up)?this.handleMove("up",e):OC(e,r.down)&&this.handleMove("down",e),OC(e,r.left)?this.handleMove("left",e):OC(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:PC.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(DC);!1===(null==e?void 0:e.disabled)&&(e.disable(),iw(this,AC).push(()=>{e.enable()}))}cleanup(){iw(this,AC).forEach(e=>e()),sw(this,AC,[])}destroy(){this.cleanup(),this.listeners.clear()}};AC=new WeakMap,qC.configure=ob(qC),qC.defaults=PC;var kC,TC=qC;function OC(e,t){return t.includes(e.code)}var NC,_C;kC=new WeakMap;NC=new WeakMap,_C=new WeakMap;var jC=class{};jC.Delay=class extends xy{constructor(){super(...arguments),aw(this,NC),aw(this,_C)}onEvent(e){switch(e.type){case"pointerdown":sw(this,_C,ux(e)),sw(this,NC,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!iw(this,_C))return;const{x:t,y:n}=ux(e);wv({x:t-iw(this,_C).x,y:n-iw(this,_C).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){iw(this,NC)&&(clearTimeout(iw(this,NC)),sw(this,_C,void 0),sw(this,NC,void 0))}},jC.Distance=class extends xy{constructor(){super(...arguments),aw(this,kC)}onEvent(e){switch(e.type){case"pointerdown":sw(this,kC,ux(e));break;case"pointermove":if(!iw(this,kC))return;const{x:t,y:n}=ux(e),r={x:t-iw(this,kC).x,y:n-iw(this,kC).y},{tolerance:o}=this.options;if(o&&wv(r,o))return void this.abort();wv(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){sw(this,kC,void 0)}};var FC,zC=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if("mouse"!==r||!MS(o)||t.handle!==o&&!(null==(n=t.handle)?void 0:n.contains(o)))return"touch"===r?[new jC.Delay({value:250,tolerance:5})]:function(e){if(!MS(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(o)&&!e.defaultPrevented?[new jC.Delay({value:200,tolerance:0})]:[new jC.Delay({value:200,tolerance:10}),new jC.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;if(r===t.element)return!1;if(r===t.handle)return!1;if(!MS(r))return!1;if(null==(n=t.handle)?void 0:n.contains(r))return!1;const o=r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),WC=class extends by{constructor(e,t){super(e),this.manager=e,this.options=t,aw(this,FC,new Set),this.listeners=new wx,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=zC.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=Qm(()=>{var n;const r=new AbortController,{signal:o}=r,i=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=rx(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(GC(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!MS(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=zC.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:o}=e,i=ix(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=cS(t.element),{x:s,y:l}=ux(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new yy(c,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=px(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:i?this.handleCancel:VC,options:{capture:!0}}]);iw(this,FC).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=ux(e),r=cS(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,tS.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const o=sx(t.target).body;try{o.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const i=MS(t.target)?[t.target,o]:o,a=this.listeners.bind(i,[{type:"touchmove",listener:VC,options:{passive:!1}},{type:"click",listener:VC},{type:"contextmenu",listener:VC},{type:"keydown",listener:this.handleKeyDown}]);iw(this,FC).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},iw(this,FC).forEach(e=>e()),iw(this,FC).clear()}destroy(){this.cleanup(),this.listeners.clear()}};FC=new WeakMap,WC.configure=ob(WC),WC.defaults=zC;var $C=WC;function VC(e){e.preventDefault()}function HC(){}var BC=new WeakSet;function GC(e){e&&!BC.has(e)&&(e.addEventListener("touchmove",HC,{capture:!1,passive:!1}),BC.add(e))}var UC,YC,KC,XC,JC,ZC,QC,eE,tE,nE,rE,oE,iE,aE,sE,lE,cE={modifiers:[],plugins:[class extends ab{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=dw,announcement:o=pw}={},announcements:i=hw,screenReaderInstructions:a=fw,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:qS(r),c=n?`${o}-${n}`:qS(o);let u,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>tS.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const o=p;if(!o)return;const i=null==t?void 0:t(n,r);i&&o.nodeValue!==i&&(f=i,gw.includes(e)?g():(m(),g.cancel()))})),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||y.add(b),mw(n)&&!fx()||n.hasAttribute("tabindex")||y.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||y.add(()=>n.setAttribute("role",cw)),n.hasAttribute("aria-roledescription")||y.add(()=>n.setAttribute("aria-roledescription",uw)),n.hasAttribute("aria-describedby")||y.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&y.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&y.add(()=>n.setAttribute("aria-disabled",e))}}y.size>0&&tS.schedule(x)}),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),v.forEach(e=>e())}}},DC,class extends ab{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(qw),o=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},lC,class extends ab{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(qw),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=Qm(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return MC(),document.addEventListener("selectionchange",MC,{capture:!0}),()=>{document.removeEventListener("selectionchange",MC,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[$C,TC]},uE=class extends By{constructor(e={}){const t=Hy(e.plugins,cE.plugins),n=Hy(e.sensors,cE.sensors),r=Hy(e.modifiers,cE.modifiers);super(US(GS({},e),{plugins:[LC,SC,qw,...t],sensors:n,modifiers:r}))}},dE=class extends(KC=Zb,YC=[Bg],UC=[Bg],KC){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:i}=n,a=KS(n,["element","effects","handle"]);super(GS({effects:()=>[...o(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(ib))?t:[...n.sensors]).map(e=>{const t=e instanceof by?e:n.registry.register(e.plugin),r=e instanceof by?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),aw(this,JC,tw(XC,8,this)),tw(XC,11,this),aw(this,ZC,tw(XC,12,this)),tw(XC,15,this),this.element=r,this.handle=i}};XC=XS(KC),JC=new WeakMap,ZC=new WeakMap,nw(XC,4,"handle",YC,dE,JC),nw(XC,4,"element",UC,dE,ZC),ew(XC,dE);var pE=class extends(tE=Qb,eE=[Bg],QC=[Bg],tE){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,i=KS(n,["element","effects"]);const{collisionDetector:a=kS}=i,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new DS(n),o=km(()=>this.shape);return r&&(null==o?void 0:o.equals(r))?o:(this.shape=r,r)},l=Vm(!1);super(US(GS({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new Yx(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),aw(this,sE),aw(this,rE,tw(nE,8,this)),tw(nE,11,this),aw(this,lE,tw(nE,12,this)),tw(nE,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){sw(this,sE,e,aE)}get element(){var e;return null!=(e=this.proxy)?e:iw(this,sE,iE)}};function fE(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}nE=XS(tE),rE=new WeakMap,sE=new WeakSet,lE=new WeakMap,oE=nw(nE,20,"#element",eE,sE,rE),iE=oE.get,aE=oE.set,nw(nE,4,"proxy",QC,pE,lE),ew(nE,pE);var hE="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function mE(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function gE(e,t=[],n=!1){const r=l(e);return r.current=e,function(e,t=!1){const n=l(e.peek()),r=l(!1),o=mE();return hE(()=>Qm(()=>{const i=n.current,a=e.value;if(i!==a){if(n.current=a,!r.current)return;t?D(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}(v(()=>Vg(()=>r.current()),t),n)}function vE(e,t){const n=l(new Map),r=mE();return hE(()=>{if(e)return Qm(()=>{var o;let i=!1,a=!1;for(const r of n.current){const[s]=r,l=km(()=>r[1]),c=e[s];l!==c&&(i=!0,n.current.set(s,c),a=null!=(o=null==t?void 0:t(s,l,c))&&o)}i&&(a?queueMicrotask(()=>D(r)):r())});n.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function bE(e,t){e()}function yE(e){const t=l(e);return hE(()=>{t.current=e},[e]),t}function xE(e,t,n=d,r=Object.is){const o=l(e);n(()=>{const n=o.current;r(e,n)||(o.current=e,t(e,n))},[t,e])}function SE(e,t){const n=l(fE(e));hE(()=>{const r=fE(e);r!==n.current&&(n.current=r,t(r))})}var wE=Object.defineProperty,CE=Object.defineProperties,EE=Object.getOwnPropertyDescriptors,IE=Object.getOwnPropertySymbols,DE=Object.prototype.hasOwnProperty,RE=Object.prototype.propertyIsEnumerable,LE=(e,t,n)=>t in e?wE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ME=new uE,AE=c(ME),PE=y(x(({children:e},t)=>{const[n,r]=m(0),o=l(null),i=l(null),a=v(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return hE(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,n]),w(t,()=>a),null})),qE=[void 0,Hg];function kE(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:c}=t,u=((e,t)=>{var n={};for(var r in e)DE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&IE)for(var r of IE(e))t.indexOf(r)<0&&RE.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=u,g=Hy(f,cE.plugins),v=Hy(m,cE.sensors),y=Hy(h,cE.modifiers),x=yE(o),S=yE(i),w=yE(s),C=yE(a),E=yE(c),I=yE(r),D=function(e){const t=l(null);t.current||(t.current=e());return b(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new uE(u)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),xE(g,()=>D&&(D.plugins=g),...qE),xE(v,()=>D&&(D.sensors=v),...qE),xE(y,()=>D&&(D.modifiers=y),...qE),hi.jsxs(AE.Provider,{value:D,children:[hi.jsx(PE,{ref:p,children:n}),n]})}function TE(){return h(AE)}function OE(e){var t;const n=null!=(t=TE())?t:void 0,[r]=m(()=>e(n));return r.manager!==n&&(r.manager=n),hE(r.register,[n,r]),r}function NE({children:e,className:t,dropAnimation:n,style:o,tag:i,disabled:a}){var s;const c=l(null),u=TE(),p=null!=(s=gE(()=>null==u?void 0:u.dragOperation.source,[u]).value)?s:null,f="function"==typeof a?a(p):a;d(()=>{if(!c.current||!u||f)return;const e=u.plugins.find(e=>e instanceof lC);return e?(e.overlay=c.current,()=>{e.overlay=void 0}):void 0},[u,f]),d(()=>{if(!u)return;const e=u.plugins.find(e=>e instanceof lC);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[u,n]);const h=v(()=>{if(!u)return null;const e=new Proxy(u.registry,{get:(e,t)=>"register"===t||"unregister"===t?_E:e[t]});return new Proxy(u,{get:(t,n)=>"registry"===n?e:t[n]})},[u]);return hi.jsx(AE.Provider,{value:h,children:r(i||"div",{ref:c,className:t,style:o,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return hi.jsx(jE,{source:p,children:e});return e}())})}function _E(){return()=>{}}function jE({children:e,source:t}){return e(vE(t))}var FE,zE,WE,$E,VE,HE=Object.create,BE=Object.defineProperty,GE=Object.getOwnPropertyDescriptor,UE=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),YE=e=>{throw TypeError(e)},KE=["class","method","getter","setter","accessor","field","value","get","set"],XE=e=>void 0!==e&&"function"!=typeof e?YE("Function expected"):e,JE=(e,t,n,r,o)=>({kind:KE[e],name:t,metadata:r,addInitializer:e=>n._?YE("Already initialized"):o.push(XE(e||null))}),ZE=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=KE[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,GE(o,n)),h=r.length-1;h>=0;h--)(l=JE(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,XE(a)&&(f[d]=a);return f&&BE(o,n,f),o},QE=(e,t,n)=>t.has(e)||YE("Cannot "+n),eI=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},tI=class extends(WE=Xg,zE=[Gg],FE=[Gg],WE){constructor(e){var t,n,r;super(eI.from(e),(e,t)=>eI.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(VE,5,this),t=this,r=0,(n=$E).has(t)?YE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return eI.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=eI.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(QE(a=this,s=$E,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);Am(()=>{((e,t,n)=>{QE(e,t,"write to private field"),t.set(e,n)})(this,$E,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(eI.from(e)),this.velocity={x:0,y:0}}};VE=(e=>{var t;return[,,,HE(null!=(t=null==e?void 0:e[UE("metadata")])?t:null)]})(WE),$E=new WeakMap,ZE(VE,2,"delta",zE,tI),ZE(VE,2,"direction",FE,tI),((e,t)=>{return n=t,r=UE("metadata"),o=e[3],r in n?BE(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var n,r,o})(VE,tI);var nI=(e=>(e.Horizontal="x",e.Vertical="y",e))(nI||{});Object.values(nI);var rI=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/eI.distance(t.shape.center,n),type:hy.PointerIntersection,priority:fy.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=eI.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:hy.ShapeIntersection,priority:fy.Normal}}return null})(e)};function oI(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:i,accept:a,type:s}=e,l=OE(t=>new pE(((e,t)=>CE(e,EE(t)))(((e,t)=>{for(var n in t||(t={}))DE.call(t,n)&&LE(e,n,t[n]);if(IE)for(var n of IE(t))RE.call(t,n)&&LE(e,n,t[n]);return e})({},e),{register:!1,element:fE(o)}),t)),c=vE(l);return xE(i,()=>l.id=i),SE(o,e=>l.element=e),xE(a,()=>l.accept=a,void 0,Hg),xE(t,()=>l.collisionDetector=null!=t?t:rI),xE(n,()=>n&&(l.data=n)),xE(r,()=>l.disabled=!0===r),xE(s,()=>l.type=s),{droppable:c,get isDropTarget(){return c.isDropTarget},ref:f(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const iI=e=>Array.from({length:e},(e,t)=>t),aI=({id:e,sectionIndex:t,itemIndex:n})=>hi.jsx("span",{children:`${e}-${t}-${n}`}),sI=y(()=>{const e=kf(ym)??aI,{startSectionIndex:t,startIndex:n,id:r}=kf(Cm)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:hi.jsx(NE,{dropAnimation:null,children:hi.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:hi.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),lI=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=kf(Cm),o=r?.toSectionIndex===e&&r.toIndex===t;return hi.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},cI=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,uI=y(({sectionIndex:e})=>{const t=kf(pm)[e],n=kf(fm),r=kf(hm),o=null!==kf(Cm),i=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=oI({id:a,type:"section",accept:"item",collisionPriority:fy.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:hi.jsxs(mc,{ref:s,sx:{margin:"4px",outline:cI(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[hi.jsx(mc,{sx:{position:"relative",top:"4px"},children:hi.jsx(lI,{sectionIndex:e,itemIndex:0,isDragging:!1})}),hi.jsxs(mc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[hi.jsx(Pl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:i.title}),hi.jsx(Pl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),dI=y(({id:e,sectionIndex:t})=>{const n=kf(bm);return void 0===n?null:r(n,{id:e,sectionIndex:t})});var pI=Object.defineProperty,fI=Object.defineProperties,hI=Object.getOwnPropertyDescriptors,mI=Object.getOwnPropertySymbols,gI=Object.prototype.hasOwnProperty,vI=Object.prototype.propertyIsEnumerable,bI=(e,t,n)=>t in e?pI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yI=(e,t)=>{for(var n in t||(t={}))gI.call(t,n)&&bI(e,n,t[n]);if(mI)for(var n of mI(t))vI.call(t,n)&&bI(e,n,t[n]);return e},xI=(e,t)=>fI(e,hI(t)),SI=class extends zy{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return xI(yI({},e),{[t]:n})}};SI.configure=ob(SI);var wI=SI,CI=wI.configure({axis:"x",value:0});wI.configure({axis:"y",value:0});var EI=class extends zy{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,o="number"==typeof n?n:n.y;return xI(yI({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/o)*o})}};EI.configure=ob(EI);var II=Object.create,DI=Object.defineProperty,RI=Object.defineProperties,LI=Object.getOwnPropertyDescriptor,MI=Object.getOwnPropertyDescriptors,AI=Object.getOwnPropertySymbols,PI=Object.prototype.hasOwnProperty,qI=Object.prototype.propertyIsEnumerable,kI=e=>{throw TypeError(e)},TI=(e,t,n)=>t in e?DI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OI=(e,t)=>{for(var n in t||(t={}))PI.call(t,n)&&TI(e,n,t[n]);if(AI)for(var n of AI(t))qI.call(t,n)&&TI(e,n,t[n]);return e},NI=(e,t)=>RI(e,MI(t)),_I=["class","method","getter","setter","accessor","field","value","get","set"],jI=e=>void 0!==e&&"function"!=typeof e?kI("Function expected"):e,FI=(e,t,n,r,o)=>({kind:_I[e],name:t,metadata:r,addInitializer:e=>n._?kI("Already initialized"):o.push(jI(e||null))}),zI=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},WI=(e,t,n,r,o,i)=>{for(var a,s,l,c,u,d=7&t,p=e.length+1,f=_I[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,LI({get[n](){return VI(this,i)},set[n](e){return BI(this,i,e)}},n)),v=r.length-1;v>=0;v--)(c=FI(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},c),l._=1,void 0===s?jI(s)&&(g[f]=s):"object"!=typeof s||null===s?kI("Object expected"):(jI(a=s.get)&&(g.get=a),jI(a=s.set)&&(g.set=a),jI(a=s.init)&&h.unshift(a));return g&&DI(o,n,g),o},$I=(e,t,n)=>t.has(e)||kI("Cannot "+n),VI=(e,t,n)=>($I(e,t,"read from private field"),t.get(e)),HI=(e,t,n)=>t.has(e)?kI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),BI=(e,t,n,r)=>($I(e,t,"write to private field"),t.set(e,n),n);function GI(e){return e instanceof LD||e instanceof RD}var UI=class extends ab{constructor(e){super(e);const t=Qm(()=>{const{dragOperation:t}=e;if(AS(t.activatorEvent)&&GI(t.source)&&t.status.initialized){const t=e.registry.plugins.get(SC);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!AS(e.nativeEvent))return;if(!GI(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],p=[];Am(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&GI(e)||!e.element)continue;let n=e.shape;const r=new DS(e.element,{getBoundingClientRect:e=>cx(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,TS);Am(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=n;if(!e||!GI(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||v!==s,u=c?l:null==t?void 0:t.element;if(!u)return;vS(u);const d=new DS(u);if(!d)return;const p=yv.delta(d,yv.from(i.current.boundingRectangle),e.alignment);r.move({by:p}),c?r.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{n(),t()}}};var YI=Object.defineProperty,KI=Object.defineProperties,XI=Object.getOwnPropertyDescriptors,JI=Object.getOwnPropertySymbols,ZI=Object.prototype.hasOwnProperty,QI=Object.prototype.propertyIsEnumerable,eD=(e,t,n)=>t in e?YI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tD=(e,t)=>{for(var n in t||(t={}))ZI.call(t,n)&&eD(e,n,t[n]);if(JI)for(var n of JI(t))QI.call(t,n)&&eD(e,n,t[n]);return e},nD=(e,t)=>KI(e,XI(t));function rD(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function oD(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function iD(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function aD(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(iD(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&iD(i)){const r=null==i.initialGroup?void 0:oD(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:oD(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return nD(tD({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return nD(tD({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=oD(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&iD(i)){const t=null==i.group?void 0:oD(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return nD(tD({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return nD(tD({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return nD(tD({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,v=e[u][p];return nD(tD({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),v,...e[d].slice(f+g)]})}(e,t,rD)}function sD(e){const t=new Map;for(const[,n]of e)for(const e of n)t.set(e.id,e.index);return t}function lD(e,t,n){var r;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(r=n.get(o))?void 0:r.has(t)))return!0}return!1}var cD="__default__";function uD(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function dD(e,t){return e.index-t.index}function pD(e,t){return e.initialIndex-t.initialIndex}function fD(e,t=dD){return Array.from(e).sort(t)}var hD=[UI,class extends ab{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof LD){const{sortable:e}=n,{group:r}=e;let o=t.get(r);o||(o=new Set,t.set(r,o)),o.add(e)}return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:o,target:i}=r;if(!GI(o)||!GI(i))return;if(o.sortable===i.sortable)return;const a=t(),s=sD(a),l=o.sortable.group===i.sortable.group,c=a.get(o.sortable.group),u=l?c:a.get(i.sortable.group);c&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,d;const p=t();if(lD(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=fD(c),g=l?m:fD(u),v=null!=(r=o.sortable.group)?r:cD,b=null!=(d=i.sortable.group)?d:cD,y={[v]:m,[b]:g},x=aD(y,e);if(y===x)return;const S=x[b].indexOf(o.sortable),w=x[b].indexOf(i.sortable);n.collisionObserver.disable(),uD(f,S,h,w),Am(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!l)for(const[e,t]of x[b].entries())t.group=i.sortable.group,t.index=e}),n.actions.setDropTarget(o.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:o}=r;GI(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),r=sD(e),i=e.get(o.sortable.initialGroup);i&&n.renderer.rendering.then(()=>{const n=t();if(lD(r,e,n))return;const a=fD(i),s=fD(i,pD),l=o.sortable.element,c=a[s.indexOf(o.sortable)],u=null==c?void 0:c.element;c&&u&&l&&(uD(l,c.index,u,o.index),Am(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],mD={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function gD(e){var t,n;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(n=null==e?void 0:e.droppable)&&n}}var vD,bD,yD,xD,SD,wD,CD,ED,ID=new class{constructor(){zg(this,Kg,new WeakMap)}get(e,t){var n;return e?null==(n=Fg(this,Kg).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Fg(this,Kg).has(e)||Fg(this,Kg).set(e,new Map),null==(r=Fg(this,Kg).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=Fg(this,Kg).get(e))?void 0:t.clear():void 0}};bD=[Bg],vD=[Bg];var DD=class{constructor(e,t){HI(this,xD,zI(yD,8,this)),zI(yD,11,this),HI(this,SD),HI(this,wD),HI(this,CD,zI(yD,12,this)),zI(yD,15,this),HI(this,ED),this.register=()=>(Am(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{Am(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{Am(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:c=mD,plugins:u}=n,d=((e,t)=>{var n={};for(var r in e)PI.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&AI)for(var r of AI(e))t.indexOf(r)<0&&qI.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=Hy(u,hD),f=gD(o);this.droppable=new LD(NI(OI({},d),{disabled:f.droppable}),t,this),this.draggable=new RD(NI(OI({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&ID.clear(this.manager),(null==r?void 0:r.dragging)&&ID.set(this.manager,this.id,km(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=VI(this,wD),o=VI(this,SD);e===r&&t===o||(BI(this,wD,e),BI(this,SD,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(lC))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:l,sensors:s}),t,this),BI(this,ED,d.element),this.manager=t,this.index=a,BI(this,wD,a),this.group=i,BI(this,SD,i),this.type=l,this.transition=c}get initialIndex(){var e,t;return null!=(t=null==(e=ID.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=ID.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){km(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=n.boundingRectangle.left-o.boundingRectangle.left,a=n.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=iS(r),l=SS(r,s,!1),c=SS(r,s);if(i||a){const n=vx(rx(r))?NI(OI({},t),{duration:0}):t;xS({element:r,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){Am(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){Am(()=>{const t=VI(this,ED),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),BI(this,ED,e)})}get element(){var e,t;const n=VI(this,ED);if(n)return null!=(t=null!=(e=Sx.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=Hy(e,hD)}set disabled(e){const t=gD(e);Am(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){Am(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:kS}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){Am(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};yD=[,,,II(null)],xD=new WeakMap,SD=new WeakMap,wD=new WeakMap,CD=new WeakMap,ED=new WeakMap,WI(yD,4,"index",bD,DD,xD),WI(yD,4,"group",vD,DD,CD),((e,t)=>{return TI(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(yD,DD);var RD=class extends dE{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},LD=class extends pE{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},MD=Object.defineProperty,AD=Object.defineProperties,PD=Object.getOwnPropertyDescriptors,qD=Object.getOwnPropertySymbols,kD=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,OD=(e,t,n)=>t in e?MD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ND=(e,t)=>{for(var n in t||(t={}))kD.call(t,n)&&OD(e,n,t[n]);if(qD)for(var n of qD(t))TD.call(t,n)&&OD(e,n,t[n]);return e};function _D(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:i,element:a,handle:s,index:l,group:c,disabled:u,modifiers:d,sensors:p,target:h,type:m,plugins:g}=e,v=ND(ND({},mD),e.transition),b=OE(t=>new DD(((e,t)=>AD(e,PD(t)))(ND({},e),{transition:v,register:!1,handle:fE(s),element:fE(a),target:fE(h)}),t)),y=vE(b,jD);return xE(o,()=>b.id=o),hE(()=>{Am(()=>{b.group=c,b.index=l})},[b,c,l]),xE(m,()=>b.type=m),xE(t,()=>b.accept=t,void 0,Hg),xE(i,()=>i&&(b.data=i)),xE(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&b.refreshShape()},bE),SE(s,e=>b.handle=e),SE(a,e=>b.element=e),SE(h,e=>b.target=e),xE(u,()=>b.disabled=null!=u&&u,void 0,Hg),xE(p,()=>b.sensors=p,void 0,Hg),xE(n,()=>b.collisionDetector=n),xE(r,()=>b.collisionPriority=r),xE(g,()=>b.plugins=g,void 0,Hg),xE(v,()=>b.transition=v,void 0,Hg),xE(d,()=>b.modifiers=d,void 0,Hg),xE(e.alignment,()=>b.alignment=e.alignment),{sortable:y,get isDragging(){return y.isDragging},get isDropping(){return y.isDropping},get isDragSource(){return y.isDragSource},get isDropTarget(){return y.isDropTarget},handleRef:f(e=>{b.handle=null!=e?e:void 0},[b]),ref:f(e=>{var t,n;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:f(e=>{var t,n;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:f(e=>{var t,n;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function jD(e,t,n){return!("isDragSource"!==e||n||!t)}const FD=({id:e,itemIndex:t,sectionIndex:n})=>hi.jsx("div",{children:`${n}:${t} - ${e}`}),zD=y(({id:e,itemIndex:t,sectionIndex:n})=>{const r=kf(xm),o=kf(vm),i=kf(pm).at(n)??0,a=kf(fm)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:c}=_D({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[CI],plugins:[UI],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),u=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=o??FD;return hi.jsx(Zu,{className:"section-item-container","data-testid":"section-item",onClick:u,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:hi.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[hi.jsx(lI,{isDragging:l,itemIndex:t,sectionIndex:n}),hi.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:c}),t===i-1&&hi.jsx(lI,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})}),WD=y(({sectionIndex:e})=>{const t=kf(fm),n=kf(pm).at(e)??0,r=t({sectionIndex:e});return hi.jsxs(mc,{className:"exploration-list",style:{overflow:"auto"},children:[hi.jsx(cu,{}),hi.jsx(dI,{id:r,sectionIndex:e}),hi.jsx(cu,{}),hi.jsx(uI,{sectionIndex:e}),hi.jsx(zu,{sx:{padding:"2px 8px"},children:iI(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return hi.jsx(zD,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),$D=[$C.configure({activationConstraints:[new jC.Distance({value:5})]}),TC],VD=y(()=>{const e=kf(dm),t=kf(fm),n=Tf(Em("start")),r=Tf(Em("over")),o=Tf(Em("end"));return hi.jsxs(kE,{sensors:$D,onDragEnd:e=>{o(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[hi.jsx(mc,{style:{display:"flex",flexDirection:"column"},children:iI(e).map(e=>hi.jsx(WD,{sectionIndex:e},t({sectionIndex:e})))}),hi.jsx(sI,{})]})}),HD=y(e=>hi.jsx(Yh,{atoms:Im,atomFamilies:Dm,children:hi.jsx(Rm,{props:e,children:hi.jsx(VD,{})})})),BD="12px",GD="nebula-table-utils-head-menu-button",UD="sn-copy-cell";let YD=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.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.F2="F2",e}({});const KD="nebula-table-utils-column-adjuster";let XD=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),JD=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const ZD={darker:.15,brighter:.3,opacity:.03},QD={darker:.3,brighter:.5,opacity:.05};let eR=function(e){return e.Cyclic="C",e}({});const tR=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},nR=(e,t,n)=>{if(0===n.size)return t;let r=0,o=0;for(;r<e.length&&o<t;){const t=e[r];"string"==typeof t&&n.has(t)||o++,r++}return r},rR=lm(e=>Sf(t=>{const n=t(yh),r=t(hh)?.[e];if(r)return r;const o=n?.qHyperCubeDef.rankedList?.[e];if(void 0===o){const n=t(Kf);return n?.createRankedList(e)}return o})),oR=lm(e=>Sf(t=>{const n=t(th),r=t(Kf),o=t(vh),i=t(hh)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:o?.qHyperCube.rankedList?.[e];return i||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),iR=e=>"string"==typeof e.id,aR=e=>Sf(t=>{const n=t(e),r=t(Th);if(!n||0===n.length)return"disabled";const o=n.filter(iR);if(0===o.length)return"disabled";const i=o.filter(e=>r.has(e.id)).length;return 0===i?"none":i===o.length?"all":"some"}),sR=e=>Sf(null,(t,n,r)=>{const o=t(e),i=o?.filter(iR);i&&0!==i.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:o}=e,i=r(Th),a=new Set,s=new Set;if(t.forEach(e=>{const t=i.has(e.id);t&&!n&&s.add(e.id),!t&&n&&a.add(e.id)}),0===a.size&&0===s.size)return;const l=new Set(r(Ah)),c=new Set(r(Ph));a.forEach(e=>l.add(e)),a.forEach(e=>c.delete(e)),s.forEach(e=>c.add(e)),s.forEach(e=>l.delete(e)),o(Ah,l),o(Ph,c),Uf({type:"apply",localChecked:a,localUnchecked:s,handler:r(Kf),model:r(Yf),fieldTypeById:r(Ih),handlerQueue:r(Rh)})})({items:i,shouldCheckAll:r,get:t,set:n})}),lR=Sf(e=>{const t=e(bh);return t?.qHyperCube.qDimensionInfo.filter(nh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),cR=Sf(e=>{const t=e(vh),n=e(Zf),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:o}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:o??""}});return r}),uR=Sf(e=>{const t=e(Zf),n=e(lR),r=e(eh),o=e(th)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),i=e(o?rR("columns"):oR("columns")),a=e(o?rR("rows"):oR("rows")),s=e(cR);if(void 0===n||void 0===i||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:tR(l,a)},{id:"columns",title:t("Common.Columns"),items:tR(l,i)}]}),dR=lm(e=>Sf(t=>t(uR).at(e))),pR=lm(({sectionIndex:e,itemIndex:t})=>Sf(n=>n(dR(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),fR=lm(e=>Sf(t=>t(dR(e))?.title)),hR=Sf(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(dR(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),mR=Sf(e=>e(uR).map(e=>e.items.length)),gR=lm(e=>aR(Sf(t=>t(dR(e))?.items))),vR=lm(e=>sR(Sf(t=>t(dR(e))?.items))),bR=Sf(null,(e,t,{event:n,id:r,toIndex:o,toSection:i,startSection:a})=>{const s=e(Kf),l=e(Yf),c=e(Rh),u=e(rR("rows")),d=e(rR("columns")),p=e(Ch),f=i;if(void 0===s||void 0===l||void 0===u||void 0===d||null===c)return;if(n.operation.canceled)return void t(hh,null);if("section"===n.operation.target?.type&&a===i)return void t(hh,null);const h=sm({rows:u,columns:d},n);t(hh,h);const m=("rows"===f?u:d).filter(e=>e!==r),g=nR(m,o,p);c.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:g,toSection:f}):await s.moveDimension({cId:r,toIndex:g,toSection:f})})}),yR={noItems:{row:"ChartExploration.PivotTable.RowSectionEmpty.Title",column:"ChartExploration.PivotTable.ColumnSectionEmpty.Title",measure:"ChartExploration.PivotTable.MeasureSectionEmpty.Title"},noSearchFound:{row:"ChartExploration.PivotTable.NoRowsFound.Title",column:"ChartExploration.PivotTable.NoColumnsFound.Title",measure:"ChartExploration.PivotTable.NoMeasuresFound.Title"}},xR="ChartExploration.PivotTable.DimensionSectionEmpty.Message",SR="ChartExploration.PivotTable.MeasureSectionEmpty.Message",wR="#177fe6",CR=(e,t,n,r)=>{if("measure"===t)return e(r?yR.noSearchFound.measure:yR.noItems.measure);const o=r?yR.noSearchFound:yR.noItems;return e(n?o.row:o.column)},ER=(e,t,n)=>n?"":e("measure"===t?SR:xR),IR=lm(e=>Sf(t=>{const n=t(Zf),r=t(Qf).length>0;return t=>({title:CR(n,e,0===t,r),message:ER(n,e,r)})})),DR=IR("measure"),RR=IR("dimensions"),LR=({children:e})=>hi.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),MR=e=>{const t=kf(pR(e));return hi.jsx(LR,{children:t})},AR=Sf(e=>{const t=e(bh);return t?.qHyperCube.qMeasureInfo.filter(nh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),PR=Sf(e=>{const t=e(th)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(vh),r=e(AR),o=e(eh),i=e(t?rR("measures"):oR("measures"));if(void 0===n||void 0===r||void 0===i)return[];const a=n.qHyperCube.qMeasureInfo.filter(nh).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(o);return tR(s,i)}),qR=lm(e=>Sf(t=>t(PR).at(e)?.title??"")),kR=Sf(e=>({itemIndex:t})=>{const n=e(PR);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),TR=Sf(e=>[e(PR).length]),OR=aR(PR),NR=sR(PR),_R=Sf(null,(e,t,{id:n,toIndex:r,event:o})=>{const i=e(Kf),a=e(Yf),s=e(Rh),l=e(rR("measures")),c=e(Eh);if(void 0===i||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=sm({measures:l},o);t(hh,u);const d=l.filter(e=>e!==n),p=nR(d,r,c);s.add(async()=>{await i.moveMeasure({cId:n,toIndex:p})})}),jR={...gp},FR=Fp().palette,zR={TEXT:FR.text.primary,DISABLED:FR.text.disabled,HOVER:FR.action.hover,WHITE:jR.GREYSCALE_100,BORDER_MEDIUM:jR.GREYSCALE_85,DARK_MODE_TEXT:jR.GREYSCALE_95,DARK_MODE_BORDER:jR.GREYSCALE_95,DARK_MODE_DISABLED:jR.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:FR.primary.main,LINK:FR.info.main,ERROR:FR.error.main};function WR(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function $R(e){if("object"==typeof e&&WR(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const VR={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},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:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},HR="qcm-color";function BR(...e){const t={type:HR,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===HR)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(WR(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in VR}(e)){const t=VR[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function GR(e){let t,n,r;if(WR(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?$R(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function UR(e){let t,n,r=0;const o="string"==typeof e?BR(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function YR(e){let t,n,r=0;const o="string"==typeof e?BR(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function KR(e){if(WR(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?$R(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function XR(e,t){return WR(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:XR(BR(e))}function JR(e){return WR(e)?1===e.a?KR(e):XR(e):JR(BR(e))}const ZR=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function QR(e){return.2126*ZR(e.r)+.7152*ZR(e.g)+.0722*ZR(e.b)}function eL(...e){const t=BR(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=UR(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=BR(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=BR(...e);return t.invalid||QR(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=KR(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=XR(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=JR(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=GR(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?BR(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=UR(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=YR(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=YR(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>eL(o(18*e)),getDarkenedColor:(e=1)=>eL(o(18*-e))}}function tL(e,t){if(!e||!t)return;const n=QR(e),r=QR(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const nL="#FFFFFF";function rL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oL,iL="top",aL="top-right",sL="right",lL="bottom-right",cL="bottom",uL="bottom-left",dL="left",pL="top-left";rL(rL(rL(rL(rL(rL(rL(rL(rL(rL(oL={},"equal-equal",[iL,cL]),"equal-higher",[cL,lL]),"equal-lower",[iL,aL]),"equal-void",[iL,cL]),"higher-equal",[dL,uL,iL,aL]),"higher-higher-acute",[cL,uL,dL,aL]),"higher-higher-obtuse",[cL,iL]),"higher-lower-negative",[iL,aL,sL]),"higher-lower-positive",[cL,uL,dL]),"higher-void",[iL]),rL(rL(rL(rL(rL(rL(rL(rL(rL(rL(oL,"lower-equal",[iL]),"lower-higher-negative",[iL,pL]),"lower-higher-positive",[lL]),"lower-lower-acute",[iL,pL,dL,aL,sL]),"lower-lower-obtuse",[iL,cL]),"lower-void",[iL]),"void-equal",[iL]),"void-higher",[iL,cL]),"void-lower",[iL,cL,dL]),"void-void",[iL]),rL(oL,"unclassified",[iL,cL,sL,dL,aL,lL,uL,pL]);var fL,hL,mL=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function gL(){return mL}var vL=function(){if(hL)return fL;hL=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=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(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return fL=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},fL}();function bL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function yL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xL(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(vL);var SL=.7,wL=1/SL,CL="\\s*([+-]?\\d+)\\s*",EL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",IL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DL=/^#([0-9a-f]{3,8})$/,RL=new RegExp(`^rgb\\(${CL},${CL},${CL}\\)$`),LL=new RegExp(`^rgb\\(${IL},${IL},${IL}\\)$`),ML=new RegExp(`^rgba\\(${CL},${CL},${CL},${EL}\\)$`),AL=new RegExp(`^rgba\\(${IL},${IL},${IL},${EL}\\)$`),PL=new RegExp(`^hsl\\(${EL},${IL},${IL}\\)$`),qL=new RegExp(`^hsla\\(${EL},${IL},${IL},${EL}\\)$`),kL={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 TL(){return this.rgb().formatHex()}function OL(){return this.rgb().formatRgb()}function NL(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=DL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?_L(t):3===n?new WL(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?jL(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?jL(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=RL.exec(e))?new WL(t[1],t[2],t[3],1):(t=LL.exec(e))?new WL(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ML.exec(e))?jL(t[1],t[2],t[3],t[4]):(t=AL.exec(e))?jL(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=PL.exec(e))?UL(t[1],t[2]/100,t[3]/100,1):(t=qL.exec(e))?UL(t[1],t[2]/100,t[3]/100,t[4]):kL.hasOwnProperty(e)?_L(kL[e]):"transparent"===e?new WL(NaN,NaN,NaN,0):null}function _L(e){return new WL(e>>16&255,e>>8&255,255&e,1)}function jL(e,t,n,r){return r<=0&&(e=t=n=NaN),new WL(e,t,n,r)}function FL(e){return e instanceof xL||(e=NL(e)),e?new WL((e=e.rgb()).r,e.g,e.b,e.opacity):new WL}function zL(e,t,n,r){return 1===arguments.length?FL(e):new WL(e,t,n,null==r?1:r)}function WL(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $L(){return`#${GL(this.r)}${GL(this.g)}${GL(this.b)}`}function VL(){const e=HL(this.opacity);return`${1===e?"rgb(":"rgba("}${BL(this.r)}, ${BL(this.g)}, ${BL(this.b)}${1===e?")":`, ${e})`}`}function HL(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function BL(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function GL(e){return((e=BL(e))<16?"0":"")+e.toString(16)}function UL(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new KL(e,t,n,r)}function YL(e){if(e instanceof KL)return new KL(e.h,e.s,e.l,e.opacity);if(e instanceof xL||(e=NL(e)),!e)return new KL;if(e instanceof KL)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new KL(a,s,l,e.opacity)}function KL(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function XL(e){return(e=(e||0)%360)<0?e+360:e}function JL(e){return Math.max(0,Math.min(1,e||0))}function ZL(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}bL(xL,NL,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:TL,formatHex:TL,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return YL(this).formatHsl()},formatRgb:OL,toString:OL}),bL(WL,zL,yL(xL,{brighter(e){return e=null==e?wL:Math.pow(wL,e),new WL(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?SL:Math.pow(SL,e),new WL(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new WL(BL(this.r),BL(this.g),BL(this.b),HL(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:$L,formatHex:$L,formatHex8:function(){return`#${GL(this.r)}${GL(this.g)}${GL(this.b)}${GL(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:VL,toString:VL})),bL(KL,function(e,t,n,r){return 1===arguments.length?YL(e):new KL(e,t,n,null==r?1:r)},yL(xL,{brighter(e){return e=null==e?wL:Math.pow(wL,e),new KL(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?SL:Math.pow(SL,e),new KL(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,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new WL(ZL(e>=240?e-240:e+120,o,r),ZL(e,o,r),ZL(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new KL(XL(this.h),JL(this.s),JL(this.l),HL(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=HL(this.opacity);return`${1===e?"hsl(":"hsla("}${XL(this.h)}, ${100*JL(this.s)}%, ${100*JL(this.l)}%${1===e?")":`, ${e})`}`}}));const QL=Math.PI/180,eM=180/Math.PI,tM=.96422,nM=.82521,rM=4/29,oM=6/29,iM=3*oM*oM,aM=oM*oM*oM;function sM(e){if(e instanceof lM)return new lM(e.l,e.a,e.b,e.opacity);if(e instanceof fM)return hM(e);e instanceof WL||(e=FL(e));var t,n,r=pM(e.r),o=pM(e.g),i=pM(e.b),a=cM((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=cM((.4360747*r+.3850649*o+.1430804*i)/tM),n=cM((.0139322*r+.0971045*o+.7141733*i)/nM)),new lM(116*a-16,500*(t-a),200*(a-n),e.opacity)}function lM(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function cM(e){return e>aM?Math.pow(e,1/3):e/iM+rM}function uM(e){return e>oM?e*e*e:iM*(e-rM)}function dM(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function pM(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fM(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function hM(e){if(isNaN(e.h))return new lM(e.l,0,0,e.opacity);var t=e.h*QL;return new lM(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}bL(lM,function(e,t,n,r){return 1===arguments.length?sM(e):new lM(e,t,n,null==r?1:r)},yL(xL,{brighter(e){return new lM(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new lM(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,n=isNaN(this.b)?e:e-this.b/200;return new WL(dM(3.1338561*(t=tM*uM(t))-1.6168667*(e=1*uM(e))-.4906146*(n=nM*uM(n))),dM(-.9787684*t+1.9161415*e+.033454*n),dM(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),bL(fM,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof fM)return new fM(e.h,e.c,e.l,e.opacity);if(e instanceof lM||(e=sM(e)),0===e.a&&0===e.b)return new fM(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*eM;return new fM(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new fM(e,t,n,null==r?1:r)},yL(xL,{brighter(e){return new fM(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new fM(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return hM(this).rgb()}}));var mM=e=>()=>e;function gM(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):mM(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?gM:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):mM(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=zL(e)).r,(t=zL(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=gM(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var vM="center",bM="bottom";[{key:"NoDataExist",alignment:vM,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:vM,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:vM,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:vM},{key:"DataRangeIncludingZero",alignment:bM},{key:"LimitedData",alignment:bM},{key:"NegativeOrZeroValues",alignment:bM}].reduce(function(e,t){return e[t.key]=t,e},{});var yM,xM=["__proto__","constructor"];function SM(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),o=r[r.length-1];if(!xM.some(function(e){return r.includes(e)})){for(var i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}}function wM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var o=t(r);return n.has(o)?n.get(o):n.set(o,e(r))}}function CM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,i)},n)}}function EM(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function IM(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=RM)):void 0===t&&(t=DM);for(var n,r,o,i,a,s=new AM(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new AM(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(MM)}function DM(e){return e.children}function RM(e){return Array.isArray(e)?e[1]:null}function LM(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function MM(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function AM(e){this.data=e,this.depth=this.height=0,this.parent=null}AM.prototype=IM.prototype={constructor:AM,count:function(){return this.eachAfter(EM)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},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(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return IM(this).eachBefore(LM)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},yM=function(e){
89
89
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
90
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-v+1)%l)&&y<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},yM({exports:{}});const PM=(e,t=FR.TEXT,n=FR.WHITE)=>{const r=QR(e??""),o=QR(t),i=QR(n);return r.isInvalid()?t:function(e,t,n){const r=eL(e,t),o=eL(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},qM=e=>{const t=e.getStyle("","","dataColors.selected")||FR.SELECTED,n=function(e,t){const n=QR(tL),r=QR(e),o=QR(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=eL(n,r),a=eL(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?tL:"#000000"}(t,FR.TEXT);return{background:t,color:n}},kM=(e,t)=>{const n=QR(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},TM=e=>{const t=QR(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},OM=e=>{e.stopPropagation(),e.preventDefault()},NM=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},_M=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,jM=e=>{const{currentTarget:t}=e,n=_M(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},FM=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===UD.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},zM=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},WM=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===UD.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&NM(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&NM(e)}},$M=(e,t)=>{const{key:n}=e;switch(n){case UD.Tab:e.shiftKey?((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return;const o=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],i=o?.getElementsByClassName("exploration-item-focus").length??0;if(i>0){const t=o?.getElementsByClassName("exploration-draggable-icon")[i-1];t&&(OM(e),NM(t))}})(e,t):(OM(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];if(!o){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&NM(e))}NM(o)})(e,t));break;case UD.Down:if(zM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a+1<o?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],i&&NM(i)})(e,t);break;case UD.Up:if(zM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[o-1],i&&NM(i)})(e,t);break;case UD.Enter:case UD.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},VM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),HM=({children:e,sectionIndex:t})=>{const r=kf(void 0!==t?mR(t):TR),o=Tf(void 0!==t?gR(t):OR),i=n.useRef(null),a={ref:i,toggleAllCheckboxes:o,checkState:r,sectionIndex:t};return hi.jsxs(mc,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{$M(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${SR} inset`}},children:[hi.jsx(Wc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{o(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),hi.jsx(VM,{children:e})]})},BM=({sectionIndex:e})=>{const t=kf(pR(e));return hi.jsx(HM,{sectionIndex:e,children:t})},GM=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),UM=Ms("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),YM=Ms(GM)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${SR} inset`}})),KM=e=>{const t=e.key===UD.Down?(e=>{const{currentTarget:t,key:n}=e,r=_M(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=FM(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):jM(e);t&&NM(t)},XM=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&NM(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void NM(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},JM=(e,t)=>{const{key:n}=e;switch(n){case UD.Tab:if(e.shiftKey)OM(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&NM(e))}const n=jM(e);n&&NM(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void NM(t);const r=jM(e);r&&NM(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return NM(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&NM(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&NM(n),!0}const o=FM(n,r);if(!o)return!1;NM(o)}return!0})(e,t);n?OM(e):e.stopPropagation()}break;case UD.Down:case UD.Up:if(zM(e))break;OM(e),KM(e);break;case UD.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}OM(e),XM(e,t);break;case UD.Space:OM(e),XM(e,t)}},ZM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),QM=({title:e,dragHandleRef:t,...r})=>{const[o,i]=Of(Th),a=kf(Zf),s=n.useRef(null),l=n.useRef(null),c=n.useRef(null),u={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),hi.jsxs(mc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(r.id)},onKeyDown:e=>{JM(e,u)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${SR} inset`}},children:[hi.jsxs(mc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{JM(e,u)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${SR} inset`}},children:[hi.jsx(Wc,{checked:-1!==r.id&&o.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),hi.jsx(ZM,{children:e})]}),hi.jsx(YM,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{JM(e,u)}})]})},eA=e=>{const t=kf(dR(e))??"";return hi.jsx(QM,{title:t,...e})},tA=()=>{const e=kf(fR),t=kf(hR),n=kf(DR),r=Tf(vR);return hi.jsx(VD,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:LR,headerRenderer:BM,itemRenderer:eA})},nA=({itemIndex:e})=>{const t=kf(PR(e));return hi.jsx(RR,{children:t})},rA=()=>{const e=kf(Zf);return hi.jsx(HM,{children:e("Common.Values")})},oA=e=>{const{itemIndex:t}=e,n=kf(PR(t));return hi.jsx(QM,{title:n,...e})},iA=()=>{const e=kf(qR),t=kf(kR),n=kf(IR),r=Tf(NR);return hi.jsx(mc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:hi.jsx(VD,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:nA,headerRenderer:rA,itemRenderer:oA})})},aA=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),sA=()=>{const[e,t]=Of(Qf),r=kf(Zf),o=n.useRef(null),[i]=kf(kR),[a=0,s=0]=kf(hR),l=f(e=>{t(e.target.value)},[t]),c=0===e.length||0===a&&0===s&&0===i?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return hi.jsxs(mc,{ref:o,onKeyDown:e=>{WM(e,o)},style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[hi.jsx(UM,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:c}),hi.jsx(Zd,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:hi.jsx(Lu,{position:"start",children:hi.jsx(aA,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},lA=e=>{const t=Fp();return hi.jsx(Ps,{theme:t,children:hi.jsx(Rf,{children:hi.jsx(Oh,{props:e,children:hi.jsxs(mc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[hi.jsx(sA,{}),hi.jsx(tA,{}),hi.jsx(iA,{})]})})})})},cA=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:lA,classification:{tags:["exploration"],exclusive:!0}}};var uA=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(uA||{}),dA=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(dA||{}),pA=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(pA||{}),fA=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(fA||{});const hA=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,mA=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case pA.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case uA.BEGINNING_OF_WORD:t="*^",n="*";break;case uA.ENDS_WITH:t="*";break;case uA.STARTS_WITH:n="*";break;case uA.MATCHES_EXACTLY:break;case uA.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case pA.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===dA.GENERAL,r=t?.modifier?.type===fA.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${hA(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${hA(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${hA(t.firstValue?.field)})`):(i=`${hA(e.field)}`,a=`${t.firstValue?.aggregator}(total ${hA(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let c="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${hA(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${hA(t.secondValue?.field)})`,a=` and ${i}`),c=`${a}${o[1]}${e}`}return`"${l}${c}"`})(e);break;case pA.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case pA.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},gA=[];for(let e=0;e<256;++e)gA.push((e+256).toString(16).slice(1));const vA=new Uint8Array(16);function bA(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(vA);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(gA[e[t+0]]+gA[e[t+1]]+gA[e[t+2]]+gA[e[t+3]]+"-"+gA[e[t+4]]+gA[e[t+5]]+"-"+gA[e[t+6]]+gA[e[t+7]]+"-"+gA[e[t+8]]+gA[e[t+9]]+"-"+gA[e[t+10]]+gA[e[t+11]]+gA[e[t+12]]+gA[e[t+13]]+gA[e[t+14]]+gA[e[t+15]]).toLowerCase()}(t)}(e)}const yA=()=>crypto?.randomUUID?.()??bA(),xA=1e3,SA=1e3,wA=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),o=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const i=[...o].sort((e,t)=>e-t);for(let e=0;e<i.length;e++)if(i[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},CA=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},EA=e=>{if(!e)return;wA(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const o=n[r],i=n.indexOf(r),a=n[i];CA(n,r,i),CA(e,r,i),CA(t,t.indexOf(o),t.indexOf(a))}})(t,n)},IA=R;class DA extends IA{#c;#u;#d;constructor(e,t){super(e),this.path=e.path,this.#c=t.translator,this.#u=t.flags.isEnabled,this.#d=uh(t,{tag:["sn-pivot-table","PivotHyperCubeHandler"]})}async#p(e,t,n,r,o=!1){if(!e||this.#f(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=yA()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,o=!1)=>{const i=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return o||await e.autoSortDimension(t),EA(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:o,qNoOfLeftDims:i}=e,a=t.length,s=o.indexOf(-1),l=-1!==s,c=void 0!==r?r+(i||0):void 0;if(l&&void 0!==c&&s>=c?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,o,s):o.push(a),void 0===r)t.push(n);else if(void 0!==c){const e=l&&c>s?c-1:c;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const o=e.qNoOfLeftDims,{qInterColumnSortOrder:i}=e,a=t.length,s=i.indexOf(-1),l=-1!==s&&o>0&&s<o;if(i.push(a),l)void 0===r?t.splice(o-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),i.splice(s,1),i.splice(s+1,0,-1));else{const e=r??o;t.splice(e,0,n),-1!==s&&(i.splice(s,1),i.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n,o);return this.#h({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#p(e,t,n,r)}async addDimensions(e,t,n){const r=[];for(const o of e){const e=await this.addDimension(o,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#f(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let o=n;return o=void 0===o?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+o:Math.min(o,this.hcProperties.excludedNoOfLeftDims),r.splice(o,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#h({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const o=this.createFieldDimension(e,t,n);return this.addDimension(o,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=yA());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),o=this.getAlternativeDimensions();if(r.length>=xA)return Promise.resolve();const i="number"==typeof t?t:o.length;return o.splice(i,0,e),this.#h({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#m({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),o=this.properties.qHyperCubeDef.qNoOfLeftDims,i=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof i&&"number"==typeof o&&i+1<=o&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),EA(this.hcProperties),this.#m({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#f(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#g(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,o=n.splice(r,0,e);return this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),o}async addMeasure(e,t,n,r){if(this.#g(e))return;if(e.qDef.cId||(e.qDef.cId=yA()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const o=this.getMeasures();if(o.length<this.maxMeasures()){const t=1===o.length;return void 0!==n&&n>=0?o.splice(n,0,e):o.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#v({cId:e.qDef.cId,addLast:void 0===n}),e))}return o.length<SA?(this.getAlternativeMeasures().push(e),this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),o=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=yA()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===o.indexOf(-1)&&o.push(-1)}this.#v({cId:e.qDef.cId})}else n.length<SA&&(t=r.length,r.splice(t,0,e),this.#v({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#m({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,o,i;if("number"==typeof e&&e<n.length){r=2===n.length,o=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(i=t.indexOf(-1),t.splice(i,1),this.hcProperties.qNoOfLeftDims&&i+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(o=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(o)return this.#m({cId:o.qDef.cId,section:"measures"}),o}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#g(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#b("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#b("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#x(e){return[...this.#y(e)]}#S(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#w(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#C(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#b(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#E())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#E(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#I(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#E())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#D(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#b(e),o=this.getDimensions(),i=r.map(e=>-1===e?-1:o[e]);switch(e){case"rows":return i.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return i.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return this.#d.warn({msg:"Corrupt ranked list detected: duplicate ids",payload:{duplicates:r,section:e,chartId:n}}),!0}const r=this.#D(e);if(t.length!==r.length)return this.#d.warn({msg:"Corrupt ranked list detected: length mismatch",payload:{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}}),!0;const o=r.filter(e=>!t.includes(e));if(o.length>0)return this.#d.warn({msg:"Corrupt ranked list detected: missing ids",payload:{missingIds:o,section:e,chartId:n}}),!0;const i=this.#D(e,!1),a=t.filter(e=>i.includes(e)),s=i.filter((e,t)=>e!==a[t]);return s.length>0&&(this.#d.warn({msg:"Corrupt ranked list detected: main field order mismatch",payload:{section:e,chartId:n,orderMismatchIds:s}}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#R({section:e});case"measures":return this.#L();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#R({section:e}){const t=this.getDimensions(),n=this.#b(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),o=n.map(e=>-1===e?-1:t[e].qDef.cId);return o.push(...r.map(e=>e.qDef.cId)),this.#S(e,o)}#L(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#u("SUPPORT-9810-MISSING-MEASURES")&&!this.#u("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#S("measures",e)}#M({section:e,cId:t,fields:n,addLast:r}){const o=this.#y(e),i=n.findIndex(e=>e.qDef.cId===t),a=n[i+1]?.qDef.cId,s=n[i-1]?.qDef.cId;if(r)o.push(t);else if(i>=0)if(a){const e=o.indexOf(a);o.splice(e,0,t)}else if(s){const e=o.indexOf(s);o.splice(e+1,0,t)}else o.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#h({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#R({section:e});let o;return o="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#M({section:e,cId:t,fields:o,addLast:r})}#v({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#L();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#A(),this.#M({section:"measures",cId:e,fields:r,addLast:n})}#A(){const e=this.#y("rows"),t=this.#y("columns");this.#I("rows")&&!e.includes(-1)?e.push(-1):this.#I("columns")&&!t.includes(-1)&&t.push(-1)}#P(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#m({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#P())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t);if(void 0===o)return;const i=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===i);this.addAlternativeMeasures(o,-1===a?void 0:a),this.#S("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t,!0);if(void 0===o)return;const i=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>i.includes(e)),s=i.findIndex(e=>e===a);await this.addMeasure(o,!1,-1===s?void 0:s,!0),this.#S("measures",n)}async moveDimensionToAlternative(e){const t=this.#w(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!1,i);if(void 0===a)return;const s=r.slice(o+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,i,l)&&this.#S(t,r)}async moveDimensionFromAlternative(e){const t=this.#w(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!0,i);if(void 0===a)return;const s=this.#D(t,!1),l=r.slice(o+1).find(e=>s.includes(e));let c=s.findIndex(e=>e===l);c=-1===c?void 0:c;void 0!==await this.#p(a,i,c,!1,!0)&&this.#S(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#w(-1);if(null===n)return void this.#d.error({msg:"Cannot move pseudo dimension, unable to find it in any section",payload:{toIndex:e,toSection:t}});const r="columns"===t,o=n===t,i=this.#x(t);if(o){const e=i.indexOf(-1);i.splice(e,1)}else{const o=this.#y(n),i=o.indexOf(-1);if(-1===i)return void this.#d.error({msg:"Couldn't delete pseudo dimension from current section",payload:{toIndex:e,toSection:t,fromSection:n}});o.splice(i,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-i.slice(0,e).filter(e=>this.#C(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),i.splice(e,0,-1),this.#S(t,i)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#w(e),o=this.#C(e);if(null===r)return void this.#d.error({msg:"Cannot move dimension, unable to find it in any section",payload:{cId:e}});const i=(o?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===i)return void this.#d.error({msg:"Couldn't find dimension to move",payload:{cId:e,toIndex:t,toSection:n}});const a=this.#x(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&this.#d.warn({msg:"[moveDimension] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:l}});const c=l-a.slice(0,l).filter(e=>this.#C(e)!==o).length,u="columns"===n,d="columns"===r,p=await this.removeDimension(i,o,d);if(void 0===p)return;void 0!==await this.#p(p,u,c,o,!0)&&(a.splice(l,0,e),this.#S(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#C(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void this.#d.error({msg:"Cannot move measure, unable to find it in any section",payload:{cId:e}});const o=this.#x("measures"),i=o.indexOf(e);-1!==i&&o.splice(i,1);const a=Math.max(0,Math.min(t,o.length));a!==t&&this.#d.warn({msg:"[moveMeasure] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:a}});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-o.slice(0,a).filter(e=>this.#C(e)!==n).length;void 0!==await this.addMeasure(s,n,l,!0)&&(o.splice(a,0,e),this.#S("measures",o))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:yA(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=mA(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#q(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=mA(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#q(e);return n}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var RA,LA={exports:{}};var MA=(RA||(RA=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,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(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,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(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>Pe});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},i=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"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),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"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,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=b(u(r[0],o),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],o),p=u(r[1],o),f=h(0),m=h(1),g=b(d,f),v=b(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=n.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&&(r=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);r=r.startsWith("=")?r.substr(1):r,r="".concat(i,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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 I=t().bind(null,!0),D={},R=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 P(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?i:e[t],e=e[n||t]}}),e}function q(e,t){var n=!0;if(L(e)&&L(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){q(e[r],t[r])||(n=!1)}),n);if(R(e)&&R(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!q(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(o){var i=function(e){return e?I({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);q(i,a)||A(t,o)||(M(a)?r.push({op:"add",path:s,value:i}):L(i)&&L(a)?r=r.concat(D.generate(a,i,s)):R(i)&&R(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&M(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(q(t,o))return r;if(!M(t[0])&&M(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(D.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))}),Object.keys(e).forEach(function(o){M(t[o])&&!A(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,o=P(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(R(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(R(a)&&R(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||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))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),I(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=P(e,t.from);R(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(R(o)?o.splice(+i,1):delete o[i])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const k=D,T=function(e,n,r){if(!e)return Promise.resolve();var o=k.generate(n,r);return t()(!0,n,r),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 O="accumulation";function N(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function _(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,u,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:o})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.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 n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.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 w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=N(t,e);return i&&!i.disabled}};return n}};var z="movingAverage";function W(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const H={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:o,layout:a})){var b=w.getDimComp(u,1),y=w.getDimComp(u,0),x=w.getAggrComp(v,b,y);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,V)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(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($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=W(t,e);return i&&!i.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var o=r.steps;r.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),n.properties.qHyperCubeDef.qMeasures=n.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 n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=G(t,e);return i&&!i.disabled}};return n}};var X="difference";function J(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),p="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:o})){var f=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}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]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(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(Z(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(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return n}};var te="normalization";function ne(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach(function(t){void 0===e[t]&&(e[t]=ie[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,i),i}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(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,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=ne(t,e);return i&&!i.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,me)?me:he},getLibraryId:function(e){return i(e,me)||i(e,he)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",be="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Re={initBase:function(e,t){(t||Re.isValid(e))&&(n(e,be,i(e,ve)),n(e,xe,i(e,ye)),n(e,Ce,i(e,Se)),n(e,Ee,i(e,we)))},restoreBase:function(e){Re.isValid(e)&&(n(e,ve,i(e,be)),n(e,ye,i(e,xe)),n(e,Se,i(e,Ce)),n(e,we,i(e,Ee)),i(e,Ie)&&i(e,De)&&n(e,Ie,i(e,De)),delete e.qDef.base)},isValid:function(e){var t=i(e,be),n=i(e,xe);return void 0!==t||void 0!==n}};const Le=Re;function Me(e){return Me="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},Me(e)}var Ae={accumulation:F,movingAverage:H,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Pe={modifiers:Ae,apply:ke,applyModifiers:Te,cleanUpMeasure:Oe,destroy:function(e){e&&qe[e.id]&&qe[e.id].masterItemSubscriber&&(qe[e.id].masterItemSubscriber&&qe[e.id].masterItemSubscriber.unsubscribe(),delete qe[e.id])},hasActiveModifiers:Ne,getActiveModifier:_e,initBase:Le.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ae[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ae[e]&&Ae[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Ze({modifiers:t,properties:n,layout:r}))}),o&&!i},ifEnableTotalsFunction:je};var qe={};function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;qe[n.id]=qe[n.id]||{isFirstTime:!0};var c=qe[n.id].isFirstTime;if(qe[n.id].isFirstTime=!1,r&&"object"===Me(r))return Te({model:n,properties:r});var u=n?n.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=qe[n.id].lastReloadTime;if(qe[n.id].lastReloadTime=i(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:u,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var o=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:o,model:n}).then(function(o){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Ae[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&He(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Te({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Me(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,o=Qe(r);return et({model:n,libraryIds:o}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Oe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Te(e){var n=e.model,r=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},o):o),$e(o);var p=Qe(o);return et({model:n,libraryIds:p,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Oe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:o,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then(function(o){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Le.isValid(n)||Le.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ae[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ae[r.type].generateExpression({expression:s,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ae[r.type].updateModifier&&Ae[r.type].updateModifier(r,o.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Ae[r.type].generateExpression({expression:a,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:o,dimensionAndFieldList:e}),Ve(n)):Oe(n)})})})}({measures:a,properties:o,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:o,model:n}):Promise.resolve(!1)})})}function Oe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&!Ae[e.type]})}(e)?Le.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ae[r.type]&&!r.disabled)return r}}function je(e){var t=_e(e);return!t||Ae[t.type].enableTotalsFunction(e)}function Fe(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=_e(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Le.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Ve(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Me(t)&&(t.disabled||!Ae[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function He(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=He(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Me(e)||e.disabled||!Ae[e.type])&&(void 0===o[e.type]&&(o[e.type]=Ae[e.type].isApplicable({properties:n,layout:r})),o[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then(function(e){o.dimensionList=e});r.push(i);var a=t.app.getFieldList().then(function(e){o.fieldList=e});return r.push(a),Promise.all(r).then(function(){return o})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),i.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):T(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return o}):Promise.resolve(o)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&Ae[e.type]&&Ae[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],o=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var i=Be(t);i&&n.push(i),o=o||Ze({modifiers:r,properties:e})}}),i(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(qe[t.id].masterItemSubscriber=qe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=i(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=i(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach(function(e){o[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:i}),Object.keys(r).forEach(function(e){o[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return ke({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),qe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](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);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),o=Math.floor(n/62);return o>0?t(o)+r:r}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},o(e)}n.d(r,{default:()=>$e});const i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n: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 t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},b=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.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)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},y=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.getValue(e,t);if(!i.isAtomicValue(s))try{if((o=(o=(r=JSON.stringify(s)).match(/:\{/g))?o.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var l=i.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},A=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},P=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},q=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}}},k=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},T=function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},O=function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=E(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,o.dimensions.length,D),l=I(a.min,o.dimensions.length,0);return{maxDimensions:I(i.max,s,D),minDimensions:I(i.min,l,0),maxMeasures:s,minMeasures:l}},_=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.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=w()(!0,{},n,o)).components&&(o.components=[]),o},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(t)||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.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return L(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(t)||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.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function H(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){i.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:o,qHyperCubeDef:l}),m({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:o,properties:a}),r||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters",!0),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:c}),v=i.getValue(r,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=N({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,w=y.maxMeasures,C=y.minMeasures,E=l.defaultDimension,I=void 0===E?q():E,D=l.defaultMeasure,R=void 0===D?k():D;b.qDimensions.length=0,b.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:b}),T({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:b,defaultDimension:I}),O({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:b,defaultMeasure:R}),W({newProperties:g,dataDefinition:a,hypercubePath:c}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),_({exportFormat:t,newHyperCubeDef:b}),A("qMaxStackedCells",v,b),A("qNoOfLeftDims",v,b),P("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),P("qMode",v,b,"S"),P("qReductionMode",v,b,"N"),P("qSortbyYValue",v,b),P("qIndentMode",v,b),P("qShowTotalsAbove",v,b),M(g,t,r),m.qProperty=g;var L=i.getValue(u||{},"support.modifiers");return V({measures:b.qMeasures,modifierTypes:L}),p&&H(m.qProperty,"storedFilters"),"S"===b.qMode&&h&&H(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var o=u(e,r,n),i=u(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(U(a,t,r,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={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}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.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 X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(r,o);var l=r[r.length-1];if(l){var c=n?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=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.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().measureBase.getLibraryId(e)}(n,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),i&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var o=t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(ne(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:s,key: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&&ie.useMasterNumberFormat(i.formatting)}i.auto=!1,i.mode=a}function se(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=oe("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},de=function(e,t){var n,r=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(n={auto:o,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:o,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=oe("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},he=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),h=i.getValue(d,"color.mode",""),m=i.getValue(d,"color.auto",""),g=ce(d,p),v=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),u}};var be=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?H(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):H(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),be.includes(r)&&t[o].type[r]++,t[o].type.total++}}),t}(a);l.length?(i&&(t=l.filter(function(e){return e.type[i]>0}).sort(function(e,t){return t.type[i]-e.type[i]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return ye({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=Ce(n,r,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(n,r,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Re="conditionalColoring",Le="measures",Me="qDef.conditionalColoring";const Ae={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Re,arrayName:Le,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Le,quarantineName:Re})}};var Pe="qHyperCubeDef.qMeasures",qe="measures",ke="qHyperCubeDef.qDimensions",Te="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ee({properties:e,arrayPath:ke,quarantineName:ze,arrayName:Te,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ie({properties:e,arrayPath:ke,quarantineName:ze,arrayName:Te,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:H,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Ae,conditionalShow:We}})(),r.default})()}(LA)),LA.exports),AA=qr(MA);const PA="qHyperCubeDef.qMeasures",qA="measures",kA="qHyperCubeDef.qDimensions",TA="dimensions",OA="qDef.representation",NA="tableRepresentation",_A="qDef.conditionalColoring",jA="conditionalColoring",FA="qMiniChartDef",zA="miniChartDef",WA=e=>{AA.unquarantineArrayProp({properties:e,arrayPath:kA,itemPath:OA,arrayName:TA,quarantineName:NA}),AA.unquarantineArrayProp({properties:e,arrayPath:PA,itemPath:OA,arrayName:qA,quarantineName:NA}),AA.unquarantineArrayProp({properties:e,arrayPath:PA,itemPath:_A,arrayName:qA,quarantineName:jA}),AA.unquarantineArrayProp({properties:e,arrayPath:PA,itemPath:FA,arrayName:qA,quarantineName:zA})},$A=e=>{AA.quarantineArrayProp({properties:e,arrayPath:kA,itemPath:OA,arrayName:TA,quarantineName:NA}),AA.quarantineArrayProp({properties:e,arrayPath:PA,itemPath:OA,arrayName:qA,quarantineName:NA}),AA.quarantineArrayProp({properties:e,arrayPath:PA,itemPath:_A,arrayName:qA,quarantineName:jA}),AA.quarantineArrayProp({properties:e,arrayPath:PA,itemPath:FA,arrayName:qA,quarantineName:zA})};function VA(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(o)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const HA="qHyperCubeDef.qDimensions",BA="dimensions",GA="qOtherTotalSpec.qTotalMode",UA="totalMode",YA={quarantine(e){AA.quarantineArrayProp({properties:e,arrayPath:HA,quarantineName:UA,arrayName:BA,itemPath:GA})},unquarantine(e){AA.unquarantineArrayProp({properties:e,arrayPath:HA,quarantineName:UA,arrayName:BA,itemPath:GA})}};function KA(e){const t=VA(e);return(e,n,r,o)=>{const i=AA.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&SM(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],SM(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),f=a+p;if(f>c.length)for(let e=c.length;e<f;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const h=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&SM(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(AA.unquarantineProperty(i.qProperty,"noOfLeftDims"),AA.unquarantineProperty(i.qProperty,"excludedNoOfLeftDims "))}return AA.unquarantineProperty(i.qProperty,"rankedList"),AA.conditionalShow.unquarantine(i.qProperty),YA.unquarantine(i.qProperty),WA(i.qProperty),AA.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function XA(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=AA.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;SM(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),AA.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims,AA.quarantineProperty(i.properties,"qHyperCubeDef.rankedList","rankedList"),delete i.properties.qHyperCubeDef.rankedList;const u=i.properties.qLayoutExclude.quarantine?.interColSortOrder;u&&(c=u,SM(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),SM(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return AA.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),AA.quarantineProperty(i.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),AA.conditionalShow.quarantine(i.properties),YA.quarantine(i.properties),$A(i.properties),i}const JA=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(o)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),ZA=["rows","columns","measures"],QA=e=>"string"==typeof e&&e.length>0,eP=e=>{const t=e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"),n=e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),r=e.flags.isEnabled("qcb-35151-fix-duplicate-columns-pivot");if(!t&&!n&&!r)return;const o=new DA({},e),i=uh(e,{tag:"sn-pivot-table"});return{properties(e){if(r&&((e,t)=>{const{qHyperCubeDef:n}=e,r=n.qLayoutExclude?.qHyperCubeDef,o=new Set;let i=0,a=0;[...n.qDimensions,...n.qMeasures,...r?.qDimensions??[],...r?.qMeasures??[]].forEach(e=>{const t=e.qDef?.cId;if(!QA(t)||o.has(t)){QA(t)?i++:a++;const n=yA();return e.qDef={...e.qDef,cId:n},void o.add(n)}o.add(t)}),i>0&&t.error({msg:"migrate: duplicate field cId issues detected",payload:{duplicateCount:i}}),a>0&&t.error({msg:"migrate: missing field cId issues detected",payload:{missingCount:a}})})(e,i),t&&"sn-pivot-table"===e.visualization&&(o.setProperties(e),ZA.forEach(e=>{o.isRankedListCorrupt(e)&&o.createRankedList(e)})),n){const t=e.components?.find(e=>"theme"===e.key);t?.nullValues&&!t.dimensionNullValues&&(t.dimensionNullValues={...t.nullValues})}return e}}},tP={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let nP=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),rP=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const oP=e=>{switch(e?.type){case"url":return nP.Link;case"image":return nP.Image;case"indicator":return nP.Indicator;case"miniChart":return nP.MiniChart;default:return nP.Text}},iP=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),aP=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>oP(e.qDef.representation)===nP.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},sP=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:iP({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>oP(e.qDef.representation)===nP.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>oP(e.qDef.representation)===nP.Link&&e.qDef.representation?.urlPosition===rP.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>oP(e.qDef.representation)===nP.Link&&e.qDef.representation?.urlPosition===rP.Attribute},...aP(n)}},lP=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[nP.Image],i=!r?.("qMiniChartDef")&&t[nP.MiniChart],a=!r?.("tableIndicators")&&t[nP.Indicator],s=o&&t[nP.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>oP(e.qDef.representation)===nP.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let cP=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),uP=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),dP=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),pP=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const fP="image",hP=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},mP=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:XD.Auto,translation:"Common.Auto"},{value:XD.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:XD.Pixels,translation:"Object.Table.Column.Pixels"},{value:XD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:XD.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:KD.PixelsDefault,show:e=>e.qDef.columnWidth?.type===XD.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:KD.PercentageDefault,show:e=>e.qDef.columnWidth?.type===XD.Percentage}}),gP=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==fP},[e]:{ref:`qDef.${e}.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:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==fP)}}},vP="TOTAL_OFF",bP={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:uP.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:uP.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},yP=e=>(e=>{const{translator:t,anything:n,flags:r}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{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},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:vP,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:vP,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&hP},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==vP&&hP(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:bP}},alignmentAndRepresentationAndResize:{type:"items",items:{...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...sP(e),...mP()}}}:{cellColoring:bP,...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...sP(e),...mP()}}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{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},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:bP}},alignmentAndRepresentationAndResize:{type:"items",items:{...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...lP(e,{[nP.Image]:!0,[nP.Indicator]:!0}),...mP()}}}:{cellColoring:bP,...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...lP(e,{[nP.Image]:!0,[nP.Indicator]:!0}),...mP()}}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e),xP="12px",SP="Source Sans Pro, sans-serif",wP="600",CP=15e3,EP=4/3,IP="-",DP=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),RP=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},LP=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{const o=t.fontFamily??"Source Sans Pro, sans-serif",i=t.fontFamilies??[],a=Array.from(new Set([e,o,...i])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>RP(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...gL(r).filter(e=>!a.includes(e)).map(e=>RP(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),MP=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],AP=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>RP(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...MP.filter(e=>!i.includes(e)).map(e=>RP(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),PP=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:LP({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:AP({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:DP(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:DP(`${e}.background`,"properties.background",(t,n)=>{const r=n?FR.WHITE:FR.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),qP=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),kP=e=>qP("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),TP=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?kP(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:DP(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:DP(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),OP=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1});let NP=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),_P=function(e){return e.Solid="solid",e.None="none",e}({});const jP={display:"flex",justifyContent:"center",alignItems:"center"},FP={borderStyle:"solid"},zP={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},WP={lineHeight:EP,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},$P=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),VP=(e,t)=>e>0?`${e}px ${_P.Solid} ${t}`:_P.None,HP=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?VP(i,n):_P.None,borderBottom:VP(a,n),borderLeft:"rtl"===r?VP(i,n):_P.None,borderTop:_P.None}},BP=(e,t,n,r,o,i,a)=>{const s=HP(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=VP(2,o)),n||(s.borderLeft="rtl"!==i?VP(1,o):"none",s.borderRight="rtl"===i?VP(1,o):"none")),s},GP=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=VP(1,n)),t&&(r.borderRight=VP(1,n)),r},UP=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},YP=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),KP=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:PP({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:UP}),dimensionValueSection:PP({section:"dimensionValues",translator:e,flags:t,getThemeValue:UP}),measureValueSection:PP({section:"measureValues",translator:e,flags:t,getThemeValue:UP}),measureLabelSection:TP({section:"measureLabels",getThemeValue:UP}),totalValuesSection:TP({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:UP}),...YP(t)?{dimensionNullSection:TP({section:"dimensionNullValues",fallbackBackground:NP.NullValueBackground,getThemeValue:UP,isNullValueText:!0}),nullValues:TP({section:"nullValues",translation:"properties.pivot.measureNullValues",fallbackBackground:NP.NullValueBackground,getThemeValue:UP,isNullValueText:!0})}:{nullValues:TP({section:"nullValues",fallbackBackground:NP.NullValueBackground,getThemeValue:UP,isNullValueText:!1})},gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:OP("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:OP("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:DP("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??NP.DividerLight),divider:DP("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??NP.DividerDark),background:DP("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??NP.Transparent)}}}}}}]}),XP=e=>({type:"items",items:{nullValueText:e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:IP},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:XD.Auto,translation:"Common.Auto"},{value:XD.Pixels,translation:"Object.Table.Column.Pixels"},{value:XD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:XD.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:KD.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===XD.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:KD.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===XD.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),JP=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},ZP=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[KP(e,t),XP(t)]},...JP(t)}}),QP="auto",eq={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:QP,translation:"Object.Table.SortingInSearch",options:[{value:QP,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function tq(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:yP(e),sorting:eq,addons:tP,settings:ZP(t,n)}}}function nq(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:tq(e),importProperties:KA(e),exportProperties:XA,exploration:cA(e),data:JA(e),migrate:eP(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new DA(t,e):void 0}}const rq=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function oq(e,t){return L(()=>e,t)}const iq={},aq=e=>{const t=L(()=>({current:iq}),[]);return t.current=t.current===iq?e:t.current,t},sq=e=>!!e&&0===QR(e).a,lq="#grid",cq=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},uq=(e,t,n,r,o)=>{const i=cq(".qv-object .qv-inner-object",n),a=cq(".qv-panel-sheet",n),s=cq(lq,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return TM(n);if("none"===r)return"transparent";if(void 0===r)return;const i=QR(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=sq(d),f=!sq(h=p?s:d)&&PM(h,FR.TEXT,FR.DARK_MODE_TEXT)===YR(FR.DARK_MODE_TEXT);var h;const m=((e,t,n,r=FR.WHITE)=>e&&!sq(e)?e:sq(t)?n&&!sq(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},dq=(e,t,n,r)=>{const o=k(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=P([]);return q(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(lq),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return L(()=>({...o,background:uq(e,o,t,n,r)}),[o.name(),t,n,r,e,i])};function pq(e,t){const n=L(()=>({isLoading:!0}),t),[r,o]=A(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,o]}const fq=3,hq=/\n/g;function mq(e,t,n){let r=0,o=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function gq({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=fq,allowLineBreaks:a=!0}=o??{},{estimateWidth:s,measureText:l,estimateLineCount:c}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o)=>{const{maxNbrLinesOfText:i=fq,allowLineBreaks:a=!0}=o??{};return()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const s=o.measureText.bind(o),l=wM(e=>{if(void 0===e)return 0;if(a){const t=e.split(hq).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(hq," ");return s(t).width}),c=e=>+l(e).toFixed(2),u=wM(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(hq):[e];let o=0;for(const e of r){let n=e;do{o+=1,n=mq(n,t,c)}while(null!==n&&o<i);if(o>=i)break}return o},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:u}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:i,allowLineBreaks:a})(),[n,r,e,t,i,a]);return{estimateWidth:s,measureText:l,estimateLineCount:c}}var vq,bq={};var yq=function(){if(vq)return bq;vq=1;var e=E;return bq.createRoot=e.createRoot,bq.hydrateRoot=e.hydrateRoot,bq}();const xq="Source Sans Pro, sans-serif";function Sq(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var wq={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.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":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen 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":"Geselecteerde waarden 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":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.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":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.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":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.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":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.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":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.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":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.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":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier 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":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier 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":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.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":"{0}/{1}","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}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.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":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.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":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.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":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.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":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.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":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.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":"選取頁面"}}};const Cq=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(wq).forEach(t=>{e.add(wq[t])})}}(e)},[e]),e),Eq=Sf({}),Iq=Sf(e=>{const t=e(Eq);return uh(t,{tag:"sn-pivot-table"})}),Dq={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Rq={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Lq=Ms("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Dq},"&::-moz-range-track":{...Dq},"&::-ms-track":{...Dq},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Rq},"&::-moz-range-thumb":{...Rq},"&::-ms-thumb":{...Rq},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),Mq=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=Cq({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,v=()=>g?h.current.columnWidth-m:"100%",b={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},y=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};Sq(()=>{g&&y()},[e]);const x=e=>{const t=Math.max(e,KD.PixelsMin);h.current.columnWidth=t,i(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:XD.Pixels,pixels:h.current.columnWidth};a(e)}c?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{OM(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{OM(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===UD.Left||e.key===UD.Right){OM(e);const t=5,n=e.key===UD.Left?t:-t,r="rtl"===p?n:-n;c?.(!0),x(h.current.columnWidth+r)}else e.key===UD.Space||e.key===UD.Enter?(OM(e),s(e),c?.(!1),S()):e.key===UD.Esc&&(OM(e),s(e),c?.(!1),x(h.current.initWidth))}:void 0,R=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return hi.jsx(Lq,{style:b,hoverColor:o,isLastColumn:n,className:YD,"data-testid":YD,onMouseDown:e=>{OM(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),c?.(!0),y(e.clientX)},onDoubleClick:()=>{a({type:XD.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(OM(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),c?.(!0),y(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{y()},type:"range",tabIndex:-1,"aria-label":R,"aria-valuemin":KD.PixelsMin,"aria-valuemax":KD.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Aq=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),Pq=Ms(mc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),qq=Ms(Aq,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),kq=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Tq=Ms(cu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Oq=Ms(Od)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),Nq=Ms(Od,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),_q=Ms("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),jq=Ms("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),Fq=Ms(Pl)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),zq=Ms(rd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),Wq=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),$q=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?$q(t):t:e.parentElement?.children?.[0]},Vq=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?Vq(t):t},Hq=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===UD.Down||t===UD.Up){const n=e=>t===UD.Down?$q(e):Vq(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},Bq=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let Gq={};const Uq=({autoFocus:e,id:t,onClick:r,itemTitle:o,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:c,direction:u,isPagination:d})=>{const[p,h]=m(!1),g=n.useRef(null),v=f(e=>{e.stopPropagation(),h(!1)},[h]);return hi.jsxs(hi.Fragment,{children:[hi.jsxs(Nq,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),Gq={}),s?.length&&(h(!0),Gq[o]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:Hq,children:[c?hi.jsx(_q,{direction:u,isPagination:d}):null,hi.jsxs(jq,{children:[hi.jsx(zq,{direction:u,isPagination:d,children:hi.jsx(i,{})}),hi.jsx(Fq,{variant:"body2",children:o})]}),s?.length?hi.jsx(Wq,{}):null]},t),s?.length?hi.jsx(Jq,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:v,menuGroups:Bq(s,Gq),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:d}):null]})},Yq=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&hi.jsx(Oq,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>hi.jsx(Uq,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),Kq=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[Yq({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?hi.jsx(Tq,{"data-testid":"group-divider",variant:"middle"}):void 0]),Xq={appear:0,enter:0,exit:0},Jq=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?hi.jsx(kq,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:Xq,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:Kq({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,Zq=(e,t)=>e.some(e=>t[e]>0),Qq={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},ek=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(Qq);return Sq(()=>{e||(s(Qq),i(null))},[e]),d(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:Zq(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:Zq(["qSelected"],e),canSelectPossible:Zq(["qOption"],e),canSelectAlternative:Zq(["qAlternative"],e),canSelectExcluded:Zq(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},tk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),nk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),rk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("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.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),ok=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),ik=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),ak=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),sk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),lk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),ck=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 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.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),uk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-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 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),dk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{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-.5m-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 0m14 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-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-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 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 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 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),pk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{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-.5m-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 0m14 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-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-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 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 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 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),fk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{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-.5m-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 0m14 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-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-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 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 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 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),hk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let mk=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const gk="/qListObjectDef",vk=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[mk.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:tk,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:ok,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:lk,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:ik,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[mk.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:ck,enabled:!0}]}]),!e.isLocked&&n[mk.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:hk,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(gk))},icon:uk,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(gk))},icon:fk,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(gk))},icon:dk,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(gk))},icon:pk,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(gk))},icon:nk,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:sk,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:ak,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[mk.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:rk,enabled:!0}]}]),f},bk=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:c,searchRelatedArgs:u,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:v,isAccessibleHeader:b,iconSize:y=HD})=>{const x=l(null),S=Cq({translator:o}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:R}=ek({open:e,headerData:r,app:I,qStateName:d?.qStateName}),L=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]))({qLibraryId:w,fieldId:C,searchRelatedArgs:u,selectionRelatedArgs:d,direction:g}),A=f(e=>{e.stopPropagation(),t(!1)},[t]),P=f(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?hi.jsxs(Pq,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===b?P:void 0,ref:x,isAccessibleHeader:b,children:[s?hi.jsx(qq,{height:y,className:BD,"data-testid":BD,isInteractionsActive:i.active??!1,children:hi.jsx(Aq,{})}):null,hi.jsx(Jq,{open:e,anchorEl:!1===b?x.current:n.current,onClose:A,menuGroups:vk({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:M,interactions:i,fieldInstance:D,selectionActionsEnabledStatus:R,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:L,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},yk=e=>e.isDark?{background:e.color,borderColor:FR.DARK_MODE_BORDER,color:FR.DARK_MODE_TEXT,disabledColor:FR.DARK_MODE_DISABLED,iconColor:FR.DARK_MODE_TEXT}:{background:e.color,borderColor:FR.BORDER_MEDIUM,color:FR.TEXT,disabledColor:FR.DISABLED},xk=Ms(mc,{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}`})),Sk=Ms(mp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),wk=Ms(Ic,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),Ck=Ms(Pl)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),Ek=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=v(()=>yk(r.background),[r]);if(!n.active)return null;const a=o?hi.jsx(xk,{footerStyle:i,children:e}):null;return t?E.createPortal(e,t):a},Ik=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),Dk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),Rk=c({}),Lk=()=>h(Rk),Mk=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(u)?0:-1,y=v(()=>yk(p.background),[p]),x=o?o.getBoundingClientRect().width:h.width,S=Cq({translator:d}),w=v(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:b,width:x,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,c,u,S,p,f,h,m,y,b,x,g]);return hi.jsx(Rk.Provider,{value:w,children:e})},Ak=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let Pk=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),qk=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const kk=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=Lk(),c=0===t.page,u=Ak({type:Pk.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||qk.FirstPage)?null:hi.jsx(wk,{...u,disabled:!r.active,children:"rtl"===e?hi.jsx(Dk,{height:HD}):hi.jsx(Ik,{height:HD})})},Tk=(e,t,n=!1)=>{n&&e.key===UD.Tab&&!e.shiftKey&&(OM(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},Ok=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=Lk(),p=t.page>=r-1,f=Ak({type:Pk.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{Tk(e,n,o)}:void 0;return i<=(s?.lastPage||qk.LastPage)?null:hi.jsx(wk,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?hi.jsx(Ik,{height:HD}):hi.jsx(Dk,{height:HD})})},Nk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),_k=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=Lk(),d=t.page>=r-1,p=Ak({type:Pk.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),f=!(i>qk.FirstPage&&i>qk.LastPage)&&n.enabled?e=>{Tk(e,n,o)}:void 0;return hi.jsx(wk,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?hi.jsx(Nk,{height:HD}):hi.jsx(Wq,{height:HD})})},jk=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=Lk(),s=0===t.page,l=Ak({type:Pk.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return hi.jsx(wk,{...l,disabled:!n.active,children:"rtl"===e?hi.jsx(Wq,{height:HD}):hi.jsx(Nk,{height:HD})})},Fk=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=Lk(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||qk.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return hi.jsx(Ck,{variant:"caption",dir:"ltr",children:s})},zk=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=Lk(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return hi.jsxs(hi.Fragment,{children:[hi.jsxs(Ck,{variant:"caption",id:p,children:[u,":"]}),hi.jsx(Sk,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},Wk=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=Lk();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||qk.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=hi.jsx(hi.Fragment,{children:e.rowsPerPageOptions.map(e=>hi.jsx("option",{value:e,children:e},e))});return hi.jsx(zk,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},$k=1e3,Vk="…",Hk=({totalPages:e,page:t})=>{const n=Math.min(e,$k),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-$k):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return hi.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(hi.jsx("option",{value:Vk,disabled:!0,children:Vk},"startMoreOptions")),o<e-1&&a.push(hi.jsx("option",{value:Vk,disabled:!0,children:Vk},"endMoreOptions")),hi.jsx(hi.Fragment,{children:a})},Bk=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=Lk(),{page:i}=e;if(t<=(o?.selectPage||qk.SelectPage))return null;const a=hi.jsx(Hk,{totalPages:n,page:i});return hi.jsx(zk,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var Gk=y(e=>hi.jsxs(Mk,{...e,children:[hi.jsx(Wk,{}),hi.jsx(Bk,{}),hi.jsx(Fk,{}),hi.jsx(kk,{}),hi.jsx(jk,{}),hi.jsx(_k,{}),hi.jsx(Ok,{})]}));const Uk=e=>hi.jsx(Ek,{...e,children:hi.jsx(Gk,{...e})}),Yk=Sf(null),Kk=Sf({current:!1}),Xk=Sf({minRow:0,maxRow:0,minCol:0,maxCol:0}),Jk=Sf({HEADER:null,TOP:null,LEFT:null,DATA:null,WRAPPER:null}),Zk=Sf(null);Sf(e=>({focusCoord:e(Yk),shouldRefocus:e(Kk),pivotSectionBounds:e(Xk),pivotSection:e(Jk),pivotCoord:e(Zk)})),Sf(null,(e,t,n)=>{t(Yk,n)}),Sf(null,(e,t,n)=>{t(Xk,e=>({...e,...n}))});const Qk=Sf(null,(e,t,n)=>{t(Jk,e=>({...e,...n}))}),eT=c({}),tT=()=>h(eT),nT=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o,children:i})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o}),[e,t,n,r,o]);return hi.jsx(eT.Provider,{value:a,children:i})},rT=c({}),oT=()=>h(rT),iT=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:s,children:l})=>{const c=v(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:s,translator:i}),[e,a,t,r,n,o,s,i]);return hi.jsx(rT.Provider,{value:c,children:l})},aT=c({}),sT=()=>h(aT),lT=({children:e,...t})=>hi.jsx(aT.Provider,{value:t,children:e}),cT=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const{theme:e,translator:t}=oT(),{layoutService:n}=sT(),r=e.getStyle("","","fontFamily")??SP;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:hi.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:hi.jsx("span",{style:{...WP,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},uT="/qHyperCubeDef",dT=-1,pT="PSEUDO-DIM",fT=e=>e===dT?pT:(({cId:e})=>e??yA())(e),hT=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===dT?n.columnWidthLocation=cP.Measures:n.isLeftDimension?n.columnWidthLocation=cP.Dimension:t.at(-1)===dT?n.columnWidthLocation=cP.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=cP.Pivot))},mT=e=>{if(!e)return;const{background:t,foreground:n}=e,r=QR(t??""),o=QR(n??""),i=r.isInvalid()?void 0:r.getRGBA(),a=i?kM(i,JD):void 0,s=i?kM(i,ZD):void 0;return o.isInvalid()&&void 0!==i?{background:i,color:PM(i),headerMenuHoverBackground:a,headerMenuActiveBackground:s}:{background:i,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:a,headerMenuActiveBackground:s}},gT=(e,t,n,r,o)=>{const i=fT(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===dT?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:cP.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===QD.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:cP.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName,headerColor:o?.("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?mT(n.headerColor):void 0}},vT=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})=>{let i=r;var a;n.length>0&&(i=(a=r).at(-1)===dT?a.slice(0,-1):a);const s=i.length+(n.length?1:0),l=Math.max(1,n.length),c=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(s,l);return n.forEach((n,r,i)=>{const a=r===i.length-1;c[s-1][r]=gT(e,t,n,a,o)}),i.forEach((n,r,i)=>{const a=r===i.length-1;c[r][l-1]=gT(e,t,n,a,o)}),c},bT=(e,t,n,r,o)=>{const i=((e,t,n,r,o)=>{let i;return i=0===n.length||n.includes(dT)?vT({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n,isEnabled:o}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(vT({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})),e.isIndentModeEnabled&&i.length&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{hT({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):hT({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r,o);return{data:i,size:{x:i[0]?.length??0,y:i.length}}},yT=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,xT=5e6,ST=5e5;const wT={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:CT(e),value:CT(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function CT(e){try{return decodeURIComponent(e)}catch{return e}}function ET(e){if(!(this instanceof ET))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>wT.fromSearchString(t.search)}})}function IT(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}ET.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},ET.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=IT(t.key),t.value?n+=`=${IT(t.value)}`:n+=t.useEqualSign?"=":"";return n};var DT=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},RT=class{decode(e){let t="";const n=new DT(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const LT=e=>e>=0&&e<=1114111,MT=e=>e.match(/[\s]/);var AT=class extends RT{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!MT(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return LT(a)?String.fromCharCode(a):"�"}},PT=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},qT=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return PT.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return PT.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||PT.newInstanceIfNeeded(e,t,this._value)}},kT=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new qT);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const TT=(()=>{const e=[],t=[],n=new kT;let r,o,i;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var OT=class extends RT{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,TT.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=TT.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&LT(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&LT(r)?String.fromCharCode(r):null}},NT=class extends RT{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),LT(i))?String.fromCharCode(i):(e.reset(),null)}};let _T;"undefined"!=typeof document&&(_T=document.createElement("div"));const jT=Array.prototype.indexOf,FT=[",",".","_"," "],zT=[",",".","-","_"," "],WT={width:["%"],height:["%"]},$T={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},VT={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":$T.image,"background-color":$T.color,"border-color":$T.color,"border-image":$T.image,color:$T.color,icon:$T.image,"list-style-image":$T.image,"outline-color":$T.color},HT={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function BT(e,t,n){let r;if(t){if(jT)return jT.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function GT(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return _T.appendChild(n),t=_T.innerHTML,_T.removeChild(n),t}function UT(e,t,n){let r,o,i,a,s,l,c,u,d;for(e=KT(e).toLowerCase(),t=KT(t),i=0;i<HT.attr_name.length;i++)if(e.match(HT.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<HT.attr_val.length;i++)if(t.toLowerCase().match(HT.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=WT[e],r||(r=zT),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&BT(c,r)<0?(d=u.toString(16),o+=`&#x${d};`):o+=c;return n||(o+='"'),o}function YT(e,t,n){let r,o,i,a,s,l,c,u,d,p;if(e=KT(e).toLowerCase(),t=KT(t),BT(e,HT.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<HT.css_val.length;r++)if(t.toLowerCase().indexOf(HT.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=VT[e],o||(o=$T.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&BT(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=c;return i}function KT(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new OT,new NT,new AT];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const XT=[];for(let e=0;e<255;e++)XT[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const JT={html:e=>GT(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=YT(t,n[t],!0),i+=YT(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=UT(e,t[e],!0),o+=UT(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function ZT(e,t){throw new Error(t)}var QT={canonicalize:KT,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?JT.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&ZT(this,"Invalid parameter type"),JT.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&ZT(this,"Invalid parameter type"),JT.attr(e)):void ZT(this,"Invalid parameter type")},encodeForAttr:UT,encodeForAttr2:function(e){return UT("nonsens",e,!0)},encodeForCSS:YT,encodeForHref:function(e){KT(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new ET(e),n=ET.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+ET.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=FT),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),BT(o,t)>=0||null==XT[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:GT,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=KT(t).toLowerCase():ZT(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=ST,maxByteSizeImage:r=xT}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=yT.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const eO=(e,t)=>t.qAttrExps?.qValues?.[e],tO=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},nO=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!QT.isSafeDataURL(t))?{type:nP.Text,url:void 0,text:e,labelStructure:o}:{type:nP.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:tO(r,a),labelStructure:o,imageBox:i},rO=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:nP.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:nP.MiniChart,text:r,miniChart:a}},oO=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===rP.Attribute?void 0:n?.urlLabel},iO=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:nP.Link,url:QT.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:nP.Text,url:void 0,text:t,labelStructure:e}}},aO=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=oP(t),d=s(e);return u===nP.Image&&c[nP.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=eO(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),nO({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return nO({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=eO(n.imageLabel??-1,e)?.qText??r;return nO({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:nP.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,d,l,a):u===nP.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===rP.Attribute){const i=oO(n.url??-1,e,t);return iO({labelStructure:r,text:o||i||"",url:i})}if(i===rP.Dimension){const i=oO(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),iO({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:nP.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,a,d):u===nP.Indicator&&c[nP.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:nP.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,d):u===nP.MiniChart&&c[nP.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?rO(e,t,i,d):{type:nP.Text,url:void 0,text:d,labelStructure:a}},sO=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?TM(o):null,a=r?TM(r):null,s=((e,t)=>e||!t?null:PM(t))(a,i);return{color:s??a,background:i}},lO=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:lO(e,t),e),cO=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:CP-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,lO(s,e))},uO=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,pseudoDimMeasureIndex:d,indentLevel:p,labelStructure:f,env:h,pageInfo:m,direction:g="ltr"})=>{const v=(!u||!c)&&"P"===e.qType,b=((e,t)=>{if(e!==dT){if(t){const t=oP(e.representation);return t===nP.Link||t===nP.Image?e.representation:{type:nP.Text}}return e.representation}})(s,u),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===nP.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:c,isIndentModeEnabled:u,labelStructure:f,representationType:oP(b),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),x=aO({cell:{...e,qText:y},representationProperties:b,attrExprInfoIndex:l,env:h,labelStructure:f,direction:g,enabledFeatures:{[nP.Image]:!0,[nP.Indicator]:!0}}),S={id:yA(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:c?i:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:cO(e,o,i,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:v,expressionColor:sO(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:d??(v?e.qElemNo:t?.visibleMeasureInfoIndex),representation:x,...void 0!==p&&{indentLevel:p},headerColor:v&&h.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")&&void 0!==e.qElemNo?mT(a.visibleMeasureInfo[e.qElemNo]?.headerColor):void 0};return t&&(t.children[S.mainAxisPageCoord-t.mainAxisPageCoord]=S),S},dO=(e,t,n,r,o,i,a,s,l)=>{const{isIndentModeEnabled:c}=o,u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING");if(!t.length)return e;let d=0;return function t(p,f,h,m=0,g=-1){e[m]||(e[m]={}),c&&g++;const v=o.leftDimensionInfoIndexes.indexOf(dT);h.forEach((h,b)=>{const y={originalValue:h.qText??"",maskedValue:"",delimeter:"-",suffix:""};d+=0===b?0:1;const x=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,x+d-h.qUp),w=n.qTop+d-h.qUp;let C;if(c){if(o.hasPseudoDimOnLeft&&g<=v)if(y.originalValue=h.qText??"",y.maskedValue=h.qText??"","N"===h.qType||"U"===h.qType||"T"===h.qType)"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText()),g<v&&(y.suffix=o.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===h.qType){y.originalValue=(f||p)?.representation.labelStructure?.originalValue??"",y.maskedValue=(f||p)?.representation.labelStructure?.originalValue??"",y.suffix=h.qText??"";const e=h.qSubNodes;C=h.qElemNo,h={...(f||p)?.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},g=(f||p)?.indentLevel??0}"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText())}let E=m;c&&(E=v>=1&&g>=v?g+1:g,0===g&&0===v&&0===h.qSubNodes.length&&(E=0));const I=e.at(m)?.[S],D=c&&void 0===I?.ref.qText||!I?uO({node:h,parent:f,root:p,x:E,y:w,pageY:S,layoutService:o,dimensionInfo:i[E],attrExprInfoIndex:a[E],isLeftColumn:!0,...c&&{isIndentModeEnabled:c,indentLevel:g},env:s,pageInfo:r,labelStructure:y,direction:l,pseudoDimMeasureIndex:C}):e[m][S];if(e[m][S]=D,h.qSubNodes.length){const e=c?0:m+1;t(p||D,D,h.qSubNodes,e,g)}})}(null,null,t,0,-1),e},pO=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},fO=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},hO=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s})=>{const{qLeft:l,qArea:c}=t;if(!l.length)return e;const u=dO(e.grid,l,c,n,r,o,i,a,s);pO(u,n.rowsOnCurrentPage);const d=fO(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:d}},mO=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach((t,n)=>{t.forEach((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:yA(),ref:t,isNull:l}})}),o},gO=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?mO({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},vO=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??uO({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},bO=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=vO(e.grid,c,u,n,r,o,i,a,s,l);pO(d,n.size.x);const p=fO(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},yO=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),xO=(e,t)=>{const{env:n}=oT(),{direction:r}=tT(),{layoutService:o,effectivePropertiesService:i}=sT(),{qPivotDataPages:a,pageInfo:s}=tT(),[l,c]=m(null),u=((e,t,n)=>v(()=>({left:e.map(yO),top:t.map(yO),measures:n.map(yO)}),[n,e,t]))(e,t,o.visibleMeasureInfo),d=n.flags.isEnabled,p=v(()=>bT(o,i,t,e,d),[o,i,t,e,d]),h=f(()=>a.slice(1).reduce((e,t)=>gO({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return mO({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),g=f(()=>a.slice(1).reduce((e,i)=>bO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:p.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=vO([],c,l,t,n,r,o,i,a,s);pO(u,t.size.x);const d=fO(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],o,t,u.top,p.size.y,n,s,r)),[a,o,t,u.top,p.size.y,n,s,r]),b=f(()=>a.slice(1).reduce((t,i)=>hO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r}),((e,t,n,r,o,i,a)=>{const{qArea:s,qLeft:l}=e,c=dO([],l,s,n,t,r,o,i,a);pO(c,n.rowsOnCurrentPage);const u=fO(c,t);return{grid:c,columnCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(a[0],o,s,e,u.left,n,r)),[a,o,s,e,u,n,r]),[y,x]=m(()=>h()),[S,w]=m(()=>g()),[C,E]=m(()=>b());Sq(()=>{x(h())},[h]),Sq(()=>{w(g())},[g]),Sq(()=>{E(b())},[b]),Sq(()=>{l&&l.forEach(i=>{x(e=>gO({prevData:e,dataPage:i,pageInfo:s})),w(e=>bO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:p.size.y,env:n,pageInfo:s,direction:r})),E(t=>hO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r}))})},[l]);const I=f(e=>{c(e)},[]);return{headersData:p,measureData:y,topDimensionData:S,leftDimensionData:C,attrExprInfoIndexes:u,nextPageHandler:I}},SO=Math.sqrt(1e4),wO=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/KD.PixelsMin)}),CO=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/SO),r=Math.ceil(e.qHeight/SO);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*SO,qTop:e.qTop+n*SO,qWidth:Math.min(SO,e.qWidth-o*SO),qHeight:Math.min(SO,e.qHeight-n*SO)});return t};function EO({nextPageHandler:e}){const{model:t}=oT(),n=kf(Iq),{pageInfo:r}=tT(),{layoutService:o}=sT(),i=(e=>{const t=l(e);return t.current=e,t})(r.page),a=t,s=f(async(e,t)=>{await(a?.collapseLeft(uT,e,t,!1))},[a]),c=f(async(e,t)=>{await(a?.collapseTop(uT,e,t,!1))},[a]),u=f(async(e,t)=>{await(a?.expandLeft(uT,e,t,!1))},[a]),d=f(async(e,t)=>{await(a?.expandTop(uT,e,t,!1))},[a]),p=f(async t=>{if(a?.getHyperCubePivotData&&0!==t.length)try{const n=await a.getHyperCubePivotData(uT,t.reduce((e,t)=>[...e,...CO(t)],[]));i.current===r.page&&e(n)}catch(e){n.error({msg:"Failed to fetch pivot pages",payload:e})}},[a,e,r,i,n]),h=f((e,{dimensionInfoIndex:n,isLeftColumn:r,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=o.layout.qHyperCube;let u=[];switch(a){case cP.Dimension:u=[{qPath:`${uT}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case cP.Measures:if(r)u=s.map((e,t)=>({qPath:`${uT}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=o.getMeasureInfoIndexFromCellIndex(i);u=[{qPath:`${uT}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case cP.Pivot:u=[{qPath:`${uT}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,o]),m=f(async e=>{await(a?.applyPatches([{qPath:`${uT}/indentModeColumnWidth`,qOp:o.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...o.indentModeColumnWidth,...e})}],!0))},[a,o]);return v(()=>({collapseLeft:s,collapseTop:c,expandLeft:u,expandTop:d,applyColumnWidth:h,applyIndentModeColumnWidth:m,fetchPages:p}),[s,c,u,d,h,m,p])}const IO=(e,t,n)=>(r,o)=>{if("P"===r)return dT;const i=t[n+o];return e[i]},DO=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},RO=c({}),LO=()=>h(RO),MO=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=sT(),{qPivotDataPages:r}=tT();return v(()=>{const o=DO(r[0]?.qLeft??[]),i=DO(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(IO(n,t,0)),visibleTopDimensionInfo:i.map(IO(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=xO(t,n),c=EO({nextPageHandler:l}),u=v(()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:c}),[t,n,r,o,i,a,s,c]);return hi.jsx(RO.Provider,{value:u,children:e})},AO=20,PO=18,qO=.75,kO=e=>-1!==e&&e?.representation?.type===nP.Image,TO=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===nP.Image,OO=e=>void 0===e?wP:e,NO=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},_O=e=>NO(e,KD.PixelsDefault),jO=(e,t)=>NO(e,KD.PercentageDefault)*t/100,FO=(e,t,n)=>{switch(t?.type){case XD.Pixels:return _O(t.pixels);case XD.Percentage:return jO(t.percentage,e);case XD.FitToContent:case XD.Auto:default:return n}},zO=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:o,measureTextForHeader:i,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c,qDimensionInfo:u}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=u.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===pT)return e+0;const v=TO({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:nP.Text}})?g.width+8+4:r(f),b=!n.qAlwaysFullyExpanded&&p<c-1?21:0;let y=0;if(o&&i&&a){y=i("- ")+a}return Math.max(e,24*l+PO+b+v+y)},0),WO=(e,t,n)=>e.reduce((e,r)=>{const o=(n?0:1)*PO;return Math.max(e,o+t(r.qFallbackTitle??""))},0),$O=(e,t,n,r)=>{const o=100*e/t,i=r*qO*(o/100),a=o/100*+n;return Math.min(a,i)},VO=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),HO=(e,t)=>e.some(e=>e>=t*qO),BO=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:o,widthOverride:i,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u;const d=o*qO,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,zO({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,WO(e.visibleMeasureInfo,a));let g;const v=p.findIndex(e=>e.id===pT),b=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===XD.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+PO+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);u=[Math.max(b,e-f),f]}else{const n=Math.min(d,WO(e.visibleMeasureInfo,l,!0));g=Math.min(d,zO({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);u=[Math.max(b,r-f),f]}else u=[Math.max(b,h-f),f];const y=Math.min(d,u.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;i&&i<=d&&(x.type=XD.Pixels,x.pixels=i);return[XD.Pixels,XD.Percentage].includes(x.type)||HO(u,o)?((e,t,n,r)=>{let o=e[0],i=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:c}=t,u=NO(l,KD.PixelsDefault),d=NO(c,KD.PercentageDefault),p=HO(e,n);let f;s===XD.Auto&&p&&(o>i?o-=i:i-=o),s===XD.Pixels&&u&&(o=$O(e[0],a,u,n),i=$O(e[1],a,u,n)),s===XD.Percentage&&d&&(o=VO(e[0],a,d,n),i=VO(e[1],a,d,n)),i<=r&&(f=o-5,f>0&&(o-=f,i+=f)),f=i-r,f>0&&(o+=f,i-=f);const h=[o,i],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(u,x,o,f):{leftGridWidth:y,leftGridColumnWidths:u,leftGridFullWidth:y}};function GO({tableWidth:e}){const t=e*qO,{styleService:n,layoutService:r,effectivePropertiesService:o}=sT(),{translator:i}=oT(),{gridSectionsData:{headersData:a}}=LO(),{measureText:s}=gq(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:c}=gq({...n.dimensionValues,fontWeight:OO(n.dimensionValues.fontWeight)}),{measureText:u}=gq({...n.dimensionValues,...n.measureLabels}),d=f((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:o})=>{const i=u(r)+PO,a=Math.max(i,t);return Math.max(n,m?a:FO(e,o,a))},0),b=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===pT)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?AO:0;return PO+s(t)+AO+r})(r);return Math.max(o,t)},0);let y=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((i,s)=>{let c;if(m&&1!==a.size.x||!n||void 0===d||d!==i.colIdx){let t,n;if(i.columnWidthLocation===cP.Pivot?t=m?void 0:f:i.columnWidthLocation===cP.Dimension&&({columnWidth:t}=i),i.isLeftDimension)if(i.id===pT)n=v();else{const e=b(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:i,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(kO(s))return KD.PixelsDefault;const c=!o.qAlwaysFullyExpanded&&i&&t<p-1?21:0;return PO+l(n)+c})(i,s);n=Math.max(e,t),m&&!g&&s+1===p&&i.columnWidthLocation===cP.Dimension&&a.size.x>1&&(n=e)}else n=b(s),i.columnWidthLocation===cP.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),c=m&&!g&&a.size.x>1?n:FO(e,t,n)}else c=m?Math.min(t,n):n;return y+=c,c});return m&&a.size.x>1?BO({layoutService:r,effectivePropertiesService:o,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:c,translator:i}):{leftGridWidth:Math.min(t,y),leftGridColumnWidths:S,leftGridFullWidth:y}},[e,a,r,t,s,u,l,c,i,o]),[p,h]=m(d);Sq(()=>{h(d())},[d]);const g=f((e,t)=>{h(d(e,t))},[d]);return{...p,overrideLeftGridWidth:g}}function UO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=sT(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=LO(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:c}=o,{estimateWidth:u,measureText:d}=gq(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=gq({...r.dimensionValues,fontWeight:OO(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=i.at(-1),g=m===dT,b=s.length-a>i.length?21:0,y=v(()=>{const e=g?c:[m],t=l.x/e.length,n=[],r=[];let o=h;const i=(e,r)=>{n[e]=Math.min(KD.PixelsMax,Math.max(KD.PixelsMin,r)),o-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case XD.Pixels:i(t,_O(o));break;case XD.Percentage:i(t,jO(a,h));break;case XD.FitToContent:i(t,((e,t,n)=>n?KD.PixelsDefault:PO+(g?Math.max(u(e),d(t)):Math.max(Math.max(...c.map(e=>u(e.qApprMaxGlyphCount))),p(e)+b)))(s,l??"",kO(e)));break;case XD.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,i=o/e;r.forEach(e=>{n[e]=Math.max(KD.AutoMinPivot,i)})}return n},[g,c,m,l.x,h,u,d,p,b]),x=v(()=>{if(g){return c.reduce((e,t,n)=>e+y[n],0)/c.length}return y[0]},[g,y,c]),S=parseFloat((t/o.size.x).toFixed(12)),w=f(e=>(g&&void 0!==e?y[o.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-S,[g,y,o,x,S]),C=l.x*x;return{rightGridFullWidth:C,rightGridWidth:Math.min(C,h),getRightGridColumnWidth:w}}const YO=`scrollable-container--${dP.TopGrid}`,KO=`scrollable-container--${dP.LeftGrid}`,XO=`scrollable-container--${dP.DataGrid}`,JO=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},ZO=(e,t)=>e>t?pP.Forward:e<t?pP.Backward:pP.None,QO=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const{direction:s}=tT();d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),u.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[i,o,a,e,t,n,r,s])},eN=Sf(!1),tN=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,nN=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:o,data:i,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,o]=m({width:0,height:0}),[i,a]=m({width:0,height:0}),[s,c]=m({width:0,height:0}),[u,p]=m(!1),h=kf(eN),g=l(h),v=l(h);g.current=h;const b=f(()=>{p(e=>!e&&e);const r=JO(e.current),i=JO(t.current),s=JO(n.current);o(e=>tN(e,r)?r:e),a(e=>tN(e,i)?i:e),c(e=>tN(e,s)?s:e)},[e,t,n]);d(()=>{const r=new ResizeObserver(()=>{g.current||b()});return[e.current,t.current,n.current].filter(e=>Boolean(e)).forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[b,e,t,n]),d(()=>{const e=v.current;if(v.current=h,e&&!h){const e=setTimeout(b,0);return()=>{clearTimeout(e)}}},[h,b]);const y=f(()=>{p(!0)},[]);return{top:r,left:u?{...i,height:0}:i,data:u?{...s,height:0}:s,resetHorizontalScrollbarHeight:y}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,i.width),horizontalScrollbarHeight:Math.max(o.height,i.height)},resetHorizontalScrollbarHeight:a}},rN=()=>{const{interactions:e}=oT(),t=l(null),n=l(null),r=l(null),o=l(null),i=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u},resetHorizontalScrollbarHeight:p}=nN({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:s}=tT(),{downloadService:l,viewService:c,layoutService:u}=sT(),d=f(()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)},[e,t,n,r]);g(()=>{d()},[s.page,d]),g(()=>{u.triggerdByExpandOrCollapse||d()},[u,d]),g(()=>{if(u.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach(e=>{e?.scrollTo(t)}),o.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[u,r,a,i,o]),g(()=>{(l.isDownloadedAsPDForImage||u.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)},[c,l,u,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v}}=(()=>{const e=l(pP.None),t=l(pP.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=f(r=>{if(r instanceof WheelEvent&&(e.current=ZO(r.deltaY,0),t.current=ZO(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=ZO(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=ZO(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=sT();return f(t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===KO&&(e.leftGridScrollLeft=r.scrollLeft),o===XO&&(e.scrollLeft=r.scrollLeft),o===YO&&(e.topGridScrollTop=r.scrollTop),o!==KO&&o!==XO||(e.scrollTop=r.scrollTop)},[e])})(),y={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},getWrapperElements:f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current}),[t,n,r,o]),updateViewService:b,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{d(()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{e.ctrlKey||(e.preventDefault(),o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t))},f=r=>{r.ctrlKey||(r.preventDefault(),c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(c.scrollLeft)}),l.scrollTop=c.scrollTop,t.current?.forEach(e=>{e?.scrollTo(c.scrollTop)}),i(r))};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",f),a.scroll||setTimeout(()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)},0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)}},[i,o,a,e,t,n,r])})(y),QO(y),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u,resetHorizontalScrollbarHeight:p}}},oN=()=>{const{layoutService:e}=sT(),{rect:t,pageInfo:n}=tT();return v(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},iN=({children:e,style:t})=>hi.jsx("div",{"data-testid":"fullSize",style:t,children:e}),aN=({children:e,style:t})=>{const{direction:n}=tT();return hi.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},sN=e=>e&&`scrollable-container--${e}`,lN=({children:e,style:t,origin:n},r)=>{const{interactions:o}=oT(),i=o.scroll?t:{overflow:"hidden"};return hi.jsx("div",{"data-testid":"scrollable","data-key":sN(n),style:i,ref:r,children:e})};var cN=n.forwardRef(lN);const uN=({children:e,style:t})=>{const{direction:n}=tT();return hi.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var dN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function pN(e,t){return e===t||!(!dN(e)||!dN(t))}function fN(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!pN(e[n],t[n]))return!1;return!0}function hN(e,t){var n;void 0===t&&(t=fN);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var mN="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function gN(e){cancelAnimationFrame(e.id)}function vN(e,t){var n=mN();var r={id:requestAnimationFrame(function o(){mN()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var bN=-1;function yN(e){if(void 0===e&&(e=!1),-1===bN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),bN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return bN}var xN=null;function SN(e){if(void 0===e&&(e=!1),null===xN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?xN="positive-descending":(t.scrollLeft=1,xN=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),xN}return xN}var wN=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function CN(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,Xs(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Xs(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=hN(function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=hN(function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),f=e+":"+t;if(u.hasOwnProperty(f))o=u[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;u[f]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=hN(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(SN()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&gN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=vN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return EN(e,t),v(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=yN();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=s(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,x=b>d?v:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(SN()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&gN(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?wN:f,m=e.outerElementType,g=e.outerTagName,v=e.rowCount,b=e.style,y=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],R=I[1],L=[];if(o>0&&v)for(var M=D;M<=R;M++)for(var A=C;A<=E;A++)L.push(r(t,{columnIndex:A,data:p,isScrolling:y?S:void 0,key:h({columnIndex:A,data:p,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,A)}));var P=s(this.props,this._instanceProps),q=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},b)},r(u||d||"div",{children:L,ref:c,style:{height:P,pointerEvents:S?"none":void 0,width:q}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,b=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,b,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=o(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=h(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var EN=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},IN=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},DN=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},RN=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},LN=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?MN(e,t,n,i,0,r):AN(e,t,n,Math.max(0,i),r)},MN=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=RN(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},AN=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&RN(e,t,r,n).offset<o;)r+=a,a*=2;return MN(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},PN=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=RN(e,t,n,i),c="column"===e?DN(t,i):IN(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){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}},qN=CN({getColumnOffset:function(e,t,n){return RN("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return LN("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=RN("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=RN("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:IN,getEstimatedTotalWidth:DN,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return PN("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return PN("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return RN("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return LN("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=RN("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=RN("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),kN=function(e,t){return e};function TN(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Xs(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Xs(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=hN(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=hN(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=hN(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(SN()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&gN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=vN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return ON(e,t),d(e),null};var p=t.prototype;return p.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)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?yN():0:l.scrollHeight>l.clientHeight?yN():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(SN()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&gN(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?kN:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,v=e.style,b=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var R=E;R<=I;R++)D.push(r(t,{data:d,key:f(R,d),index:R,isScrolling:b?x:void 0,style:this._getItemStyle(R)}));var L=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},r(l||c||"div",{children:D,ref:s,style:{height:S?"100%":L,pointerEvents:x?"none":void 0,width:S?L:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ON=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},NN=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},_N=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=NN(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},jN=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&NN(e,n,t).offset<r;)n+=i,i*=2;return _N(e,t,Math.min(n,o-1),Math.floor(n/2),r)},FN=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},zN=TN({getItemOffset:function(e,t,n){return NN(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:FN,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=NN(e,t,o),p=FN(e,o),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?_N(e,t,o,0,n):jN(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=NN(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=NN(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function WN(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var $N=["style"],VN=["style"];function HN(e,t){var n=e.style,r=ke(e,$N),o=t.style,i=ke(t,VN);return!WN(n,o)&&!WN(r,i)}const BN=10,GN=(e,t)=>e.current===pP.Backward?t:0,UN=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},YN=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,KN=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(UN(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&YN(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},XN=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===pP.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return KN({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},JN=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.size.x,l=GN(n,BN),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+BN,s-c),pageTop:o,qHeight:a}})(r,o,n),c=KN({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...XN({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},ZN=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},QN=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,e_=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(ZN(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&QN(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},t_=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=GN(n,BN),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+BN,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=e_({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===pP.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=e_({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},n_=(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],f=[];i.current!==pP.None&&(p=t_({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==pP.None&&(f=JN({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===pP.None&&a.current===pP.None&&(p=e_({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},r_=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-i,u=function(){i=Date.now(),r=0,e.apply(t,n)};r||(c>=o?u():r=setTimeout(u,o-c))}}(n_,100),o_=CM(n_,75),i_=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),a_=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{direction:s}=tT(),{styleService:{grid:{border:l,divider:c}}}=sT();return hi.jsx("div",{style:{...e,...zP,...HP(n,r,l,s,o),...GP({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},s_=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:o})=>{const{layoutService:{isIndentModeEnabled:i}}=sT(),a=o&&i;return hi.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},l_=e=>{const{type:t,imageSize:n}=e;return t!==nP.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},c_=e=>"number"==typeof e&&!Number.isNaN(+e),u_=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,d_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),p_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),f_=x((e,t)=>hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[hi.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),hi.jsx("use",{fillRule:"evenodd"})]})),h_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),m_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),g_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),v_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M2 7.5h12v1H2z"})})),b_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),y_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),x_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),S_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),w_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),C_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),E_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),I_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),D_={m:w_,"ï":x_,R:x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:C_,T:E_,U:I_,P:y_,Q:g_,"è":x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":h_,"©":f_,"23F4":m_,2013:S_,"&":b_,add:d_,"minus-2":v_,dot:p_},R_=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&D_[t];return o&&hi.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:hi.jsx(o,{style:{height:e}})})},L_=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),M_=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},A_=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return QR(e.localPaletteColors[t].color??"").blend(QR(s.color??""),s.t)},P_=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:L_(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:M_(r,t,n)}))),r},q_=(e,t,n,r)=>{const o=P_(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=A_(e,a,t);break}r=i}return n})(o,t);return a},k_=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!c_(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!c_(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},T_=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=k_(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!c_(t))return 0;let a=n&&c_(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},O_=e=>"flex-start"===e?"flex-end":"flex-start",N_=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=T_(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return M_(o,n.limitPaletteColorIndex,r);const a=L_(n.limitRange,t);return q_(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[i?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},__=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=sT(),{theme:o}=oT(),{direction:i}=tT(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=N_(e,t,i,o),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||xP,10),{iconKey:b,color:y,position:x}=u||{},S={display:"flex",paddingTop:2};return l?hi.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:c?y:n?.color},children:["left"===x&&R_({size:v,iconKey:b,color:y,pvStyle:S}),hi.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&R_({size:v,iconKey:b,color:y,pvStyle:S})]}):(S.paddingTop=5,R_({size:v,iconKey:b,color:y,pvStyle:S}))},j_=e=>!!e.target?.getAttribute("class")?.includes(YD),F_=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},z_=e=>null!==e.target?.closest("[data-prevent-selection]"),W_=e=>"A"===e.target?.tagName,$_=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const V_=c({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),H_=()=>h(V_),B_=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=tT(),n=kf(Iq),r=e.isActive(),[o,i]=u(F_,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const a=f(async()=>{if(!o.activeSelection)return;var t,r;1===o.activeSelection.clientSelectedCells.size&&(t=o.engineSelectedCells,(r=o.activeSelection).clientSelectedCells.forEach((e,n)=>{t?.has(n)&&(r.clientSelectedCells.delete(n),t.delete(n))}));const a=new Map([...o.engineSelectedCells??new Map,...o.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:a}}),await e.select({method:"selectPivotCells",params:[uT,Array.from(a,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){n.error({msg:"Failed to select pivot cells",payload:e}),i({type:"mouseup",payload:{engineSelectedCells:o.engineSelectedCells}})}},[o,e,n]);d(()=>{if(o.activeSelection)return document.addEventListener("mouseup",a),()=>{document.removeEventListener("mouseup",a)}},[a,o.activeSelection]);const s=f((e,t)=>n=>{const r=t(e);j_(n)||z_(n)||W_(n)||!(e=>1===e.buttons)(n)||!r||i($_({startIndex:e,getCellFromIndex:t,cell:r}))},[]),l=f(t=>async()=>{o.activeSelection&&(e.isActive()||await e.begin([uT]),i({type:"mouseover",payload:{index:t}}))},[o.activeSelection,e]),c=f((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);j_(n)||z_(n)||W_(n)||!r||(i($_({startIndex:e,getCellFromIndex:t,cell:r})),a())},[a]),p=f(e=>!(!o.engineSelectedCells?.size&&!o.activeSelection?.clientSelectedCells.size||!o.selectedField||e.selectionCellType===o.selectedField.selectionCellType&&("L"===e.selectionCellType?o.selectedField.index===e.x:o.selectedField.index===e.y)),[o.activeSelection?.clientSelectedCells.size,o.engineSelectedCells?.size,o.selectedField]),h=f(e=>!p(e)&&(o.engineSelectedCells?.has(e.ref.qElemNo)||!!o.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[p,o.activeSelection?.clientSelectedCells,o.engineSelectedCells]);return v(()=>({isSelected:h,isActive:r,isLocked:p,createMouseDownHandler:s,createMouseOverHandler:l,createPointerUpHandler:c}),[h,r,p,s,l,c])}(t);return hi.jsx(V_.Provider,{value:n,children:e})},G_=e=>"fill"===e.representation.imageSize,U_=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&G_(e)&&t&&(n="center"),e.representation.type!==nP.Image||G_(e)?n:e.representation.resolvedImagePosition?.vertical};var Y_=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(Y_||{});const K_={brighter:.5,darker:.3,opacity:.03},X_=(e,{cell:t,styleService:n})=>{if(e===Y_.Background||e===Y_.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.dimensionNull[e]:t.isPseudoDimension?e===Y_.Background&&t.headerColor?.background?t.headerColor.background:e===Y_.Color&&t.headerColor?.color?t.headerColor.color:n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},J_=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=X_(Y_.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?X_(Y_.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${kM(i=o,K_)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},Z_=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:X_(Y_.Color,{cell:e,styleService:t}),Q_=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=X_(Y_.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?wP:o},ej=({cell:e,styleService:t})=>X_(Y_.FontStyle,{cell:e,styleService:t}),tj=({cell:e,styleService:t})=>X_(Y_.TextDecoration,{cell:e,styleService:t}),nj=e=>e?"pointer":"default",rj=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},oj=(e,t)=>{if(!e.isLeftColumn||e.representation.type===nP.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},ij=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:o}=sT(),{interactions:i}=oT(),{isActive:a}=H_(),{dataModel:s}=LO();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!i.active||a||!s,c=Z_({cell:e,styleService:r,isCellSelected:n}),u=a?.4:1,d=e.ref.qCanExpand?sk:ak;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=TO({isLeftColumn:t,layoutService:o,representation:e.representation});return hi.jsx(d,{opacity:u,color:c,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...oj(e,r),...f&&{alignSelf:U_(e)}},onClick:l?void 0:rj({cell:e,expandOrCollapse:p})})},aj=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},sj=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},lj=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},cj=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,layoutService:i,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=i,l=TO({isLeftColumn:r,layoutService:i,representation:e}),c=t?21:0,u=e.imageBox?.width??24;let d=`calc(100% - ${c}px)`,p=o.headerCellHeight;r&&l&&(d=u),(a||r)&&(p=o.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},uj=e=>{if("alwaysFit"===e)return"contain"},dj=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),pj=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:sj(e,n,r),height:aj(e),objectFit:uj(e),objectPosition:lj(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),fj=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const{downloadService:e}=sT(),t=l(null),{promise:n,resolve:r}=v(()=>rq(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:f(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:i}}=sT(),{url:a,text:s,imageSize:c,resolvedImagePosition:u}=e,{overflow:p,...h}=t;return hi.jsx("img",{src:a,alt:s,style:{...pj({imageSize:c,resolvedImagePosition:u,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...h},onLoad:o,ref:r})},hj=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=sT(),{resolvedImagePosition:c}=e;return hi.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...cj({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:o,isMeasureCell:a})},children:hi.jsx(fj,{representation:e,textStyle:t,isMeasureCell:!0})})},mj=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},gj=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},vj={display:"flex",flexDirection:"row",alignItems:"center"},bj={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},yj=(e,t,n,r,o)=>t?{...bj,...o?e.measureValues:e.nullValues}:n?{...vj,color:e.totalValues.color,background:r??e.totalValues.background}:{...vj,color:e.measureValues.color,background:r??e.measureValues.background},xj=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,s={...WP,...!n&&$P(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const t=n?e.measureValues:e.nullValues,{fontWeight:r,fontStyle:o,textDecoration:i}=t;return{...s,fontWeight:r,fontStyle:o,textDecoration:i}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?wP:l,fontStyle:c,textDecoration:u}},Sj=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:o})=>{const{layoutService:i,styleService:a}=sT(),{isIndentModeEnabled:s}=i,l=e.isNull?i.getNullValueText():t.text,c=t.type===nP.Image,u=t.type===nP.Indicator,d=""!==l&&c_(u_(l)),p=xj(a,n,d,r,e.isNull);if(!s&&c&&!e.isNull||s&&c&&!e.isNull)return hi.jsx(hj,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:o});const f=u_(e.isNull?t.text:e.ref.qNum);return u&&c_(f)?hi.jsx(__,{representation:t,cellValue:f,textStyle:p}):hi.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},wj=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,Cj="flex-start",Ej=(e,t)=>e.isNull?Cj:t.type===nP.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:Cj,Ij=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:o}=oT(),{pageInfo:i,direction:a}=tT(),{styleService:s,layoutService:l}=sT(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:u,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleTopDimensionInfo:h}}=LO(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=sT(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=LO(),i=r.length,a=o.length;return f((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=LO(),n=t.length;return f(t=>{const r=e.grid.at(n-1)?.[t];return i_(r,e.totalDividerIndex)},[e,n])})(),v=(()=>{const{layoutService:{isIndentModeEnabled:e}}=sT(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=LO(),r=n.length;return f(n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return i_(i,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,y=p.grid.at(h.length-1),x=d.grid.at(-1),{background:S}=s.measureValues,w=u[t]?.[e],C=t===i.rowsOnCurrentPage-1,E=e===l.size.x-1;if(!w)return hi.jsx(a_,{style:{...n,background:S},isLastRow:C,isLastColumn:E,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const I=l.hasPseudoDimOnLeft?wj(x,t):wj(y,e),D=l.visibleMeasureInfo[I],R=aO({cell:w.ref,representationProperties:D.representation,attrExprInfoIndex:c.measures[I],env:o,direction:a,conditionalColoring:D.conditionalColoring,enabledFeatures:{[nP.Image]:!0,[nP.Indicator]:!0}}),L=!w.isNull&&m(e,t),M=w.isNull?l.getNullValueText():R.text,A=!w.isNull||""!==M&&!Number.isNaN(+M),P=sO(c.measures[I],w.ref),q=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==nP.Image?mj(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(w,D,R,A,a),k={...yj(s,w.isNull,L,P.background,A),...HP(C,E,s.grid.border,a,b),...GP({bottomDivider:v(t),rightDivider:g(e),borderColor:s.grid.divider}),...zP,padding:"0px 4px",display:"flex",justifyContent:q};return hi.jsx("div",{className:GD,title:M,style:{...k,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:hi.jsx(s_,{width:l_(R),verticalAlign:Ej(w,R),children:hi.jsx(Sj,{cell:w,representation:R,isTotalValueCell:L,color:P.color,cellHorizontalAlignment:q})})})};var Dj=n.memo(Ij,HN);const Rj=(e,t)=>t.list[e]?.id??e.toString(),Lj=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,Mj=e=>({...FP,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),Aj=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:c}=tT(),{layoutService:u,styleService:{grid:{divider:d},contentCellHeight:p}}=sT(),{dataModel:h,gridSectionsData:{measureData:m}}=LO(),v={...Mj(c),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},b=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=tT(),{downloadService:r,viewService:o,layoutService:i}=sT(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=LO(),u=s.columnCount,d=l.rowCount;return f(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=p,o.gridWidth=l-s+1,o.gridHeight=f-p+1;const h=o.gridWidth+u+(t.current===pP.None?0:BN),m=o.gridHeight+d+(e.current===pP.None?0:BN);let g=r_;m*h>1500&&(g=o_),g(a,i,c,n,o,e,t,r)},[o,i,a,c,e,t,n,u,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return Sq(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,c]),0===u.size.x?null:hi.jsx(qN,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:u.size.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:m},onItemsRendered:b,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:Lj,direction:c,children:Dj})};var Pj=y(Aj);const qj=x((e,t)=>hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[hi.jsx("path",{d:"M13 7H8zV4.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-1H3z"}),hi.jsx("use",{fillRule:"evenodd"})]})),kj=e=>{const[t,n]=Of(eN);return Sq(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},Tj=()=>{const[e,t]=m(!1),{dataModel:n}=LO(),{interactions:r}=oT(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=kj([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||j_(e)||o||t(!0)},isAdjustingWidth:o,setIsAdjustingWidth:i}};function Oj(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===NP.Transparent?FR.WHITE:r,i=QR(e.grid.border),a=QR(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return QR(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const Nj=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const{direction:s}=tT(),{interactions:l,translator:c}=oT(),{isActive:u}=H_(),{dataModel:d}=LO(),{styleService:p}=sT(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const h=Oj(p,e);return hi.jsx(Mq,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*qO,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},_j=Ms(mc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}})),jj=Ms("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),Fj=Ms("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...jP,justifyContent:e??jP.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),zj=Ms("div")(()=>({...jP})),Wj=Ms("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o})),$j=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Vj=Ms(Od,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),Hj=Ms("span")({textOverflow:"ellipsis",overflow:"hidden"}),Bj=Ms("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:AO,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),Gj=Ms("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let Uj=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const Yj=(e,t)=>({qExcludeList:t===Uj.Expand,qPos:{qDimName:e,qElemNo:[]}}),Kj=`${uT}/qExpansionState`,Xj=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r,logToSentry:o})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:Yj(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n,logToSentry:r})=>{const{index:o,expansionData:i}=t;try{let t,n=Kj,r="Add";void 0===o?t=JSON.stringify([i]):-1===o?(n=`${Kj}/-`,t=JSON.stringify(i)):(n=`${Kj}/${o}`,r="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:r,qValue:t}],!0)}catch(e){r.error({msg:n,payload:e})}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`,logToSentry:o})},Jj=({model:e,effectivePropertiesService:t,cell:n,logToSentry:r})=>{if(void 0===n.qEffectiveDimensionName)return;const o={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName,logToSentry:r};return{expandCallback:Xj({...o,action:Uj.Expand}),collapseCallback:Xj({...o,action:Uj.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},Zj={[mk.Sorting]:!0,[mk.Selections]:!0,[mk.Searching]:!0},Qj=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=sT(),{app:g,interactions:v,embed:b,translator:y,model:x,env:S}=oT(),w=kf(Iq),{fontSize:C,fontFamily:E,fontStyle:I,fontWeight:D,textDecoration:R,color:L,background:M,hoverBackground:A,activeBackground:P}=f.header,q=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:T}=a,{open:O,setOpen:N,handleOpenMenu:_,setIsAdjustingWidth:j}=Tj(),{direction:F}=tT(),z={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},W={embed:b,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},$={app:g,qStateName:h.layout.qStateName},{labelTextAlign:V}=h.getDimensionInfo(e.dimensionInfoIndex)??{},H=mj(V,"flex-start",F);return hi.jsxs(_j,{className:GD,title:e.label,interactions:v,background:O?e.headerColor?.headerMenuActiveBackground??P:e.headerColor?.background??M,hoverBackground:e.headerColor?.headerMenuHoverBackground??A,shouldShowMenuIcon:T,isDimension:e.isDim,style:{...t,...zP,...BP(e,o,n,r,f.grid.border,F),color:e.headerColor?.color??L},"data-testid":"title-cell",onClick:_,children:[hi.jsxs(Fj,{children:[k?hi.jsx(zj,{children:hi.jsx(qj,{height:12})}):null,hi.jsx(Wj,{fontFamily:E,fontSize:C,fontStyle:I,fontWeight:D,textDecoration:R,justifyContent:H,children:hi.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...WP,...$P(f.grid.columnLineClamp)}:WP,children:e.label})})]}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(bk,{headerData:e,translator:y,anchorRef:q,open:O,setOpen:N,interactions:v,menuAvailabilityFlags:Zj,sortRelatedArgs:z,searchRelatedArgs:W,selectionRelatedArgs:$,expandOrCollapseArgs:Jj({model:x,effectivePropertiesService:m,cell:e,logToSentry:w}),shouldShowMenuIcon:T,model:x&&"setActiveField"in x?x:void 0,direction:F,isAccessibleHeader:!0}),hi.jsx(jj,{ref:p,direction:F}),hi.jsx(jj,{ref:q,direction:F})]}):null,hi.jsx(Nj,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:j,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},eF=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=sT(),{direction:r}=tT();return e>0&&t>0?hi.jsx("div",{style:{...FP,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},tF=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),nF=x((e,t)=>hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[hi.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),hi.jsx("use",{fillRule:"evenodd"})]})),rF=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=tT(),{styleService:o}=sT(),{interactions:i,translator:a}=oT(),{isActive:s}=H_(),{dataModel:l}=LO(),{setIsAdjustingWidth:c}=kj([l]);if(!(!!i.active&&!s))return null;const u=Oj(o,{isLeftColumn:!0});return hi.jsx(Mq,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*qO))},confirmWidthCallback:r=>{if(r.type===XD.FitToContent)return void l.applyIndentModeColumnWidth({type:XD.Auto});const o=Math.min(r.pixels??t,e*qO);n(o),l.applyIndentModeColumnWidth({type:XD.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},oF=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),iF=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),{app:o,interactions:i,embed:a,translator:s,model:c}=oT(),u=kf(Iq),{layoutService:d,effectivePropertiesService:p}=sT(),{open:f,setOpen:h,handleOpenMenu:m}=Tj();return hi.jsxs(Vj,{onClick:m,isActive:f,children:[hi.jsx(Hj,{children:e.label}),hi.jsxs(Bj,{className:"indent-mode-dropdown-more",visible:f,children:[hi.jsx(oF,{}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(bk,{headerData:e,translator:s,anchorRef:n,open:f,setOpen:h,interactions:i,menuAvailabilityFlags:Zj,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:d.layout.qStateName},expandOrCollapseArgs:Jj({model:c,effectivePropertiesService:p,cell:e,logToSentry:u}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),hi.jsx(jj,{ref:r}),hi.jsx(jj,{ref:n})]}):null]})]})},aF=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===pT,i=e+1<n.length&&n[e+1]?.id===pT;return!(r&&o&&i)&&(t?.id!==pT&&e<n.length-1)},sF=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=sT(),{interactions:a,translator:s}=oT(),{dataModel:c,gridSectionsData:{headersData:u}}=LO(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=i,{color:g,background:v,hoverBackground:b,activeBackground:y,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=i.header,{isAdjustingWidth:I}=kj([c]),D=e=>{e.stopPropagation()},R={height:h,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return hi.jsxs(_j,{isDimension:!0,background:d?y:v,interactions:a,hoverBackground:b,style:{...R,...zP,color:g},onClick:e=>{!a.active||j_(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[hi.jsxs(Fj,{justifyContent:"flex-start",children:[hi.jsx(Wj,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:hi.jsx("span",{style:WP,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?hi.jsx(nF,{}):hi.jsx(tF,{}),hi.jsx(jj,{ref:f})]}),hi.jsx($j,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==pT&&hi.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:hi.jsx(iF,{cell:n,changeSortOrder:t})}),aF({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&hi.jsx(Tq,{"data-testid":"group-divider",variant:"middle"})])}),hi.jsx(rF,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},lF=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,cF={display:"grid",width:"fit-content"},uF=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=sT(),{gridSectionsData:{headersData:c}}=LO();return hi.jsxs("div",{"data-testid":"HEADER_GRID",style:{...cF,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:c.data.map(()=>`${r}px`).join(" "),height:a},children:[c.size.y>1&&hi.jsx(eF,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map((a,u)=>{let d=[];if(lF({layoutService:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(hi.jsx(sF,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===c.size.x;t.push(hi.jsx(Qj,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var dF=y(uF);const pF=(e,t,n,r)=>{const{layoutService:o}=sT();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,o])},fF=(e,t)=>{Sq(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},hF=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},mF=(e,t,n,r,o)=>{if(o)return;const i=e.representation,a=TO({isLeftColumn:n,layoutService:t,representation:i}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===nP.Image)return a&&l&&"center"!==l&&"rtl"===r?O_(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return mj(n,s,r)}const{textAlign:c}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return mj(c,s,r)},gF=()=>{},vF=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const{styleService:d,layoutService:p}=sT(),{interactions:f}=oT(),{direction:h}=tT(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:b}=H_(),{showLastBorder:y}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),w=S?g(u,e=>hF(e,r)):void 0,C=S?v(u):void 0,E=S?b(u,e=>hF(e,r)):void 0,I=TO({isLeftColumn:s,layoutService:p,representation:n.representation});return hi.jsx("div",{className:GD,title:f.passive?n.representation.text:void 0,style:{...t,...HP(i,a,d.grid.border,h,y),...GP({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...zP,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:nj(S),background:J_({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:mF(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:gj(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:gF,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},bF=e=>{e.stopPropagation()},yF=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:bF,color:FR.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),xF=({href:e,text:t,interactions:n,color:r})=>hi.jsx(Ou,{...yF({href:e,text:t,interactions:n,color:r}),children:t}),SF=Y();SF.use(U),SF.renderer.prio(["canvas"]);const wF=(e,t)=>e&&"center"!==e&&"rtl"===t?O_(e):e,CF=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:o}=t,{styleService:{grid:{lineClamp:i}}}=sT(),{direction:a}=tT();return hi.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${o?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[hi.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:U_(e),alignItems:wF(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:o?.width??24,height:"100%"},children:hi.jsx(fj,{representation:t,textStyle:n})}),hi.jsx(Gj,{padding:4/(i<=2?2:1),alignSelf:U_(e,!0),children:!!t.labelStructure&&dj(t.labelStructure)})]})},EF=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,IF=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>hi.jsxs("span",{children:[hi.jsx(Ou,{...yF({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&EF(n)]}),DF=({children:e,textStyle:t,shouldEnableStickyText:n})=>hi.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),RF=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,LF=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=tT(),{isActive:o}=H_(),{layoutService:i,styleService:a}=sT(),{env:s,interactions:l}=oT(),c=n&&i.isIndentModeEnabled;let u;if(u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&e.isNull?i.getDimensionNullValueText():e.isNull?IP:n?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(e.isNull)return IP;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text,e.isEmpty)return null;const d=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:o})=>({...WP,...$P(RF({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:o})),color:Z_({cell:e,styleService:t,isCellSelected:n}),fontWeight:Q_({cell:e,styleService:t}),fontStyle:ej({cell:e,styleService:t}),textDecoration:tj({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:i.isIndentModeEnabled});if(e.representation.type===nP.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,o=n&&t&&t.suffix?CF:hj;return hi.jsx(o,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:d,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:mF(e,i,n,r)})}if(e.representation.type===nP.Link&&!o&&!e.isTotal&&!e.isNull){const t=n&&e.representation.labelStructure?IF:xF;u=hi.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:l,color:e.expressionColor.color})}return hi.jsx(DF,{shouldEnableStickyText:c,textStyle:{...d,...e.representation.type===nP.Image&&e.isNull?{alignSelf:U_(e)}:{}},children:u})},MF=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=sT(),{isSelected:i}=H_(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=kj([n]),f=hF(e,n),h=a?e===l-1:c,m=a?c:e===l-1,g=i_(f,u,o.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return hi.jsx(a_,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=i(f);return hi.jsxs(vF,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[hi.jsxs(s_,{verticalAlign:U_(f),width:l_(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[hi.jsx(ij,{isLeftColumn:a,isCellSelected:v,cell:f}),hi.jsx(LF,{isLeftColumn:a,isCellSelected:v,cell:f})]}),hi.jsx(Nj,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?cP.Measures:cP.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var AF=n.memo(MF,HN);const PF=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},qF=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},kF=(e,t)=>n=>{e.current&&(e.current[t]=n)},TF={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...FP},OF={overflow:"hidden",willChange:"auto",flexShrink:0},NF=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i,direction:a}=tT(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:c}}}=sT(),{qSize:u}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=LO();fF(e,d),pF(e,t,n,l);const f=i.rowsOnCurrentPage*l,h={...TF,borderColor:c,width:r.reduce((e,t)=>e+t,0)};return hi.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,c)=>{const h=c===d.columnCount-1,m=fT(p[c]),{itemCount:g,estimatedItemSize:v,listValues:b}=qF(t,f,i.rowsOnCurrentPage,h),y=s.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,b,l,h,u.qcy);return hi.jsx(zN,{ref:kF(e,c),style:{...OF,flexGrow:h?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:y,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:o,listValues:b,totalDividerIndex:d.totalDividerIndex},itemKey:Rj,estimatedItemSize:v,children:AF},m)})})};var _F=y(NF);const jF={overflow:"hidden",willChange:"auto"},FF=e=>({...FP,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),zF=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{direction:a}=tT(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:c}}=sT(),{gridSectionsData:{headersData:u,topDimensionData:d}}=LO(),p={...FF(a),borderColor:l,height:r};fF(e,d),pF(e,n,r,c);const f=s.size.x*i();return 0===d.rowCount?hi.jsx("div",{style:{width:n,height:r,...FF(a)}}):hi.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const c=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=qF(r,f,s.size.x,c),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const o=t.size.x-1,i=lF({layoutService:e,headersData:t,topRowIndex:n})?0:o,a=r.at(i),s=Array.isArray(a)?a.at(o):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:u,topRowIndex:l}),v=g?fT(g):`empty ${l}`;return hi.jsx(zN,{ref:kF(e,l),style:jF,height:t(),width:n,itemCount:p,itemSize:PF({list:r,listValues:m,isLastRow:c,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:c,itemCount:p,showLastBorder:o,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:Rj,estimatedItemSize:h,direction:a,children:AF},v)})})};var WF=y(zF);const $F=()=>hi.jsx(VF,{}),VF=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=sT(),n=oN(),r=(()=>{const{model:e}=oT(),t=kf(Iq),n=f(async(n,r)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:o,dimensionInfoIndex:i,sortDirection:a}=n,s=[];if(r===a)return!1;s.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!o).toString()});try{return await e.applyPatches(s,!0),!0}catch(e){return t.error({msg:"Error while applying patch",payload:e}),!1}},[e,t]);return n})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:u},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=rN(),{leftGridWidth:b,leftGridFullWidth:y,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=sT(),{gridSectionsData:{headersData:i}}=LO(),{measureText:a}=gq(o.header,{allowLineBreaks:!1}),s=GO({tableWidth:e}),l=UO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,u=f((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+PO;return t&&d+AO<=l&&(u=!0,d+=AO),d+AO<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return d(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:u}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:R,topGridDims:L,leftGridDims:M,dataGridDims:A,metadata:{everyThingFitsInTableRectHeight:P,scrollbarsVisibilityStatus:q}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=oN(),{pageInfo:l}=tT(),{gridSectionsData:{headersData:c,topDimensionData:u}}=LO(),d=Math.min(s.height*qO,Math.max(s.height*qO-25,s.height-t-a)),p=s.width*qO,f=l.rowsOnCurrentPage*t,h=Math.max(c.size.y,u.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),b=s.width-p,y=Math.max(b,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+f+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,y),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),R=Math.min(I,f),L=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:A,hasDataGridOverflowX:P}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:y},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:L-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${v}px ${y}px`,gridTemplateRows:`${x}px ${I}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:g},stickyWrapper:{width:y-1-i,height:-1},self:{width:Math.min(o,y)-(C?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:v,height:L-g+(!A&&P?a:0)},stickyWrapper:{width:v,height:I-1-a},self:{width:v,height:Math.max(t,D-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:L-g+(!P&&A?a:0)},stickyWrapper:{width:y-1-i,height:I-1-a},self:{width:Math.min(o,y)-(C?1:0)-i,height:Math.max(t,R-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:b,leftGridOriginalWidth:y,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),k=f(()=>e,[e]),T=f(()=>t,[t]),{env:O}=oT(),N=Tf(Qk),_=O.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>_?(N({HEADER:o.current,TOP:i.current,LEFT:a.current,DATA:s.current}),()=>{N({HEADER:null,TOP:null,LEFT:null,DATA:null})}):()=>{},[_,N,o,i,a,s]),(()=>{const{downloadService:e}=sT();d(()=>{e.notifyIsDoneRendering()})})(),hi.jsxs(aN,{style:D,children:[hi.jsx("div",{style:{overflow:"hidden"},ref:o,children:hi.jsx(dF,{tableWidth:n.width,leftGridWidth:b,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:R.height,changeSortOrder:r,overrideLeftGridWidth:I})}),hi.jsx(cN,{style:q.topGrid,origin:dP.TopGrid,ref:i,children:hi.jsx(iN,{style:L.fullSizeWrapper,children:hi.jsx(uN,{style:L.stickyWrapper,children:hi.jsx(WF,{topGridRef:l,rowHightCallback:k,...L.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),hi.jsx(cN,{style:q.leftGrid,origin:dP.LeftGrid,ref:a,children:hi.jsx(iN,{style:M.fullSizeWrapper,children:hi.jsx(uN,{style:M.stickyWrapper,children:hi.jsx(_F,{leftGridRef:c,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:P}})})})}),hi.jsx(cN,{style:q.dataGrid,origin:dP.DataGrid,ref:s,children:hi.jsx(iN,{style:A.fullSizeWrapper,children:hi.jsx(uN,{style:A.stickyWrapper,children:hi.jsx(Pj,{dataGridRef:u,rowHightCallback:T,...A.self,showLastBorder:{right:w,bottom:P},getRightGridColumnWidth:C,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},HF=()=>{const{keyboard:e,theme:t,interactions:n,translator:r,env:o}=oT(),{pageInfo:i,updatePageInfo:a,rect:s}=tT(),{layoutService:c}=sT(),{layout:u,hasData:p}=c,f=l(null),h=Tf(Qk),m=o.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>m?(h({WRAPPER:f.current}),()=>{h({WRAPPER:null})}):()=>{},[m,h]),hi.jsxs("div",{ref:f,children:[p?hi.jsx($F,{}):null,hi.jsx(cT,{}),hi.jsx(Uk,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{a({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:s,layout:u})]})};const BF=(e,{selections:t,baseObjects:r,coreServices:o,nebulaObjects:i},a)=>{const s=function(e){const t=Fp();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ds({...t,direction:e})}(r.direction);e.render(hi.jsx(n.StrictMode,{children:hi.jsx(Rf,{store:a,children:hi.jsx(Ps,{theme:s,children:hi.jsx(iT,{...i,children:hi.jsx(nT,{...r,children:hi.jsx(B_,{selections:t,children:hi.jsx(lT,{...o,children:hi.jsx(MO,{children:hi.jsx(HF,{})})})})})})})})}))};var GF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(GF||{}),UF=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(UF||{}),YF=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(YF||{}),KF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(KF||{});const XF=e=>e?`${parseInt(e,10)}px`:void 0,JF=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?NP.Transparent:n}},ZF=(e,t)=>+(parseInt(e,10)*EP*t+8).toFixed(2),QF=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?wP:"normal",ez=e=>e?.some(e=>"italic"===e)?"italic":"normal",tz=e=>e?.some(e=>"underline"===e)?"underline":"none",nz=document.createElement("textarea");function rz(e){nz.value=e,document.body.appendChild(nz),nz.select(),nz.setSelectionRange(0,nz.value.length),document.execCommand("copy"),document.body.removeChild(nz)}nz.style.position="absolute",nz.style.left="-9999px",nz.setAttribute("readonly","");function oz(e){O?.((t,n)=>{const r=n.target,o=r?.closest(`.${GD}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{rz(t)}):rz(t))})(o)}}),e?.forEach(e=>{e(t,n,o)})})}const iz=({model:e,layoutService:t,effectivePropertiesService:n,translator:r,env:o})=>{const i=L(()=>uh(o,{tag:"sn-pivot-table"}),[o]);return oq((o,a,s)=>{if(!e||n.qAlwaysFullyExpanded)return;const l=e,c=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:d}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(s,t);c.addItem(((e,t)=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(uT,0,0,!0),await e.expandLeft(uT,0,0,!0)}catch(e){t.error({msg:"Failed to expand all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:Xj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Uj.Expand,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i})),c.addItem(((e,t)=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(uT,0,0,!0),await e.collapseLeft(uT,0,0,!0)}catch(e){t.error({msg:"Failed to collapse all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:Xj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Uj.Collapse,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i}))},[e,t,n,i])},az=(e,t)=>L(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:o,qEffectiveInterColumnSortOrder:i,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,c=r?.content?.rowsPerPage??15e3,u={x:Math.min(e.qHyperCube.qSize.qcx,CP),y:Math.min(e.qHyperCube.qSize.qcy,c)},d=i.slice(0,o),p=e=>d.some(t=>t===e),f=p(dT),h=new Map(i.map(e=>[s[e]??dT,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??IP,getDimensionNullValueText:()=>n?.dimensionText??IP,getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===dT?void 0:s.at(e),getDimensionInfoIndex:e=>h.get(e)??-1,size:u,isSnapshot:l,hasLimitedData:!l&&u.x<e.qHyperCube.qSize.qcx,hasData:u.x>0&&u.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:f,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:XD.Auto,pixels:KD.PixelsDefault,percentage:KD.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),sz=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=aq(e);return t.current=e,t})(wO(o));return pq(async()=>{const{qHyperCube:t}=i,{maxNumberOfVisibleRows:o,maxNumberOfVisibleColumns:c}=l.current;if(a)return i.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,o,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(i,r,o,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(CP,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(s,n,i.qHyperCube.qSize,r,o,c);return t?e.getHyperCubePivotData(uT,CO(t)):[]}return t.qPivotDataPages},[i,a,e,n,r.page,r.rowsPerPage,l,s])},lz=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),cz=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:lz({rowsPerPage:n,totalRowCount:e,page:t})}),uz=15,dz=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:o})=>{const{freeResize:i}=M();return N(async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-uz,0),c=Math.max(s+o-uz,s,0),u=CP-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=wO(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=CO(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(uT,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object.size.w=n.width,i.snapshotData.object.size.h=n.height}return i}),_(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)}),[t]),e.layout.snapshotData?.content&&!i?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var pz={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const fz=()=>{const e=j(),t=e.language();return L(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(pz).forEach(t=>{e.add(pz[t])})}(e)},[e]),{translator:e,language:t}},hz=e=>{const t=L(()=>Ef(),[]);t.set(Eq,e);const{flags:n}=e,r=F(),o=(e=>{const t=L(()=>yq.createRoot(e),[e]);return q(()=>()=>{t.unmount()},[t]),t})(r),i=z(),a=W(),s=$(),l=V(),c=H(),u=(()=>{const{viewState:e}=M(),t=aq(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=L(()=>rq(),[]),i=oq(e=>{t.current.add(e)},[t]),a=oq(CM(async()=>{await Promise.all(t.current),t.current.clear(),o()},1e3),[o,t]);return A(async()=>{await r},[r]),L(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i}),[a,n,e,i])})(),d=((e,t)=>{const[n]=pq(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return L(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,i),p=az(i,n),f=(e=>{const t=T();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=dq(i,r),{translator:g,language:v}=fz(),{pageInfo:b,updatePageInfo:y}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,o=t.isDownloadedAsPDForImage||e.isSnapshot,i=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=P(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!o,...cz(r.qcy,a,i)}}),l=e.layout.qHyperCube.qSize.qcy;return q(()=>{s(t=>({...t,...cz(l,t.page,i),shouldShowPagination:l>e.size.y&&!o}))},[l,e.size.y,s,o,i]),q(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=lz({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:lz({...a,...e})})}}})(p,u),x=((e,t,n)=>L(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(b,i,u),S=dz({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:b}),[w,C]=sz({model:a,layoutService:p,viewService:x,pageInfo:b,rect:S}),E=L(()=>((e,t,n)=>{const r=n.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),o=t.layout.components?.find(e=>"theme"===e.key),i=o?.header,a=o?.dimensionValues,s=o?.measureValues,l=o?.measureLabels,c=o?.totalValues,u=o?.nullValues,d=(r?o?.dimensionNullValues:void 0)??u,p=o?.grid,f=(t,n,r)=>e.getStyle(t,n,r),h=+(p?.[GF.LineClamp]??f(UF.Grid,YF.Grid,KF.LineClamp)??1),m=+(p?.[GF.ColumnLineClamp]??f(UF.Grid,YF.Grid,KF.ColumnLineClamp)??1),g=JF(e,i?.[GF.Background])??f(UF.Dimension,YF.LabelName,KF.BackgroundColor)??NP.Transparent,v={header:{fontSize:XF(i?.[GF.FontSize])??f(UF.Dimension,YF.LabelName,KF.FontSize)??xP,fontFamily:i?.[GF.FontFamily]??f(UF.Dimension,YF.LabelName,KF.FontFamily)??SP,fontWeight:QF(i?.[GF.FontStyle],wP),fontStyle:ez(i?.[GF.FontStyle]),textDecoration:tz(i?.[GF.FontStyle]),color:JF(e,i?.[GF.FontColor])??f(UF.Dimension,YF.LabelName,KF.FontColor)??FR.TEXT,background:g,hoverBackground:kM(g,JD),activeBackground:kM(g,ZD)},dimensionValues:{fontSize:XF(a?.[GF.FontSize])??f(UF.Dimension,YF.LabelValue,KF.FontSize)??xP,fontFamily:a?.[GF.FontFamily]??f(UF.Dimension,YF.LabelValue,KF.FontFamily)??SP,fontWeight:QF(a?.[GF.FontStyle],void 0),fontStyle:ez(a?.[GF.FontStyle]),textDecoration:tz(a?.[GF.FontStyle]),color:JF(e,a?.[GF.FontColor])??f(UF.Dimension,YF.LabelValue,KF.FontColor)??FR.TEXT,background:JF(e,a?.[GF.Background])??f(UF.Dimension,YF.LabelValue,KF.BackgroundColor)??NP.Transparent},measureValues:{fontSize:XF(s?.[GF.FontSize])??f(UF.Measure,YF.LabelValue,KF.FontSize)??xP,fontFamily:s?.[GF.FontFamily]??f(UF.Measure,YF.LabelValue,KF.FontFamily)??SP,fontWeight:QF(s?.[GF.FontStyle],"normal"),fontStyle:ez(s?.[GF.FontStyle]),textDecoration:tz(s?.[GF.FontStyle]),color:JF(e,s?.[GF.FontColor])??f(UF.Measure,YF.LabelValue,KF.FontColor)??NP.FontSecondary,background:JF(e,s?.[GF.Background])??f(UF.Measure,YF.LabelValue,KF.BackgroundColor)??NP.Transparent},measureLabels:{fontWeight:QF(l?.[GF.FontStyle],"normal"),fontStyle:ez(l?.[GF.FontStyle]),textDecoration:tz(l?.[GF.FontStyle]),color:JF(e,l?.[GF.FontColor])??f(UF.Measure,YF.LabelName,KF.FontColor)??NP.FontSecondary,background:JF(e,l?.[GF.Background])??f(UF.Measure,YF.LabelName,KF.BackgroundColor)??NP.Transparent},totalValues:{fontWeight:QF(c?.[GF.FontStyle],wP),fontStyle:ez(c?.[GF.FontStyle]),textDecoration:tz(c?.[GF.FontStyle]),color:JF(e,c?.[GF.FontColor])??f(UF.Total,YF.LabelValue,KF.FontColor)??FR.TEXT,background:JF(e,c?.[GF.Background])??f(UF.Total,YF.LabelValue,KF.BackgroundColor)??NP.Transparent},dimensionNull:{fontWeight:QF(d?.[GF.FontStyle],"normal"),fontStyle:ez(d?.[GF.FontStyle]),textDecoration:tz(d?.[GF.FontStyle]),color:JF(e,d?.[GF.FontColor])??f(UF.Null,YF.LabelValue,KF.FontColor)??FR.TEXT,background:JF(e,d?.[GF.Background])??f(UF.Null,YF.LabelValue,KF.BackgroundColor)??NP.NullValueBackground},nullValues:{fontWeight:QF(u?.[GF.FontStyle],"normal"),fontStyle:ez(u?.[GF.FontStyle]),textDecoration:tz(u?.[GF.FontStyle]),color:JF(e,u?.[GF.FontColor])??f(UF.Null,YF.LabelValue,KF.FontColor)??FR.TEXT,background:JF(e,u?.[GF.Background])??f(UF.Null,YF.LabelValue,KF.BackgroundColor)??NP.NullValueBackground},grid:{columnLineClamp:m,lineClamp:h,border:JF(e,p?.[GF.Border])??f(UF.Grid,YF.Grid,KF.BorderColor)??NP.DividerLight,divider:JF(e,p?.[GF.Divider])??f(UF.Grid,YF.Divider,KF.BorderColor)??NP.DividerDark,background:JF(e,p?.[GF.Background])??f(UF.Grid,YF.Grid,KF.BackgroundColor)??NP.Transparent},selectedColors:qM(e)};return v.headerCellHeight=Math.max(ZF(v.header.fontSize,m),ZF(v.dimensionValues.fontSize,m),32),v.contentCellHeight=Math.max(ZF(v.measureValues.fontSize,h),ZF(v.dimensionValues.fontSize,h),24),v.dimensionValueTextHeight=ZF(v.dimensionValues.fontSize,1),v})(m,p,n),[m,p,n]),I=((e,t,n)=>{const[,r,o]=pq(async()=>{const t=gL(n.flags),r=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),i=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,o,i,xq].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(m,i,e),{direction:D}=M();oz([iz({model:a,layoutService:p,effectivePropertiesService:d,translator:g,env:e})]),q(()=>{!C&&a&&!!w&&I&&BF(o,{selections:h,baseObjects:{rect:S,pageInfo:b,qPivotDataPages:w,updatePageInfo:y,direction:D},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:c,translator:g,interactions:f},coreServices:{styleService:E,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}},t)},[a,s,S,f,h,x,p,u,C,w,E,o,I,g,v,b,y,d,l,c,m,e,D,t])},mz={version:"7.43.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},gz=()=>({...mz,qHyperCubeDef:{...mz.qHyperCubeDef,qIndentMode:!1}})}}});
90
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-v+1)%l)&&y<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},yM({exports:{}});const PM=(e,t=zR.TEXT,n=zR.WHITE)=>{const r=eL(e??""),o=eL(t),i=eL(n);return r.isInvalid()?t:function(e,t,n){const r=tL(e,t),o=tL(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},qM=e=>{const t=e.getStyle("","","dataColors.selected")||zR.SELECTED,n=function(e,t){const n=eL(nL),r=eL(e),o=eL(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=tL(n,r),a=tL(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?nL:"#000000"}(t,zR.TEXT);return{background:t,color:n}},kM=(e,t)=>{const n=eL(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},TM=e=>{const t=eL(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},OM=e=>{e.stopPropagation(),e.preventDefault()},NM=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},_M=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,jM=e=>{const{currentTarget:t}=e,n=_M(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},FM=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===YD.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},zM=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},WM=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===YD.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&NM(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&NM(e)}},$M=(e,t)=>{const{key:n}=e;switch(n){case YD.Tab:e.shiftKey?((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return;const o=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],i=o?.getElementsByClassName("exploration-item-focus").length??0;if(i>0){const t=o?.getElementsByClassName("exploration-draggable-icon")[i-1];t&&(OM(e),NM(t))}})(e,t):(OM(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];if(!o){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&NM(e))}NM(o)})(e,t));break;case YD.Down:if(zM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a+1<o?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],i&&NM(i)})(e,t);break;case YD.Up:if(zM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[o-1],i&&NM(i)})(e,t);break;case YD.Enter:case YD.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},VM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),HM=({children:e,sectionIndex:t})=>{const r=kf(void 0!==t?gR(t):OR),o=Tf(void 0!==t?vR(t):NR),i=n.useRef(null),a={ref:i,toggleAllCheckboxes:o,checkState:r,sectionIndex:t};return hi.jsxs(mc,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{$M(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${wR} inset`}},children:[hi.jsx(Wc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{o(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),hi.jsx(VM,{children:e})]})},BM=({sectionIndex:e})=>{const t=kf(fR(e));return hi.jsx(HM,{sectionIndex:e,children:t})},GM=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),UM=Ms("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),YM=Ms(GM)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${wR} inset`}})),KM=e=>{const t=e.key===YD.Down?(e=>{const{currentTarget:t,key:n}=e,r=_M(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=FM(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):jM(e);t&&NM(t)},XM=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&NM(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void NM(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},JM=(e,t)=>{const{key:n}=e;switch(n){case YD.Tab:if(e.shiftKey)OM(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&NM(e))}const n=jM(e);n&&NM(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void NM(t);const r=jM(e);r&&NM(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return NM(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&NM(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&NM(n),!0}const o=FM(n,r);if(!o)return!1;NM(o)}return!0})(e,t);n?OM(e):e.stopPropagation()}break;case YD.Down:case YD.Up:if(zM(e))break;OM(e),KM(e);break;case YD.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}OM(e),XM(e,t);break;case YD.Space:OM(e),XM(e,t)}},ZM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),QM=({title:e,dragHandleRef:t,...r})=>{const[o,i]=Of(Th),a=kf(Zf),s=n.useRef(null),l=n.useRef(null),c=n.useRef(null),u={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),hi.jsxs(mc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(r.id)},onKeyDown:e=>{JM(e,u)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${wR} inset`}},children:[hi.jsxs(mc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{JM(e,u)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${wR} inset`}},children:[hi.jsx(Wc,{checked:-1!==r.id&&o.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),hi.jsx(ZM,{children:e})]}),hi.jsx(YM,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{JM(e,u)}})]})},eA=e=>{const t=kf(pR(e))??"";return hi.jsx(QM,{title:t,...e})},tA=()=>{const e=kf(hR),t=kf(mR),n=kf(RR),r=Tf(bR);return hi.jsx(HD,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:MR,headerRenderer:BM,itemRenderer:eA})},nA=({itemIndex:e})=>{const t=kf(qR(e));return hi.jsx(LR,{children:t})},rA=()=>{const e=kf(Zf);return hi.jsx(HM,{children:e("Common.Values")})},oA=e=>{const{itemIndex:t}=e,n=kf(qR(t));return hi.jsx(QM,{title:n,...e})},iA=()=>{const e=kf(kR),t=kf(TR),n=kf(DR),r=Tf(_R);return hi.jsx(mc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:hi.jsx(HD,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:nA,headerRenderer:rA,itemRenderer:oA})})},aA=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),sA=()=>{const[e,t]=Of(Qf),r=kf(Zf),o=n.useRef(null),[i]=kf(TR),[a=0,s=0]=kf(mR),l=f(e=>{t(e.target.value)},[t]),c=0===e.length||0===a&&0===s&&0===i?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return hi.jsxs(mc,{ref:o,onKeyDown:e=>{WM(e,o)},style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[hi.jsx(UM,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:c}),hi.jsx(Zd,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:hi.jsx(Lu,{position:"start",children:hi.jsx(aA,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},lA=e=>{const t=Fp();return hi.jsx(Ps,{theme:t,children:hi.jsx(Rf,{children:hi.jsx(Oh,{props:e,children:hi.jsxs(mc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[hi.jsx(sA,{}),hi.jsx(tA,{}),hi.jsx(iA,{})]})})})})},cA=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:lA,classification:{tags:["exploration"],exclusive:!0}}};var uA=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(uA||{}),dA=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(dA||{}),pA=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(pA||{}),fA=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(fA||{});const hA=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,mA=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case pA.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case uA.BEGINNING_OF_WORD:t="*^",n="*";break;case uA.ENDS_WITH:t="*";break;case uA.STARTS_WITH:n="*";break;case uA.MATCHES_EXACTLY:break;case uA.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case pA.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===dA.GENERAL,r=t?.modifier?.type===fA.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${hA(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${hA(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${hA(t.firstValue?.field)})`):(i=`${hA(e.field)}`,a=`${t.firstValue?.aggregator}(total ${hA(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let c="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${hA(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${hA(t.secondValue?.field)})`,a=` and ${i}`),c=`${a}${o[1]}${e}`}return`"${l}${c}"`})(e);break;case pA.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case pA.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},gA=[];for(let e=0;e<256;++e)gA.push((e+256).toString(16).slice(1));const vA=new Uint8Array(16);function bA(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(vA);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(gA[e[t+0]]+gA[e[t+1]]+gA[e[t+2]]+gA[e[t+3]]+"-"+gA[e[t+4]]+gA[e[t+5]]+"-"+gA[e[t+6]]+gA[e[t+7]]+"-"+gA[e[t+8]]+gA[e[t+9]]+"-"+gA[e[t+10]]+gA[e[t+11]]+gA[e[t+12]]+gA[e[t+13]]+gA[e[t+14]]+gA[e[t+15]]).toLowerCase()}(t)}(e)}const yA=()=>crypto?.randomUUID?.()??bA(),xA=1e3,SA=1e3,wA=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),o=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const i=[...o].sort((e,t)=>e-t);for(let e=0;e<i.length;e++)if(i[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},CA=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},EA=e=>{if(!e)return;wA(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const o=n[r],i=n.indexOf(r),a=n[i];CA(n,r,i),CA(e,r,i),CA(t,t.indexOf(o),t.indexOf(a))}})(t,n)},IA=R;class DA extends IA{#c;#u;#d;constructor(e,t){super(e),this.path=e.path,this.#c=t.translator,this.#u=t.flags.isEnabled,this.#d=uh(t,{tag:["sn-pivot-table","PivotHyperCubeHandler"]})}async#p(e,t,n,r,o=!1){if(!e||this.#f(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=yA()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,o=!1)=>{const i=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return o||await e.autoSortDimension(t),EA(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:o,qNoOfLeftDims:i}=e,a=t.length,s=o.indexOf(-1),l=-1!==s,c=void 0!==r?r+(i||0):void 0;if(l&&void 0!==c&&s>=c?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,o,s):o.push(a),void 0===r)t.push(n);else if(void 0!==c){const e=l&&c>s?c-1:c;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const o=e.qNoOfLeftDims,{qInterColumnSortOrder:i}=e,a=t.length,s=i.indexOf(-1),l=-1!==s&&o>0&&s<o;if(i.push(a),l)void 0===r?t.splice(o-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),i.splice(s,1),i.splice(s+1,0,-1));else{const e=r??o;t.splice(e,0,n),-1!==s&&(i.splice(s,1),i.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n,o);return this.#h({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#p(e,t,n,r)}async addDimensions(e,t,n){const r=[];for(const o of e){const e=await this.addDimension(o,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#f(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let o=n;return o=void 0===o?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+o:Math.min(o,this.hcProperties.excludedNoOfLeftDims),r.splice(o,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#h({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const o=this.createFieldDimension(e,t,n);return this.addDimension(o,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=yA());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),o=this.getAlternativeDimensions();if(r.length>=xA)return Promise.resolve();const i="number"==typeof t?t:o.length;return o.splice(i,0,e),this.#h({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#m({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),o=this.properties.qHyperCubeDef.qNoOfLeftDims,i=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof i&&"number"==typeof o&&i+1<=o&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),EA(this.hcProperties),this.#m({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#f(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#g(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,o=n.splice(r,0,e);return this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),o}async addMeasure(e,t,n,r){if(this.#g(e))return;if(e.qDef.cId||(e.qDef.cId=yA()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const o=this.getMeasures();if(o.length<this.maxMeasures()){const t=1===o.length;return void 0!==n&&n>=0?o.splice(n,0,e):o.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#v({cId:e.qDef.cId,addLast:void 0===n}),e))}return o.length<SA?(this.getAlternativeMeasures().push(e),this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),o=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=yA()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===o.indexOf(-1)&&o.push(-1)}this.#v({cId:e.qDef.cId})}else n.length<SA&&(t=r.length,r.splice(t,0,e),this.#v({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#m({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,o,i;if("number"==typeof e&&e<n.length){r=2===n.length,o=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(i=t.indexOf(-1),t.splice(i,1),this.hcProperties.qNoOfLeftDims&&i+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(o=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(o)return this.#m({cId:o.qDef.cId,section:"measures"}),o}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#g(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#b("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#b("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#x(e){return[...this.#y(e)]}#S(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#w(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#C(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#b(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#E())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#E(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#I(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#E())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#D(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#b(e),o=this.getDimensions(),i=r.map(e=>-1===e?-1:o[e]);switch(e){case"rows":return i.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return i.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return this.#d.warn({msg:"Corrupt ranked list detected: duplicate ids",payload:{duplicates:r,section:e,chartId:n}}),!0}const r=this.#D(e);if(t.length!==r.length)return this.#d.warn({msg:"Corrupt ranked list detected: length mismatch",payload:{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}}),!0;const o=r.filter(e=>!t.includes(e));if(o.length>0)return this.#d.warn({msg:"Corrupt ranked list detected: missing ids",payload:{missingIds:o,section:e,chartId:n}}),!0;const i=this.#D(e,!1),a=t.filter(e=>i.includes(e)),s=i.filter((e,t)=>e!==a[t]);return s.length>0&&(this.#d.warn({msg:"Corrupt ranked list detected: main field order mismatch",payload:{section:e,chartId:n,orderMismatchIds:s}}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#R({section:e});case"measures":return this.#L();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#R({section:e}){const t=this.getDimensions(),n=this.#b(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),o=n.map(e=>-1===e?-1:t[e].qDef.cId);return o.push(...r.map(e=>e.qDef.cId)),this.#S(e,o)}#L(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#u("SUPPORT-9810-MISSING-MEASURES")&&!this.#u("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#S("measures",e)}#M({section:e,cId:t,fields:n,addLast:r}){const o=this.#y(e),i=n.findIndex(e=>e.qDef.cId===t),a=n[i+1]?.qDef.cId,s=n[i-1]?.qDef.cId;if(r)o.push(t);else if(i>=0)if(a){const e=o.indexOf(a);o.splice(e,0,t)}else if(s){const e=o.indexOf(s);o.splice(e+1,0,t)}else o.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#h({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#R({section:e});let o;return o="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#M({section:e,cId:t,fields:o,addLast:r})}#v({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#L();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#A(),this.#M({section:"measures",cId:e,fields:r,addLast:n})}#A(){const e=this.#y("rows"),t=this.#y("columns");this.#I("rows")&&!e.includes(-1)?e.push(-1):this.#I("columns")&&!t.includes(-1)&&t.push(-1)}#P(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#m({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#P())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t);if(void 0===o)return;const i=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===i);this.addAlternativeMeasures(o,-1===a?void 0:a),this.#S("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t,!0);if(void 0===o)return;const i=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>i.includes(e)),s=i.findIndex(e=>e===a);await this.addMeasure(o,!1,-1===s?void 0:s,!0),this.#S("measures",n)}async moveDimensionToAlternative(e){const t=this.#w(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!1,i);if(void 0===a)return;const s=r.slice(o+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,i,l)&&this.#S(t,r)}async moveDimensionFromAlternative(e){const t=this.#w(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!0,i);if(void 0===a)return;const s=this.#D(t,!1),l=r.slice(o+1).find(e=>s.includes(e));let c=s.findIndex(e=>e===l);c=-1===c?void 0:c;void 0!==await this.#p(a,i,c,!1,!0)&&this.#S(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#w(-1);if(null===n)return void this.#d.error({msg:"Cannot move pseudo dimension, unable to find it in any section",payload:{toIndex:e,toSection:t}});const r="columns"===t,o=n===t,i=this.#x(t);if(o){const e=i.indexOf(-1);i.splice(e,1)}else{const o=this.#y(n),i=o.indexOf(-1);if(-1===i)return void this.#d.error({msg:"Couldn't delete pseudo dimension from current section",payload:{toIndex:e,toSection:t,fromSection:n}});o.splice(i,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-i.slice(0,e).filter(e=>this.#C(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),i.splice(e,0,-1),this.#S(t,i)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#w(e),o=this.#C(e);if(null===r)return void this.#d.error({msg:"Cannot move dimension, unable to find it in any section",payload:{cId:e}});const i=(o?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===i)return void this.#d.error({msg:"Couldn't find dimension to move",payload:{cId:e,toIndex:t,toSection:n}});const a=this.#x(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&this.#d.warn({msg:"[moveDimension] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:l}});const c=l-a.slice(0,l).filter(e=>this.#C(e)!==o).length,u="columns"===n,d="columns"===r,p=await this.removeDimension(i,o,d);if(void 0===p)return;void 0!==await this.#p(p,u,c,o,!0)&&(a.splice(l,0,e),this.#S(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#C(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void this.#d.error({msg:"Cannot move measure, unable to find it in any section",payload:{cId:e}});const o=this.#x("measures"),i=o.indexOf(e);-1!==i&&o.splice(i,1);const a=Math.max(0,Math.min(t,o.length));a!==t&&this.#d.warn({msg:"[moveMeasure] toIndex is out of bounds, clamping it",payload:{toIndex:t,clampedToIndex:a}});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-o.slice(0,a).filter(e=>this.#C(e)!==n).length;void 0!==await this.addMeasure(s,n,l,!0)&&(o.splice(a,0,e),this.#S("measures",o))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:yA(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=mA(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#q(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=mA(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#q(e);return n}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var RA,LA={exports:{}};var MA=(RA||(RA=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,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(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,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(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>Pe});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},i=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"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),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"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,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=b(u(r[0],o),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],o),p=u(r[1],o),f=h(0),m=h(1),g=b(d,f),v=b(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=n.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&&(r=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);r=r.startsWith("=")?r.substr(1):r,r="".concat(i,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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 I=t().bind(null,!0),D={},R=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 P(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?i:e[t],e=e[n||t]}}),e}function q(e,t){var n=!0;if(L(e)&&L(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){q(e[r],t[r])||(n=!1)}),n);if(R(e)&&R(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!q(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(o){var i=function(e){return e?I({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);q(i,a)||A(t,o)||(M(a)?r.push({op:"add",path:s,value:i}):L(i)&&L(a)?r=r.concat(D.generate(a,i,s)):R(i)&&R(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&M(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(q(t,o))return r;if(!M(t[0])&&M(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(D.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))}),Object.keys(e).forEach(function(o){M(t[o])&&!A(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,o=P(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(R(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(R(a)&&R(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||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))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),I(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=P(e,t.from);R(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(R(o)?o.splice(+i,1):delete o[i])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const k=D,T=function(e,n,r){if(!e)return Promise.resolve();var o=k.generate(n,r);return t()(!0,n,r),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 O="accumulation";function N(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function _(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,u,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:o})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.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 n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.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 w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=N(t,e);return i&&!i.disabled}};return n}};var z="movingAverage";function W(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const H={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:o,layout:a})){var b=w.getDimComp(u,1),y=w.getDimComp(u,0),x=w.getAggrComp(v,b,y);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,V)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(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($(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($(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($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=W(t,e);return i&&!i.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var o=r.steps;r.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),n.properties.qHyperCubeDef.qMeasures=n.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 n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=G(t,e);return i&&!i.disabled}};return n}};var X="difference";function J(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),p="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:o})){var f=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}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]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(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(Z(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(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return n}};var te="normalization";function ne(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach(function(t){void 0===e[t]&&(e[t]=ie[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,i),i}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(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,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=ne(t,e);return i&&!i.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,me)?me:he},getLibraryId:function(e){return i(e,me)||i(e,he)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",be="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Re={initBase:function(e,t){(t||Re.isValid(e))&&(n(e,be,i(e,ve)),n(e,xe,i(e,ye)),n(e,Ce,i(e,Se)),n(e,Ee,i(e,we)))},restoreBase:function(e){Re.isValid(e)&&(n(e,ve,i(e,be)),n(e,ye,i(e,xe)),n(e,Se,i(e,Ce)),n(e,we,i(e,Ee)),i(e,Ie)&&i(e,De)&&n(e,Ie,i(e,De)),delete e.qDef.base)},isValid:function(e){var t=i(e,be),n=i(e,xe);return void 0!==t||void 0!==n}};const Le=Re;function Me(e){return Me="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},Me(e)}var Ae={accumulation:F,movingAverage:H,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Pe={modifiers:Ae,apply:ke,applyModifiers:Te,cleanUpMeasure:Oe,destroy:function(e){e&&qe[e.id]&&qe[e.id].masterItemSubscriber&&(qe[e.id].masterItemSubscriber&&qe[e.id].masterItemSubscriber.unsubscribe(),delete qe[e.id])},hasActiveModifiers:Ne,getActiveModifier:_e,initBase:Le.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ae[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ae[e]&&Ae[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Ze({modifiers:t,properties:n,layout:r}))}),o&&!i},ifEnableTotalsFunction:je};var qe={};function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;qe[n.id]=qe[n.id]||{isFirstTime:!0};var c=qe[n.id].isFirstTime;if(qe[n.id].isFirstTime=!1,r&&"object"===Me(r))return Te({model:n,properties:r});var u=n?n.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=qe[n.id].lastReloadTime;if(qe[n.id].lastReloadTime=i(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:u,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var o=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:o,model:n}).then(function(o){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Ae[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&He(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Te({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Me(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,o=Qe(r);return et({model:n,libraryIds:o}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Oe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Te(e){var n=e.model,r=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},o):o),$e(o);var p=Qe(o);return et({model:n,libraryIds:p,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Oe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:o,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then(function(o){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Le.isValid(n)||Le.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ae[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ae[r.type].generateExpression({expression:s,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ae[r.type].updateModifier&&Ae[r.type].updateModifier(r,o.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Ae[r.type].generateExpression({expression:a,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:o,dimensionAndFieldList:e}),Ve(n)):Oe(n)})})})}({measures:a,properties:o,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:o,model:n}):Promise.resolve(!1)})})}function Oe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&!Ae[e.type]})}(e)?Le.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ae[r.type]&&!r.disabled)return r}}function je(e){var t=_e(e);return!t||Ae[t.type].enableTotalsFunction(e)}function Fe(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=_e(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Le.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Ve(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Me(t)&&(t.disabled||!Ae[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function He(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=He(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Me(e)||e.disabled||!Ae[e.type])&&(void 0===o[e.type]&&(o[e.type]=Ae[e.type].isApplicable({properties:n,layout:r})),o[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then(function(e){o.dimensionList=e});r.push(i);var a=t.app.getFieldList().then(function(e){o.fieldList=e});return r.push(a),Promise.all(r).then(function(){return o})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),i.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):T(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return o}):Promise.resolve(o)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&Ae[e.type]&&Ae[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],o=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var i=Be(t);i&&n.push(i),o=o||Ze({modifiers:r,properties:e})}}),i(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(qe[t.id].masterItemSubscriber=qe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=i(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=i(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach(function(e){o[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:i}),Object.keys(r).forEach(function(e){o[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return ke({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),qe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](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);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),o=Math.floor(n/62);return o>0?t(o)+r:r}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},o(e)}n.d(r,{default:()=>$e});const i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n: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 t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?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 n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},b=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.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)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},y=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.getValue(e,t);if(!i.isAtomicValue(s))try{if((o=(o=(r=JSON.stringify(s)).match(/:\{/g))?o.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var l=i.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},A=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},P=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},q=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}}},k=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},T=function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},O=function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=E(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,o.dimensions.length,D),l=I(a.min,o.dimensions.length,0);return{maxDimensions:I(i.max,s,D),minDimensions:I(i.min,l,0),maxMeasures:s,minMeasures:l}},_=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.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=w()(!0,{},n,o)).components&&(o.components=[]),o},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(t)||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.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return L(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(t)||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.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function H(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){i.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:o,qHyperCubeDef:l}),m({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:o,properties:a}),r||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters",!0),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:c}),v=i.getValue(r,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=N({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,w=y.maxMeasures,C=y.minMeasures,E=l.defaultDimension,I=void 0===E?q():E,D=l.defaultMeasure,R=void 0===D?k():D;b.qDimensions.length=0,b.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:b}),T({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:b,defaultDimension:I}),O({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:b,defaultMeasure:R}),W({newProperties:g,dataDefinition:a,hypercubePath:c}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),_({exportFormat:t,newHyperCubeDef:b}),A("qMaxStackedCells",v,b),A("qNoOfLeftDims",v,b),P("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),P("qMode",v,b,"S"),P("qReductionMode",v,b,"N"),P("qSortbyYValue",v,b),P("qIndentMode",v,b),P("qShowTotalsAbove",v,b),M(g,t,r),m.qProperty=g;var L=i.getValue(u||{},"support.modifiers");return V({measures:b.qMeasures,modifierTypes:L}),p&&H(m.qProperty,"storedFilters"),"S"===b.qMode&&h&&H(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var o=u(e,r,n),i=u(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(U(a,t,r,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={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}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.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 X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(r,o);var l=r[r.length-1];if(l){var c=n?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=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.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().measureBase.getLibraryId(e)}(n,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),i&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var o=t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(ne(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:s,key: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&&ie.useMasterNumberFormat(i.formatting)}i.auto=!1,i.mode=a}function se(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=oe("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},de=function(e,t){var n,r=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(n={auto:o,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:o,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=oe("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},he=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),h=i.getValue(d,"color.mode",""),m=i.getValue(d,"color.auto",""),g=ce(d,p),v=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),u}};var be=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?H(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):H(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),be.includes(r)&&t[o].type[r]++,t[o].type.total++}}),t}(a);l.length?(i&&(t=l.filter(function(e){return e.type[i]>0}).sort(function(e,t){return t.type[i]-e.type[i]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return ye({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=Ce(n,r,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(n,r,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Re="conditionalColoring",Le="measures",Me="qDef.conditionalColoring";const Ae={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Re,arrayName:Le,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Le,quarantineName:Re})}};var Pe="qHyperCubeDef.qMeasures",qe="measures",ke="qHyperCubeDef.qDimensions",Te="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ee({properties:e,arrayPath:ke,quarantineName:ze,arrayName:Te,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ie({properties:e,arrayPath:ke,quarantineName:ze,arrayName:Te,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:H,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Ae,conditionalShow:We}})(),r.default})()}(LA)),LA.exports),AA=qr(MA);const PA="qHyperCubeDef.qMeasures",qA="measures",kA="qHyperCubeDef.qDimensions",TA="dimensions",OA="qDef.representation",NA="tableRepresentation",_A="qDef.conditionalColoring",jA="conditionalColoring",FA="qMiniChartDef",zA="miniChartDef",WA=e=>{AA.unquarantineArrayProp({properties:e,arrayPath:kA,itemPath:OA,arrayName:TA,quarantineName:NA}),AA.unquarantineArrayProp({properties:e,arrayPath:PA,itemPath:OA,arrayName:qA,quarantineName:NA}),AA.unquarantineArrayProp({properties:e,arrayPath:PA,itemPath:_A,arrayName:qA,quarantineName:jA}),AA.unquarantineArrayProp({properties:e,arrayPath:PA,itemPath:FA,arrayName:qA,quarantineName:zA})},$A=e=>{AA.quarantineArrayProp({properties:e,arrayPath:kA,itemPath:OA,arrayName:TA,quarantineName:NA}),AA.quarantineArrayProp({properties:e,arrayPath:PA,itemPath:OA,arrayName:qA,quarantineName:NA}),AA.quarantineArrayProp({properties:e,arrayPath:PA,itemPath:_A,arrayName:qA,quarantineName:jA}),AA.quarantineArrayProp({properties:e,arrayPath:PA,itemPath:FA,arrayName:qA,quarantineName:zA})};function VA(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(o)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const HA="qHyperCubeDef.qDimensions",BA="dimensions",GA="qOtherTotalSpec.qTotalMode",UA="totalMode",YA={quarantine(e){AA.quarantineArrayProp({properties:e,arrayPath:HA,quarantineName:UA,arrayName:BA,itemPath:GA})},unquarantine(e){AA.unquarantineArrayProp({properties:e,arrayPath:HA,quarantineName:UA,arrayName:BA,itemPath:GA})}};function KA(e){const t=VA(e);return(e,n,r,o)=>{const i=AA.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&SM(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],SM(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),f=a+p;if(f>c.length)for(let e=c.length;e<f;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const h=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&SM(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(AA.unquarantineProperty(i.qProperty,"noOfLeftDims"),AA.unquarantineProperty(i.qProperty,"excludedNoOfLeftDims "))}return AA.unquarantineProperty(i.qProperty,"rankedList"),AA.conditionalShow.unquarantine(i.qProperty),YA.unquarantine(i.qProperty),WA(i.qProperty),AA.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function XA(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=AA.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;SM(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),AA.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims,AA.quarantineProperty(i.properties,"qHyperCubeDef.rankedList","rankedList"),delete i.properties.qHyperCubeDef.rankedList;const u=i.properties.qLayoutExclude.quarantine?.interColSortOrder;u&&(c=u,SM(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),SM(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return AA.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),AA.quarantineProperty(i.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),AA.conditionalShow.quarantine(i.properties),YA.quarantine(i.properties),$A(i.properties),i}const JA=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(o)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),ZA=["rows","columns","measures"],QA=e=>"string"==typeof e&&e.length>0,eP=e=>{const t=e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"),n=e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),r=e.flags.isEnabled("qcb-35151-fix-duplicate-columns-pivot");if(!t&&!n&&!r)return;const o=new DA({},e),i=uh(e,{tag:"sn-pivot-table"});return{properties(e){if(r&&((e,t)=>{const{qHyperCubeDef:n}=e,r=n.qLayoutExclude?.qHyperCubeDef,o=new Set;let i=0,a=0;[...n.qDimensions,...n.qMeasures,...r?.qDimensions??[],...r?.qMeasures??[]].forEach(e=>{const t=e.qDef?.cId;if(!QA(t)||o.has(t)){QA(t)?i++:a++;const n=yA();return e.qDef={...e.qDef,cId:n},void o.add(n)}o.add(t)}),i>0&&t.error({msg:"migrate: duplicate field cId issues detected",payload:{duplicateCount:i}}),a>0&&t.error({msg:"migrate: missing field cId issues detected",payload:{missingCount:a}})})(e,i),t&&"sn-pivot-table"===e.visualization&&(o.setProperties(e),ZA.forEach(e=>{o.isRankedListCorrupt(e)&&o.createRankedList(e)})),n){const t=e.components?.find(e=>"theme"===e.key);t?.nullValues&&!t.dimensionNullValues&&(t.dimensionNullValues={...t.nullValues})}return e}}},tP={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let nP=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),rP=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const oP=e=>{switch(e?.type){case"url":return nP.Link;case"image":return nP.Image;case"indicator":return nP.Indicator;case"miniChart":return nP.MiniChart;default:return nP.Text}},iP=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),aP=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>oP(e.qDef.representation)===nP.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},sP=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:iP({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>oP(e.qDef.representation)===nP.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>oP(e.qDef.representation)===nP.Link&&e.qDef.representation?.urlPosition===rP.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>oP(e.qDef.representation)===nP.Link&&e.qDef.representation?.urlPosition===rP.Attribute},...aP(n)}},lP=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[nP.Image],i=!r?.("qMiniChartDef")&&t[nP.MiniChart],a=!r?.("tableIndicators")&&t[nP.Indicator],s=o&&t[nP.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>oP(e.qDef.representation)===nP.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let cP=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),uP=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),dP=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),pP=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const fP="image",hP=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},mP=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:JD.Auto,translation:"Common.Auto"},{value:JD.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:JD.Pixels,translation:"Object.Table.Column.Pixels"},{value:JD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:JD.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:XD.PixelsDefault,show:e=>e.qDef.columnWidth?.type===JD.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:XD.PercentageDefault,show:e=>e.qDef.columnWidth?.type===JD.Percentage}}),gP=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==fP},[e]:{ref:`qDef.${e}.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:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==fP)}}},vP="TOTAL_OFF",bP={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:uP.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:uP.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uP.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},yP=e=>(e=>{const{translator:t,anything:n,flags:r}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{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},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:vP,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:vP,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&hP},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==vP&&hP(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:bP}},alignmentAndRepresentationAndResize:{type:"items",items:{...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...sP(e),...mP()}}}:{cellColoring:bP,...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...sP(e),...mP()}}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{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},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:bP}},alignmentAndRepresentationAndResize:{type:"items",items:{...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...lP(e,{[nP.Image]:!0,[nP.Indicator]:!0}),...mP()}}}:{cellColoring:bP,...gP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...gP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...lP(e,{[nP.Image]:!0,[nP.Indicator]:!0}),...mP()}}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e),xP="12px",SP="Source Sans Pro, sans-serif",wP="600",CP=15e3,EP=4/3,IP="-",DP=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),RP=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},LP=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>RP(e,!0))],s=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...gL().filter(e=>!i.includes(e)).map(e=>RP(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),MP=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],AP=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>RP(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...MP.filter(e=>!i.includes(e)).map(e=>RP(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),PP=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:LP({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:AP({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:DP(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:DP(`${e}.background`,"properties.background",(t,n)=>{const r=n?zR.WHITE:zR.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),qP=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),kP=e=>qP("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),TP=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?kP(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:DP(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:DP(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),OP=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1});let NP=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),_P=function(e){return e.Solid="solid",e.None="none",e}({});const jP={display:"flex",justifyContent:"center",alignItems:"center"},FP={borderStyle:"solid"},zP={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},WP={lineHeight:EP,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},$P=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),VP=(e,t)=>e>0?`${e}px ${_P.Solid} ${t}`:_P.None,HP=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?VP(i,n):_P.None,borderBottom:VP(a,n),borderLeft:"rtl"===r?VP(i,n):_P.None,borderTop:_P.None}},BP=(e,t,n,r,o,i,a)=>{const s=HP(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=VP(2,o)),n||(s.borderLeft="rtl"!==i?VP(1,o):"none",s.borderRight="rtl"===i?VP(1,o):"none")),s},GP=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=VP(1,n)),t&&(r.borderRight=VP(1,n)),r},UP=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},YP=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),KP=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:PP({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:UP}),dimensionValueSection:PP({section:"dimensionValues",translator:e,flags:t,getThemeValue:UP}),measureValueSection:PP({section:"measureValues",translator:e,flags:t,getThemeValue:UP}),measureLabelSection:TP({section:"measureLabels",getThemeValue:UP}),totalValuesSection:TP({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:UP}),...YP(t)?{dimensionNullSection:TP({section:"dimensionNullValues",fallbackBackground:NP.NullValueBackground,getThemeValue:UP,isNullValueText:!0}),nullValues:TP({section:"nullValues",translation:"properties.pivot.measureNullValues",fallbackBackground:NP.NullValueBackground,getThemeValue:UP,isNullValueText:!0})}:{nullValues:TP({section:"nullValues",fallbackBackground:NP.NullValueBackground,getThemeValue:UP,isNullValueText:!1})},gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:OP("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:OP("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:DP("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??NP.DividerLight),divider:DP("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??NP.DividerDark),background:DP("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??NP.Transparent)}}}}}}]}),XP=e=>({type:"items",items:{nullValueText:e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:IP},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:JD.Auto,translation:"Common.Auto"},{value:JD.Pixels,translation:"Object.Table.Column.Pixels"},{value:JD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:JD.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:XD.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===JD.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:XD.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===JD.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),JP=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},ZP=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[KP(e,t),XP(t)]},...JP(t)}}),QP="auto",eq={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:QP,translation:"Object.Table.SortingInSearch",options:[{value:QP,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function tq(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:yP(e),sorting:eq,addons:tP,settings:ZP(t,n)}}}function nq(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:tq(e),importProperties:KA(e),exportProperties:XA,exploration:cA(e),data:JA(e),migrate:eP(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new DA(t,e):void 0}}const rq=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function oq(e,t){return L(()=>e,t)}const iq={},aq=e=>{const t=L(()=>({current:iq}),[]);return t.current=t.current===iq?e:t.current,t},sq=e=>!!e&&0===eL(e).a,lq="#grid",cq=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},uq=(e,t,n,r,o)=>{const i=cq(".qv-object .qv-inner-object",n),a=cq(".qv-panel-sheet",n),s=cq(lq,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return TM(n);if("none"===r)return"transparent";if(void 0===r)return;const i=eL(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=sq(d),f=!sq(h=p?s:d)&&PM(h,zR.TEXT,zR.DARK_MODE_TEXT)===KR(zR.DARK_MODE_TEXT);var h;const m=((e,t,n,r=zR.WHITE)=>e&&!sq(e)?e:sq(t)?n&&!sq(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},dq=(e,t,n,r)=>{const o=k(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=P([]);return q(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(lq),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return L(()=>({...o,background:uq(e,o,t,n,r)}),[o.name(),t,n,r,e,i])};function pq(e,t){const n=L(()=>({isLoading:!0}),t),[r,o]=A(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,o]}const fq=3,hq=/\n/g;function mq(e,t,n){let r=0,o=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function gq({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=fq,allowLineBreaks:a=!0}=o??{},{estimateWidth:s,measureText:l,estimateLineCount:c}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o)=>{const{maxNbrLinesOfText:i=fq,allowLineBreaks:a=!0}=o??{};return()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const s=o.measureText.bind(o),l=wM(e=>{if(void 0===e)return 0;if(a){const t=e.split(hq).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(hq," ");return s(t).width}),c=e=>+l(e).toFixed(2),u=wM(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(hq):[e];let o=0;for(const e of r){let n=e;do{o+=1,n=mq(n,t,c)}while(null!==n&&o<i);if(o>=i)break}return o},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:u}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:i,allowLineBreaks:a})(),[n,r,e,t,i,a]);return{estimateWidth:s,measureText:l,estimateLineCount:c}}var vq,bq={};var yq=function(){if(vq)return bq;vq=1;var e=E;return bq.createRoot=e.createRoot,bq.hydrateRoot=e.hydrateRoot,bq}();const xq="Source Sans Pro, sans-serif";function Sq(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var wq={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.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":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen 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":"Geselecteerde waarden 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":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.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":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.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":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.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":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.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":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.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":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.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":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier 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":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier 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":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.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":"{0}/{1}","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}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.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":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.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":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.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":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.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":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.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":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.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":"選取頁面"}}};const Cq=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(wq).forEach(t=>{e.add(wq[t])})}}(e)},[e]),e),Eq=Sf({}),Iq=Sf(e=>{const t=e(Eq);return uh(t,{tag:"sn-pivot-table"})}),Dq={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Rq={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Lq=Ms("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Dq},"&::-moz-range-track":{...Dq},"&::-ms-track":{...Dq},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Rq},"&::-moz-range-thumb":{...Rq},"&::-ms-thumb":{...Rq},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),Mq=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=Cq({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,v=()=>g?h.current.columnWidth-m:"100%",b={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},y=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};Sq(()=>{g&&y()},[e]);const x=e=>{const t=Math.max(e,XD.PixelsMin);h.current.columnWidth=t,i(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:JD.Pixels,pixels:h.current.columnWidth};a(e)}c?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{OM(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{OM(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===YD.Left||e.key===YD.Right){OM(e);const t=5,n=e.key===YD.Left?t:-t,r="rtl"===p?n:-n;c?.(!0),x(h.current.columnWidth+r)}else e.key===YD.Space||e.key===YD.Enter?(OM(e),s(e),c?.(!1),S()):e.key===YD.Esc&&(OM(e),s(e),c?.(!1),x(h.current.initWidth))}:void 0,R=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return hi.jsx(Lq,{style:b,hoverColor:o,isLastColumn:n,className:KD,"data-testid":KD,onMouseDown:e=>{OM(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),c?.(!0),y(e.clientX)},onDoubleClick:()=>{a({type:JD.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(OM(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),c?.(!0),y(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{y()},type:"range",tabIndex:-1,"aria-label":R,"aria-valuemin":XD.PixelsMin,"aria-valuemax":XD.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Aq=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),Pq=Ms(mc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),qq=Ms(Aq,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),kq=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Tq=Ms(cu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Oq=Ms(Od)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),Nq=Ms(Od,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),_q=Ms("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),jq=Ms("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),Fq=Ms(Pl)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),zq=Ms(rd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),Wq=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),$q=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?$q(t):t:e.parentElement?.children?.[0]},Vq=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?Vq(t):t},Hq=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===YD.Down||t===YD.Up){const n=e=>t===YD.Down?$q(e):Vq(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},Bq=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let Gq={};const Uq=({autoFocus:e,id:t,onClick:r,itemTitle:o,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:c,direction:u,isPagination:d})=>{const[p,h]=m(!1),g=n.useRef(null),v=f(e=>{e.stopPropagation(),h(!1)},[h]);return hi.jsxs(hi.Fragment,{children:[hi.jsxs(Nq,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),Gq={}),s?.length&&(h(!0),Gq[o]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:Hq,children:[c?hi.jsx(_q,{direction:u,isPagination:d}):null,hi.jsxs(jq,{children:[hi.jsx(zq,{direction:u,isPagination:d,children:hi.jsx(i,{})}),hi.jsx(Fq,{variant:"body2",children:o})]}),s?.length?hi.jsx(Wq,{}):null]},t),s?.length?hi.jsx(Jq,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:v,menuGroups:Bq(s,Gq),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:d}):null]})},Yq=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&hi.jsx(Oq,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>hi.jsx(Uq,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),Kq=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[Yq({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?hi.jsx(Tq,{"data-testid":"group-divider",variant:"middle"}):void 0]),Xq={appear:0,enter:0,exit:0},Jq=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?hi.jsx(kq,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:Xq,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:Kq({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,Zq=(e,t)=>e.some(e=>t[e]>0),Qq={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},ek=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(Qq);return Sq(()=>{e||(s(Qq),i(null))},[e]),d(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:Zq(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:Zq(["qSelected"],e),canSelectPossible:Zq(["qOption"],e),canSelectAlternative:Zq(["qAlternative"],e),canSelectExcluded:Zq(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},tk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),nk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),rk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("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.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),ok=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),ik=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),ak=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),sk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),lk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),ck=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 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.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),uk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-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 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),dk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{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-.5m-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 0m14 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-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-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 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 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 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),pk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{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-.5m-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 0m14 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-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-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 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 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 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),fk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{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-.5m-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 0m14 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-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-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 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 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 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),hk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let mk=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const gk="/qListObjectDef",vk=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[mk.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:tk,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:ok,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:lk,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:ik,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[mk.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:ck,enabled:!0}]}]),!e.isLocked&&n[mk.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:hk,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(gk))},icon:uk,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(gk))},icon:fk,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(gk))},icon:dk,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(gk))},icon:pk,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(gk))},icon:nk,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:sk,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:ak,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[mk.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:rk,enabled:!0}]}]),f},bk=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:c,searchRelatedArgs:u,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:v,isAccessibleHeader:b,iconSize:y=BD})=>{const x=l(null),S=Cq({translator:o}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:R}=ek({open:e,headerData:r,app:I,qStateName:d?.qStateName}),L=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]))({qLibraryId:w,fieldId:C,searchRelatedArgs:u,selectionRelatedArgs:d,direction:g}),A=f(e=>{e.stopPropagation(),t(!1)},[t]),P=f(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?hi.jsxs(Pq,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===b?P:void 0,ref:x,isAccessibleHeader:b,children:[s?hi.jsx(qq,{height:y,className:GD,"data-testid":GD,isInteractionsActive:i.active??!1,children:hi.jsx(Aq,{})}):null,hi.jsx(Jq,{open:e,anchorEl:!1===b?x.current:n.current,onClose:A,menuGroups:vk({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:M,interactions:i,fieldInstance:D,selectionActionsEnabledStatus:R,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:L,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},yk=e=>e.isDark?{background:e.color,borderColor:zR.DARK_MODE_BORDER,color:zR.DARK_MODE_TEXT,disabledColor:zR.DARK_MODE_DISABLED,iconColor:zR.DARK_MODE_TEXT}:{background:e.color,borderColor:zR.BORDER_MEDIUM,color:zR.TEXT,disabledColor:zR.DISABLED},xk=Ms(mc,{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}`})),Sk=Ms(mp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),wk=Ms(Ic,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),Ck=Ms(Pl)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),Ek=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=v(()=>yk(r.background),[r]);if(!n.active)return null;const a=o?hi.jsx(xk,{footerStyle:i,children:e}):null;return t?E.createPortal(e,t):a},Ik=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),Dk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),Rk=c({}),Lk=()=>h(Rk),Mk=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(u)?0:-1,y=v(()=>yk(p.background),[p]),x=o?o.getBoundingClientRect().width:h.width,S=Cq({translator:d}),w=v(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:b,width:x,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,c,u,S,p,f,h,m,y,b,x,g]);return hi.jsx(Rk.Provider,{value:w,children:e})},Ak=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let Pk=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),qk=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const kk=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=Lk(),c=0===t.page,u=Ak({type:Pk.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||qk.FirstPage)?null:hi.jsx(wk,{...u,disabled:!r.active,children:"rtl"===e?hi.jsx(Dk,{height:BD}):hi.jsx(Ik,{height:BD})})},Tk=(e,t,n=!1)=>{n&&e.key===YD.Tab&&!e.shiftKey&&(OM(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},Ok=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=Lk(),p=t.page>=r-1,f=Ak({type:Pk.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{Tk(e,n,o)}:void 0;return i<=(s?.lastPage||qk.LastPage)?null:hi.jsx(wk,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?hi.jsx(Ik,{height:BD}):hi.jsx(Dk,{height:BD})})},Nk=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),_k=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=Lk(),d=t.page>=r-1,p=Ak({type:Pk.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),f=!(i>qk.FirstPage&&i>qk.LastPage)&&n.enabled?e=>{Tk(e,n,o)}:void 0;return hi.jsx(wk,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?hi.jsx(Nk,{height:BD}):hi.jsx(Wq,{height:BD})})},jk=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=Lk(),s=0===t.page,l=Ak({type:Pk.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return hi.jsx(wk,{...l,disabled:!n.active,children:"rtl"===e?hi.jsx(Wq,{height:BD}):hi.jsx(Nk,{height:BD})})},Fk=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=Lk(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||qk.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return hi.jsx(Ck,{variant:"caption",dir:"ltr",children:s})},zk=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=Lk(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return hi.jsxs(hi.Fragment,{children:[hi.jsxs(Ck,{variant:"caption",id:p,children:[u,":"]}),hi.jsx(Sk,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},Wk=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=Lk();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||qk.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=hi.jsx(hi.Fragment,{children:e.rowsPerPageOptions.map(e=>hi.jsx("option",{value:e,children:e},e))});return hi.jsx(zk,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},$k=1e3,Vk="…",Hk=({totalPages:e,page:t})=>{const n=Math.min(e,$k),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-$k):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return hi.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(hi.jsx("option",{value:Vk,disabled:!0,children:Vk},"startMoreOptions")),o<e-1&&a.push(hi.jsx("option",{value:Vk,disabled:!0,children:Vk},"endMoreOptions")),hi.jsx(hi.Fragment,{children:a})},Bk=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=Lk(),{page:i}=e;if(t<=(o?.selectPage||qk.SelectPage))return null;const a=hi.jsx(Hk,{totalPages:n,page:i});return hi.jsx(zk,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var Gk=y(e=>hi.jsxs(Mk,{...e,children:[hi.jsx(Wk,{}),hi.jsx(Bk,{}),hi.jsx(Fk,{}),hi.jsx(kk,{}),hi.jsx(jk,{}),hi.jsx(_k,{}),hi.jsx(Ok,{})]}));const Uk=e=>hi.jsx(Ek,{...e,children:hi.jsx(Gk,{...e})}),Yk=Sf(null),Kk=Sf({current:!1}),Xk=Sf({minRow:0,maxRow:0,minCol:0,maxCol:0}),Jk=Sf({HEADER:null,TOP:null,LEFT:null,DATA:null,WRAPPER:null}),Zk=Sf(null);Sf(e=>({focusCoord:e(Yk),shouldRefocus:e(Kk),pivotSectionBounds:e(Xk),pivotSection:e(Jk),pivotCoord:e(Zk)})),Sf(null,(e,t,n)=>{t(Yk,n)}),Sf(null,(e,t,n)=>{t(Xk,e=>({...e,...n}))});const Qk=Sf(null,(e,t,n)=>{t(Jk,e=>({...e,...n}))}),eT=c({}),tT=()=>h(eT),nT=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o,children:i})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o}),[e,t,n,r,o]);return hi.jsx(eT.Provider,{value:a,children:i})},rT=c({}),oT=()=>h(rT),iT=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:s,children:l})=>{const c=v(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:s,translator:i}),[e,a,t,r,n,o,s,i]);return hi.jsx(rT.Provider,{value:c,children:l})},aT=c({}),sT=()=>h(aT),lT=({children:e,...t})=>hi.jsx(aT.Provider,{value:t,children:e}),cT=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const{theme:e,translator:t}=oT(),{layoutService:n}=sT(),r=e.getStyle("","","fontFamily")??SP;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:hi.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:hi.jsx("span",{style:{...WP,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},uT="/qHyperCubeDef",dT=-1,pT="PSEUDO-DIM",fT=e=>e===dT?pT:(({cId:e})=>e??yA())(e),hT=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===dT?n.columnWidthLocation=cP.Measures:n.isLeftDimension?n.columnWidthLocation=cP.Dimension:t.at(-1)===dT?n.columnWidthLocation=cP.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=cP.Pivot))},mT=e=>{if(!e)return;const{background:t,foreground:n}=e,r=eL(t??""),o=eL(n??""),i=r.isInvalid()?void 0:r.getRGBA(),a=i?kM(i,ZD):void 0,s=i?kM(i,QD):void 0;return o.isInvalid()&&void 0!==i?{background:i,color:PM(i),headerMenuHoverBackground:a,headerMenuActiveBackground:s}:{background:i,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:a,headerMenuActiveBackground:s}},gT=(e,t,n,r,o)=>{const i=fT(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===dT?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:cP.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===eR.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:cP.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName,headerColor:o?.("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?mT(n.headerColor):void 0}},vT=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})=>{let i=r;var a;n.length>0&&(i=(a=r).at(-1)===dT?a.slice(0,-1):a);const s=i.length+(n.length?1:0),l=Math.max(1,n.length),c=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(s,l);return n.forEach((n,r,i)=>{const a=r===i.length-1;c[s-1][r]=gT(e,t,n,a,o)}),i.forEach((n,r,i)=>{const a=r===i.length-1;c[r][l-1]=gT(e,t,n,a,o)}),c},bT=(e,t,n,r,o)=>{const i=((e,t,n,r,o)=>{let i;return i=0===n.length||n.includes(dT)?vT({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n,isEnabled:o}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(vT({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})),e.isIndentModeEnabled&&i.length&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{hT({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):hT({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r,o);return{data:i,size:{x:i[0]?.length??0,y:i.length}}},yT=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,xT=5e6,ST=5e5;const wT={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:CT(e),value:CT(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function CT(e){try{return decodeURIComponent(e)}catch{return e}}function ET(e){if(!(this instanceof ET))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>wT.fromSearchString(t.search)}})}function IT(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}ET.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},ET.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=IT(t.key),t.value?n+=`=${IT(t.value)}`:n+=t.useEqualSign?"=":"";return n};var DT=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},RT=class{decode(e){let t="";const n=new DT(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const LT=e=>e>=0&&e<=1114111,MT=e=>e.match(/[\s]/);var AT=class extends RT{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!MT(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return LT(a)?String.fromCharCode(a):"�"}},PT=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},qT=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return PT.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return PT.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||PT.newInstanceIfNeeded(e,t,this._value)}},kT=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new qT);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const TT=(()=>{const e=[],t=[],n=new kT;let r,o,i;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var OT=class extends RT{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,TT.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=TT.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&LT(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&LT(r)?String.fromCharCode(r):null}},NT=class extends RT{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),LT(i))?String.fromCharCode(i):(e.reset(),null)}};let _T;"undefined"!=typeof document&&(_T=document.createElement("div"));const jT=Array.prototype.indexOf,FT=[",",".","_"," "],zT=[",",".","-","_"," "],WT={width:["%"],height:["%"]},$T={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},VT={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":$T.image,"background-color":$T.color,"border-color":$T.color,"border-image":$T.image,color:$T.color,icon:$T.image,"list-style-image":$T.image,"outline-color":$T.color},HT={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function BT(e,t,n){let r;if(t){if(jT)return jT.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function GT(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return _T.appendChild(n),t=_T.innerHTML,_T.removeChild(n),t}function UT(e,t,n){let r,o,i,a,s,l,c,u,d;for(e=KT(e).toLowerCase(),t=KT(t),i=0;i<HT.attr_name.length;i++)if(e.match(HT.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<HT.attr_val.length;i++)if(t.toLowerCase().match(HT.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=WT[e],r||(r=zT),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&BT(c,r)<0?(d=u.toString(16),o+=`&#x${d};`):o+=c;return n||(o+='"'),o}function YT(e,t,n){let r,o,i,a,s,l,c,u,d,p;if(e=KT(e).toLowerCase(),t=KT(t),BT(e,HT.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<HT.css_val.length;r++)if(t.toLowerCase().indexOf(HT.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=VT[e],o||(o=$T.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&BT(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=c;return i}function KT(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new OT,new NT,new AT];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const XT=[];for(let e=0;e<255;e++)XT[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const JT={html:e=>GT(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=YT(t,n[t],!0),i+=YT(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=UT(e,t[e],!0),o+=UT(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function ZT(e,t){throw new Error(t)}var QT={canonicalize:KT,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?JT.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&ZT(this,"Invalid parameter type"),JT.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&ZT(this,"Invalid parameter type"),JT.attr(e)):void ZT(this,"Invalid parameter type")},encodeForAttr:UT,encodeForAttr2:function(e){return UT("nonsens",e,!0)},encodeForCSS:YT,encodeForHref:function(e){KT(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new ET(e),n=ET.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+ET.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=FT),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),BT(o,t)>=0||null==XT[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:GT,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=KT(t).toLowerCase():ZT(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=ST,maxByteSizeImage:r=xT}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=yT.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const eO=(e,t)=>t.qAttrExps?.qValues?.[e],tO=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},nO=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!QT.isSafeDataURL(t))?{type:nP.Text,url:void 0,text:e,labelStructure:o}:{type:nP.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:tO(r,a),labelStructure:o,imageBox:i},rO=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:nP.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:nP.MiniChart,text:r,miniChart:a}},oO=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===rP.Attribute?void 0:n?.urlLabel},iO=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:nP.Link,url:QT.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:nP.Text,url:void 0,text:t,labelStructure:e}}},aO=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=oP(t),d=s(e);return u===nP.Image&&c[nP.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=eO(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),nO({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return nO({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=eO(n.imageLabel??-1,e)?.qText??r;return nO({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:nP.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,d,l,a):u===nP.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===rP.Attribute){const i=oO(n.url??-1,e,t);return iO({labelStructure:r,text:o||i||"",url:i})}if(i===rP.Dimension){const i=oO(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),iO({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:nP.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,a,d):u===nP.Indicator&&c[nP.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:nP.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,d):u===nP.MiniChart&&c[nP.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?rO(e,t,i,d):{type:nP.Text,url:void 0,text:d,labelStructure:a}},sO=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?TM(o):null,a=r?TM(r):null,s=((e,t)=>e||!t?null:PM(t))(a,i);return{color:s??a,background:i}},lO=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:lO(e,t),e),cO=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:CP-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,lO(s,e))},uO=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,pseudoDimMeasureIndex:d,indentLevel:p,labelStructure:f,env:h,pageInfo:m,direction:g="ltr"})=>{const v=(!u||!c)&&"P"===e.qType,b=((e,t)=>{if(e!==dT){if(t){const t=oP(e.representation);return t===nP.Link||t===nP.Image?e.representation:{type:nP.Text}}return e.representation}})(s,u),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===nP.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:c,isIndentModeEnabled:u,labelStructure:f,representationType:oP(b),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),x=aO({cell:{...e,qText:y},representationProperties:b,attrExprInfoIndex:l,env:h,labelStructure:f,direction:g,enabledFeatures:{[nP.Image]:!0,[nP.Indicator]:!0}}),S={id:yA(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:c?i:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:cO(e,o,i,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:v,expressionColor:sO(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:d??(v?e.qElemNo:t?.visibleMeasureInfoIndex),representation:x,...void 0!==p&&{indentLevel:p},headerColor:v&&h.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")&&void 0!==e.qElemNo?mT(a.visibleMeasureInfo[e.qElemNo]?.headerColor):void 0};return t&&(t.children[S.mainAxisPageCoord-t.mainAxisPageCoord]=S),S},dO=(e,t,n,r,o,i,a,s,l)=>{const{isIndentModeEnabled:c}=o,u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING");if(!t.length)return e;let d=0;return function t(p,f,h,m=0,g=-1){e[m]||(e[m]={}),c&&g++;const v=o.leftDimensionInfoIndexes.indexOf(dT);h.forEach((h,b)=>{const y={originalValue:h.qText??"",maskedValue:"",delimeter:"-",suffix:""};d+=0===b?0:1;const x=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,x+d-h.qUp),w=n.qTop+d-h.qUp;let C;if(c){if(o.hasPseudoDimOnLeft&&g<=v)if(y.originalValue=h.qText??"",y.maskedValue=h.qText??"","N"===h.qType||"U"===h.qType||"T"===h.qType)"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText()),g<v&&(y.suffix=o.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===h.qType){y.originalValue=(f||p)?.representation.labelStructure?.originalValue??"",y.maskedValue=(f||p)?.representation.labelStructure?.originalValue??"",y.suffix=h.qText??"";const e=h.qSubNodes;C=h.qElemNo,h={...(f||p)?.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},g=(f||p)?.indentLevel??0}"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText())}let E=m;c&&(E=v>=1&&g>=v?g+1:g,0===g&&0===v&&0===h.qSubNodes.length&&(E=0));const I=e.at(m)?.[S],D=c&&void 0===I?.ref.qText||!I?uO({node:h,parent:f,root:p,x:E,y:w,pageY:S,layoutService:o,dimensionInfo:i[E],attrExprInfoIndex:a[E],isLeftColumn:!0,...c&&{isIndentModeEnabled:c,indentLevel:g},env:s,pageInfo:r,labelStructure:y,direction:l,pseudoDimMeasureIndex:C}):e[m][S];if(e[m][S]=D,h.qSubNodes.length){const e=c?0:m+1;t(p||D,D,h.qSubNodes,e,g)}})}(null,null,t,0,-1),e},pO=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},fO=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},hO=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s})=>{const{qLeft:l,qArea:c}=t;if(!l.length)return e;const u=dO(e.grid,l,c,n,r,o,i,a,s);pO(u,n.rowsOnCurrentPage);const d=fO(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:d}},mO=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach((t,n)=>{t.forEach((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:yA(),ref:t,isNull:l}})}),o},gO=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?mO({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},vO=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??uO({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},bO=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=vO(e.grid,c,u,n,r,o,i,a,s,l);pO(d,n.size.x);const p=fO(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},yO=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),xO=(e,t)=>{const{env:n}=oT(),{direction:r}=tT(),{layoutService:o,effectivePropertiesService:i}=sT(),{qPivotDataPages:a,pageInfo:s}=tT(),[l,c]=m(null),u=((e,t,n)=>v(()=>({left:e.map(yO),top:t.map(yO),measures:n.map(yO)}),[n,e,t]))(e,t,o.visibleMeasureInfo),d=n.flags.isEnabled,p=v(()=>bT(o,i,t,e,d),[o,i,t,e,d]),h=f(()=>a.slice(1).reduce((e,t)=>gO({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return mO({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),g=f(()=>a.slice(1).reduce((e,i)=>bO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:p.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=vO([],c,l,t,n,r,o,i,a,s);pO(u,t.size.x);const d=fO(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],o,t,u.top,p.size.y,n,s,r)),[a,o,t,u.top,p.size.y,n,s,r]),b=f(()=>a.slice(1).reduce((t,i)=>hO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r}),((e,t,n,r,o,i,a)=>{const{qArea:s,qLeft:l}=e,c=dO([],l,s,n,t,r,o,i,a);pO(c,n.rowsOnCurrentPage);const u=fO(c,t);return{grid:c,columnCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(a[0],o,s,e,u.left,n,r)),[a,o,s,e,u,n,r]),[y,x]=m(()=>h()),[S,w]=m(()=>g()),[C,E]=m(()=>b());Sq(()=>{x(h())},[h]),Sq(()=>{w(g())},[g]),Sq(()=>{E(b())},[b]),Sq(()=>{l&&l.forEach(i=>{x(e=>gO({prevData:e,dataPage:i,pageInfo:s})),w(e=>bO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:u.top,headerRows:p.size.y,env:n,pageInfo:s,direction:r})),E(t=>hO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:u.left,env:n,direction:r}))})},[l]);const I=f(e=>{c(e)},[]);return{headersData:p,measureData:y,topDimensionData:S,leftDimensionData:C,attrExprInfoIndexes:u,nextPageHandler:I}},SO=Math.sqrt(1e4),wO=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/XD.PixelsMin)}),CO=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/SO),r=Math.ceil(e.qHeight/SO);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*SO,qTop:e.qTop+n*SO,qWidth:Math.min(SO,e.qWidth-o*SO),qHeight:Math.min(SO,e.qHeight-n*SO)});return t};function EO({nextPageHandler:e}){const{model:t}=oT(),n=kf(Iq),{pageInfo:r}=tT(),{layoutService:o}=sT(),i=(e=>{const t=l(e);return t.current=e,t})(r.page),a=t,s=f(async(e,t)=>{await(a?.collapseLeft(uT,e,t,!1))},[a]),c=f(async(e,t)=>{await(a?.collapseTop(uT,e,t,!1))},[a]),u=f(async(e,t)=>{await(a?.expandLeft(uT,e,t,!1))},[a]),d=f(async(e,t)=>{await(a?.expandTop(uT,e,t,!1))},[a]),p=f(async t=>{if(a?.getHyperCubePivotData&&0!==t.length)try{const n=await a.getHyperCubePivotData(uT,t.reduce((e,t)=>[...e,...CO(t)],[]));i.current===r.page&&e(n)}catch(e){n.error({msg:"Failed to fetch pivot pages",payload:e})}},[a,e,r,i,n]),h=f((e,{dimensionInfoIndex:n,isLeftColumn:r,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=o.layout.qHyperCube;let u=[];switch(a){case cP.Dimension:u=[{qPath:`${uT}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case cP.Measures:if(r)u=s.map((e,t)=>({qPath:`${uT}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=o.getMeasureInfoIndexFromCellIndex(i);u=[{qPath:`${uT}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case cP.Pivot:u=[{qPath:`${uT}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,o]),m=f(async e=>{await(a?.applyPatches([{qPath:`${uT}/indentModeColumnWidth`,qOp:o.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...o.indentModeColumnWidth,...e})}],!0))},[a,o]);return v(()=>({collapseLeft:s,collapseTop:c,expandLeft:u,expandTop:d,applyColumnWidth:h,applyIndentModeColumnWidth:m,fetchPages:p}),[s,c,u,d,h,m,p])}const IO=(e,t,n)=>(r,o)=>{if("P"===r)return dT;const i=t[n+o];return e[i]},DO=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},RO=c({}),LO=()=>h(RO),MO=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=sT(),{qPivotDataPages:r}=tT();return v(()=>{const o=DO(r[0]?.qLeft??[]),i=DO(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(IO(n,t,0)),visibleTopDimensionInfo:i.map(IO(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=xO(t,n),c=EO({nextPageHandler:l}),u=v(()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:c}),[t,n,r,o,i,a,s,c]);return hi.jsx(RO.Provider,{value:u,children:e})},AO=20,PO=18,qO=.75,kO=e=>-1!==e&&e?.representation?.type===nP.Image,TO=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===nP.Image,OO=e=>void 0===e?wP:e,NO=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},_O=e=>NO(e,XD.PixelsDefault),jO=(e,t)=>NO(e,XD.PercentageDefault)*t/100,FO=(e,t,n)=>{switch(t?.type){case JD.Pixels:return _O(t.pixels);case JD.Percentage:return jO(t.percentage,e);case JD.FitToContent:case JD.Auto:default:return n}},zO=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:o,measureTextForHeader:i,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c,qDimensionInfo:u}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=u.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===pT)return e+0;const v=TO({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:nP.Text}})?g.width+8+4:r(f),b=!n.qAlwaysFullyExpanded&&p<c-1?21:0;let y=0;if(o&&i&&a){y=i("- ")+a}return Math.max(e,24*l+PO+b+v+y)},0),WO=(e,t,n)=>e.reduce((e,r)=>{const o=(n?0:1)*PO;return Math.max(e,o+t(r.qFallbackTitle??""))},0),$O=(e,t,n,r)=>{const o=100*e/t,i=r*qO*(o/100),a=o/100*+n;return Math.min(a,i)},VO=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),HO=(e,t)=>e.some(e=>e>=t*qO),BO=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:o,widthOverride:i,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u;const d=o*qO,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,zO({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,WO(e.visibleMeasureInfo,a));let g;const v=p.findIndex(e=>e.id===pT),b=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===JD.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+PO+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);u=[Math.max(b,e-f),f]}else{const n=Math.min(d,WO(e.visibleMeasureInfo,l,!0));g=Math.min(d,zO({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);u=[Math.max(b,r-f),f]}else u=[Math.max(b,h-f),f];const y=Math.min(d,u.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;i&&i<=d&&(x.type=JD.Pixels,x.pixels=i);return[JD.Pixels,JD.Percentage].includes(x.type)||HO(u,o)?((e,t,n,r)=>{let o=e[0],i=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:c}=t,u=NO(l,XD.PixelsDefault),d=NO(c,XD.PercentageDefault),p=HO(e,n);let f;s===JD.Auto&&p&&(o>i?o-=i:i-=o),s===JD.Pixels&&u&&(o=$O(e[0],a,u,n),i=$O(e[1],a,u,n)),s===JD.Percentage&&d&&(o=VO(e[0],a,d,n),i=VO(e[1],a,d,n)),i<=r&&(f=o-5,f>0&&(o-=f,i+=f)),f=i-r,f>0&&(o+=f,i-=f);const h=[o,i],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(u,x,o,f):{leftGridWidth:y,leftGridColumnWidths:u,leftGridFullWidth:y}};function GO({tableWidth:e}){const t=e*qO,{styleService:n,layoutService:r,effectivePropertiesService:o}=sT(),{translator:i}=oT(),{gridSectionsData:{headersData:a}}=LO(),{measureText:s}=gq(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:c}=gq({...n.dimensionValues,fontWeight:OO(n.dimensionValues.fontWeight)}),{measureText:u}=gq({...n.dimensionValues,...n.measureLabels}),d=f((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:o})=>{const i=u(r)+PO,a=Math.max(i,t);return Math.max(n,m?a:FO(e,o,a))},0),b=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===pT)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?AO:0;return PO+s(t)+AO+r})(r);return Math.max(o,t)},0);let y=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((i,s)=>{let c;if(m&&1!==a.size.x||!n||void 0===d||d!==i.colIdx){let t,n;if(i.columnWidthLocation===cP.Pivot?t=m?void 0:f:i.columnWidthLocation===cP.Dimension&&({columnWidth:t}=i),i.isLeftDimension)if(i.id===pT)n=v();else{const e=b(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:i,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(kO(s))return XD.PixelsDefault;const c=!o.qAlwaysFullyExpanded&&i&&t<p-1?21:0;return PO+l(n)+c})(i,s);n=Math.max(e,t),m&&!g&&s+1===p&&i.columnWidthLocation===cP.Dimension&&a.size.x>1&&(n=e)}else n=b(s),i.columnWidthLocation===cP.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),c=m&&!g&&a.size.x>1?n:FO(e,t,n)}else c=m?Math.min(t,n):n;return y+=c,c});return m&&a.size.x>1?BO({layoutService:r,effectivePropertiesService:o,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:c,translator:i}):{leftGridWidth:Math.min(t,y),leftGridColumnWidths:S,leftGridFullWidth:y}},[e,a,r,t,s,u,l,c,i,o]),[p,h]=m(d);Sq(()=>{h(d())},[d]);const g=f((e,t)=>{h(d(e,t))},[d]);return{...p,overrideLeftGridWidth:g}}function UO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=sT(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=LO(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:c}=o,{estimateWidth:u,measureText:d}=gq(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=gq({...r.dimensionValues,fontWeight:OO(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=i.at(-1),g=m===dT,b=s.length-a>i.length?21:0,y=v(()=>{const e=g?c:[m],t=l.x/e.length,n=[],r=[];let o=h;const i=(e,r)=>{n[e]=Math.min(XD.PixelsMax,Math.max(XD.PixelsMin,r)),o-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case JD.Pixels:i(t,_O(o));break;case JD.Percentage:i(t,jO(a,h));break;case JD.FitToContent:i(t,((e,t,n)=>n?XD.PixelsDefault:PO+(g?Math.max(u(e),d(t)):Math.max(Math.max(...c.map(e=>u(e.qApprMaxGlyphCount))),p(e)+b)))(s,l??"",kO(e)));break;case JD.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,i=o/e;r.forEach(e=>{n[e]=Math.max(XD.AutoMinPivot,i)})}return n},[g,c,m,l.x,h,u,d,p,b]),x=v(()=>{if(g){return c.reduce((e,t,n)=>e+y[n],0)/c.length}return y[0]},[g,y,c]),S=parseFloat((t/o.size.x).toFixed(12)),w=f(e=>(g&&void 0!==e?y[o.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-S,[g,y,o,x,S]),C=l.x*x;return{rightGridFullWidth:C,rightGridWidth:Math.min(C,h),getRightGridColumnWidth:w}}const YO=`scrollable-container--${dP.TopGrid}`,KO=`scrollable-container--${dP.LeftGrid}`,XO=`scrollable-container--${dP.DataGrid}`,JO=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},ZO=(e,t)=>e>t?pP.Forward:e<t?pP.Backward:pP.None,QO=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const{direction:s}=tT();d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),u.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[i,o,a,e,t,n,r,s])},eN=Sf(!1),tN=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,nN=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:o,data:i,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,o]=m({width:0,height:0}),[i,a]=m({width:0,height:0}),[s,c]=m({width:0,height:0}),[u,p]=m(!1),h=kf(eN),g=l(h),v=l(h);g.current=h;const b=f(()=>{p(e=>!e&&e);const r=JO(e.current),i=JO(t.current),s=JO(n.current);o(e=>tN(e,r)?r:e),a(e=>tN(e,i)?i:e),c(e=>tN(e,s)?s:e)},[e,t,n]);d(()=>{const r=new ResizeObserver(()=>{g.current||b()});return[e.current,t.current,n.current].filter(e=>Boolean(e)).forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[b,e,t,n]),d(()=>{const e=v.current;if(v.current=h,e&&!h){const e=setTimeout(b,0);return()=>{clearTimeout(e)}}},[h,b]);const y=f(()=>{p(!0)},[]);return{top:r,left:u?{...i,height:0}:i,data:u?{...s,height:0}:s,resetHorizontalScrollbarHeight:y}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,i.width),horizontalScrollbarHeight:Math.max(o.height,i.height)},resetHorizontalScrollbarHeight:a}},rN=()=>{const{interactions:e}=oT(),t=l(null),n=l(null),r=l(null),o=l(null),i=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u},resetHorizontalScrollbarHeight:p}=nN({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:s}=tT(),{downloadService:l,viewService:c,layoutService:u}=sT(),d=f(()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)},[e,t,n,r]);g(()=>{d()},[s.page,d]),g(()=>{u.triggerdByExpandOrCollapse||d()},[u,d]),g(()=>{if(u.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach(e=>{e?.scrollTo(t)}),o.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[u,r,a,i,o]),g(()=>{(l.isDownloadedAsPDForImage||u.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)},[c,l,u,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v}}=(()=>{const e=l(pP.None),t=l(pP.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=f(r=>{if(r instanceof WheelEvent&&(e.current=ZO(r.deltaY,0),t.current=ZO(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=ZO(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=ZO(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=sT();return f(t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===KO&&(e.leftGridScrollLeft=r.scrollLeft),o===XO&&(e.scrollLeft=r.scrollLeft),o===YO&&(e.topGridScrollTop=r.scrollTop),o!==KO&&o!==XO||(e.scrollTop=r.scrollTop)},[e])})(),y={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},getWrapperElements:f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current}),[t,n,r,o]),updateViewService:b,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{d(()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{e.ctrlKey||(e.preventDefault(),o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t))},f=r=>{r.ctrlKey||(r.preventDefault(),c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(c.scrollLeft)}),l.scrollTop=c.scrollTop,t.current?.forEach(e=>{e?.scrollTo(c.scrollTop)}),i(r))};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",f),a.scroll||setTimeout(()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)},0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)}},[i,o,a,e,t,n,r])})(y),QO(y),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:u,resetHorizontalScrollbarHeight:p}}},oN=()=>{const{layoutService:e}=sT(),{rect:t,pageInfo:n}=tT();return v(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},iN=({children:e,style:t})=>hi.jsx("div",{"data-testid":"fullSize",style:t,children:e}),aN=({children:e,style:t})=>{const{direction:n}=tT();return hi.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},sN=e=>e&&`scrollable-container--${e}`,lN=({children:e,style:t,origin:n},r)=>{const{interactions:o}=oT(),i=o.scroll?t:{overflow:"hidden"};return hi.jsx("div",{"data-testid":"scrollable","data-key":sN(n),style:i,ref:r,children:e})};var cN=n.forwardRef(lN);const uN=({children:e,style:t})=>{const{direction:n}=tT();return hi.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var dN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function pN(e,t){return e===t||!(!dN(e)||!dN(t))}function fN(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!pN(e[n],t[n]))return!1;return!0}function hN(e,t){var n;void 0===t&&(t=fN);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var mN="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function gN(e){cancelAnimationFrame(e.id)}function vN(e,t){var n=mN();var r={id:requestAnimationFrame(function o(){mN()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var bN=-1;function yN(e){if(void 0===e&&(e=!1),-1===bN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),bN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return bN}var xN=null;function SN(e){if(void 0===e&&(e=!1),null===xN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?xN="positive-descending":(t.scrollLeft=1,xN=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),xN}return xN}var wN=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function CN(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,Xs(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Xs(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=hN(function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=hN(function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),f=e+":"+t;if(u.hasOwnProperty(f))o=u[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;u[f]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=hN(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(SN()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&gN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=vN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return EN(e,t),v(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=yN();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=s(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,x=b>d?v:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(SN()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&gN(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?wN:f,m=e.outerElementType,g=e.outerTagName,v=e.rowCount,b=e.style,y=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],R=I[1],L=[];if(o>0&&v)for(var M=D;M<=R;M++)for(var A=C;A<=E;A++)L.push(r(t,{columnIndex:A,data:p,isScrolling:y?S:void 0,key:h({columnIndex:A,data:p,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,A)}));var P=s(this.props,this._instanceProps),q=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},b)},r(u||d||"div",{children:L,ref:c,style:{height:P,pointerEvents:S?"none":void 0,width:q}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,b=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,b,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=o(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=h(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var EN=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},IN=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},DN=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},RN=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},LN=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?MN(e,t,n,i,0,r):AN(e,t,n,Math.max(0,i),r)},MN=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=RN(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},AN=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&RN(e,t,r,n).offset<o;)r+=a,a*=2;return MN(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},PN=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=RN(e,t,n,i),c="column"===e?DN(t,i):IN(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){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}},qN=CN({getColumnOffset:function(e,t,n){return RN("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return LN("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=RN("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=RN("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:IN,getEstimatedTotalWidth:DN,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return PN("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return PN("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return RN("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return LN("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=RN("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=RN("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),kN=function(e,t){return e};function TN(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Xs(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Xs(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=hN(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=hN(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=hN(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(SN()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&gN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=vN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return ON(e,t),d(e),null};var p=t.prototype;return p.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)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?yN():0:l.scrollHeight>l.clientHeight?yN():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(SN()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&gN(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?kN:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,v=e.style,b=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var R=E;R<=I;R++)D.push(r(t,{data:d,key:f(R,d),index:R,isScrolling:b?x:void 0,style:this._getItemStyle(R)}));var L=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},r(l||c||"div",{children:D,ref:s,style:{height:S?"100%":L,pointerEvents:x?"none":void 0,width:S?L:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ON=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},NN=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},_N=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=NN(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},jN=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&NN(e,n,t).offset<r;)n+=i,i*=2;return _N(e,t,Math.min(n,o-1),Math.floor(n/2),r)},FN=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},zN=TN({getItemOffset:function(e,t,n){return NN(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:FN,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=NN(e,t,o),p=FN(e,o),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?_N(e,t,o,0,n):jN(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=NN(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=NN(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function WN(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var $N=["style"],VN=["style"];function HN(e,t){var n=e.style,r=ke(e,$N),o=t.style,i=ke(t,VN);return!WN(n,o)&&!WN(r,i)}const BN=10,GN=(e,t)=>e.current===pP.Backward?t:0,UN=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},YN=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,KN=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(UN(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&YN(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},XN=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===pP.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return KN({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},JN=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.size.x,l=GN(n,BN),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+BN,s-c),pageTop:o,qHeight:a}})(r,o,n),c=KN({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...XN({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},ZN=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},QN=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,e_=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(ZN(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&QN(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},t_=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=GN(n,BN),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+BN,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=e_({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===pP.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=e_({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},n_=(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],f=[];i.current!==pP.None&&(p=t_({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==pP.None&&(f=JN({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===pP.None&&a.current===pP.None&&(p=e_({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},r_=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-i,u=function(){i=Date.now(),r=0,e.apply(t,n)};r||(c>=o?u():r=setTimeout(u,o-c))}}(n_,100),o_=CM(n_,75),i_=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),a_=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{direction:s}=tT(),{styleService:{grid:{border:l,divider:c}}}=sT();return hi.jsx("div",{style:{...e,...zP,...HP(n,r,l,s,o),...GP({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},s_=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:o})=>{const{layoutService:{isIndentModeEnabled:i}}=sT(),a=o&&i;return hi.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},l_=e=>{const{type:t,imageSize:n}=e;return t!==nP.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},c_=e=>"number"==typeof e&&!Number.isNaN(+e),u_=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,d_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),p_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),f_=x((e,t)=>hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[hi.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),hi.jsx("use",{fillRule:"evenodd"})]})),h_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),m_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),g_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),v_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M2 7.5h12v1H2z"})})),b_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),y_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),x_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),S_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),w_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),C_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),E_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),I_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),D_={m:w_,"ï":x_,R:x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:C_,T:E_,U:I_,P:y_,Q:g_,"è":x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":h_,"©":f_,"23F4":m_,2013:S_,"&":b_,add:d_,"minus-2":v_,dot:p_},R_=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&D_[t];return o&&hi.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:hi.jsx(o,{style:{height:e}})})},L_=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),M_=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},A_=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return eL(e.localPaletteColors[t].color??"").blend(eL(s.color??""),s.t)},P_=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:L_(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:M_(r,t,n)}))),r},q_=(e,t,n,r)=>{const o=P_(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=A_(e,a,t);break}r=i}return n})(o,t);return a},k_=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!c_(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!c_(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},T_=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=k_(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!c_(t))return 0;let a=n&&c_(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},O_=e=>"flex-start"===e?"flex-end":"flex-start",N_=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=T_(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return M_(o,n.limitPaletteColorIndex,r);const a=L_(n.limitRange,t);return q_(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[i?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},__=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=sT(),{theme:o}=oT(),{direction:i}=tT(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=N_(e,t,i,o),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||xP,10),{iconKey:b,color:y,position:x}=u||{},S={display:"flex",paddingTop:2};return l?hi.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:c?y:n?.color},children:["left"===x&&R_({size:v,iconKey:b,color:y,pvStyle:S}),hi.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&R_({size:v,iconKey:b,color:y,pvStyle:S})]}):(S.paddingTop=5,R_({size:v,iconKey:b,color:y,pvStyle:S}))},j_=e=>!!e.target?.getAttribute("class")?.includes(KD),F_=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},z_=e=>null!==e.target?.closest("[data-prevent-selection]"),W_=e=>"A"===e.target?.tagName,$_=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const V_=c({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),H_=()=>h(V_),B_=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=tT(),n=kf(Iq),r=e.isActive(),[o,i]=u(F_,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const a=f(async()=>{if(!o.activeSelection)return;var t,r;1===o.activeSelection.clientSelectedCells.size&&(t=o.engineSelectedCells,(r=o.activeSelection).clientSelectedCells.forEach((e,n)=>{t?.has(n)&&(r.clientSelectedCells.delete(n),t.delete(n))}));const a=new Map([...o.engineSelectedCells??new Map,...o.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:a}}),await e.select({method:"selectPivotCells",params:[uT,Array.from(a,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){n.error({msg:"Failed to select pivot cells",payload:e}),i({type:"mouseup",payload:{engineSelectedCells:o.engineSelectedCells}})}},[o,e,n]);d(()=>{if(o.activeSelection)return document.addEventListener("mouseup",a),()=>{document.removeEventListener("mouseup",a)}},[a,o.activeSelection]);const s=f((e,t)=>n=>{const r=t(e);j_(n)||z_(n)||W_(n)||!(e=>1===e.buttons)(n)||!r||i($_({startIndex:e,getCellFromIndex:t,cell:r}))},[]),l=f(t=>async()=>{o.activeSelection&&(e.isActive()||await e.begin([uT]),i({type:"mouseover",payload:{index:t}}))},[o.activeSelection,e]),c=f((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);j_(n)||z_(n)||W_(n)||!r||(i($_({startIndex:e,getCellFromIndex:t,cell:r})),a())},[a]),p=f(e=>!(!o.engineSelectedCells?.size&&!o.activeSelection?.clientSelectedCells.size||!o.selectedField||e.selectionCellType===o.selectedField.selectionCellType&&("L"===e.selectionCellType?o.selectedField.index===e.x:o.selectedField.index===e.y)),[o.activeSelection?.clientSelectedCells.size,o.engineSelectedCells?.size,o.selectedField]),h=f(e=>!p(e)&&(o.engineSelectedCells?.has(e.ref.qElemNo)||!!o.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[p,o.activeSelection?.clientSelectedCells,o.engineSelectedCells]);return v(()=>({isSelected:h,isActive:r,isLocked:p,createMouseDownHandler:s,createMouseOverHandler:l,createPointerUpHandler:c}),[h,r,p,s,l,c])}(t);return hi.jsx(V_.Provider,{value:n,children:e})},G_=e=>"fill"===e.representation.imageSize,U_=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&G_(e)&&t&&(n="center"),e.representation.type!==nP.Image||G_(e)?n:e.representation.resolvedImagePosition?.vertical};var Y_=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(Y_||{});const K_={brighter:.5,darker:.3,opacity:.03},X_=(e,{cell:t,styleService:n})=>{if(e===Y_.Background||e===Y_.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.dimensionNull[e]:t.isPseudoDimension?e===Y_.Background&&t.headerColor?.background?t.headerColor.background:e===Y_.Color&&t.headerColor?.color?t.headerColor.color:n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},J_=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=X_(Y_.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?X_(Y_.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${kM(i=o,K_)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},Z_=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:X_(Y_.Color,{cell:e,styleService:t}),Q_=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=X_(Y_.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?wP:o},ej=({cell:e,styleService:t})=>X_(Y_.FontStyle,{cell:e,styleService:t}),tj=({cell:e,styleService:t})=>X_(Y_.TextDecoration,{cell:e,styleService:t}),nj=e=>e?"pointer":"default",rj=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},oj=(e,t)=>{if(!e.isLeftColumn||e.representation.type===nP.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},ij=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:o}=sT(),{interactions:i}=oT(),{isActive:a}=H_(),{dataModel:s}=LO();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!i.active||a||!s,c=Z_({cell:e,styleService:r,isCellSelected:n}),u=a?.4:1,d=e.ref.qCanExpand?sk:ak;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=TO({isLeftColumn:t,layoutService:o,representation:e.representation});return hi.jsx(d,{opacity:u,color:c,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...oj(e,r),...f&&{alignSelf:U_(e)}},onClick:l?void 0:rj({cell:e,expandOrCollapse:p})})},aj=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},sj=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},lj=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},cj=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,layoutService:i,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=i,l=TO({isLeftColumn:r,layoutService:i,representation:e}),c=t?21:0,u=e.imageBox?.width??24;let d=`calc(100% - ${c}px)`,p=o.headerCellHeight;r&&l&&(d=u),(a||r)&&(p=o.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},uj=e=>{if("alwaysFit"===e)return"contain"},dj=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),pj=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:sj(e,n,r),height:aj(e),objectFit:uj(e),objectPosition:lj(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),fj=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const{downloadService:e}=sT(),t=l(null),{promise:n,resolve:r}=v(()=>rq(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:f(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:i}}=sT(),{url:a,text:s,imageSize:c,resolvedImagePosition:u}=e,{overflow:p,...h}=t;return hi.jsx("img",{src:a,alt:s,style:{...pj({imageSize:c,resolvedImagePosition:u,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...h},onLoad:o,ref:r})},hj=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=sT(),{resolvedImagePosition:c}=e;return hi.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...cj({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:o,isMeasureCell:a})},children:hi.jsx(fj,{representation:e,textStyle:t,isMeasureCell:!0})})},mj=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},gj=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},vj={display:"flex",flexDirection:"row",alignItems:"center"},bj={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},yj=(e,t,n,r,o)=>t?{...bj,...o?e.measureValues:e.nullValues}:n?{...vj,color:e.totalValues.color,background:r??e.totalValues.background}:{...vj,color:e.measureValues.color,background:r??e.measureValues.background},xj=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,s={...WP,...!n&&$P(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const t=n?e.measureValues:e.nullValues,{fontWeight:r,fontStyle:o,textDecoration:i}=t;return{...s,fontWeight:r,fontStyle:o,textDecoration:i}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?wP:l,fontStyle:c,textDecoration:u}},Sj=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:o})=>{const{layoutService:i,styleService:a}=sT(),{isIndentModeEnabled:s}=i,l=e.isNull?i.getNullValueText():t.text,c=t.type===nP.Image,u=t.type===nP.Indicator,d=""!==l&&c_(u_(l)),p=xj(a,n,d,r,e.isNull);if(!s&&c&&!e.isNull||s&&c&&!e.isNull)return hi.jsx(hj,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:o});const f=u_(e.isNull?t.text:e.ref.qNum);return u&&c_(f)?hi.jsx(__,{representation:t,cellValue:f,textStyle:p}):hi.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},wj=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,Cj="flex-start",Ej=(e,t)=>e.isNull?Cj:t.type===nP.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:Cj,Ij=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:o}=oT(),{pageInfo:i,direction:a}=tT(),{styleService:s,layoutService:l}=sT(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:u,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleTopDimensionInfo:h}}=LO(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=sT(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=LO(),i=r.length,a=o.length;return f((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=LO(),n=t.length;return f(t=>{const r=e.grid.at(n-1)?.[t];return i_(r,e.totalDividerIndex)},[e,n])})(),v=(()=>{const{layoutService:{isIndentModeEnabled:e}}=sT(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=LO(),r=n.length;return f(n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return i_(i,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,y=p.grid.at(h.length-1),x=d.grid.at(-1),{background:S}=s.measureValues,w=u[t]?.[e],C=t===i.rowsOnCurrentPage-1,E=e===l.size.x-1;if(!w)return hi.jsx(a_,{style:{...n,background:S},isLastRow:C,isLastColumn:E,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const I=l.hasPseudoDimOnLeft?wj(x,t):wj(y,e),D=l.visibleMeasureInfo[I],R=aO({cell:w.ref,representationProperties:D.representation,attrExprInfoIndex:c.measures[I],env:o,direction:a,conditionalColoring:D.conditionalColoring,enabledFeatures:{[nP.Image]:!0,[nP.Indicator]:!0}}),L=!w.isNull&&m(e,t),M=w.isNull?l.getNullValueText():R.text,A=!w.isNull||""!==M&&!Number.isNaN(+M),P=sO(c.measures[I],w.ref),q=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==nP.Image?mj(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(w,D,R,A,a),k={...yj(s,w.isNull,L,P.background,A),...HP(C,E,s.grid.border,a,b),...GP({bottomDivider:v(t),rightDivider:g(e),borderColor:s.grid.divider}),...zP,padding:"0px 4px",display:"flex",justifyContent:q};return hi.jsx("div",{className:UD,title:M,style:{...k,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:hi.jsx(s_,{width:l_(R),verticalAlign:Ej(w,R),children:hi.jsx(Sj,{cell:w,representation:R,isTotalValueCell:L,color:P.color,cellHorizontalAlignment:q})})})};var Dj=n.memo(Ij,HN);const Rj=(e,t)=>t.list[e]?.id??e.toString(),Lj=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,Mj=e=>({...FP,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),Aj=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:c}=tT(),{layoutService:u,styleService:{grid:{divider:d},contentCellHeight:p}}=sT(),{dataModel:h,gridSectionsData:{measureData:m}}=LO(),v={...Mj(c),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},b=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=tT(),{downloadService:r,viewService:o,layoutService:i}=sT(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=LO(),u=s.columnCount,d=l.rowCount;return f(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=p,o.gridWidth=l-s+1,o.gridHeight=f-p+1;const h=o.gridWidth+u+(t.current===pP.None?0:BN),m=o.gridHeight+d+(e.current===pP.None?0:BN);let g=r_;m*h>1500&&(g=o_),g(a,i,c,n,o,e,t,r)},[o,i,a,c,e,t,n,u,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return Sq(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,c]),0===u.size.x?null:hi.jsx(qN,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:u.size.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:m},onItemsRendered:b,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:Lj,direction:c,children:Dj})};var Pj=y(Aj);const qj=x((e,t)=>hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[hi.jsx("path",{d:"M13 7H8zV4.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-1H3z"}),hi.jsx("use",{fillRule:"evenodd"})]})),kj=e=>{const[t,n]=Of(eN);return Sq(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},Tj=()=>{const[e,t]=m(!1),{dataModel:n}=LO(),{interactions:r}=oT(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=kj([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||j_(e)||o||t(!0)},isAdjustingWidth:o,setIsAdjustingWidth:i}};function Oj(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===NP.Transparent?zR.WHITE:r,i=eL(e.grid.border),a=eL(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return eL(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const Nj=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const{direction:s}=tT(),{interactions:l,translator:c}=oT(),{isActive:u}=H_(),{dataModel:d}=LO(),{styleService:p}=sT(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const h=Oj(p,e);return hi.jsx(Mq,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*qO,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},_j=Ms(mc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}})),jj=Ms("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),Fj=Ms("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...jP,justifyContent:e??jP.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),zj=Ms("div")(()=>({...jP})),Wj=Ms("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o})),$j=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Vj=Ms(Od,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),Hj=Ms("span")({textOverflow:"ellipsis",overflow:"hidden"}),Bj=Ms("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:AO,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),Gj=Ms("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let Uj=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const Yj=(e,t)=>({qExcludeList:t===Uj.Expand,qPos:{qDimName:e,qElemNo:[]}}),Kj=`${uT}/qExpansionState`,Xj=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r,logToSentry:o})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:Yj(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n,logToSentry:r})=>{const{index:o,expansionData:i}=t;try{let t,n=Kj,r="Add";void 0===o?t=JSON.stringify([i]):-1===o?(n=`${Kj}/-`,t=JSON.stringify(i)):(n=`${Kj}/${o}`,r="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:r,qValue:t}],!0)}catch(e){r.error({msg:n,payload:e})}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`,logToSentry:o})},Jj=({model:e,effectivePropertiesService:t,cell:n,logToSentry:r})=>{if(void 0===n.qEffectiveDimensionName)return;const o={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName,logToSentry:r};return{expandCallback:Xj({...o,action:Uj.Expand}),collapseCallback:Xj({...o,action:Uj.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},Zj={[mk.Sorting]:!0,[mk.Selections]:!0,[mk.Searching]:!0},Qj=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=sT(),{app:g,interactions:v,embed:b,translator:y,model:x,env:S}=oT(),w=kf(Iq),{fontSize:C,fontFamily:E,fontStyle:I,fontWeight:D,textDecoration:R,color:L,background:M,hoverBackground:A,activeBackground:P}=f.header,q=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:T}=a,{open:O,setOpen:N,handleOpenMenu:_,setIsAdjustingWidth:j}=Tj(),{direction:F}=tT(),z={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},W={embed:b,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},$={app:g,qStateName:h.layout.qStateName},{labelTextAlign:V}=h.getDimensionInfo(e.dimensionInfoIndex)??{},H=mj(V,"flex-start",F);return hi.jsxs(_j,{className:UD,title:e.label,interactions:v,background:O?e.headerColor?.headerMenuActiveBackground??P:e.headerColor?.background??M,hoverBackground:e.headerColor?.headerMenuHoverBackground??A,shouldShowMenuIcon:T,isDimension:e.isDim,style:{...t,...zP,...BP(e,o,n,r,f.grid.border,F),color:e.headerColor?.color??L},"data-testid":"title-cell",onClick:_,children:[hi.jsxs(Fj,{children:[k?hi.jsx(zj,{children:hi.jsx(qj,{height:12})}):null,hi.jsx(Wj,{fontFamily:E,fontSize:C,fontStyle:I,fontWeight:D,textDecoration:R,justifyContent:H,children:hi.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...WP,...$P(f.grid.columnLineClamp)}:WP,children:e.label})})]}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(bk,{headerData:e,translator:y,anchorRef:q,open:O,setOpen:N,interactions:v,menuAvailabilityFlags:Zj,sortRelatedArgs:z,searchRelatedArgs:W,selectionRelatedArgs:$,expandOrCollapseArgs:Jj({model:x,effectivePropertiesService:m,cell:e,logToSentry:w}),shouldShowMenuIcon:T,model:x&&"setActiveField"in x?x:void 0,direction:F,isAccessibleHeader:!0}),hi.jsx(jj,{ref:p,direction:F}),hi.jsx(jj,{ref:q,direction:F})]}):null,hi.jsx(Nj,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:j,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},eF=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=sT(),{direction:r}=tT();return e>0&&t>0?hi.jsx("div",{style:{...FP,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},tF=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),nF=x((e,t)=>hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[hi.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),hi.jsx("use",{fillRule:"evenodd"})]})),rF=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=tT(),{styleService:o}=sT(),{interactions:i,translator:a}=oT(),{isActive:s}=H_(),{dataModel:l}=LO(),{setIsAdjustingWidth:c}=kj([l]);if(!(!!i.active&&!s))return null;const u=Oj(o,{isLeftColumn:!0});return hi.jsx(Mq,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*qO))},confirmWidthCallback:r=>{if(r.type===JD.FitToContent)return void l.applyIndentModeColumnWidth({type:JD.Auto});const o=Math.min(r.pixels??t,e*qO);n(o),l.applyIndentModeColumnWidth({type:JD.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},oF=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),iF=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),{app:o,interactions:i,embed:a,translator:s,model:c}=oT(),u=kf(Iq),{layoutService:d,effectivePropertiesService:p}=sT(),{open:f,setOpen:h,handleOpenMenu:m}=Tj();return hi.jsxs(Vj,{onClick:m,isActive:f,children:[hi.jsx(Hj,{children:e.label}),hi.jsxs(Bj,{className:"indent-mode-dropdown-more",visible:f,children:[hi.jsx(oF,{}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(bk,{headerData:e,translator:s,anchorRef:n,open:f,setOpen:h,interactions:i,menuAvailabilityFlags:Zj,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:d.layout.qStateName},expandOrCollapseArgs:Jj({model:c,effectivePropertiesService:p,cell:e,logToSentry:u}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),hi.jsx(jj,{ref:r}),hi.jsx(jj,{ref:n})]}):null]})]})},aF=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===pT,i=e+1<n.length&&n[e+1]?.id===pT;return!(r&&o&&i)&&(t?.id!==pT&&e<n.length-1)},sF=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=sT(),{interactions:a,translator:s}=oT(),{dataModel:c,gridSectionsData:{headersData:u}}=LO(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=i,{color:g,background:v,hoverBackground:b,activeBackground:y,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=i.header,{isAdjustingWidth:I}=kj([c]),D=e=>{e.stopPropagation()},R={height:h,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return hi.jsxs(_j,{isDimension:!0,background:d?y:v,interactions:a,hoverBackground:b,style:{...R,...zP,color:g},onClick:e=>{!a.active||j_(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[hi.jsxs(Fj,{justifyContent:"flex-start",children:[hi.jsx(Wj,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:hi.jsx("span",{style:WP,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?hi.jsx(nF,{}):hi.jsx(tF,{}),hi.jsx(jj,{ref:f})]}),hi.jsx($j,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==pT&&hi.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:hi.jsx(iF,{cell:n,changeSortOrder:t})}),aF({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&hi.jsx(Tq,{"data-testid":"group-divider",variant:"middle"})])}),hi.jsx(rF,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},lF=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,cF={display:"grid",width:"fit-content"},uF=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=sT(),{gridSectionsData:{headersData:c}}=LO();return hi.jsxs("div",{"data-testid":"HEADER_GRID",style:{...cF,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:c.data.map(()=>`${r}px`).join(" "),height:a},children:[c.size.y>1&&hi.jsx(eF,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map((a,u)=>{let d=[];if(lF({layoutService:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(hi.jsx(sF,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===c.size.x;t.push(hi.jsx(Qj,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var dF=y(uF);const pF=(e,t,n,r)=>{const{layoutService:o}=sT();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,o])},fF=(e,t)=>{Sq(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},hF=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},mF=(e,t,n,r,o)=>{if(o)return;const i=e.representation,a=TO({isLeftColumn:n,layoutService:t,representation:i}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===nP.Image)return a&&l&&"center"!==l&&"rtl"===r?O_(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return mj(n,s,r)}const{textAlign:c}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return mj(c,s,r)},gF=()=>{},vF=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const{styleService:d,layoutService:p}=sT(),{interactions:f}=oT(),{direction:h}=tT(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:b}=H_(),{showLastBorder:y}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),w=S?g(u,e=>hF(e,r)):void 0,C=S?v(u):void 0,E=S?b(u,e=>hF(e,r)):void 0,I=TO({isLeftColumn:s,layoutService:p,representation:n.representation});return hi.jsx("div",{className:UD,title:f.passive?n.representation.text:void 0,style:{...t,...HP(i,a,d.grid.border,h,y),...GP({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...zP,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:nj(S),background:J_({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:mF(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:gj(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:gF,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},bF=e=>{e.stopPropagation()},yF=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:bF,color:zR.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),xF=({href:e,text:t,interactions:n,color:r})=>hi.jsx(Ou,{...yF({href:e,text:t,interactions:n,color:r}),children:t}),SF=Y();SF.use(U),SF.renderer.prio(["canvas"]);const wF=(e,t)=>e&&"center"!==e&&"rtl"===t?O_(e):e,CF=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:o}=t,{styleService:{grid:{lineClamp:i}}}=sT(),{direction:a}=tT();return hi.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${o?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[hi.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:U_(e),alignItems:wF(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:o?.width??24,height:"100%"},children:hi.jsx(fj,{representation:t,textStyle:n})}),hi.jsx(Gj,{padding:4/(i<=2?2:1),alignSelf:U_(e,!0),children:!!t.labelStructure&&dj(t.labelStructure)})]})},EF=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,IF=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>hi.jsxs("span",{children:[hi.jsx(Ou,{...yF({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&EF(n)]}),DF=({children:e,textStyle:t,shouldEnableStickyText:n})=>hi.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),RF=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,LF=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=tT(),{isActive:o}=H_(),{layoutService:i,styleService:a}=sT(),{env:s,interactions:l}=oT(),c=n&&i.isIndentModeEnabled;let u;if(u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&e.isNull?i.getDimensionNullValueText():e.isNull?IP:n?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(e.isNull)return IP;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text,e.isEmpty)return null;const d=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:o})=>({...WP,...$P(RF({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:o})),color:Z_({cell:e,styleService:t,isCellSelected:n}),fontWeight:Q_({cell:e,styleService:t}),fontStyle:ej({cell:e,styleService:t}),textDecoration:tj({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:i.isIndentModeEnabled});if(e.representation.type===nP.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,o=n&&t&&t.suffix?CF:hj;return hi.jsx(o,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:d,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:mF(e,i,n,r)})}if(e.representation.type===nP.Link&&!o&&!e.isTotal&&!e.isNull){const t=n&&e.representation.labelStructure?IF:xF;u=hi.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:l,color:e.expressionColor.color})}return hi.jsx(DF,{shouldEnableStickyText:c,textStyle:{...d,...e.representation.type===nP.Image&&e.isNull?{alignSelf:U_(e)}:{}},children:u})},MF=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=sT(),{isSelected:i}=H_(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=kj([n]),f=hF(e,n),h=a?e===l-1:c,m=a?c:e===l-1,g=i_(f,u,o.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return hi.jsx(a_,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=i(f);return hi.jsxs(vF,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[hi.jsxs(s_,{verticalAlign:U_(f),width:l_(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[hi.jsx(ij,{isLeftColumn:a,isCellSelected:v,cell:f}),hi.jsx(LF,{isLeftColumn:a,isCellSelected:v,cell:f})]}),hi.jsx(Nj,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?cP.Measures:cP.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var AF=n.memo(MF,HN);const PF=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},qF=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},kF=(e,t)=>n=>{e.current&&(e.current[t]=n)},TF={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...FP},OF={overflow:"hidden",willChange:"auto",flexShrink:0},NF=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i,direction:a}=tT(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:c}}}=sT(),{qSize:u}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=LO();fF(e,d),pF(e,t,n,l);const f=i.rowsOnCurrentPage*l,h={...TF,borderColor:c,width:r.reduce((e,t)=>e+t,0)};return hi.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,c)=>{const h=c===d.columnCount-1,m=fT(p[c]),{itemCount:g,estimatedItemSize:v,listValues:b}=qF(t,f,i.rowsOnCurrentPage,h),y=s.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,b,l,h,u.qcy);return hi.jsx(zN,{ref:kF(e,c),style:{...OF,flexGrow:h?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:y,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:o,listValues:b,totalDividerIndex:d.totalDividerIndex},itemKey:Rj,estimatedItemSize:v,children:AF},m)})})};var _F=y(NF);const jF={overflow:"hidden",willChange:"auto"},FF=e=>({...FP,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),zF=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{direction:a}=tT(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:c}}=sT(),{gridSectionsData:{headersData:u,topDimensionData:d}}=LO(),p={...FF(a),borderColor:l,height:r};fF(e,d),pF(e,n,r,c);const f=s.size.x*i();return 0===d.rowCount?hi.jsx("div",{style:{width:n,height:r,...FF(a)}}):hi.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const c=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=qF(r,f,s.size.x,c),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const o=t.size.x-1,i=lF({layoutService:e,headersData:t,topRowIndex:n})?0:o,a=r.at(i),s=Array.isArray(a)?a.at(o):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:u,topRowIndex:l}),v=g?fT(g):`empty ${l}`;return hi.jsx(zN,{ref:kF(e,l),style:jF,height:t(),width:n,itemCount:p,itemSize:PF({list:r,listValues:m,isLastRow:c,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:c,itemCount:p,showLastBorder:o,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:Rj,estimatedItemSize:h,direction:a,children:AF},v)})})};var WF=y(zF);const $F=()=>hi.jsx(VF,{}),VF=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=sT(),n=oN(),r=(()=>{const{model:e}=oT(),t=kf(Iq),n=f(async(n,r)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:o,dimensionInfoIndex:i,sortDirection:a}=n,s=[];if(r===a)return!1;s.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!o).toString()});try{return await e.applyPatches(s,!0),!0}catch(e){return t.error({msg:"Error while applying patch",payload:e}),!1}},[e,t]);return n})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:u},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=rN(),{leftGridWidth:b,leftGridFullWidth:y,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=sT(),{gridSectionsData:{headersData:i}}=LO(),{measureText:a}=gq(o.header,{allowLineBreaks:!1}),s=GO({tableWidth:e}),l=UO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,u=f((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+PO;return t&&d+AO<=l&&(u=!0,d+=AO),d+AO<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return d(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:u}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:R,topGridDims:L,leftGridDims:M,dataGridDims:A,metadata:{everyThingFitsInTableRectHeight:P,scrollbarsVisibilityStatus:q}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=oN(),{pageInfo:l}=tT(),{gridSectionsData:{headersData:c,topDimensionData:u}}=LO(),d=Math.min(s.height*qO,Math.max(s.height*qO-25,s.height-t-a)),p=s.width*qO,f=l.rowsOnCurrentPage*t,h=Math.max(c.size.y,u.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),b=s.width-p,y=Math.max(b,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+f+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,y),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),R=Math.min(I,f),L=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:A,hasDataGridOverflowX:P}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:y},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:L-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${v}px ${y}px`,gridTemplateRows:`${x}px ${I}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:g},stickyWrapper:{width:y-1-i,height:-1},self:{width:Math.min(o,y)-(C?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:v,height:L-g+(!A&&P?a:0)},stickyWrapper:{width:v,height:I-1-a},self:{width:v,height:Math.max(t,D-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:L-g+(!P&&A?a:0)},stickyWrapper:{width:y-1-i,height:I-1-a},self:{width:Math.min(o,y)-(C?1:0)-i,height:Math.max(t,R-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:b,leftGridOriginalWidth:y,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),k=f(()=>e,[e]),T=f(()=>t,[t]),{env:O}=oT(),N=Tf(Qk),_=O.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>_?(N({HEADER:o.current,TOP:i.current,LEFT:a.current,DATA:s.current}),()=>{N({HEADER:null,TOP:null,LEFT:null,DATA:null})}):()=>{},[_,N,o,i,a,s]),(()=>{const{downloadService:e}=sT();d(()=>{e.notifyIsDoneRendering()})})(),hi.jsxs(aN,{style:D,children:[hi.jsx("div",{style:{overflow:"hidden"},ref:o,children:hi.jsx(dF,{tableWidth:n.width,leftGridWidth:b,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:R.height,changeSortOrder:r,overrideLeftGridWidth:I})}),hi.jsx(cN,{style:q.topGrid,origin:dP.TopGrid,ref:i,children:hi.jsx(iN,{style:L.fullSizeWrapper,children:hi.jsx(uN,{style:L.stickyWrapper,children:hi.jsx(WF,{topGridRef:l,rowHightCallback:k,...L.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),hi.jsx(cN,{style:q.leftGrid,origin:dP.LeftGrid,ref:a,children:hi.jsx(iN,{style:M.fullSizeWrapper,children:hi.jsx(uN,{style:M.stickyWrapper,children:hi.jsx(_F,{leftGridRef:c,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:P}})})})}),hi.jsx(cN,{style:q.dataGrid,origin:dP.DataGrid,ref:s,children:hi.jsx(iN,{style:A.fullSizeWrapper,children:hi.jsx(uN,{style:A.stickyWrapper,children:hi.jsx(Pj,{dataGridRef:u,rowHightCallback:T,...A.self,showLastBorder:{right:w,bottom:P},getRightGridColumnWidth:C,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},HF=()=>{const{keyboard:e,theme:t,interactions:n,translator:r,env:o}=oT(),{pageInfo:i,updatePageInfo:a,rect:s}=tT(),{layoutService:c}=sT(),{layout:u,hasData:p}=c,f=l(null),h=Tf(Qk),m=o.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return d(()=>m?(h({WRAPPER:f.current}),()=>{h({WRAPPER:null})}):()=>{},[m,h]),hi.jsxs("div",{ref:f,children:[p?hi.jsx($F,{}):null,hi.jsx(cT,{}),hi.jsx(Uk,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{a({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:s,layout:u})]})};const BF=(e,{selections:t,baseObjects:r,coreServices:o,nebulaObjects:i},a)=>{const s=function(e){const t=Fp();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ds({...t,direction:e})}(r.direction);e.render(hi.jsx(n.StrictMode,{children:hi.jsx(Rf,{store:a,children:hi.jsx(Ps,{theme:s,children:hi.jsx(iT,{...i,children:hi.jsx(nT,{...r,children:hi.jsx(B_,{selections:t,children:hi.jsx(lT,{...o,children:hi.jsx(MO,{children:hi.jsx(HF,{})})})})})})})})}))};var GF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(GF||{}),UF=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(UF||{}),YF=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(YF||{}),KF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(KF||{});const XF=e=>e?`${parseInt(e,10)}px`:void 0,JF=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?NP.Transparent:n}},ZF=(e,t)=>+(parseInt(e,10)*EP*t+8).toFixed(2),QF=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?wP:"normal",ez=e=>e?.some(e=>"italic"===e)?"italic":"normal",tz=e=>e?.some(e=>"underline"===e)?"underline":"none",nz=document.createElement("textarea");function rz(e){nz.value=e,document.body.appendChild(nz),nz.select(),nz.setSelectionRange(0,nz.value.length),document.execCommand("copy"),document.body.removeChild(nz)}nz.style.position="absolute",nz.style.left="-9999px",nz.setAttribute("readonly","");function oz(e){O?.((t,n)=>{const r=n.target,o=r?.closest(`.${UD}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{rz(t)}):rz(t))})(o)}}),e?.forEach(e=>{e(t,n,o)})})}const iz=({model:e,layoutService:t,effectivePropertiesService:n,translator:r,env:o})=>{const i=L(()=>uh(o,{tag:"sn-pivot-table"}),[o]);return oq((o,a,s)=>{if(!e||n.qAlwaysFullyExpanded)return;const l=e,c=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:d}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(s,t);c.addItem(((e,t)=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(uT,0,0,!0),await e.expandLeft(uT,0,0,!0)}catch(e){t.error({msg:"Failed to expand all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:Xj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Uj.Expand,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i})),c.addItem(((e,t)=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(uT,0,0,!0),await e.collapseLeft(uT,0,0,!0)}catch(e){t.error({msg:"Failed to collapse all",payload:e})}}}))(l,i)),"string"==typeof u&&c.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o,logToSentry:i})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:Xj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Uj.Collapse,logToSentry:i})}))({model:l,effectivePropertiesService:n,qEffectiveDimensionName:u,label:d,translator:r,logToSentry:i}))},[e,t,n,i])},az=(e,t)=>L(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:o,qEffectiveInterColumnSortOrder:i,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,c=r?.content?.rowsPerPage??15e3,u={x:Math.min(e.qHyperCube.qSize.qcx,CP),y:Math.min(e.qHyperCube.qSize.qcy,c)},d=i.slice(0,o),p=e=>d.some(t=>t===e),f=p(dT),h=new Map(i.map(e=>[s[e]??dT,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??IP,getDimensionNullValueText:()=>n?.dimensionText??IP,getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===dT?void 0:s.at(e),getDimensionInfoIndex:e=>h.get(e)??-1,size:u,isSnapshot:l,hasLimitedData:!l&&u.x<e.qHyperCube.qSize.qcx,hasData:u.x>0&&u.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:f,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:JD.Auto,pixels:XD.PixelsDefault,percentage:XD.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),sz=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=aq(e);return t.current=e,t})(wO(o));return pq(async()=>{const{qHyperCube:t}=i,{maxNumberOfVisibleRows:o,maxNumberOfVisibleColumns:c}=l.current;if(a)return i.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,o,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(i,r,o,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(CP,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(s,n,i.qHyperCube.qSize,r,o,c);return t?e.getHyperCubePivotData(uT,CO(t)):[]}return t.qPivotDataPages},[i,a,e,n,r.page,r.rowsPerPage,l,s])},lz=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),cz=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:lz({rowsPerPage:n,totalRowCount:e,page:t})}),uz=15,dz=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:o})=>{const{freeResize:i}=M();return N(async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-uz,0),c=Math.max(s+o-uz,s,0),u=CP-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=wO(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=CO(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(uT,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object.size.w=n.width,i.snapshotData.object.size.h=n.height}return i}),_(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)}),[t]),e.layout.snapshotData?.content&&!i?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var pz={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const fz=()=>{const e=j(),t=e.language();return L(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(pz).forEach(t=>{e.add(pz[t])})}(e)},[e]),{translator:e,language:t}},hz=e=>{const t=L(()=>Ef(),[]);t.set(Eq,e);const{flags:n}=e,r=F(),o=(e=>{const t=L(()=>yq.createRoot(e),[e]);return q(()=>()=>{t.unmount()},[t]),t})(r),i=z(),a=W(),s=$(),l=V(),c=H(),u=(()=>{const{viewState:e}=M(),t=aq(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=L(()=>rq(),[]),i=oq(e=>{t.current.add(e)},[t]),a=oq(CM(async()=>{await Promise.all(t.current),t.current.clear(),o()},1e3),[o,t]);return A(async()=>{await r},[r]),L(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i}),[a,n,e,i])})(),d=((e,t)=>{const[n]=pq(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return L(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,i),p=az(i,n),f=(e=>{const t=T();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=dq(i,r),{translator:g,language:v}=fz(),{pageInfo:b,updatePageInfo:y}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,o=t.isDownloadedAsPDForImage||e.isSnapshot,i=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=P(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!o,...cz(r.qcy,a,i)}}),l=e.layout.qHyperCube.qSize.qcy;return q(()=>{s(t=>({...t,...cz(l,t.page,i),shouldShowPagination:l>e.size.y&&!o}))},[l,e.size.y,s,o,i]),q(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=lz({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:lz({...a,...e})})}}})(p,u),x=((e,t,n)=>L(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(b,i,u),S=dz({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:b}),[w,C]=sz({model:a,layoutService:p,viewService:x,pageInfo:b,rect:S}),E=L(()=>((e,t,n)=>{const r=n.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),o=t.layout.components?.find(e=>"theme"===e.key),i=o?.header,a=o?.dimensionValues,s=o?.measureValues,l=o?.measureLabels,c=o?.totalValues,u=o?.nullValues,d=(r?o?.dimensionNullValues:void 0)??u,p=o?.grid,f=(t,n,r)=>e.getStyle(t,n,r),h=+(p?.[GF.LineClamp]??f(UF.Grid,YF.Grid,KF.LineClamp)??1),m=+(p?.[GF.ColumnLineClamp]??f(UF.Grid,YF.Grid,KF.ColumnLineClamp)??1),g=JF(e,i?.[GF.Background])??f(UF.Dimension,YF.LabelName,KF.BackgroundColor)??NP.Transparent,v={header:{fontSize:XF(i?.[GF.FontSize])??f(UF.Dimension,YF.LabelName,KF.FontSize)??xP,fontFamily:i?.[GF.FontFamily]??f(UF.Dimension,YF.LabelName,KF.FontFamily)??SP,fontWeight:QF(i?.[GF.FontStyle],wP),fontStyle:ez(i?.[GF.FontStyle]),textDecoration:tz(i?.[GF.FontStyle]),color:JF(e,i?.[GF.FontColor])??f(UF.Dimension,YF.LabelName,KF.FontColor)??zR.TEXT,background:g,hoverBackground:kM(g,ZD),activeBackground:kM(g,QD)},dimensionValues:{fontSize:XF(a?.[GF.FontSize])??f(UF.Dimension,YF.LabelValue,KF.FontSize)??xP,fontFamily:a?.[GF.FontFamily]??f(UF.Dimension,YF.LabelValue,KF.FontFamily)??SP,fontWeight:QF(a?.[GF.FontStyle],void 0),fontStyle:ez(a?.[GF.FontStyle]),textDecoration:tz(a?.[GF.FontStyle]),color:JF(e,a?.[GF.FontColor])??f(UF.Dimension,YF.LabelValue,KF.FontColor)??zR.TEXT,background:JF(e,a?.[GF.Background])??f(UF.Dimension,YF.LabelValue,KF.BackgroundColor)??NP.Transparent},measureValues:{fontSize:XF(s?.[GF.FontSize])??f(UF.Measure,YF.LabelValue,KF.FontSize)??xP,fontFamily:s?.[GF.FontFamily]??f(UF.Measure,YF.LabelValue,KF.FontFamily)??SP,fontWeight:QF(s?.[GF.FontStyle],"normal"),fontStyle:ez(s?.[GF.FontStyle]),textDecoration:tz(s?.[GF.FontStyle]),color:JF(e,s?.[GF.FontColor])??f(UF.Measure,YF.LabelValue,KF.FontColor)??NP.FontSecondary,background:JF(e,s?.[GF.Background])??f(UF.Measure,YF.LabelValue,KF.BackgroundColor)??NP.Transparent},measureLabels:{fontWeight:QF(l?.[GF.FontStyle],"normal"),fontStyle:ez(l?.[GF.FontStyle]),textDecoration:tz(l?.[GF.FontStyle]),color:JF(e,l?.[GF.FontColor])??f(UF.Measure,YF.LabelName,KF.FontColor)??NP.FontSecondary,background:JF(e,l?.[GF.Background])??f(UF.Measure,YF.LabelName,KF.BackgroundColor)??NP.Transparent},totalValues:{fontWeight:QF(c?.[GF.FontStyle],wP),fontStyle:ez(c?.[GF.FontStyle]),textDecoration:tz(c?.[GF.FontStyle]),color:JF(e,c?.[GF.FontColor])??f(UF.Total,YF.LabelValue,KF.FontColor)??zR.TEXT,background:JF(e,c?.[GF.Background])??f(UF.Total,YF.LabelValue,KF.BackgroundColor)??NP.Transparent},dimensionNull:{fontWeight:QF(d?.[GF.FontStyle],"normal"),fontStyle:ez(d?.[GF.FontStyle]),textDecoration:tz(d?.[GF.FontStyle]),color:JF(e,d?.[GF.FontColor])??f(UF.Null,YF.LabelValue,KF.FontColor)??zR.TEXT,background:JF(e,d?.[GF.Background])??f(UF.Null,YF.LabelValue,KF.BackgroundColor)??NP.NullValueBackground},nullValues:{fontWeight:QF(u?.[GF.FontStyle],"normal"),fontStyle:ez(u?.[GF.FontStyle]),textDecoration:tz(u?.[GF.FontStyle]),color:JF(e,u?.[GF.FontColor])??f(UF.Null,YF.LabelValue,KF.FontColor)??zR.TEXT,background:JF(e,u?.[GF.Background])??f(UF.Null,YF.LabelValue,KF.BackgroundColor)??NP.NullValueBackground},grid:{columnLineClamp:m,lineClamp:h,border:JF(e,p?.[GF.Border])??f(UF.Grid,YF.Grid,KF.BorderColor)??NP.DividerLight,divider:JF(e,p?.[GF.Divider])??f(UF.Grid,YF.Divider,KF.BorderColor)??NP.DividerDark,background:JF(e,p?.[GF.Background])??f(UF.Grid,YF.Grid,KF.BackgroundColor)??NP.Transparent},selectedColors:qM(e)};return v.headerCellHeight=Math.max(ZF(v.header.fontSize,m),ZF(v.dimensionValues.fontSize,m),32),v.contentCellHeight=Math.max(ZF(v.measureValues.fontSize,h),ZF(v.dimensionValues.fontSize,h),24),v.dimensionValueTextHeight=ZF(v.dimensionValues.fontSize,1),v})(m,p,n),[m,p,n]),I=((e,t,n)=>{const[,r,o]=pq(async()=>{const t=gL(),n=e.getStyle("","","fontFamily"),r=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),i=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...i,n,r,o,xq].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(m,i,e),{direction:D}=M();oz([iz({model:a,layoutService:p,effectivePropertiesService:d,translator:g,env:e})]),q(()=>{!C&&a&&!!w&&I&&BF(o,{selections:h,baseObjects:{rect:S,pageInfo:b,qPivotDataPages:w,updatePageInfo:y,direction:D},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:c,translator:g,interactions:f},coreServices:{styleService:E,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}},t)},[a,s,S,f,h,x,p,u,C,w,E,o,I,g,v,b,y,d,l,c,m,e,D,t])},mz={version:"7.44.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},gz=()=>({...mz,qHyperCubeDef:{...mz.qHyperCubeDef,qIndentMode:!1}})}}});