@sisense/sdk-ui-vue 2.18.0 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -371,7 +371,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
371
371
|
@keyframes loading-dots-animation {
|
|
372
372
|
${Object.entries(i).map(([a,s])=>`${a} { ${Object.entries(s).map(([l,c])=>`${l}: ${c};`).join("")} }`).join("")}
|
|
373
373
|
}
|
|
374
|
-
`})),ge("div",{style:n}),ge("div",{style:o}),ge("div",{style:r})]})},u8=({themeSettings:e,onCancel:t})=>{const{t:n}=nn(),o=e!=null&&e.chart.backgroundColor?{backgroundColor:e.chart.backgroundColor}:void 0;return ge("div",{style:o,className:"csdk-h-full csdk-bg-white csdk-p-[20px]","aria-label":"csdk-loading-indicator",children:rt("div",{style:o,className:"csdk-h-full csdk-bg-background-priority csdk-flex csdk-flex-col csdk-gap-y-4 csdk-items-center csdk-justify-center",children:[ge(JP,{color:e==null?void 0:e.chart.textColor}),t&&ge("div",{className:"csdk-text-ai-sm csdk-text-text-link csdk-cursor-pointer",onClick:t,children:n("cancel")})]})})},FZe=({shouldSkipSisenseContextWaiting:e,customContextErrorMessageKey:t})=>n=>function(o){if(zZe(e,o))return ge(n,ke({},o));const{app:r,isInitialized:i}=Hn();if(!i){const a=t||"errors.noSisenseContext";throw new Et(a)}return r?ge(n,ke({},o)):ge(u8,{})};function zZe(e,t){return Zde(e)&&e||mg(e)&&e(t)}const BZe={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},xY="composesdk",Jde=(e,t,n,o=!1)=>{const r=Object.assign({action:e,cat:xY,eventType:"product",direct:!0},t);return o&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",r),Promise.resolve()):n.post("api/activities/",[r],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${xY}`,i)})},wY=(e,t,n,o,r)=>{const i=BZe[`${e}`];return i.internal&&Jde(e,t,n,r),i.external&&o&&o(ke({action:e},t)),Promise.resolve()},d8=()=>{var e,t;const{tracking:n,app:o}=Hn(),r=(t=(e=o==null?void 0:o.httpClient)==null?void 0:e.auth)==null?void 0:t.type,i=ze((s,l={},c=!1)=>o?wY(s,$e(ke({},l),{authType:r}),o.httpClient,n.onTrackingEvent,c):Promise.resolve(),[n,o,r]),a=ze((s,l=!1)=>{if(!o)return Promise.resolve();const{packageName:c,packageVersion:u,component:h,error:d}=s;let f="";return typeof d=="string"?f=d:d instanceof Error&&(f=d.message||d.toString()),wY("sdkError",$e(ke({},{packageName:c,packageVersion:u,component:h,error:f}),{authType:r}),o.httpClient,n.onTrackingEvent,l)},[n,o,r]);return{trackEvent:i,trackError:a}};let Qde=class extends Zn{constructor(t){super(t),Ao(this,"componentName"),Ao(this,"context"),Ao(this,"handler"),Ao(this,"httpClient"),Ao(this,"postponedErrors",[]),this.handler=t.handler,this.componentName=t.componentName}componentDidMount(){var t;this.context.isInitialized&&(this.httpClient=(t=this.context.app)==null?void 0:t.httpClient)}componentDidCatch(t){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(t):this.postponedErrors.push(t)),t}sendErrorTracking(t){try{this.handler({packageName:"sdk-ui",packageVersion:"2.18.
|
|
374
|
+
`})),ge("div",{style:n}),ge("div",{style:o}),ge("div",{style:r})]})},u8=({themeSettings:e,onCancel:t})=>{const{t:n}=nn(),o=e!=null&&e.chart.backgroundColor?{backgroundColor:e.chart.backgroundColor}:void 0;return ge("div",{style:o,className:"csdk-h-full csdk-bg-white csdk-p-[20px]","aria-label":"csdk-loading-indicator",children:rt("div",{style:o,className:"csdk-h-full csdk-bg-background-priority csdk-flex csdk-flex-col csdk-gap-y-4 csdk-items-center csdk-justify-center",children:[ge(JP,{color:e==null?void 0:e.chart.textColor}),t&&ge("div",{className:"csdk-text-ai-sm csdk-text-text-link csdk-cursor-pointer",onClick:t,children:n("cancel")})]})})},FZe=({shouldSkipSisenseContextWaiting:e,customContextErrorMessageKey:t})=>n=>function(o){if(zZe(e,o))return ge(n,ke({},o));const{app:r,isInitialized:i}=Hn();if(!i){const a=t||"errors.noSisenseContext";throw new Et(a)}return r?ge(n,ke({},o)):ge(u8,{})};function zZe(e,t){return Zde(e)&&e||mg(e)&&e(t)}const BZe={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},xY="composesdk",Jde=(e,t,n,o=!1)=>{const r=Object.assign({action:e,cat:xY,eventType:"product",direct:!0},t);return o&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",r),Promise.resolve()):n.post("api/activities/",[r],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(i=>{console.error(`unable to log action=${e}, category=${xY}`,i)})},wY=(e,t,n,o,r)=>{const i=BZe[`${e}`];return i.internal&&Jde(e,t,n,r),i.external&&o&&o(ke({action:e},t)),Promise.resolve()},d8=()=>{var e,t;const{tracking:n,app:o}=Hn(),r=(t=(e=o==null?void 0:o.httpClient)==null?void 0:e.auth)==null?void 0:t.type,i=ze((s,l={},c=!1)=>o?wY(s,$e(ke({},l),{authType:r}),o.httpClient,n.onTrackingEvent,c):Promise.resolve(),[n,o,r]),a=ze((s,l=!1)=>{if(!o)return Promise.resolve();const{packageName:c,packageVersion:u,component:h,error:d}=s;let f="";return typeof d=="string"?f=d:d instanceof Error&&(f=d.message||d.toString()),wY("sdkError",$e(ke({},{packageName:c,packageVersion:u,component:h,error:f}),{authType:r}),o.httpClient,n.onTrackingEvent,l)},[n,o,r]);return{trackEvent:i,trackError:a}};let Qde=class extends Zn{constructor(t){super(t),Ao(this,"componentName"),Ao(this,"context"),Ao(this,"handler"),Ao(this,"httpClient"),Ao(this,"postponedErrors",[]),this.handler=t.handler,this.componentName=t.componentName}componentDidMount(){var t;this.context.isInitialized&&(this.httpClient=(t=this.context.app)==null?void 0:t.httpClient)}componentDidCatch(t){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(t):this.postponedErrors.push(t)),t}sendErrorTracking(t){try{this.handler({packageName:"sdk-ui",packageVersion:"2.18.1",component:this.componentName,error:t})}catch(n){console.log("Failed to send tracking error event: ",n)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(t=>this.sendErrorTracking(t)),this.postponedErrors=[],this.props.children}};Ao(Qde,"contextType",JB);const HZe="sdkComponentInit",epe=hn(!1),WZe=({skipNested:e=!0,children:t})=>ge(epe.Provider,{value:e,children:t}),VZe=(e,t)=>{const{componentName:n,config:o}=e,{tracking:r,app:i}=Hn(),{trackEvent:a}=d8(),s=en(epe),l=Ve(!1);Ke(()=>{if(!(!r||!i)&&!l.current&&!s){const c={packageName:o.packageName||r.packageName,packageVersion:o.packageVersion||"2.18.1",componentName:n,attributesUsed:Object.entries(t).filter(([,u])=>!!u).map(([u])=>u).join(", ")};a(HZe,c,!r.enabled).finally(()=>l.current=!0)}},[n,t,r,s,a,i,o])},tpe=({componentName:e,config:t})=>{const{skip:n,transparent:o}=t||{};return r=>function(i){const{trackError:a}=d8();return Zde(n)&&n||mg(n)&&n(i)?ge(r,ke({},i)):(VZe({componentName:e,config:t},i),ge(WZe,{skipNested:!o,children:ge(Qde,{componentName:e,handler:a,children:ge(r,ke({},i))})}))}},UZe=e=>t=>(t.displayName=e,t),jn=e=>{const{componentName:t,shouldSkipSisenseContextWaiting:n,trackingConfig:o={},customContextErrorMessageKey:r,shouldHaveOwnMenuRoot:i,shouldHaveOwnModalRoot:a}=e;return s=>qi(UZe(t),FZe({shouldSkipSisenseContextWaiting:n,customContextErrorMessageKey:r}),tpe({componentName:t,config:o}),qP({componentName:t}),cXe(),AZe({shouldHaveOwnMenuRoot:i}),jZe({shouldHaveOwnModalRoot:a}))(s)};function _Y(e){return`${e.fontFamily}|${e.fontWeight}|${e.fontStyle}`}function GZe(e,t){const[n,o]=Ye([]),[r,i]=Ye(!1),a=Ge(()=>e.filter(s=>!t.includes(_Y(s))),[e,t]);return Ke(()=>{if(a.length===0){i(!0);return}let s=!1;const l=a.map(c=>{const u=c.src.map(h=>Object.entries(h).map(([d,f])=>`${d}('${f}')`).join(" ")).join(", ");return new FontFace(c.fontFamily,u,{style:c.fontStyle,weight:c.fontWeight.toString()}).load().then(h=>(s||document.fonts.add(h),_Y(c)))});return Promise.all(l).then(c=>{s||(o(u=>[...u,...c]),i(!0))}).catch(c=>{console.error("Failed to load fonts:",c),i(!0)}),()=>{s=!0}},[a]),{loadedFonts:n,areAllFontsLoaded:r}}const CY=hn({loadedFonts:[]}),qZe=({fonts:e,children:t})=>{var n;const{loadedFonts:o}=en(CY),{themeSettings:r}=Nt(),{loadedFonts:i,areAllFontsLoaded:a}=GZe(e||((n=r.typography.fontsLoader)==null?void 0:n.fonts)||[],o);return ge(CY.Provider,{value:{loadedFonts:[...o,...i]},children:a&&t})};var uo=(e=>(e.DEFAULT="default",e.HOVER="hover",e.FOCUS="focus",e))(uo||{});function t3(e){return typeof e=="string"}function YZe(e){var t;const n=Nt().themeSettings,[o,r]=Ye(null),[i,a]=Ye(null),s=(t=Hn().app)==null?void 0:t.httpClient;Ke(()=>{e&&t3(e)&&s&&Jue(e,s).then(c=>{r(c)}).catch(a)},[s,e]),Ke(()=>{(!e||!t3(e))&&(r(null),a(null))},[e]);const l=Ge(()=>o?SY(n,o):e&&!t3(e)?SY(n,e):n,[o,n,e]);return i?[null,i]:[l,null]}function SY(e,t){return qo.withOptions({mergeArrays:!1},e,t)}const sy=jn({componentName:"ThemeProvider",trackingConfig:{skip:e=>!!e.skipTracking,transparent:!0},shouldSkipSisenseContextWaiting:!0})(e=>{const{theme:t,children:n,config:o}=e,[r,i]=YZe(t),a=Nt().config,s=Ge(()=>o&&a?qo.withOptions({mergeArrays:!1},a,o):o||a,[a,o]);if(i)throw i;return ge(_n,{children:r&&ge(QB.Provider,{value:{themeSettings:r,config:s},children:ge(qZe,{children:n})})})});var w4={exports:{}};/* @preserve
|
|
375
375
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
376
376
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
377
377
|
*/(function(e,t){(function(n,o){o(t)})(qr,function(n){var o="1.9.4";function r(Y){var ae,pe,be,Oe;for(pe=1,be=arguments.length;pe<be;pe++){Oe=arguments[pe];for(ae in Oe)Y[ae]=Oe[ae]}return Y}var i=Object.create||function(){function Y(){}return function(ae){return Y.prototype=ae,new Y}}();function a(Y,ae){var pe=Array.prototype.slice;if(Y.bind)return Y.bind.apply(Y,pe.call(arguments,1));var be=pe.call(arguments,2);return function(){return Y.apply(ae,be.length?be.concat(pe.call(arguments)):arguments)}}var s=0;function l(Y){return"_leaflet_id"in Y||(Y._leaflet_id=++s),Y._leaflet_id}function c(Y,ae,pe){var be,Oe,Re,Je;return Je=function(){be=!1,Oe&&(Re.apply(pe,Oe),Oe=!1)},Re=function(){be?Oe=arguments:(Y.apply(pe,arguments),setTimeout(Je,ae),be=!0)},Re}function u(Y,ae,pe){var be=ae[1],Oe=ae[0],Re=be-Oe;return Y===be&&pe?Y:((Y-Oe)%Re+Re)%Re+Oe}function h(){return!1}function d(Y,ae){if(ae===!1)return Y;var pe=Math.pow(10,ae===void 0?6:ae);return Math.round(Y*pe)/pe}function f(Y){return Y.trim?Y.trim():Y.replace(/^\s+|\s+$/g,"")}function m(Y){return f(Y).split(/\s+/)}function p(Y,ae){Object.prototype.hasOwnProperty.call(Y,"options")||(Y.options=Y.options?i(Y.options):{});for(var pe in ae)Y.options[pe]=ae[pe];return Y.options}function y(Y,ae,pe){var be=[];for(var Oe in Y)be.push(encodeURIComponent(pe?Oe.toUpperCase():Oe)+"="+encodeURIComponent(Y[Oe]));return(!ae||ae.indexOf("?")===-1?"?":"&")+be.join("&")}var S=/\{ *([\w_ -]+) *\}/g;function R(Y,ae){return Y.replace(S,function(pe,be){var Oe=ae[be];if(Oe===void 0)throw new Error("No value provided for variable "+pe);return typeof Oe=="function"&&(Oe=Oe(ae)),Oe})}var $=Array.isArray||function(Y){return Object.prototype.toString.call(Y)==="[object Array]"};function j(Y,ae){for(var pe=0;pe<Y.length;pe++)if(Y[pe]===ae)return pe;return-1}var E="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function A(Y){return window["webkit"+Y]||window["moz"+Y]||window["ms"+Y]}var D=0;function N(Y){var ae=+new Date,pe=Math.max(0,16-(ae-D));return D=ae+pe,window.setTimeout(Y,pe)}var W=window.requestAnimationFrame||A("RequestAnimationFrame")||N,P=window.cancelAnimationFrame||A("CancelAnimationFrame")||A("CancelRequestAnimationFrame")||function(Y){window.clearTimeout(Y)};function _(Y,ae,pe){if(pe&&W===N)Y.call(ae);else return W.call(window,a(Y,ae))}function g(Y){Y&&P.call(window,Y)}var T={__proto__:null,extend:r,create:i,bind:a,get lastId(){return s},stamp:l,throttle:c,wrapNum:u,falseFn:h,formatNum:d,trim:f,splitWords:m,setOptions:p,getParamString:y,template:R,isArray:$,indexOf:j,emptyImageUrl:E,requestFn:W,cancelFn:P,requestAnimFrame:_,cancelAnimFrame:g};function M(){}M.extend=function(Y){var ae=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},pe=ae.__super__=this.prototype,be=i(pe);be.constructor=ae,ae.prototype=be;for(var Oe in this)Object.prototype.hasOwnProperty.call(this,Oe)&&Oe!=="prototype"&&Oe!=="__super__"&&(ae[Oe]=this[Oe]);return Y.statics&&r(ae,Y.statics),Y.includes&&(O(Y.includes),r.apply(null,[be].concat(Y.includes))),r(be,Y),delete be.statics,delete be.includes,be.options&&(be.options=pe.options?i(pe.options):{},r(be.options,Y.options)),be._initHooks=[],be.callInitHooks=function(){if(!this._initHooksCalled){pe.callInitHooks&&pe.callInitHooks.call(this),this._initHooksCalled=!0;for(var Re=0,Je=be._initHooks.length;Re<Je;Re++)be._initHooks[Re].call(this)}},ae},M.include=function(Y){var ae=this.prototype.options;return r(this.prototype,Y),Y.options&&(this.prototype.options=ae,this.mergeOptions(Y.options)),this},M.mergeOptions=function(Y){return r(this.prototype.options,Y),this},M.addInitHook=function(Y){var ae=Array.prototype.slice.call(arguments,1),pe=typeof Y=="function"?Y:function(){this[Y].apply(this,ae)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(pe),this};function O(Y){if(!(typeof L>"u"||!L||!L.Mixin)){Y=$(Y)?Y:[Y];for(var ae=0;ae<Y.length;ae++)Y[ae]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var H={on:function(Y,ae,pe){if(typeof Y=="object")for(var be in Y)this._on(be,Y[be],ae);else{Y=m(Y);for(var Oe=0,Re=Y.length;Oe<Re;Oe++)this._on(Y[Oe],ae,pe)}return this},off:function(Y,ae,pe){if(!arguments.length)delete this._events;else if(typeof Y=="object")for(var be in Y)this._off(be,Y[be],ae);else{Y=m(Y);for(var Oe=arguments.length===1,Re=0,Je=Y.length;Re<Je;Re++)Oe?this._off(Y[Re]):this._off(Y[Re],ae,pe)}return this},_on:function(Y,ae,pe,be){if(typeof ae!="function"){console.warn("wrong listener type: "+typeof ae);return}if(this._listens(Y,ae,pe)===!1){pe===this&&(pe=void 0);var Oe={fn:ae,ctx:pe};be&&(Oe.once=!0),this._events=this._events||{},this._events[Y]=this._events[Y]||[],this._events[Y].push(Oe)}},_off:function(Y,ae,pe){var be,Oe,Re;if(this._events&&(be=this._events[Y],!!be)){if(arguments.length===1){if(this._firingCount)for(Oe=0,Re=be.length;Oe<Re;Oe++)be[Oe].fn=h;delete this._events[Y];return}if(typeof ae!="function"){console.warn("wrong listener type: "+typeof ae);return}var Je=this._listens(Y,ae,pe);if(Je!==!1){var lt=be[Je];this._firingCount&&(lt.fn=h,this._events[Y]=be=be.slice()),be.splice(Je,1)}}},fire:function(Y,ae,pe){if(!this.listens(Y,pe))return this;var be=r({},ae,{type:Y,target:this,sourceTarget:ae&&ae.sourceTarget||this});if(this._events){var Oe=this._events[Y];if(Oe){this._firingCount=this._firingCount+1||1;for(var Re=0,Je=Oe.length;Re<Je;Re++){var lt=Oe[Re],pt=lt.fn;lt.once&&this.off(Y,pt,lt.ctx),pt.call(lt.ctx||this,be)}this._firingCount--}}return pe&&this._propagateEvent(be),this},listens:function(Y,ae,pe,be){typeof Y!="string"&&console.warn('"string" type argument expected');var Oe=ae;typeof ae!="function"&&(be=!!ae,Oe=void 0,pe=void 0);var Re=this._events&&this._events[Y];if(Re&&Re.length&&this._listens(Y,Oe,pe)!==!1)return!0;if(be){for(var Je in this._eventParents)if(this._eventParents[Je].listens(Y,ae,pe,be))return!0}return!1},_listens:function(Y,ae,pe){if(!this._events)return!1;var be=this._events[Y]||[];if(!ae)return!!be.length;pe===this&&(pe=void 0);for(var Oe=0,Re=be.length;Oe<Re;Oe++)if(be[Oe].fn===ae&&be[Oe].ctx===pe)return Oe;return!1},once:function(Y,ae,pe){if(typeof Y=="object")for(var be in Y)this._on(be,Y[be],ae,!0);else{Y=m(Y);for(var Oe=0,Re=Y.length;Oe<Re;Oe++)this._on(Y[Oe],ae,pe,!0)}return this},addEventParent:function(Y){return this._eventParents=this._eventParents||{},this._eventParents[l(Y)]=Y,this},removeEventParent:function(Y){return this._eventParents&&delete this._eventParents[l(Y)],this},_propagateEvent:function(Y){for(var ae in this._eventParents)this._eventParents[ae].fire(Y.type,r({layer:Y.target,propagatedFrom:Y.target},Y),!0)}};H.addEventListener=H.on,H.removeEventListener=H.clearAllEventListeners=H.off,H.addOneTimeEventListener=H.once,H.fireEvent=H.fire,H.hasEventListeners=H.listens;var G=M.extend(H);function V(Y,ae,pe){this.x=pe?Math.round(Y):Y,this.y=pe?Math.round(ae):ae}var z=Math.trunc||function(Y){return Y>0?Math.floor(Y):Math.ceil(Y)};V.prototype={clone:function(){return new V(this.x,this.y)},add:function(Y){return this.clone()._add(I(Y))},_add:function(Y){return this.x+=Y.x,this.y+=Y.y,this},subtract:function(Y){return this.clone()._subtract(I(Y))},_subtract:function(Y){return this.x-=Y.x,this.y-=Y.y,this},divideBy:function(Y){return this.clone()._divideBy(Y)},_divideBy:function(Y){return this.x/=Y,this.y/=Y,this},multiplyBy:function(Y){return this.clone()._multiplyBy(Y)},_multiplyBy:function(Y){return this.x*=Y,this.y*=Y,this},scaleBy:function(Y){return new V(this.x*Y.x,this.y*Y.y)},unscaleBy:function(Y){return new V(this.x/Y.x,this.y/Y.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(Y){Y=I(Y);var ae=Y.x-this.x,pe=Y.y-this.y;return Math.sqrt(ae*ae+pe*pe)},equals:function(Y){return Y=I(Y),Y.x===this.x&&Y.y===this.y},contains:function(Y){return Y=I(Y),Math.abs(Y.x)<=Math.abs(this.x)&&Math.abs(Y.y)<=Math.abs(this.y)},toString:function(){return"Point("+d(this.x)+", "+d(this.y)+")"}};function I(Y,ae,pe){return Y instanceof V?Y:$(Y)?new V(Y[0],Y[1]):Y==null?Y:typeof Y=="object"&&"x"in Y&&"y"in Y?new V(Y.x,Y.y):new V(Y,ae,pe)}function C(Y,ae){if(Y)for(var pe=ae?[Y,ae]:Y,be=0,Oe=pe.length;be<Oe;be++)this.extend(pe[be])}C.prototype={extend:function(Y){var ae,pe;if(!Y)return this;if(Y instanceof V||typeof Y[0]=="number"||"x"in Y)ae=pe=I(Y);else if(Y=k(Y),ae=Y.min,pe=Y.max,!ae||!pe)return this;return!this.min&&!this.max?(this.min=ae.clone(),this.max=pe.clone()):(this.min.x=Math.min(ae.x,this.min.x),this.max.x=Math.max(pe.x,this.max.x),this.min.y=Math.min(ae.y,this.min.y),this.max.y=Math.max(pe.y,this.max.y)),this},getCenter:function(Y){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,Y)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(Y){var ae,pe;return typeof Y[0]=="number"||Y instanceof V?Y=I(Y):Y=k(Y),Y instanceof C?(ae=Y.min,pe=Y.max):ae=pe=Y,ae.x>=this.min.x&&pe.x<=this.max.x&&ae.y>=this.min.y&&pe.y<=this.max.y},intersects:function(Y){Y=k(Y);var ae=this.min,pe=this.max,be=Y.min,Oe=Y.max,Re=Oe.x>=ae.x&&be.x<=pe.x,Je=Oe.y>=ae.y&&be.y<=pe.y;return Re&&Je},overlaps:function(Y){Y=k(Y);var ae=this.min,pe=this.max,be=Y.min,Oe=Y.max,Re=Oe.x>ae.x&&be.x<pe.x,Je=Oe.y>ae.y&&be.y<pe.y;return Re&&Je},isValid:function(){return!!(this.min&&this.max)},pad:function(Y){var ae=this.min,pe=this.max,be=Math.abs(ae.x-pe.x)*Y,Oe=Math.abs(ae.y-pe.y)*Y;return k(I(ae.x-be,ae.y-Oe),I(pe.x+be,pe.y+Oe))},equals:function(Y){return Y?(Y=k(Y),this.min.equals(Y.getTopLeft())&&this.max.equals(Y.getBottomRight())):!1}};function k(Y,ae){return!Y||Y instanceof C?Y:new C(Y,ae)}function v(Y,ae){if(Y)for(var pe=ae?[Y,ae]:Y,be=0,Oe=pe.length;be<Oe;be++)this.extend(pe[be])}v.prototype={extend:function(Y){var ae=this._southWest,pe=this._northEast,be,Oe;if(Y instanceof b)be=Y,Oe=Y;else if(Y instanceof v){if(be=Y._southWest,Oe=Y._northEast,!be||!Oe)return this}else return Y?this.extend(x(Y)||w(Y)):this;return!ae&&!pe?(this._southWest=new b(be.lat,be.lng),this._northEast=new b(Oe.lat,Oe.lng)):(ae.lat=Math.min(be.lat,ae.lat),ae.lng=Math.min(be.lng,ae.lng),pe.lat=Math.max(Oe.lat,pe.lat),pe.lng=Math.max(Oe.lng,pe.lng)),this},pad:function(Y){var ae=this._southWest,pe=this._northEast,be=Math.abs(ae.lat-pe.lat)*Y,Oe=Math.abs(ae.lng-pe.lng)*Y;return new v(new b(ae.lat-be,ae.lng-Oe),new b(pe.lat+be,pe.lng+Oe))},getCenter:function(){return new b((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new b(this.getNorth(),this.getWest())},getSouthEast:function(){return new b(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(Y){typeof Y[0]=="number"||Y instanceof b||"lat"in Y?Y=x(Y):Y=w(Y);var ae=this._southWest,pe=this._northEast,be,Oe;return Y instanceof v?(be=Y.getSouthWest(),Oe=Y.getNorthEast()):be=Oe=Y,be.lat>=ae.lat&&Oe.lat<=pe.lat&&be.lng>=ae.lng&&Oe.lng<=pe.lng},intersects:function(Y){Y=w(Y);var ae=this._southWest,pe=this._northEast,be=Y.getSouthWest(),Oe=Y.getNorthEast(),Re=Oe.lat>=ae.lat&&be.lat<=pe.lat,Je=Oe.lng>=ae.lng&&be.lng<=pe.lng;return Re&&Je},overlaps:function(Y){Y=w(Y);var ae=this._southWest,pe=this._northEast,be=Y.getSouthWest(),Oe=Y.getNorthEast(),Re=Oe.lat>ae.lat&&be.lat<pe.lat,Je=Oe.lng>ae.lng&&be.lng<pe.lng;return Re&&Je},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(Y,ae){return Y?(Y=w(Y),this._southWest.equals(Y.getSouthWest(),ae)&&this._northEast.equals(Y.getNorthEast(),ae)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function w(Y,ae){return Y instanceof v?Y:new v(Y,ae)}function b(Y,ae,pe){if(isNaN(Y)||isNaN(ae))throw new Error("Invalid LatLng object: ("+Y+", "+ae+")");this.lat=+Y,this.lng=+ae,pe!==void 0&&(this.alt=+pe)}b.prototype={equals:function(Y,ae){if(!Y)return!1;Y=x(Y);var pe=Math.max(Math.abs(this.lat-Y.lat),Math.abs(this.lng-Y.lng));return pe<=(ae===void 0?1e-9:ae)},toString:function(Y){return"LatLng("+d(this.lat,Y)+", "+d(this.lng,Y)+")"},distanceTo:function(Y){return B.distance(this,x(Y))},wrap:function(){return B.wrapLatLng(this)},toBounds:function(Y){var ae=180*Y/40075017,pe=ae/Math.cos(Math.PI/180*this.lat);return w([this.lat-ae,this.lng-pe],[this.lat+ae,this.lng+pe])},clone:function(){return new b(this.lat,this.lng,this.alt)}};function x(Y,ae,pe){return Y instanceof b?Y:$(Y)&&typeof Y[0]!="object"?Y.length===3?new b(Y[0],Y[1],Y[2]):Y.length===2?new b(Y[0],Y[1]):null:Y==null?Y:typeof Y=="object"&&"lat"in Y?new b(Y.lat,"lng"in Y?Y.lng:Y.lon,Y.alt):ae===void 0?null:new b(Y,ae,pe)}var F={latLngToPoint:function(Y,ae){var pe=this.projection.project(Y),be=this.scale(ae);return this.transformation._transform(pe,be)},pointToLatLng:function(Y,ae){var pe=this.scale(ae),be=this.transformation.untransform(Y,pe);return this.projection.unproject(be)},project:function(Y){return this.projection.project(Y)},unproject:function(Y){return this.projection.unproject(Y)},scale:function(Y){return 256*Math.pow(2,Y)},zoom:function(Y){return Math.log(Y/256)/Math.LN2},getProjectedBounds:function(Y){if(this.infinite)return null;var ae=this.projection.bounds,pe=this.scale(Y),be=this.transformation.transform(ae.min,pe),Oe=this.transformation.transform(ae.max,pe);return new C(be,Oe)},infinite:!1,wrapLatLng:function(Y){var ae=this.wrapLng?u(Y.lng,this.wrapLng,!0):Y.lng,pe=this.wrapLat?u(Y.lat,this.wrapLat,!0):Y.lat,be=Y.alt;return new b(pe,ae,be)},wrapLatLngBounds:function(Y){var ae=Y.getCenter(),pe=this.wrapLatLng(ae),be=ae.lat-pe.lat,Oe=ae.lng-pe.lng;if(be===0&&Oe===0)return Y;var Re=Y.getSouthWest(),Je=Y.getNorthEast(),lt=new b(Re.lat-be,Re.lng-Oe),pt=new b(Je.lat-be,Je.lng-Oe);return new v(lt,pt)}},B=r({},F,{wrapLng:[-180,180],R:6371e3,distance:function(Y,ae){var pe=Math.PI/180,be=Y.lat*pe,Oe=ae.lat*pe,Re=Math.sin((ae.lat-Y.lat)*pe/2),Je=Math.sin((ae.lng-Y.lng)*pe/2),lt=Re*Re+Math.cos(be)*Math.cos(Oe)*Je*Je,pt=2*Math.atan2(Math.sqrt(lt),Math.sqrt(1-lt));return this.R*pt}}),U=6378137,X={R:U,MAX_LATITUDE:85.0511287798,project:function(Y){var ae=Math.PI/180,pe=this.MAX_LATITUDE,be=Math.max(Math.min(pe,Y.lat),-pe),Oe=Math.sin(be*ae);return new V(this.R*Y.lng*ae,this.R*Math.log((1+Oe)/(1-Oe))/2)},unproject:function(Y){var ae=180/Math.PI;return new b((2*Math.atan(Math.exp(Y.y/this.R))-Math.PI/2)*ae,Y.x*ae/this.R)},bounds:function(){var Y=U*Math.PI;return new C([-Y,-Y],[Y,Y])}()};function ee(Y,ae,pe,be){if($(Y)){this._a=Y[0],this._b=Y[1],this._c=Y[2],this._d=Y[3];return}this._a=Y,this._b=ae,this._c=pe,this._d=be}ee.prototype={transform:function(Y,ae){return this._transform(Y.clone(),ae)},_transform:function(Y,ae){return ae=ae||1,Y.x=ae*(this._a*Y.x+this._b),Y.y=ae*(this._c*Y.y+this._d),Y},untransform:function(Y,ae){return ae=ae||1,new V((Y.x/ae-this._b)/this._a,(Y.y/ae-this._d)/this._c)}};function J(Y,ae,pe,be){return new ee(Y,ae,pe,be)}var q=r({},B,{code:"EPSG:3857",projection:X,transformation:function(){var Y=.5/(Math.PI*X.R);return J(Y,.5,-Y,.5)}()}),Z=r({},q,{code:"EPSG:900913"});function K(Y){return document.createElementNS("http://www.w3.org/2000/svg",Y)}function re(Y,ae){var pe="",be,Oe,Re,Je,lt,pt;for(be=0,Re=Y.length;be<Re;be++){for(lt=Y[be],Oe=0,Je=lt.length;Oe<Je;Oe++)pt=lt[Oe],pe+=(Oe?"L":"M")+pt.x+" "+pt.y;pe+=ae?Tt.svg?"z":"x":""}return pe||"M0 0"}var ie=document.documentElement.style,te="ActiveXObject"in window,ne=te&&!document.addEventListener,oe="msLaunchUri"in navigator&&!("documentMode"in document),ce=Rt("webkit"),se=Rt("android"),le=Rt("android 2")||Rt("android 3"),de=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),fe=se&&Rt("Google")&&de<537&&!("AudioNode"in window),he=!!window.opera,ye=!oe&&Rt("chrome"),_e=Rt("gecko")&&!ce&&!he&&!te,Pe=!ye&&Rt("safari"),Ee=Rt("phantom"),De="OTransition"in ie,Te=navigator.platform.indexOf("Win")===0,Ce=te&&"transition"in ie,me="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!le,we="MozPerspective"in ie,xe=!window.L_DISABLE_3D&&(Ce||me||we)&&!De&&!Ee,Ae=typeof orientation<"u"||Rt("mobile"),Le=Ae&&ce,Ne=Ae&&me,We=!window.PointerEvent&&window.MSPointerEvent,qe=!!(window.PointerEvent||We),Ue="ontouchstart"in window||!!window.TouchEvent,Qe=!window.L_NO_TOUCH&&(Ue||qe),it=Ae&&he,nt=Ae&&_e,ct=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,dt=function(){var Y=!1;try{var ae=Object.defineProperty({},"passive",{get:function(){Y=!0}});window.addEventListener("testPassiveEventSupport",h,ae),window.removeEventListener("testPassiveEventSupport",h,ae)}catch{}return Y}(),ut=function(){return!!document.createElement("canvas").getContext}(),bt=!!(document.createElementNS&&K("svg").createSVGRect),et=!!bt&&function(){var Y=document.createElement("div");return Y.innerHTML="<svg/>",(Y.firstChild&&Y.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Ot=!bt&&function(){try{var Y=document.createElement("div");Y.innerHTML='<v:shape adj="1"/>';var ae=Y.firstChild;return ae.style.behavior="url(#default#VML)",ae&&typeof ae.adj=="object"}catch{return!1}}(),wt=navigator.platform.indexOf("Mac")===0,Lt=navigator.platform.indexOf("Linux")===0;function Rt(Y){return navigator.userAgent.toLowerCase().indexOf(Y)>=0}var Tt={ie:te,ielt9:ne,edge:oe,webkit:ce,android:se,android23:le,androidStock:fe,opera:he,chrome:ye,gecko:_e,safari:Pe,phantom:Ee,opera12:De,win:Te,ie3d:Ce,webkit3d:me,gecko3d:we,any3d:xe,mobile:Ae,mobileWebkit:Le,mobileWebkit3d:Ne,msPointer:We,pointer:qe,touch:Qe,touchNative:Ue,mobileOpera:it,mobileGecko:nt,retina:ct,passiveEvents:dt,canvas:ut,svg:bt,vml:Ot,inlineSvg:et,mac:wt,linux:Lt},Ut=Tt.msPointer?"MSPointerDown":"pointerdown",un=Tt.msPointer?"MSPointerMove":"pointermove",So=Tt.msPointer?"MSPointerUp":"pointerup",ht=Tt.msPointer?"MSPointerCancel":"pointercancel",kt={touchstart:Ut,touchmove:un,touchend:So,touchcancel:ht},Qt={touchstart:xn,touchmove:fn,touchend:fn,touchcancel:fn},rn={},lo=!1;function co(Y,ae,pe){return ae==="touchstart"&&sn(),Qt[ae]?(pe=Qt[ae].bind(this,pe),Y.addEventListener(kt[ae],pe,!1),pe):(console.warn("wrong event specified:",ae),h)}function Xe(Y,ae,pe){if(!kt[ae]){console.warn("wrong event specified:",ae);return}Y.removeEventListener(kt[ae],pe,!1)}function je(Y){rn[Y.pointerId]=Y}function st(Y){rn[Y.pointerId]&&(rn[Y.pointerId]=Y)}function ft(Y){delete rn[Y.pointerId]}function sn(){lo||(document.addEventListener(Ut,je,!0),document.addEventListener(un,st,!0),document.addEventListener(So,ft,!0),document.addEventListener(ht,ft,!0),lo=!0)}function fn(Y,ae){if(ae.pointerType!==(ae.MSPOINTER_TYPE_MOUSE||"mouse")){ae.touches=[];for(var pe in rn)ae.touches.push(rn[pe]);ae.changedTouches=[ae],Y(ae)}}function xn(Y,ae){ae.MSPOINTER_TYPE_TOUCH&&ae.pointerType===ae.MSPOINTER_TYPE_TOUCH&&fa(ae),fn(Y,ae)}function ln(Y){var ae={},pe,be;for(be in Y)pe=Y[be],ae[be]=pe&&pe.bind?pe.bind(Y):pe;return Y=ae,ae.type="dblclick",ae.detail=2,ae.isTrusted=!1,ae._simulated=!0,ae}var Ln=200;function In(Y,ae){Y.addEventListener("dblclick",ae);var pe=0,be;function Oe(Re){if(Re.detail!==1){be=Re.detail;return}if(!(Re.pointerType==="mouse"||Re.sourceCapabilities&&!Re.sourceCapabilities.firesTouchEvents)){var Je=E7(Re);if(!(Je.some(function(pt){return pt instanceof HTMLLabelElement&&pt.attributes.for})&&!Je.some(function(pt){return pt instanceof HTMLInputElement||pt instanceof HTMLSelectElement}))){var lt=Date.now();lt-pe<=Ln?(be++,be===2&&ae(ln(Re))):be=1,pe=lt}}}return Y.addEventListener("click",Oe),{dblclick:ae,simDblclick:Oe}}function Ja(Y,ae){Y.removeEventListener("dblclick",ae.dblclick),Y.removeEventListener("click",ae.simDblclick)}var jo=tk(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Ms=tk(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Xp=Ms==="webkitTransition"||Ms==="OTransition"?Ms+"End":"transitionend";function Ct(Y){return typeof Y=="string"?document.getElementById(Y):Y}function Rn(Y,ae){var pe=Y.style[ae]||Y.currentStyle&&Y.currentStyle[ae];if((!pe||pe==="auto")&&document.defaultView){var be=document.defaultView.getComputedStyle(Y,null);pe=be?be[ae]:null}return pe==="auto"?null:pe}function cn(Y,ae,pe){var be=document.createElement(Y);return be.className=ae||"",pe&&pe.appendChild(be),be}function no(Y){var ae=Y.parentNode;ae&&ae.removeChild(Y)}function Es(Y){for(;Y.firstChild;)Y.removeChild(Y.firstChild)}function pu(Y){var ae=Y.parentNode;ae&&ae.lastChild!==Y&&ae.appendChild(Y)}function Sc(Y){var ae=Y.parentNode;ae&&ae.firstChild!==Y&&ae.insertBefore(Y,ae.firstChild)}function Rb(Y,ae){if(Y.classList!==void 0)return Y.classList.contains(ae);var pe=ek(Y);return pe.length>0&&new RegExp("(^|\\s)"+ae+"(\\s|$)").test(pe)}function $n(Y,ae){if(Y.classList!==void 0)for(var pe=m(ae),be=0,Oe=pe.length;be<Oe;be++)Y.classList.add(pe[be]);else if(!Rb(Y,ae)){var Re=ek(Y);jb(Y,(Re?Re+" ":"")+ae)}}function Zr(Y,ae){Y.classList!==void 0?Y.classList.remove(ae):jb(Y,f((" "+ek(Y)+" ").replace(" "+ae+" "," ")))}function jb(Y,ae){Y.className.baseVal===void 0?Y.className=ae:Y.className.baseVal=ae}function ek(Y){return Y.correspondingElement&&(Y=Y.correspondingElement),Y.className.baseVal===void 0?Y.className:Y.className.baseVal}function Dl(Y,ae){"opacity"in Y.style?Y.style.opacity=ae:"filter"in Y.style&&t2e(Y,ae)}function t2e(Y,ae){var pe=!1,be="DXImageTransform.Microsoft.Alpha";try{pe=Y.filters.item(be)}catch{if(ae===1)return}ae=Math.round(ae*100),pe?(pe.Enabled=ae!==100,pe.Opacity=ae):Y.style.filter+=" progid:"+be+"(opacity="+ae+")"}function tk(Y){for(var ae=document.documentElement.style,pe=0;pe<Y.length;pe++)if(Y[pe]in ae)return Y[pe];return!1}function Nf(Y,ae,pe){var be=ae||new V(0,0);Y.style[jo]=(Tt.ie3d?"translate("+be.x+"px,"+be.y+"px)":"translate3d("+be.x+"px,"+be.y+"px,0)")+(pe?" scale("+pe+")":"")}function Oi(Y,ae){Y._leaflet_pos=ae,Tt.any3d?Nf(Y,ae):(Y.style.left=ae.x+"px",Y.style.top=ae.y+"px")}function Lf(Y){return Y._leaflet_pos||new V(0,0)}var $b,Fb,qN;if("onselectstart"in document)$b=function(){Fn(window,"selectstart",fa)},Fb=function(){kr(window,"selectstart",fa)};else{var zb=tk(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);$b=function(){if(zb){var Y=document.documentElement.style;qN=Y[zb],Y[zb]="none"}},Fb=function(){zb&&(document.documentElement.style[zb]=qN,qN=void 0)}}function YN(){Fn(window,"dragstart",fa)}function XN(){kr(window,"dragstart",fa)}var nk,ZN;function KN(Y){for(;Y.tabIndex===-1;)Y=Y.parentNode;Y.style&&(ok(),nk=Y,ZN=Y.style.outlineStyle,Y.style.outlineStyle="none",Fn(window,"keydown",ok))}function ok(){nk&&(nk.style.outlineStyle=ZN,nk=void 0,ZN=void 0,kr(window,"keydown",ok))}function T7(Y){do Y=Y.parentNode;while((!Y.offsetWidth||!Y.offsetHeight)&&Y!==document.body);return Y}function JN(Y){var ae=Y.getBoundingClientRect();return{x:ae.width/Y.offsetWidth||1,y:ae.height/Y.offsetHeight||1,boundingClientRect:ae}}var n2e={__proto__:null,TRANSFORM:jo,TRANSITION:Ms,TRANSITION_END:Xp,get:Ct,getStyle:Rn,create:cn,remove:no,empty:Es,toFront:pu,toBack:Sc,hasClass:Rb,addClass:$n,removeClass:Zr,setClass:jb,getClass:ek,setOpacity:Dl,testProp:tk,setTransform:Nf,setPosition:Oi,getPosition:Lf,get disableTextSelection(){return $b},get enableTextSelection(){return Fb},disableImageDrag:YN,enableImageDrag:XN,preventOutline:KN,restoreOutline:ok,getSizedParentNode:T7,getScale:JN};function Fn(Y,ae,pe,be){if(ae&&typeof ae=="object")for(var Oe in ae)eL(Y,Oe,ae[Oe],pe);else{ae=m(ae);for(var Re=0,Je=ae.length;Re<Je;Re++)eL(Y,ae[Re],pe,be)}return this}var hu="_leaflet_events";function kr(Y,ae,pe,be){if(arguments.length===1)M7(Y),delete Y[hu];else if(ae&&typeof ae=="object")for(var Oe in ae)tL(Y,Oe,ae[Oe],pe);else if(ae=m(ae),arguments.length===2)M7(Y,function(lt){return j(ae,lt)!==-1});else for(var Re=0,Je=ae.length;Re<Je;Re++)tL(Y,ae[Re],pe,be);return this}function M7(Y,ae){for(var pe in Y[hu]){var be=pe.split(/\d/)[0];(!ae||ae(be))&&tL(Y,be,null,null,pe)}}var QN={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function eL(Y,ae,pe,be){var Oe=ae+l(pe)+(be?"_"+l(be):"");if(Y[hu]&&Y[hu][Oe])return this;var Re=function(lt){return pe.call(be||Y,lt||window.event)},Je=Re;!Tt.touchNative&&Tt.pointer&&ae.indexOf("touch")===0?Re=co(Y,ae,Re):Tt.touch&&ae==="dblclick"?Re=In(Y,Re):"addEventListener"in Y?ae==="touchstart"||ae==="touchmove"||ae==="wheel"||ae==="mousewheel"?Y.addEventListener(QN[ae]||ae,Re,Tt.passiveEvents?{passive:!1}:!1):ae==="mouseenter"||ae==="mouseleave"?(Re=function(lt){lt=lt||window.event,oL(Y,lt)&&Je(lt)},Y.addEventListener(QN[ae],Re,!1)):Y.addEventListener(ae,Je,!1):Y.attachEvent("on"+ae,Re),Y[hu]=Y[hu]||{},Y[hu][Oe]=Re}function tL(Y,ae,pe,be,Oe){Oe=Oe||ae+l(pe)+(be?"_"+l(be):"");var Re=Y[hu]&&Y[hu][Oe];if(!Re)return this;!Tt.touchNative&&Tt.pointer&&ae.indexOf("touch")===0?Xe(Y,ae,Re):Tt.touch&&ae==="dblclick"?Ja(Y,Re):"removeEventListener"in Y?Y.removeEventListener(QN[ae]||ae,Re,!1):Y.detachEvent("on"+ae,Re),Y[hu][Oe]=null}function If(Y){return Y.stopPropagation?Y.stopPropagation():Y.originalEvent?Y.originalEvent._stopped=!0:Y.cancelBubble=!0,this}function nL(Y){return eL(Y,"wheel",If),this}function Bb(Y){return Fn(Y,"mousedown touchstart dblclick contextmenu",If),Y._leaflet_disable_click=!0,this}function fa(Y){return Y.preventDefault?Y.preventDefault():Y.returnValue=!1,this}function Rf(Y){return fa(Y),If(Y),this}function E7(Y){if(Y.composedPath)return Y.composedPath();for(var ae=[],pe=Y.target;pe;)ae.push(pe),pe=pe.parentNode;return ae}function A7(Y,ae){if(!ae)return new V(Y.clientX,Y.clientY);var pe=JN(ae),be=pe.boundingClientRect;return new V((Y.clientX-be.left)/pe.x-ae.clientLeft,(Y.clientY-be.top)/pe.y-ae.clientTop)}var o2e=Tt.linux&&Tt.chrome?window.devicePixelRatio:Tt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function P7(Y){return Tt.edge?Y.wheelDeltaY/2:Y.deltaY&&Y.deltaMode===0?-Y.deltaY/o2e:Y.deltaY&&Y.deltaMode===1?-Y.deltaY*20:Y.deltaY&&Y.deltaMode===2?-Y.deltaY*60:Y.deltaX||Y.deltaZ?0:Y.wheelDelta?(Y.wheelDeltaY||Y.wheelDelta)/2:Y.detail&&Math.abs(Y.detail)<32765?-Y.detail*20:Y.detail?Y.detail/-32765*60:0}function oL(Y,ae){var pe=ae.relatedTarget;if(!pe)return!0;try{for(;pe&&pe!==Y;)pe=pe.parentNode}catch{return!1}return pe!==Y}var r2e={__proto__:null,on:Fn,off:kr,stopPropagation:If,disableScrollPropagation:nL,disableClickPropagation:Bb,preventDefault:fa,stop:Rf,getPropagationPath:E7,getMousePosition:A7,getWheelDelta:P7,isExternalTarget:oL,addListener:Fn,removeListener:kr},O7=G.extend({run:function(Y,ae,pe,be){this.stop(),this._el=Y,this._inProgress=!0,this._duration=pe||.25,this._easeOutPower=1/Math.max(be||.5,.2),this._startPos=Lf(Y),this._offset=ae.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=_(this._animate,this),this._step()},_step:function(Y){var ae=+new Date-this._startTime,pe=this._duration*1e3;ae<pe?this._runFrame(this._easeOut(ae/pe),Y):(this._runFrame(1),this._complete())},_runFrame:function(Y,ae){var pe=this._startPos.add(this._offset.multiplyBy(Y));ae&&pe._round(),Oi(this._el,pe),this.fire("step")},_complete:function(){g(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(Y){return 1-Math.pow(1-Y,this._easeOutPower)}}),oo=G.extend({options:{crs:q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(Y,ae){ae=p(this,ae),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(Y),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),ae.maxBounds&&this.setMaxBounds(ae.maxBounds),ae.zoom!==void 0&&(this._zoom=this._limitZoom(ae.zoom)),ae.center&&ae.zoom!==void 0&&this.setView(x(ae.center),ae.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Ms&&Tt.any3d&&!Tt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Fn(this._proxy,Xp,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(Y,ae,pe){if(ae=ae===void 0?this._zoom:this._limitZoom(ae),Y=this._limitCenter(x(Y),ae,this.options.maxBounds),pe=pe||{},this._stop(),this._loaded&&!pe.reset&&pe!==!0){pe.animate!==void 0&&(pe.zoom=r({animate:pe.animate},pe.zoom),pe.pan=r({animate:pe.animate,duration:pe.duration},pe.pan));var be=this._zoom!==ae?this._tryAnimatedZoom&&this._tryAnimatedZoom(Y,ae,pe.zoom):this._tryAnimatedPan(Y,pe.pan);if(be)return clearTimeout(this._sizeTimer),this}return this._resetView(Y,ae,pe.pan&&pe.pan.noMoveStart),this},setZoom:function(Y,ae){return this._loaded?this.setView(this.getCenter(),Y,{zoom:ae}):(this._zoom=Y,this)},zoomIn:function(Y,ae){return Y=Y||(Tt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+Y,ae)},zoomOut:function(Y,ae){return Y=Y||(Tt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-Y,ae)},setZoomAround:function(Y,ae,pe){var be=this.getZoomScale(ae),Oe=this.getSize().divideBy(2),Re=Y instanceof V?Y:this.latLngToContainerPoint(Y),Je=Re.subtract(Oe).multiplyBy(1-1/be),lt=this.containerPointToLatLng(Oe.add(Je));return this.setView(lt,ae,{zoom:pe})},_getBoundsCenterZoom:function(Y,ae){ae=ae||{},Y=Y.getBounds?Y.getBounds():w(Y);var pe=I(ae.paddingTopLeft||ae.padding||[0,0]),be=I(ae.paddingBottomRight||ae.padding||[0,0]),Oe=this.getBoundsZoom(Y,!1,pe.add(be));if(Oe=typeof ae.maxZoom=="number"?Math.min(ae.maxZoom,Oe):Oe,Oe===1/0)return{center:Y.getCenter(),zoom:Oe};var Re=be.subtract(pe).divideBy(2),Je=this.project(Y.getSouthWest(),Oe),lt=this.project(Y.getNorthEast(),Oe),pt=this.unproject(Je.add(lt).divideBy(2).add(Re),Oe);return{center:pt,zoom:Oe}},fitBounds:function(Y,ae){if(Y=w(Y),!Y.isValid())throw new Error("Bounds are not valid.");var pe=this._getBoundsCenterZoom(Y,ae);return this.setView(pe.center,pe.zoom,ae)},fitWorld:function(Y){return this.fitBounds([[-90,-180],[90,180]],Y)},panTo:function(Y,ae){return this.setView(Y,this._zoom,{pan:ae})},panBy:function(Y,ae){if(Y=I(Y).round(),ae=ae||{},!Y.x&&!Y.y)return this.fire("moveend");if(ae.animate!==!0&&!this.getSize().contains(Y))return this._resetView(this.unproject(this.project(this.getCenter()).add(Y)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new O7,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),ae.noMoveStart||this.fire("movestart"),ae.animate!==!1){$n(this._mapPane,"leaflet-pan-anim");var pe=this._getMapPanePos().subtract(Y).round();this._panAnim.run(this._mapPane,pe,ae.duration||.25,ae.easeLinearity)}else this._rawPanBy(Y),this.fire("move").fire("moveend");return this},flyTo:function(Y,ae,pe){if(pe=pe||{},pe.animate===!1||!Tt.any3d)return this.setView(Y,ae,pe);this._stop();var be=this.project(this.getCenter()),Oe=this.project(Y),Re=this.getSize(),Je=this._zoom;Y=x(Y),ae=ae===void 0?Je:ae;var lt=Math.max(Re.x,Re.y),pt=lt*this.getZoomScale(Je,ae),St=Oe.distanceTo(be)||1,Vt=1.42,yn=Vt*Vt;function Un(Di){var mk=Di?-1:1,G2e=Di?pt:lt,q2e=pt*pt-lt*lt+mk*yn*yn*St*St,Y2e=2*G2e*yn*St,fL=q2e/Y2e,dV=Math.sqrt(fL*fL+1)-fL,X2e=dV<1e-9?-18:Math.log(dV);return X2e}function Qa(Di){return(Math.exp(Di)-Math.exp(-Di))/2}function Ji(Di){return(Math.exp(Di)+Math.exp(-Di))/2}function Ll(Di){return Qa(Di)/Ji(Di)}var As=Un(0);function Xg(Di){return lt*(Ji(As)/Ji(As+Vt*Di))}function H2e(Di){return lt*(Ji(As)*Ll(As+Vt*Di)-Qa(As))/yn}function W2e(Di){return 1-Math.pow(1-Di,1.5)}var V2e=Date.now(),cV=(Un(1)-As)/Vt,U2e=pe.duration?1e3*pe.duration:1e3*cV*.8;function uV(){var Di=(Date.now()-V2e)/U2e,mk=W2e(Di)*cV;Di<=1?(this._flyToFrame=_(uV,this),this._move(this.unproject(be.add(Oe.subtract(be).multiplyBy(H2e(mk)/St)),Je),this.getScaleZoom(lt/Xg(mk),Je),{flyTo:!0})):this._move(Y,ae)._moveEnd(!0)}return this._moveStart(!0,pe.noMoveStart),uV.call(this),this},flyToBounds:function(Y,ae){var pe=this._getBoundsCenterZoom(Y,ae);return this.flyTo(pe.center,pe.zoom,ae)},setMaxBounds:function(Y){return Y=w(Y),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),Y.isValid()?(this.options.maxBounds=Y,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(Y){var ae=this.options.minZoom;return this.options.minZoom=Y,this._loaded&&ae!==Y&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(Y):this},setMaxZoom:function(Y){var ae=this.options.maxZoom;return this.options.maxZoom=Y,this._loaded&&ae!==Y&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(Y):this},panInsideBounds:function(Y,ae){this._enforcingBounds=!0;var pe=this.getCenter(),be=this._limitCenter(pe,this._zoom,w(Y));return pe.equals(be)||this.panTo(be,ae),this._enforcingBounds=!1,this},panInside:function(Y,ae){ae=ae||{};var pe=I(ae.paddingTopLeft||ae.padding||[0,0]),be=I(ae.paddingBottomRight||ae.padding||[0,0]),Oe=this.project(this.getCenter()),Re=this.project(Y),Je=this.getPixelBounds(),lt=k([Je.min.add(pe),Je.max.subtract(be)]),pt=lt.getSize();if(!lt.contains(Re)){this._enforcingBounds=!0;var St=Re.subtract(lt.getCenter()),Vt=lt.extend(Re).getSize().subtract(pt);Oe.x+=St.x<0?-Vt.x:Vt.x,Oe.y+=St.y<0?-Vt.y:Vt.y,this.panTo(this.unproject(Oe),ae),this._enforcingBounds=!1}return this},invalidateSize:function(Y){if(!this._loaded)return this;Y=r({animate:!1,pan:!0},Y===!0?{animate:!0}:Y);var ae=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var pe=this.getSize(),be=ae.divideBy(2).round(),Oe=pe.divideBy(2).round(),Re=be.subtract(Oe);return!Re.x&&!Re.y?this:(Y.animate&&Y.pan?this.panBy(Re):(Y.pan&&this._rawPanBy(Re),this.fire("move"),Y.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:ae,newSize:pe}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(Y){if(Y=this._locateOptions=r({timeout:1e4,watch:!1},Y),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var ae=a(this._handleGeolocationResponse,this),pe=a(this._handleGeolocationError,this);return Y.watch?this._locationWatchId=navigator.geolocation.watchPosition(ae,pe,Y):navigator.geolocation.getCurrentPosition(ae,pe,Y),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(Y){if(this._container._leaflet_id){var ae=Y.code,pe=Y.message||(ae===1?"permission denied":ae===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:ae,message:"Geolocation error: "+pe+"."})}},_handleGeolocationResponse:function(Y){if(this._container._leaflet_id){var ae=Y.coords.latitude,pe=Y.coords.longitude,be=new b(ae,pe),Oe=be.toBounds(Y.coords.accuracy*2),Re=this._locateOptions;if(Re.setView){var Je=this.getBoundsZoom(Oe);this.setView(be,Re.maxZoom?Math.min(Je,Re.maxZoom):Je)}var lt={latlng:be,bounds:Oe,timestamp:Y.timestamp};for(var pt in Y.coords)typeof Y.coords[pt]=="number"&&(lt[pt]=Y.coords[pt]);this.fire("locationfound",lt)}},addHandler:function(Y,ae){if(!ae)return this;var pe=this[Y]=new ae(this);return this._handlers.push(pe),this.options[Y]&&pe.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),no(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(g(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var Y;for(Y in this._layers)this._layers[Y].remove();for(Y in this._panes)no(this._panes[Y]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(Y,ae){var pe="leaflet-pane"+(Y?" leaflet-"+Y.replace("Pane","")+"-pane":""),be=cn("div",pe,ae||this._mapPane);return Y&&(this._panes[Y]=be),be},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var Y=this.getPixelBounds(),ae=this.unproject(Y.getBottomLeft()),pe=this.unproject(Y.getTopRight());return new v(ae,pe)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(Y,ae,pe){Y=w(Y),pe=I(pe||[0,0]);var be=this.getZoom()||0,Oe=this.getMinZoom(),Re=this.getMaxZoom(),Je=Y.getNorthWest(),lt=Y.getSouthEast(),pt=this.getSize().subtract(pe),St=k(this.project(lt,be),this.project(Je,be)).getSize(),Vt=Tt.any3d?this.options.zoomSnap:1,yn=pt.x/St.x,Un=pt.y/St.y,Qa=ae?Math.max(yn,Un):Math.min(yn,Un);return be=this.getScaleZoom(Qa,be),Vt&&(be=Math.round(be/(Vt/100))*(Vt/100),be=ae?Math.ceil(be/Vt)*Vt:Math.floor(be/Vt)*Vt),Math.max(Oe,Math.min(Re,be))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new V(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(Y,ae){var pe=this._getTopLeftPoint(Y,ae);return new C(pe,pe.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(Y){return this.options.crs.getProjectedBounds(Y===void 0?this.getZoom():Y)},getPane:function(Y){return typeof Y=="string"?this._panes[Y]:Y},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(Y,ae){var pe=this.options.crs;return ae=ae===void 0?this._zoom:ae,pe.scale(Y)/pe.scale(ae)},getScaleZoom:function(Y,ae){var pe=this.options.crs;ae=ae===void 0?this._zoom:ae;var be=pe.zoom(Y*pe.scale(ae));return isNaN(be)?1/0:be},project:function(Y,ae){return ae=ae===void 0?this._zoom:ae,this.options.crs.latLngToPoint(x(Y),ae)},unproject:function(Y,ae){return ae=ae===void 0?this._zoom:ae,this.options.crs.pointToLatLng(I(Y),ae)},layerPointToLatLng:function(Y){var ae=I(Y).add(this.getPixelOrigin());return this.unproject(ae)},latLngToLayerPoint:function(Y){var ae=this.project(x(Y))._round();return ae._subtract(this.getPixelOrigin())},wrapLatLng:function(Y){return this.options.crs.wrapLatLng(x(Y))},wrapLatLngBounds:function(Y){return this.options.crs.wrapLatLngBounds(w(Y))},distance:function(Y,ae){return this.options.crs.distance(x(Y),x(ae))},containerPointToLayerPoint:function(Y){return I(Y).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(Y){return I(Y).add(this._getMapPanePos())},containerPointToLatLng:function(Y){var ae=this.containerPointToLayerPoint(I(Y));return this.layerPointToLatLng(ae)},latLngToContainerPoint:function(Y){return this.layerPointToContainerPoint(this.latLngToLayerPoint(x(Y)))},mouseEventToContainerPoint:function(Y){return A7(Y,this._container)},mouseEventToLayerPoint:function(Y){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(Y))},mouseEventToLatLng:function(Y){return this.layerPointToLatLng(this.mouseEventToLayerPoint(Y))},_initContainer:function(Y){var ae=this._container=Ct(Y);if(ae){if(ae._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Fn(ae,"scroll",this._onScroll,this),this._containerId=l(ae)},_initLayout:function(){var Y=this._container;this._fadeAnimated=this.options.fadeAnimation&&Tt.any3d,$n(Y,"leaflet-container"+(Tt.touch?" leaflet-touch":"")+(Tt.retina?" leaflet-retina":"")+(Tt.ielt9?" leaflet-oldie":"")+(Tt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var ae=Rn(Y,"position");ae!=="absolute"&&ae!=="relative"&&ae!=="fixed"&&ae!=="sticky"&&(Y.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var Y=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Oi(this._mapPane,new V(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||($n(Y.markerPane,"leaflet-zoom-hide"),$n(Y.shadowPane,"leaflet-zoom-hide"))},_resetView:function(Y,ae,pe){Oi(this._mapPane,new V(0,0));var be=!this._loaded;this._loaded=!0,ae=this._limitZoom(ae),this.fire("viewprereset");var Oe=this._zoom!==ae;this._moveStart(Oe,pe)._move(Y,ae)._moveEnd(Oe),this.fire("viewreset"),be&&this.fire("load")},_moveStart:function(Y,ae){return Y&&this.fire("zoomstart"),ae||this.fire("movestart"),this},_move:function(Y,ae,pe,be){ae===void 0&&(ae=this._zoom);var Oe=this._zoom!==ae;return this._zoom=ae,this._lastCenter=Y,this._pixelOrigin=this._getNewPixelOrigin(Y),be?pe&&pe.pinch&&this.fire("zoom",pe):((Oe||pe&&pe.pinch)&&this.fire("zoom",pe),this.fire("move",pe)),this},_moveEnd:function(Y){return Y&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(Y){Oi(this._mapPane,this._getMapPanePos().subtract(Y))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(Y){this._targets={},this._targets[l(this._container)]=this;var ae=Y?kr:Fn;ae(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&ae(window,"resize",this._onResize,this),Tt.any3d&&this.options.transform3DLimit&&(Y?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=_(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var Y=this._getMapPanePos();Math.max(Math.abs(Y.x),Math.abs(Y.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(Y,ae){for(var pe=[],be,Oe=ae==="mouseout"||ae==="mouseover",Re=Y.target||Y.srcElement,Je=!1;Re;){if(be=this._targets[l(Re)],be&&(ae==="click"||ae==="preclick")&&this._draggableMoved(be)){Je=!0;break}if(be&&be.listens(ae,!0)&&(Oe&&!oL(Re,Y)||(pe.push(be),Oe))||Re===this._container)break;Re=Re.parentNode}return!pe.length&&!Je&&!Oe&&this.listens(ae,!0)&&(pe=[this]),pe},_isClickDisabled:function(Y){for(;Y&&Y!==this._container;){if(Y._leaflet_disable_click)return!0;Y=Y.parentNode}},_handleDOMEvent:function(Y){var ae=Y.target||Y.srcElement;if(!(!this._loaded||ae._leaflet_disable_events||Y.type==="click"&&this._isClickDisabled(ae))){var pe=Y.type;pe==="mousedown"&&KN(ae),this._fireDOMEvent(Y,pe)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(Y,ae,pe){if(Y.type==="click"){var be=r({},Y);be.type="preclick",this._fireDOMEvent(be,be.type,pe)}var Oe=this._findEventTargets(Y,ae);if(pe){for(var Re=[],Je=0;Je<pe.length;Je++)pe[Je].listens(ae,!0)&&Re.push(pe[Je]);Oe=Re.concat(Oe)}if(Oe.length){ae==="contextmenu"&&fa(Y);var lt=Oe[0],pt={originalEvent:Y};if(Y.type!=="keypress"&&Y.type!=="keydown"&&Y.type!=="keyup"){var St=lt.getLatLng&&(!lt._radius||lt._radius<=10);pt.containerPoint=St?this.latLngToContainerPoint(lt.getLatLng()):this.mouseEventToContainerPoint(Y),pt.layerPoint=this.containerPointToLayerPoint(pt.containerPoint),pt.latlng=St?lt.getLatLng():this.layerPointToLatLng(pt.layerPoint)}for(Je=0;Je<Oe.length;Je++)if(Oe[Je].fire(ae,pt,!0),pt.originalEvent._stopped||Oe[Je].options.bubblingMouseEvents===!1&&j(this._mouseEvents,ae)!==-1)return}},_draggableMoved:function(Y){return Y=Y.dragging&&Y.dragging.enabled()?Y:this,Y.dragging&&Y.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var Y=0,ae=this._handlers.length;Y<ae;Y++)this._handlers[Y].disable()},whenReady:function(Y,ae){return this._loaded?Y.call(ae||this,{target:this}):this.on("load",Y,ae),this},_getMapPanePos:function(){return Lf(this._mapPane)||new V(0,0)},_moved:function(){var Y=this._getMapPanePos();return Y&&!Y.equals([0,0])},_getTopLeftPoint:function(Y,ae){var pe=Y&&ae!==void 0?this._getNewPixelOrigin(Y,ae):this.getPixelOrigin();return pe.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(Y,ae){var pe=this.getSize()._divideBy(2);return this.project(Y,ae)._subtract(pe)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(Y,ae,pe){var be=this._getNewPixelOrigin(pe,ae);return this.project(Y,ae)._subtract(be)},_latLngBoundsToNewLayerBounds:function(Y,ae,pe){var be=this._getNewPixelOrigin(pe,ae);return k([this.project(Y.getSouthWest(),ae)._subtract(be),this.project(Y.getNorthWest(),ae)._subtract(be),this.project(Y.getSouthEast(),ae)._subtract(be),this.project(Y.getNorthEast(),ae)._subtract(be)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(Y){return this.latLngToLayerPoint(Y).subtract(this._getCenterLayerPoint())},_limitCenter:function(Y,ae,pe){if(!pe)return Y;var be=this.project(Y,ae),Oe=this.getSize().divideBy(2),Re=new C(be.subtract(Oe),be.add(Oe)),Je=this._getBoundsOffset(Re,pe,ae);return Math.abs(Je.x)<=1&&Math.abs(Je.y)<=1?Y:this.unproject(be.add(Je),ae)},_limitOffset:function(Y,ae){if(!ae)return Y;var pe=this.getPixelBounds(),be=new C(pe.min.add(Y),pe.max.add(Y));return Y.add(this._getBoundsOffset(be,ae))},_getBoundsOffset:function(Y,ae,pe){var be=k(this.project(ae.getNorthEast(),pe),this.project(ae.getSouthWest(),pe)),Oe=be.min.subtract(Y.min),Re=be.max.subtract(Y.max),Je=this._rebound(Oe.x,-Re.x),lt=this._rebound(Oe.y,-Re.y);return new V(Je,lt)},_rebound:function(Y,ae){return Y+ae>0?Math.round(Y-ae)/2:Math.max(0,Math.ceil(Y))-Math.max(0,Math.floor(ae))},_limitZoom:function(Y){var ae=this.getMinZoom(),pe=this.getMaxZoom(),be=Tt.any3d?this.options.zoomSnap:1;return be&&(Y=Math.round(Y/be)*be),Math.max(ae,Math.min(pe,Y))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Zr(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(Y,ae){var pe=this._getCenterOffset(Y)._trunc();return(ae&&ae.animate)!==!0&&!this.getSize().contains(pe)?!1:(this.panBy(pe,ae),!0)},_createAnimProxy:function(){var Y=this._proxy=cn("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(Y),this.on("zoomanim",function(ae){var pe=jo,be=this._proxy.style[pe];Nf(this._proxy,this.project(ae.center,ae.zoom),this.getZoomScale(ae.zoom,1)),be===this._proxy.style[pe]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){no(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var Y=this.getCenter(),ae=this.getZoom();Nf(this._proxy,this.project(Y,ae),this.getZoomScale(ae,1))},_catchTransitionEnd:function(Y){this._animatingZoom&&Y.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(Y,ae,pe){if(this._animatingZoom)return!0;if(pe=pe||{},!this._zoomAnimated||pe.animate===!1||this._nothingToAnimate()||Math.abs(ae-this._zoom)>this.options.zoomAnimationThreshold)return!1;var be=this.getZoomScale(ae),Oe=this._getCenterOffset(Y)._divideBy(1-1/be);return pe.animate!==!0&&!this.getSize().contains(Oe)?!1:(_(function(){this._moveStart(!0,pe.noMoveStart||!1)._animateZoom(Y,ae,!0)},this),!0)},_animateZoom:function(Y,ae,pe,be){this._mapPane&&(pe&&(this._animatingZoom=!0,this._animateToCenter=Y,this._animateToZoom=ae,$n(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:Y,zoom:ae,noUpdate:be}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Zr(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function i2e(Y,ae){return new oo(Y,ae)}var kc=M.extend({options:{position:"topright"},initialize:function(Y){p(this,Y)},getPosition:function(){return this.options.position},setPosition:function(Y){var ae=this._map;return ae&&ae.removeControl(this),this.options.position=Y,ae&&ae.addControl(this),this},getContainer:function(){return this._container},addTo:function(Y){this.remove(),this._map=Y;var ae=this._container=this.onAdd(Y),pe=this.getPosition(),be=Y._controlCorners[pe];return $n(ae,"leaflet-control"),pe.indexOf("bottom")!==-1?be.insertBefore(ae,be.firstChild):be.appendChild(ae),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(no(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(Y){this._map&&Y&&Y.screenX>0&&Y.screenY>0&&this._map.getContainer().focus()}}),Hb=function(Y){return new kc(Y)};oo.include({addControl:function(Y){return Y.addTo(this),this},removeControl:function(Y){return Y.remove(),this},_initControlPos:function(){var Y=this._controlCorners={},ae="leaflet-",pe=this._controlContainer=cn("div",ae+"control-container",this._container);function be(Oe,Re){var Je=ae+Oe+" "+ae+Re;Y[Oe+Re]=cn("div",Je,pe)}be("top","left"),be("top","right"),be("bottom","left"),be("bottom","right")},_clearControlPos:function(){for(var Y in this._controlCorners)no(this._controlCorners[Y]);no(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var D7=kc.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(Y,ae,pe,be){return pe<be?-1:be<pe?1:0}},initialize:function(Y,ae,pe){p(this,pe),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var be in Y)this._addLayer(Y[be],be);for(be in ae)this._addLayer(ae[be],be,!0)},onAdd:function(Y){this._initLayout(),this._update(),this._map=Y,Y.on("zoomend",this._checkDisabledLayers,this);for(var ae=0;ae<this._layers.length;ae++)this._layers[ae].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(Y){return kc.prototype.addTo.call(this,Y),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var Y=0;Y<this._layers.length;Y++)this._layers[Y].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(Y,ae){return this._addLayer(Y,ae),this._map?this._update():this},addOverlay:function(Y,ae){return this._addLayer(Y,ae,!0),this._map?this._update():this},removeLayer:function(Y){Y.off("add remove",this._onLayerChange,this);var ae=this._getLayer(l(Y));return ae&&this._layers.splice(this._layers.indexOf(ae),1),this._map?this._update():this},expand:function(){$n(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var Y=this._map.getSize().y-(this._container.offsetTop+50);return Y<this._section.clientHeight?($n(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=Y+"px"):Zr(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Zr(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var Y="leaflet-control-layers",ae=this._container=cn("div",Y),pe=this.options.collapsed;ae.setAttribute("aria-haspopup",!0),Bb(ae),nL(ae);var be=this._section=cn("section",Y+"-list");pe&&(this._map.on("click",this.collapse,this),Fn(ae,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var Oe=this._layersLink=cn("a",Y+"-toggle",ae);Oe.href="#",Oe.title="Layers",Oe.setAttribute("role","button"),Fn(Oe,{keydown:function(Re){Re.keyCode===13&&this._expandSafely()},click:function(Re){fa(Re),this._expandSafely()}},this),pe||this.expand(),this._baseLayersList=cn("div",Y+"-base",be),this._separator=cn("div",Y+"-separator",be),this._overlaysList=cn("div",Y+"-overlays",be),ae.appendChild(be)},_getLayer:function(Y){for(var ae=0;ae<this._layers.length;ae++)if(this._layers[ae]&&l(this._layers[ae].layer)===Y)return this._layers[ae]},_addLayer:function(Y,ae,pe){this._map&&Y.on("add remove",this._onLayerChange,this),this._layers.push({layer:Y,name:ae,overlay:pe}),this.options.sortLayers&&this._layers.sort(a(function(be,Oe){return this.options.sortFunction(be.layer,Oe.layer,be.name,Oe.name)},this)),this.options.autoZIndex&&Y.setZIndex&&(this._lastZIndex++,Y.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Es(this._baseLayersList),Es(this._overlaysList),this._layerControlInputs=[];var Y,ae,pe,be,Oe=0;for(pe=0;pe<this._layers.length;pe++)be=this._layers[pe],this._addItem(be),ae=ae||be.overlay,Y=Y||!be.overlay,Oe+=be.overlay?0:1;return this.options.hideSingleBase&&(Y=Y&&Oe>1,this._baseLayersList.style.display=Y?"":"none"),this._separator.style.display=ae&&Y?"":"none",this},_onLayerChange:function(Y){this._handlingClick||this._update();var ae=this._getLayer(l(Y.target)),pe=ae.overlay?Y.type==="add"?"overlayadd":"overlayremove":Y.type==="add"?"baselayerchange":null;pe&&this._map.fire(pe,ae)},_createRadioElement:function(Y,ae){var pe='<input type="radio" class="leaflet-control-layers-selector" name="'+Y+'"'+(ae?' checked="checked"':"")+"/>",be=document.createElement("div");return be.innerHTML=pe,be.firstChild},_addItem:function(Y){var ae=document.createElement("label"),pe=this._map.hasLayer(Y.layer),be;Y.overlay?(be=document.createElement("input"),be.type="checkbox",be.className="leaflet-control-layers-selector",be.defaultChecked=pe):be=this._createRadioElement("leaflet-base-layers_"+l(this),pe),this._layerControlInputs.push(be),be.layerId=l(Y.layer),Fn(be,"click",this._onInputClick,this);var Oe=document.createElement("span");Oe.innerHTML=" "+Y.name;var Re=document.createElement("span");ae.appendChild(Re),Re.appendChild(be),Re.appendChild(Oe);var Je=Y.overlay?this._overlaysList:this._baseLayersList;return Je.appendChild(ae),this._checkDisabledLayers(),ae},_onInputClick:function(){if(!this._preventClick){var Y=this._layerControlInputs,ae,pe,be=[],Oe=[];this._handlingClick=!0;for(var Re=Y.length-1;Re>=0;Re--)ae=Y[Re],pe=this._getLayer(ae.layerId).layer,ae.checked?be.push(pe):ae.checked||Oe.push(pe);for(Re=0;Re<Oe.length;Re++)this._map.hasLayer(Oe[Re])&&this._map.removeLayer(Oe[Re]);for(Re=0;Re<be.length;Re++)this._map.hasLayer(be[Re])||this._map.addLayer(be[Re]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var Y=this._layerControlInputs,ae,pe,be=this._map.getZoom(),Oe=Y.length-1;Oe>=0;Oe--)ae=Y[Oe],pe=this._getLayer(ae.layerId).layer,ae.disabled=pe.options.minZoom!==void 0&&be<pe.options.minZoom||pe.options.maxZoom!==void 0&&be>pe.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var Y=this._section;this._preventClick=!0,Fn(Y,"click",fa),this.expand();var ae=this;setTimeout(function(){kr(Y,"click",fa),ae._preventClick=!1})}}),a2e=function(Y,ae,pe){return new D7(Y,ae,pe)},rL=kc.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(Y){var ae="leaflet-control-zoom",pe=cn("div",ae+" leaflet-bar"),be=this.options;return this._zoomInButton=this._createButton(be.zoomInText,be.zoomInTitle,ae+"-in",pe,this._zoomIn),this._zoomOutButton=this._createButton(be.zoomOutText,be.zoomOutTitle,ae+"-out",pe,this._zoomOut),this._updateDisabled(),Y.on("zoomend zoomlevelschange",this._updateDisabled,this),pe},onRemove:function(Y){Y.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(Y){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(Y.shiftKey?3:1))},_zoomOut:function(Y){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(Y.shiftKey?3:1))},_createButton:function(Y,ae,pe,be,Oe){var Re=cn("a",pe,be);return Re.innerHTML=Y,Re.href="#",Re.title=ae,Re.setAttribute("role","button"),Re.setAttribute("aria-label",ae),Bb(Re),Fn(Re,"click",Rf),Fn(Re,"click",Oe,this),Fn(Re,"click",this._refocusOnMap,this),Re},_updateDisabled:function(){var Y=this._map,ae="leaflet-disabled";Zr(this._zoomInButton,ae),Zr(this._zoomOutButton,ae),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||Y._zoom===Y.getMinZoom())&&($n(this._zoomOutButton,ae),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||Y._zoom===Y.getMaxZoom())&&($n(this._zoomInButton,ae),this._zoomInButton.setAttribute("aria-disabled","true"))}});oo.mergeOptions({zoomControl:!0}),oo.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new rL,this.addControl(this.zoomControl))});var s2e=function(Y){return new rL(Y)},N7=kc.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(Y){var ae="leaflet-control-scale",pe=cn("div",ae),be=this.options;return this._addScales(be,ae+"-line",pe),Y.on(be.updateWhenIdle?"moveend":"move",this._update,this),Y.whenReady(this._update,this),pe},onRemove:function(Y){Y.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(Y,ae,pe){Y.metric&&(this._mScale=cn("div",ae,pe)),Y.imperial&&(this._iScale=cn("div",ae,pe))},_update:function(){var Y=this._map,ae=Y.getSize().y/2,pe=Y.distance(Y.containerPointToLatLng([0,ae]),Y.containerPointToLatLng([this.options.maxWidth,ae]));this._updateScales(pe)},_updateScales:function(Y){this.options.metric&&Y&&this._updateMetric(Y),this.options.imperial&&Y&&this._updateImperial(Y)},_updateMetric:function(Y){var ae=this._getRoundNum(Y),pe=ae<1e3?ae+" m":ae/1e3+" km";this._updateScale(this._mScale,pe,ae/Y)},_updateImperial:function(Y){var ae=Y*3.2808399,pe,be,Oe;ae>5280?(pe=ae/5280,be=this._getRoundNum(pe),this._updateScale(this._iScale,be+" mi",be/pe)):(Oe=this._getRoundNum(ae),this._updateScale(this._iScale,Oe+" ft",Oe/ae))},_updateScale:function(Y,ae,pe){Y.style.width=Math.round(this.options.maxWidth*pe)+"px",Y.innerHTML=ae},_getRoundNum:function(Y){var ae=Math.pow(10,(Math.floor(Y)+"").length-1),pe=Y/ae;return pe=pe>=10?10:pe>=5?5:pe>=3?3:pe>=2?2:1,ae*pe}}),l2e=function(Y){return new N7(Y)},c2e='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',iL=kc.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Tt.inlineSvg?c2e+" ":"")+"Leaflet</a>"},initialize:function(Y){p(this,Y),this._attributions={}},onAdd:function(Y){Y.attributionControl=this,this._container=cn("div","leaflet-control-attribution"),Bb(this._container);for(var ae in Y._layers)Y._layers[ae].getAttribution&&this.addAttribution(Y._layers[ae].getAttribution());return this._update(),Y.on("layeradd",this._addAttribution,this),this._container},onRemove:function(Y){Y.off("layeradd",this._addAttribution,this)},_addAttribution:function(Y){Y.layer.getAttribution&&(this.addAttribution(Y.layer.getAttribution()),Y.layer.once("remove",function(){this.removeAttribution(Y.layer.getAttribution())},this))},setPrefix:function(Y){return this.options.prefix=Y,this._update(),this},addAttribution:function(Y){return Y?(this._attributions[Y]||(this._attributions[Y]=0),this._attributions[Y]++,this._update(),this):this},removeAttribution:function(Y){return Y?(this._attributions[Y]&&(this._attributions[Y]--,this._update()),this):this},_update:function(){if(this._map){var Y=[];for(var ae in this._attributions)this._attributions[ae]&&Y.push(ae);var pe=[];this.options.prefix&&pe.push(this.options.prefix),Y.length&&pe.push(Y.join(", ")),this._container.innerHTML=pe.join(' <span aria-hidden="true">|</span> ')}}});oo.mergeOptions({attributionControl:!0}),oo.addInitHook(function(){this.options.attributionControl&&new iL().addTo(this)});var u2e=function(Y){return new iL(Y)};kc.Layers=D7,kc.Zoom=rL,kc.Scale=N7,kc.Attribution=iL,Hb.layers=a2e,Hb.zoom=s2e,Hb.scale=l2e,Hb.attribution=u2e;var fu=M.extend({initialize:function(Y){this._map=Y},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fu.addTo=function(Y,ae){return Y.addHandler(ae,this),this};var d2e={Events:H},L7=Tt.touch?"touchstart mousedown":"mousedown",Zp=G.extend({options:{clickTolerance:3},initialize:function(Y,ae,pe,be){p(this,be),this._element=Y,this._dragStartTarget=ae||Y,this._preventOutline=pe},enable:function(){this._enabled||(Fn(this._dragStartTarget,L7,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Zp._dragging===this&&this.finishDrag(!0),kr(this._dragStartTarget,L7,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(Y){if(this._enabled&&(this._moved=!1,!Rb(this._element,"leaflet-zoom-anim"))){if(Y.touches&&Y.touches.length!==1){Zp._dragging===this&&this.finishDrag();return}if(!(Zp._dragging||Y.shiftKey||Y.which!==1&&Y.button!==1&&!Y.touches)&&(Zp._dragging=this,this._preventOutline&&KN(this._element),YN(),$b(),!this._moving)){this.fire("down");var ae=Y.touches?Y.touches[0]:Y,pe=T7(this._element);this._startPoint=new V(ae.clientX,ae.clientY),this._startPos=Lf(this._element),this._parentScale=JN(pe);var be=Y.type==="mousedown";Fn(document,be?"mousemove":"touchmove",this._onMove,this),Fn(document,be?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(Y){if(this._enabled){if(Y.touches&&Y.touches.length>1){this._moved=!0;return}var ae=Y.touches&&Y.touches.length===1?Y.touches[0]:Y,pe=new V(ae.clientX,ae.clientY)._subtract(this._startPoint);!pe.x&&!pe.y||Math.abs(pe.x)+Math.abs(pe.y)<this.options.clickTolerance||(pe.x/=this._parentScale.x,pe.y/=this._parentScale.y,fa(Y),this._moved||(this.fire("dragstart"),this._moved=!0,$n(document.body,"leaflet-dragging"),this._lastTarget=Y.target||Y.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),$n(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(pe),this._moving=!0,this._lastEvent=Y,this._updatePosition())}},_updatePosition:function(){var Y={originalEvent:this._lastEvent};this.fire("predrag",Y),Oi(this._element,this._newPos),this.fire("drag",Y)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(Y){Zr(document.body,"leaflet-dragging"),this._lastTarget&&(Zr(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),kr(document,"mousemove touchmove",this._onMove,this),kr(document,"mouseup touchend touchcancel",this._onUp,this),XN(),Fb();var ae=this._moved&&this._moving;this._moving=!1,Zp._dragging=!1,ae&&this.fire("dragend",{noInertia:Y,distance:this._newPos.distanceTo(this._startPos)})}});function I7(Y,ae,pe){var be,Oe=[1,4,2,8],Re,Je,lt,pt,St,Vt,yn,Un;for(Re=0,Vt=Y.length;Re<Vt;Re++)Y[Re]._code=jf(Y[Re],ae);for(lt=0;lt<4;lt++){for(yn=Oe[lt],be=[],Re=0,Vt=Y.length,Je=Vt-1;Re<Vt;Je=Re++)pt=Y[Re],St=Y[Je],pt._code&yn?St._code&yn||(Un=rk(St,pt,yn,ae,pe),Un._code=jf(Un,ae),be.push(Un)):(St._code&yn&&(Un=rk(St,pt,yn,ae,pe),Un._code=jf(Un,ae),be.push(Un)),be.push(pt));Y=be}return Y}function R7(Y,ae){var pe,be,Oe,Re,Je,lt,pt,St,Vt;if(!Y||Y.length===0)throw new Error("latlngs not passed");Nl(Y)||(console.warn("latlngs are not flat! Only the first ring will be used"),Y=Y[0]);var yn=x([0,0]),Un=w(Y),Qa=Un.getNorthWest().distanceTo(Un.getSouthWest())*Un.getNorthEast().distanceTo(Un.getNorthWest());Qa<1700&&(yn=aL(Y));var Ji=Y.length,Ll=[];for(pe=0;pe<Ji;pe++){var As=x(Y[pe]);Ll.push(ae.project(x([As.lat-yn.lat,As.lng-yn.lng])))}for(lt=pt=St=0,pe=0,be=Ji-1;pe<Ji;be=pe++)Oe=Ll[pe],Re=Ll[be],Je=Oe.y*Re.x-Re.y*Oe.x,pt+=(Oe.x+Re.x)*Je,St+=(Oe.y+Re.y)*Je,lt+=Je*3;lt===0?Vt=Ll[0]:Vt=[pt/lt,St/lt];var Xg=ae.unproject(I(Vt));return x([Xg.lat+yn.lat,Xg.lng+yn.lng])}function aL(Y){for(var ae=0,pe=0,be=0,Oe=0;Oe<Y.length;Oe++){var Re=x(Y[Oe]);ae+=Re.lat,pe+=Re.lng,be++}return x([ae/be,pe/be])}var p2e={__proto__:null,clipPolygon:I7,polygonCenter:R7,centroid:aL};function j7(Y,ae){if(!ae||!Y.length)return Y.slice();var pe=ae*ae;return Y=m2e(Y,pe),Y=f2e(Y,pe),Y}function $7(Y,ae,pe){return Math.sqrt(Wb(Y,ae,pe,!0))}function h2e(Y,ae,pe){return Wb(Y,ae,pe)}function f2e(Y,ae){var pe=Y.length,be=typeof Uint8Array<"u"?Uint8Array:Array,Oe=new be(pe);Oe[0]=Oe[pe-1]=1,sL(Y,Oe,ae,0,pe-1);var Re,Je=[];for(Re=0;Re<pe;Re++)Oe[Re]&&Je.push(Y[Re]);return Je}function sL(Y,ae,pe,be,Oe){var Re=0,Je,lt,pt;for(lt=be+1;lt<=Oe-1;lt++)pt=Wb(Y[lt],Y[be],Y[Oe],!0),pt>Re&&(Je=lt,Re=pt);Re>pe&&(ae[Je]=1,sL(Y,ae,pe,be,Je),sL(Y,ae,pe,Je,Oe))}function m2e(Y,ae){for(var pe=[Y[0]],be=1,Oe=0,Re=Y.length;be<Re;be++)g2e(Y[be],Y[Oe])>ae&&(pe.push(Y[be]),Oe=be);return Oe<Re-1&&pe.push(Y[Re-1]),pe}var F7;function z7(Y,ae,pe,be,Oe){var Re=be?F7:jf(Y,pe),Je=jf(ae,pe),lt,pt,St;for(F7=Je;;){if(!(Re|Je))return[Y,ae];if(Re&Je)return!1;lt=Re||Je,pt=rk(Y,ae,lt,pe,Oe),St=jf(pt,pe),lt===Re?(Y=pt,Re=St):(ae=pt,Je=St)}}function rk(Y,ae,pe,be,Oe){var Re=ae.x-Y.x,Je=ae.y-Y.y,lt=be.min,pt=be.max,St,Vt;return pe&8?(St=Y.x+Re*(pt.y-Y.y)/Je,Vt=pt.y):pe&4?(St=Y.x+Re*(lt.y-Y.y)/Je,Vt=lt.y):pe&2?(St=pt.x,Vt=Y.y+Je*(pt.x-Y.x)/Re):pe&1&&(St=lt.x,Vt=Y.y+Je*(lt.x-Y.x)/Re),new V(St,Vt,Oe)}function jf(Y,ae){var pe=0;return Y.x<ae.min.x?pe|=1:Y.x>ae.max.x&&(pe|=2),Y.y<ae.min.y?pe|=4:Y.y>ae.max.y&&(pe|=8),pe}function g2e(Y,ae){var pe=ae.x-Y.x,be=ae.y-Y.y;return pe*pe+be*be}function Wb(Y,ae,pe,be){var Oe=ae.x,Re=ae.y,Je=pe.x-Oe,lt=pe.y-Re,pt=Je*Je+lt*lt,St;return pt>0&&(St=((Y.x-Oe)*Je+(Y.y-Re)*lt)/pt,St>1?(Oe=pe.x,Re=pe.y):St>0&&(Oe+=Je*St,Re+=lt*St)),Je=Y.x-Oe,lt=Y.y-Re,be?Je*Je+lt*lt:new V(Oe,Re)}function Nl(Y){return!$(Y[0])||typeof Y[0][0]!="object"&&typeof Y[0][0]<"u"}function B7(Y){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Nl(Y)}function H7(Y,ae){var pe,be,Oe,Re,Je,lt,pt,St;if(!Y||Y.length===0)throw new Error("latlngs not passed");Nl(Y)||(console.warn("latlngs are not flat! Only the first ring will be used"),Y=Y[0]);var Vt=x([0,0]),yn=w(Y),Un=yn.getNorthWest().distanceTo(yn.getSouthWest())*yn.getNorthEast().distanceTo(yn.getNorthWest());Un<1700&&(Vt=aL(Y));var Qa=Y.length,Ji=[];for(pe=0;pe<Qa;pe++){var Ll=x(Y[pe]);Ji.push(ae.project(x([Ll.lat-Vt.lat,Ll.lng-Vt.lng])))}for(pe=0,be=0;pe<Qa-1;pe++)be+=Ji[pe].distanceTo(Ji[pe+1])/2;if(be===0)St=Ji[0];else for(pe=0,Re=0;pe<Qa-1;pe++)if(Je=Ji[pe],lt=Ji[pe+1],Oe=Je.distanceTo(lt),Re+=Oe,Re>be){pt=(Re-be)/Oe,St=[lt.x-pt*(lt.x-Je.x),lt.y-pt*(lt.y-Je.y)];break}var As=ae.unproject(I(St));return x([As.lat+Vt.lat,As.lng+Vt.lng])}var v2e={__proto__:null,simplify:j7,pointToSegmentDistance:$7,closestPointOnSegment:h2e,clipSegment:z7,_getEdgeIntersection:rk,_getBitCode:jf,_sqClosestPointOnSegment:Wb,isFlat:Nl,_flat:B7,polylineCenter:H7},lL={project:function(Y){return new V(Y.lng,Y.lat)},unproject:function(Y){return new b(Y.y,Y.x)},bounds:new C([-180,-90],[180,90])},cL={R:6378137,R_MINOR:6356752314245179e-9,bounds:new C([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(Y){var ae=Math.PI/180,pe=this.R,be=Y.lat*ae,Oe=this.R_MINOR/pe,Re=Math.sqrt(1-Oe*Oe),Je=Re*Math.sin(be),lt=Math.tan(Math.PI/4-be/2)/Math.pow((1-Je)/(1+Je),Re/2);return be=-pe*Math.log(Math.max(lt,1e-10)),new V(Y.lng*ae*pe,be)},unproject:function(Y){for(var ae=180/Math.PI,pe=this.R,be=this.R_MINOR/pe,Oe=Math.sqrt(1-be*be),Re=Math.exp(-Y.y/pe),Je=Math.PI/2-2*Math.atan(Re),lt=0,pt=.1,St;lt<15&&Math.abs(pt)>1e-7;lt++)St=Oe*Math.sin(Je),St=Math.pow((1-St)/(1+St),Oe/2),pt=Math.PI/2-2*Math.atan(Re*St)-Je,Je+=pt;return new b(Je*ae,Y.x*ae/pe)}},y2e={__proto__:null,LonLat:lL,Mercator:cL,SphericalMercator:X},b2e=r({},B,{code:"EPSG:3395",projection:cL,transformation:function(){var Y=.5/(Math.PI*cL.R);return J(Y,.5,-Y,.5)}()}),W7=r({},B,{code:"EPSG:4326",projection:lL,transformation:J(1/180,1,-1/180,.5)}),x2e=r({},F,{projection:lL,transformation:J(1,0,-1,0),scale:function(Y){return Math.pow(2,Y)},zoom:function(Y){return Math.log(Y)/Math.LN2},distance:function(Y,ae){var pe=ae.lng-Y.lng,be=ae.lat-Y.lat;return Math.sqrt(pe*pe+be*be)},infinite:!0});F.Earth=B,F.EPSG3395=b2e,F.EPSG3857=q,F.EPSG900913=Z,F.EPSG4326=W7,F.Simple=x2e;var Tc=G.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(Y){return Y.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(Y){return Y&&Y.removeLayer(this),this},getPane:function(Y){return this._map.getPane(Y?this.options[Y]||Y:this.options.pane)},addInteractiveTarget:function(Y){return this._map._targets[l(Y)]=this,this},removeInteractiveTarget:function(Y){return delete this._map._targets[l(Y)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(Y){var ae=Y.target;if(ae.hasLayer(this)){if(this._map=ae,this._zoomAnimated=ae._zoomAnimated,this.getEvents){var pe=this.getEvents();ae.on(pe,this),this.once("remove",function(){ae.off(pe,this)},this)}this.onAdd(ae),this.fire("add"),ae.fire("layeradd",{layer:this})}}});oo.include({addLayer:function(Y){if(!Y._layerAdd)throw new Error("The provided object is not a Layer.");var ae=l(Y);return this._layers[ae]?this:(this._layers[ae]=Y,Y._mapToAdd=this,Y.beforeAdd&&Y.beforeAdd(this),this.whenReady(Y._layerAdd,Y),this)},removeLayer:function(Y){var ae=l(Y);return this._layers[ae]?(this._loaded&&Y.onRemove(this),delete this._layers[ae],this._loaded&&(this.fire("layerremove",{layer:Y}),Y.fire("remove")),Y._map=Y._mapToAdd=null,this):this},hasLayer:function(Y){return l(Y)in this._layers},eachLayer:function(Y,ae){for(var pe in this._layers)Y.call(ae,this._layers[pe]);return this},_addLayers:function(Y){Y=Y?$(Y)?Y:[Y]:[];for(var ae=0,pe=Y.length;ae<pe;ae++)this.addLayer(Y[ae])},_addZoomLimit:function(Y){(!isNaN(Y.options.maxZoom)||!isNaN(Y.options.minZoom))&&(this._zoomBoundLayers[l(Y)]=Y,this._updateZoomLevels())},_removeZoomLimit:function(Y){var ae=l(Y);this._zoomBoundLayers[ae]&&(delete this._zoomBoundLayers[ae],this._updateZoomLevels())},_updateZoomLevels:function(){var Y=1/0,ae=-1/0,pe=this._getZoomSpan();for(var be in this._zoomBoundLayers){var Oe=this._zoomBoundLayers[be].options;Y=Oe.minZoom===void 0?Y:Math.min(Y,Oe.minZoom),ae=Oe.maxZoom===void 0?ae:Math.max(ae,Oe.maxZoom)}this._layersMaxZoom=ae===-1/0?void 0:ae,this._layersMinZoom=Y===1/0?void 0:Y,pe!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Vg=Tc.extend({initialize:function(Y,ae){p(this,ae),this._layers={};var pe,be;if(Y)for(pe=0,be=Y.length;pe<be;pe++)this.addLayer(Y[pe])},addLayer:function(Y){var ae=this.getLayerId(Y);return this._layers[ae]=Y,this._map&&this._map.addLayer(Y),this},removeLayer:function(Y){var ae=Y in this._layers?Y:this.getLayerId(Y);return this._map&&this._layers[ae]&&this._map.removeLayer(this._layers[ae]),delete this._layers[ae],this},hasLayer:function(Y){var ae=typeof Y=="number"?Y:this.getLayerId(Y);return ae in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(Y){var ae=Array.prototype.slice.call(arguments,1),pe,be;for(pe in this._layers)be=this._layers[pe],be[Y]&&be[Y].apply(be,ae);return this},onAdd:function(Y){this.eachLayer(Y.addLayer,Y)},onRemove:function(Y){this.eachLayer(Y.removeLayer,Y)},eachLayer:function(Y,ae){for(var pe in this._layers)Y.call(ae,this._layers[pe]);return this},getLayer:function(Y){return this._layers[Y]},getLayers:function(){var Y=[];return this.eachLayer(Y.push,Y),Y},setZIndex:function(Y){return this.invoke("setZIndex",Y)},getLayerId:function(Y){return l(Y)}}),w2e=function(Y,ae){return new Vg(Y,ae)},Nd=Vg.extend({addLayer:function(Y){return this.hasLayer(Y)?this:(Y.addEventParent(this),Vg.prototype.addLayer.call(this,Y),this.fire("layeradd",{layer:Y}))},removeLayer:function(Y){return this.hasLayer(Y)?(Y in this._layers&&(Y=this._layers[Y]),Y.removeEventParent(this),Vg.prototype.removeLayer.call(this,Y),this.fire("layerremove",{layer:Y})):this},setStyle:function(Y){return this.invoke("setStyle",Y)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var Y=new v;for(var ae in this._layers){var pe=this._layers[ae];Y.extend(pe.getBounds?pe.getBounds():pe.getLatLng())}return Y}}),_2e=function(Y,ae){return new Nd(Y,ae)},Ug=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(Y){p(this,Y)},createIcon:function(Y){return this._createIcon("icon",Y)},createShadow:function(Y){return this._createIcon("shadow",Y)},_createIcon:function(Y,ae){var pe=this._getIconUrl(Y);if(!pe){if(Y==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var be=this._createImg(pe,ae&&ae.tagName==="IMG"?ae:null);return this._setIconStyles(be,Y),(this.options.crossOrigin||this.options.crossOrigin==="")&&(be.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),be},_setIconStyles:function(Y,ae){var pe=this.options,be=pe[ae+"Size"];typeof be=="number"&&(be=[be,be]);var Oe=I(be),Re=I(ae==="shadow"&&pe.shadowAnchor||pe.iconAnchor||Oe&&Oe.divideBy(2,!0));Y.className="leaflet-marker-"+ae+" "+(pe.className||""),Re&&(Y.style.marginLeft=-Re.x+"px",Y.style.marginTop=-Re.y+"px"),Oe&&(Y.style.width=Oe.x+"px",Y.style.height=Oe.y+"px")},_createImg:function(Y,ae){return ae=ae||document.createElement("img"),ae.src=Y,ae},_getIconUrl:function(Y){return Tt.retina&&this.options[Y+"RetinaUrl"]||this.options[Y+"Url"]}});function C2e(Y){return new Ug(Y)}var Vb=Ug.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(Y){return typeof Vb.imagePath!="string"&&(Vb.imagePath=this._detectIconPath()),(this.options.imagePath||Vb.imagePath)+Ug.prototype._getIconUrl.call(this,Y)},_stripUrl:function(Y){var ae=function(pe,be,Oe){var Re=be.exec(pe);return Re&&Re[Oe]};return Y=ae(Y,/^url\((['"])?(.+)\1\)$/,2),Y&&ae(Y,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var Y=cn("div","leaflet-default-icon-path",document.body),ae=Rn(Y,"background-image")||Rn(Y,"backgroundImage");if(document.body.removeChild(Y),ae=this._stripUrl(ae),ae)return ae;var pe=document.querySelector('link[href$="leaflet.css"]');return pe?pe.href.substring(0,pe.href.length-11-1):""}}),V7=fu.extend({initialize:function(Y){this._marker=Y},addHooks:function(){var Y=this._marker._icon;this._draggable||(this._draggable=new Zp(Y,Y,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),$n(Y,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Zr(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(Y){var ae=this._marker,pe=ae._map,be=this._marker.options.autoPanSpeed,Oe=this._marker.options.autoPanPadding,Re=Lf(ae._icon),Je=pe.getPixelBounds(),lt=pe.getPixelOrigin(),pt=k(Je.min._subtract(lt).add(Oe),Je.max._subtract(lt).subtract(Oe));if(!pt.contains(Re)){var St=I((Math.max(pt.max.x,Re.x)-pt.max.x)/(Je.max.x-pt.max.x)-(Math.min(pt.min.x,Re.x)-pt.min.x)/(Je.min.x-pt.min.x),(Math.max(pt.max.y,Re.y)-pt.max.y)/(Je.max.y-pt.max.y)-(Math.min(pt.min.y,Re.y)-pt.min.y)/(Je.min.y-pt.min.y)).multiplyBy(be);pe.panBy(St,{animate:!1}),this._draggable._newPos._add(St),this._draggable._startPos._add(St),Oi(ae._icon,this._draggable._newPos),this._onDrag(Y),this._panRequest=_(this._adjustPan.bind(this,Y))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(Y){this._marker.options.autoPan&&(g(this._panRequest),this._panRequest=_(this._adjustPan.bind(this,Y)))},_onDrag:function(Y){var ae=this._marker,pe=ae._shadow,be=Lf(ae._icon),Oe=ae._map.layerPointToLatLng(be);pe&&Oi(pe,be),ae._latlng=Oe,Y.latlng=Oe,Y.oldLatLng=this._oldLatLng,ae.fire("move",Y).fire("drag",Y)},_onDragEnd:function(Y){g(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",Y)}}),ik=Tc.extend({options:{icon:new Vb,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(Y,ae){p(this,ae),this._latlng=x(Y)},onAdd:function(Y){this._zoomAnimated=this._zoomAnimated&&Y.options.markerZoomAnimation,this._zoomAnimated&&Y.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(Y){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&Y.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(Y){var ae=this._latlng;return this._latlng=x(Y),this.update(),this.fire("move",{oldLatLng:ae,latlng:this._latlng})},setZIndexOffset:function(Y){return this.options.zIndexOffset=Y,this.update()},getIcon:function(){return this.options.icon},setIcon:function(Y){return this.options.icon=Y,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var Y=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(Y)}return this},_initIcon:function(){var Y=this.options,ae="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),pe=Y.icon.createIcon(this._icon),be=!1;pe!==this._icon&&(this._icon&&this._removeIcon(),be=!0,Y.title&&(pe.title=Y.title),pe.tagName==="IMG"&&(pe.alt=Y.alt||"")),$n(pe,ae),Y.keyboard&&(pe.tabIndex="0",pe.setAttribute("role","button")),this._icon=pe,Y.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Fn(pe,"focus",this._panOnFocus,this);var Oe=Y.icon.createShadow(this._shadow),Re=!1;Oe!==this._shadow&&(this._removeShadow(),Re=!0),Oe&&($n(Oe,ae),Oe.alt=""),this._shadow=Oe,Y.opacity<1&&this._updateOpacity(),be&&this.getPane().appendChild(this._icon),this._initInteraction(),Oe&&Re&&this.getPane(Y.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&kr(this._icon,"focus",this._panOnFocus,this),no(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&no(this._shadow),this._shadow=null},_setPos:function(Y){this._icon&&Oi(this._icon,Y),this._shadow&&Oi(this._shadow,Y),this._zIndex=Y.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(Y){this._icon&&(this._icon.style.zIndex=this._zIndex+Y)},_animateZoom:function(Y){var ae=this._map._latLngToNewLayerPoint(this._latlng,Y.zoom,Y.center).round();this._setPos(ae)},_initInteraction:function(){if(this.options.interactive&&($n(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),V7)){var Y=this.options.draggable;this.dragging&&(Y=this.dragging.enabled(),this.dragging.disable()),this.dragging=new V7(this),Y&&this.dragging.enable()}},setOpacity:function(Y){return this.options.opacity=Y,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var Y=this.options.opacity;this._icon&&Dl(this._icon,Y),this._shadow&&Dl(this._shadow,Y)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var Y=this._map;if(Y){var ae=this.options.icon.options,pe=ae.iconSize?I(ae.iconSize):I(0,0),be=ae.iconAnchor?I(ae.iconAnchor):I(0,0);Y.panInside(this._latlng,{paddingTopLeft:be,paddingBottomRight:pe.subtract(be)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function S2e(Y,ae){return new ik(Y,ae)}var Kp=Tc.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(Y){this._renderer=Y.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(Y){return p(this,Y),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&Y&&Object.prototype.hasOwnProperty.call(Y,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ak=Kp.extend({options:{fill:!0,radius:10},initialize:function(Y,ae){p(this,ae),this._latlng=x(Y),this._radius=this.options.radius},setLatLng:function(Y){var ae=this._latlng;return this._latlng=x(Y),this.redraw(),this.fire("move",{oldLatLng:ae,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(Y){return this.options.radius=this._radius=Y,this.redraw()},getRadius:function(){return this._radius},setStyle:function(Y){var ae=Y&&Y.radius||this._radius;return Kp.prototype.setStyle.call(this,Y),this.setRadius(ae),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var Y=this._radius,ae=this._radiusY||Y,pe=this._clickTolerance(),be=[Y+pe,ae+pe];this._pxBounds=new C(this._point.subtract(be),this._point.add(be))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(Y){return Y.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function k2e(Y,ae){return new ak(Y,ae)}var uL=ak.extend({initialize:function(Y,ae,pe){if(typeof ae=="number"&&(ae=r({},pe,{radius:ae})),p(this,ae),this._latlng=x(Y),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(Y){return this._mRadius=Y,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var Y=[this._radius,this._radiusY||this._radius];return new v(this._map.layerPointToLatLng(this._point.subtract(Y)),this._map.layerPointToLatLng(this._point.add(Y)))},setStyle:Kp.prototype.setStyle,_project:function(){var Y=this._latlng.lng,ae=this._latlng.lat,pe=this._map,be=pe.options.crs;if(be.distance===B.distance){var Oe=Math.PI/180,Re=this._mRadius/B.R/Oe,Je=pe.project([ae+Re,Y]),lt=pe.project([ae-Re,Y]),pt=Je.add(lt).divideBy(2),St=pe.unproject(pt).lat,Vt=Math.acos((Math.cos(Re*Oe)-Math.sin(ae*Oe)*Math.sin(St*Oe))/(Math.cos(ae*Oe)*Math.cos(St*Oe)))/Oe;(isNaN(Vt)||Vt===0)&&(Vt=Re/Math.cos(Math.PI/180*ae)),this._point=pt.subtract(pe.getPixelOrigin()),this._radius=isNaN(Vt)?0:pt.x-pe.project([St,Y-Vt]).x,this._radiusY=pt.y-Je.y}else{var yn=be.unproject(be.project(this._latlng).subtract([this._mRadius,0]));this._point=pe.latLngToLayerPoint(this._latlng),this._radius=this._point.x-pe.latLngToLayerPoint(yn).x}this._updateBounds()}});function T2e(Y,ae,pe){return new uL(Y,ae,pe)}var Ld=Kp.extend({options:{smoothFactor:1,noClip:!1},initialize:function(Y,ae){p(this,ae),this._setLatLngs(Y)},getLatLngs:function(){return this._latlngs},setLatLngs:function(Y){return this._setLatLngs(Y),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(Y){for(var ae=1/0,pe=null,be=Wb,Oe,Re,Je=0,lt=this._parts.length;Je<lt;Je++)for(var pt=this._parts[Je],St=1,Vt=pt.length;St<Vt;St++){Oe=pt[St-1],Re=pt[St];var yn=be(Y,Oe,Re,!0);yn<ae&&(ae=yn,pe=be(Y,Oe,Re))}return pe&&(pe.distance=Math.sqrt(ae)),pe},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return H7(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(Y,ae){return ae=ae||this._defaultShape(),Y=x(Y),ae.push(Y),this._bounds.extend(Y),this.redraw()},_setLatLngs:function(Y){this._bounds=new v,this._latlngs=this._convertLatLngs(Y)},_defaultShape:function(){return Nl(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(Y){for(var ae=[],pe=Nl(Y),be=0,Oe=Y.length;be<Oe;be++)pe?(ae[be]=x(Y[be]),this._bounds.extend(ae[be])):ae[be]=this._convertLatLngs(Y[be]);return ae},_project:function(){var Y=new C;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,Y),this._bounds.isValid()&&Y.isValid()&&(this._rawPxBounds=Y,this._updateBounds())},_updateBounds:function(){var Y=this._clickTolerance(),ae=new V(Y,Y);this._rawPxBounds&&(this._pxBounds=new C([this._rawPxBounds.min.subtract(ae),this._rawPxBounds.max.add(ae)]))},_projectLatlngs:function(Y,ae,pe){var be=Y[0]instanceof b,Oe=Y.length,Re,Je;if(be){for(Je=[],Re=0;Re<Oe;Re++)Je[Re]=this._map.latLngToLayerPoint(Y[Re]),pe.extend(Je[Re]);ae.push(Je)}else for(Re=0;Re<Oe;Re++)this._projectLatlngs(Y[Re],ae,pe)},_clipPoints:function(){var Y=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(Y))){if(this.options.noClip){this._parts=this._rings;return}var ae=this._parts,pe,be,Oe,Re,Je,lt,pt;for(pe=0,Oe=0,Re=this._rings.length;pe<Re;pe++)for(pt=this._rings[pe],be=0,Je=pt.length;be<Je-1;be++)lt=z7(pt[be],pt[be+1],Y,be,!0),lt&&(ae[Oe]=ae[Oe]||[],ae[Oe].push(lt[0]),(lt[1]!==pt[be+1]||be===Je-2)&&(ae[Oe].push(lt[1]),Oe++))}},_simplifyPoints:function(){for(var Y=this._parts,ae=this.options.smoothFactor,pe=0,be=Y.length;pe<be;pe++)Y[pe]=j7(Y[pe],ae)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(Y,ae){var pe,be,Oe,Re,Je,lt,pt=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(Y))return!1;for(pe=0,Re=this._parts.length;pe<Re;pe++)for(lt=this._parts[pe],be=0,Je=lt.length,Oe=Je-1;be<Je;Oe=be++)if(!(!ae&&be===0)&&$7(Y,lt[Oe],lt[be])<=pt)return!0;return!1}});function M2e(Y,ae){return new Ld(Y,ae)}Ld._flat=B7;var Gg=Ld.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return R7(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(Y){var ae=Ld.prototype._convertLatLngs.call(this,Y),pe=ae.length;return pe>=2&&ae[0]instanceof b&&ae[0].equals(ae[pe-1])&&ae.pop(),ae},_setLatLngs:function(Y){Ld.prototype._setLatLngs.call(this,Y),Nl(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Nl(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var Y=this._renderer._bounds,ae=this.options.weight,pe=new V(ae,ae);if(Y=new C(Y.min.subtract(pe),Y.max.add(pe)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(Y))){if(this.options.noClip){this._parts=this._rings;return}for(var be=0,Oe=this._rings.length,Re;be<Oe;be++)Re=I7(this._rings[be],Y,!0),Re.length&&this._parts.push(Re)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(Y){var ae=!1,pe,be,Oe,Re,Je,lt,pt,St;if(!this._pxBounds||!this._pxBounds.contains(Y))return!1;for(Re=0,pt=this._parts.length;Re<pt;Re++)for(pe=this._parts[Re],Je=0,St=pe.length,lt=St-1;Je<St;lt=Je++)be=pe[Je],Oe=pe[lt],be.y>Y.y!=Oe.y>Y.y&&Y.x<(Oe.x-be.x)*(Y.y-be.y)/(Oe.y-be.y)+be.x&&(ae=!ae);return ae||Ld.prototype._containsPoint.call(this,Y,!0)}});function E2e(Y,ae){return new Gg(Y,ae)}var Id=Nd.extend({initialize:function(Y,ae){p(this,ae),this._layers={},Y&&this.addData(Y)},addData:function(Y){var ae=$(Y)?Y:Y.features,pe,be,Oe;if(ae){for(pe=0,be=ae.length;pe<be;pe++)Oe=ae[pe],(Oe.geometries||Oe.geometry||Oe.features||Oe.coordinates)&&this.addData(Oe);return this}var Re=this.options;if(Re.filter&&!Re.filter(Y))return this;var Je=sk(Y,Re);return Je?(Je.feature=uk(Y),Je.defaultOptions=Je.options,this.resetStyle(Je),Re.onEachFeature&&Re.onEachFeature(Y,Je),this.addLayer(Je)):this},resetStyle:function(Y){return Y===void 0?this.eachLayer(this.resetStyle,this):(Y.options=r({},Y.defaultOptions),this._setLayerStyle(Y,this.options.style),this)},setStyle:function(Y){return this.eachLayer(function(ae){this._setLayerStyle(ae,Y)},this)},_setLayerStyle:function(Y,ae){Y.setStyle&&(typeof ae=="function"&&(ae=ae(Y.feature)),Y.setStyle(ae))}});function sk(Y,ae){var pe=Y.type==="Feature"?Y.geometry:Y,be=pe?pe.coordinates:null,Oe=[],Re=ae&&ae.pointToLayer,Je=ae&&ae.coordsToLatLng||dL,lt,pt,St,Vt;if(!be&&!pe)return null;switch(pe.type){case"Point":return lt=Je(be),U7(Re,Y,lt,ae);case"MultiPoint":for(St=0,Vt=be.length;St<Vt;St++)lt=Je(be[St]),Oe.push(U7(Re,Y,lt,ae));return new Nd(Oe);case"LineString":case"MultiLineString":return pt=lk(be,pe.type==="LineString"?0:1,Je),new Ld(pt,ae);case"Polygon":case"MultiPolygon":return pt=lk(be,pe.type==="Polygon"?1:2,Je),new Gg(pt,ae);case"GeometryCollection":for(St=0,Vt=pe.geometries.length;St<Vt;St++){var yn=sk({geometry:pe.geometries[St],type:"Feature",properties:Y.properties},ae);yn&&Oe.push(yn)}return new Nd(Oe);case"FeatureCollection":for(St=0,Vt=pe.features.length;St<Vt;St++){var Un=sk(pe.features[St],ae);Un&&Oe.push(Un)}return new Nd(Oe);default:throw new Error("Invalid GeoJSON object.")}}function U7(Y,ae,pe,be){return Y?Y(ae,pe):new ik(pe,be&&be.markersInheritOptions&&be)}function dL(Y){return new b(Y[1],Y[0],Y[2])}function lk(Y,ae,pe){for(var be=[],Oe=0,Re=Y.length,Je;Oe<Re;Oe++)Je=ae?lk(Y[Oe],ae-1,pe):(pe||dL)(Y[Oe]),be.push(Je);return be}function pL(Y,ae){return Y=x(Y),Y.alt!==void 0?[d(Y.lng,ae),d(Y.lat,ae),d(Y.alt,ae)]:[d(Y.lng,ae),d(Y.lat,ae)]}function ck(Y,ae,pe,be){for(var Oe=[],Re=0,Je=Y.length;Re<Je;Re++)Oe.push(ae?ck(Y[Re],Nl(Y[Re])?0:ae-1,pe,be):pL(Y[Re],be));return!ae&&pe&&Oe.length>0&&Oe.push(Oe[0].slice()),Oe}function qg(Y,ae){return Y.feature?r({},Y.feature,{geometry:ae}):uk(ae)}function uk(Y){return Y.type==="Feature"||Y.type==="FeatureCollection"?Y:{type:"Feature",properties:{},geometry:Y}}var hL={toGeoJSON:function(Y){return qg(this,{type:"Point",coordinates:pL(this.getLatLng(),Y)})}};ik.include(hL),uL.include(hL),ak.include(hL),Ld.include({toGeoJSON:function(Y){var ae=!Nl(this._latlngs),pe=ck(this._latlngs,ae?1:0,!1,Y);return qg(this,{type:(ae?"Multi":"")+"LineString",coordinates:pe})}}),Gg.include({toGeoJSON:function(Y){var ae=!Nl(this._latlngs),pe=ae&&!Nl(this._latlngs[0]),be=ck(this._latlngs,pe?2:ae?1:0,!0,Y);return ae||(be=[be]),qg(this,{type:(pe?"Multi":"")+"Polygon",coordinates:be})}}),Vg.include({toMultiPoint:function(Y){var ae=[];return this.eachLayer(function(pe){ae.push(pe.toGeoJSON(Y).geometry.coordinates)}),qg(this,{type:"MultiPoint",coordinates:ae})},toGeoJSON:function(Y){var ae=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(ae==="MultiPoint")return this.toMultiPoint(Y);var pe=ae==="GeometryCollection",be=[];return this.eachLayer(function(Oe){if(Oe.toGeoJSON){var Re=Oe.toGeoJSON(Y);if(pe)be.push(Re.geometry);else{var Je=uk(Re);Je.type==="FeatureCollection"?be.push.apply(be,Je.features):be.push(Je)}}}),pe?qg(this,{geometries:be,type:"GeometryCollection"}):{type:"FeatureCollection",features:be}}});function G7(Y,ae){return new Id(Y,ae)}var A2e=G7,dk=Tc.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(Y,ae,pe){this._url=Y,this._bounds=w(ae),p(this,pe)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&($n(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){no(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(Y){return this.options.opacity=Y,this._image&&this._updateOpacity(),this},setStyle:function(Y){return Y.opacity&&this.setOpacity(Y.opacity),this},bringToFront:function(){return this._map&&pu(this._image),this},bringToBack:function(){return this._map&&Sc(this._image),this},setUrl:function(Y){return this._url=Y,this._image&&(this._image.src=Y),this},setBounds:function(Y){return this._bounds=w(Y),this._map&&this._reset(),this},getEvents:function(){var Y={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(Y.zoomanim=this._animateZoom),Y},setZIndex:function(Y){return this.options.zIndex=Y,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var Y=this._url.tagName==="IMG",ae=this._image=Y?this._url:cn("img");if($n(ae,"leaflet-image-layer"),this._zoomAnimated&&$n(ae,"leaflet-zoom-animated"),this.options.className&&$n(ae,this.options.className),ae.onselectstart=h,ae.onmousemove=h,ae.onload=a(this.fire,this,"load"),ae.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(ae.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),Y){this._url=ae.src;return}ae.src=this._url,ae.alt=this.options.alt},_animateZoom:function(Y){var ae=this._map.getZoomScale(Y.zoom),pe=this._map._latLngBoundsToNewLayerBounds(this._bounds,Y.zoom,Y.center).min;Nf(this._image,pe,ae)},_reset:function(){var Y=this._image,ae=new C(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),pe=ae.getSize();Oi(Y,ae.min),Y.style.width=pe.x+"px",Y.style.height=pe.y+"px"},_updateOpacity:function(){Dl(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var Y=this.options.errorOverlayUrl;Y&&this._url!==Y&&(this._url=Y,this._image.src=Y)},getCenter:function(){return this._bounds.getCenter()}}),P2e=function(Y,ae,pe){return new dk(Y,ae,pe)},q7=dk.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var Y=this._url.tagName==="VIDEO",ae=this._image=Y?this._url:cn("video");if($n(ae,"leaflet-image-layer"),this._zoomAnimated&&$n(ae,"leaflet-zoom-animated"),this.options.className&&$n(ae,this.options.className),ae.onselectstart=h,ae.onmousemove=h,ae.onloadeddata=a(this.fire,this,"load"),Y){for(var pe=ae.getElementsByTagName("source"),be=[],Oe=0;Oe<pe.length;Oe++)be.push(pe[Oe].src);this._url=pe.length>0?be:[ae.src];return}$(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(ae.style,"objectFit")&&(ae.style.objectFit="fill"),ae.autoplay=!!this.options.autoplay,ae.loop=!!this.options.loop,ae.muted=!!this.options.muted,ae.playsInline=!!this.options.playsInline;for(var Re=0;Re<this._url.length;Re++){var Je=cn("source");Je.src=this._url[Re],ae.appendChild(Je)}}});function O2e(Y,ae,pe){return new q7(Y,ae,pe)}var Y7=dk.extend({_initImage:function(){var Y=this._image=this._url;$n(Y,"leaflet-image-layer"),this._zoomAnimated&&$n(Y,"leaflet-zoom-animated"),this.options.className&&$n(Y,this.options.className),Y.onselectstart=h,Y.onmousemove=h}});function D2e(Y,ae,pe){return new Y7(Y,ae,pe)}var mu=Tc.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(Y,ae){Y&&(Y instanceof b||$(Y))?(this._latlng=x(Y),p(this,ae)):(p(this,Y),this._source=ae),this.options.content&&(this._content=this.options.content)},openOn:function(Y){return Y=arguments.length?Y:this._source._map,Y.hasLayer(this)||Y.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(Y){return this._map?this.close():(arguments.length?this._source=Y:Y=this._source,this._prepareOpen(),this.openOn(Y._map)),this},onAdd:function(Y){this._zoomAnimated=Y._zoomAnimated,this._container||this._initLayout(),Y._fadeAnimated&&Dl(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),Y._fadeAnimated&&Dl(this._container,1),this.bringToFront(),this.options.interactive&&($n(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(Y){Y._fadeAnimated?(Dl(this._container,0),this._removeTimeout=setTimeout(a(no,void 0,this._container),200)):no(this._container),this.options.interactive&&(Zr(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(Y){return this._latlng=x(Y),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(Y){return this._content=Y,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var Y={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(Y.zoomanim=this._animateZoom),Y},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&pu(this._container),this},bringToBack:function(){return this._map&&Sc(this._container),this},_prepareOpen:function(Y){var ae=this._source;if(!ae._map)return!1;if(ae instanceof Nd){ae=null;var pe=this._source._layers;for(var be in pe)if(pe[be]._map){ae=pe[be];break}if(!ae)return!1;this._source=ae}if(!Y)if(ae.getCenter)Y=ae.getCenter();else if(ae.getLatLng)Y=ae.getLatLng();else if(ae.getBounds)Y=ae.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(Y),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var Y=this._contentNode,ae=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof ae=="string")Y.innerHTML=ae;else{for(;Y.hasChildNodes();)Y.removeChild(Y.firstChild);Y.appendChild(ae)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var Y=this._map.latLngToLayerPoint(this._latlng),ae=I(this.options.offset),pe=this._getAnchor();this._zoomAnimated?Oi(this._container,Y.add(pe)):ae=ae.add(Y).add(pe);var be=this._containerBottom=-ae.y,Oe=this._containerLeft=-Math.round(this._containerWidth/2)+ae.x;this._container.style.bottom=be+"px",this._container.style.left=Oe+"px"}},_getAnchor:function(){return[0,0]}});oo.include({_initOverlay:function(Y,ae,pe,be){var Oe=ae;return Oe instanceof Y||(Oe=new Y(be).setContent(ae)),pe&&Oe.setLatLng(pe),Oe}}),Tc.include({_initOverlay:function(Y,ae,pe,be){var Oe=pe;return Oe instanceof Y?(p(Oe,be),Oe._source=this):(Oe=ae&&!be?ae:new Y(be,this),Oe.setContent(pe)),Oe}});var pk=mu.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(Y){return Y=arguments.length?Y:this._source._map,!Y.hasLayer(this)&&Y._popup&&Y._popup.options.autoClose&&Y.removeLayer(Y._popup),Y._popup=this,mu.prototype.openOn.call(this,Y)},onAdd:function(Y){mu.prototype.onAdd.call(this,Y),Y.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Kp||this._source.on("preclick",If))},onRemove:function(Y){mu.prototype.onRemove.call(this,Y),Y.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Kp||this._source.off("preclick",If))},getEvents:function(){var Y=mu.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(Y.preclick=this.close),this.options.keepInView&&(Y.moveend=this._adjustPan),Y},_initLayout:function(){var Y="leaflet-popup",ae=this._container=cn("div",Y+" "+(this.options.className||"")+" leaflet-zoom-animated"),pe=this._wrapper=cn("div",Y+"-content-wrapper",ae);if(this._contentNode=cn("div",Y+"-content",pe),Bb(ae),nL(this._contentNode),Fn(ae,"contextmenu",If),this._tipContainer=cn("div",Y+"-tip-container",ae),this._tip=cn("div",Y+"-tip",this._tipContainer),this.options.closeButton){var be=this._closeButton=cn("a",Y+"-close-button",ae);be.setAttribute("role","button"),be.setAttribute("aria-label","Close popup"),be.href="#close",be.innerHTML='<span aria-hidden="true">×</span>',Fn(be,"click",function(Oe){fa(Oe),this.close()},this)}},_updateLayout:function(){var Y=this._contentNode,ae=Y.style;ae.width="",ae.whiteSpace="nowrap";var pe=Y.offsetWidth;pe=Math.min(pe,this.options.maxWidth),pe=Math.max(pe,this.options.minWidth),ae.width=pe+1+"px",ae.whiteSpace="",ae.height="";var be=Y.offsetHeight,Oe=this.options.maxHeight,Re="leaflet-popup-scrolled";Oe&&be>Oe?(ae.height=Oe+"px",$n(Y,Re)):Zr(Y,Re),this._containerWidth=this._container.offsetWidth},_animateZoom:function(Y){var ae=this._map._latLngToNewLayerPoint(this._latlng,Y.zoom,Y.center),pe=this._getAnchor();Oi(this._container,ae.add(pe))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var Y=this._map,ae=parseInt(Rn(this._container,"marginBottom"),10)||0,pe=this._container.offsetHeight+ae,be=this._containerWidth,Oe=new V(this._containerLeft,-pe-this._containerBottom);Oe._add(Lf(this._container));var Re=Y.layerPointToContainerPoint(Oe),Je=I(this.options.autoPanPadding),lt=I(this.options.autoPanPaddingTopLeft||Je),pt=I(this.options.autoPanPaddingBottomRight||Je),St=Y.getSize(),Vt=0,yn=0;Re.x+be+pt.x>St.x&&(Vt=Re.x+be-St.x+pt.x),Re.x-Vt-lt.x<0&&(Vt=Re.x-lt.x),Re.y+pe+pt.y>St.y&&(yn=Re.y+pe-St.y+pt.y),Re.y-yn-lt.y<0&&(yn=Re.y-lt.y),(Vt||yn)&&(this.options.keepInView&&(this._autopanning=!0),Y.fire("autopanstart").panBy([Vt,yn]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),N2e=function(Y,ae){return new pk(Y,ae)};oo.mergeOptions({closePopupOnClick:!0}),oo.include({openPopup:function(Y,ae,pe){return this._initOverlay(pk,Y,ae,pe).openOn(this),this},closePopup:function(Y){return Y=arguments.length?Y:this._popup,Y&&Y.close(),this}}),Tc.include({bindPopup:function(Y,ae){return this._popup=this._initOverlay(pk,this._popup,Y,ae),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(Y){return this._popup&&(this instanceof Nd||(this._popup._source=this),this._popup._prepareOpen(Y||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(Y){return this._popup&&this._popup.setContent(Y),this},getPopup:function(){return this._popup},_openPopup:function(Y){if(!(!this._popup||!this._map)){Rf(Y);var ae=Y.layer||Y.target;if(this._popup._source===ae&&!(ae instanceof Kp)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(Y.latlng);return}this._popup._source=ae,this.openPopup(Y.latlng)}},_movePopup:function(Y){this._popup.setLatLng(Y.latlng)},_onKeyPress:function(Y){Y.originalEvent.keyCode===13&&this._openPopup(Y)}});var hk=mu.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(Y){mu.prototype.onAdd.call(this,Y),this.setOpacity(this.options.opacity),Y.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(Y){mu.prototype.onRemove.call(this,Y),Y.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var Y=mu.prototype.getEvents.call(this);return this.options.permanent||(Y.preclick=this.close),Y},_initLayout:function(){var Y="leaflet-tooltip",ae=Y+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=cn("div",ae),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(Y){var ae,pe,be=this._map,Oe=this._container,Re=be.latLngToContainerPoint(be.getCenter()),Je=be.layerPointToContainerPoint(Y),lt=this.options.direction,pt=Oe.offsetWidth,St=Oe.offsetHeight,Vt=I(this.options.offset),yn=this._getAnchor();lt==="top"?(ae=pt/2,pe=St):lt==="bottom"?(ae=pt/2,pe=0):lt==="center"?(ae=pt/2,pe=St/2):lt==="right"?(ae=0,pe=St/2):lt==="left"?(ae=pt,pe=St/2):Je.x<Re.x?(lt="right",ae=0,pe=St/2):(lt="left",ae=pt+(Vt.x+yn.x)*2,pe=St/2),Y=Y.subtract(I(ae,pe,!0)).add(Vt).add(yn),Zr(Oe,"leaflet-tooltip-right"),Zr(Oe,"leaflet-tooltip-left"),Zr(Oe,"leaflet-tooltip-top"),Zr(Oe,"leaflet-tooltip-bottom"),$n(Oe,"leaflet-tooltip-"+lt),Oi(Oe,Y)},_updatePosition:function(){var Y=this._map.latLngToLayerPoint(this._latlng);this._setPosition(Y)},setOpacity:function(Y){this.options.opacity=Y,this._container&&Dl(this._container,Y)},_animateZoom:function(Y){var ae=this._map._latLngToNewLayerPoint(this._latlng,Y.zoom,Y.center);this._setPosition(ae)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),L2e=function(Y,ae){return new hk(Y,ae)};oo.include({openTooltip:function(Y,ae,pe){return this._initOverlay(hk,Y,ae,pe).openOn(this),this},closeTooltip:function(Y){return Y.close(),this}}),Tc.include({bindTooltip:function(Y,ae){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(hk,this._tooltip,Y,ae),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(Y){if(!(!Y&&this._tooltipHandlersAdded)){var ae=Y?"off":"on",pe={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?pe.add=this._openTooltip:(pe.mouseover=this._openTooltip,pe.mouseout=this.closeTooltip,pe.click=this._openTooltip,this._map?this._addFocusListeners():pe.add=this._addFocusListeners),this._tooltip.options.sticky&&(pe.mousemove=this._moveTooltip),this[ae](pe),this._tooltipHandlersAdded=!Y}},openTooltip:function(Y){return this._tooltip&&(this instanceof Nd||(this._tooltip._source=this),this._tooltip._prepareOpen(Y)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(Y){return this._tooltip&&this._tooltip.setContent(Y),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(Y){var ae=typeof Y.getElement=="function"&&Y.getElement();ae&&(Fn(ae,"focus",function(){this._tooltip._source=Y,this.openTooltip()},this),Fn(ae,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(Y){var ae=typeof Y.getElement=="function"&&Y.getElement();ae&&ae.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(Y){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var ae=this;this._map.once("moveend",function(){ae._openOnceFlag=!1,ae._openTooltip(Y)});return}this._tooltip._source=Y.layer||Y.target,this.openTooltip(this._tooltip.options.sticky?Y.latlng:void 0)}},_moveTooltip:function(Y){var ae=Y.latlng,pe,be;this._tooltip.options.sticky&&Y.originalEvent&&(pe=this._map.mouseEventToContainerPoint(Y.originalEvent),be=this._map.containerPointToLayerPoint(pe),ae=this._map.layerPointToLatLng(be)),this._tooltip.setLatLng(ae)}});var X7=Ug.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(Y){var ae=Y&&Y.tagName==="DIV"?Y:document.createElement("div"),pe=this.options;if(pe.html instanceof Element?(Es(ae),ae.appendChild(pe.html)):ae.innerHTML=pe.html!==!1?pe.html:"",pe.bgPos){var be=I(pe.bgPos);ae.style.backgroundPosition=-be.x+"px "+-be.y+"px"}return this._setIconStyles(ae,"icon"),ae},createShadow:function(){return null}});function I2e(Y){return new X7(Y)}Ug.Default=Vb;var Ub=Tc.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Tt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(Y){p(this,Y)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(Y){Y._addZoomLimit(this)},onRemove:function(Y){this._removeAllTiles(),no(this._container),Y._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(pu(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Sc(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(Y){return this.options.opacity=Y,this._updateOpacity(),this},setZIndex:function(Y){return this.options.zIndex=Y,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var Y=this._clampZoom(this._map.getZoom());Y!==this._tileZoom&&(this._tileZoom=Y,this._updateLevels()),this._update()}return this},getEvents:function(){var Y={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),Y.move=this._onMove),this._zoomAnimated&&(Y.zoomanim=this._animateZoom),Y},createTile:function(){return document.createElement("div")},getTileSize:function(){var Y=this.options.tileSize;return Y instanceof V?Y:new V(Y,Y)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(Y){for(var ae=this.getPane().children,pe=-Y(-1/0,1/0),be=0,Oe=ae.length,Re;be<Oe;be++)Re=ae[be].style.zIndex,ae[be]!==this._container&&Re&&(pe=Y(pe,+Re));isFinite(pe)&&(this.options.zIndex=pe+Y(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Tt.ielt9){Dl(this._container,this.options.opacity);var Y=+new Date,ae=!1,pe=!1;for(var be in this._tiles){var Oe=this._tiles[be];if(!(!Oe.current||!Oe.loaded)){var Re=Math.min(1,(Y-Oe.loaded)/200);Dl(Oe.el,Re),Re<1?ae=!0:(Oe.active?pe=!0:this._onOpaqueTile(Oe),Oe.active=!0)}}pe&&!this._noPrune&&this._pruneTiles(),ae&&(g(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=cn("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var Y=this._tileZoom,ae=this.options.maxZoom;if(Y!==void 0){for(var pe in this._levels)pe=Number(pe),this._levels[pe].el.children.length||pe===Y?(this._levels[pe].el.style.zIndex=ae-Math.abs(Y-pe),this._onUpdateLevel(pe)):(no(this._levels[pe].el),this._removeTilesAtZoom(pe),this._onRemoveLevel(pe),delete this._levels[pe]);var be=this._levels[Y],Oe=this._map;return be||(be=this._levels[Y]={},be.el=cn("div","leaflet-tile-container leaflet-zoom-animated",this._container),be.el.style.zIndex=ae,be.origin=Oe.project(Oe.unproject(Oe.getPixelOrigin()),Y).round(),be.zoom=Y,this._setZoomTransform(be,Oe.getCenter(),Oe.getZoom()),this._onCreateLevel(be)),this._level=be,be}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var Y,ae,pe=this._map.getZoom();if(pe>this.options.maxZoom||pe<this.options.minZoom){this._removeAllTiles();return}for(Y in this._tiles)ae=this._tiles[Y],ae.retain=ae.current;for(Y in this._tiles)if(ae=this._tiles[Y],ae.current&&!ae.active){var be=ae.coords;this._retainParent(be.x,be.y,be.z,be.z-5)||this._retainChildren(be.x,be.y,be.z,be.z+2)}for(Y in this._tiles)this._tiles[Y].retain||this._removeTile(Y)}},_removeTilesAtZoom:function(Y){for(var ae in this._tiles)this._tiles[ae].coords.z===Y&&this._removeTile(ae)},_removeAllTiles:function(){for(var Y in this._tiles)this._removeTile(Y)},_invalidateAll:function(){for(var Y in this._levels)no(this._levels[Y].el),this._onRemoveLevel(Number(Y)),delete this._levels[Y];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(Y,ae,pe,be){var Oe=Math.floor(Y/2),Re=Math.floor(ae/2),Je=pe-1,lt=new V(+Oe,+Re);lt.z=+Je;var pt=this._tileCoordsToKey(lt),St=this._tiles[pt];return St&&St.active?(St.retain=!0,!0):(St&&St.loaded&&(St.retain=!0),Je>be?this._retainParent(Oe,Re,Je,be):!1)},_retainChildren:function(Y,ae,pe,be){for(var Oe=2*Y;Oe<2*Y+2;Oe++)for(var Re=2*ae;Re<2*ae+2;Re++){var Je=new V(Oe,Re);Je.z=pe+1;var lt=this._tileCoordsToKey(Je),pt=this._tiles[lt];if(pt&&pt.active){pt.retain=!0;continue}else pt&&pt.loaded&&(pt.retain=!0);pe+1<be&&this._retainChildren(Oe,Re,pe+1,be)}},_resetView:function(Y){var ae=Y&&(Y.pinch||Y.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),ae,ae)},_animateZoom:function(Y){this._setView(Y.center,Y.zoom,!0,Y.noUpdate)},_clampZoom:function(Y){var ae=this.options;return ae.minNativeZoom!==void 0&&Y<ae.minNativeZoom?ae.minNativeZoom:ae.maxNativeZoom!==void 0&&ae.maxNativeZoom<Y?ae.maxNativeZoom:Y},_setView:function(Y,ae,pe,be){var Oe=Math.round(ae);this.options.maxZoom!==void 0&&Oe>this.options.maxZoom||this.options.minZoom!==void 0&&Oe<this.options.minZoom?Oe=void 0:Oe=this._clampZoom(Oe);var Re=this.options.updateWhenZooming&&Oe!==this._tileZoom;(!be||Re)&&(this._tileZoom=Oe,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),Oe!==void 0&&this._update(Y),pe||this._pruneTiles(),this._noPrune=!!pe),this._setZoomTransforms(Y,ae)},_setZoomTransforms:function(Y,ae){for(var pe in this._levels)this._setZoomTransform(this._levels[pe],Y,ae)},_setZoomTransform:function(Y,ae,pe){var be=this._map.getZoomScale(pe,Y.zoom),Oe=Y.origin.multiplyBy(be).subtract(this._map._getNewPixelOrigin(ae,pe)).round();Tt.any3d?Nf(Y.el,Oe,be):Oi(Y.el,Oe)},_resetGrid:function(){var Y=this._map,ae=Y.options.crs,pe=this._tileSize=this.getTileSize(),be=this._tileZoom,Oe=this._map.getPixelWorldBounds(this._tileZoom);Oe&&(this._globalTileRange=this._pxBoundsToTileRange(Oe)),this._wrapX=ae.wrapLng&&!this.options.noWrap&&[Math.floor(Y.project([0,ae.wrapLng[0]],be).x/pe.x),Math.ceil(Y.project([0,ae.wrapLng[1]],be).x/pe.y)],this._wrapY=ae.wrapLat&&!this.options.noWrap&&[Math.floor(Y.project([ae.wrapLat[0],0],be).y/pe.x),Math.ceil(Y.project([ae.wrapLat[1],0],be).y/pe.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(Y){var ae=this._map,pe=ae._animatingZoom?Math.max(ae._animateToZoom,ae.getZoom()):ae.getZoom(),be=ae.getZoomScale(pe,this._tileZoom),Oe=ae.project(Y,this._tileZoom).floor(),Re=ae.getSize().divideBy(be*2);return new C(Oe.subtract(Re),Oe.add(Re))},_update:function(Y){var ae=this._map;if(ae){var pe=this._clampZoom(ae.getZoom());if(Y===void 0&&(Y=ae.getCenter()),this._tileZoom!==void 0){var be=this._getTiledPixelBounds(Y),Oe=this._pxBoundsToTileRange(be),Re=Oe.getCenter(),Je=[],lt=this.options.keepBuffer,pt=new C(Oe.getBottomLeft().subtract([lt,-lt]),Oe.getTopRight().add([lt,-lt]));if(!(isFinite(Oe.min.x)&&isFinite(Oe.min.y)&&isFinite(Oe.max.x)&&isFinite(Oe.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var St in this._tiles){var Vt=this._tiles[St].coords;(Vt.z!==this._tileZoom||!pt.contains(new V(Vt.x,Vt.y)))&&(this._tiles[St].current=!1)}if(Math.abs(pe-this._tileZoom)>1){this._setView(Y,pe);return}for(var yn=Oe.min.y;yn<=Oe.max.y;yn++)for(var Un=Oe.min.x;Un<=Oe.max.x;Un++){var Qa=new V(Un,yn);if(Qa.z=this._tileZoom,!!this._isValidTile(Qa)){var Ji=this._tiles[this._tileCoordsToKey(Qa)];Ji?Ji.current=!0:Je.push(Qa)}}if(Je.sort(function(As,Xg){return As.distanceTo(Re)-Xg.distanceTo(Re)}),Je.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ll=document.createDocumentFragment();for(Un=0;Un<Je.length;Un++)this._addTile(Je[Un],Ll);this._level.el.appendChild(Ll)}}}},_isValidTile:function(Y){var ae=this._map.options.crs;if(!ae.infinite){var pe=this._globalTileRange;if(!ae.wrapLng&&(Y.x<pe.min.x||Y.x>pe.max.x)||!ae.wrapLat&&(Y.y<pe.min.y||Y.y>pe.max.y))return!1}if(!this.options.bounds)return!0;var be=this._tileCoordsToBounds(Y);return w(this.options.bounds).overlaps(be)},_keyToBounds:function(Y){return this._tileCoordsToBounds(this._keyToTileCoords(Y))},_tileCoordsToNwSe:function(Y){var ae=this._map,pe=this.getTileSize(),be=Y.scaleBy(pe),Oe=be.add(pe),Re=ae.unproject(be,Y.z),Je=ae.unproject(Oe,Y.z);return[Re,Je]},_tileCoordsToBounds:function(Y){var ae=this._tileCoordsToNwSe(Y),pe=new v(ae[0],ae[1]);return this.options.noWrap||(pe=this._map.wrapLatLngBounds(pe)),pe},_tileCoordsToKey:function(Y){return Y.x+":"+Y.y+":"+Y.z},_keyToTileCoords:function(Y){var ae=Y.split(":"),pe=new V(+ae[0],+ae[1]);return pe.z=+ae[2],pe},_removeTile:function(Y){var ae=this._tiles[Y];ae&&(no(ae.el),delete this._tiles[Y],this.fire("tileunload",{tile:ae.el,coords:this._keyToTileCoords(Y)}))},_initTile:function(Y){$n(Y,"leaflet-tile");var ae=this.getTileSize();Y.style.width=ae.x+"px",Y.style.height=ae.y+"px",Y.onselectstart=h,Y.onmousemove=h,Tt.ielt9&&this.options.opacity<1&&Dl(Y,this.options.opacity)},_addTile:function(Y,ae){var pe=this._getTilePos(Y),be=this._tileCoordsToKey(Y),Oe=this.createTile(this._wrapCoords(Y),a(this._tileReady,this,Y));this._initTile(Oe),this.createTile.length<2&&_(a(this._tileReady,this,Y,null,Oe)),Oi(Oe,pe),this._tiles[be]={el:Oe,coords:Y,current:!0},ae.appendChild(Oe),this.fire("tileloadstart",{tile:Oe,coords:Y})},_tileReady:function(Y,ae,pe){ae&&this.fire("tileerror",{error:ae,tile:pe,coords:Y});var be=this._tileCoordsToKey(Y);pe=this._tiles[be],pe&&(pe.loaded=+new Date,this._map._fadeAnimated?(Dl(pe.el,0),g(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this)):(pe.active=!0,this._pruneTiles()),ae||($n(pe.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:pe.el,coords:Y})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Tt.ielt9||!this._map._fadeAnimated?_(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(Y){return Y.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(Y){var ae=new V(this._wrapX?u(Y.x,this._wrapX):Y.x,this._wrapY?u(Y.y,this._wrapY):Y.y);return ae.z=Y.z,ae},_pxBoundsToTileRange:function(Y){var ae=this.getTileSize();return new C(Y.min.unscaleBy(ae).floor(),Y.max.unscaleBy(ae).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var Y in this._tiles)if(!this._tiles[Y].loaded)return!1;return!0}});function R2e(Y){return new Ub(Y)}var Yg=Ub.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(Y,ae){this._url=Y,ae=p(this,ae),ae.detectRetina&&Tt.retina&&ae.maxZoom>0?(ae.tileSize=Math.floor(ae.tileSize/2),ae.zoomReverse?(ae.zoomOffset--,ae.minZoom=Math.min(ae.maxZoom,ae.minZoom+1)):(ae.zoomOffset++,ae.maxZoom=Math.max(ae.minZoom,ae.maxZoom-1)),ae.minZoom=Math.max(0,ae.minZoom)):ae.zoomReverse?ae.minZoom=Math.min(ae.maxZoom,ae.minZoom):ae.maxZoom=Math.max(ae.minZoom,ae.maxZoom),typeof ae.subdomains=="string"&&(ae.subdomains=ae.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(Y,ae){return this._url===Y&&ae===void 0&&(ae=!0),this._url=Y,ae||this.redraw(),this},createTile:function(Y,ae){var pe=document.createElement("img");return Fn(pe,"load",a(this._tileOnLoad,this,ae,pe)),Fn(pe,"error",a(this._tileOnError,this,ae,pe)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(pe.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(pe.referrerPolicy=this.options.referrerPolicy),pe.alt="",pe.src=this.getTileUrl(Y),pe},getTileUrl:function(Y){var ae={r:Tt.retina?"@2x":"",s:this._getSubdomain(Y),x:Y.x,y:Y.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var pe=this._globalTileRange.max.y-Y.y;this.options.tms&&(ae.y=pe),ae["-y"]=pe}return R(this._url,r(ae,this.options))},_tileOnLoad:function(Y,ae){Tt.ielt9?setTimeout(a(Y,this,null,ae),0):Y(null,ae)},_tileOnError:function(Y,ae,pe){var be=this.options.errorTileUrl;be&&ae.getAttribute("src")!==be&&(ae.src=be),Y(pe,ae)},_onTileRemove:function(Y){Y.tile.onload=null},_getZoomForUrl:function(){var Y=this._tileZoom,ae=this.options.maxZoom,pe=this.options.zoomReverse,be=this.options.zoomOffset;return pe&&(Y=ae-Y),Y+be},_getSubdomain:function(Y){var ae=Math.abs(Y.x+Y.y)%this.options.subdomains.length;return this.options.subdomains[ae]},_abortLoading:function(){var Y,ae;for(Y in this._tiles)if(this._tiles[Y].coords.z!==this._tileZoom&&(ae=this._tiles[Y].el,ae.onload=h,ae.onerror=h,!ae.complete)){ae.src=E;var pe=this._tiles[Y].coords;no(ae),delete this._tiles[Y],this.fire("tileabort",{tile:ae,coords:pe})}},_removeTile:function(Y){var ae=this._tiles[Y];if(ae)return ae.el.setAttribute("src",E),Ub.prototype._removeTile.call(this,Y)},_tileReady:function(Y,ae,pe){if(!(!this._map||pe&&pe.getAttribute("src")===E))return Ub.prototype._tileReady.call(this,Y,ae,pe)}});function Z7(Y,ae){return new Yg(Y,ae)}var K7=Yg.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(Y,ae){this._url=Y;var pe=r({},this.defaultWmsParams);for(var be in ae)be in this.options||(pe[be]=ae[be]);ae=p(this,ae);var Oe=ae.detectRetina&&Tt.retina?2:1,Re=this.getTileSize();pe.width=Re.x*Oe,pe.height=Re.y*Oe,this.wmsParams=pe},onAdd:function(Y){this._crs=this.options.crs||Y.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var ae=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[ae]=this._crs.code,Yg.prototype.onAdd.call(this,Y)},getTileUrl:function(Y){var ae=this._tileCoordsToNwSe(Y),pe=this._crs,be=k(pe.project(ae[0]),pe.project(ae[1])),Oe=be.min,Re=be.max,Je=(this._wmsVersion>=1.3&&this._crs===W7?[Oe.y,Oe.x,Re.y,Re.x]:[Oe.x,Oe.y,Re.x,Re.y]).join(","),lt=Yg.prototype.getTileUrl.call(this,Y);return lt+y(this.wmsParams,lt,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Je},setParams:function(Y,ae){return r(this.wmsParams,Y),ae||this.redraw(),this}});function j2e(Y,ae){return new K7(Y,ae)}Yg.WMS=K7,Z7.wms=j2e;var Rd=Tc.extend({options:{padding:.1},initialize:function(Y){p(this,Y),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),$n(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var Y={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(Y.zoomanim=this._onAnimZoom),Y},_onAnimZoom:function(Y){this._updateTransform(Y.center,Y.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(Y,ae){var pe=this._map.getZoomScale(ae,this._zoom),be=this._map.getSize().multiplyBy(.5+this.options.padding),Oe=this._map.project(this._center,ae),Re=be.multiplyBy(-pe).add(Oe).subtract(this._map._getNewPixelOrigin(Y,ae));Tt.any3d?Nf(this._container,Re,pe):Oi(this._container,Re)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var Y in this._layers)this._layers[Y]._reset()},_onZoomEnd:function(){for(var Y in this._layers)this._layers[Y]._project()},_updatePaths:function(){for(var Y in this._layers)this._layers[Y]._update()},_update:function(){var Y=this.options.padding,ae=this._map.getSize(),pe=this._map.containerPointToLayerPoint(ae.multiplyBy(-Y)).round();this._bounds=new C(pe,pe.add(ae.multiplyBy(1+Y*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),J7=Rd.extend({options:{tolerance:0},getEvents:function(){var Y=Rd.prototype.getEvents.call(this);return Y.viewprereset=this._onViewPreReset,Y},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Rd.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var Y=this._container=document.createElement("canvas");Fn(Y,"mousemove",this._onMouseMove,this),Fn(Y,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Fn(Y,"mouseout",this._handleMouseOut,this),Y._leaflet_disable_events=!0,this._ctx=Y.getContext("2d")},_destroyContainer:function(){g(this._redrawRequest),delete this._ctx,no(this._container),kr(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var Y;this._redrawBounds=null;for(var ae in this._layers)Y=this._layers[ae],Y._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Rd.prototype._update.call(this);var Y=this._bounds,ae=this._container,pe=Y.getSize(),be=Tt.retina?2:1;Oi(ae,Y.min),ae.width=be*pe.x,ae.height=be*pe.y,ae.style.width=pe.x+"px",ae.style.height=pe.y+"px",Tt.retina&&this._ctx.scale(2,2),this._ctx.translate(-Y.min.x,-Y.min.y),this.fire("update")}},_reset:function(){Rd.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(Y){this._updateDashArray(Y),this._layers[l(Y)]=Y;var ae=Y._order={layer:Y,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=ae),this._drawLast=ae,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(Y){this._requestRedraw(Y)},_removePath:function(Y){var ae=Y._order,pe=ae.next,be=ae.prev;pe?pe.prev=be:this._drawLast=be,be?be.next=pe:this._drawFirst=pe,delete Y._order,delete this._layers[l(Y)],this._requestRedraw(Y)},_updatePath:function(Y){this._extendRedrawBounds(Y),Y._project(),Y._update(),this._requestRedraw(Y)},_updateStyle:function(Y){this._updateDashArray(Y),this._requestRedraw(Y)},_updateDashArray:function(Y){if(typeof Y.options.dashArray=="string"){var ae=Y.options.dashArray.split(/[, ]+/),pe=[],be,Oe;for(Oe=0;Oe<ae.length;Oe++){if(be=Number(ae[Oe]),isNaN(be))return;pe.push(be)}Y.options._dashArray=pe}else Y.options._dashArray=Y.options.dashArray},_requestRedraw:function(Y){this._map&&(this._extendRedrawBounds(Y),this._redrawRequest=this._redrawRequest||_(this._redraw,this))},_extendRedrawBounds:function(Y){if(Y._pxBounds){var ae=(Y.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new C,this._redrawBounds.extend(Y._pxBounds.min.subtract([ae,ae])),this._redrawBounds.extend(Y._pxBounds.max.add([ae,ae]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var Y=this._redrawBounds;if(Y){var ae=Y.getSize();this._ctx.clearRect(Y.min.x,Y.min.y,ae.x,ae.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var Y,ae=this._redrawBounds;if(this._ctx.save(),ae){var pe=ae.getSize();this._ctx.beginPath(),this._ctx.rect(ae.min.x,ae.min.y,pe.x,pe.y),this._ctx.clip()}this._drawing=!0;for(var be=this._drawFirst;be;be=be.next)Y=be.layer,(!ae||Y._pxBounds&&Y._pxBounds.intersects(ae))&&Y._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(Y,ae){if(this._drawing){var pe,be,Oe,Re,Je=Y._parts,lt=Je.length,pt=this._ctx;if(lt){for(pt.beginPath(),pe=0;pe<lt;pe++){for(be=0,Oe=Je[pe].length;be<Oe;be++)Re=Je[pe][be],pt[be?"lineTo":"moveTo"](Re.x,Re.y);ae&&pt.closePath()}this._fillStroke(pt,Y)}}},_updateCircle:function(Y){if(!(!this._drawing||Y._empty())){var ae=Y._point,pe=this._ctx,be=Math.max(Math.round(Y._radius),1),Oe=(Math.max(Math.round(Y._radiusY),1)||be)/be;Oe!==1&&(pe.save(),pe.scale(1,Oe)),pe.beginPath(),pe.arc(ae.x,ae.y/Oe,be,0,Math.PI*2,!1),Oe!==1&&pe.restore(),this._fillStroke(pe,Y)}},_fillStroke:function(Y,ae){var pe=ae.options;pe.fill&&(Y.globalAlpha=pe.fillOpacity,Y.fillStyle=pe.fillColor||pe.color,Y.fill(pe.fillRule||"evenodd")),pe.stroke&&pe.weight!==0&&(Y.setLineDash&&Y.setLineDash(ae.options&&ae.options._dashArray||[]),Y.globalAlpha=pe.opacity,Y.lineWidth=pe.weight,Y.strokeStyle=pe.color,Y.lineCap=pe.lineCap,Y.lineJoin=pe.lineJoin,Y.stroke())},_onClick:function(Y){for(var ae=this._map.mouseEventToLayerPoint(Y),pe,be,Oe=this._drawFirst;Oe;Oe=Oe.next)pe=Oe.layer,pe.options.interactive&&pe._containsPoint(ae)&&(!(Y.type==="click"||Y.type==="preclick")||!this._map._draggableMoved(pe))&&(be=pe);this._fireEvent(be?[be]:!1,Y)},_onMouseMove:function(Y){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var ae=this._map.mouseEventToLayerPoint(Y);this._handleMouseHover(Y,ae)}},_handleMouseOut:function(Y){var ae=this._hoveredLayer;ae&&(Zr(this._container,"leaflet-interactive"),this._fireEvent([ae],Y,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(Y,ae){if(!this._mouseHoverThrottled){for(var pe,be,Oe=this._drawFirst;Oe;Oe=Oe.next)pe=Oe.layer,pe.options.interactive&&pe._containsPoint(ae)&&(be=pe);be!==this._hoveredLayer&&(this._handleMouseOut(Y),be&&($n(this._container,"leaflet-interactive"),this._fireEvent([be],Y,"mouseover"),this._hoveredLayer=be)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,Y),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(Y,ae,pe){this._map._fireDOMEvent(ae,pe||ae.type,Y)},_bringToFront:function(Y){var ae=Y._order;if(ae){var pe=ae.next,be=ae.prev;if(pe)pe.prev=be;else return;be?be.next=pe:pe&&(this._drawFirst=pe),ae.prev=this._drawLast,this._drawLast.next=ae,ae.next=null,this._drawLast=ae,this._requestRedraw(Y)}},_bringToBack:function(Y){var ae=Y._order;if(ae){var pe=ae.next,be=ae.prev;if(be)be.next=pe;else return;pe?pe.prev=be:be&&(this._drawLast=be),ae.prev=null,ae.next=this._drawFirst,this._drawFirst.prev=ae,this._drawFirst=ae,this._requestRedraw(Y)}}});function Q7(Y){return Tt.canvas?new J7(Y):null}var Gb=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(Y){return document.createElement("<lvml:"+Y+' class="lvml">')}}catch{}return function(Y){return document.createElement("<"+Y+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$2e={_initContainer:function(){this._container=cn("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Rd.prototype._update.call(this),this.fire("update"))},_initPath:function(Y){var ae=Y._container=Gb("shape");$n(ae,"leaflet-vml-shape "+(this.options.className||"")),ae.coordsize="1 1",Y._path=Gb("path"),ae.appendChild(Y._path),this._updateStyle(Y),this._layers[l(Y)]=Y},_addPath:function(Y){var ae=Y._container;this._container.appendChild(ae),Y.options.interactive&&Y.addInteractiveTarget(ae)},_removePath:function(Y){var ae=Y._container;no(ae),Y.removeInteractiveTarget(ae),delete this._layers[l(Y)]},_updateStyle:function(Y){var ae=Y._stroke,pe=Y._fill,be=Y.options,Oe=Y._container;Oe.stroked=!!be.stroke,Oe.filled=!!be.fill,be.stroke?(ae||(ae=Y._stroke=Gb("stroke")),Oe.appendChild(ae),ae.weight=be.weight+"px",ae.color=be.color,ae.opacity=be.opacity,be.dashArray?ae.dashStyle=$(be.dashArray)?be.dashArray.join(" "):be.dashArray.replace(/( *, *)/g," "):ae.dashStyle="",ae.endcap=be.lineCap.replace("butt","flat"),ae.joinstyle=be.lineJoin):ae&&(Oe.removeChild(ae),Y._stroke=null),be.fill?(pe||(pe=Y._fill=Gb("fill")),Oe.appendChild(pe),pe.color=be.fillColor||be.color,pe.opacity=be.fillOpacity):pe&&(Oe.removeChild(pe),Y._fill=null)},_updateCircle:function(Y){var ae=Y._point.round(),pe=Math.round(Y._radius),be=Math.round(Y._radiusY||pe);this._setPath(Y,Y._empty()?"M0 0":"AL "+ae.x+","+ae.y+" "+pe+","+be+" 0,"+65535*360)},_setPath:function(Y,ae){Y._path.v=ae},_bringToFront:function(Y){pu(Y._container)},_bringToBack:function(Y){Sc(Y._container)}},fk=Tt.vml?Gb:K,qb=Rd.extend({_initContainer:function(){this._container=fk("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fk("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){no(this._container),kr(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Rd.prototype._update.call(this);var Y=this._bounds,ae=Y.getSize(),pe=this._container;(!this._svgSize||!this._svgSize.equals(ae))&&(this._svgSize=ae,pe.setAttribute("width",ae.x),pe.setAttribute("height",ae.y)),Oi(pe,Y.min),pe.setAttribute("viewBox",[Y.min.x,Y.min.y,ae.x,ae.y].join(" ")),this.fire("update")}},_initPath:function(Y){var ae=Y._path=fk("path");Y.options.className&&$n(ae,Y.options.className),Y.options.interactive&&$n(ae,"leaflet-interactive"),this._updateStyle(Y),this._layers[l(Y)]=Y},_addPath:function(Y){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(Y._path),Y.addInteractiveTarget(Y._path)},_removePath:function(Y){no(Y._path),Y.removeInteractiveTarget(Y._path),delete this._layers[l(Y)]},_updatePath:function(Y){Y._project(),Y._update()},_updateStyle:function(Y){var ae=Y._path,pe=Y.options;ae&&(pe.stroke?(ae.setAttribute("stroke",pe.color),ae.setAttribute("stroke-opacity",pe.opacity),ae.setAttribute("stroke-width",pe.weight),ae.setAttribute("stroke-linecap",pe.lineCap),ae.setAttribute("stroke-linejoin",pe.lineJoin),pe.dashArray?ae.setAttribute("stroke-dasharray",pe.dashArray):ae.removeAttribute("stroke-dasharray"),pe.dashOffset?ae.setAttribute("stroke-dashoffset",pe.dashOffset):ae.removeAttribute("stroke-dashoffset")):ae.setAttribute("stroke","none"),pe.fill?(ae.setAttribute("fill",pe.fillColor||pe.color),ae.setAttribute("fill-opacity",pe.fillOpacity),ae.setAttribute("fill-rule",pe.fillRule||"evenodd")):ae.setAttribute("fill","none"))},_updatePoly:function(Y,ae){this._setPath(Y,re(Y._parts,ae))},_updateCircle:function(Y){var ae=Y._point,pe=Math.max(Math.round(Y._radius),1),be=Math.max(Math.round(Y._radiusY),1)||pe,Oe="a"+pe+","+be+" 0 1,0 ",Re=Y._empty()?"M0 0":"M"+(ae.x-pe)+","+ae.y+Oe+pe*2+",0 "+Oe+-pe*2+",0 ";this._setPath(Y,Re)},_setPath:function(Y,ae){Y._path.setAttribute("d",ae)},_bringToFront:function(Y){pu(Y._path)},_bringToBack:function(Y){Sc(Y._path)}});Tt.vml&&qb.include($2e);function eV(Y){return Tt.svg||Tt.vml?new qb(Y):null}oo.include({getRenderer:function(Y){var ae=Y.options.renderer||this._getPaneRenderer(Y.options.pane)||this.options.renderer||this._renderer;return ae||(ae=this._renderer=this._createRenderer()),this.hasLayer(ae)||this.addLayer(ae),ae},_getPaneRenderer:function(Y){if(Y==="overlayPane"||Y===void 0)return!1;var ae=this._paneRenderers[Y];return ae===void 0&&(ae=this._createRenderer({pane:Y}),this._paneRenderers[Y]=ae),ae},_createRenderer:function(Y){return this.options.preferCanvas&&Q7(Y)||eV(Y)}});var tV=Gg.extend({initialize:function(Y,ae){Gg.prototype.initialize.call(this,this._boundsToLatLngs(Y),ae)},setBounds:function(Y){return this.setLatLngs(this._boundsToLatLngs(Y))},_boundsToLatLngs:function(Y){return Y=w(Y),[Y.getSouthWest(),Y.getNorthWest(),Y.getNorthEast(),Y.getSouthEast()]}});function F2e(Y,ae){return new tV(Y,ae)}qb.create=fk,qb.pointsToPath=re,Id.geometryToLayer=sk,Id.coordsToLatLng=dL,Id.coordsToLatLngs=lk,Id.latLngToCoords=pL,Id.latLngsToCoords=ck,Id.getFeature=qg,Id.asFeature=uk,oo.mergeOptions({boxZoom:!0});var nV=fu.extend({initialize:function(Y){this._map=Y,this._container=Y._container,this._pane=Y._panes.overlayPane,this._resetStateTimeout=0,Y.on("unload",this._destroy,this)},addHooks:function(){Fn(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){kr(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){no(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(Y){if(!Y.shiftKey||Y.which!==1&&Y.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),$b(),YN(),this._startPoint=this._map.mouseEventToContainerPoint(Y),Fn(document,{contextmenu:Rf,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(Y){this._moved||(this._moved=!0,this._box=cn("div","leaflet-zoom-box",this._container),$n(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(Y);var ae=new C(this._point,this._startPoint),pe=ae.getSize();Oi(this._box,ae.min),this._box.style.width=pe.x+"px",this._box.style.height=pe.y+"px"},_finish:function(){this._moved&&(no(this._box),Zr(this._container,"leaflet-crosshair")),Fb(),XN(),kr(document,{contextmenu:Rf,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(Y){if(!(Y.which!==1&&Y.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var ae=new v(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(ae).fire("boxzoomend",{boxZoomBounds:ae})}},_onKeyDown:function(Y){Y.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});oo.addInitHook("addHandler","boxZoom",nV),oo.mergeOptions({doubleClickZoom:!0});var oV=fu.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(Y){var ae=this._map,pe=ae.getZoom(),be=ae.options.zoomDelta,Oe=Y.originalEvent.shiftKey?pe-be:pe+be;ae.options.doubleClickZoom==="center"?ae.setZoom(Oe):ae.setZoomAround(Y.containerPoint,Oe)}});oo.addInitHook("addHandler","doubleClickZoom",oV),oo.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var rV=fu.extend({addHooks:function(){if(!this._draggable){var Y=this._map;this._draggable=new Zp(Y._mapPane,Y._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),Y.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),Y.on("zoomend",this._onZoomEnd,this),Y.whenReady(this._onZoomEnd,this))}$n(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Zr(this._map._container,"leaflet-grab"),Zr(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var Y=this._map;if(Y._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var ae=w(this._map.options.maxBounds);this._offsetLimit=k(this._map.latLngToContainerPoint(ae.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(ae.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;Y.fire("movestart").fire("dragstart"),Y.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(Y){if(this._map.options.inertia){var ae=this._lastTime=+new Date,pe=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(pe),this._times.push(ae),this._prunePositions(ae)}this._map.fire("move",Y).fire("drag",Y)},_prunePositions:function(Y){for(;this._positions.length>1&&Y-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var Y=this._map.getSize().divideBy(2),ae=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=ae.subtract(Y).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(Y,ae){return Y-(Y-ae)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var Y=this._draggable._newPos.subtract(this._draggable._startPos),ae=this._offsetLimit;Y.x<ae.min.x&&(Y.x=this._viscousLimit(Y.x,ae.min.x)),Y.y<ae.min.y&&(Y.y=this._viscousLimit(Y.y,ae.min.y)),Y.x>ae.max.x&&(Y.x=this._viscousLimit(Y.x,ae.max.x)),Y.y>ae.max.y&&(Y.y=this._viscousLimit(Y.y,ae.max.y)),this._draggable._newPos=this._draggable._startPos.add(Y)}},_onPreDragWrap:function(){var Y=this._worldWidth,ae=Math.round(Y/2),pe=this._initialWorldOffset,be=this._draggable._newPos.x,Oe=(be-ae+pe)%Y+ae-pe,Re=(be+ae+pe)%Y-ae-pe,Je=Math.abs(Oe+pe)<Math.abs(Re+pe)?Oe:Re;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Je},_onDragEnd:function(Y){var ae=this._map,pe=ae.options,be=!pe.inertia||Y.noInertia||this._times.length<2;if(ae.fire("dragend",Y),be)ae.fire("moveend");else{this._prunePositions(+new Date);var Oe=this._lastPos.subtract(this._positions[0]),Re=(this._lastTime-this._times[0])/1e3,Je=pe.easeLinearity,lt=Oe.multiplyBy(Je/Re),pt=lt.distanceTo([0,0]),St=Math.min(pe.inertiaMaxSpeed,pt),Vt=lt.multiplyBy(St/pt),yn=St/(pe.inertiaDeceleration*Je),Un=Vt.multiplyBy(-yn/2).round();!Un.x&&!Un.y?ae.fire("moveend"):(Un=ae._limitOffset(Un,ae.options.maxBounds),_(function(){ae.panBy(Un,{duration:yn,easeLinearity:Je,noMoveStart:!0,animate:!0})}))}}});oo.addInitHook("addHandler","dragging",rV),oo.mergeOptions({keyboard:!0,keyboardPanDelta:80});var iV=fu.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(Y){this._map=Y,this._setPanDelta(Y.options.keyboardPanDelta),this._setZoomDelta(Y.options.zoomDelta)},addHooks:function(){var Y=this._map._container;Y.tabIndex<=0&&(Y.tabIndex="0"),Fn(Y,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),kr(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var Y=document.body,ae=document.documentElement,pe=Y.scrollTop||ae.scrollTop,be=Y.scrollLeft||ae.scrollLeft;this._map._container.focus(),window.scrollTo(be,pe)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(Y){var ae=this._panKeys={},pe=this.keyCodes,be,Oe;for(be=0,Oe=pe.left.length;be<Oe;be++)ae[pe.left[be]]=[-1*Y,0];for(be=0,Oe=pe.right.length;be<Oe;be++)ae[pe.right[be]]=[Y,0];for(be=0,Oe=pe.down.length;be<Oe;be++)ae[pe.down[be]]=[0,Y];for(be=0,Oe=pe.up.length;be<Oe;be++)ae[pe.up[be]]=[0,-1*Y]},_setZoomDelta:function(Y){var ae=this._zoomKeys={},pe=this.keyCodes,be,Oe;for(be=0,Oe=pe.zoomIn.length;be<Oe;be++)ae[pe.zoomIn[be]]=Y;for(be=0,Oe=pe.zoomOut.length;be<Oe;be++)ae[pe.zoomOut[be]]=-Y},_addHooks:function(){Fn(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){kr(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(Y){if(!(Y.altKey||Y.ctrlKey||Y.metaKey)){var ae=Y.keyCode,pe=this._map,be;if(ae in this._panKeys){if(!pe._panAnim||!pe._panAnim._inProgress)if(be=this._panKeys[ae],Y.shiftKey&&(be=I(be).multiplyBy(3)),pe.options.maxBounds&&(be=pe._limitOffset(I(be),pe.options.maxBounds)),pe.options.worldCopyJump){var Oe=pe.wrapLatLng(pe.unproject(pe.project(pe.getCenter()).add(be)));pe.panTo(Oe)}else pe.panBy(be)}else if(ae in this._zoomKeys)pe.setZoom(pe.getZoom()+(Y.shiftKey?3:1)*this._zoomKeys[ae]);else if(ae===27&&pe._popup&&pe._popup.options.closeOnEscapeKey)pe.closePopup();else return;Rf(Y)}}});oo.addInitHook("addHandler","keyboard",iV),oo.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var aV=fu.extend({addHooks:function(){Fn(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){kr(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(Y){var ae=P7(Y),pe=this._map.options.wheelDebounceTime;this._delta+=ae,this._lastMousePos=this._map.mouseEventToContainerPoint(Y),this._startTime||(this._startTime=+new Date);var be=Math.max(pe-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),be),Rf(Y)},_performZoom:function(){var Y=this._map,ae=Y.getZoom(),pe=this._map.options.zoomSnap||0;Y._stop();var be=this._delta/(this._map.options.wheelPxPerZoomLevel*4),Oe=4*Math.log(2/(1+Math.exp(-Math.abs(be))))/Math.LN2,Re=pe?Math.ceil(Oe/pe)*pe:Oe,Je=Y._limitZoom(ae+(this._delta>0?Re:-Re))-ae;this._delta=0,this._startTime=null,Je&&(Y.options.scrollWheelZoom==="center"?Y.setZoom(ae+Je):Y.setZoomAround(this._lastMousePos,ae+Je))}});oo.addInitHook("addHandler","scrollWheelZoom",aV);var z2e=600;oo.mergeOptions({tapHold:Tt.touchNative&&Tt.safari&&Tt.mobile,tapTolerance:15});var sV=fu.extend({addHooks:function(){Fn(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){kr(this._map._container,"touchstart",this._onDown,this)},_onDown:function(Y){if(clearTimeout(this._holdTimeout),Y.touches.length===1){var ae=Y.touches[0];this._startPos=this._newPos=new V(ae.clientX,ae.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Fn(document,"touchend",fa),Fn(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",ae))},this),z2e),Fn(document,"touchend touchcancel contextmenu",this._cancel,this),Fn(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function Y(){kr(document,"touchend",fa),kr(document,"touchend touchcancel",Y)},_cancel:function(){clearTimeout(this._holdTimeout),kr(document,"touchend touchcancel contextmenu",this._cancel,this),kr(document,"touchmove",this._onMove,this)},_onMove:function(Y){var ae=Y.touches[0];this._newPos=new V(ae.clientX,ae.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(Y,ae){var pe=new MouseEvent(Y,{bubbles:!0,cancelable:!0,view:window,screenX:ae.screenX,screenY:ae.screenY,clientX:ae.clientX,clientY:ae.clientY});pe._simulated=!0,ae.target.dispatchEvent(pe)}});oo.addInitHook("addHandler","tapHold",sV),oo.mergeOptions({touchZoom:Tt.touch,bounceAtZoomLimits:!0});var lV=fu.extend({addHooks:function(){$n(this._map._container,"leaflet-touch-zoom"),Fn(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Zr(this._map._container,"leaflet-touch-zoom"),kr(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(Y){var ae=this._map;if(!(!Y.touches||Y.touches.length!==2||ae._animatingZoom||this._zooming)){var pe=ae.mouseEventToContainerPoint(Y.touches[0]),be=ae.mouseEventToContainerPoint(Y.touches[1]);this._centerPoint=ae.getSize()._divideBy(2),this._startLatLng=ae.containerPointToLatLng(this._centerPoint),ae.options.touchZoom!=="center"&&(this._pinchStartLatLng=ae.containerPointToLatLng(pe.add(be)._divideBy(2))),this._startDist=pe.distanceTo(be),this._startZoom=ae.getZoom(),this._moved=!1,this._zooming=!0,ae._stop(),Fn(document,"touchmove",this._onTouchMove,this),Fn(document,"touchend touchcancel",this._onTouchEnd,this),fa(Y)}},_onTouchMove:function(Y){if(!(!Y.touches||Y.touches.length!==2||!this._zooming)){var ae=this._map,pe=ae.mouseEventToContainerPoint(Y.touches[0]),be=ae.mouseEventToContainerPoint(Y.touches[1]),Oe=pe.distanceTo(be)/this._startDist;if(this._zoom=ae.getScaleZoom(Oe,this._startZoom),!ae.options.bounceAtZoomLimits&&(this._zoom<ae.getMinZoom()&&Oe<1||this._zoom>ae.getMaxZoom()&&Oe>1)&&(this._zoom=ae._limitZoom(this._zoom)),ae.options.touchZoom==="center"){if(this._center=this._startLatLng,Oe===1)return}else{var Re=pe._add(be)._divideBy(2)._subtract(this._centerPoint);if(Oe===1&&Re.x===0&&Re.y===0)return;this._center=ae.unproject(ae.project(this._pinchStartLatLng,this._zoom).subtract(Re),this._zoom)}this._moved||(ae._moveStart(!0,!1),this._moved=!0),g(this._animRequest);var Je=a(ae._move,ae,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=_(Je,this,!0),fa(Y)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,g(this._animRequest),kr(document,"touchmove",this._onTouchMove,this),kr(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});oo.addInitHook("addHandler","touchZoom",lV),oo.BoxZoom=nV,oo.DoubleClickZoom=oV,oo.Drag=rV,oo.Keyboard=iV,oo.ScrollWheelZoom=aV,oo.TapHold=sV,oo.TouchZoom=lV,n.Bounds=C,n.Browser=Tt,n.CRS=F,n.Canvas=J7,n.Circle=uL,n.CircleMarker=ak,n.Class=M,n.Control=kc,n.DivIcon=X7,n.DivOverlay=mu,n.DomEvent=r2e,n.DomUtil=n2e,n.Draggable=Zp,n.Evented=G,n.FeatureGroup=Nd,n.GeoJSON=Id,n.GridLayer=Ub,n.Handler=fu,n.Icon=Ug,n.ImageOverlay=dk,n.LatLng=b,n.LatLngBounds=v,n.Layer=Tc,n.LayerGroup=Vg,n.LineUtil=v2e,n.Map=oo,n.Marker=ik,n.Mixin=d2e,n.Path=Kp,n.Point=V,n.PolyUtil=p2e,n.Polygon=Gg,n.Polyline=Ld,n.Popup=pk,n.PosAnimation=O7,n.Projection=y2e,n.Rectangle=tV,n.Renderer=Rd,n.SVG=qb,n.SVGOverlay=Y7,n.TileLayer=Yg,n.Tooltip=hk,n.Transformation=ee,n.Util=T,n.VideoOverlay=q7,n.bind=a,n.bounds=k,n.canvas=Q7,n.circle=T2e,n.circleMarker=k2e,n.control=Hb,n.divIcon=I2e,n.extend=r,n.featureGroup=_2e,n.geoJSON=G7,n.geoJson=A2e,n.gridLayer=R2e,n.icon=C2e,n.imageOverlay=P2e,n.latLng=x,n.latLngBounds=w,n.layerGroup=w2e,n.map=i2e,n.marker=S2e,n.point=I,n.polygon=E2e,n.polyline=M2e,n.popup=N2e,n.rectangle=F2e,n.setOptions=p,n.stamp=l,n.svg=eV,n.svgOverlay=D2e,n.tileLayer=Z7,n.tooltip=L2e,n.transformation=J,n.version=o,n.videoOverlay=O2e;var B2e=window.L;n.noConflict=function(){return window.L=B2e,this},window.L=n})})(w4,w4.exports);var npe=w4.exports;const np=Yi(npe);var ope={exports:{}};function XZe(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var Bm=1,Hm=2,Ev=3,ZZe=4,_4=5,kY=6378137,KZe=6356752314e-3,TY=.0066943799901413165,Yx=484813681109536e-20,Pt=Math.PI/2,JZe=.16666666666666666,QZe=.04722222222222222,eKe=.022156084656084655,$t=1e-10,ba=.017453292519943295,qu=57.29577951308232,Po=Math.PI/4,Jw=Math.PI*2,yi=3.14159265359,Ks={};Ks.greenwich=0;Ks.lisbon=-9.131906111111;Ks.paris=2.337229166667;Ks.bogota=-74.080916666667;Ks.madrid=-3.687938888889;Ks.rome=12.452333333333;Ks.bern=7.439583333333;Ks.jakarta=106.807719444444;Ks.ferro=-17.666666666667;Ks.brussels=4.367975;Ks.stockholm=18.058277777778;Ks.athens=23.7163375;Ks.oslo=10.722916666667;const tKe={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var MY=/[\s_\-\/\(\)]/g;function Jh(e,t){if(e[t])return e[t];for(var n=Object.keys(e),o=t.toLowerCase().replace(MY,""),r=-1,i,a;++r<n.length;)if(i=n[r],a=i.toLowerCase().replace(MY,""),a===o)return e[i]}function C4(e){var t={},n=e.split("+").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,l){var c=l.split("=");return c.push(!0),s[c[0].toLowerCase()]=c[1],s},{}),o,r,i,a={proj:"projName",datum:"datumCode",rf:function(s){t.rf=parseFloat(s)},lat_0:function(s){t.lat0=s*ba},lat_1:function(s){t.lat1=s*ba},lat_2:function(s){t.lat2=s*ba},lat_ts:function(s){t.lat_ts=s*ba},lon_0:function(s){t.long0=s*ba},lon_1:function(s){t.long1=s*ba},lon_2:function(s){t.long2=s*ba},alpha:function(s){t.alpha=parseFloat(s)*ba},gamma:function(s){t.rectified_grid_angle=parseFloat(s)},lonc:function(s){t.longc=s*ba},x_0:function(s){t.x0=parseFloat(s)},y_0:function(s){t.y0=parseFloat(s)},k_0:function(s){t.k0=parseFloat(s)},k:function(s){t.k0=parseFloat(s)},a:function(s){t.a=parseFloat(s)},b:function(s){t.b=parseFloat(s)},r:function(s){t.a=t.b=parseFloat(s)},r_a:function(){t.R_A=!0},zone:function(s){t.zone=parseInt(s,10)},south:function(){t.utmSouth=!0},towgs84:function(s){t.datum_params=s.split(",").map(function(l){return parseFloat(l)})},to_meter:function(s){t.to_meter=parseFloat(s)},units:function(s){t.units=s;var l=Jh(tKe,s);l&&(t.to_meter=l.to_meter)},from_greenwich:function(s){t.from_greenwich=s*ba},pm:function(s){var l=Jh(Ks,s);t.from_greenwich=(l||parseFloat(s))*ba},nadgrids:function(s){s==="@null"?t.datumCode="none":t.nadgrids=s},axis:function(s){var l="ewnsud";s.length===3&&l.indexOf(s.substr(0,1))!==-1&&l.indexOf(s.substr(1,1))!==-1&&l.indexOf(s.substr(2,1))!==-1&&(t.axis=s)},approx:function(){t.approx=!0}};for(o in n)r=n[o],o in a?(i=a[o],typeof i=="function"?i(r):t[i]=r):t[o]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var Qw=1,rpe=2,ipe=3,qM=4,ape=5,p8=-1,nKe=/\s/,oKe=/[A-Za-z]/,rKe=/[A-Za-z84_]/,QP=/[,\]]/,spe=/[\d\.E\-\+]/;function zp(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Qw}zp.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==qM)for(;nKe.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case Qw:return this.neutral(e);case rpe:return this.keyword(e);case qM:return this.quoted(e);case ape:return this.afterquote(e);case ipe:return this.number(e);case p8:return}};zp.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=qM;return}if(QP.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)};zp.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Qw;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Qw,this.currentObject=this.stack.pop(),this.currentObject||(this.state=p8);return}};zp.prototype.number=function(e){if(spe.test(e)){this.word+=e;return}if(QP.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)};zp.prototype.quoted=function(e){if(e==='"'){this.state=ape;return}this.word+=e};zp.prototype.keyword=function(e){if(rKe.test(e)){this.word+=e;return}if(e==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=Qw;return}if(QP.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)};zp.prototype.neutral=function(e){if(oKe.test(e)){this.word=e,this.state=rpe;return}if(e==='"'){this.word="",this.state=qM;return}if(spe.test(e)){this.word=e,this.state=ipe;return}if(QP.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)};zp.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===p8)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function iKe(e){var t=new zp(e);return t.output()}function EY(e,t,n){Array.isArray(t)&&(n.unshift(t),t=null);var o=t?{}:e,r=n.reduce(function(i,a){return nv(a,i),i},o);t&&(e[t]=r)}function nv(e,t){if(!Array.isArray(e)){t[e]=!0;return}var n=e.shift();if(n==="PARAMETER"&&(n=e.shift()),e.length===1){if(Array.isArray(e[0])){t[n]={},nv(e[0],t[n]);return}t[n]=e[0];return}if(!e.length){t[n]=!0;return}if(n==="TOWGS84"){t[n]=e;return}if(n==="AXIS"){n in t||(t[n]=[]),t[n].push(e);return}Array.isArray(n)||(t[n]={});var o;switch(n){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[n]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&nv(e[2],t[n]);return;case"SPHEROID":case"ELLIPSOID":t[n]={name:e[0],a:e[1],rf:e[2]},e.length===4&&nv(e[3],t[n]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":e[0]=["name",e[0]],EY(t,n,e);return;default:for(o=-1;++o<e.length;)if(!Array.isArray(e[o]))return nv(e,t[n]);return EY(t,n,e)}}var aKe=.017453292519943295;function sKe(e,t){var n=t[0],o=t[1];!(n in e)&&o in e&&(e[n]=e[o],t.length===3&&(e[n]=t[2](e[n])))}function vu(e){return e*aKe}function lKe(e){if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",n=0,o=e.AXIS.length;n<o;++n){var r=[e.AXIS[n][0].toLowerCase(),e.AXIS[n][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var i=e.GEOGCS;e.type==="GEOGCS"&&(i=e),i&&(i.DATUM?e.datumCode=i.DATUM.name.toLowerCase():e.datumCode=i.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),(e.datumCode==="new_zealand_geodetic_datum_1949"||e.datumCode==="new_zealand_1949")&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode.slice(-6)==="_ferro"&&(e.datumCode=e.datumCode.slice(0,-6)),e.datumCode.slice(-8)==="_jakarta"&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),i.DATUM&&i.DATUM.SPHEROID&&(e.ellps=i.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=i.DATUM.SPHEROID.a,e.rf=parseFloat(i.DATUM.SPHEROID.rf,10)),i.DATUM&&i.DATUM.TOWGS84&&(e.datum_params=i.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);function a(c){var u=e.to_meter||1;return c*u}var s=function(c){return sKe(e,c)},l=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",vu],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",vu],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",vu],["lat0","latitude_of_origin",vu],["lat0","standard_parallel_1",vu],["lat1","standard_parallel_1",vu],["lat2","standard_parallel_2",vu],["azimuth","Azimuth"],["alpha","azimuth",vu],["srsCode","name"]];l.forEach(s),!e.long0&&e.longc&&(e.projName==="Albers_Conic_Equal_Area"||e.projName==="Lambert_Azimuthal_Equal_Area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(e.projName==="Stereographic_South_Pole"||e.projName==="Polar Stereographic (variant B)")?(e.lat0=vu(e.lat1>0?90:-90),e.lat_ts=e.lat1):!e.lat_ts&&e.lat0&&e.projName==="Polar_Stereographic"&&(e.lat_ts=e.lat0,e.lat0=vu(e.lat0>0?90:-90))}function lpe(e){var t=iKe(e),n=t.shift(),o=t.shift();t.unshift(["name",o]),t.unshift(["type",n]);var r={};return nv(t,r),lKe(r),r}function ls(e){var t=this;if(arguments.length===2){var n=arguments[1];typeof n=="string"?n.charAt(0)==="+"?ls[e]=C4(arguments[1]):ls[e]=lpe(arguments[1]):ls[e]=n}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(o){Array.isArray(o)?ls.apply(t,o):ls(o)});if(typeof e=="string"){if(e in ls)return ls[e]}else"EPSG"in e?ls["EPSG:"+e.EPSG]=e:"ESRI"in e?ls["ESRI:"+e.ESRI]=e:"IAU2000"in e?ls["IAU2000:"+e.IAU2000]=e:console.log(e);return}}XZe(ls);function cKe(e){return typeof e=="string"}function uKe(e){return e in ls}var dKe=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function pKe(e){return dKe.some(function(t){return e.indexOf(t)>-1})}var hKe=["3857","900913","3785","102113"];function fKe(e){var t=Jh(e,"authority");if(t){var n=Jh(t,"epsg");return n&&hKe.indexOf(n)>-1}}function mKe(e){var t=Jh(e,"extension");if(t)return Jh(t,"proj4")}function gKe(e){return e[0]==="+"}function vKe(e){if(cKe(e)){if(uKe(e))return ls[e];if(pKe(e)){var t=lpe(e);if(fKe(t))return ls["EPSG:3857"];var n=mKe(t);return n?C4(n):t}if(gKe(e))return C4(e)}else return e}function AY(e,t){e=e||{};var n,o;if(!t)return e;for(o in t)n=t[o],n!==void 0&&(e[o]=n);return e}function cd(e,t,n){var o=e*t;return n/Math.sqrt(1-o*o)}function tS(e){return e<0?-1:1}function Gt(e){return Math.abs(e)<=yi?e:e-tS(e)*Jw}function Fc(e,t,n){var o=e*n,r=.5*e;return o=Math.pow((1-o)/(1+o),r),Math.tan(.5*(Pt-t))/o}function e_(e,t){for(var n=.5*e,o,r,i=Pt-2*Math.atan(t),a=0;a<=15;a++)if(o=e*Math.sin(i),r=Pt-2*Math.atan(t*Math.pow((1-o)/(1+o),n))-i,i+=r,Math.abs(r)<=1e-10)return i;return-9999}function yKe(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=cd(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function bKe(e){var t=e.x,n=e.y;if(n*qu>90&&n*qu<-90&&t*qu>180&&t*qu<-180)return null;var o,r;if(Math.abs(Math.abs(n)-Pt)<=$t)return null;if(this.sphere)o=this.x0+this.a*this.k0*Gt(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(Po+.5*n));else{var i=Math.sin(n),a=Fc(this.e,n,i);o=this.x0+this.a*this.k0*Gt(t-this.long0),r=this.y0-this.a*this.k0*Math.log(a)}return e.x=o,e.y=r,e}function xKe(e){var t=e.x-this.x0,n=e.y-this.y0,o,r;if(this.sphere)r=Pt-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var i=Math.exp(-n/(this.a*this.k0));if(r=e_(this.e,i),r===-9999)return null}return o=Gt(this.long0+t/(this.a*this.k0)),e.x=o,e.y=r,e}var wKe=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const _Ke={init:yKe,forward:bKe,inverse:xKe,names:wKe};function CKe(){}function PY(e){return e}var SKe=["longlat","identity"];const kKe={init:CKe,forward:PY,inverse:PY,names:SKe};var TKe=[_Ke,kKe],xT={},YM=[];function cpe(e,t){var n=YM.length;return e.names?(YM[n]=e,e.names.forEach(function(o){xT[o.toLowerCase()]=n}),this):(console.log(t),!0)}function MKe(e){if(!e)return!1;var t=e.toLowerCase();if(typeof xT[t]<"u"&&YM[xT[t]])return YM[xT[t]]}function EKe(){TKe.forEach(cpe)}const AKe={start:EKe,add:cpe,get:MKe};var On={};On.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};On.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};On.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};On.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};On.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};On.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};On.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};On.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};On.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};On.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};On.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};On.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};On.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};On.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};On.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};On.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};On.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};On.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};On.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};On.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};On.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};On.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};On.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};On.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};On.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};On.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};On.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};On.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};On.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};On.hough={a:6378270,rf:297,ellipseName:"Hough"};On.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};On.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};On.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};On.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};On.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};On.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};On.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};On.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};On.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};On.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};On.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};On.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var PKe=On.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};On.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function OKe(e,t,n,o){var r=e*e,i=t*t,a=(r-i)/r,s=0;o?(e*=1-a*(JZe+a*(QZe+a*eKe)),r=e*e,a=0):s=Math.sqrt(a);var l=(r-i)/i;return{es:a,e:s,ep2:l}}function DKe(e,t,n,o,r){if(!e){var i=Jh(On,o);i||(i=PKe),e=i.a,t=i.b,n=i.rf}return n&&!t&&(t=(1-1/n)*e),(n===0||Math.abs(e-t)<$t)&&(r=!0,t=e),{a:e,b:t,rf:n,sphere:r}}var Xi={};Xi.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};Xi.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};Xi.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};Xi.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};Xi.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};Xi.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};Xi.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};Xi.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};Xi.militargeographische_institut={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"};Xi.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};Xi.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};Xi.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};Xi.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};Xi.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};Xi.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};Xi.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};Xi.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};Xi.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function NKe(e,t,n,o,r,i,a){var s={};return e===void 0||e==="none"?s.datum_type=_4:s.datum_type=ZZe,t&&(s.datum_params=t.map(parseFloat),(s.datum_params[0]!==0||s.datum_params[1]!==0||s.datum_params[2]!==0)&&(s.datum_type=Bm),s.datum_params.length>3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=Hm,s.datum_params[3]*=Yx,s.datum_params[4]*=Yx,s.datum_params[5]*=Yx,s.datum_params[6]=s.datum_params[6]/1e6+1)),a&&(s.datum_type=Ev,s.grids=a),s.a=n,s.b=o,s.es=r,s.ep2=i,s}var upe={};function LKe(e,t){var n=new DataView(t),o=jKe(n),r=$Ke(n,o),i=FKe(n,r,o),a={header:r,subgrids:i};return upe[e]=a,a}function IKe(e){if(e===void 0)return null;var t=e.split(",");return t.map(RKe)}function RKe(e){if(e.length===0)return null;var t=e[0]==="@";return t&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:upe[e]||null,isNull:!1}}function ov(e){return e/3600*Math.PI/180}function jKe(e){var t=e.getInt32(8,!1);return t===11?!1:(t=e.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function $Ke(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:S4(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function S4(e,t,n){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,n)))}function FKe(e,t,n){for(var o=176,r=[],i=0;i<t.nSubgrids;i++){var a=BKe(e,o,n),s=HKe(e,o,a,n),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),c=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);r.push({ll:[ov(a.lowerLongitude),ov(a.lowerLatitude)],del:[ov(a.longitudeInterval),ov(a.latitudeInterval)],lim:[l,c],count:a.gridNodeCount,cvs:zKe(s)}),o+=176+a.gridNodeCount*16}return r}function zKe(e){return e.map(function(t){return[ov(t.longitudeShift),ov(t.latitudeShift)]})}function BKe(e,t,n){return{name:S4(e,t+8,t+16).trim(),parent:S4(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,n),upperLatitude:e.getFloat64(t+88,n),lowerLongitude:e.getFloat64(t+104,n),upperLongitude:e.getFloat64(t+120,n),latitudeInterval:e.getFloat64(t+136,n),longitudeInterval:e.getFloat64(t+152,n),gridNodeCount:e.getInt32(t+168,n)}}function HKe(e,t,n,o){for(var r=t+176,i=16,a=[],s=0;s<n.gridNodeCount;s++){var l={latitudeShift:e.getFloat32(r+s*i,o),longitudeShift:e.getFloat32(r+s*i+4,o),latitudeAccuracy:e.getFloat32(r+s*i+8,o),longitudeAccuracy:e.getFloat32(r+s*i+12,o)};a.push(l)}return a}function Ju(e,t){if(!(this instanceof Ju))return new Ju(e);t=t||function(c){if(c)throw c};var n=vKe(e);if(typeof n!="object"){t(e);return}var o=Ju.projections.get(n.projName);if(!o){t(e);return}if(n.datumCode&&n.datumCode!=="none"){var r=Jh(Xi,n.datumCode);r&&(n.datum_params=n.datum_params||(r.towgs84?r.towgs84.split(","):null),n.ellps=r.ellipse,n.datumName=r.datumName?r.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var i=DKe(n.a,n.b,n.rf,n.ellps,n.sphere),a=OKe(i.a,i.b,i.rf,n.R_A),s=IKe(n.nadgrids),l=n.datum||NKe(n.datumCode,n.datum_params,i.a,i.b,a.es,a.ep2,s);AY(this,n),AY(this,o),this.a=i.a,this.b=i.b,this.rf=i.rf,this.sphere=i.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}Ju.projections=AKe;Ju.projections.start();function WKe(e,t){return e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11?!1:e.datum_type===Bm?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type===Hm?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]:!0}function dpe(e,t,n){var o=e.x,r=e.y,i=e.z?e.z:0,a,s,l,c;if(r<-Pt&&r>-1.001*Pt)r=-Pt;else if(r>Pt&&r<1.001*Pt)r=Pt;else{if(r<-Pt)return{x:-1/0,y:-1/0,z:e.z};if(r>Pt)return{x:1/0,y:1/0,z:e.z}}return o>Math.PI&&(o-=2*Math.PI),s=Math.sin(r),c=Math.cos(r),l=s*s,a=n/Math.sqrt(1-t*l),{x:(a+i)*c*Math.cos(o),y:(a+i)*c*Math.sin(o),z:(a*(1-t)+i)*s}}function ppe(e,t,n,o){var r=1e-12,i=r*r,a=30,s,l,c,u,h,d,f,m,p,y,S,R,$,j=e.x,E=e.y,A=e.z?e.z:0,D,N,W;if(s=Math.sqrt(j*j+E*E),l=Math.sqrt(j*j+E*E+A*A),s/n<r){if(D=0,l/n<r)return N=Pt,W=-o,{x:e.x,y:e.y,z:e.z}}else D=Math.atan2(E,j);c=A/l,u=s/l,h=1/Math.sqrt(1-t*(2-t)*u*u),m=u*(1-t)*h,p=c*h,$=0;do $++,f=n/Math.sqrt(1-t*p*p),W=s*m+A*p-f*(1-t*p*p),d=t*f/(f+W),h=1/Math.sqrt(1-d*(2-d)*u*u),y=u*(1-d)*h,S=c*h,R=S*m-y*p,m=y,p=S;while(R*R>i&&$<a);return N=Math.atan(S/Math.abs(y)),{x:D,y:N,z:W}}function VKe(e,t,n){if(t===Bm)return{x:e.x+n[0],y:e.y+n[1],z:e.z+n[2]};if(t===Hm){var o=n[0],r=n[1],i=n[2],a=n[3],s=n[4],l=n[5],c=n[6];return{x:c*(e.x-l*e.y+s*e.z)+o,y:c*(l*e.x+e.y-a*e.z)+r,z:c*(-s*e.x+a*e.y+e.z)+i}}}function UKe(e,t,n){if(t===Bm)return{x:e.x-n[0],y:e.y-n[1],z:e.z-n[2]};if(t===Hm){var o=n[0],r=n[1],i=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=(e.x-o)/c,h=(e.y-r)/c,d=(e.z-i)/c;return{x:u+l*h-s*d,y:-l*u+h+a*d,z:s*u-a*h+d}}}function Bk(e){return e===Bm||e===Hm}function GKe(e,t,n){if(WKe(e,t)||e.datum_type===_4||t.datum_type===_4)return n;var o=e.a,r=e.es;if(e.datum_type===Ev){var i=OY(e,!1,n);if(i!==0)return;o=kY,r=TY}var a=t.a,s=t.b,l=t.es;if(t.datum_type===Ev&&(a=kY,s=KZe,l=TY),r===l&&o===a&&!Bk(e.datum_type)&&!Bk(t.datum_type))return n;if(n=dpe(n,r,o),Bk(e.datum_type)&&(n=VKe(n,e.datum_type,e.datum_params)),Bk(t.datum_type)&&(n=UKe(n,t.datum_type,t.datum_params)),n=ppe(n,l,a,s),t.datum_type===Ev){var c=OY(t,!0,n);if(c!==0)return}return n}function OY(e,t,n){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;var o={x:-n.x,y:n.y},r={x:Number.NaN,y:Number.NaN},i=[];e:for(var a=0;a<e.grids.length;a++){var s=e.grids[a];if(i.push(s.name),s.isNull){r=o;break}if(s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}for(var l=s.grid.subgrids,c=0,u=l.length;c<u;c++){var h=l[c],d=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,f=h.ll[0]-d,m=h.ll[1]-d,p=h.ll[0]+(h.lim[0]-1)*h.del[0]+d,y=h.ll[1]+(h.lim[1]-1)*h.del[1]+d;if(!(m>o.y||f>o.x||y<o.y||p<o.x)&&(r=qKe(o,t,h),!isNaN(r.x)))break e}}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-o.x*qu+" "+o.y*qu+" tried: '"+i+"'"),-1):(n.x=-r.x,n.y=r.y,0)}function qKe(e,t,n){var o={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return o;var r={x:e.x,y:e.y};r.x-=n.ll[0],r.y-=n.ll[1],r.x=Gt(r.x-Math.PI)+Math.PI;var i=DY(r,n);if(t){if(isNaN(i.x))return o;i.x=r.x-i.x,i.y=r.y-i.y;var a=9,s=1e-12,l,c;do{if(c=DY(i,n),isNaN(c.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:r.x-(c.x+i.x),y:r.y-(c.y+i.y)},i.x+=l.x,i.y+=l.y}while(a--&&Math.abs(l.x)>s&&Math.abs(l.y)>s);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),o;o.x=Gt(i.x+n.ll[0]),o.y=i.y+n.ll[1]}else isNaN(i.x)||(o.x=e.x+i.x,o.y=e.y+i.y);return o}function DY(e,t){var n={x:e.x/t.del[0],y:e.y/t.del[1]},o={x:Math.floor(n.x),y:Math.floor(n.y)},r={x:n.x-1*o.x,y:n.y-1*o.y},i={x:Number.NaN,y:Number.NaN},a;if(o.x<0||o.x>=t.lim[0]||o.y<0||o.y>=t.lim[1])return i;a=o.y*t.lim[0]+o.x;var s={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var c={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var u={x:t.cvs[a][0],y:t.cvs[a][1]},h=r.x*r.y,d=r.x*(1-r.y),f=(1-r.x)*(1-r.y),m=(1-r.x)*r.y;return i.x=f*s.x+d*l.x+m*u.x+h*c.x,i.y=f*s.y+d*l.y+m*u.y+h*c.y,i}function NY(e,t,n){var o=n.x,r=n.y,i=n.z||0,a,s,l,c={};for(l=0;l<3;l++)if(!(t&&l===2&&n.z===void 0))switch(l===0?(a=o,"ew".indexOf(e.axis[l])!==-1?s="x":s="y"):l===1?(a=r,"ns".indexOf(e.axis[l])!==-1?s="y":s="x"):(a=i,s="z"),e.axis[l]){case"e":c[s]=a;break;case"w":c[s]=-a;break;case"n":c[s]=a;break;case"s":c[s]=-a;break;case"u":n[s]!==void 0&&(c.z=a);break;case"d":n[s]!==void 0&&(c.z=-a);break;default:return null}return c}function hpe(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function YKe(e){LY(e.x),LY(e.y)}function LY(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function XKe(e,t){return(e.datum.datum_type===Bm||e.datum.datum_type===Hm||e.datum.datum_type===Ev)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Bm||t.datum.datum_type===Hm||t.datum.datum_type===Ev)&&e.datumCode!=="WGS84"}function XM(e,t,n,o){var r;Array.isArray(n)?n=hpe(n):n={x:n.x,y:n.y,z:n.z,m:n.m};var i=n.z!==void 0;if(YKe(n),e.datum&&t.datum&&XKe(e,t)&&(r=new Ju("WGS84"),n=XM(e,r,n,o),e=r),o&&e.axis!=="enu"&&(n=NY(e,!1,n)),e.projName==="longlat")n={x:n.x*ba,y:n.y*ba,z:n.z||0};else if(e.to_meter&&(n={x:n.x*e.to_meter,y:n.y*e.to_meter,z:n.z||0}),n=e.inverse(n),!n)return;if(e.from_greenwich&&(n.x+=e.from_greenwich),n=GKe(e.datum,t.datum,n),!!n)return t.from_greenwich&&(n={x:n.x-t.from_greenwich,y:n.y,z:n.z||0}),t.projName==="longlat"?n={x:n.x*qu,y:n.y*qu,z:n.z||0}:(n=t.forward(n),t.to_meter&&(n={x:n.x/t.to_meter,y:n.y/t.to_meter,z:n.z||0})),o&&t.axis!=="enu"?NY(t,!0,n):(n&&!i&&delete n.z,n)}var IY=Ju("WGS84");function n3(e,t,n,o){var r,i,a;return Array.isArray(n)?(r=XM(e,t,n,o)||{x:NaN,y:NaN},n.length>2?typeof e.name<"u"&&e.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(n.splice(3)):[r.x,r.y,n[2]].concat(n.splice(3)):[r.x,r.y].concat(n.splice(2)):[r.x,r.y]):(i=XM(e,t,n,o),a=Object.keys(n),a.length===2||a.forEach(function(s){if(typeof e.name<"u"&&e.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(s==="x"||s==="y"||s==="z")return}else if(s==="x"||s==="y")return;i[s]=n[s]}),i)}function RY(e){return e instanceof Ju?e:e.oProj?e.oProj:Ju(e)}function xl(e,t,n){e=RY(e);var o=!1,r;return typeof t>"u"?(t=e,e=IY,o=!0):(typeof t.x<"u"||Array.isArray(t))&&(n=t,t=e,e=IY,o=!0),t=RY(t),n?n3(e,t,n):(r={forward:function(i,a){return n3(e,t,i,a)},inverse:function(i,a){return n3(t,e,i,a)}},o&&(r.oProj=t),r)}var jY=6,fpe="AJSAJS",mpe="AFAFAF",rv=65,Is=73,$l=79,fx=86,mx=90;const ZKe={forward:gpe,inverse:KKe,toPoint:vpe};function gpe(e,t){return t=t||5,eJe(JKe({lat:e[1],lon:e[0]}),t)}function KKe(e){var t=h8(bpe(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function vpe(e){var t=h8(bpe(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function o3(e){return e*(Math.PI/180)}function $Y(e){return 180*(e/Math.PI)}function JKe(e){var t=e.lat,n=e.lon,o=6378137,r=.00669438,i=.9996,a,s,l,c,u,h,d,f=o3(t),m=o3(n),p,y;y=Math.floor((n+180)/6)+1,n===180&&(y=60),t>=56&&t<64&&n>=3&&n<12&&(y=32),t>=72&&t<84&&(n>=0&&n<9?y=31:n>=9&&n<21?y=33:n>=21&&n<33?y=35:n>=33&&n<42&&(y=37)),a=(y-1)*6-180+3,p=o3(a),s=r/(1-r),l=o/Math.sqrt(1-r*Math.sin(f)*Math.sin(f)),c=Math.tan(f)*Math.tan(f),u=s*Math.cos(f)*Math.cos(f),h=Math.cos(f)*(m-p),d=o*((1-r/4-3*r*r/64-5*r*r*r/256)*f-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*f)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*f)-35*r*r*r/3072*Math.sin(6*f));var S=i*l*(h+(1-c+u)*h*h*h/6+(5-18*c+c*c+72*u-58*s)*h*h*h*h*h/120)+5e5,R=i*(d+l*Math.tan(f)*(h*h/2+(5-c+9*u+4*u*u)*h*h*h*h/24+(61-58*c+c*c+600*u-330*s)*h*h*h*h*h*h/720));return t<0&&(R+=1e7),{northing:Math.round(R),easting:Math.round(S),zoneNumber:y,zoneLetter:QKe(t)}}function h8(e){var t=e.northing,n=e.easting,o=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var i=.9996,a=6378137,s=.00669438,l,c=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,h,d,f,m,p,y,S,R,$=n-5e5,j=t;o<"N"&&(j-=1e7),y=(r-1)*6-180+3,l=s/(1-s),p=j/i,S=p/(a*(1-s/4-3*s*s/64-5*s*s*s/256)),R=S+(3*c/2-27*c*c*c/32)*Math.sin(2*S)+(21*c*c/16-55*c*c*c*c/32)*Math.sin(4*S)+151*c*c*c/96*Math.sin(6*S),u=a/Math.sqrt(1-s*Math.sin(R)*Math.sin(R)),h=Math.tan(R)*Math.tan(R),d=l*Math.cos(R)*Math.cos(R),f=a*(1-s)/Math.pow(1-s*Math.sin(R)*Math.sin(R),1.5),m=$/(u*i);var E=R-u*Math.tan(R)/f*(m*m/2-(5+3*h+10*d-4*d*d-9*l)*m*m*m*m/24+(61+90*h+298*d+45*h*h-252*l-3*d*d)*m*m*m*m*m*m/720);E=$Y(E);var A=(m-(1+2*h+d)*m*m*m/6+(5-2*d+28*h-3*d*d+8*l+24*h*h)*m*m*m*m*m/120)/Math.cos(R);A=y+$Y(A);var D;if(e.accuracy){var N=h8({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});D={top:N.lat,right:N.lon,bottom:E,left:A}}else D={lat:E,lon:A};return D}function QKe(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function eJe(e,t){var n="00000"+e.easting,o="00000"+e.northing;return e.zoneNumber+e.zoneLetter+tJe(e.easting,e.northing,e.zoneNumber)+n.substr(n.length-5,t)+o.substr(o.length-5,t)}function tJe(e,t,n){var o=ype(n),r=Math.floor(e/1e5),i=Math.floor(t/1e5)%20;return nJe(r,i,o)}function ype(e){var t=e%jY;return t===0&&(t=jY),t}function nJe(e,t,n){var o=n-1,r=fpe.charCodeAt(o),i=mpe.charCodeAt(o),a=r+e-1,s=i+t,l=!1;a>mx&&(a=a-mx+rv-1,l=!0),(a===Is||r<Is&&a>Is||(a>Is||r<Is)&&l)&&a++,(a===$l||r<$l&&a>$l||(a>$l||r<$l)&&l)&&(a++,a===Is&&a++),a>mx&&(a=a-mx+rv-1),s>fx?(s=s-fx+rv-1,l=!0):l=!1,(s===Is||i<Is&&s>Is||(s>Is||i<Is)&&l)&&s++,(s===$l||i<$l&&s>$l||(s>$l||i<$l)&&l)&&(s++,s===Is&&s++),s>fx&&(s=s-fx+rv-1);var c=String.fromCharCode(a)+String.fromCharCode(s);return c}function bpe(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,n=null,o="",r,i=0;!/[A-Z]/.test(r=e.charAt(i));){if(i>=2)throw"MGRSPoint bad conversion from: "+e;o+=r,i++}var a=parseInt(o,10);if(i===0||i+3>t)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(i++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(i,i+=2);for(var l=ype(a),c=oJe(n.charAt(0),l),u=rJe(n.charAt(1),l);u<iJe(s);)u+=2e6;var h=t-i;if(h%2!==0)throw`MGRSPoint has to have an even number
|
|
@@ -583,7 +583,7 @@ Take a look at the reducer(s) handling this action type: `+R.type+`.
|
|
|
583
583
|
`+r:"")+`
|
|
584
584
|
|
|
585
585
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
586
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=bme,t.componentWillReceiveProps=xme),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=wme;var s=t.componentDidUpdate;t.componentDidUpdate=function(l,c,u){var h=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;s.call(this,l,c,h)}}return e}var oSt=["height","width","isVisible","style","className","children","columnKey","columnIndex","rowIndex","left","cellGroupType","isHeader","isGroupHeader","maxWidth","minWidth","touchEnabled"];function YZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function rSt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YZ(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YZ(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}var h9=He.forwardRef(function(e,t){var n=e.height,o=e.width,r=e.style,i=e.className,a=e.children,s=op(e,oSt),l=rSt({height:n,width:o},r);return He.createElement("div",Gr({},s,{className:na(bn("fixedDataTableCellLayout/wrap"),bn("public/fixedDataTableCell/wrap"),bn("public/fixedDataTableCell/cellContent"),i),style:l,ref:t}),a)});h9.propTypes={height:Be.number,width:Be.number,columnKey:Be.oneOfType([Be.string,Be.number]),rowIndex:Be.number,isVisible:Be.bool};var gy=He.createContext({}),iSt=yfe;function aSt(e,t,n){var o=e==null?void 0:iSt(e,t);return o===void 0?n:o}var m6=aSt;function sSt(e){var t=lSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function lSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var XZ=15,ZZ=100,f9=function(e){Bi(n,e);var t=sSt(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"state",{displacement:0}),xt(At(o),"containerRef",He.createRef()),xt(At(o),"onTouchEnd",function(s){o.props.touchEnabled&&s.stopPropagation()}),xt(At(o),"onTouchMove",function(s){o.props.touchEnabled&&s.stopPropagation()}),xt(At(o),"onMouseMove",function(s){o.cursorDeltaX+=s*(o.context.isRTL?-1:1)}),xt(At(o),"onMouseUp",function(){nme(o.frameId),o.setState({displacement:0,isReordering:!1}),o.updateColumnOrder(),o.frameId=null,o.cursorDeltaX=0,o.mouseMoveTracker.releaseMouseMoves()}),xt(At(o),"initializeDOMMouseMoveTracker",function(s){o.mouseMoveTracker=new i9(o.onMouseMove,o.onMouseUp,document.body,o.props.touchEnabled),o.mouseMoveTracker.captureMouseMoves(s)}),xt(At(o),"updateDisplacementPeriodically",function(){o.frameId=Dh(o.updateDisplacementPeriodically),o.updateDisplacementWithScroll()}),xt(At(o),"getBoundedDeltaX",function(s){var l=0,c=0,u=o.props.cellGroupType,h=o.context.groupHeaderHeight>0;if(h&&!o.props.isGroupHeader){var d=o.context.getColumnGroupByChild(o.props.columnIndex);l=d.width,c=d.offset}else l=o.context.getCellGroupWidth(u);var f=l-o.props.width;return MO(s,-o.originalLeft+c,-o.originalLeft+f+c)}),xt(At(o),"updateDisplacementWithScroll",function(){var s=o.scrollStart,l=o.props.cellGroupType,c=o.context,u=c.scrollX,h=c.maxScrollX,d=c.availableScrollWidth,f=o.cursorDeltaX;if(l===wn.SCROLLABLE){var m=o.originalLeft-s+f;f+=u-s,m>d-ZZ?u=Math.min(u+XZ,h):m<=ZZ&&(u=Math.max(u-XZ,0)),o.context.scrollToX(u)}f=o.getBoundedDeltaX(f),o.setState({displacement:f})}),xt(At(o),"isColumnMovedToRight",function(s){return s>0}),xt(At(o),"isColumnMovedToLeft",function(s){return s<0}),xt(At(o),"updateColumnOrder",function(){var s=o.props.cellGroupType,l=o.getBoundedDeltaX(o.cursorDeltaX+o.context.scrollX-o.scrollStart),c=l>=0?o.props.width+l+o.props.left:l+o.props.left,u,h;if(o.props.isGroupHeader){var d=o.context.getColumnGroupAtOffset(c,s),f=d.columnGroup,m=d.distanceFromOffset;u=f,h=m}else{var p=o.context.getColumnAtOffset(c,s),y=p.column,S=p.distanceFromOffset;u=y,h=S}var R=null,$=null;u.index<o.props.columnIndex?h<=u.width/2?(R=u.index-1,$=u.index):(R=u.index,$=u.index+1):h>=u.width/2?(R=u.index,$=u.index+1):(R=u.index-1,$=u.index),R===o.props.columnIndex&&--R,$===o.props.columnIndex&&++$;var j=o.props.isGroupHeader?o.context.getColumnGroupCount():o.context.getColumnCount(),E,A;wm(R,0,j)&&(E=o.props.isGroupHeader?o.context.getColumnGroup(R):o.context.getColumn(R)),wm($,0,j)&&(A=o.props.isGroupHeader?o.context.getColumnGroup($):o.context.getColumn($)),o.props.onColumnReorderEnd({columnBefore:m6(E,"columnKey"),columnAfter:m6(A,"columnKey"),reorderColumn:o.props.columnKey})}),o}return Or(n,[{key:"componentDidMount",value:function(){var o=this.props.contents.parentNode.cloneNode(!0);o.firstChild.classList.add(bn("public/fixedDataTableCell/reordering")),this.containerRef.current.appendChild(o),this.startDrag()}},{key:"render",value:function(){var o={position:"absolute"};return fy(o,this.state.displacement,0,!0,this.context.isRTL),He.createElement("div",{style:o,ref:this.containerRef})}},{key:"startDrag",value:function(){this.cursorDeltaX=0,this.scrollStart=this.context.scrollX,this.originalLeft=this.props.left,this.initializeDOMMouseMoveTracker(this.props.reorderStartEvent),this.setState({displacement:0,isReordering:!0}),this.frameId=Dh(this.updateDisplacementPeriodically)}}]),n}(He.PureComponent);f9.contextType=gy;f9.propTypes={columnIndex:Be.number.isRequired,columnKey:Be.string.isRequired,contents:Be.object.isRequired,cellGroupType:Be.string,isGroupHeader:Be.bool,isRTL:Be.bool,left:Be.number.isRequired,onColumnReorderStart:Be.func.isRequired,reorderStartEvent:Be.object.isRequired,touchEnabled:Be.bool,width:Be.number.isRequired};function cSt(e){var t=uSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function uSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var dSt=function(e){Bi(n,e);var t=cSt(n);function n(o){var r;Pr(this,n),r=t.call(this,o);var i=o.value;return r.unsubscribe=i.subscribe(function(a){r.setState({FixedDataTableContextValue:a})}),r.state={FixedDataTableContextValue:i},r}return Or(n,[{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var o=this.state.FixedDataTableContextValue;return He.createElement(gy.Provider,{value:o},this.props.children)}}]),n}(He.PureComponent);function pSt(){}var hSt=pSt,fSt=["onColumnReorderStart","onColumnReorderEnd","reorderStartEvent","children"];function mSt(e){var t=gSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function gSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var vSt=1,d_=function(e){Bi(n,e);var t=mSt(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"state",{isReordering:!1}),xt(At(o),"dragContainer",null),xt(At(o),"cellRef",He.createRef()),xt(At(o),"isMounted",!1),xt(At(o),"setReorderHandle",function(s){s&&(s.addEventListener("mousedown",o.onMouseDown,{passive:!1}),s.addEventListener("touchstart",o.onTouchStart,{passive:!1}))}),xt(At(o),"onTouchStart",function(s){o.props.touchEnabled&&o.onMouseDown(s)}),xt(At(o),"onMouseDown",function(s){o.onDragStart(s)}),xt(At(o),"onDragStart",function(s){o.createDragContainer(),o.renderDragProxy(s),o.props.onColumnReorderStart(o.props.columnKey)}),xt(At(o),"onColumnReorderEnd",function(s){o.isMounted&&o.setState({isReordering:!1}),o.removeDragContainer(),o.props.onColumnReorderEnd(s)}),xt(At(o),"createDragContainer",function(){o.dragContainer=document.createElement("div"),o.dragContainer.dataset.columnKey=o.props.columnKey;var s=o.cellRef.current.closest(".fixedDataTableCellGroupLayout_cellGroup");s.appendChild(o.dragContainer)}),xt(At(o),"getDragContainer",function(){if(o.dragContainer)return o.dragContainer;var s=o.cellRef.current.closest(".fixedDataTableCellGroupLayout_cellGroup");return o.dragContainer=s.querySelector('[data-column-key="'.concat(o.props.columnKey,'"]')),o.dragContainer}),xt(At(o),"removeDragContainer",function(){o.props.__react19RootCreator?o.dragContainer.root.unmount():He.unmountComponentAtNode(o.dragContainer),o.dragContainer.remove(),o.dragContainer=null}),o}return Or(n,[{key:"componentDidMount",value:function(){this.isMounted=!0;var o=m6(this.getDragContainer(),"dataset.columnKey"),r=vfe(this.props.columnKey)===o;r&&(this.renderDragProxy({}),this.setState({isReordering:!0}))}},{key:"componentWillUnmount",value:function(){this.isMounted=!1}},{key:"render",value:function(){if(this.state.isReordering)return null;var o=this.props,r=o.children,i=op(o,fSt),a=na(bn({"public/fixedDataTableCell/resizeReorderCellContainer":!0}),i.className),s=na(a,bn({"public/fixedDataTableCell/hasReorderHandle":!0})),l={height:i.height,width:i.width-vSt},c;return He.isValidElement(r)?c=He.cloneElement(r,i):typeof r=="function"?c=r(i):c=He.createElement(h9,i,r),He.createElement("div",{className:s,style:l,ref:this.cellRef},this.renderReorderHandle(),c)}},{key:"renderReorderHandle",value:function(){var o={height:this.props.height};return He.createElement("div",{ref:this.setReorderHandle,className:bn({"fixedDataTableCellLayout/columnReorderContainer":!0,"fixedDataTableCellLayout/columnReorderContainer/active":!1}),style:o})}},{key:"renderDragProxy",value:function(o){var r=this,i={isDragProxy:!0,reorderStartEvent:o,onColumnReorderEnd:this.onColumnReorderEnd,contents:this.cellRef.current},a=He.createElement(dSt,{value:this.context},He.createElement(f9,Gr({},this.props,i)));if(this.props.__react19RootCreator){var s=He.flushSync||function(l){return l()};s(function(){var l=r.props.__react19RootCreator(r.getDragContainer());r.dragContainer.root=l,l.render(a)}),this.setState({isReordering:!0});return}He.render(a,this.getDragContainer(),function(){return r.setState({isReordering:!0})})}}]),n}(He.PureComponent);d_.contextType=gy;d_.defaultProps={onColumnReorderStart:hSt};d_.propTypes={height:Be.number,width:Be.number,columnKey:Be.oneOfType([Be.string,Be.number]),rowIndex:Be.number,left:Be.number,touchEnabled:Be.bool,minWidth:Be.number,maxWidth:Be.number,onColumnReorderStart:Be.func,onColumnReorderEnd:Be.func.isRequired,__react19RootCreator:Be.func};var ySt=!!(typeof window<"u"&&window.document&&window.document.createElement),bSt=function(){function e(t,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function xSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wSt(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function _St(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Cme=function(e){_St(t,e);function t(){return xSt(this,t),wSt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return bSt(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return ySt?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),He.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(He.Component);Cme.propTypes={children:Be.node.isRequired,node:Be.any};var CSt=Cme,SSt=function(){function e(t,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function kSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TSt(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function MSt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Sme=function(e){MSt(t,e);function t(){return kSt(this,t),TSt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return SSt(t,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(n){this.renderPortal()}},{key:"componentWillUnmount",value:function(){He.unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(n){!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var o=this.props.children;typeof this.props.children.type=="function"&&(o=He.cloneElement(this.props.children)),this.portal=He.unstable_renderSubtreeIntoContainer(this,o,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),t}(He.Component),ESt=Sme;Sme.propTypes={children:Be.node.isRequired,node:Be.any};var g6=void 0;He.createPortal?g6=CSt:g6=ESt;var ASt=g6;function PSt(e){var t=OSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function OSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var kme=function(e){Bi(n,e);var t=PSt(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){if(!this.props.visible)return null;var o=this.getTableRef();if(!o)return null;var r={height:this.props.height,top:0,left:this.props.left};return He.createElement(ASt,{node:o},He.createElement("div",{className:na(bn("fixedDataTableColumnResizerLineLayout/main"),bn("public/fixedDataTableColumnResizerLine/main")),style:r},He.createElement("div",{className:bn("fixedDataTableColumnResizerLineLayout/mouseArea"),style:{height:this.props.height}})))}},{key:"getTableRef",value:function(){var o=this.props.parentRef;return o?o.closest(bn(".fixedDataTableLayout/main")):null}}]),n}(He.PureComponent);xt(kme,"propTypes",{visible:Be.bool.isRequired,height:Be.number.isRequired,left:Be.number.isRequired,parentRef:Be.object});function KZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function DSt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KZ(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KZ(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function NSt(e){var t=LSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function LSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Tme=function(e){Bi(n,e);var t=NSt(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),xt(At(r),"initialState",{isColumnResizing:!1,currentMouseXCoordinate:0,totalDisplacement:0}),xt(At(r),"state",DSt({},r.initialState)),xt(At(r),"resizerKnobRef",null),xt(At(r),"mouseMoveTracker",null),xt(At(r),"setResizerKnobRef",function(i){r.resizerKnobRef=i}),xt(At(r),"initializeDOMMouseMoveTracker",function(i){r.mouseMoveTracker=new i9(r.onMouseMove,r.onMouseUp,document.body,r.props.touchEnabled),r.mouseMoveTracker.captureMouseMoves(i)}),xt(At(r),"onTouchStart",function(i){r.props.touchEnabled&&r.onMouseDown(i)}),xt(At(r),"onMouseDown",function(i){r.initializeDOMMouseMoveTracker(i);var a=a6.getCoordinatesFromEvent(i).x-i.currentTarget.closest(bn(".fixedDataTableLayout/main")).getBoundingClientRect().left;r.setState({initialMouseXCoordinate:a,isColumnResizing:!0,totalDisplacement:0,currentMouseXCoordinate:a})}),xt(At(r),"onMouseUp",function(){var i=r.getMinMaxWidth(),a=i.minWidth,s=i.maxWidth,l=kO(r.props.width+r.state.totalDisplacement*(r.props.isRTL?-1:1),a,s);r.mouseMoveTracker.releaseMouseMoves(),r.setState({isColumnResizing:!1,totalDisplacement:0},function(){r.props.onColumnResizeEnd(l,r.props.columnKey)})}),xt(At(r),"onMouseMove",function(i){var a=r.props,s=a.isRTL,l=a.width,c=r.state,u=c.initialMouseXCoordinate,h=c.totalDisplacement,d=h+i,f=u+d,m=r.getMinMaxWidth(),p=m.minWidth,y=m.maxWidth,S=l+d*(s?-1:1);(S<p||S>y)&&(f=r.state.currentMouseXCoordinate),r.setState({totalDisplacement:d,currentMouseXCoordinate:f})}),xt(At(r),"getMinMaxWidth",function(){return{minWidth:r.props.minWidth||0,maxWidth:r.props.maxWidth||Number.MAX_SAFE_INTEGER}}),xt(At(r),"suppressEventIfInTouchMode",function(i){r.props.touchEnabled&&(i.preventDefault(),i.stopPropagation())}),r}return Or(n,[{key:"componentDidMount",value:function(){this.setupHandlers()}},{key:"componentWillUnmount",value:function(){this.cleanupHandlers()}},{key:"render",value:function(){var o={height:this.props.height},r=He.createElement(kme,{height:this.props.resizerLineHeight,visible:!!this.state.isColumnResizing,left:this.state.currentMouseXCoordinate,parentRef:this.resizerKnobRef});return He.createElement("div",{className:bn("fixedDataTableCellLayout/columnResizerContainer"),ref:this.setResizerKnobRef,style:o},r)}},{key:"setupHandlers",value:function(){this.resizerKnobRef.addEventListener("mousedown",this.onMouseDown,{passive:!1}),this.resizerKnobRef.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.resizerKnobRef.addEventListener("touchmove",this.suppressEventIfInTouchMode,{passive:!1}),this.resizerKnobRef.addEventListener("touchend",this.suppressEventIfInTouchMode,{passive:!1})}},{key:"cleanupHandlers",value:function(){this.resizerKnobRef.removeEventListener("mousedown",this.onMouseDown,{passive:!1}),this.resizerKnobRef.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.resizerKnobRef.removeEventListener("touchmove",this.suppressEventIfInTouchMode,{passive:!1}),this.resizerKnobRef.removeEventListener("touchend",this.suppressEventIfInTouchMode,{passive:!1})}}]),n}(He.PureComponent);Tme.propTypes={columnKey:Be.oneOfType([Be.string,Be.number]).isRequired,minWidth:Be.number,maxWidth:Be.number,width:Be.number.isRequired,resizerLineHeight:Be.number.isRequired,touchEnabled:Be.bool,isRTL:Be.bool,onColumnResizeEnd:Be.func.isRequired,height:Be.number.isRequired};var ISt=["children","minWidth","maxWidth","onColumnResizeEnd","onColumnReorderEnd","rowIndex","left","touchEnabled","cellGroupType","onColumnReorderStart"];function RSt(e){var t=jSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function jSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var pE=function(e){Bi(n,e);var t=RSt(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){var o=this.props,r=o.children,i=op(o,ISt),a;return He.isValidElement(r)?a=He.cloneElement(r,i):typeof r=="function"?a=r(i):a=He.createElement(h9,i,r),He.createElement(He.Fragment,null,He.createElement(Tme,{height:this.props.height,resizerLineHeight:this.context.tableHeight,onColumnResizeEnd:this.props.onColumnResizeEnd,width:this.props.width,minWidth:this.props.minWidth,maxWidth:this.props.maxWidth,columnKey:this.props.columnKey,touchEnabled:this.props.touchEnabled,isRTL:this.context.isRTL}),a)}}]),n}(He.PureComponent);pE.contextType=gy;pE.propTypes={columnKey:Be.oneOfType([Be.string,Be.number]),minWidth:Be.number,maxWidth:Be.number,width:Be.number,touchEnabled:Be.bool,isRTL:Be.bool,onColumnResizeEnd:Be.func.isRequired,height:Be.number};var $St=["cell"],FSt=["cell"],zSt=["height","width","columnIndex","isVisible","columnKey","isHeaderOrFooter","touchEnabled"];function JZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function o2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JZ(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JZ(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function BSt(e){var t=HSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function HSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var m9=function(e){Bi(n,e);var t=BSt(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"shouldComponentUpdate",value:function(o){if(o.isScrolling&&this.props.rowIndex===o.rowIndex&&this.props.isVisible===o.isVisible)return!1;if(!o.pureRendering)return!0;var r=this.props,i=r.cell,a=op(r,$St),s=o.cell,l=op(o,FSt);return!a_(a,l)||!i||!s||i.type!==s.type||!a_(i.props,s.props)}},{key:"render",value:function(){var o=this.props,r=o.height,i=o.width,a=o.isVisible,s=o.isHeaderOrFooter,l=o.touchEnabled,c=op(o,zSt),u={height:r,width:i};this.props.isRTL?u.right=c.left:u.left=c.left;var h=na(bn({"fixedDataTableCellLayout/main":!0,"fixedDataTableCellLayout/lastChild":c.lastChild,"fixedDataTableCellLayout/alignRight":c.align==="right","fixedDataTableCellLayout/alignCenter":c.align==="center","public/fixedDataTableCell/alignRight":c.align==="right","public/fixedDataTableCell/highlighted":c.highlighted,"public/fixedDataTableCell/main":!0}),c.className),d={touchEnabled:l,isVisible:a,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,cellGroupType:this.props.cellGroupType,columnIndex:this.props.columnIndex,columnKey:this.props.columnKey,height:this.props.height,width:this.props.width,left:this.props.left};c.rowIndex>=0&&(d.rowIndex=c.rowIndex);var f;this.props.isHeader&&(this.props.onColumnResizeEnd||this.props.onColumnReorderEnd)?this.props.onColumnResizeEnd&&this.props.onColumnReorderEnd?(d=o2(o2({},d),{},{minWidth:this.props.minWidth,maxWidth:this.props.maxWidth}),f=He.createElement(d_,Gr({},d,{onColumnReorderEnd:this.props.onColumnReorderEnd}),He.createElement(pE,{onColumnResizeEnd:this.props.onColumnResizeEnd},c.cell))):this.props.onColumnReorderEnd?f=He.createElement(d_,Gr({},d,{onColumnReorderEnd:this.props.onColumnReorderEnd}),c.cell):(d=o2(o2({},d),{},{minWidth:this.props.minWidth,maxWidth:this.props.maxWidth}),f=He.createElement(pE,Gr({},d,{onColumnResizeEnd:this.props.onColumnResizeEnd}),c.cell)):He.isValidElement(c.cell)?f=He.cloneElement(c.cell,d):typeof c.cell=="function"?f=c.cell(d):f=He.createElement(dE,d,c.cell);var m=s?"columnheader":"gridcell";return He.createElement("div",{className:h,style:u,role:m},f)}}]),n}(He.Component);xt(m9,"propTypes_DISABLED_FOR_PERFORMANCE",{isScrolling:Be.bool,align:Be.oneOf(["left","center","right"]),className:Be.string,highlighted:Be.bool,width:Be.number.isRequired,minWidth:Be.number,maxWidth:Be.number,height:Be.number.isRequired,cell:Be.oneOfType([Be.string,Be.element,Be.func]),columnKey:Be.oneOfType([Be.string,Be.number]),rowIndex:Be.number.isRequired,left:Be.number,pureRendering:Be.bool,touchEnabled:Be.bool,isHeaderOrFooter:Be.bool,isRTL:Be.bool,isVisible:Be.bool.isRequired,onColumnResizeEnd:Be.func,onColumnReorderEnd:Be.func,isHeader:Be.bool,cellGroupType:Be.oneOf([wn.FIXED,wn.FIXED_RIGHT,wn.SCROLLABLE])});xt(m9,"defaultProps",{align:"left",highlighted:!1});var WSt=_me(m9),VSt=["offsetLeft"];function Mme(e){var t=USt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function USt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Eme=function(e){Bi(n,e);var t=Mme(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),xt(At(r),"_renderCell",function(i,a,s,l,c,u,h){var d=s.cellClassName,f=s.pureRendering||!1,m=s.isReorderable?r.props.onColumnReorderEndCallback:null,p=s.isResizable?r.props.onColumnResizeEndCallback:null;return He.createElement(WSt,{columnIndex:s.index,isScrolling:r.props.isScrolling,isHeaderOrFooter:r.props.isHeaderOrFooter,isHeader:r.props.isHeader,isGroupHeader:r.props.isGroupHeader,align:s.align,className:d,height:a,key:u,maxWidth:s.maxWidth,minWidth:s.minWidth,touchEnabled:r.props.touchEnabled,onColumnResizeEnd:p,onColumnReorderEnd:m,rowIndex:i,columnKey:s.columnKey,width:s.width,left:c,cell:l,pureRendering:f,isRTL:r.props.isRTL,cellGroupType:r.props.cellGroupType,isVisible:r.props.isVisible&&h})}),r._initialRender=!0,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"render",value:function(){for(var o=this.props,r=o.columns,i=new Array(r.length),a=ET(r),s=0,l=0,c=r.length;l<c;l++){var u=r[l].props,h=r[l].template,d=u.allowCellsRecycling,f=s-o.left<=o.width&&s-o.left+u.width>=0;if(!d||f){var m=u.columnKey||"cell_"+l;i[l]=this._renderCell(o.rowIndex,o.rowHeight,u,h,s,m,f)}s+=u.width}var p={height:o.height,position:"absolute",width:a,zIndex:o.zIndex};return fy(p,-1*o.left,0,this._initialRender,this.props.isRTL),He.createElement("div",{className:bn("fixedDataTableCellGroupLayout/cellGroup"),style:p},i)}}]),n}(He.Component);xt(Eme,"propTypes_DISABLED_FOR_PERFORMANCE",{columns:Be.array.isRequired,isScrolling:Be.bool,left:Be.number,height:Be.number.isRequired,cellGroupWrapperHeight:Be.number,rowHeight:Be.number.isRequired,rowIndex:Be.number.isRequired,width:Be.number.isRequired,zIndex:Be.number.isRequired,touchEnabled:Be.bool,isHeaderOrFooter:Be.bool,isRTL:Be.bool,onColumnResizeEndCallback:Be.func,onColumnReorderEndCallback:Be.func,isHeader:Be.bool,isVisible:Be.bool.isRequired});var ow=function(e){Bi(n,e);var t=Mme(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"shouldComponentUpdate",value:function(o){return!(o.isScrolling&&this.props.rowIndex===o.rowIndex&&this.props.left===o.left&&this.props.offsetLeft===o.offsetLeft&&this.props.isVisible===o.isVisible)}},{key:"render",value:function(){var o=this.props,r=o.offsetLeft,i=op(o,VSt),a={height:i.cellGroupWrapperHeight||i.height,width:i.width};return this.props.isRTL?a.right=r:a.left=r,He.createElement("div",{style:a,className:bn("fixedDataTableCellGroupLayout/cellGroupWrapper")},He.createElement(Eme,i))}}]),n}(He.Component);xt(ow,"propTypes_DISABLED_FOR_PERFORMANCE",{isScrolling:Be.bool,height:Be.number.isRequired,offsetLeft:Be.number,left:Be.number,zIndex:Be.number.isRequired});xt(ow,"defaultProps",{left:0,offsetLeft:0});var GSt=["offsetTop","zIndex"];function Ame(e){var t=qSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function qSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var YSt=1,Pme=function(e){Bi(n,e);var t=Ame(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"mouseLeaveIndex",null),xt(At(o),"_getRowExpanded",function(s){if(o.props.rowExpanded){var l={rowIndex:o.props.index,height:s,width:o.props.width},c;return He.isValidElement(o.props.rowExpanded)?c=He.cloneElement(o.props.rowExpanded,l):typeof o.props.rowExpanded=="function"&&(c=o.props.rowExpanded(l)),c}}),xt(At(o),"_renderColumnsLeftShadow",function(s){var l=bn({"fixedDataTableRowLayout/fixedColumnsDivider":s>0,"fixedDataTableRowLayout/columnsShadow":o.props.scrollLeft>0,"public/fixedDataTableRow/fixedColumnsDivider":s>0,"public/fixedDataTableRow/columnsShadow":o.props.scrollLeft>0}),c=o.props.cellGroupWrapperHeight?o.props.cellGroupWrapperHeight-YSt:o.props.height,u={left:s,height:c};return o.props.isRTL&&(u.right=s,u.left="auto"),He.createElement("div",{className:l,style:u})}),xt(At(o),"_renderFixedRightColumnsShadow",function(s){var l=bn("fixedDataTableRowLayout/columnsShadow","fixedDataTableRowLayout/columnsRightShadow","fixedDataTableRowLayout/fixedColumnsDivider","public/fixedDataTableRow/columnsShadow","public/fixedDataTableRow/columnsRightShadow","public/fixedDataTableRow/fixedColumnsDivider"),c={height:o.props.height,left:s};return o.props.isRTL&&(c.right=s,c.left="auto"),He.createElement("div",{className:l,style:c})}),xt(At(o),"_renderColumnsRightShadow",function(s){if(Math.ceil(o.props.scrollLeft+o.props.width)<Math.floor(s)){var l=bn("fixedDataTableRowLayout/columnsShadow","fixedDataTableRowLayout/columnsRightShadow","public/fixedDataTableRow/columnsShadow","public/fixedDataTableRow/columnsRightShadow"),c={height:o.props.height};return He.createElement("div",{className:l,style:c})}}),xt(At(o),"_onClick",function(s){o.props.onClick(s,o.props.index)}),xt(At(o),"_onContextMenu",function(s){o.props.onContextMenu(s,o.props.index)}),xt(At(o),"_onDoubleClick",function(s){o.props.onDoubleClick(s,o.props.index)}),xt(At(o),"_onMouseUp",function(s){o.props.onMouseUp(s,o.props.index)}),xt(At(o),"_onMouseDown",function(s){o.props.onMouseDown(s,o.props.index)}),xt(At(o),"_onMouseEnter",function(s){o.mouseLeaveIndex=o.props.index,o.props.onMouseEnter&&o.props.onMouseEnter(s,o.props.index)}),xt(At(o),"_onMouseLeave",function(s){o.mouseLeaveIndex===null&&(o.mouseLeaveIndex=o.props.index),o.props.onMouseLeave(s,o.mouseLeaveIndex),o.mouseLeaveIndex=null}),xt(At(o),"_onTouchStart",function(s){o.props.onTouchStart(s,o.props.index)}),xt(At(o),"_onTouchEnd",function(s){o.props.onTouchEnd(s,o.props.index)}),xt(At(o),"_onTouchMove",function(s){o.props.onTouchMove(s,o.props.index)}),o}return Or(n,[{key:"shouldComponentUpdate",value:function(o){return o.isScrolling?o.visible?this.props.visible!==o.visible?!0:!(this.props.index===o.index&&this.props.scrollLeft===o.scrollLeft):!1:!0}},{key:"render",value:function(){var o=this.props.subRowHeight||0,r={width:this.props.width,height:this.props.height+o},i=bn({"fixedDataTableRowLayout/main":!0,"public/fixedDataTableRow/main":!0,"public/fixedDataTableRow/highlighted":this.props.index%2===1,"public/fixedDataTableRow/odd":this.props.index%2===1,"public/fixedDataTableRow/even":this.props.index%2===0}),a=ET(this.props.fixedColumns),s=He.createElement(ow,{key:"fixed_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,left:0,width:a,zIndex:2,columns:this.props.fixedColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:wn.FIXED,isVisible:this.props.visible}),l=this._renderColumnsLeftShadow(a),c=ET(this.props.fixedRightColumns),u=this.props.showScrollbarY?this.props.scrollbarYWidth:0,h=He.createElement(ow,{key:"fixed_right_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,offsetLeft:this.props.width-c-u,width:c,zIndex:2,columns:this.props.fixedRightColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:wn.FIXED_RIGHT,isVisible:this.props.visible}),d=c?this._renderFixedRightColumnsShadow(this.props.width-c-u-5):null,f=He.createElement(ow,{key:"scrollable_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,align:"right",left:this.props.scrollLeft,offsetLeft:a,width:this.props.width-a-c-u,zIndex:0,columns:this.props.scrollableColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:wn.SCROLLABLE,isVisible:this.props.visible}),m=ET(this.props.scrollableColumns),p=this._renderColumnsRightShadow(a+m),y=this._getRowExpanded(o),S={height:o,top:this.props.height,width:this.props.width},R=null;if(this.props.showScrollbarY){var $={width:u,height:this.props.height,left:this.props.isRTL?2:this.props.width-u-2};R=He.createElement("div",{style:$,className:bn("public/fixedDataTable/scrollbarSpacer")})}return He.createElement("div",Gr({className:na(i,this.props.className),role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.attributes,{onClick:this.props.onClick?this._onClick:null,onContextMenu:this.props.onContextMenu?this._onContextMenu:null,onDoubleClick:this.props.onDoubleClick?this._onDoubleClick:null,onMouseDown:this.props.onMouseDown?this._onMouseDown:null,onMouseUp:this.props.onMouseUp?this._onMouseUp:null,onMouseEnter:this.props.onMouseEnter||this.props.onMouseLeave?this._onMouseEnter:null,onMouseLeave:this.props.onMouseLeave?this._onMouseLeave:null,onTouchStart:this.props.onTouchStart?this._onTouchStart:null,onTouchEnd:this.props.onTouchEnd?this._onTouchEnd:null,onTouchMove:this.props.onTouchMove?this._onTouchMove:null,style:r}),He.createElement("div",{className:bn("fixedDataTableRowLayout/body")},s,f,l,h,d,R),y&&He.createElement("div",{className:bn("fixedDataTableRowLayout/rowExpanded"),style:S},y),p)}}]),n}(He.Component);xt(Pme,"propTypes",{isScrolling:Be.bool,fixedColumns:Be.array.isRequired,fixedRightColumns:Be.array.isRequired,height:Be.number.isRequired,cellGroupWrapperHeight:Be.number,subRowHeight:Be.number,rowExpanded:Be.oneOfType([Be.element,Be.func]),index:Be.number.isRequired,scrollableColumns:Be.array.isRequired,scrollLeft:Be.number.isRequired,width:Be.number.isRequired,onClick:Be.func,onContextMenu:Be.func,onDoubleClick:Be.func,onColumnReorderEndCallback:Be.func,touchEnabled:Be.bool,isHeaderOrFooter:Be.bool,ariaRowIndex:Be.number,isRTL:Be.bool,attributes:Be.object,onColumnResizeEndCallback:Be.func,isHeader:Be.bool,isGroupHeader:Be.bool,scrollToX:Be.func});var rw=function(e){Bi(n,e);var t=Ame(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),r._initialRender=!0,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"shouldComponentUpdate",value:function(o){return!o.isScrolling||this.props.visible!==o.visible?!0:o.visible?!(o.isScrolling&&this.props.index===o.index&&this.props.offsetTop===o.offsetTop&&this.props.scrollLeft===o.scrollLeft):!1}},{key:"render",value:function(){var o=this.props,r=o.offsetTop,i=o.zIndex,a=op(o,GSt),s={width:this.props.width,height:this.props.height,zIndex:i||0,visibility:a.visible?"visible":"hidden"};return fy(s,0,r,this._initialRender,this.props.isRTL),He.createElement("div",{style:s,className:bn("fixedDataTableRowLayout/rowWrapper")},He.createElement(Pme,a))}}]),n}(He.Component);xt(rw,"propTypes",{isScrolling:Be.bool,height:Be.number.isRequired,zIndex:Be.number,offsetTop:Be.number.isRequired,visible:Be.bool.isRequired,width:Be.number.isRequired});function XSt(e){var t=ZSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function ZSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ome=function(e){Bi(n,e);var t=XSt(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),r._staticRowArray=[],r._initialRender=!0,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillUnmount",value:function(){this._staticRowArray.length=0}},{key:"render",value:function(){var o=this.props,r=o.offsetTop,i=o.rowOffsets,a=o.scrollTop,s=o.isScrolling,l=o.rowsToRender;l=l||[],s?this._staticRowArray.length=Math.max(this._staticRowArray.length,l.length):this._staticRowArray.length=l.length;for(var c=1e6,u=r-a%c,h=0;h<this._staticRowArray.length;h++){var d,f=zCt(l[h],(d=this._staticRowArray[h])===null||d===void 0?void 0:d.props.index);if(nw(f)||!wm(f,0,this.props.rowSettings.rowsCount)){this._staticRowArray[h]=null;continue}var m=i[f]-Math.floor(a/c)*c;this._staticRowArray[h]=this.renderRow({rowIndex:f,key:h,rowOffsetTop:m})}var p={position:"relative"};fy(p,0,u,!1);var y=this._staticRowArray.slice().sort(this.rowSortComparator);return He.createElement("div",{style:p},y)}},{key:"renderRow",value:function(o){var r=o.rowIndex,i=o.key,a=o.rowOffsetTop,s=this.props,l=s.rowClassNameGetter||oa,c={};c.height=this.props.rowSettings.rowHeightGetter(r),c.subRowHeight=this.props.rowSettings.subRowHeightGetter(r),c.offsetTop=a,c.key=s.rowKeyGetter?s.rowKeyGetter(r):i,c.attributes=s.rowSettings.rowAttributesGetter&&s.rowSettings.rowAttributesGetter(r);var u=r===s.rowSettings.rowsCount-1&&s.showLastRowBorder;c.className=na(l(r),bn("public/fixedDataTable/bodyRow"),bn({"fixedDataTableLayout/hasBottomBorder":u,"public/fixedDataTable/hasBottomBorder":u}));var h=wm(r,this.props.firstViewportRowIndex,this.props.endViewportRowIndex);return He.createElement(rw,Gr({key:i,index:r,ariaRowIndex:r+s.ariaRowIndexOffset,isScrolling:s.isScrolling,width:s.width,rowExpanded:s.rowExpanded,scrollLeft:Math.round(s.scrollLeft),fixedColumns:s.fixedColumns,fixedRightColumns:s.fixedRightColumns,scrollableColumns:s.scrollableColumns,onClick:s.onRowClick,onContextMenu:s.onRowContextMenu,onDoubleClick:s.onRowDoubleClick,onMouseDown:s.onRowMouseDown,onMouseUp:s.onRowMouseUp,onMouseEnter:s.onRowMouseEnter,onMouseLeave:s.onRowMouseLeave,onTouchStart:s.onRowTouchStart,onTouchEnd:s.onRowTouchEnd,onTouchMove:s.onRowTouchMove,showScrollbarY:s.showScrollbarY,scrollbarYWidth:s.scrollbarYWidth,isRTL:s.isRTL,visible:h},c))}},{key:"rowSortComparator",value:function(o,r){var i,a;return((i=o==null?void 0:o.props.ariaRowIndex)!==null&&i!==void 0?i:-1)-((a=r==null?void 0:r.props.ariaRowIndex)!==null&&a!==void 0?a:-1)}}]),n}(He.Component);xt(Ome,"propTypes",{ariaRowIndexOffset:Be.number,isScrolling:Be.bool,firstViewportRowIndex:Be.number.isRequired,endViewportRowIndex:Be.number.isRequired,fixedColumns:Be.array.isRequired,fixedRightColumns:Be.array.isRequired,height:Be.number.isRequired,offsetTop:Be.number.isRequired,onRowClick:Be.func,onRowContextMenu:Be.func,onRowDoubleClick:Be.func,onRowMouseDown:Be.func,onRowMouseUp:Be.func,onRowMouseEnter:Be.func,onRowMouseLeave:Be.func,onRowTouchStart:Be.func,onRowTouchEnd:Be.func,onRowTouchMove:Be.func,rowClassNameGetter:Be.func,rowExpanded:Be.oneOfType([Be.element,Be.func]),rowOffsets:Be.object.isRequired,rowKeyGetter:Be.func,rowSettings:Be.shape({rowAttributesGetter:Be.func,rowHeightGetter:Be.func,rowsCount:Be.number.isRequired,subRowHeightGetter:Be.func}),rowsToRender:Be.array.isRequired,scrollLeft:Be.number.isRequired,scrollTop:Be.number.isRequired,scrollableColumns:Be.array.isRequired,showLastRowBorder:Be.bool,showScrollbarY:Be.bool,width:Be.number.isRequired,isRTL:Be.bool});var QZ=1.6,KSt=1.6,JSt=325,y1=100,QSt=function(){function e(t,n,o,r,i){Pr(this,e),this._dragAnimationId=null,this._trackerId=null,this._deltaX=0,this._deltaY=0,this._lastTouchX=0,this._lastTouchY=0,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),this._autoScrollTimestamp=Date.now(),typeof n!="function"&&(n=n?oa.thatReturnsTrue:oa.thatReturnsFalse),typeof o!="function"&&(o=o?oa.thatReturnsTrue:oa.thatReturnsFalse),this._handleScrollX=n,this._handleScrollY=o,this._preventDefault=r,this._stopPropagation=i,this._onTouchScrollCallback=t,this._didTouchMove=this._didTouchMove.bind(this),this._track=this._track.bind(this),this._autoScroll=this._autoScroll.bind(this),this._startAutoScroll=this._startAutoScroll.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this)}return Or(e,[{key:"onTouchStart",value:function(t){this._lastTouchX=t.touches[0].pageX,this._lastTouchY=t.touches[0].pageY,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),clearInterval(this._trackerId),this._trackerId=setInterval(this._track,y1),this._stopPropagation&&t.stopPropagation()}},{key:"onTouchEnd",value:function(t){clearInterval(this._trackerId),this._trackerId=null,Dh(this._startAutoScroll),this._stopPropagation&&t.stopPropagation()}},{key:"onTouchCancel",value:function(t){clearInterval(this._trackerId),this._trackerId=null,this._stopPropagation&&t.stopPropagation()}},{key:"onTouchMove",value:function(t){this._preventDefault&&t.preventDefault();var n=t.touches[0].pageX,o=t.touches[0].pageY;this._deltaX=QZ*(this._lastTouchX-n),this._deltaY=QZ*(this._lastTouchY-o);var r=this._handleScrollX(this._deltaX,this._deltaY),i=this._handleScrollY(this._deltaY,this._deltaX);if(!(!r&&!i)){r?this._lastTouchX=n:this._deltaX=0,i?this._lastTouchY=o:this._deltaY=0,t.defaultPrevented||t.preventDefault();var a=!1;(Math.abs(this._deltaX)>2||Math.abs(this._deltaY)>2)&&(this._stopPropagation&&t.stopPropagation(),a=!0),a===!0&&this._dragAnimationId===null&&(this._dragAnimationId=Dh(this._didTouchMove))}}},{key:"_didTouchMove",value:function(){this._dragAnimationId=null,this._onTouchScrollCallback(this._deltaX,this._deltaY),this._accumulatedDeltaX+=this._deltaX,this._accumulatedDeltaY+=this._deltaY,this._deltaX=0,this._deltaY=0}},{key:"_track",value:function(){var t=Date.now(),n=t-this._lastFrameTimestamp,o=this._velocityX,r=this._velocityY,i=.8;n<y1&&(i*=n/y1),o===0&&r===0&&(i=1),this._velocityX=i*(y1*this._accumulatedDeltaX/(1+n)),i<1&&(this._velocityX+=(1-i)*o),this._velocityY=i*(y1*this._accumulatedDeltaY/(1+n)),i<1&&(this._velocityY+=(1-i)*r),this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=t}},{key:"_startAutoScroll",value:function(){this._autoScrollTimestamp=Date.now(),(this._deltaX>0||this.deltaY>0)&&this._didTouchMove(),this._track(),this._autoScroll()}},{key:"_autoScroll",value:function(){var t=Date.now()-this._autoScrollTimestamp,n=KSt*Math.exp(-t/JSt),o=n*this._velocityX,r=n*this._velocityY;(Math.abs(o)<=5||!this._handleScrollX(o,r))&&(o=0),(Math.abs(r)<=5||!this._handleScrollY(r,o))&&(r=0),(o!==0||r!==0)&&(this._onTouchScrollCallback(o,r),Dh(this._autoScroll))}}]),e}();function ekt(e){var t=tkt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function tkt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var r2=25,g9=function(e){Bi(n,e);var t=ekt(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),xt(At(r),"_shouldHandleTouchX",function(i){return r.props.touchScrollEnabled&&r._shouldHandleWheelX(i)}),xt(At(r),"_shouldHandleTouchY",function(i){return r.props.touchScrollEnabled&&r._shouldHandleWheelY(i)}),xt(At(r),"_shouldHandleWheelX",function(i){var a=r.props,s=a.maxScrollX,l=a.scrollFlags,c=a.scrollX,u=l.overflowX;return u==="hidden"||(i=Math.round(i),i===0)?!1:i<0&&c>0||i>=0&&c<s}),xt(At(r),"_shouldHandleWheelY",function(i){var a=r.props,s=a.maxScrollY,l=a.scrollFlags,c=a.scrollY,u=l.overflowY;return u==="hidden"||i===0||(i=Math.round(i),i===0)?!1:i<0&&c>0||i>=0&&c<s}),xt(At(r),"_reportContentHeight",function(){var i=av(r.props),a=i.contentHeight,s=r.props.onContentHeightChange;a!==r._contentHeight&&s&&s(a),r._contentHeight=a}),xt(At(r),"_renderRows",function(i,a,s,l,c,u){var h=Gm(r.props),d=h.scrollEnabledY,f=r.props;return He.createElement(Ome,{ariaRowIndexOffset:u,isScrolling:f.scrolling,fixedColumns:a,fixedRightColumns:s,firstViewportRowIndex:f.firstRowIndex,endViewportRowIndex:f.endRowIndex,height:c,offsetTop:i,onRowClick:f.onRowClick,onRowContextMenu:f.onRowContextMenu,onRowDoubleClick:f.onRowDoubleClick,onRowMouseUp:f.onRowMouseUp,onRowMouseDown:f.onRowMouseDown,onRowMouseEnter:f.onRowMouseEnter,onRowMouseLeave:f.onRowMouseLeave,onRowTouchStart:f.touchScrollEnabled?f.onRowTouchStart:null,onRowTouchEnd:f.touchScrollEnabled?f.onRowTouchEnd:null,onRowTouchMove:f.touchScrollEnabled?f.onRowTouchMove:null,rowClassNameGetter:f.rowClassNameGetter,rowExpanded:f.rowExpanded,rowKeyGetter:f.rowKeyGetter,rowSettings:f.rowSettings,scrollLeft:f.scrollX,scrollTop:f.scrollY,scrollableColumns:l,showLastRowBorder:!0,width:f.tableSize.width,rowsToRender:f.rows,rowOffsets:f.rowOffsets,showScrollbarY:d,scrollbarYWidth:f.scrollbarYWidth,isRTL:f.isRTL})}),xt(At(r),"_onRef",function(i){r._divRef=i,r._wheelHandler&&(r.props.stopReactWheelPropagation?r._wheelHandler.setRoot(i):r._wheelHandler.setRoot(null))}),xt(At(r),"_onScroll",function(i,a){var s=r.props,l=s.maxScrollX,c=s.maxScrollY,u=s.onHorizontalScroll,h=s.onVerticalScroll,d=s.scrollActions,f=s.scrollFlags,m=s.scrollX,p=s.scrollY,y=f.overflowX,S=f.overflowY,R=m,$=p;if(Math.abs(a)>Math.abs(i)&&S!=="hidden")$+=a,$=$<0?0:$,$=$>c?c:$,(!h||h($))&&d.scrollToY($);else if(i&&y!=="hidden"){R+=i,R=R<0?0:R,R=R>l?l:R;var j=Math.round(R);(!u||u(j))&&d.scrollToX(j)}}),xt(At(r),"_scrollTo",function(i,a){r.props.scrollActions.scrollToX(i),r.props.scrollActions.scrollToY(a)}),xt(At(r),"_didScroll",function(i){var a=r.props,s=a.onScrollStart,l=a.scrollX,c=a.scrollY,u=a.onHorizontalScroll,h=a.onVerticalScroll,d=a.tableSize.ownerHeight,f=a.scrolling,m=i.endRowIndex,p=i.firstRowIndex,y=i.scrollX,S=i.scrollY,R=i.tableSize.ownerHeight,$=i.scrolling,j=d!==R&&!(WZ(d)&&WZ(R)),E=l!==y,A=c!==S;!j&&!E&&!A||(!$&&f&&s&&s(y,S,p,m),E&&u&&u(l),A&&h&&h(c),r._didScrollStop())}),xt(At(r),"_didScrollStopSync",function(){var i=r.props,a=i.endRowIndex,s=i.firstRowIndex,l=i.onScrollEnd,c=i.scrollActions,u=i.scrollX,h=i.scrollY,d=i.scrolling;d&&(c.stopScroll(),l&&l(u,h,s,a))}),r._didScrollStop=uCt(r._didScrollStopSync,200,At(r)),r._onKeyDown=r._onKeyDown.bind(At(r)),r._setupHandlers(),r}return Or(n,[{key:"componentWillUnmount",value:function(){this._cleanupHandlers(),this._didScrollStop.reset(),this._didScrollStopSync()}},{key:"_setupHandlers",value:function(){this._wheelHandler||(this._wheelHandler=new tme(this._onScroll,this._shouldHandleWheelX,this._shouldHandleWheelY,this.props.isRTL,this.props.stopScrollDefaultHandling,this.props.stopScrollPropagation)),this._touchHandler||(this._touchHandler=new QSt(this._onScroll,this._shouldHandleTouchX,this._shouldHandleTouchY,this.props.stopScrollDefaultHandling,this.props.stopScrollPropagation)),this._divRef&&this._divRef.addEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this.props.touchScrollEnabled&&this._divRef&&this._divRef.addEventListener("touchmove",this._touchHandler.onTouchMove,{passive:!1})}},{key:"_cleanupHandlers",value:function(){this._wheelHandler&&(this._divRef&&this._divRef.removeEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this._wheelHandler=null),this._touchHandler&&(this._divRef&&this._divRef.removeEventListener("touchmove",this._touchHandler.onTouchMove,{passive:!1}),this._touchHandler=null)}},{key:"_onKeyDown",value:function(o){var r=av(this.props),i=r.scrollbarYHeight;if(this.props.keyboardPageEnabled)switch(o.key){case"PageDown":this._onScroll(0,i),o.preventDefault();break;case"PageUp":this._onScroll(0,i*-1),o.preventDefault();break}if(this.props.keyboardScrollEnabled)switch(o.key){case"ArrowDown":this._onScroll(0,r2),o.preventDefault();break;case"ArrowUp":this._onScroll(0,r2*-1),o.preventDefault();break;case"ArrowRight":this._onScroll(r2,0),o.preventDefault();break;case"ArrowLeft":this._onScroll(r2*-1,0),o.preventDefault();break}}},{key:"shouldComponentUpdate",value:function(o){return!a_(this.props,o)}},{key:"componentDidMount",value:function(){this._setupHandlers(),this._reportContentHeight(),this._reportScrollBarsUpdates()}},{key:"componentDidUpdate",value:function(o){this._didScroll(o),this._reportContentHeight(),this._reportScrollBarsUpdates()}},{key:"_reportScrollBarsUpdates",value:function(){var o=av(this.props),r=o.bodyOffsetTop,i=o.scrollbarXOffsetTop,a=o.visibleRowsHeight,s=this.props,l=s.tableSize.width,c=s.scrollContentHeight,u=s.scrollY,h=s.scrollX,d={viewportHeight:a,contentHeight:c,scrollbarYOffsetTop:r,scrollY:u,viewportWidth:l,contentWidth:l+this.props.maxScrollX,scrollbarXOffsetTop:i,scrollX:h,scrollTo:this._scrollTo,scrollToX:this.props.scrollActions.scrollToX,scrollToY:this.props.scrollActions.scrollToY};a_(this.previousScrollState,d)||(this.props.onScrollBarsUpdate(d),this.previousScrollState=d)}},{key:"render",value:function(){var o=pCt(this.props),r=o.ariaGroupHeaderIndex,i=o.ariaHeaderIndex,a=o.ariaFooterIndex,s=o.ariaRowCount,l=o.ariaRowIndexOffset,c=$Ct(this.props),u=c.fixedColumnGroups,h=c.fixedColumns,d=c.fixedRightColumnGroups,f=c.fixedRightColumns,m=c.scrollableColumnGroups,p=c.scrollableColumns,y=av(this.props),S=y.bodyHeight,R=y.bodyOffsetTop,$=y.componentHeight,j=y.footOffsetTop,E=y.scrollbarXOffsetTop,A=y.visibleRowsHeight,D=this.props,N=D.className,W=D.elementHeights,P=D.gridAttributesGetter,_=D.maxScrollY,g=D.onColumnReorderEndCallback,T=D.onColumnResizeEndCallback,M=D.scrollContentHeight,O=D.scrollX,H=D.scrollY,G=D.scrolling,V=D.tableSize,z=D.touchScrollEnabled,I=D.scrollbarYWidth,C=V.ownerHeight,k=V.width,v=W.cellGroupWrapperHeight,w=W.footerHeight,b=W.groupHeaderHeight,x=W.headerHeight,F=Gm(this.props),B=F.scrollEnabledX,U=F.scrollEnabledY,X=P&&P(),ee;b>0&&(ee=He.createElement(rw,{key:"group_header",ariaRowIndex:r,isHeaderOrFooter:!0,isScrolling:G,className:na(bn("fixedDataTableLayout/header"),bn("public/fixedDataTable/header")),width:k,height:b,cellGroupWrapperHeight:v,index:0,zIndex:1,offsetTop:0,scrollLeft:O,fixedColumns:u,fixedRightColumns:d,scrollableColumns:m,visible:!0,touchEnabled:z,onColumnResizeEndCallback:T,onColumnReorderEndCallback:g,showScrollbarY:U,scrollbarYWidth:I,isRTL:this.props.isRTL,isHeader:!0,isGroupHeader:!0}));var J;U&&(J=this.props.scrollbarY);var q;B&&(q=this.props.scrollbarX);var Z=null;w&&(Z=He.createElement(rw,{key:"footer",ariaRowIndex:a,isHeaderOrFooter:!0,isScrolling:G,className:na(bn("fixedDataTableLayout/footer"),bn("public/fixedDataTable/footer")),width:k,height:w,index:-1,zIndex:1,offsetTop:j,visible:!0,fixedColumns:h.footer,fixedRightColumns:f.footer,scrollableColumns:p.footer,scrollLeft:O,showScrollbarY:U,scrollbarYWidth:I,isRTL:this.props.isRTL}));var K=this._renderRows(R,h.cell,f.cell,p.cell,S,l),re=He.createElement(rw,{key:"header",ariaRowIndex:i,isHeaderOrFooter:!0,isScrolling:G,className:na(bn("fixedDataTableLayout/header"),bn("public/fixedDataTable/header")),width:k,height:x,cellGroupWrapperHeight:v,index:-1,zIndex:1,offsetTop:b,scrollLeft:O,visible:!0,fixedColumns:h.header,fixedRightColumns:f.header,scrollableColumns:p.header,touchEnabled:z,onColumnResizeEndCallback:T,onColumnReorderEndCallback:g,showScrollbarY:U,scrollbarYWidth:I,isRTL:this.props.isRTL,isHeader:!0}),ie;H&&(ie=He.createElement("div",{className:na(bn("fixedDataTableLayout/topShadow"),bn("public/fixedDataTable/topShadow")),style:{top:R}}));var te=C&&C<$&&M>A,ne;(te||H<_)&&(ne=He.createElement("div",{className:na(bn("fixedDataTableLayout/bottomShadow"),bn("public/fixedDataTable/bottomShadow")),style:{top:j}}));var oe=null;(this.props.keyboardPageEnabled||this.props.keyboardScrollEnabled)&&(oe=0);var ce=N;return this.props.isRTL&&(ce=na(ce,"fixedDataTable_isRTL")),He.createElement("div",Gr({className:na(ce,bn("fixedDataTableLayout/main"),bn("public/fixedDataTable/main")),role:"grid","aria-rowcount":s},X,{tabIndex:oe,onKeyDown:this._onKeyDown,onTouchStart:z?this._touchHandler.onTouchStart:null,onTouchEnd:z?this._touchHandler.onTouchEnd:null,onTouchCancel:z?this._touchHandler.onTouchCancel:null,ref:this._onRef,style:{height:$,width:k}}),He.createElement("div",{className:bn("fixedDataTableLayout/rowsContainer"),style:{height:E,width:k}},ee,re,K,Z,ie,ne),J,q)}}]),n}(He.Component);xt(g9,"propTypes",{width:Be.number.isRequired,height:Be.number,className:Be.string,maxHeight:Be.number,ownerHeight:Be.number,overflowX:Be.oneOf(["hidden","auto"]),overflowY:Be.oneOf(["hidden","auto"]),touchScrollEnabled:Be.bool,keyboardScrollEnabled:Be.bool,keyboardPageEnabled:Be.bool,scrollbarX:Be.node,scrollbarXHeight:Be.number,scrollbarY:Be.node,scrollbarYWidth:Be.number,onScrollBarsUpdate:Be.func,defaultScrollbars:Be.bool,showScrollbarX:Be.bool,showScrollbarY:Be.bool,onHorizontalScroll:Be.func,onVerticalScroll:Be.func,rowsCount:Be.number.isRequired,rowHeight:Be.number.isRequired,rowHeightGetter:Be.func,subRowHeight:Be.number,subRowHeightGetter:Be.func,rowExpanded:Be.oneOfType([Be.element,Be.func]),rowClassNameGetter:Be.func,rowKeyGetter:Be.func,groupHeaderHeight:Be.number,headerHeight:Be.number.isRequired,cellGroupWrapperHeight:Be.number,footerHeight:Be.number,scrollLeft:Be.number,scrollToColumn:Be.number,scrollTop:Be.number,isVerticalScrollExact:Be.bool,scrollToRow:Be.number,onScrollStart:Be.func,onScrollEnd:Be.func,stopReactWheelPropagation:Be.bool,stopScrollDefaultHandling:Be.bool,stopScrollPropagation:Be.bool,onContentHeightChange:Be.func,onRowClick:Be.func,onRowContextMenu:Be.func,onRowDoubleClick:Be.func,onRowMouseDown:Be.func,onRowMouseUp:Be.func,onRowMouseEnter:Be.func,onRowMouseLeave:Be.func,onRowTouchStart:Be.func,onRowTouchEnd:Be.func,onRowTouchMove:Be.func,onColumnResizeEndCallback:Be.func,onColumnReorderEndCallback:Be.func,isRTL:Be.bool,bufferRowCount:Be.number,elementHeights:Be.shape({cellGroupWrapperHeight:Be.number,footerHeight:Be.number,groupHeaderHeight:Be.number,headerHeight:Be.number}),gridAttributesGetter:Be.func,rowAttributesGetter:Be.func});xt(g9,"defaultProps",{elementHeights:{cellGroupWrapperHeight:void 0,footerHeight:0,groupHeaderHeight:0,headerHeight:0},keyboardScrollEnabled:!1,keyboardPageEnabled:!1,touchScrollEnabled:!1,stopScrollPropagation:!1});var nkt={get:function(){return H_t({reducer:X_t,devTools:process.env.NODE_ENV!=="production",middleware:function(e){return e({immutableCheck:!1,serializableCheck:!1})}})}},okt=q8,rkt=gS,ikt=xO,akt=xc,skt=mS,lkt=r_.exports,ckt=CO,ukt=Afe,dkt="[object Map]",pkt="[object Set]",hkt=Object.prototype,fkt=hkt.hasOwnProperty;function mkt(e){if(e==null)return!0;if(skt(e)&&(akt(e)||typeof e=="string"||typeof e.splice=="function"||lkt(e)||ukt(e)||ikt(e)))return!e.length;var t=rkt(e);if(t==dkt||t==pkt)return!e.size;if(ckt(e))return!okt(e).length;for(var n in e)if(fkt.call(e,n))return!1;return!0}var eK=mkt;function Dme(e){var t=gkt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function gkt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var vkt=function(e){Bi(n,e);var t=Dme(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"state",{}),xt(At(o),"_onScrollBarsUpdate",function(s){o.setState(s)}),xt(At(o),"_onVerticalScroll",function(s){o.state.scrollToY!==void 0&&o.state.scrollToY(s)}),xt(At(o),"_onHorizontalScroll",function(s){o.state.scrollToX!==void 0&&o.state.scrollToX(s)}),o}return Or(n,[{key:"render",value:function(){var o=!eK(this.state)&&He.createElement(fl,{size:this.state.viewportHeight,contentSize:this.state.contentHeight,onScroll:this._onVerticalScroll,verticalTop:this.state.scrollbarYOffsetTop,position:this.state.scrollY,touchEnabled:this.props.touchScrollEnabled,isRTL:this.props.isRTL}),r=!eK(this.state)&&He.createElement(Nme,{contentSize:this.state.contentWidth,offset:this.state.scrollbarXOffsetTop,onScroll:this._onHorizontalScroll,position:this.state.scrollX,size:this.state.viewportWidth,touchEnabled:this.props.touchScrollEnabled,isRTL:this.props.isRTL});return He.cloneElement(this.props.children,{onScrollBarsUpdate:this._onScrollBarsUpdate,scrollbarX:r,scrollbarY:o})}}]),n}(He.Component),Nme=function(e){Bi(n,e);var t=Dme(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){var o=this.props,r=o.offset,i=o.size,a={height:fl.SIZE,width:i},s={height:fl.SIZE,overflow:"hidden",width:i,top:r};return He.createElement("div",{className:na(bn("public/fixedDataTable/horizontalScrollbar")),style:a},He.createElement("div",{style:s},He.createElement(fl,Gr({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}}]),n}(He.PureComponent);xt(Nme,"propTypes",{contentSize:Be.number.isRequired,offset:Be.number.isRequired,onScroll:Be.func.isRequired,position:Be.number.isRequired,size:Be.number.isRequired,isRTL:Be.bool});var ykt=function(){return Bp([function(e){return av(e).componentHeight},function(e){return e.elementHeights.groupHeaderHeight},function(e){return e.scrollX},function(e){return e.maxScrollX},function(e){return vS(e).availableScrollWidth},function(e){return e.isRTL}],function(e,t,n,o,r,i){return{tableHeight:e,groupHeaderHeight:t,scrollX:n,maxScrollX:o,availableScrollWidth:r,isRTL:i}})},bkt=Dg,xkt=xc,wkt=Sf,_kt="[object String]";function Ckt(e){return typeof e=="string"||!xkt(e)&&wkt(e)&&bkt(e)==_kt}var Skt=Ckt;function kkt(e){return function(t){return t==null?void 0:t[e]}}var Tkt=kkt,Mkt=Tkt,Ekt=Mkt("length"),Akt=Ekt,Pkt="\\ud800-\\udfff",Okt="\\u0300-\\u036f",Dkt="\\ufe20-\\ufe2f",Nkt="\\u20d0-\\u20ff",Lkt=Okt+Dkt+Nkt,Ikt="\\ufe0e\\ufe0f",Rkt="\\u200d",jkt=RegExp("["+Rkt+Pkt+Lkt+Ikt+"]");function $kt(e){return jkt.test(e)}var Fkt=$kt,Lme="\\ud800-\\udfff",zkt="\\u0300-\\u036f",Bkt="\\ufe20-\\ufe2f",Hkt="\\u20d0-\\u20ff",Wkt=zkt+Bkt+Hkt,Vkt="\\ufe0e\\ufe0f",Ukt="["+Lme+"]",v6="["+Wkt+"]",y6="\\ud83c[\\udffb-\\udfff]",Gkt="(?:"+v6+"|"+y6+")",Ime="[^"+Lme+"]",Rme="(?:\\ud83c[\\udde6-\\uddff]){2}",jme="[\\ud800-\\udbff][\\udc00-\\udfff]",qkt="\\u200d",$me=Gkt+"?",Fme="["+Vkt+"]?",Ykt="(?:"+qkt+"(?:"+[Ime,Rme,jme].join("|")+")"+Fme+$me+")*",Xkt=Fme+$me+Ykt,Zkt="(?:"+[Ime+v6+"?",v6,Rme,jme,Ukt].join("|")+")",tK=RegExp(y6+"(?="+y6+")|"+Zkt+Xkt,"g");function Kkt(e){for(var t=tK.lastIndex=0;tK.test(e);)++t;return t}var Jkt=Kkt,Qkt=Akt,e2t=Fkt,t2t=Jkt;function n2t(e){return e2t(e)?t2t(e):Qkt(e)}var o2t=n2t,r2t=q8,i2t=gS,a2t=mS,s2t=Skt,l2t=o2t,c2t="[object Map]",u2t="[object Set]";function d2t(e){if(e==null)return 0;if(a2t(e))return s2t(e)?l2t(e):e.length;var t=i2t(e);return t==c2t||t==u2t?e.size:r2t(e).length}var P3=d2t,p2t=function(e){return{offset:e.offset,width:e.width,index:e.index,columnKey:e.columnKey}},i2=function(e){return{offset:e.offset,width:e.width,index:e.index,columnKey:e.columnKey}},h2t=function(){return Bp([function(e){return vS(e)},function(e,t){return t}],function(e,t){var n=e.fixedColumns,o=e.fixedRightColumns,r=e.scrollableColumns,i=e.fixedColumnGroups,a=e.fixedRightColumnGroups,s=e.scrollableColumnGroups,l=function(O){var H=n.length+r.length+o.length;if(O<0||O>=H||!Number.isInteger(O))throw"columnIndex must be an integer between 0 and ".concat(H-1," inclusive")},c=function(O){var H=i.length+s.length+a.length;if(O<0||O>=H||!Number.isInteger(O))throw"columnGroupIndex must be an integer between 0 and ".concat(H-1," inclusive")},u=function(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(H&&nw(O))&&O!==wn.FIXED&&O!==wn.FIXED_RIGHT&&O!==wn.SCROLLABLE)throw"Invalid CellGroupType"},h=function(O){return O<n.length?wn.FIXED:O<n.length+r.length?wn.SCROLLABLE:wn.FIXED_RIGHT},d=function(O){return O<i.length?wn.FIXED:O<i.length+s.length?wn.SCROLLABLE:wn.FIXED_RIGHT},f=function(O,H){if(H===wn.FIXED)return O;if(H===wn.SCROLLABLE)return O-n.length;if(H===wn.FIXED_RIGHT)return O-n.length-r.length},m=function(O,H){if(H===wn.FIXED)return O;if(H===wn.SCROLLABLE)return O-i.length;if(H===wn.FIXED_RIGHT)return O-i.length-s.length},p=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wn.SCROLLABLE;u(O);var H=D(O);return H.reduce(function(G,V){return G+V.width},0)},y=function(O,H){var G=D(H),V=f(O,H);return G[V]},S=function(O){l(O);var H=h(O),G=y(O,H);return p2t(G)},R=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(u(O,!0),nw(O))return n.length+r.length+o.length;var H=D(O);return H.length},$=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(u(O,!0),nw(O))return i.length+s.length+a.length;var H=N(O);return H.length},j=function(O,H){var G=N(H),V=m(O,H);return i2(G[V])},E=function(O){c(O);var H=d(O);return j(O,H)},A=function(O){l(O);var H=h(O),G=y(O,H).groupIdx,V=W(G);return i2(V)},D=function(O){if(O===wn.FIXED)return n;if(O===wn.FIXED_RIGHT)return o;if(O===wn.SCROLLABLE)return r;throw"Invalid cell group type"},N=function(O){if(O===wn.FIXED)return i;if(O===wn.FIXED_RIGHT)return a;if(O===wn.SCROLLABLE)return s;throw"Invalid cell group type"},W=function(O){var H=P3(i),G=P3(s),V=P3(a);if(wm(O,0,H))return i[O];if(wm(O,H,H+G))return s[O-H];if(wm(O,H+G,H+G+V))return a[O-H-G];throw"Invalid absolute column group index"},P=function(O,H){if(O.length===0)return{element:null,distanceFromOffset:null};for(var G=0,V=0;V!==O.length&&!(G>H);)G+=O[V].width,V++;return V=MO(V-1,0,O.length-1),{element:O[V],distanceFromOffset:O[V].width-(G-H)}},_=function(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wn.SCROLLABLE;u(H);var G=D(H),V=P(G,O),z=V.element,I=V.distanceFromOffset;return z&&(z=i2(z)),{column:z,distanceFromOffset:I}},g=function(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wn.SCROLLABLE;u(H);var G=N(H),V=P(G,O),z=V.element,I=V.distanceFromOffset;return z&&(z=i2(z)),{columnGroup:z,distanceFromOffset:I}},T=t.scrollToX,M=t.updateRowHeights;return{getColumn:S,getColumnGroup:E,getColumnGroupByChild:A,getColumnAtOffset:_,getColumnGroupAtOffset:g,getCellGroupWidth:p,getColumnCount:R,getColumnGroupCount:$,scrollToX:T,updateRowHeights:M}})};function nK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function O3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nK(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nK(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}var f2t=function(){var e=[],t=null,n=function(i){return e=e.concat(i),function(){var a=e.indexOf(i);e.splice(a,1)}},o=ykt(),r=h2t();return{getValue:Bp([function(i){return o(i)},function(i,a){return r(i,a)}],function(i,a){return t=O3(O3(O3({},i),a),{},{subscribe:n}),t}),notify:function(){e.forEach(function(i){return i(t)})}}};function oK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function a2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oK(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oK(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function m2t(e){var t=g2t();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function g2t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var zme=function(e){Bi(n,e);var t=m2t(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),r._initialize(o),r.fixedDataTableApi=f2t(),r.previousApiValue=null,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialize(this.props)}},{key:"componentWillUnmount",value:function(){this._cleanup()}},{key:"componentDidUpdate",value:function(){this.notifyApiValueChanges()}},{key:"_initialize",value:function(o){var r=this;if(!this.reduxStore){this.reduxStore=nkt.get(),this.reduxStore.dispatch(Z_t(o)),this.scrollActions=nCt(this.reduxStore,function(){return r.props}),this.unsubscribe=this.reduxStore.subscribe(this.onStoreUpdate.bind(this));var i={boundState:n.getBoundState(this.reduxStore),reduxStore:this.reduxStore,props:o};this.state?this.setState(i):this.state=i}}},{key:"_cleanup",value:function(){this.reduxStore&&(this.unsubscribe(),this.unsubscribe=null,this.reduxStore=null)}},{key:"getApi",value:function(){var o=this;return this.fixedDataTableApi.getValue(a2(a2({},this.props),this.reduxStore.getState()),a2(a2({},this.scrollActions),{},{updateRowHeights:function(r){return Mfe({updateRowHeights:tCt},o.reduxStore.dispatch).updateRowHeights(r)}}))}},{key:"notifyApiValueChanges",value:function(){var o=this.getApi();this.previousApiValue!==o&&(this.fixedDataTableApi.notify(),this.previousApiValue=o)}},{key:"render",value:function(){var o=this.getApi(),r=He.createElement(g9,Gr({},this.props,this.state.boundState,{scrollActions:this.scrollActions}));return this.props.defaultScrollbars?He.createElement(gy.Provider,{value:o},He.createElement(vkt,this.props,r)):He.createElement(gy.Provider,{value:o},r)}},{key:"onStoreUpdate",value:function(){var o=n.getBoundState(this.reduxStore);this.state.boundState.propsRevision===o.propsRevision&&this.setState({boundState:o})}}],[{key:"getDerivedStateFromProps",value:function(o,r){return zu(o.height!==void 0||o.maxHeight!==void 0,"You must set either a height or a maxHeight"),o===r.props?null:(r.reduxStore.dispatch(K_t({newProps:o,oldProps:r.props})),{boundState:n.getBoundState(r.reduxStore),props:o})}},{key:"getBoundState",value:function(o){var r=o.getState(),i=vx(r,["columnGroupElements","columnElements","elementHeights","elementTemplates","firstRowIndex","endRowIndex","maxScrollX","maxScrollY","propsRevision","rows","rowOffsets","rowSettings","scrollContentHeight","scrollFlags","scrollX","scrollY","scrolling","scrollJumpedX","scrollJumpedY","tableSize"]);return i}}]),n}(He.Component);xt(zme,"defaultProps",{defaultScrollbars:!0,scrollbarXHeight:fl.SIZE,scrollbarYWidth:fl.SIZE});var v2t=_me(zme);function y2t(e){var t=b2t();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function b2t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var zO=function(e){Bi(n,e);var t=y2t(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){if(process.env.NODE_ENV!=="production")throw new Error("Component <FixedDataTableColumn /> should never render");return null}}]),n}(He.Component);xt(zO,"__TableColumn__",!0);xt(zO,"propTypes",{align:Be.oneOf(["left","center","right"]),fixed:Be.bool,fixedRight:Be.bool,header:Be.oneOfType([Be.node,Be.func]),cell:Be.oneOfType([Be.node,Be.func]),footer:Be.oneOfType([Be.node,Be.func]),columnKey:Be.oneOfType([Be.string,Be.number]),width:Be.number.isRequired,minWidth:Be.number,maxWidth:Be.number,flexGrow:Be.number,isResizable:Be.bool,isReorderable:Be.bool,allowCellsRecycling:Be.bool,pureRendering:Be.bool,cellClassName:Be.string});xt(zO,"defaultProps",{allowCellsRecycling:!1,fixed:!1,fixedRight:!1});function x2t(e){var t=w2t();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function w2t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var v9=function(e){Bi(n,e);var t=x2t(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){if(process.env.NODE_ENV!=="production")throw new Error("Component <FixedDataTableColumnGroup /> should never render");return null}}]),n}(He.Component);xt(v9,"__TableColumnGroup__",!0);xt(v9,"propTypes",{align:Be.oneOf(["left","center","right"]),fixed:Be.bool,header:Be.oneOfType([Be.node,Be.func])});xt(v9,"defaultProps",{fixed:!1});const _2t=()=>typeof window>"u"||typeof document>"u"||!document.body||typeof window.innerWidth!="number"||typeof document.body.clientWidth!="number"?0:Math.max(0,window.innerWidth-document.body.clientWidth),C2t="#f4f4f8",S2t="#edeef1",k2t="#e3e5ea",T2t="#f9f9fb",M2t="#ffcb05",E2t="#1faff3",A2t="#e5e5e5",P2t="#5b6372",O2t="#3a4356",D2t="#3c3c42",N2t="#a3a3a3",L2t="#d0d3db",I2t="_headerCell_2qf2w_16",R2t="_noSort_2qf2w_29",j2t="_standard_2qf2w_29",$2t="_caret_2qf2w_33",F2t="_headerLabel_2qf2w_38",z2t="_icon_2qf2w_43",B2t="_numberIcon_2qf2w_50",H2t="_dateIcon_2qf2w_54",W2t="_textIcon_2qf2w_58",V2t="_booleanIcon_2qf2w_62",U2t="_sortIcon_2qf2w_66",G2t="_sortAscending_2qf2w_74",q2t="_sortDescending_2qf2w_78",Qp={athensGray:C2t,athensGrayDark:S2t,athensGrayDark2:k2t,athensGrayLight:T2t,defaultBrandColor:M2t,dodgerBlue:E2t,mercury:A2t,shuttleGrayDark:P2t,oxfordBlue:O2t,darkModeDefaultBackground:D2t,indicatorGrey:N2t,secondaryButtonHover:L2t,headerCell:I2t,noSort:R2t,standard:j2t,caret:$2t,headerLabel:F2t,icon:z2t,numberIcon:B2t,dateIcon:H2t,textIcon:W2t,booleanIcon:V2t,sortIcon:U2t,sortAscending:G2t,sortDescending:q2t},Y2t="_icon_t30x8_1",X2t="_numberIcon_t30x8_11",Z2t="_dateIcon_t30x8_15",K2t="_textIcon_t30x8_19",J2t="_booleanIcon_t30x8_23",b1={icon:Y2t,numberIcon:X2t,dateIcon:Z2t,textIcon:K2t,booleanIcon:J2t},Q2t=({columnType:e})=>ge("div",{className:tf(b1.icon,{[b1.numberIcon]:Fr(e),[b1.dateIcon]:ki(e),[b1.textIcon]:kC(e),[b1.booleanIcon]:Ose(e)})}),eTt=({column:e,onClick:t,isSelected:n,children:o,showFieldTypeIcon:r,sortIcon:i="standard"})=>rt("div",{className:Qp.headerCell,onClick:()=>{t(e)},children:[r&&ge(Q2t,{columnType:e.type}),ge("div",{className:Qp.headerLabel,children:o}),ge("div",{className:tf(Qp.sortIcon,{[Qp.caret]:i==="caret",[Qp.standard]:i==="standard",[Qp.noSort]:!n||e.direction===0,[Qp.sortAscending]:n&&e.direction===1,[Qp.sortDescending]:n&&e.direction===-1})})]}),tTt=26,nTt=26,rK=8,Bme=36,Hme=29,Wme=24,b6=350,oTt=126,rTt=38,iTt=55,aTt=(e,t,n,o)=>{const r=document.createElement("canvas").getContext("2d");if(!r)return[];r.font=`13px ${o||"Open Sans"}`;const i=e.columns.map(u=>r.measureText(u.name).width+Bme+(t?Hme:0)),a=r.measureText("0").width,s=e.columns.map(u=>({type:Dz(u.type),index:u.index})),{rows:l}=e,c=s.map(u=>{const h=l.reduce((d,f)=>{var m;const p=f[u.index].displayValue,y=(m=n[u.index])!=null&&m.isHtml?sTt(p):p,S=u.type==="number"?f[u.index].displayValue.length*a:r.measureText(y).width;return Math.max(d,S)},0);return Wme+h});return i.map((u,h)=>{var d;return(d=n[h])!=null&&d.width?n[h].width:Math.ceil(Math.max(oTt,Math.min(b6,Math.max(u,c[h]))))})};function sTt(e){const t=document.createElement("div");return t.innerHTML=e,Vme(t)}function Vme(e){let t,n,o,r;for(n="",t=0;t<e.childNodes.length;t++)r=e.childNodes[t],o=null,r.nodeType===1?o=Vme(r):r.nodeType===3&&(o=r.nodeValue),o&&(n+=o);return n}const iK=e=>e%2===1,aK=({colIndex:e=0,rowIndex:t=0,themeSettings:n,customStyles:o,isHeaderCell:r})=>{var i,a,s,l,c,u,h,d,f,m,p,y,S,R,$,j,E,A;let D=n.chart.textColor;const N=n.typography.fontFamily;let W=n.chart.backgroundColor;const P=Fi(W);return r?(a=(i=o==null?void 0:o.header)==null?void 0:i.color)!=null&&a.enabled&&(W=((l=(s=o==null?void 0:o.header)==null?void 0:s.color)==null?void 0:l.backgroundColor)||P,D=((u=(c=o==null?void 0:o.header)==null?void 0:c.color)==null?void 0:u.textColor)||D):((d=(h=o==null?void 0:o.columns)==null?void 0:h.alternatingColor)!=null&&d.enabled&&iK(e)&&(W=((m=(f=o==null?void 0:o.columns)==null?void 0:f.alternatingColor)==null?void 0:m.backgroundColor)||P,D=((y=(p=o==null?void 0:o.columns)==null?void 0:p.alternatingColor)==null?void 0:y.textColor)||D),(R=(S=o==null?void 0:o.rows)==null?void 0:S.alternatingColor)!=null&&R.enabled&&iK(t)&&(W=((j=($=o==null?void 0:o.rows)==null?void 0:$.alternatingColor)==null?void 0:j.backgroundColor)||P,D=((A=(E=o==null?void 0:o.rows)==null?void 0:E.alternatingColor)==null?void 0:A.textColor)||D)),{color:D,backgroundColor:W,fontFamily:N}},lTt="#f4f4f8",cTt="#edeef1",uTt="#e3e5ea",dTt="#f9f9fb",pTt="#ffcb05",hTt="#1faff3",fTt="#e5e5e5",mTt="#5b6372",gTt="#3a4356",vTt="#3c3c42",yTt="#a3a3a3",bTt="#d0d3db",xTt="_tableWrapper_1ode4_16",wTt="_table_1ode4_16",_Tt="_tableHeader_1ode4_78",CTt="_tableCell_1ode4_88",STt="_tableCellContent_1ode4_99",kTt="_headerColor_1ode4_105",TTt="_rowColor_1ode4_109",bx={athensGray:lTt,athensGrayDark:cTt,athensGrayDark2:uTt,athensGrayLight:dTt,defaultBrandColor:pTt,dodgerBlue:hTt,mercury:fTt,shuttleGrayDark:mTt,oxfordBlue:gTt,darkModeDefaultBackground:vTt,indicatorGrey:yTt,secondaryButtonHover:bTt,tableWrapper:xTt,table:wTt,tableHeader:_Tt,tableCell:CTt,tableCellContent:STt,headerColor:kTt,rowColor:TTt},MTt=e=>Fr(e)?"right":"left",ETt=new RegExp(`<\\/?[\\w\\s="/.':;#-\\/\\?]+>`),sK=({displayValue:e,width:t,padding:n,ellipsizedLength:o,isHtml:r})=>{var i,a,s,l,c,u,h,d;const{app:f}=Hn(),m=(l=(s=(a=(i=f==null?void 0:f.settings)==null?void 0:i.chartConfig)==null?void 0:a.tabular)==null?void 0:s.htmlContent)==null?void 0:l.enabled,p=(d=(h=(u=(c=f==null?void 0:f.settings)==null?void 0:c.chartConfig)==null?void 0:u.tabular)==null?void 0:h.htmlContent)==null?void 0:d.sanitizeContents,{isHtmlValue:y,value:S}=Ge(()=>{let $=r;m&&typeof $>"u"&&($=ETt.test(e));const j=$&&p?pB.sanitize(e):e;return{isHtmlValue:$,value:j}},[m,r,e,p]),R=S.length>o;return ge("div",{className:bx.tableCellContent,style:{maxWidth:`${t-n}px`},children:y?ge("div",{dangerouslySetInnerHTML:{__html:S}}):R?ge(pd,{title:S,children:ge("div",{children:S})}):ge("div",{children:S})})},ATt=({dataTable:e,dataOptions:t,height:n,width:o,customStyles:r,themeSettings:i,onSortUpdate:a})=>{var s,l,c;const u=r&&r.showFieldTypeIcon!==void 0?r.showFieldTypeIcon:!0,h=Bme+(u?Hme:0),d=(r==null?void 0:r.paddingVertical)||rK,f=(r==null?void 0:r.paddingHorizontal)||rK,m=((s=r==null?void 0:r.columns)==null?void 0:s.width)==="auto"?(o-f*2-_2t())/t.columns.length:void 0,p=Ge(()=>t.columns.map(E=>({isHtml:"isHtml"in E&&!!E.isHtml,width:m})),[t.columns,m]),[y,S]=Ye(((l=document.fonts)==null?void 0:l.status)==="loaded"),R=(c=i.typography)==null?void 0:c.fontFamily,$=Ge(()=>aTt(e,u,p,R),[e,u,p,R,y]);Ke(()=>{var E;(E=document.fonts)==null||E.ready.then(()=>{S(!0)}).catch(A=>{console.warn("Failed to observe font loading",A)})},[]);const j=Ge(()=>e.columns.map((E,A)=>{const D=$[A],N=t.columns[A],W=aK({isHeaderCell:!0,themeSettings:i,customStyles:r});return D?ge(zO,{maxWidth:b6,minWidth:b6,allowCellsRecycling:!0,width:D,header:ge(dE,{className:tf(bx.tableHeader),style:W,children:ge(eTt,{column:E,onClick:a,isSelected:!!Math.abs(E.direction),showFieldTypeIcon:u,sortIcon:(r==null?void 0:r.sortIcon)||"standard",children:ge(sK,{displayValue:ti(N),width:D,padding:h,ellipsizedLength:rTt})})}),cell:P=>{var _=P,{rowIndex:g}=_,T=Jt(_,["rowIndex"]);return ge(dE,$e(ke({className:tf(bx.tableCell),style:aK({colIndex:A,rowIndex:g,themeSettings:i,customStyles:r})},T),{children:ge(sK,{displayValue:e.rows[g][A].displayValue,width:D,padding:Wme,ellipsizedLength:iTt,isHtml:"isHtml"in N?N.isHtml:void 0})}))},align:MTt(E.type)},`col${A}`):null}),[e,$,i,r,a,u,t,h]);return Ge(()=>ge("div",{className:bx.tableWrapper,style:{padding:`${d}px ${f}px`},children:ge(v2t,{className:bx.table,rowHeight:(r==null?void 0:r.rowHeight)||nTt,rowsCount:e.rows.length,width:o-f*2,height:n-d*2,headerHeight:(r==null?void 0:r.headerHeight)||tTt,children:j})}),[j,r,e,n,f,d,o])},PTt=(e,t)=>{if(!e.columns.some(r=>Fr(r.type)))return e;const n=e.columns,o=e.rows.map(r=>r.map((i,a)=>{const s=n[a].type,l=so(t.columns[a].numberFormatConfig);if(Fr(s)){const c=Jv(i.displayValue,s);return{displayValue:rr(l,c.value),compareValue:c}}else return i}));return{columns:n,rows:o}},OTt="_component_1rw9b_1",DTt={component:OTt},NTt=({dataTable:e,dataOptions:t,designOptions:n={},onSortUpdate:o,themeSettings:r,width:i=400,height:a=500})=>{const s=Ve(null),l=Ve(e),c=Ge(()=>PTt(e,t),[e,t]);oi(()=>{l.current=e},[e]);const u=Ge(()=>ke({sortIcon:"caret",showFieldTypeIcon:!1},n),[n]);return ge("div",{className:DTt.component,ref:s,children:ge(ATt,{dataTable:c,dataOptions:t,onSortUpdate:o,height:a,width:i,customStyles:u,themeSettings:r})})},y9=e=>{const t=[],n=[];for(const o of e.columns)Qn(o)?n.push(RC(o)):t.push(bs(o));return{attributes:t,measures:n}},LTt=({dataSet:e,dataOptions:t,filters:n,filterRelations:o,count:r,offset:i})=>{const a=D8(),[s,l]=Ye(qh(e)?null:e),[c,u]=Ye(!1),h=Ve(!0),{isInitialized:d,app:f}=Hn(),[m,p]=Ye(t);return Ke(()=>{var y;let S=!1;if(!t)return;const{attributes:R,measures:$}=y9(t);if(qh(e)){if(!d){a(new Et("errors.chartNoSisenseContext"));return}if(!f||!h.current&&i>0)return;u(!0),((y=f.settings.queryCacheConfig)!=null&&y.enabled?MC:wd)({dataSource:e,dimensions:R,measures:$,filters:n,filterRelations:o,count:r+1,offset:i,ungroup:!0},f).then(j=>{if(S)return;h.current=j.rows.length>r;const E=h.current?j.rows.slice(0,r):j.rows;i>0?l(A=>{const D=A==null?void 0:A.rows.length,N=D?D>i?A.rows.slice(0,i):A.rows:null;return{columns:j.columns,rows:N?[...N,...E]:E}}):l({columns:j.columns,rows:E}),p(t)}).finally(()=>{u(!1)}).catch(j=>{S||a(j)})}else l(e),p(t);return()=>{S=!0}},[f,e,t,n,o,i,r,d,a]),[c?null:s,m]},ITt=({data:e,innerDataOptions:t,dataColumnNamesMapping:n,needToAggregate:o=!1})=>{const{app:r}=Hn();return Ge(()=>{if(!e||!t)return null;let i=Cle(I4(e,t,r==null?void 0:r.settings.locale,r==null?void 0:r.settings.dateConfig));const a=t.columns.filter(l=>!Qn(l)).map(bs),s=t.columns.filter(l=>Qn(l)).map(RC);return Yhe(i,a,s,n),o&&(i=qhe(i,a,s,n)),mst(t,i)},[e,t,o,n,r])},RTt=e=>({"& .MuiPaginationItem-circular.Mui-selected":{color:e.chart.textColor},"& .MuiPaginationItem-circular":{color:e.chart.secondaryTextColor,fontFamily:e.typography.fontFamily}}),jTt=e=>({paddingVertical:e.paddingVertical,paddingHorizontal:e.paddingHorizontal,header:e.header,rows:e.rows,columns:e.columns}),Ume=25,Gme=10,qme=({dataSet:e,dataOptions:t,styleOptions:n={},filters:o,onDataReady:r})=>{const{rowsPerPage:i=Ume,width:a,height:s}=n,{themeSettings:l}=Nt(),[c,u]=Ye(0),{filters:h,relations:d}=vl(o),[f,m]=Ye(1),p=Ve(null),y=Ge(()=>khe(t),[t]),S=Ge(()=>O8(y.columns.filter(Qn).map(RC)),[y]),R=Ge(()=>jTt(n),[n]),[$,j]=Ye(y),[E,A]=Ye(e),[D,N]=LTt({dataSet:E,dataOptions:$,filters:h,filterRelations:d,count:i*Gme,offset:c}),W=Ge(()=>{if(D&&r){const O=r(D);if(!Zhe(O))throw new Et("errors.incorrectOnDataReadyHandler");return O}return D},[D]),P=ITt({data:W,innerDataOptions:N,dataColumnNamesMapping:S,needToAggregate:!qh(E)});Ke(()=>{j(y),A(e),m(1),u(0)},[e,y]);const _=ze(O=>{D&&(Math.floor(D.rows.length/i)===O&&u(D.rows.length),m(O))},[D,i]),g=ze(O=>{m(1),u(0),$&&j(fst($,O))},[$]),T=Ge(()=>{if(!P||qh(E))return P;const O=P.columns.find(H=>H.direction!==0);return O?eB(P,[O]):P},[P,E]),M=Ge(()=>T?{columns:T.columns,rows:T.rows.slice((f-1)*i,f*i)}:void 0,[T,f,i]);return N?ge(ef,{defaultSize:dO("table"),size:{width:a,height:s},children:O=>{if(!P||!M)return ge(u8,{themeSettings:l});if(pIe(P))return ge(A8,{iconType:"table"});const H=Math.ceil(P.rows.length/i);return rt("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:l.chart.backgroundColor},"aria-label":"table-root",children:[ge(NTt,{dataTable:M,dataOptions:N,designOptions:R,themeSettings:l,width:O.width,height:O.height-32,onSortUpdate:g}),ge(Hde,{ref:p,page:f,count:H,onChange:(G,V)=>_(V),sx:RTt(l)})]})}}):null},$Tt=hn(null),D3={didCatch:!1,error:null};let x6=class extends Zn{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=D3}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,o,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:i,reason:"imperative-api"}),this.setState(D3)}}componentDidCatch(t,n){var o,r;(o=(r=this.props).onError)===null||o===void 0||o.call(r,t,n)}componentDidUpdate(t,n){const{didCatch:o}=this.state,{resetKeys:r}=this.props;if(o&&n.error!==null&&FTt(t.resetKeys,r)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(D3)}}render(){const{children:t,fallbackRender:n,FallbackComponent:o,fallback:r}=this.props,{didCatch:i,error:a}=this.state;let s=t;if(i){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(o)s=jt(o,l);else if(r===null||vn(r))s=r;else throw a}return jt($Tt.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}};function FTt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,o)=>!Object.is(n,t[o]))}function Uc(e,t,n){const o=wl(e);return typeof e!="object"&&e===o?!1:o==null||(t?t.some(r=>!sa(o[r],e[r])):!sa(o,e))?!0:n?n(e,o):!1}const Yme=hn(void 0),zTt=({children:e})=>{const[t,n]=Ye([]),[o,r]=Ye([]),i=()=>n([]),a=()=>r([]);return ge(Yme.Provider,{value:{errors:t,warnings:o,clearError:i,clearWarning:a,setErrors:n,setWarnings:r},children:e})},Xme=()=>en(Yme)||{errors:[],warnings:[],setErrors:()=>{console.warn("setErrors called, but context is not available.")},setWarnings:()=>{console.warn("setWarnings called, but context is not available.")},clearError:()=>{console.warn("clearError called, but context is not available.")},clearWarning:()=>{console.warn("clearWarning called, but context is not available.")}},BTt="BE#081586",HTt="BE#733473",WTt=e=>{const[t,n]=Ye(0),{setErrors:o,errors:r}=Xme(),i=Uc(e,["dataOptions","filters"]);if(Ke(()=>{i&&r.length>0&&(n(t+1),o([]))},[e.dataOptions,e.filters]),!qh(e.dataSet))throw new Et("errors.undefinedDataSource");const a=la(e.dataOptions),s=d4e(a);a.value.push(...s);const l=p4e(a);a.value.push(...l);const c=ze(({error:d})=>{console.debug("Unexpected error occurred when rendering advanced chart:",d);const f=la(a),m=h(d.toString());return f.value=f.value.filter(p=>{const y="column"in p?p.column.name:p.name;return!("column"in p&&"type"in p.column&&p.column.type==="calculatedmeasure"&&m.some(S=>S.includes(y)))}),ge(x6,{fallbackRender:u,onError:p=>{const y=h(p.toString());o(S=>[...new Set([...S,...y])])},children:ge(kT,$e(ke({},e),{dataOptions:f}))},`errorboundary_${t}`)},[e,r]),u=ze(({error:d})=>(console.debug("Error occurred when rendering fallback chart:",d),d.toString().includes(BTt)?ge(kT,ke({},e)):ge(e8,{error:r[0]})),[e,r]),h=d=>{if(d.includes(HTt)){const f=/Error: BE#733473 More than 1 Function failed, aggregated failures:\s*/;if(f.test(d))return d.replace(f,"").split(";").map(m=>m.trim()).filter(Boolean)}return[d.trim()]};return ge(x6,{fallbackRender:c,onError:d=>{const f=h(d.toString());o(m=>[...new Set([...m,...f])])},children:ge(kT,$e(ke({},e),{dataOptions:a}))},`errorboundary_${t}`)},pa=e=>{const{dataSet:t}=e;return!!t&&typeof t!="string"&&"rows"in t&&"columns"in t},Zi=jn({componentName:"Chart",shouldSkipSisenseContextWaiting:pa,customContextErrorMessageKey:"errors.chartNoSisenseContext"})(e=>{if(VTt(e))return ge(qme,ke({},e));if(UTt(e))return ge(WTt,ke({},e));if(Zme(e))return ge(kT,ke({},e));throw new Et("errors.chartInvalidProps")});function VTt(e){return e.chartType==="table"&&"columns"in e.dataOptions}function Zme(e){return e.chartType!=="table"}function UTt(e){return!Zme(e)||!yc(e.chartType)?!1:e.dataOptions.value.some(t=>(t==null?void 0:t.forecast)!==void 0||(t==null?void 0:t.trend)!==void 0)}function Ym(e,t){switch(t.type){case"loading":return GTt(e);case"success":return qTt(t.data);case"error":return YTt(t.error)}}function GTt(e){return e.status==="loading"?e:$e(ke({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function qTt(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function YTt(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}const Kme="sdkHookInit",XTt=(e,t,n,o)=>{n&&Jde(Kme,{packageName:t,packageVersion:"2.18.0",hookName:e},n.httpClient).finally(o)};function ZTt(e){const{tracking:t,app:n}=Hn(),{trackEvent:o}=d8(),r=Ve(!1);Ke(()=>{if(!(!t||!n)&&!r.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.18.0",hookName:e};o(Kme,i,!t.enabled).finally(()=>r.current=!0)}},[t,e,o,n])}const BO=e=>t=>(...n)=>(ZTt(e),t(...n));var N3=function(){return Za.Date.now()},KTt="Expected a function",JTt=Math.max,QTt=Math.min;function yS(e,t,n){var o,r,i,a,s,l,c=0,u=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(KTt);t=Iw(t)||0,Ma(n)&&(u=!!n.leading,h="maxWait"in n,i=h?JTt(Iw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function f(A){var D=o,N=r;return o=r=void 0,c=A,a=e.apply(N,D),a}function m(A){return c=A,s=setTimeout(S,t),u?f(A):a}function p(A){var D=A-l,N=A-c,W=t-D;return h?QTt(W,i-N):W}function y(A){var D=A-l,N=A-c;return l===void 0||D>=t||D<0||h&&N>=i}function S(){var A=N3();if(y(A))return R(A);s=setTimeout(S,p(A))}function R(A){return s=void 0,d&&o?f(A):(o=r=void 0,a)}function $(){s!==void 0&&clearTimeout(s),c=0,o=l=r=s=void 0}function j(){return s===void 0?a:R(N3())}function E(){var A=N3(),D=y(A);if(o=arguments,r=this,l=A,D){if(s===void 0)return m(l);if(h)return clearTimeout(s),s=setTimeout(S,t),f(l)}return s===void 0&&(s=setTimeout(S,t)),a}return E.cancel=$,E.flush=j,E}function eMt(e,t,n){n=typeof n=="function"?n:void 0;var o=n?n(e,t):void 0;return o===void 0?vC(e,t,void 0,n):!!o}const HO=e=>{const t=tMt(e);return t.config.disabled=!e.config.disabled,t},tMt=e=>{const t=la(e);return Object.setPrototypeOf(t,e),t};function nMt(e,t,n){const o=ke({guid:t},n?{backgroundFilter:n}:{});return zi(e,[],o)}function WO(e){if(!ca(e))throw new Et("errors.notAMembersFilter");const{attribute:t,config:{guid:n,backgroundFilter:o}}=e;return nMt(t,n,o)}function b9(e){return"members"in e&&e.members.length===0}function vs(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function Xm(e,t){return e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((n,o)=>!eMt(n,t[o],Jme))}function x9(e,t){return vs(e.attribute,t.attribute)}function Jme(e,t){const n=qi(oMt,rMt);return sa(n(e),n(t))}function oMt(e){return $e(ke({},e),{name:""})}function rMt(e){return $e(ke({},e),{config:$e(ke({},e.config),{guid:""})})}function iMt(e,t,n,o){if(n===void 0&&o===void 0)return!1;if([n,o].some(i=>i===void 0))return!0;function r(i,a){const s=i,l=i,c=a,u=a;return i===void 0&&a===void 0?!0:[i,a].some(h=>h===void 0)||s.operator!==c.operator?!1:l.instanceid&&u.instanceid?!Xm(e==null?void 0:e.filter(h=>h.config.guid===l.instanceid),t==null?void 0:t.filter(h=>h.config.guid===u.instanceid)):r(s.left,c.left)&&r(s.right,c.right)||r(s.left,c.right)&&r(s.right,c.left)}return!r(n,o)}function Qme(e){return function(t){t=$h(t);var n=Mhe(t)?N4(t):void 0,o=n?n[0]:t.charAt(0),r=n?The(n,1).join(""):t.slice(1);return o[e]()+r}}var aMt=Qme("toUpperCase");function sMt(e){return aMt($h(e).toLowerCase())}function lMt(e,t,n,o){for(var r=-1,i=e==null?0:e.length;++r<i;)n=t(n,e[r],r,e);return n}function cMt(e){return function(t){return e==null?void 0:e[t]}}var uMt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dMt=cMt(uMt),pMt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hMt="\\u0300-\\u036f",fMt="\\ufe20-\\ufe2f",mMt="\\u20d0-\\u20ff",gMt=hMt+fMt+mMt,vMt="["+gMt+"]",yMt=RegExp(vMt,"g");function bMt(e){return e=$h(e),e&&e.replace(pMt,dMt).replace(yMt,"")}var xMt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wMt(e){return e.match(xMt)||[]}var _Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function CMt(e){return _Mt.test(e)}var ege="\\ud800-\\udfff",SMt="\\u0300-\\u036f",kMt="\\ufe20-\\ufe2f",TMt="\\u20d0-\\u20ff",MMt=SMt+kMt+TMt,tge="\\u2700-\\u27bf",nge="a-z\\xdf-\\xf6\\xf8-\\xff",EMt="\\xac\\xb1\\xd7\\xf7",AMt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",PMt="\\u2000-\\u206f",OMt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",oge="A-Z\\xc0-\\xd6\\xd8-\\xde",DMt="\\ufe0e\\ufe0f",rge=EMt+AMt+PMt+OMt,ige="['’]",lK="["+rge+"]",NMt="["+MMt+"]",age="\\d+",LMt="["+tge+"]",sge="["+nge+"]",lge="[^"+ege+rge+age+tge+nge+oge+"]",IMt="\\ud83c[\\udffb-\\udfff]",RMt="(?:"+NMt+"|"+IMt+")",jMt="[^"+ege+"]",cge="(?:\\ud83c[\\udde6-\\uddff]){2}",uge="[\\ud800-\\udbff][\\udc00-\\udfff]",G0="["+oge+"]",$Mt="\\u200d",cK="(?:"+sge+"|"+lge+")",FMt="(?:"+G0+"|"+lge+")",uK="(?:"+ige+"(?:d|ll|m|re|s|t|ve))?",dK="(?:"+ige+"(?:D|LL|M|RE|S|T|VE))?",dge=RMt+"?",pge="["+DMt+"]?",zMt="(?:"+$Mt+"(?:"+[jMt,cge,uge].join("|")+")"+pge+dge+")*",BMt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HMt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",WMt=pge+dge+zMt,VMt="(?:"+[LMt,cge,uge].join("|")+")"+WMt,UMt=RegExp([G0+"?"+sge+"+"+uK+"(?="+[lK,G0,"$"].join("|")+")",FMt+"+"+dK+"(?="+[lK,G0+cK,"$"].join("|")+")",G0+"?"+cK+"+"+uK,G0+"+"+dK,HMt,BMt,age,VMt].join("|"),"g");function GMt(e){return e.match(UMt)||[]}function qMt(e,t,n){return e=$h(e),t=t,t===void 0?CMt(e)?GMt(e):wMt(e):e.match(t)||[]}var YMt="['’]",XMt=RegExp(YMt,"g");function ZMt(e){return function(t){return lMt(qMt(bMt(t).replace(XMt,"")),e,"")}}var hge=ZMt(function(e,t,n){return t=t.toLowerCase(),e+(n?sMt(t):t)});function KMt(e,t,n,o){for(var r=-1,i=e==null?0:e.length;++r<i;){var a=e[r];t(o,a,n(a),e)}return o}function JMt(e,t){return function(n,o){if(n==null)return n;if(!mC(n))return e(n,o);for(var r=n.length,i=-1,a=Object(n);++i<r&&o(a[i],i,a)!==!1;);return n}}var QMt=JMt(HA);function eEt(e,t,n,o){return QMt(e,function(r,i,a){t(o,r,n(r),a)}),o}function fge(e,t){return function(n,o){var r=No(n)?KMt:eEt,i=t?t():{};return r(n,e,yg(o),i)}}var bS=fge(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),vy=(e=>(e.HIGHLIGHT="highlight",e.FILTER="filter",e))(vy||{});function tEt(e){const{_id:t,title:n,levels:o}=e;return{id:t,title:n,levels:o.map(r=>Wy(r))}}function mge(e,t,n){return Ta(this,null,function*(){const o=yield new Ag(e,n).getHierarchies(t);return o==null?void 0:o.map(r=>tEt(r))})}function Gc(e,{onLocalStateChange:t,syncCompareFn:n=sa}={}){const[o,r]=Ye(e),i=Ve(e);Ke(()=>{n(i.current,e)||r(e),i.current=e},[e,n]);const a=ze(s=>{r(l=>{const c=mg(s)?s(l):s;return t==null||t(c),c})},[t]);return[o,a]}function nEt(e){return ho("MuiCard",e)}wo("MuiCard",["root"]);const oEt=e=>{const{classes:t}=e;return Io({root:["root"]},nEt,t)},rEt=on(XP,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),gge=_t(function(e,t){const n=Ro({props:e,name:"MuiCard"}),o=n,{className:r,raised:i=!1}=o,a=Jt(o,["className","raised"]),s=$e(ke({},n),{raised:i}),l=oEt(s);return Se(rEt,ke({className:Kt(l.root,r),elevation:i?8:void 0,ref:t,ownerState:s},a))});process.env.NODE_ENV!=="production"&&(gge.propTypes={children:ue.node,classes:ue.object,className:ue.string,raised:$p(ue.bool,e=>e.raised&&e.variant==="outlined"?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function iEt(e){return ho("MuiCardContent",e)}wo("MuiCardContent",["root"]);const aEt=e=>{const{classes:t}=e;return Io({root:["root"]},iEt,t)},sEt=on("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),vge=_t(function(e,t){const n=Ro({props:e,name:"MuiCardContent"}),o=n,{className:r,component:i="div"}=o,a=Jt(o,["className","component"]),s=$e(ke({},n),{component:i}),l=aEt(s);return Se(sEt,ke({as:i,className:Kt(l.root,r),ownerState:s,ref:t},a))});process.env.NODE_ENV!=="production"&&(vge.propTypes={children:ue.node,classes:ue.object,className:ue.string,component:ue.elementType,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function lEt(e){return ho("MuiCircularProgress",e)}wo("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const eh=44,w6=JC`
|
|
586
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=bme,t.componentWillReceiveProps=xme),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=wme;var s=t.componentDidUpdate;t.componentDidUpdate=function(l,c,u){var h=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;s.call(this,l,c,h)}}return e}var oSt=["height","width","isVisible","style","className","children","columnKey","columnIndex","rowIndex","left","cellGroupType","isHeader","isGroupHeader","maxWidth","minWidth","touchEnabled"];function YZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function rSt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YZ(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YZ(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}var h9=He.forwardRef(function(e,t){var n=e.height,o=e.width,r=e.style,i=e.className,a=e.children,s=op(e,oSt),l=rSt({height:n,width:o},r);return He.createElement("div",Gr({},s,{className:na(bn("fixedDataTableCellLayout/wrap"),bn("public/fixedDataTableCell/wrap"),bn("public/fixedDataTableCell/cellContent"),i),style:l,ref:t}),a)});h9.propTypes={height:Be.number,width:Be.number,columnKey:Be.oneOfType([Be.string,Be.number]),rowIndex:Be.number,isVisible:Be.bool};var gy=He.createContext({}),iSt=yfe;function aSt(e,t,n){var o=e==null?void 0:iSt(e,t);return o===void 0?n:o}var m6=aSt;function sSt(e){var t=lSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function lSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var XZ=15,ZZ=100,f9=function(e){Bi(n,e);var t=sSt(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"state",{displacement:0}),xt(At(o),"containerRef",He.createRef()),xt(At(o),"onTouchEnd",function(s){o.props.touchEnabled&&s.stopPropagation()}),xt(At(o),"onTouchMove",function(s){o.props.touchEnabled&&s.stopPropagation()}),xt(At(o),"onMouseMove",function(s){o.cursorDeltaX+=s*(o.context.isRTL?-1:1)}),xt(At(o),"onMouseUp",function(){nme(o.frameId),o.setState({displacement:0,isReordering:!1}),o.updateColumnOrder(),o.frameId=null,o.cursorDeltaX=0,o.mouseMoveTracker.releaseMouseMoves()}),xt(At(o),"initializeDOMMouseMoveTracker",function(s){o.mouseMoveTracker=new i9(o.onMouseMove,o.onMouseUp,document.body,o.props.touchEnabled),o.mouseMoveTracker.captureMouseMoves(s)}),xt(At(o),"updateDisplacementPeriodically",function(){o.frameId=Dh(o.updateDisplacementPeriodically),o.updateDisplacementWithScroll()}),xt(At(o),"getBoundedDeltaX",function(s){var l=0,c=0,u=o.props.cellGroupType,h=o.context.groupHeaderHeight>0;if(h&&!o.props.isGroupHeader){var d=o.context.getColumnGroupByChild(o.props.columnIndex);l=d.width,c=d.offset}else l=o.context.getCellGroupWidth(u);var f=l-o.props.width;return MO(s,-o.originalLeft+c,-o.originalLeft+f+c)}),xt(At(o),"updateDisplacementWithScroll",function(){var s=o.scrollStart,l=o.props.cellGroupType,c=o.context,u=c.scrollX,h=c.maxScrollX,d=c.availableScrollWidth,f=o.cursorDeltaX;if(l===wn.SCROLLABLE){var m=o.originalLeft-s+f;f+=u-s,m>d-ZZ?u=Math.min(u+XZ,h):m<=ZZ&&(u=Math.max(u-XZ,0)),o.context.scrollToX(u)}f=o.getBoundedDeltaX(f),o.setState({displacement:f})}),xt(At(o),"isColumnMovedToRight",function(s){return s>0}),xt(At(o),"isColumnMovedToLeft",function(s){return s<0}),xt(At(o),"updateColumnOrder",function(){var s=o.props.cellGroupType,l=o.getBoundedDeltaX(o.cursorDeltaX+o.context.scrollX-o.scrollStart),c=l>=0?o.props.width+l+o.props.left:l+o.props.left,u,h;if(o.props.isGroupHeader){var d=o.context.getColumnGroupAtOffset(c,s),f=d.columnGroup,m=d.distanceFromOffset;u=f,h=m}else{var p=o.context.getColumnAtOffset(c,s),y=p.column,S=p.distanceFromOffset;u=y,h=S}var R=null,$=null;u.index<o.props.columnIndex?h<=u.width/2?(R=u.index-1,$=u.index):(R=u.index,$=u.index+1):h>=u.width/2?(R=u.index,$=u.index+1):(R=u.index-1,$=u.index),R===o.props.columnIndex&&--R,$===o.props.columnIndex&&++$;var j=o.props.isGroupHeader?o.context.getColumnGroupCount():o.context.getColumnCount(),E,A;wm(R,0,j)&&(E=o.props.isGroupHeader?o.context.getColumnGroup(R):o.context.getColumn(R)),wm($,0,j)&&(A=o.props.isGroupHeader?o.context.getColumnGroup($):o.context.getColumn($)),o.props.onColumnReorderEnd({columnBefore:m6(E,"columnKey"),columnAfter:m6(A,"columnKey"),reorderColumn:o.props.columnKey})}),o}return Or(n,[{key:"componentDidMount",value:function(){var o=this.props.contents.parentNode.cloneNode(!0);o.firstChild.classList.add(bn("public/fixedDataTableCell/reordering")),this.containerRef.current.appendChild(o),this.startDrag()}},{key:"render",value:function(){var o={position:"absolute"};return fy(o,this.state.displacement,0,!0,this.context.isRTL),He.createElement("div",{style:o,ref:this.containerRef})}},{key:"startDrag",value:function(){this.cursorDeltaX=0,this.scrollStart=this.context.scrollX,this.originalLeft=this.props.left,this.initializeDOMMouseMoveTracker(this.props.reorderStartEvent),this.setState({displacement:0,isReordering:!0}),this.frameId=Dh(this.updateDisplacementPeriodically)}}]),n}(He.PureComponent);f9.contextType=gy;f9.propTypes={columnIndex:Be.number.isRequired,columnKey:Be.string.isRequired,contents:Be.object.isRequired,cellGroupType:Be.string,isGroupHeader:Be.bool,isRTL:Be.bool,left:Be.number.isRequired,onColumnReorderStart:Be.func.isRequired,reorderStartEvent:Be.object.isRequired,touchEnabled:Be.bool,width:Be.number.isRequired};function cSt(e){var t=uSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function uSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var dSt=function(e){Bi(n,e);var t=cSt(n);function n(o){var r;Pr(this,n),r=t.call(this,o);var i=o.value;return r.unsubscribe=i.subscribe(function(a){r.setState({FixedDataTableContextValue:a})}),r.state={FixedDataTableContextValue:i},r}return Or(n,[{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var o=this.state.FixedDataTableContextValue;return He.createElement(gy.Provider,{value:o},this.props.children)}}]),n}(He.PureComponent);function pSt(){}var hSt=pSt,fSt=["onColumnReorderStart","onColumnReorderEnd","reorderStartEvent","children"];function mSt(e){var t=gSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function gSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var vSt=1,d_=function(e){Bi(n,e);var t=mSt(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"state",{isReordering:!1}),xt(At(o),"dragContainer",null),xt(At(o),"cellRef",He.createRef()),xt(At(o),"isMounted",!1),xt(At(o),"setReorderHandle",function(s){s&&(s.addEventListener("mousedown",o.onMouseDown,{passive:!1}),s.addEventListener("touchstart",o.onTouchStart,{passive:!1}))}),xt(At(o),"onTouchStart",function(s){o.props.touchEnabled&&o.onMouseDown(s)}),xt(At(o),"onMouseDown",function(s){o.onDragStart(s)}),xt(At(o),"onDragStart",function(s){o.createDragContainer(),o.renderDragProxy(s),o.props.onColumnReorderStart(o.props.columnKey)}),xt(At(o),"onColumnReorderEnd",function(s){o.isMounted&&o.setState({isReordering:!1}),o.removeDragContainer(),o.props.onColumnReorderEnd(s)}),xt(At(o),"createDragContainer",function(){o.dragContainer=document.createElement("div"),o.dragContainer.dataset.columnKey=o.props.columnKey;var s=o.cellRef.current.closest(".fixedDataTableCellGroupLayout_cellGroup");s.appendChild(o.dragContainer)}),xt(At(o),"getDragContainer",function(){if(o.dragContainer)return o.dragContainer;var s=o.cellRef.current.closest(".fixedDataTableCellGroupLayout_cellGroup");return o.dragContainer=s.querySelector('[data-column-key="'.concat(o.props.columnKey,'"]')),o.dragContainer}),xt(At(o),"removeDragContainer",function(){o.props.__react19RootCreator?o.dragContainer.root.unmount():He.unmountComponentAtNode(o.dragContainer),o.dragContainer.remove(),o.dragContainer=null}),o}return Or(n,[{key:"componentDidMount",value:function(){this.isMounted=!0;var o=m6(this.getDragContainer(),"dataset.columnKey"),r=vfe(this.props.columnKey)===o;r&&(this.renderDragProxy({}),this.setState({isReordering:!0}))}},{key:"componentWillUnmount",value:function(){this.isMounted=!1}},{key:"render",value:function(){if(this.state.isReordering)return null;var o=this.props,r=o.children,i=op(o,fSt),a=na(bn({"public/fixedDataTableCell/resizeReorderCellContainer":!0}),i.className),s=na(a,bn({"public/fixedDataTableCell/hasReorderHandle":!0})),l={height:i.height,width:i.width-vSt},c;return He.isValidElement(r)?c=He.cloneElement(r,i):typeof r=="function"?c=r(i):c=He.createElement(h9,i,r),He.createElement("div",{className:s,style:l,ref:this.cellRef},this.renderReorderHandle(),c)}},{key:"renderReorderHandle",value:function(){var o={height:this.props.height};return He.createElement("div",{ref:this.setReorderHandle,className:bn({"fixedDataTableCellLayout/columnReorderContainer":!0,"fixedDataTableCellLayout/columnReorderContainer/active":!1}),style:o})}},{key:"renderDragProxy",value:function(o){var r=this,i={isDragProxy:!0,reorderStartEvent:o,onColumnReorderEnd:this.onColumnReorderEnd,contents:this.cellRef.current},a=He.createElement(dSt,{value:this.context},He.createElement(f9,Gr({},this.props,i)));if(this.props.__react19RootCreator){var s=He.flushSync||function(l){return l()};s(function(){var l=r.props.__react19RootCreator(r.getDragContainer());r.dragContainer.root=l,l.render(a)}),this.setState({isReordering:!0});return}He.render(a,this.getDragContainer(),function(){return r.setState({isReordering:!0})})}}]),n}(He.PureComponent);d_.contextType=gy;d_.defaultProps={onColumnReorderStart:hSt};d_.propTypes={height:Be.number,width:Be.number,columnKey:Be.oneOfType([Be.string,Be.number]),rowIndex:Be.number,left:Be.number,touchEnabled:Be.bool,minWidth:Be.number,maxWidth:Be.number,onColumnReorderStart:Be.func,onColumnReorderEnd:Be.func.isRequired,__react19RootCreator:Be.func};var ySt=!!(typeof window<"u"&&window.document&&window.document.createElement),bSt=function(){function e(t,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function xSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wSt(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function _St(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Cme=function(e){_St(t,e);function t(){return xSt(this,t),wSt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return bSt(t,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return ySt?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),He.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),t}(He.Component);Cme.propTypes={children:Be.node.isRequired,node:Be.any};var CSt=Cme,SSt=function(){function e(t,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function kSt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TSt(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function MSt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Sme=function(e){MSt(t,e);function t(){return kSt(this,t),TSt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return SSt(t,[{key:"componentDidMount",value:function(){this.renderPortal()}},{key:"componentDidUpdate",value:function(n){this.renderPortal()}},{key:"componentWillUnmount",value:function(){He.unmountComponentAtNode(this.defaultNode||this.props.node),this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null,this.portal=null}},{key:"renderPortal",value:function(n){!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode));var o=this.props.children;typeof this.props.children.type=="function"&&(o=He.cloneElement(this.props.children)),this.portal=He.unstable_renderSubtreeIntoContainer(this,o,this.props.node||this.defaultNode)}},{key:"render",value:function(){return null}}]),t}(He.Component),ESt=Sme;Sme.propTypes={children:Be.node.isRequired,node:Be.any};var g6=void 0;He.createPortal?g6=CSt:g6=ESt;var ASt=g6;function PSt(e){var t=OSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function OSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var kme=function(e){Bi(n,e);var t=PSt(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){if(!this.props.visible)return null;var o=this.getTableRef();if(!o)return null;var r={height:this.props.height,top:0,left:this.props.left};return He.createElement(ASt,{node:o},He.createElement("div",{className:na(bn("fixedDataTableColumnResizerLineLayout/main"),bn("public/fixedDataTableColumnResizerLine/main")),style:r},He.createElement("div",{className:bn("fixedDataTableColumnResizerLineLayout/mouseArea"),style:{height:this.props.height}})))}},{key:"getTableRef",value:function(){var o=this.props.parentRef;return o?o.closest(bn(".fixedDataTableLayout/main")):null}}]),n}(He.PureComponent);xt(kme,"propTypes",{visible:Be.bool.isRequired,height:Be.number.isRequired,left:Be.number.isRequired,parentRef:Be.object});function KZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function DSt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KZ(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KZ(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function NSt(e){var t=LSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function LSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Tme=function(e){Bi(n,e);var t=NSt(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),xt(At(r),"initialState",{isColumnResizing:!1,currentMouseXCoordinate:0,totalDisplacement:0}),xt(At(r),"state",DSt({},r.initialState)),xt(At(r),"resizerKnobRef",null),xt(At(r),"mouseMoveTracker",null),xt(At(r),"setResizerKnobRef",function(i){r.resizerKnobRef=i}),xt(At(r),"initializeDOMMouseMoveTracker",function(i){r.mouseMoveTracker=new i9(r.onMouseMove,r.onMouseUp,document.body,r.props.touchEnabled),r.mouseMoveTracker.captureMouseMoves(i)}),xt(At(r),"onTouchStart",function(i){r.props.touchEnabled&&r.onMouseDown(i)}),xt(At(r),"onMouseDown",function(i){r.initializeDOMMouseMoveTracker(i);var a=a6.getCoordinatesFromEvent(i).x-i.currentTarget.closest(bn(".fixedDataTableLayout/main")).getBoundingClientRect().left;r.setState({initialMouseXCoordinate:a,isColumnResizing:!0,totalDisplacement:0,currentMouseXCoordinate:a})}),xt(At(r),"onMouseUp",function(){var i=r.getMinMaxWidth(),a=i.minWidth,s=i.maxWidth,l=kO(r.props.width+r.state.totalDisplacement*(r.props.isRTL?-1:1),a,s);r.mouseMoveTracker.releaseMouseMoves(),r.setState({isColumnResizing:!1,totalDisplacement:0},function(){r.props.onColumnResizeEnd(l,r.props.columnKey)})}),xt(At(r),"onMouseMove",function(i){var a=r.props,s=a.isRTL,l=a.width,c=r.state,u=c.initialMouseXCoordinate,h=c.totalDisplacement,d=h+i,f=u+d,m=r.getMinMaxWidth(),p=m.minWidth,y=m.maxWidth,S=l+d*(s?-1:1);(S<p||S>y)&&(f=r.state.currentMouseXCoordinate),r.setState({totalDisplacement:d,currentMouseXCoordinate:f})}),xt(At(r),"getMinMaxWidth",function(){return{minWidth:r.props.minWidth||0,maxWidth:r.props.maxWidth||Number.MAX_SAFE_INTEGER}}),xt(At(r),"suppressEventIfInTouchMode",function(i){r.props.touchEnabled&&(i.preventDefault(),i.stopPropagation())}),r}return Or(n,[{key:"componentDidMount",value:function(){this.setupHandlers()}},{key:"componentWillUnmount",value:function(){this.cleanupHandlers()}},{key:"render",value:function(){var o={height:this.props.height},r=He.createElement(kme,{height:this.props.resizerLineHeight,visible:!!this.state.isColumnResizing,left:this.state.currentMouseXCoordinate,parentRef:this.resizerKnobRef});return He.createElement("div",{className:bn("fixedDataTableCellLayout/columnResizerContainer"),ref:this.setResizerKnobRef,style:o},r)}},{key:"setupHandlers",value:function(){this.resizerKnobRef.addEventListener("mousedown",this.onMouseDown,{passive:!1}),this.resizerKnobRef.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.resizerKnobRef.addEventListener("touchmove",this.suppressEventIfInTouchMode,{passive:!1}),this.resizerKnobRef.addEventListener("touchend",this.suppressEventIfInTouchMode,{passive:!1})}},{key:"cleanupHandlers",value:function(){this.resizerKnobRef.removeEventListener("mousedown",this.onMouseDown,{passive:!1}),this.resizerKnobRef.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.resizerKnobRef.removeEventListener("touchmove",this.suppressEventIfInTouchMode,{passive:!1}),this.resizerKnobRef.removeEventListener("touchend",this.suppressEventIfInTouchMode,{passive:!1})}}]),n}(He.PureComponent);Tme.propTypes={columnKey:Be.oneOfType([Be.string,Be.number]).isRequired,minWidth:Be.number,maxWidth:Be.number,width:Be.number.isRequired,resizerLineHeight:Be.number.isRequired,touchEnabled:Be.bool,isRTL:Be.bool,onColumnResizeEnd:Be.func.isRequired,height:Be.number.isRequired};var ISt=["children","minWidth","maxWidth","onColumnResizeEnd","onColumnReorderEnd","rowIndex","left","touchEnabled","cellGroupType","onColumnReorderStart"];function RSt(e){var t=jSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function jSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var pE=function(e){Bi(n,e);var t=RSt(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){var o=this.props,r=o.children,i=op(o,ISt),a;return He.isValidElement(r)?a=He.cloneElement(r,i):typeof r=="function"?a=r(i):a=He.createElement(h9,i,r),He.createElement(He.Fragment,null,He.createElement(Tme,{height:this.props.height,resizerLineHeight:this.context.tableHeight,onColumnResizeEnd:this.props.onColumnResizeEnd,width:this.props.width,minWidth:this.props.minWidth,maxWidth:this.props.maxWidth,columnKey:this.props.columnKey,touchEnabled:this.props.touchEnabled,isRTL:this.context.isRTL}),a)}}]),n}(He.PureComponent);pE.contextType=gy;pE.propTypes={columnKey:Be.oneOfType([Be.string,Be.number]),minWidth:Be.number,maxWidth:Be.number,width:Be.number,touchEnabled:Be.bool,isRTL:Be.bool,onColumnResizeEnd:Be.func.isRequired,height:Be.number};var $St=["cell"],FSt=["cell"],zSt=["height","width","columnIndex","isVisible","columnKey","isHeaderOrFooter","touchEnabled"];function JZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function o2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JZ(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JZ(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function BSt(e){var t=HSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function HSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var m9=function(e){Bi(n,e);var t=BSt(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"shouldComponentUpdate",value:function(o){if(o.isScrolling&&this.props.rowIndex===o.rowIndex&&this.props.isVisible===o.isVisible)return!1;if(!o.pureRendering)return!0;var r=this.props,i=r.cell,a=op(r,$St),s=o.cell,l=op(o,FSt);return!a_(a,l)||!i||!s||i.type!==s.type||!a_(i.props,s.props)}},{key:"render",value:function(){var o=this.props,r=o.height,i=o.width,a=o.isVisible,s=o.isHeaderOrFooter,l=o.touchEnabled,c=op(o,zSt),u={height:r,width:i};this.props.isRTL?u.right=c.left:u.left=c.left;var h=na(bn({"fixedDataTableCellLayout/main":!0,"fixedDataTableCellLayout/lastChild":c.lastChild,"fixedDataTableCellLayout/alignRight":c.align==="right","fixedDataTableCellLayout/alignCenter":c.align==="center","public/fixedDataTableCell/alignRight":c.align==="right","public/fixedDataTableCell/highlighted":c.highlighted,"public/fixedDataTableCell/main":!0}),c.className),d={touchEnabled:l,isVisible:a,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,cellGroupType:this.props.cellGroupType,columnIndex:this.props.columnIndex,columnKey:this.props.columnKey,height:this.props.height,width:this.props.width,left:this.props.left};c.rowIndex>=0&&(d.rowIndex=c.rowIndex);var f;this.props.isHeader&&(this.props.onColumnResizeEnd||this.props.onColumnReorderEnd)?this.props.onColumnResizeEnd&&this.props.onColumnReorderEnd?(d=o2(o2({},d),{},{minWidth:this.props.minWidth,maxWidth:this.props.maxWidth}),f=He.createElement(d_,Gr({},d,{onColumnReorderEnd:this.props.onColumnReorderEnd}),He.createElement(pE,{onColumnResizeEnd:this.props.onColumnResizeEnd},c.cell))):this.props.onColumnReorderEnd?f=He.createElement(d_,Gr({},d,{onColumnReorderEnd:this.props.onColumnReorderEnd}),c.cell):(d=o2(o2({},d),{},{minWidth:this.props.minWidth,maxWidth:this.props.maxWidth}),f=He.createElement(pE,Gr({},d,{onColumnResizeEnd:this.props.onColumnResizeEnd}),c.cell)):He.isValidElement(c.cell)?f=He.cloneElement(c.cell,d):typeof c.cell=="function"?f=c.cell(d):f=He.createElement(dE,d,c.cell);var m=s?"columnheader":"gridcell";return He.createElement("div",{className:h,style:u,role:m},f)}}]),n}(He.Component);xt(m9,"propTypes_DISABLED_FOR_PERFORMANCE",{isScrolling:Be.bool,align:Be.oneOf(["left","center","right"]),className:Be.string,highlighted:Be.bool,width:Be.number.isRequired,minWidth:Be.number,maxWidth:Be.number,height:Be.number.isRequired,cell:Be.oneOfType([Be.string,Be.element,Be.func]),columnKey:Be.oneOfType([Be.string,Be.number]),rowIndex:Be.number.isRequired,left:Be.number,pureRendering:Be.bool,touchEnabled:Be.bool,isHeaderOrFooter:Be.bool,isRTL:Be.bool,isVisible:Be.bool.isRequired,onColumnResizeEnd:Be.func,onColumnReorderEnd:Be.func,isHeader:Be.bool,cellGroupType:Be.oneOf([wn.FIXED,wn.FIXED_RIGHT,wn.SCROLLABLE])});xt(m9,"defaultProps",{align:"left",highlighted:!1});var WSt=_me(m9),VSt=["offsetLeft"];function Mme(e){var t=USt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function USt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Eme=function(e){Bi(n,e);var t=Mme(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),xt(At(r),"_renderCell",function(i,a,s,l,c,u,h){var d=s.cellClassName,f=s.pureRendering||!1,m=s.isReorderable?r.props.onColumnReorderEndCallback:null,p=s.isResizable?r.props.onColumnResizeEndCallback:null;return He.createElement(WSt,{columnIndex:s.index,isScrolling:r.props.isScrolling,isHeaderOrFooter:r.props.isHeaderOrFooter,isHeader:r.props.isHeader,isGroupHeader:r.props.isGroupHeader,align:s.align,className:d,height:a,key:u,maxWidth:s.maxWidth,minWidth:s.minWidth,touchEnabled:r.props.touchEnabled,onColumnResizeEnd:p,onColumnReorderEnd:m,rowIndex:i,columnKey:s.columnKey,width:s.width,left:c,cell:l,pureRendering:f,isRTL:r.props.isRTL,cellGroupType:r.props.cellGroupType,isVisible:r.props.isVisible&&h})}),r._initialRender=!0,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"render",value:function(){for(var o=this.props,r=o.columns,i=new Array(r.length),a=ET(r),s=0,l=0,c=r.length;l<c;l++){var u=r[l].props,h=r[l].template,d=u.allowCellsRecycling,f=s-o.left<=o.width&&s-o.left+u.width>=0;if(!d||f){var m=u.columnKey||"cell_"+l;i[l]=this._renderCell(o.rowIndex,o.rowHeight,u,h,s,m,f)}s+=u.width}var p={height:o.height,position:"absolute",width:a,zIndex:o.zIndex};return fy(p,-1*o.left,0,this._initialRender,this.props.isRTL),He.createElement("div",{className:bn("fixedDataTableCellGroupLayout/cellGroup"),style:p},i)}}]),n}(He.Component);xt(Eme,"propTypes_DISABLED_FOR_PERFORMANCE",{columns:Be.array.isRequired,isScrolling:Be.bool,left:Be.number,height:Be.number.isRequired,cellGroupWrapperHeight:Be.number,rowHeight:Be.number.isRequired,rowIndex:Be.number.isRequired,width:Be.number.isRequired,zIndex:Be.number.isRequired,touchEnabled:Be.bool,isHeaderOrFooter:Be.bool,isRTL:Be.bool,onColumnResizeEndCallback:Be.func,onColumnReorderEndCallback:Be.func,isHeader:Be.bool,isVisible:Be.bool.isRequired});var ow=function(e){Bi(n,e);var t=Mme(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"shouldComponentUpdate",value:function(o){return!(o.isScrolling&&this.props.rowIndex===o.rowIndex&&this.props.left===o.left&&this.props.offsetLeft===o.offsetLeft&&this.props.isVisible===o.isVisible)}},{key:"render",value:function(){var o=this.props,r=o.offsetLeft,i=op(o,VSt),a={height:i.cellGroupWrapperHeight||i.height,width:i.width};return this.props.isRTL?a.right=r:a.left=r,He.createElement("div",{style:a,className:bn("fixedDataTableCellGroupLayout/cellGroupWrapper")},He.createElement(Eme,i))}}]),n}(He.Component);xt(ow,"propTypes_DISABLED_FOR_PERFORMANCE",{isScrolling:Be.bool,height:Be.number.isRequired,offsetLeft:Be.number,left:Be.number,zIndex:Be.number.isRequired});xt(ow,"defaultProps",{left:0,offsetLeft:0});var GSt=["offsetTop","zIndex"];function Ame(e){var t=qSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function qSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var YSt=1,Pme=function(e){Bi(n,e);var t=Ame(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"mouseLeaveIndex",null),xt(At(o),"_getRowExpanded",function(s){if(o.props.rowExpanded){var l={rowIndex:o.props.index,height:s,width:o.props.width},c;return He.isValidElement(o.props.rowExpanded)?c=He.cloneElement(o.props.rowExpanded,l):typeof o.props.rowExpanded=="function"&&(c=o.props.rowExpanded(l)),c}}),xt(At(o),"_renderColumnsLeftShadow",function(s){var l=bn({"fixedDataTableRowLayout/fixedColumnsDivider":s>0,"fixedDataTableRowLayout/columnsShadow":o.props.scrollLeft>0,"public/fixedDataTableRow/fixedColumnsDivider":s>0,"public/fixedDataTableRow/columnsShadow":o.props.scrollLeft>0}),c=o.props.cellGroupWrapperHeight?o.props.cellGroupWrapperHeight-YSt:o.props.height,u={left:s,height:c};return o.props.isRTL&&(u.right=s,u.left="auto"),He.createElement("div",{className:l,style:u})}),xt(At(o),"_renderFixedRightColumnsShadow",function(s){var l=bn("fixedDataTableRowLayout/columnsShadow","fixedDataTableRowLayout/columnsRightShadow","fixedDataTableRowLayout/fixedColumnsDivider","public/fixedDataTableRow/columnsShadow","public/fixedDataTableRow/columnsRightShadow","public/fixedDataTableRow/fixedColumnsDivider"),c={height:o.props.height,left:s};return o.props.isRTL&&(c.right=s,c.left="auto"),He.createElement("div",{className:l,style:c})}),xt(At(o),"_renderColumnsRightShadow",function(s){if(Math.ceil(o.props.scrollLeft+o.props.width)<Math.floor(s)){var l=bn("fixedDataTableRowLayout/columnsShadow","fixedDataTableRowLayout/columnsRightShadow","public/fixedDataTableRow/columnsShadow","public/fixedDataTableRow/columnsRightShadow"),c={height:o.props.height};return He.createElement("div",{className:l,style:c})}}),xt(At(o),"_onClick",function(s){o.props.onClick(s,o.props.index)}),xt(At(o),"_onContextMenu",function(s){o.props.onContextMenu(s,o.props.index)}),xt(At(o),"_onDoubleClick",function(s){o.props.onDoubleClick(s,o.props.index)}),xt(At(o),"_onMouseUp",function(s){o.props.onMouseUp(s,o.props.index)}),xt(At(o),"_onMouseDown",function(s){o.props.onMouseDown(s,o.props.index)}),xt(At(o),"_onMouseEnter",function(s){o.mouseLeaveIndex=o.props.index,o.props.onMouseEnter&&o.props.onMouseEnter(s,o.props.index)}),xt(At(o),"_onMouseLeave",function(s){o.mouseLeaveIndex===null&&(o.mouseLeaveIndex=o.props.index),o.props.onMouseLeave(s,o.mouseLeaveIndex),o.mouseLeaveIndex=null}),xt(At(o),"_onTouchStart",function(s){o.props.onTouchStart(s,o.props.index)}),xt(At(o),"_onTouchEnd",function(s){o.props.onTouchEnd(s,o.props.index)}),xt(At(o),"_onTouchMove",function(s){o.props.onTouchMove(s,o.props.index)}),o}return Or(n,[{key:"shouldComponentUpdate",value:function(o){return o.isScrolling?o.visible?this.props.visible!==o.visible?!0:!(this.props.index===o.index&&this.props.scrollLeft===o.scrollLeft):!1:!0}},{key:"render",value:function(){var o=this.props.subRowHeight||0,r={width:this.props.width,height:this.props.height+o},i=bn({"fixedDataTableRowLayout/main":!0,"public/fixedDataTableRow/main":!0,"public/fixedDataTableRow/highlighted":this.props.index%2===1,"public/fixedDataTableRow/odd":this.props.index%2===1,"public/fixedDataTableRow/even":this.props.index%2===0}),a=ET(this.props.fixedColumns),s=He.createElement(ow,{key:"fixed_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,left:0,width:a,zIndex:2,columns:this.props.fixedColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:wn.FIXED,isVisible:this.props.visible}),l=this._renderColumnsLeftShadow(a),c=ET(this.props.fixedRightColumns),u=this.props.showScrollbarY?this.props.scrollbarYWidth:0,h=He.createElement(ow,{key:"fixed_right_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,offsetLeft:this.props.width-c-u,width:c,zIndex:2,columns:this.props.fixedRightColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:wn.FIXED_RIGHT,isVisible:this.props.visible}),d=c?this._renderFixedRightColumnsShadow(this.props.width-c-u-5):null,f=He.createElement(ow,{key:"scrollable_cells",isScrolling:this.props.isScrolling,height:this.props.height,cellGroupWrapperHeight:this.props.cellGroupWrapperHeight,align:"right",left:this.props.scrollLeft,offsetLeft:a,width:this.props.width-a-c-u,zIndex:0,columns:this.props.scrollableColumns,touchEnabled:this.props.touchEnabled,onColumnResizeEndCallback:this.props.onColumnResizeEndCallback,onColumnReorderEndCallback:this.props.onColumnReorderEndCallback,rowHeight:this.props.height,rowIndex:this.props.index,isHeaderOrFooter:this.props.isHeaderOrFooter,isHeader:this.props.isHeader,isGroupHeader:this.props.isGroupHeader,isRTL:this.props.isRTL,cellGroupType:wn.SCROLLABLE,isVisible:this.props.visible}),m=ET(this.props.scrollableColumns),p=this._renderColumnsRightShadow(a+m),y=this._getRowExpanded(o),S={height:o,top:this.props.height,width:this.props.width},R=null;if(this.props.showScrollbarY){var $={width:u,height:this.props.height,left:this.props.isRTL?2:this.props.width-u-2};R=He.createElement("div",{style:$,className:bn("public/fixedDataTable/scrollbarSpacer")})}return He.createElement("div",Gr({className:na(i,this.props.className),role:"row","aria-rowindex":this.props.ariaRowIndex},this.props.attributes,{onClick:this.props.onClick?this._onClick:null,onContextMenu:this.props.onContextMenu?this._onContextMenu:null,onDoubleClick:this.props.onDoubleClick?this._onDoubleClick:null,onMouseDown:this.props.onMouseDown?this._onMouseDown:null,onMouseUp:this.props.onMouseUp?this._onMouseUp:null,onMouseEnter:this.props.onMouseEnter||this.props.onMouseLeave?this._onMouseEnter:null,onMouseLeave:this.props.onMouseLeave?this._onMouseLeave:null,onTouchStart:this.props.onTouchStart?this._onTouchStart:null,onTouchEnd:this.props.onTouchEnd?this._onTouchEnd:null,onTouchMove:this.props.onTouchMove?this._onTouchMove:null,style:r}),He.createElement("div",{className:bn("fixedDataTableRowLayout/body")},s,f,l,h,d,R),y&&He.createElement("div",{className:bn("fixedDataTableRowLayout/rowExpanded"),style:S},y),p)}}]),n}(He.Component);xt(Pme,"propTypes",{isScrolling:Be.bool,fixedColumns:Be.array.isRequired,fixedRightColumns:Be.array.isRequired,height:Be.number.isRequired,cellGroupWrapperHeight:Be.number,subRowHeight:Be.number,rowExpanded:Be.oneOfType([Be.element,Be.func]),index:Be.number.isRequired,scrollableColumns:Be.array.isRequired,scrollLeft:Be.number.isRequired,width:Be.number.isRequired,onClick:Be.func,onContextMenu:Be.func,onDoubleClick:Be.func,onColumnReorderEndCallback:Be.func,touchEnabled:Be.bool,isHeaderOrFooter:Be.bool,ariaRowIndex:Be.number,isRTL:Be.bool,attributes:Be.object,onColumnResizeEndCallback:Be.func,isHeader:Be.bool,isGroupHeader:Be.bool,scrollToX:Be.func});var rw=function(e){Bi(n,e);var t=Ame(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),r._initialRender=!0,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"shouldComponentUpdate",value:function(o){return!o.isScrolling||this.props.visible!==o.visible?!0:o.visible?!(o.isScrolling&&this.props.index===o.index&&this.props.offsetTop===o.offsetTop&&this.props.scrollLeft===o.scrollLeft):!1}},{key:"render",value:function(){var o=this.props,r=o.offsetTop,i=o.zIndex,a=op(o,GSt),s={width:this.props.width,height:this.props.height,zIndex:i||0,visibility:a.visible?"visible":"hidden"};return fy(s,0,r,this._initialRender,this.props.isRTL),He.createElement("div",{style:s,className:bn("fixedDataTableRowLayout/rowWrapper")},He.createElement(Pme,a))}}]),n}(He.Component);xt(rw,"propTypes",{isScrolling:Be.bool,height:Be.number.isRequired,zIndex:Be.number,offsetTop:Be.number.isRequired,visible:Be.bool.isRequired,width:Be.number.isRequired});function XSt(e){var t=ZSt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function ZSt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Ome=function(e){Bi(n,e);var t=XSt(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),r._staticRowArray=[],r._initialRender=!0,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialRender=!1}},{key:"shouldComponentUpdate",value:function(){return!0}},{key:"componentWillUnmount",value:function(){this._staticRowArray.length=0}},{key:"render",value:function(){var o=this.props,r=o.offsetTop,i=o.rowOffsets,a=o.scrollTop,s=o.isScrolling,l=o.rowsToRender;l=l||[],s?this._staticRowArray.length=Math.max(this._staticRowArray.length,l.length):this._staticRowArray.length=l.length;for(var c=1e6,u=r-a%c,h=0;h<this._staticRowArray.length;h++){var d,f=zCt(l[h],(d=this._staticRowArray[h])===null||d===void 0?void 0:d.props.index);if(nw(f)||!wm(f,0,this.props.rowSettings.rowsCount)){this._staticRowArray[h]=null;continue}var m=i[f]-Math.floor(a/c)*c;this._staticRowArray[h]=this.renderRow({rowIndex:f,key:h,rowOffsetTop:m})}var p={position:"relative"};fy(p,0,u,!1);var y=this._staticRowArray.slice().sort(this.rowSortComparator);return He.createElement("div",{style:p},y)}},{key:"renderRow",value:function(o){var r=o.rowIndex,i=o.key,a=o.rowOffsetTop,s=this.props,l=s.rowClassNameGetter||oa,c={};c.height=this.props.rowSettings.rowHeightGetter(r),c.subRowHeight=this.props.rowSettings.subRowHeightGetter(r),c.offsetTop=a,c.key=s.rowKeyGetter?s.rowKeyGetter(r):i,c.attributes=s.rowSettings.rowAttributesGetter&&s.rowSettings.rowAttributesGetter(r);var u=r===s.rowSettings.rowsCount-1&&s.showLastRowBorder;c.className=na(l(r),bn("public/fixedDataTable/bodyRow"),bn({"fixedDataTableLayout/hasBottomBorder":u,"public/fixedDataTable/hasBottomBorder":u}));var h=wm(r,this.props.firstViewportRowIndex,this.props.endViewportRowIndex);return He.createElement(rw,Gr({key:i,index:r,ariaRowIndex:r+s.ariaRowIndexOffset,isScrolling:s.isScrolling,width:s.width,rowExpanded:s.rowExpanded,scrollLeft:Math.round(s.scrollLeft),fixedColumns:s.fixedColumns,fixedRightColumns:s.fixedRightColumns,scrollableColumns:s.scrollableColumns,onClick:s.onRowClick,onContextMenu:s.onRowContextMenu,onDoubleClick:s.onRowDoubleClick,onMouseDown:s.onRowMouseDown,onMouseUp:s.onRowMouseUp,onMouseEnter:s.onRowMouseEnter,onMouseLeave:s.onRowMouseLeave,onTouchStart:s.onRowTouchStart,onTouchEnd:s.onRowTouchEnd,onTouchMove:s.onRowTouchMove,showScrollbarY:s.showScrollbarY,scrollbarYWidth:s.scrollbarYWidth,isRTL:s.isRTL,visible:h},c))}},{key:"rowSortComparator",value:function(o,r){var i,a;return((i=o==null?void 0:o.props.ariaRowIndex)!==null&&i!==void 0?i:-1)-((a=r==null?void 0:r.props.ariaRowIndex)!==null&&a!==void 0?a:-1)}}]),n}(He.Component);xt(Ome,"propTypes",{ariaRowIndexOffset:Be.number,isScrolling:Be.bool,firstViewportRowIndex:Be.number.isRequired,endViewportRowIndex:Be.number.isRequired,fixedColumns:Be.array.isRequired,fixedRightColumns:Be.array.isRequired,height:Be.number.isRequired,offsetTop:Be.number.isRequired,onRowClick:Be.func,onRowContextMenu:Be.func,onRowDoubleClick:Be.func,onRowMouseDown:Be.func,onRowMouseUp:Be.func,onRowMouseEnter:Be.func,onRowMouseLeave:Be.func,onRowTouchStart:Be.func,onRowTouchEnd:Be.func,onRowTouchMove:Be.func,rowClassNameGetter:Be.func,rowExpanded:Be.oneOfType([Be.element,Be.func]),rowOffsets:Be.object.isRequired,rowKeyGetter:Be.func,rowSettings:Be.shape({rowAttributesGetter:Be.func,rowHeightGetter:Be.func,rowsCount:Be.number.isRequired,subRowHeightGetter:Be.func}),rowsToRender:Be.array.isRequired,scrollLeft:Be.number.isRequired,scrollTop:Be.number.isRequired,scrollableColumns:Be.array.isRequired,showLastRowBorder:Be.bool,showScrollbarY:Be.bool,width:Be.number.isRequired,isRTL:Be.bool});var QZ=1.6,KSt=1.6,JSt=325,y1=100,QSt=function(){function e(t,n,o,r,i){Pr(this,e),this._dragAnimationId=null,this._trackerId=null,this._deltaX=0,this._deltaY=0,this._lastTouchX=0,this._lastTouchY=0,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),this._autoScrollTimestamp=Date.now(),typeof n!="function"&&(n=n?oa.thatReturnsTrue:oa.thatReturnsFalse),typeof o!="function"&&(o=o?oa.thatReturnsTrue:oa.thatReturnsFalse),this._handleScrollX=n,this._handleScrollY=o,this._preventDefault=r,this._stopPropagation=i,this._onTouchScrollCallback=t,this._didTouchMove=this._didTouchMove.bind(this),this._track=this._track.bind(this),this._autoScroll=this._autoScroll.bind(this),this._startAutoScroll=this._startAutoScroll.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchCancel=this.onTouchCancel.bind(this)}return Or(e,[{key:"onTouchStart",value:function(t){this._lastTouchX=t.touches[0].pageX,this._lastTouchY=t.touches[0].pageY,this._velocityX=0,this._velocityY=0,this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=Date.now(),clearInterval(this._trackerId),this._trackerId=setInterval(this._track,y1),this._stopPropagation&&t.stopPropagation()}},{key:"onTouchEnd",value:function(t){clearInterval(this._trackerId),this._trackerId=null,Dh(this._startAutoScroll),this._stopPropagation&&t.stopPropagation()}},{key:"onTouchCancel",value:function(t){clearInterval(this._trackerId),this._trackerId=null,this._stopPropagation&&t.stopPropagation()}},{key:"onTouchMove",value:function(t){this._preventDefault&&t.preventDefault();var n=t.touches[0].pageX,o=t.touches[0].pageY;this._deltaX=QZ*(this._lastTouchX-n),this._deltaY=QZ*(this._lastTouchY-o);var r=this._handleScrollX(this._deltaX,this._deltaY),i=this._handleScrollY(this._deltaY,this._deltaX);if(!(!r&&!i)){r?this._lastTouchX=n:this._deltaX=0,i?this._lastTouchY=o:this._deltaY=0,t.defaultPrevented||t.preventDefault();var a=!1;(Math.abs(this._deltaX)>2||Math.abs(this._deltaY)>2)&&(this._stopPropagation&&t.stopPropagation(),a=!0),a===!0&&this._dragAnimationId===null&&(this._dragAnimationId=Dh(this._didTouchMove))}}},{key:"_didTouchMove",value:function(){this._dragAnimationId=null,this._onTouchScrollCallback(this._deltaX,this._deltaY),this._accumulatedDeltaX+=this._deltaX,this._accumulatedDeltaY+=this._deltaY,this._deltaX=0,this._deltaY=0}},{key:"_track",value:function(){var t=Date.now(),n=t-this._lastFrameTimestamp,o=this._velocityX,r=this._velocityY,i=.8;n<y1&&(i*=n/y1),o===0&&r===0&&(i=1),this._velocityX=i*(y1*this._accumulatedDeltaX/(1+n)),i<1&&(this._velocityX+=(1-i)*o),this._velocityY=i*(y1*this._accumulatedDeltaY/(1+n)),i<1&&(this._velocityY+=(1-i)*r),this._accumulatedDeltaX=0,this._accumulatedDeltaY=0,this._lastFrameTimestamp=t}},{key:"_startAutoScroll",value:function(){this._autoScrollTimestamp=Date.now(),(this._deltaX>0||this.deltaY>0)&&this._didTouchMove(),this._track(),this._autoScroll()}},{key:"_autoScroll",value:function(){var t=Date.now()-this._autoScrollTimestamp,n=KSt*Math.exp(-t/JSt),o=n*this._velocityX,r=n*this._velocityY;(Math.abs(o)<=5||!this._handleScrollX(o,r))&&(o=0),(Math.abs(r)<=5||!this._handleScrollY(r,o))&&(r=0),(o!==0||r!==0)&&(this._onTouchScrollCallback(o,r),Dh(this._autoScroll))}}]),e}();function ekt(e){var t=tkt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function tkt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var r2=25,g9=function(e){Bi(n,e);var t=ekt(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),xt(At(r),"_shouldHandleTouchX",function(i){return r.props.touchScrollEnabled&&r._shouldHandleWheelX(i)}),xt(At(r),"_shouldHandleTouchY",function(i){return r.props.touchScrollEnabled&&r._shouldHandleWheelY(i)}),xt(At(r),"_shouldHandleWheelX",function(i){var a=r.props,s=a.maxScrollX,l=a.scrollFlags,c=a.scrollX,u=l.overflowX;return u==="hidden"||(i=Math.round(i),i===0)?!1:i<0&&c>0||i>=0&&c<s}),xt(At(r),"_shouldHandleWheelY",function(i){var a=r.props,s=a.maxScrollY,l=a.scrollFlags,c=a.scrollY,u=l.overflowY;return u==="hidden"||i===0||(i=Math.round(i),i===0)?!1:i<0&&c>0||i>=0&&c<s}),xt(At(r),"_reportContentHeight",function(){var i=av(r.props),a=i.contentHeight,s=r.props.onContentHeightChange;a!==r._contentHeight&&s&&s(a),r._contentHeight=a}),xt(At(r),"_renderRows",function(i,a,s,l,c,u){var h=Gm(r.props),d=h.scrollEnabledY,f=r.props;return He.createElement(Ome,{ariaRowIndexOffset:u,isScrolling:f.scrolling,fixedColumns:a,fixedRightColumns:s,firstViewportRowIndex:f.firstRowIndex,endViewportRowIndex:f.endRowIndex,height:c,offsetTop:i,onRowClick:f.onRowClick,onRowContextMenu:f.onRowContextMenu,onRowDoubleClick:f.onRowDoubleClick,onRowMouseUp:f.onRowMouseUp,onRowMouseDown:f.onRowMouseDown,onRowMouseEnter:f.onRowMouseEnter,onRowMouseLeave:f.onRowMouseLeave,onRowTouchStart:f.touchScrollEnabled?f.onRowTouchStart:null,onRowTouchEnd:f.touchScrollEnabled?f.onRowTouchEnd:null,onRowTouchMove:f.touchScrollEnabled?f.onRowTouchMove:null,rowClassNameGetter:f.rowClassNameGetter,rowExpanded:f.rowExpanded,rowKeyGetter:f.rowKeyGetter,rowSettings:f.rowSettings,scrollLeft:f.scrollX,scrollTop:f.scrollY,scrollableColumns:l,showLastRowBorder:!0,width:f.tableSize.width,rowsToRender:f.rows,rowOffsets:f.rowOffsets,showScrollbarY:d,scrollbarYWidth:f.scrollbarYWidth,isRTL:f.isRTL})}),xt(At(r),"_onRef",function(i){r._divRef=i,r._wheelHandler&&(r.props.stopReactWheelPropagation?r._wheelHandler.setRoot(i):r._wheelHandler.setRoot(null))}),xt(At(r),"_onScroll",function(i,a){var s=r.props,l=s.maxScrollX,c=s.maxScrollY,u=s.onHorizontalScroll,h=s.onVerticalScroll,d=s.scrollActions,f=s.scrollFlags,m=s.scrollX,p=s.scrollY,y=f.overflowX,S=f.overflowY,R=m,$=p;if(Math.abs(a)>Math.abs(i)&&S!=="hidden")$+=a,$=$<0?0:$,$=$>c?c:$,(!h||h($))&&d.scrollToY($);else if(i&&y!=="hidden"){R+=i,R=R<0?0:R,R=R>l?l:R;var j=Math.round(R);(!u||u(j))&&d.scrollToX(j)}}),xt(At(r),"_scrollTo",function(i,a){r.props.scrollActions.scrollToX(i),r.props.scrollActions.scrollToY(a)}),xt(At(r),"_didScroll",function(i){var a=r.props,s=a.onScrollStart,l=a.scrollX,c=a.scrollY,u=a.onHorizontalScroll,h=a.onVerticalScroll,d=a.tableSize.ownerHeight,f=a.scrolling,m=i.endRowIndex,p=i.firstRowIndex,y=i.scrollX,S=i.scrollY,R=i.tableSize.ownerHeight,$=i.scrolling,j=d!==R&&!(WZ(d)&&WZ(R)),E=l!==y,A=c!==S;!j&&!E&&!A||(!$&&f&&s&&s(y,S,p,m),E&&u&&u(l),A&&h&&h(c),r._didScrollStop())}),xt(At(r),"_didScrollStopSync",function(){var i=r.props,a=i.endRowIndex,s=i.firstRowIndex,l=i.onScrollEnd,c=i.scrollActions,u=i.scrollX,h=i.scrollY,d=i.scrolling;d&&(c.stopScroll(),l&&l(u,h,s,a))}),r._didScrollStop=uCt(r._didScrollStopSync,200,At(r)),r._onKeyDown=r._onKeyDown.bind(At(r)),r._setupHandlers(),r}return Or(n,[{key:"componentWillUnmount",value:function(){this._cleanupHandlers(),this._didScrollStop.reset(),this._didScrollStopSync()}},{key:"_setupHandlers",value:function(){this._wheelHandler||(this._wheelHandler=new tme(this._onScroll,this._shouldHandleWheelX,this._shouldHandleWheelY,this.props.isRTL,this.props.stopScrollDefaultHandling,this.props.stopScrollPropagation)),this._touchHandler||(this._touchHandler=new QSt(this._onScroll,this._shouldHandleTouchX,this._shouldHandleTouchY,this.props.stopScrollDefaultHandling,this.props.stopScrollPropagation)),this._divRef&&this._divRef.addEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this.props.touchScrollEnabled&&this._divRef&&this._divRef.addEventListener("touchmove",this._touchHandler.onTouchMove,{passive:!1})}},{key:"_cleanupHandlers",value:function(){this._wheelHandler&&(this._divRef&&this._divRef.removeEventListener("wheel",this._wheelHandler.onWheel,{passive:!1}),this._wheelHandler=null),this._touchHandler&&(this._divRef&&this._divRef.removeEventListener("touchmove",this._touchHandler.onTouchMove,{passive:!1}),this._touchHandler=null)}},{key:"_onKeyDown",value:function(o){var r=av(this.props),i=r.scrollbarYHeight;if(this.props.keyboardPageEnabled)switch(o.key){case"PageDown":this._onScroll(0,i),o.preventDefault();break;case"PageUp":this._onScroll(0,i*-1),o.preventDefault();break}if(this.props.keyboardScrollEnabled)switch(o.key){case"ArrowDown":this._onScroll(0,r2),o.preventDefault();break;case"ArrowUp":this._onScroll(0,r2*-1),o.preventDefault();break;case"ArrowRight":this._onScroll(r2,0),o.preventDefault();break;case"ArrowLeft":this._onScroll(r2*-1,0),o.preventDefault();break}}},{key:"shouldComponentUpdate",value:function(o){return!a_(this.props,o)}},{key:"componentDidMount",value:function(){this._setupHandlers(),this._reportContentHeight(),this._reportScrollBarsUpdates()}},{key:"componentDidUpdate",value:function(o){this._didScroll(o),this._reportContentHeight(),this._reportScrollBarsUpdates()}},{key:"_reportScrollBarsUpdates",value:function(){var o=av(this.props),r=o.bodyOffsetTop,i=o.scrollbarXOffsetTop,a=o.visibleRowsHeight,s=this.props,l=s.tableSize.width,c=s.scrollContentHeight,u=s.scrollY,h=s.scrollX,d={viewportHeight:a,contentHeight:c,scrollbarYOffsetTop:r,scrollY:u,viewportWidth:l,contentWidth:l+this.props.maxScrollX,scrollbarXOffsetTop:i,scrollX:h,scrollTo:this._scrollTo,scrollToX:this.props.scrollActions.scrollToX,scrollToY:this.props.scrollActions.scrollToY};a_(this.previousScrollState,d)||(this.props.onScrollBarsUpdate(d),this.previousScrollState=d)}},{key:"render",value:function(){var o=pCt(this.props),r=o.ariaGroupHeaderIndex,i=o.ariaHeaderIndex,a=o.ariaFooterIndex,s=o.ariaRowCount,l=o.ariaRowIndexOffset,c=$Ct(this.props),u=c.fixedColumnGroups,h=c.fixedColumns,d=c.fixedRightColumnGroups,f=c.fixedRightColumns,m=c.scrollableColumnGroups,p=c.scrollableColumns,y=av(this.props),S=y.bodyHeight,R=y.bodyOffsetTop,$=y.componentHeight,j=y.footOffsetTop,E=y.scrollbarXOffsetTop,A=y.visibleRowsHeight,D=this.props,N=D.className,W=D.elementHeights,P=D.gridAttributesGetter,_=D.maxScrollY,g=D.onColumnReorderEndCallback,T=D.onColumnResizeEndCallback,M=D.scrollContentHeight,O=D.scrollX,H=D.scrollY,G=D.scrolling,V=D.tableSize,z=D.touchScrollEnabled,I=D.scrollbarYWidth,C=V.ownerHeight,k=V.width,v=W.cellGroupWrapperHeight,w=W.footerHeight,b=W.groupHeaderHeight,x=W.headerHeight,F=Gm(this.props),B=F.scrollEnabledX,U=F.scrollEnabledY,X=P&&P(),ee;b>0&&(ee=He.createElement(rw,{key:"group_header",ariaRowIndex:r,isHeaderOrFooter:!0,isScrolling:G,className:na(bn("fixedDataTableLayout/header"),bn("public/fixedDataTable/header")),width:k,height:b,cellGroupWrapperHeight:v,index:0,zIndex:1,offsetTop:0,scrollLeft:O,fixedColumns:u,fixedRightColumns:d,scrollableColumns:m,visible:!0,touchEnabled:z,onColumnResizeEndCallback:T,onColumnReorderEndCallback:g,showScrollbarY:U,scrollbarYWidth:I,isRTL:this.props.isRTL,isHeader:!0,isGroupHeader:!0}));var J;U&&(J=this.props.scrollbarY);var q;B&&(q=this.props.scrollbarX);var Z=null;w&&(Z=He.createElement(rw,{key:"footer",ariaRowIndex:a,isHeaderOrFooter:!0,isScrolling:G,className:na(bn("fixedDataTableLayout/footer"),bn("public/fixedDataTable/footer")),width:k,height:w,index:-1,zIndex:1,offsetTop:j,visible:!0,fixedColumns:h.footer,fixedRightColumns:f.footer,scrollableColumns:p.footer,scrollLeft:O,showScrollbarY:U,scrollbarYWidth:I,isRTL:this.props.isRTL}));var K=this._renderRows(R,h.cell,f.cell,p.cell,S,l),re=He.createElement(rw,{key:"header",ariaRowIndex:i,isHeaderOrFooter:!0,isScrolling:G,className:na(bn("fixedDataTableLayout/header"),bn("public/fixedDataTable/header")),width:k,height:x,cellGroupWrapperHeight:v,index:-1,zIndex:1,offsetTop:b,scrollLeft:O,visible:!0,fixedColumns:h.header,fixedRightColumns:f.header,scrollableColumns:p.header,touchEnabled:z,onColumnResizeEndCallback:T,onColumnReorderEndCallback:g,showScrollbarY:U,scrollbarYWidth:I,isRTL:this.props.isRTL,isHeader:!0}),ie;H&&(ie=He.createElement("div",{className:na(bn("fixedDataTableLayout/topShadow"),bn("public/fixedDataTable/topShadow")),style:{top:R}}));var te=C&&C<$&&M>A,ne;(te||H<_)&&(ne=He.createElement("div",{className:na(bn("fixedDataTableLayout/bottomShadow"),bn("public/fixedDataTable/bottomShadow")),style:{top:j}}));var oe=null;(this.props.keyboardPageEnabled||this.props.keyboardScrollEnabled)&&(oe=0);var ce=N;return this.props.isRTL&&(ce=na(ce,"fixedDataTable_isRTL")),He.createElement("div",Gr({className:na(ce,bn("fixedDataTableLayout/main"),bn("public/fixedDataTable/main")),role:"grid","aria-rowcount":s},X,{tabIndex:oe,onKeyDown:this._onKeyDown,onTouchStart:z?this._touchHandler.onTouchStart:null,onTouchEnd:z?this._touchHandler.onTouchEnd:null,onTouchCancel:z?this._touchHandler.onTouchCancel:null,ref:this._onRef,style:{height:$,width:k}}),He.createElement("div",{className:bn("fixedDataTableLayout/rowsContainer"),style:{height:E,width:k}},ee,re,K,Z,ie,ne),J,q)}}]),n}(He.Component);xt(g9,"propTypes",{width:Be.number.isRequired,height:Be.number,className:Be.string,maxHeight:Be.number,ownerHeight:Be.number,overflowX:Be.oneOf(["hidden","auto"]),overflowY:Be.oneOf(["hidden","auto"]),touchScrollEnabled:Be.bool,keyboardScrollEnabled:Be.bool,keyboardPageEnabled:Be.bool,scrollbarX:Be.node,scrollbarXHeight:Be.number,scrollbarY:Be.node,scrollbarYWidth:Be.number,onScrollBarsUpdate:Be.func,defaultScrollbars:Be.bool,showScrollbarX:Be.bool,showScrollbarY:Be.bool,onHorizontalScroll:Be.func,onVerticalScroll:Be.func,rowsCount:Be.number.isRequired,rowHeight:Be.number.isRequired,rowHeightGetter:Be.func,subRowHeight:Be.number,subRowHeightGetter:Be.func,rowExpanded:Be.oneOfType([Be.element,Be.func]),rowClassNameGetter:Be.func,rowKeyGetter:Be.func,groupHeaderHeight:Be.number,headerHeight:Be.number.isRequired,cellGroupWrapperHeight:Be.number,footerHeight:Be.number,scrollLeft:Be.number,scrollToColumn:Be.number,scrollTop:Be.number,isVerticalScrollExact:Be.bool,scrollToRow:Be.number,onScrollStart:Be.func,onScrollEnd:Be.func,stopReactWheelPropagation:Be.bool,stopScrollDefaultHandling:Be.bool,stopScrollPropagation:Be.bool,onContentHeightChange:Be.func,onRowClick:Be.func,onRowContextMenu:Be.func,onRowDoubleClick:Be.func,onRowMouseDown:Be.func,onRowMouseUp:Be.func,onRowMouseEnter:Be.func,onRowMouseLeave:Be.func,onRowTouchStart:Be.func,onRowTouchEnd:Be.func,onRowTouchMove:Be.func,onColumnResizeEndCallback:Be.func,onColumnReorderEndCallback:Be.func,isRTL:Be.bool,bufferRowCount:Be.number,elementHeights:Be.shape({cellGroupWrapperHeight:Be.number,footerHeight:Be.number,groupHeaderHeight:Be.number,headerHeight:Be.number}),gridAttributesGetter:Be.func,rowAttributesGetter:Be.func});xt(g9,"defaultProps",{elementHeights:{cellGroupWrapperHeight:void 0,footerHeight:0,groupHeaderHeight:0,headerHeight:0},keyboardScrollEnabled:!1,keyboardPageEnabled:!1,touchScrollEnabled:!1,stopScrollPropagation:!1});var nkt={get:function(){return H_t({reducer:X_t,devTools:process.env.NODE_ENV!=="production",middleware:function(e){return e({immutableCheck:!1,serializableCheck:!1})}})}},okt=q8,rkt=gS,ikt=xO,akt=xc,skt=mS,lkt=r_.exports,ckt=CO,ukt=Afe,dkt="[object Map]",pkt="[object Set]",hkt=Object.prototype,fkt=hkt.hasOwnProperty;function mkt(e){if(e==null)return!0;if(skt(e)&&(akt(e)||typeof e=="string"||typeof e.splice=="function"||lkt(e)||ukt(e)||ikt(e)))return!e.length;var t=rkt(e);if(t==dkt||t==pkt)return!e.size;if(ckt(e))return!okt(e).length;for(var n in e)if(fkt.call(e,n))return!1;return!0}var eK=mkt;function Dme(e){var t=gkt();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function gkt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var vkt=function(e){Bi(n,e);var t=Dme(n);function n(){var o;Pr(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return o=t.call.apply(t,[this].concat(i)),xt(At(o),"state",{}),xt(At(o),"_onScrollBarsUpdate",function(s){o.setState(s)}),xt(At(o),"_onVerticalScroll",function(s){o.state.scrollToY!==void 0&&o.state.scrollToY(s)}),xt(At(o),"_onHorizontalScroll",function(s){o.state.scrollToX!==void 0&&o.state.scrollToX(s)}),o}return Or(n,[{key:"render",value:function(){var o=!eK(this.state)&&He.createElement(fl,{size:this.state.viewportHeight,contentSize:this.state.contentHeight,onScroll:this._onVerticalScroll,verticalTop:this.state.scrollbarYOffsetTop,position:this.state.scrollY,touchEnabled:this.props.touchScrollEnabled,isRTL:this.props.isRTL}),r=!eK(this.state)&&He.createElement(Nme,{contentSize:this.state.contentWidth,offset:this.state.scrollbarXOffsetTop,onScroll:this._onHorizontalScroll,position:this.state.scrollX,size:this.state.viewportWidth,touchEnabled:this.props.touchScrollEnabled,isRTL:this.props.isRTL});return He.cloneElement(this.props.children,{onScrollBarsUpdate:this._onScrollBarsUpdate,scrollbarX:r,scrollbarY:o})}}]),n}(He.Component),Nme=function(e){Bi(n,e);var t=Dme(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){var o=this.props,r=o.offset,i=o.size,a={height:fl.SIZE,width:i},s={height:fl.SIZE,overflow:"hidden",width:i,top:r};return He.createElement("div",{className:na(bn("public/fixedDataTable/horizontalScrollbar")),style:a},He.createElement("div",{style:s},He.createElement(fl,Gr({},this.props,{isOpaque:!0,orientation:"horizontal",offset:void 0}))))}}]),n}(He.PureComponent);xt(Nme,"propTypes",{contentSize:Be.number.isRequired,offset:Be.number.isRequired,onScroll:Be.func.isRequired,position:Be.number.isRequired,size:Be.number.isRequired,isRTL:Be.bool});var ykt=function(){return Bp([function(e){return av(e).componentHeight},function(e){return e.elementHeights.groupHeaderHeight},function(e){return e.scrollX},function(e){return e.maxScrollX},function(e){return vS(e).availableScrollWidth},function(e){return e.isRTL}],function(e,t,n,o,r,i){return{tableHeight:e,groupHeaderHeight:t,scrollX:n,maxScrollX:o,availableScrollWidth:r,isRTL:i}})},bkt=Dg,xkt=xc,wkt=Sf,_kt="[object String]";function Ckt(e){return typeof e=="string"||!xkt(e)&&wkt(e)&&bkt(e)==_kt}var Skt=Ckt;function kkt(e){return function(t){return t==null?void 0:t[e]}}var Tkt=kkt,Mkt=Tkt,Ekt=Mkt("length"),Akt=Ekt,Pkt="\\ud800-\\udfff",Okt="\\u0300-\\u036f",Dkt="\\ufe20-\\ufe2f",Nkt="\\u20d0-\\u20ff",Lkt=Okt+Dkt+Nkt,Ikt="\\ufe0e\\ufe0f",Rkt="\\u200d",jkt=RegExp("["+Rkt+Pkt+Lkt+Ikt+"]");function $kt(e){return jkt.test(e)}var Fkt=$kt,Lme="\\ud800-\\udfff",zkt="\\u0300-\\u036f",Bkt="\\ufe20-\\ufe2f",Hkt="\\u20d0-\\u20ff",Wkt=zkt+Bkt+Hkt,Vkt="\\ufe0e\\ufe0f",Ukt="["+Lme+"]",v6="["+Wkt+"]",y6="\\ud83c[\\udffb-\\udfff]",Gkt="(?:"+v6+"|"+y6+")",Ime="[^"+Lme+"]",Rme="(?:\\ud83c[\\udde6-\\uddff]){2}",jme="[\\ud800-\\udbff][\\udc00-\\udfff]",qkt="\\u200d",$me=Gkt+"?",Fme="["+Vkt+"]?",Ykt="(?:"+qkt+"(?:"+[Ime,Rme,jme].join("|")+")"+Fme+$me+")*",Xkt=Fme+$me+Ykt,Zkt="(?:"+[Ime+v6+"?",v6,Rme,jme,Ukt].join("|")+")",tK=RegExp(y6+"(?="+y6+")|"+Zkt+Xkt,"g");function Kkt(e){for(var t=tK.lastIndex=0;tK.test(e);)++t;return t}var Jkt=Kkt,Qkt=Akt,e2t=Fkt,t2t=Jkt;function n2t(e){return e2t(e)?t2t(e):Qkt(e)}var o2t=n2t,r2t=q8,i2t=gS,a2t=mS,s2t=Skt,l2t=o2t,c2t="[object Map]",u2t="[object Set]";function d2t(e){if(e==null)return 0;if(a2t(e))return s2t(e)?l2t(e):e.length;var t=i2t(e);return t==c2t||t==u2t?e.size:r2t(e).length}var P3=d2t,p2t=function(e){return{offset:e.offset,width:e.width,index:e.index,columnKey:e.columnKey}},i2=function(e){return{offset:e.offset,width:e.width,index:e.index,columnKey:e.columnKey}},h2t=function(){return Bp([function(e){return vS(e)},function(e,t){return t}],function(e,t){var n=e.fixedColumns,o=e.fixedRightColumns,r=e.scrollableColumns,i=e.fixedColumnGroups,a=e.fixedRightColumnGroups,s=e.scrollableColumnGroups,l=function(O){var H=n.length+r.length+o.length;if(O<0||O>=H||!Number.isInteger(O))throw"columnIndex must be an integer between 0 and ".concat(H-1," inclusive")},c=function(O){var H=i.length+s.length+a.length;if(O<0||O>=H||!Number.isInteger(O))throw"columnGroupIndex must be an integer between 0 and ".concat(H-1," inclusive")},u=function(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(H&&nw(O))&&O!==wn.FIXED&&O!==wn.FIXED_RIGHT&&O!==wn.SCROLLABLE)throw"Invalid CellGroupType"},h=function(O){return O<n.length?wn.FIXED:O<n.length+r.length?wn.SCROLLABLE:wn.FIXED_RIGHT},d=function(O){return O<i.length?wn.FIXED:O<i.length+s.length?wn.SCROLLABLE:wn.FIXED_RIGHT},f=function(O,H){if(H===wn.FIXED)return O;if(H===wn.SCROLLABLE)return O-n.length;if(H===wn.FIXED_RIGHT)return O-n.length-r.length},m=function(O,H){if(H===wn.FIXED)return O;if(H===wn.SCROLLABLE)return O-i.length;if(H===wn.FIXED_RIGHT)return O-i.length-s.length},p=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wn.SCROLLABLE;u(O);var H=D(O);return H.reduce(function(G,V){return G+V.width},0)},y=function(O,H){var G=D(H),V=f(O,H);return G[V]},S=function(O){l(O);var H=h(O),G=y(O,H);return p2t(G)},R=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(u(O,!0),nw(O))return n.length+r.length+o.length;var H=D(O);return H.length},$=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;if(u(O,!0),nw(O))return i.length+s.length+a.length;var H=N(O);return H.length},j=function(O,H){var G=N(H),V=m(O,H);return i2(G[V])},E=function(O){c(O);var H=d(O);return j(O,H)},A=function(O){l(O);var H=h(O),G=y(O,H).groupIdx,V=W(G);return i2(V)},D=function(O){if(O===wn.FIXED)return n;if(O===wn.FIXED_RIGHT)return o;if(O===wn.SCROLLABLE)return r;throw"Invalid cell group type"},N=function(O){if(O===wn.FIXED)return i;if(O===wn.FIXED_RIGHT)return a;if(O===wn.SCROLLABLE)return s;throw"Invalid cell group type"},W=function(O){var H=P3(i),G=P3(s),V=P3(a);if(wm(O,0,H))return i[O];if(wm(O,H,H+G))return s[O-H];if(wm(O,H+G,H+G+V))return a[O-H-G];throw"Invalid absolute column group index"},P=function(O,H){if(O.length===0)return{element:null,distanceFromOffset:null};for(var G=0,V=0;V!==O.length&&!(G>H);)G+=O[V].width,V++;return V=MO(V-1,0,O.length-1),{element:O[V],distanceFromOffset:O[V].width-(G-H)}},_=function(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wn.SCROLLABLE;u(H);var G=D(H),V=P(G,O),z=V.element,I=V.distanceFromOffset;return z&&(z=i2(z)),{column:z,distanceFromOffset:I}},g=function(O){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wn.SCROLLABLE;u(H);var G=N(H),V=P(G,O),z=V.element,I=V.distanceFromOffset;return z&&(z=i2(z)),{columnGroup:z,distanceFromOffset:I}},T=t.scrollToX,M=t.updateRowHeights;return{getColumn:S,getColumnGroup:E,getColumnGroupByChild:A,getColumnAtOffset:_,getColumnGroupAtOffset:g,getCellGroupWidth:p,getColumnCount:R,getColumnGroupCount:$,scrollToX:T,updateRowHeights:M}})};function nK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function O3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nK(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nK(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}var f2t=function(){var e=[],t=null,n=function(i){return e=e.concat(i),function(){var a=e.indexOf(i);e.splice(a,1)}},o=ykt(),r=h2t();return{getValue:Bp([function(i){return o(i)},function(i,a){return r(i,a)}],function(i,a){return t=O3(O3(O3({},i),a),{},{subscribe:n}),t}),notify:function(){e.forEach(function(i){return i(t)})}}};function oK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function a2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oK(Object(n),!0).forEach(function(o){xt(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oK(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function m2t(e){var t=g2t();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function g2t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var zme=function(e){Bi(n,e);var t=m2t(n);function n(o){var r;return Pr(this,n),r=t.call(this,o),r._initialize(o),r.fixedDataTableApi=f2t(),r.previousApiValue=null,r}return Or(n,[{key:"componentDidMount",value:function(){this._initialize(this.props)}},{key:"componentWillUnmount",value:function(){this._cleanup()}},{key:"componentDidUpdate",value:function(){this.notifyApiValueChanges()}},{key:"_initialize",value:function(o){var r=this;if(!this.reduxStore){this.reduxStore=nkt.get(),this.reduxStore.dispatch(Z_t(o)),this.scrollActions=nCt(this.reduxStore,function(){return r.props}),this.unsubscribe=this.reduxStore.subscribe(this.onStoreUpdate.bind(this));var i={boundState:n.getBoundState(this.reduxStore),reduxStore:this.reduxStore,props:o};this.state?this.setState(i):this.state=i}}},{key:"_cleanup",value:function(){this.reduxStore&&(this.unsubscribe(),this.unsubscribe=null,this.reduxStore=null)}},{key:"getApi",value:function(){var o=this;return this.fixedDataTableApi.getValue(a2(a2({},this.props),this.reduxStore.getState()),a2(a2({},this.scrollActions),{},{updateRowHeights:function(r){return Mfe({updateRowHeights:tCt},o.reduxStore.dispatch).updateRowHeights(r)}}))}},{key:"notifyApiValueChanges",value:function(){var o=this.getApi();this.previousApiValue!==o&&(this.fixedDataTableApi.notify(),this.previousApiValue=o)}},{key:"render",value:function(){var o=this.getApi(),r=He.createElement(g9,Gr({},this.props,this.state.boundState,{scrollActions:this.scrollActions}));return this.props.defaultScrollbars?He.createElement(gy.Provider,{value:o},He.createElement(vkt,this.props,r)):He.createElement(gy.Provider,{value:o},r)}},{key:"onStoreUpdate",value:function(){var o=n.getBoundState(this.reduxStore);this.state.boundState.propsRevision===o.propsRevision&&this.setState({boundState:o})}}],[{key:"getDerivedStateFromProps",value:function(o,r){return zu(o.height!==void 0||o.maxHeight!==void 0,"You must set either a height or a maxHeight"),o===r.props?null:(r.reduxStore.dispatch(K_t({newProps:o,oldProps:r.props})),{boundState:n.getBoundState(r.reduxStore),props:o})}},{key:"getBoundState",value:function(o){var r=o.getState(),i=vx(r,["columnGroupElements","columnElements","elementHeights","elementTemplates","firstRowIndex","endRowIndex","maxScrollX","maxScrollY","propsRevision","rows","rowOffsets","rowSettings","scrollContentHeight","scrollFlags","scrollX","scrollY","scrolling","scrollJumpedX","scrollJumpedY","tableSize"]);return i}}]),n}(He.Component);xt(zme,"defaultProps",{defaultScrollbars:!0,scrollbarXHeight:fl.SIZE,scrollbarYWidth:fl.SIZE});var v2t=_me(zme);function y2t(e){var t=b2t();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function b2t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var zO=function(e){Bi(n,e);var t=y2t(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){if(process.env.NODE_ENV!=="production")throw new Error("Component <FixedDataTableColumn /> should never render");return null}}]),n}(He.Component);xt(zO,"__TableColumn__",!0);xt(zO,"propTypes",{align:Be.oneOf(["left","center","right"]),fixed:Be.bool,fixedRight:Be.bool,header:Be.oneOfType([Be.node,Be.func]),cell:Be.oneOfType([Be.node,Be.func]),footer:Be.oneOfType([Be.node,Be.func]),columnKey:Be.oneOfType([Be.string,Be.number]),width:Be.number.isRequired,minWidth:Be.number,maxWidth:Be.number,flexGrow:Be.number,isResizable:Be.bool,isReorderable:Be.bool,allowCellsRecycling:Be.bool,pureRendering:Be.bool,cellClassName:Be.string});xt(zO,"defaultProps",{allowCellsRecycling:!1,fixed:!1,fixedRight:!1});function x2t(e){var t=w2t();return function(){var n=Kn(e),o;if(t){var r=Kn(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return Oa(this,o)}}function w2t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var v9=function(e){Bi(n,e);var t=x2t(n);function n(){return Pr(this,n),t.apply(this,arguments)}return Or(n,[{key:"render",value:function(){if(process.env.NODE_ENV!=="production")throw new Error("Component <FixedDataTableColumnGroup /> should never render");return null}}]),n}(He.Component);xt(v9,"__TableColumnGroup__",!0);xt(v9,"propTypes",{align:Be.oneOf(["left","center","right"]),fixed:Be.bool,header:Be.oneOfType([Be.node,Be.func])});xt(v9,"defaultProps",{fixed:!1});const _2t=()=>typeof window>"u"||typeof document>"u"||!document.body||typeof window.innerWidth!="number"||typeof document.body.clientWidth!="number"?0:Math.max(0,window.innerWidth-document.body.clientWidth),C2t="#f4f4f8",S2t="#edeef1",k2t="#e3e5ea",T2t="#f9f9fb",M2t="#ffcb05",E2t="#1faff3",A2t="#e5e5e5",P2t="#5b6372",O2t="#3a4356",D2t="#3c3c42",N2t="#a3a3a3",L2t="#d0d3db",I2t="_headerCell_2qf2w_16",R2t="_noSort_2qf2w_29",j2t="_standard_2qf2w_29",$2t="_caret_2qf2w_33",F2t="_headerLabel_2qf2w_38",z2t="_icon_2qf2w_43",B2t="_numberIcon_2qf2w_50",H2t="_dateIcon_2qf2w_54",W2t="_textIcon_2qf2w_58",V2t="_booleanIcon_2qf2w_62",U2t="_sortIcon_2qf2w_66",G2t="_sortAscending_2qf2w_74",q2t="_sortDescending_2qf2w_78",Qp={athensGray:C2t,athensGrayDark:S2t,athensGrayDark2:k2t,athensGrayLight:T2t,defaultBrandColor:M2t,dodgerBlue:E2t,mercury:A2t,shuttleGrayDark:P2t,oxfordBlue:O2t,darkModeDefaultBackground:D2t,indicatorGrey:N2t,secondaryButtonHover:L2t,headerCell:I2t,noSort:R2t,standard:j2t,caret:$2t,headerLabel:F2t,icon:z2t,numberIcon:B2t,dateIcon:H2t,textIcon:W2t,booleanIcon:V2t,sortIcon:U2t,sortAscending:G2t,sortDescending:q2t},Y2t="_icon_t30x8_1",X2t="_numberIcon_t30x8_11",Z2t="_dateIcon_t30x8_15",K2t="_textIcon_t30x8_19",J2t="_booleanIcon_t30x8_23",b1={icon:Y2t,numberIcon:X2t,dateIcon:Z2t,textIcon:K2t,booleanIcon:J2t},Q2t=({columnType:e})=>ge("div",{className:tf(b1.icon,{[b1.numberIcon]:Fr(e),[b1.dateIcon]:ki(e),[b1.textIcon]:kC(e),[b1.booleanIcon]:Ose(e)})}),eTt=({column:e,onClick:t,isSelected:n,children:o,showFieldTypeIcon:r,sortIcon:i="standard"})=>rt("div",{className:Qp.headerCell,onClick:()=>{t(e)},children:[r&&ge(Q2t,{columnType:e.type}),ge("div",{className:Qp.headerLabel,children:o}),ge("div",{className:tf(Qp.sortIcon,{[Qp.caret]:i==="caret",[Qp.standard]:i==="standard",[Qp.noSort]:!n||e.direction===0,[Qp.sortAscending]:n&&e.direction===1,[Qp.sortDescending]:n&&e.direction===-1})})]}),tTt=26,nTt=26,rK=8,Bme=36,Hme=29,Wme=24,b6=350,oTt=126,rTt=38,iTt=55,aTt=(e,t,n,o)=>{const r=document.createElement("canvas").getContext("2d");if(!r)return[];r.font=`13px ${o||"Open Sans"}`;const i=e.columns.map(u=>r.measureText(u.name).width+Bme+(t?Hme:0)),a=r.measureText("0").width,s=e.columns.map(u=>({type:Dz(u.type),index:u.index})),{rows:l}=e,c=s.map(u=>{const h=l.reduce((d,f)=>{var m;const p=f[u.index].displayValue,y=(m=n[u.index])!=null&&m.isHtml?sTt(p):p,S=u.type==="number"?f[u.index].displayValue.length*a:r.measureText(y).width;return Math.max(d,S)},0);return Wme+h});return i.map((u,h)=>{var d;return(d=n[h])!=null&&d.width?n[h].width:Math.ceil(Math.max(oTt,Math.min(b6,Math.max(u,c[h]))))})};function sTt(e){const t=document.createElement("div");return t.innerHTML=e,Vme(t)}function Vme(e){let t,n,o,r;for(n="",t=0;t<e.childNodes.length;t++)r=e.childNodes[t],o=null,r.nodeType===1?o=Vme(r):r.nodeType===3&&(o=r.nodeValue),o&&(n+=o);return n}const iK=e=>e%2===1,aK=({colIndex:e=0,rowIndex:t=0,themeSettings:n,customStyles:o,isHeaderCell:r})=>{var i,a,s,l,c,u,h,d,f,m,p,y,S,R,$,j,E,A;let D=n.chart.textColor;const N=n.typography.fontFamily;let W=n.chart.backgroundColor;const P=Fi(W);return r?(a=(i=o==null?void 0:o.header)==null?void 0:i.color)!=null&&a.enabled&&(W=((l=(s=o==null?void 0:o.header)==null?void 0:s.color)==null?void 0:l.backgroundColor)||P,D=((u=(c=o==null?void 0:o.header)==null?void 0:c.color)==null?void 0:u.textColor)||D):((d=(h=o==null?void 0:o.columns)==null?void 0:h.alternatingColor)!=null&&d.enabled&&iK(e)&&(W=((m=(f=o==null?void 0:o.columns)==null?void 0:f.alternatingColor)==null?void 0:m.backgroundColor)||P,D=((y=(p=o==null?void 0:o.columns)==null?void 0:p.alternatingColor)==null?void 0:y.textColor)||D),(R=(S=o==null?void 0:o.rows)==null?void 0:S.alternatingColor)!=null&&R.enabled&&iK(t)&&(W=((j=($=o==null?void 0:o.rows)==null?void 0:$.alternatingColor)==null?void 0:j.backgroundColor)||P,D=((A=(E=o==null?void 0:o.rows)==null?void 0:E.alternatingColor)==null?void 0:A.textColor)||D)),{color:D,backgroundColor:W,fontFamily:N}},lTt="#f4f4f8",cTt="#edeef1",uTt="#e3e5ea",dTt="#f9f9fb",pTt="#ffcb05",hTt="#1faff3",fTt="#e5e5e5",mTt="#5b6372",gTt="#3a4356",vTt="#3c3c42",yTt="#a3a3a3",bTt="#d0d3db",xTt="_tableWrapper_1ode4_16",wTt="_table_1ode4_16",_Tt="_tableHeader_1ode4_78",CTt="_tableCell_1ode4_88",STt="_tableCellContent_1ode4_99",kTt="_headerColor_1ode4_105",TTt="_rowColor_1ode4_109",bx={athensGray:lTt,athensGrayDark:cTt,athensGrayDark2:uTt,athensGrayLight:dTt,defaultBrandColor:pTt,dodgerBlue:hTt,mercury:fTt,shuttleGrayDark:mTt,oxfordBlue:gTt,darkModeDefaultBackground:vTt,indicatorGrey:yTt,secondaryButtonHover:bTt,tableWrapper:xTt,table:wTt,tableHeader:_Tt,tableCell:CTt,tableCellContent:STt,headerColor:kTt,rowColor:TTt},MTt=e=>Fr(e)?"right":"left",ETt=new RegExp(`<\\/?[\\w\\s="/.':;#-\\/\\?]+>`),sK=({displayValue:e,width:t,padding:n,ellipsizedLength:o,isHtml:r})=>{var i,a,s,l,c,u,h,d;const{app:f}=Hn(),m=(l=(s=(a=(i=f==null?void 0:f.settings)==null?void 0:i.chartConfig)==null?void 0:a.tabular)==null?void 0:s.htmlContent)==null?void 0:l.enabled,p=(d=(h=(u=(c=f==null?void 0:f.settings)==null?void 0:c.chartConfig)==null?void 0:u.tabular)==null?void 0:h.htmlContent)==null?void 0:d.sanitizeContents,{isHtmlValue:y,value:S}=Ge(()=>{let $=r;m&&typeof $>"u"&&($=ETt.test(e));const j=$&&p?pB.sanitize(e):e;return{isHtmlValue:$,value:j}},[m,r,e,p]),R=S.length>o;return ge("div",{className:bx.tableCellContent,style:{maxWidth:`${t-n}px`},children:y?ge("div",{dangerouslySetInnerHTML:{__html:S}}):R?ge(pd,{title:S,children:ge("div",{children:S})}):ge("div",{children:S})})},ATt=({dataTable:e,dataOptions:t,height:n,width:o,customStyles:r,themeSettings:i,onSortUpdate:a})=>{var s,l,c;const u=r&&r.showFieldTypeIcon!==void 0?r.showFieldTypeIcon:!0,h=Bme+(u?Hme:0),d=(r==null?void 0:r.paddingVertical)||rK,f=(r==null?void 0:r.paddingHorizontal)||rK,m=((s=r==null?void 0:r.columns)==null?void 0:s.width)==="auto"?(o-f*2-_2t())/t.columns.length:void 0,p=Ge(()=>t.columns.map(E=>({isHtml:"isHtml"in E&&!!E.isHtml,width:m})),[t.columns,m]),[y,S]=Ye(((l=document.fonts)==null?void 0:l.status)==="loaded"),R=(c=i.typography)==null?void 0:c.fontFamily,$=Ge(()=>aTt(e,u,p,R),[e,u,p,R,y]);Ke(()=>{var E;(E=document.fonts)==null||E.ready.then(()=>{S(!0)}).catch(A=>{console.warn("Failed to observe font loading",A)})},[]);const j=Ge(()=>e.columns.map((E,A)=>{const D=$[A],N=t.columns[A],W=aK({isHeaderCell:!0,themeSettings:i,customStyles:r});return D?ge(zO,{maxWidth:b6,minWidth:b6,allowCellsRecycling:!0,width:D,header:ge(dE,{className:tf(bx.tableHeader),style:W,children:ge(eTt,{column:E,onClick:a,isSelected:!!Math.abs(E.direction),showFieldTypeIcon:u,sortIcon:(r==null?void 0:r.sortIcon)||"standard",children:ge(sK,{displayValue:ti(N),width:D,padding:h,ellipsizedLength:rTt})})}),cell:P=>{var _=P,{rowIndex:g}=_,T=Jt(_,["rowIndex"]);return ge(dE,$e(ke({className:tf(bx.tableCell),style:aK({colIndex:A,rowIndex:g,themeSettings:i,customStyles:r})},T),{children:ge(sK,{displayValue:e.rows[g][A].displayValue,width:D,padding:Wme,ellipsizedLength:iTt,isHtml:"isHtml"in N?N.isHtml:void 0})}))},align:MTt(E.type)},`col${A}`):null}),[e,$,i,r,a,u,t,h]);return Ge(()=>ge("div",{className:bx.tableWrapper,style:{padding:`${d}px ${f}px`},children:ge(v2t,{className:bx.table,rowHeight:(r==null?void 0:r.rowHeight)||nTt,rowsCount:e.rows.length,width:o-f*2,height:n-d*2,headerHeight:(r==null?void 0:r.headerHeight)||tTt,children:j})}),[j,r,e,n,f,d,o])},PTt=(e,t)=>{if(!e.columns.some(r=>Fr(r.type)))return e;const n=e.columns,o=e.rows.map(r=>r.map((i,a)=>{const s=n[a].type,l=so(t.columns[a].numberFormatConfig);if(Fr(s)){const c=Jv(i.displayValue,s);return{displayValue:rr(l,c.value),compareValue:c}}else return i}));return{columns:n,rows:o}},OTt="_component_1rw9b_1",DTt={component:OTt},NTt=({dataTable:e,dataOptions:t,designOptions:n={},onSortUpdate:o,themeSettings:r,width:i=400,height:a=500})=>{const s=Ve(null),l=Ve(e),c=Ge(()=>PTt(e,t),[e,t]);oi(()=>{l.current=e},[e]);const u=Ge(()=>ke({sortIcon:"caret",showFieldTypeIcon:!1},n),[n]);return ge("div",{className:DTt.component,ref:s,children:ge(ATt,{dataTable:c,dataOptions:t,onSortUpdate:o,height:a,width:i,customStyles:u,themeSettings:r})})},y9=e=>{const t=[],n=[];for(const o of e.columns)Qn(o)?n.push(RC(o)):t.push(bs(o));return{attributes:t,measures:n}},LTt=({dataSet:e,dataOptions:t,filters:n,filterRelations:o,count:r,offset:i})=>{const a=D8(),[s,l]=Ye(qh(e)?null:e),[c,u]=Ye(!1),h=Ve(!0),{isInitialized:d,app:f}=Hn(),[m,p]=Ye(t);return Ke(()=>{var y;let S=!1;if(!t)return;const{attributes:R,measures:$}=y9(t);if(qh(e)){if(!d){a(new Et("errors.chartNoSisenseContext"));return}if(!f||!h.current&&i>0)return;u(!0),((y=f.settings.queryCacheConfig)!=null&&y.enabled?MC:wd)({dataSource:e,dimensions:R,measures:$,filters:n,filterRelations:o,count:r+1,offset:i,ungroup:!0},f).then(j=>{if(S)return;h.current=j.rows.length>r;const E=h.current?j.rows.slice(0,r):j.rows;i>0?l(A=>{const D=A==null?void 0:A.rows.length,N=D?D>i?A.rows.slice(0,i):A.rows:null;return{columns:j.columns,rows:N?[...N,...E]:E}}):l({columns:j.columns,rows:E}),p(t)}).finally(()=>{u(!1)}).catch(j=>{S||a(j)})}else l(e),p(t);return()=>{S=!0}},[f,e,t,n,o,i,r,d,a]),[c?null:s,m]},ITt=({data:e,innerDataOptions:t,dataColumnNamesMapping:n,needToAggregate:o=!1})=>{const{app:r}=Hn();return Ge(()=>{if(!e||!t)return null;let i=Cle(I4(e,t,r==null?void 0:r.settings.locale,r==null?void 0:r.settings.dateConfig));const a=t.columns.filter(l=>!Qn(l)).map(bs),s=t.columns.filter(l=>Qn(l)).map(RC);return Yhe(i,a,s,n),o&&(i=qhe(i,a,s,n)),mst(t,i)},[e,t,o,n,r])},RTt=e=>({"& .MuiPaginationItem-circular.Mui-selected":{color:e.chart.textColor},"& .MuiPaginationItem-circular":{color:e.chart.secondaryTextColor,fontFamily:e.typography.fontFamily}}),jTt=e=>({paddingVertical:e.paddingVertical,paddingHorizontal:e.paddingHorizontal,header:e.header,rows:e.rows,columns:e.columns}),Ume=25,Gme=10,qme=({dataSet:e,dataOptions:t,styleOptions:n={},filters:o,onDataReady:r})=>{const{rowsPerPage:i=Ume,width:a,height:s}=n,{themeSettings:l}=Nt(),[c,u]=Ye(0),{filters:h,relations:d}=vl(o),[f,m]=Ye(1),p=Ve(null),y=Ge(()=>khe(t),[t]),S=Ge(()=>O8(y.columns.filter(Qn).map(RC)),[y]),R=Ge(()=>jTt(n),[n]),[$,j]=Ye(y),[E,A]=Ye(e),[D,N]=LTt({dataSet:E,dataOptions:$,filters:h,filterRelations:d,count:i*Gme,offset:c}),W=Ge(()=>{if(D&&r){const O=r(D);if(!Zhe(O))throw new Et("errors.incorrectOnDataReadyHandler");return O}return D},[D]),P=ITt({data:W,innerDataOptions:N,dataColumnNamesMapping:S,needToAggregate:!qh(E)});Ke(()=>{j(y),A(e),m(1),u(0)},[e,y]);const _=ze(O=>{D&&(Math.floor(D.rows.length/i)===O&&u(D.rows.length),m(O))},[D,i]),g=ze(O=>{m(1),u(0),$&&j(fst($,O))},[$]),T=Ge(()=>{if(!P||qh(E))return P;const O=P.columns.find(H=>H.direction!==0);return O?eB(P,[O]):P},[P,E]),M=Ge(()=>T?{columns:T.columns,rows:T.rows.slice((f-1)*i,f*i)}:void 0,[T,f,i]);return N?ge(ef,{defaultSize:dO("table"),size:{width:a,height:s},children:O=>{if(!P||!M)return ge(u8,{themeSettings:l});if(pIe(P))return ge(A8,{iconType:"table"});const H=Math.ceil(P.rows.length/i);return rt("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",backgroundColor:l.chart.backgroundColor},"aria-label":"table-root",children:[ge(NTt,{dataTable:M,dataOptions:N,designOptions:R,themeSettings:l,width:O.width,height:O.height-32,onSortUpdate:g}),ge(Hde,{ref:p,page:f,count:H,onChange:(G,V)=>_(V),sx:RTt(l)})]})}}):null},$Tt=hn(null),D3={didCatch:!1,error:null};let x6=class extends Zn{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=D3}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,o,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:i,reason:"imperative-api"}),this.setState(D3)}}componentDidCatch(t,n){var o,r;(o=(r=this.props).onError)===null||o===void 0||o.call(r,t,n)}componentDidUpdate(t,n){const{didCatch:o}=this.state,{resetKeys:r}=this.props;if(o&&n.error!==null&&FTt(t.resetKeys,r)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:r,prev:t.resetKeys,reason:"keys"}),this.setState(D3)}}render(){const{children:t,fallbackRender:n,FallbackComponent:o,fallback:r}=this.props,{didCatch:i,error:a}=this.state;let s=t;if(i){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(o)s=jt(o,l);else if(r===null||vn(r))s=r;else throw a}return jt($Tt.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}};function FTt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,o)=>!Object.is(n,t[o]))}function Uc(e,t,n){const o=wl(e);return typeof e!="object"&&e===o?!1:o==null||(t?t.some(r=>!sa(o[r],e[r])):!sa(o,e))?!0:n?n(e,o):!1}const Yme=hn(void 0),zTt=({children:e})=>{const[t,n]=Ye([]),[o,r]=Ye([]),i=()=>n([]),a=()=>r([]);return ge(Yme.Provider,{value:{errors:t,warnings:o,clearError:i,clearWarning:a,setErrors:n,setWarnings:r},children:e})},Xme=()=>en(Yme)||{errors:[],warnings:[],setErrors:()=>{console.warn("setErrors called, but context is not available.")},setWarnings:()=>{console.warn("setWarnings called, but context is not available.")},clearError:()=>{console.warn("clearError called, but context is not available.")},clearWarning:()=>{console.warn("clearWarning called, but context is not available.")}},BTt="BE#081586",HTt="BE#733473",WTt=e=>{const[t,n]=Ye(0),{setErrors:o,errors:r}=Xme(),i=Uc(e,["dataOptions","filters"]);if(Ke(()=>{i&&r.length>0&&(n(t+1),o([]))},[e.dataOptions,e.filters]),!qh(e.dataSet))throw new Et("errors.undefinedDataSource");const a=la(e.dataOptions),s=d4e(a);a.value.push(...s);const l=p4e(a);a.value.push(...l);const c=ze(({error:d})=>{console.debug("Unexpected error occurred when rendering advanced chart:",d);const f=la(a),m=h(d.toString());return f.value=f.value.filter(p=>{const y="column"in p?p.column.name:p.name;return!("column"in p&&"type"in p.column&&p.column.type==="calculatedmeasure"&&m.some(S=>S.includes(y)))}),ge(x6,{fallbackRender:u,onError:p=>{const y=h(p.toString());o(S=>[...new Set([...S,...y])])},children:ge(kT,$e(ke({},e),{dataOptions:f}))},`errorboundary_${t}`)},[e,r]),u=ze(({error:d})=>(console.debug("Error occurred when rendering fallback chart:",d),d.toString().includes(BTt)?ge(kT,ke({},e)):ge(e8,{error:r[0]})),[e,r]),h=d=>{if(d.includes(HTt)){const f=/Error: BE#733473 More than 1 Function failed, aggregated failures:\s*/;if(f.test(d))return d.replace(f,"").split(";").map(m=>m.trim()).filter(Boolean)}return[d.trim()]};return ge(x6,{fallbackRender:c,onError:d=>{const f=h(d.toString());o(m=>[...new Set([...m,...f])])},children:ge(kT,$e(ke({},e),{dataOptions:a}))},`errorboundary_${t}`)},pa=e=>{const{dataSet:t}=e;return!!t&&typeof t!="string"&&"rows"in t&&"columns"in t},Zi=jn({componentName:"Chart",shouldSkipSisenseContextWaiting:pa,customContextErrorMessageKey:"errors.chartNoSisenseContext"})(e=>{if(VTt(e))return ge(qme,ke({},e));if(UTt(e))return ge(WTt,ke({},e));if(Zme(e))return ge(kT,ke({},e));throw new Et("errors.chartInvalidProps")});function VTt(e){return e.chartType==="table"&&"columns"in e.dataOptions}function Zme(e){return e.chartType!=="table"}function UTt(e){return!Zme(e)||!yc(e.chartType)?!1:e.dataOptions.value.some(t=>(t==null?void 0:t.forecast)!==void 0||(t==null?void 0:t.trend)!==void 0)}function Ym(e,t){switch(t.type){case"loading":return GTt(e);case"success":return qTt(t.data);case"error":return YTt(t.error)}}function GTt(e){return e.status==="loading"?e:$e(ke({},e),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function qTt(e){return{isLoading:!1,isError:!1,isSuccess:!0,data:e,status:"success",error:void 0}}function YTt(e){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:e}}const Kme="sdkHookInit",XTt=(e,t,n,o)=>{n&&Jde(Kme,{packageName:t,packageVersion:"2.18.1",hookName:e},n.httpClient).finally(o)};function ZTt(e){const{tracking:t,app:n}=Hn(),{trackEvent:o}=d8(),r=Ve(!1);Ke(()=>{if(!(!t||!n)&&!r.current){const i={packageName:t.packageName||"sdk-ui",packageVersion:"2.18.1",hookName:e};o(Kme,i,!t.enabled).finally(()=>r.current=!0)}},[t,e,o,n])}const BO=e=>t=>(...n)=>(ZTt(e),t(...n));var N3=function(){return Za.Date.now()},KTt="Expected a function",JTt=Math.max,QTt=Math.min;function yS(e,t,n){var o,r,i,a,s,l,c=0,u=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(KTt);t=Iw(t)||0,Ma(n)&&(u=!!n.leading,h="maxWait"in n,i=h?JTt(Iw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function f(A){var D=o,N=r;return o=r=void 0,c=A,a=e.apply(N,D),a}function m(A){return c=A,s=setTimeout(S,t),u?f(A):a}function p(A){var D=A-l,N=A-c,W=t-D;return h?QTt(W,i-N):W}function y(A){var D=A-l,N=A-c;return l===void 0||D>=t||D<0||h&&N>=i}function S(){var A=N3();if(y(A))return R(A);s=setTimeout(S,p(A))}function R(A){return s=void 0,d&&o?f(A):(o=r=void 0,a)}function $(){s!==void 0&&clearTimeout(s),c=0,o=l=r=s=void 0}function j(){return s===void 0?a:R(N3())}function E(){var A=N3(),D=y(A);if(o=arguments,r=this,l=A,D){if(s===void 0)return m(l);if(h)return clearTimeout(s),s=setTimeout(S,t),f(l)}return s===void 0&&(s=setTimeout(S,t)),a}return E.cancel=$,E.flush=j,E}function eMt(e,t,n){n=typeof n=="function"?n:void 0;var o=n?n(e,t):void 0;return o===void 0?vC(e,t,void 0,n):!!o}const HO=e=>{const t=tMt(e);return t.config.disabled=!e.config.disabled,t},tMt=e=>{const t=la(e);return Object.setPrototypeOf(t,e),t};function nMt(e,t,n){const o=ke({guid:t},n?{backgroundFilter:n}:{});return zi(e,[],o)}function WO(e){if(!ca(e))throw new Et("errors.notAMembersFilter");const{attribute:t,config:{guid:n,backgroundFilter:o}}=e;return nMt(t,n,o)}function b9(e){return"members"in e&&e.members.length===0}function vs(e,t){return e.expression===(t==null?void 0:t.expression)&&e.granularity===t.granularity}function Xm(e,t){return e===void 0&&t===void 0?!1:[e,t].some(n=>n===void 0)||e.length!==t.length?!0:e.length===0&&t.length===0?!1:e.some((n,o)=>!eMt(n,t[o],Jme))}function x9(e,t){return vs(e.attribute,t.attribute)}function Jme(e,t){const n=qi(oMt,rMt);return sa(n(e),n(t))}function oMt(e){return $e(ke({},e),{name:""})}function rMt(e){return $e(ke({},e),{config:$e(ke({},e.config),{guid:""})})}function iMt(e,t,n,o){if(n===void 0&&o===void 0)return!1;if([n,o].some(i=>i===void 0))return!0;function r(i,a){const s=i,l=i,c=a,u=a;return i===void 0&&a===void 0?!0:[i,a].some(h=>h===void 0)||s.operator!==c.operator?!1:l.instanceid&&u.instanceid?!Xm(e==null?void 0:e.filter(h=>h.config.guid===l.instanceid),t==null?void 0:t.filter(h=>h.config.guid===u.instanceid)):r(s.left,c.left)&&r(s.right,c.right)||r(s.left,c.right)&&r(s.right,c.left)}return!r(n,o)}function Qme(e){return function(t){t=$h(t);var n=Mhe(t)?N4(t):void 0,o=n?n[0]:t.charAt(0),r=n?The(n,1).join(""):t.slice(1);return o[e]()+r}}var aMt=Qme("toUpperCase");function sMt(e){return aMt($h(e).toLowerCase())}function lMt(e,t,n,o){for(var r=-1,i=e==null?0:e.length;++r<i;)n=t(n,e[r],r,e);return n}function cMt(e){return function(t){return e==null?void 0:e[t]}}var uMt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dMt=cMt(uMt),pMt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hMt="\\u0300-\\u036f",fMt="\\ufe20-\\ufe2f",mMt="\\u20d0-\\u20ff",gMt=hMt+fMt+mMt,vMt="["+gMt+"]",yMt=RegExp(vMt,"g");function bMt(e){return e=$h(e),e&&e.replace(pMt,dMt).replace(yMt,"")}var xMt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wMt(e){return e.match(xMt)||[]}var _Mt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function CMt(e){return _Mt.test(e)}var ege="\\ud800-\\udfff",SMt="\\u0300-\\u036f",kMt="\\ufe20-\\ufe2f",TMt="\\u20d0-\\u20ff",MMt=SMt+kMt+TMt,tge="\\u2700-\\u27bf",nge="a-z\\xdf-\\xf6\\xf8-\\xff",EMt="\\xac\\xb1\\xd7\\xf7",AMt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",PMt="\\u2000-\\u206f",OMt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",oge="A-Z\\xc0-\\xd6\\xd8-\\xde",DMt="\\ufe0e\\ufe0f",rge=EMt+AMt+PMt+OMt,ige="['’]",lK="["+rge+"]",NMt="["+MMt+"]",age="\\d+",LMt="["+tge+"]",sge="["+nge+"]",lge="[^"+ege+rge+age+tge+nge+oge+"]",IMt="\\ud83c[\\udffb-\\udfff]",RMt="(?:"+NMt+"|"+IMt+")",jMt="[^"+ege+"]",cge="(?:\\ud83c[\\udde6-\\uddff]){2}",uge="[\\ud800-\\udbff][\\udc00-\\udfff]",G0="["+oge+"]",$Mt="\\u200d",cK="(?:"+sge+"|"+lge+")",FMt="(?:"+G0+"|"+lge+")",uK="(?:"+ige+"(?:d|ll|m|re|s|t|ve))?",dK="(?:"+ige+"(?:D|LL|M|RE|S|T|VE))?",dge=RMt+"?",pge="["+DMt+"]?",zMt="(?:"+$Mt+"(?:"+[jMt,cge,uge].join("|")+")"+pge+dge+")*",BMt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HMt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",WMt=pge+dge+zMt,VMt="(?:"+[LMt,cge,uge].join("|")+")"+WMt,UMt=RegExp([G0+"?"+sge+"+"+uK+"(?="+[lK,G0,"$"].join("|")+")",FMt+"+"+dK+"(?="+[lK,G0+cK,"$"].join("|")+")",G0+"?"+cK+"+"+uK,G0+"+"+dK,HMt,BMt,age,VMt].join("|"),"g");function GMt(e){return e.match(UMt)||[]}function qMt(e,t,n){return e=$h(e),t=t,t===void 0?CMt(e)?GMt(e):wMt(e):e.match(t)||[]}var YMt="['’]",XMt=RegExp(YMt,"g");function ZMt(e){return function(t){return lMt(qMt(bMt(t).replace(XMt,"")),e,"")}}var hge=ZMt(function(e,t,n){return t=t.toLowerCase(),e+(n?sMt(t):t)});function KMt(e,t,n,o){for(var r=-1,i=e==null?0:e.length;++r<i;){var a=e[r];t(o,a,n(a),e)}return o}function JMt(e,t){return function(n,o){if(n==null)return n;if(!mC(n))return e(n,o);for(var r=n.length,i=-1,a=Object(n);++i<r&&o(a[i],i,a)!==!1;);return n}}var QMt=JMt(HA);function eEt(e,t,n,o){return QMt(e,function(r,i,a){t(o,r,n(r),a)}),o}function fge(e,t){return function(n,o){var r=No(n)?KMt:eEt,i=t?t():{};return r(n,e,yg(o),i)}}var bS=fge(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),vy=(e=>(e.HIGHLIGHT="highlight",e.FILTER="filter",e))(vy||{});function tEt(e){const{_id:t,title:n,levels:o}=e;return{id:t,title:n,levels:o.map(r=>Wy(r))}}function mge(e,t,n){return Ta(this,null,function*(){const o=yield new Ag(e,n).getHierarchies(t);return o==null?void 0:o.map(r=>tEt(r))})}function Gc(e,{onLocalStateChange:t,syncCompareFn:n=sa}={}){const[o,r]=Ye(e),i=Ve(e);Ke(()=>{n(i.current,e)||r(e),i.current=e},[e,n]);const a=ze(s=>{r(l=>{const c=mg(s)?s(l):s;return t==null||t(c),c})},[t]);return[o,a]}function nEt(e){return ho("MuiCard",e)}wo("MuiCard",["root"]);const oEt=e=>{const{classes:t}=e;return Io({root:["root"]},nEt,t)},rEt=on(XP,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),gge=_t(function(e,t){const n=Ro({props:e,name:"MuiCard"}),o=n,{className:r,raised:i=!1}=o,a=Jt(o,["className","raised"]),s=$e(ke({},n),{raised:i}),l=oEt(s);return Se(rEt,ke({className:Kt(l.root,r),elevation:i?8:void 0,ref:t,ownerState:s},a))});process.env.NODE_ENV!=="production"&&(gge.propTypes={children:ue.node,classes:ue.object,className:ue.string,raised:$p(ue.bool,e=>e.raised&&e.variant==="outlined"?new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.'):null),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function iEt(e){return ho("MuiCardContent",e)}wo("MuiCardContent",["root"]);const aEt=e=>{const{classes:t}=e;return Io({root:["root"]},iEt,t)},sEt=on("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),vge=_t(function(e,t){const n=Ro({props:e,name:"MuiCardContent"}),o=n,{className:r,component:i="div"}=o,a=Jt(o,["className","component"]),s=$e(ke({},n),{component:i}),l=aEt(s);return Se(sEt,ke({as:i,className:Kt(l.root,r),ownerState:s,ref:t},a))});process.env.NODE_ENV!=="production"&&(vge.propTypes={children:ue.node,classes:ue.object,className:ue.string,component:ue.elementType,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});function lEt(e){return ho("MuiCircularProgress",e)}wo("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const eh=44,w6=JC`
|
|
587
587
|
0% {
|
|
588
588
|
transform: rotate(0deg);
|
|
589
589
|
}
|
|
@@ -798,7 +798,7 @@ ${r}`)})}destroy(){super.destroy(),this.onMessageCancel&&(this.onMessageCancel()
|
|
|
798
798
|
* author : Adam Draper
|
|
799
799
|
* license : MIT
|
|
800
800
|
* http://adamwdraper.github.com/Numeral-js/
|
|
801
|
-
*/(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(qr,function(){var t,n,o="2.0.6",r={},i={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function l(c,u){this._input=c,this._value=u}return t=function(c){var u,h,d,f;if(t.isNumeral(c))u=c.value();else if(c===0||typeof c>"u")u=0;else if(c===null||n.isNaN(c))u=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)u=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)u=null;else{for(h in r)if(f=typeof r[h].regexps.unformat=="function"?r[h].regexps.unformat():r[h].regexps.unformat,f&&c.match(f)){d=r[h].unformat;break}d=d||t._.stringToNumber,u=d(c)}else u=Number(c)||null;return new l(c,u)},t.version=o,t.isNumeral=function(c){return c instanceof l},t._=n={numberToFormat:function(c,u,h){var d=i[t.options.currentLocale],f=!1,m=!1,p=0,y="",S=1e12,R=1e9,$=1e6,j=1e3,E="",A=!1,D,N,W,P,_,g,T;if(c=c||0,N=Math.abs(c),t._.includes(u,"(")?(f=!0,u=u.replace(/[\(|\)]/g,"")):(t._.includes(u,"+")||t._.includes(u,"-"))&&(_=t._.includes(u,"+")?u.indexOf("+"):c<0?u.indexOf("-"):-1,u=u.replace(/[\+|\-]/g,"")),t._.includes(u,"a")&&(D=u.match(/a(k|m|b|t)?/),D=D?D[1]:!1,t._.includes(u," a")&&(y=" "),u=u.replace(new RegExp(y+"a[kmbt]?"),""),N>=S&&!D||D==="t"?(y+=d.abbreviations.trillion,c=c/S):N<S&&N>=R&&!D||D==="b"?(y+=d.abbreviations.billion,c=c/R):N<R&&N>=$&&!D||D==="m"?(y+=d.abbreviations.million,c=c/$):(N<$&&N>=j&&!D||D==="k")&&(y+=d.abbreviations.thousand,c=c/j)),t._.includes(u,"[.]")&&(m=!0,u=u.replace("[.]",".")),W=c.toString().split(".")[0],P=u.split(".")[1],g=u.indexOf(","),p=(u.split(".")[0].split(",")[0].match(/0/g)||[]).length,P?(t._.includes(P,"[")?(P=P.replace("]",""),P=P.split("["),E=t._.toFixed(c,P[0].length+P[1].length,h,P[1].length)):E=t._.toFixed(c,P.length,h),W=E.split(".")[0],t._.includes(E,".")?E=d.delimiters.decimal+E.split(".")[1]:E="",m&&Number(E.slice(1))===0&&(E="")):W=t._.toFixed(c,0,h),y&&!D&&Number(W)>=1e3&&y!==d.abbreviations.trillion)switch(W=String(Number(W)/1e3),y){case d.abbreviations.thousand:y=d.abbreviations.million;break;case d.abbreviations.million:y=d.abbreviations.billion;break;case d.abbreviations.billion:y=d.abbreviations.trillion;break}if(t._.includes(W,"-")&&(W=W.slice(1),A=!0),W.length<p)for(var M=p-W.length;M>0;M--)W="0"+W;return g>-1&&(W=W.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),u.indexOf(".")===0&&(W=""),T=W+E+(y||""),f?T=(f&&A?"(":"")+T+(f&&A?")":""):_>=0?T=_===0?(A?"-":"+")+T:T+(A?"-":"+"):A&&(T="-"+T),T},stringToNumber:function(c){var u=i[s.currentLocale],h=c,d={thousand:3,million:6,billion:9,trillion:12},f,m,p;if(s.zeroFormat&&c===s.zeroFormat)m=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)m=null;else{m=1,u.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(u.delimiters.decimal,"."));for(f in d)if(p=new RegExp("[^a-zA-Z]"+u.abbreviations[f]+"(?:\\)|(\\"+u.currency.symbol+")?(?:\\))?)?$"),h.match(p)){m*=Math.pow(10,d[f]);break}m*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),m*=Number(c)}return m},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,u){return c.indexOf(u)!==-1},insert:function(c,u,h){return c.slice(0,h)+u+c.slice(h)},reduce:function(c,u){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof u!="function")throw new TypeError(u+" is not a function");var h=Object(c),d=h.length>>>0,f=0,m;if(arguments.length===3)m=arguments[2];else{for(;f<d&&!(f in h);)f++;if(f>=d)throw new TypeError("Reduce of empty array with no initial value");m=h[f++]}for(;f<d;f++)f in h&&(m=u(m,h[f],f,h));return m},multiplier:function(c){var u=c.toString().split(".");return u.length<2?1:Math.pow(10,u[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(u,h){var d=n.multiplier(h);return u>d?u:d},1)},toFixed:function(c,u,h,d){var f=c.toString().split("."),m=u-(d||0),p,y,S,R;return f.length===2?p=Math.min(Math.max(f[1].length,m),u):p=m,S=Math.pow(10,p),R=(h(c+"e+"+p)/S).toFixed(p),d>u-p&&(y=new RegExp("\\.?0{1,"+(d-(u-p))+"}$"),R=R.replace(y,"")),R}},t.options=s,t.formats=r,t.locales=i,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return i[s.currentLocale];if(c=c.toLowerCase(),!i[c])throw new Error("Unknown locale : "+c);return i[c]},t.reset=function(){for(var c in a)s[c]=a[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,u,h){if(u=u.toLowerCase(),this[c+"s"][u])throw new TypeError(u+" "+c+" already registered.");return this[c+"s"][u]=h,h},t.validate=function(c,u){var h,d,f,m,p,y,S,R;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{S=t.localeData(u)}catch{S=t.localeData(t.locale())}return f=S.currency.symbol,p=S.abbreviations,h=S.delimiters.decimal,S.delimiters.thousands==="."?d="\\.":d=S.delimiters.thousands,R=c.match(/^[^\d]+/),R!==null&&(c=c.substr(1),R[0]!==f)||(R=c.match(/[^\d]+$/),R!==null&&(c=c.slice(0,-1),R[0]!==p.thousand&&R[0]!==p.million&&R[0]!==p.billion&&R[0]!==p.trillion))?!1:(y=new RegExp(d+"{2}"),c.match(/[^\d.,]/g)?!1:(m=c.split(h),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(y):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(y)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(y)&&!!m[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(c,u){var h=this._value,d=c||s.defaultFormat,f,m,p;if(u=u||Math.round,h===0&&s.zeroFormat!==null)m=s.zeroFormat;else if(h===null&&s.nullFormat!==null)m=s.nullFormat;else{for(f in r)if(d.match(r[f].regexps.format)){p=r[f].format;break}p=p||t._.numberToFormat,m=p(h,d,u)}return m},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var u=n.correctionFactor.call(null,this._value,c);function h(d,f,m,p){return d+Math.round(u*f)}return this._value=n.reduce([this._value,c],h,0)/u,this},subtract:function(c){var u=n.correctionFactor.call(null,this._value,c);function h(d,f,m,p){return d-Math.round(u*f)}return this._value=n.reduce([c],h,Math.round(this._value*u))/u,this},multiply:function(c){function u(h,d,f,m){var p=n.correctionFactor(h,d);return Math.round(h*p)*Math.round(d*p)/Math.round(p*p)}return this._value=n.reduce([this._value,c],u,1),this},divide:function(c){function u(h,d,f,m){var p=n.correctionFactor(h,d);return Math.round(h*p)/Math.round(d*p)}return this._value=n.reduce([this._value,c],u),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var u=c%10;return~~(c%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,u,h){var d=t._.includes(u," BPS")?" ":"",f;return c=c*1e4,u=u.replace(/\s?BPS/,""),f=t._.numberToFormat(c,u,h),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,d+"BPS"),f=f.join("")):f=f+d+"BPS",f},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},u={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=c.suffixes.concat(u.suffixes.filter(function(f){return c.suffixes.indexOf(f)<0})),d=h.join("|");d="("+d.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(d)},format:function(f,m,p){var y,S=t._.includes(m,"ib")?u:c,R=t._.includes(m," b")||t._.includes(m," ib")?" ":"",$,j,E;for(m=m.replace(/\s?i?b/,""),$=0;$<=S.suffixes.length;$++)if(j=Math.pow(S.base,$),E=Math.pow(S.base,$+1),f===null||f===0||f>=j&&f<E){R+=S.suffixes[$],j>0&&(f=f/j);break}return y=t._.numberToFormat(f,m,p),y+R},unformat:function(f){var m=t._.stringToNumber(f),p,y;if(m){for(p=c.suffixes.length-1;p>=0;p--){if(t._.includes(f,c.suffixes[p])){y=Math.pow(c.base,p);break}if(t._.includes(f,u.suffixes[p])){y=Math.pow(u.base,p);break}}m*=y||1}return m}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,u,h){var d=t.locales[t.options.currentLocale],f={before:u.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:u.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,p,y;for(u=u.replace(/\s?\$\s?/,""),m=t._.numberToFormat(c,u,h),c>=0?(f.before=f.before.replace(/[\-\(]/,""),f.after=f.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(f.before,"-")&&!t._.includes(f.before,"(")&&(f.before="-"+f.before),y=0;y<f.before.length;y++)switch(p=f.before[y],p){case"$":m=t._.insert(m,d.currency.symbol,y);break;case" ":m=t._.insert(m," ",y+d.currency.symbol.length-1);break}for(y=f.after.length-1;y>=0;y--)switch(p=f.after[y],p){case"$":m=y===f.after.length-1?m+d.currency.symbol:t._.insert(m,d.currency.symbol,-(f.after.length-(1+y)));break;case" ":m=y===f.after.length-1?m+" ":t._.insert(m," ",-(f.after.length-(1+y)+d.currency.symbol.length-1));break}return m}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,u,h){var d,f=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",m=f.split("e");return u=u.replace(/e[\+|\-]{1}0/,""),d=t._.numberToFormat(Number(m[0]),u,h),d+"e"+m[1]},unformat:function(c){var u=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),h=Number(u[0]),d=Number(u[1]);d=t._.includes(c,"e-")?d*=-1:d;function f(m,p,y,S){var R=t._.correctionFactor(m,p),$=m*R*(p*R)/(R*R);return $}return t._.reduce([h,Math.pow(10,d)],f,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,u,h){var d=t.locales[t.options.currentLocale],f,m=t._.includes(u," o")?" ":"";return u=u.replace(/\s?o/,""),m+=d.ordinal(c),f=t._.numberToFormat(c,u,h),f+m}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,u,h){var d=t._.includes(u," %")?" ":"",f;return t.options.scalePercentBy100&&(c=c*100),u=u.replace(/\s?\%/,""),f=t._.numberToFormat(c,u,h),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,d+"%"),f=f.join("")):f=f+d+"%",f},unformat:function(c){var u=t._.stringToNumber(c);return t.options.scalePercentBy100?u*.01:u}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,u,h){var d=Math.floor(c/60/60),f=Math.floor((c-d*60*60)/60),m=Math.round(c-d*60*60-f*60);return d+":"+(f<10?"0"+f:f)+":"+(m<10?"0"+m:m)},unformat:function(c){var u=c.split(":"),h=0;return u.length===3?(h=h+Number(u[0])*60*60,h=h+Number(u[1])*60,h=h+Number(u[2])):u.length===2&&(h=h+Number(u[0])*60,h=h+Number(u[1])),Number(h)}})}(),t})})(Tve);var s3t=Tve.exports;const l3t=Yi(s3t),c3t=(e,t)=>{const n=p3t(e);return u3t(n,t)};function u3t(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:Dz(n.type)})),rows:d3t(e)}}function d3t(e){var t;let n=!1;const o=(t=e[0])===null||t===void 0?void 0:t.map((r,i)=>{const a=e.some(s=>"selected"in s[i]);return a&&(n=!0),a});return e.map(r=>{const i=n?o.some((a,s)=>a&&!r[s].selected):void 0;return r.map(a=>i!==void 0?{data:a.data,text:a.text,blur:i}:{data:a.data,text:a.text})})}function p3t({values:e=[],metadata:t=[]}){var n,o,r,i;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let a=0;a<e.length;a++){const s=e[a];for(let l=0;l<s.length;l++)t[l].format&&!((o=(n=t[l])===null||n===void 0?void 0:n.format)===null||o===void 0)&&o.number&&(s[l].text=l3t(s[l].data).format((i=(r=t[l])===null||r===void 0?void 0:r.format)===null||i===void 0?void 0:i.number))}return e}var Hf=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(o.next(u))}catch(h){a(h)}}function l(u){try{c(o.throw(u))}catch(h){a(h)}}function c(u){u.done?i(u.value):r(u.value).then(s,l)}c((o=o.apply(e,t||[])).next())})};class h3t extends ol.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new ol.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Hf(this,void 0,void 0,function*(){})),new ol.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new ol.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Hf(this,void 0,void 0,function*(){})),new ol.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new ol.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>Hf(this,void 0,void 0,function*(){})),new ol.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotQueryClient=n}prepareJaqlPayload(t){return Hf(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:o}=t.passport,r=Bz(n,o.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(r):r})}sendJaqlQuery(t,n){return Hf(this,void 0,void 0,function*(){const{queryDescription:o,taskId:r}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(r,a);const s=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(r)});f3t(s);const l=[...o.attributes,...o.measures],c=(s.headers||[]).slice(l.length).map(u=>({name:u,type:"number"}));return c3t(s,[...l,...c])})}sendCsvQuery(t,n){return Hf(this,void 0,void 0,function*(){const{taskId:o}=t.passport,{responsePromise:r,abortHttpRequest:i}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(o,i),r.finally(()=>{this.sentRequestsAbortersMap.delete(o)})})}cancelDataRetrievalQuery(t){const n=t.passport.taskId,o=this.sentRequestsAbortersMap.get(n);return o&&(o(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return Hf(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:o}=t.passport,r=bLe(n,o.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(r):r})}sendPivotJaqlQuery(t,n){var o;const{pivotQueryDescription:r}=t.passport;return this.pivotQueryClient.queryData(n,!0,(o=r.count)!==null&&o!==void 0?o:g3t,!1)}cancelPivotJaqlQuery(t){const n=t.passport.taskId,o=this.sentRequestsAbortersMap.get(n);return o&&(o(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.pivotQueryDescription.dataSource)}}function f3t(e){var t;if(!e)throw new za("errors.noJaqlResponse");if(e.error)throw new Error(`${e.details} ${(t=e.database)!==null&&t!==void 0?t:""} ${e.extraDetails?JSON.stringify(e.extraDetails):""}`)}class sJ extends ol.TaskPassport{constructor(t,n,o){super(),this.queryDescription=n,this.type=t,this.executionConfig=o}}class m3t extends ol.TaskPassport{constructor(t,n,o){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=o}}var lJ=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(o.next(u))}catch(h){a(h)}}function l(u){try{c(o.throw(u))}catch(h){a(h)}}function c(u){u.done?i(u.value):r(u.value).then(s,l)}c((o=o.apply(e,t||[])).next())})};const g3t=2e4,Y3="Unspecified reason";class v3t{constructor(t,n=new yve(t.url,t.auth),o){b3t(t),this.queryApi=new o3t(t),this.taskManager=new h3t(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=o??!1}executeQuery(t,n){const o=new sJ("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((r,i)=>{cJ(t),this.taskManager.executeQuerySending(o).then(a=>{a.status===ol.ExecutionResultStatus.SUCCESS?r(a.result):i(a.error)})}),cancel:r=>this.taskManager.cancel(o.taskId,r||Y3)}}executeCsvQuery(t,n){const o=new sJ("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((r,i)=>{cJ(t),this.taskManager.executeDownloadCsvSending(o).then(a=>{a.status===ol.ExecutionResultStatus.SUCCESS?r(a.result):i(a.error)})}),cancel:r=>this.taskManager.cancel(o.taskId,r||Y3)}}executePivotQuery(t,n){const o=new m3t("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((r,i)=>{y3t(t),this.taskManager.executePivotQuerySending(o).then(a=>{a.status===ol.ExecutionResultStatus.SUCCESS?r(a.result):i(a.error)})}),cancel:r=>this.taskManager.cancel(o.taskId,r||Y3)}}getDataSourceFields(t,n=9999,o=0){return lJ(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,o))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return lJ(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function cJ(e){const{attributes:t,measures:n,filters:o,highlights:r,count:i,offset:a}=e;if(i&&i<0)throw new za("errors.invalidCountNegative",{count:i.toString()});if(a&&a<0)throw new za("errors.invalidOffset",{offset:a.toString()});if(t.length+n.length===0)throw new za("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!zt.isAttribute(s)){const{name:l}=s;throw new za("errors.invalidAttribute",{attributeName:l})}}),n.forEach(s=>{if(!s.skipValidation&&!zt.isMeasure(s))throw new za("errors.invalidMeasure",{measureName:s.name})}),o.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new za("errors.invalidFilter",{filterName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new za("errors.invalidHighlight",{highlightName:s.name})})}function y3t(e){const{rowsAttributes:t,columnsAttributes:n,measures:o,filters:r,highlights:i,count:a,offset:s}=e;if(a&&a<0)throw new za("errors.invalidCountNegative",{count:a.toString()});if(s&&s<0)throw new za("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+o.length===0)throw new za("errors.noDimensionsOrMeasures");r.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new za("errors.invalidFilter",{filterName:l.name})}),i.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new za("errors.invalidHighlight",{highlightName:l.name})})}function b3t(e){if(!e)throw new za("errors.missingHttpClient");if(!e.post)throw new za("errors.missingPostMethod")}function x3t(e){return ar(1,arguments),e instanceof Date||RM(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function w3t(e){if(ar(1,arguments),!x3t(e)&&typeof e!="number")return!1;var t=Mi(e);return!isNaN(Number(t))}function _3t(e,t){ar(2,arguments);var n=Mi(e).getTime(),o=qs(t);return new Date(n+o)}function C3t(e,t){ar(2,arguments);var n=qs(t);return _3t(e,-n)}var S3t=864e5;function k3t(e){ar(1,arguments);var t=Mi(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),r=n-o;return Math.floor(r/S3t)+1}function SE(e){ar(1,arguments);var t=1,n=Mi(e),o=n.getUTCDay(),r=(o<t?7:0)+o-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function Mve(e){ar(1,arguments);var t=Mi(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var r=SE(o),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=SE(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function T3t(e){ar(1,arguments);var t=Mve(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var o=SE(n);return o}var M3t=6048e5;function E3t(e){ar(1,arguments);var t=Mi(e),n=SE(t).getTime()-T3t(t).getTime();return Math.round(n/M3t)+1}function Eve(e,t){var n,o,r,i,a,s,l,c;ar(1,arguments);var u=Mi(e),h=u.getUTCFullYear(),d=qC(),f=qs((n=(o=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:d.firstWeekContainsDate)!==null&&o!==void 0?o:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(h+1,0,f),m.setUTCHours(0,0,0,0);var p=ry(m,t),y=new Date(0);y.setUTCFullYear(h,0,f),y.setUTCHours(0,0,0,0);var S=ry(y,t);return u.getTime()>=p.getTime()?h+1:u.getTime()>=S.getTime()?h:h-1}function A3t(e,t){var n,o,r,i,a,s,l,c;ar(1,arguments);var u=qC(),h=qs((n=(o=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),d=Eve(e,t),f=new Date(0);f.setUTCFullYear(d,0,h),f.setUTCHours(0,0,0,0);var m=ry(f,t);return m}var P3t=6048e5;function O3t(e,t){ar(1,arguments);var n=Mi(e),o=ry(n,t).getTime()-A3t(n,t).getTime();return Math.round(o/P3t)+1}function Wo(e,t){for(var n=e<0?"-":"",o=Math.abs(e).toString();o.length<t;)o="0"+o;return n+o}var th={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return Wo(t==="yy"?o%100:o,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Wo(n+1,2)},d:function(e,t){return Wo(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return Wo(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Wo(e.getUTCHours(),t.length)},m:function(e,t){return Wo(e.getUTCMinutes(),t.length)},s:function(e,t){return Wo(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,o=e.getUTCMilliseconds(),r=Math.floor(o*Math.pow(10,n-3));return Wo(r,t.length)}},v0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},D3t={G:function(e,t,n){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});case"GGGG":default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var o=e.getUTCFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return th.y(e,t)},Y:function(e,t,n,o){var r=Eve(e,o),i=r>0?r:1-r;if(t==="YY"){var a=i%100;return Wo(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Wo(i,t.length)},R:function(e,t){var n=Mve(e);return Wo(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Wo(n,t.length)},Q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Wo(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Wo(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){var o=e.getUTCMonth();switch(t){case"M":case"MM":return th.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return Wo(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var r=O3t(e,o);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):Wo(r,t.length)},I:function(e,t,n){var o=E3t(e);return t==="Io"?n.ordinalNumber(o,{unit:"week"}):Wo(o,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):th.d(e,t)},D:function(e,t,n){var o=k3t(e);return t==="Do"?n.ordinalNumber(o,{unit:"dayOfYear"}):Wo(o,t.length)},E:function(e,t,n){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});case"EEEE":default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Wo(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Wo(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var o=e.getUTCDay(),r=o===0?7:o;switch(t){case"i":return String(r);case"ii":return Wo(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});case"iiii":default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){var o=e.getUTCHours(),r=o/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var o=e.getUTCHours(),r;switch(o===12?r=v0.noon:o===0?r=v0.midnight:r=o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var o=e.getUTCHours(),r;switch(o>=17?r=v0.evening:o>=12?r=v0.afternoon:o>=4?r=v0.morning:r=v0.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var o=e.getUTCHours()%12;return o===0&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return th.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):th.H(e,t)},K:function(e,t,n){var o=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(o,{unit:"hour"}):Wo(o,t.length)},k:function(e,t,n){var o=e.getUTCHours();return o===0&&(o=24),t==="ko"?n.ordinalNumber(o,{unit:"hour"}):Wo(o,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):th.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):th.s(e,t)},S:function(e,t){return th.S(e,t)},X:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return dJ(i);case"XXXX":case"XX":return Kf(i);case"XXXXX":case"XXX":default:return Kf(i,":")}},x:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();switch(t){case"x":return dJ(i);case"xxxx":case"xx":return Kf(i);case"xxxxx":case"xxx":default:return Kf(i,":")}},O:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+uJ(i,":");case"OOOO":default:return"GMT"+Kf(i,":")}},z:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+uJ(i,":");case"zzzz":default:return"GMT"+Kf(i,":")}},t:function(e,t,n,o){var r=o._originalDate||e,i=Math.floor(r.getTime()/1e3);return Wo(i,t.length)},T:function(e,t,n,o){var r=o._originalDate||e,i=r.getTime();return Wo(i,t.length)}};function uJ(e,t){var n=e>0?"-":"+",o=Math.abs(e),r=Math.floor(o/60),i=o%60;if(i===0)return n+String(r);var a=t;return n+String(r)+a+Wo(i,2)}function dJ(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Wo(Math.abs(e)/60,2)}return Kf(e,t)}function Kf(e,t){var n=t||"",o=e>0?"-":"+",r=Math.abs(e),i=Wo(Math.floor(r/60),2),a=Wo(r%60,2);return o+i+n+a}var pJ=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ave=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},N3t=function(e,t){var n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return pJ(e,t);var i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",pJ(o,t)).replace("{{time}}",Ave(r,t))},L3t={p:Ave,P:N3t};function I3t(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var R3t=["D","DD"],j3t=["YY","YYYY"];function $3t(e){return R3t.indexOf(e)!==-1}function F3t(e){return j3t.indexOf(e)!==-1}function hJ(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var z3t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,B3t=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,H3t=/^'([^]*?)'?$/,W3t=/''/g,V3t=/[a-zA-Z]/;function U3t(e,t,n){var o,r,i,a,s,l,c,u,h,d,f,m,p,y;ar(2,arguments);var S=String(t),R=qC(),$=(o=(r=void 0)!==null&&r!==void 0?r:R.locale)!==null&&o!==void 0?o:xj,j=qs((i=(a=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:R.firstWeekContainsDate)!==null&&a!==void 0?a:(c=R.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=qs((h=(d=(f=(m=void 0)!==null&&m!==void 0?m:void 0)!==null&&f!==void 0?f:R.weekStartsOn)!==null&&d!==void 0?d:(p=R.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&h!==void 0?h:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!$.localize)throw new RangeError("locale must contain localize property");if(!$.formatLong)throw new RangeError("locale must contain formatLong property");var A=Mi(e);if(!w3t(A))throw new RangeError("Invalid time value");var D=I3t(A),N=C3t(A,D),W={firstWeekContainsDate:j,weekStartsOn:E,locale:$,_originalDate:A},P=S.match(B3t).map(function(_){var g=_[0];if(g==="p"||g==="P"){var T=L3t[g];return T(_,$.formatLong)}return _}).join("").match(z3t).map(function(_){if(_==="''")return"'";var g=_[0];if(g==="'")return G3t(_);var T=D3t[g];if(T)return F3t(_)&&hJ(_,t,String(e)),$3t(_)&&hJ(_,t,String(e)),T(N,_,$.localize,W);if(g.match(V3t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return _}).join("");return P}function G3t(e){var t=e.match(H3t);return t?t[1].replace(W3t,"'"):e}const q3t={enabled:!0,delay:500},Y3t={locale:Cg(),dateConfig:XC,loadingIndicatorConfig:q3t,translationConfig:{language:"en",customTranslations:[]},queryCacheConfig:{enabled:!1},queryLimit:XLe,tabberConfig:{enabled:!0},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0},jumpToDashboardConfig:{enabled:!0},chartConfig:{tabular:{htmlContent:{enabled:!0,sanitizeContents:!0}}}};function X3t(e,t,n){return vi(this,null,function*(){var o;const r=yield K3t(t,n);return qo.withOptions({mergeArrays:!1},Y3t,{locale:Cg((o=e==null?void 0:e.translationConfig)==null?void 0:o.language)},r,e)})}function Z3t(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function K3t(e,t=!1){return vi(this,null,function*(){var n,o,r,i;const a=yield e.get("api/globals");if(!a)throw new Et("errors.serverSettingsNotLoaded");const s=t?{colors:oy().palette.variantColors}:yield Que(Kue(a.designSettings),e);return{serverThemeSettings:Zue(a.designSettings,s,e.url),serverLanguage:a.language,serverVersion:a.version,serverFeatures:Z3t(a.features),user:{tenant:{name:((o=(n=a.user)==null?void 0:n.tenant)==null?void 0:o.name)||qse},permissions:{dashboards:(i=(r=a==null?void 0:a.user)==null?void 0:r.userAuth)==null?void 0:i.dashboards}}}})}function J3t(e,t){return t===qse?e:e.replace(`/${t}`,"")}function Q3t(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const eIt=e=>vi(void 0,[e],function*({defaultDataSource:t,url:n,token:o,wat:r,ssoEnabled:i,appConfig:a,enableSilentPreAuth:s,useFusionAuth:l,alternativeSsoHost:c,disableFusionPalette:u}){if(n===void 0)throw new Et("errors.sisenseContextNoAuthentication");const h=qc(n),d=qc(n,!0),f=mLt({url:d,token:o,wat:r,ssoEnabled:i,enableSilentPreAuth:s,useFusionAuth:l,alternativeSsoHost:c});if(!f)throw new Et("errors.sisenseContextNoAuthentication");Q3t();const m=new vLt(h,f,"sdk-ui-2.18.0"),p=yield m.login(),y=yield X3t(a||{},m,u||!p),S=new yve(J3t(h,y.user.tenant.name),f),R=new v3t(m,S);return{httpClient:m,pivotQueryClient:S,queryClient:R,settings:y,defaultDataSource:t,queryCache:{clear:Bse}}}),tIt=vde();function nIt(e){const{theme:t,name:n,props:o}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?o:Yw(t.components[n].defaultProps,o)}function oIt({props:e,name:t,defaultTheme:n,themeId:o}){let r=hde(n);return o&&(r=r[o]||r),nIt({theme:r,name:t,props:e})}const rIt=VP(),iIt=tIt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function aIt(e){return oIt({props:e,name:"MuiStack",defaultTheme:rIt})}function sIt(e,t){const n=mi.toArray(e).filter(Boolean);return n.reduce((o,r,i)=>(o.push(r),i<n.length-1&&o.push(mn(t,{key:`separator-${i}`})),o),[])}const lIt=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],cIt=({ownerState:e,theme:t})=>{let n=Me({display:"flex",flexDirection:"column"},Vc({theme:t},qL({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=$P(t),r=Object.keys(t.breakpoints.values).reduce((s,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(s[l]=!0),s),{}),i=qL({values:e.direction,base:r}),a=qL({values:e.spacing,base:r});typeof i=="object"&&Object.keys(i).forEach((s,l,c)=>{if(!i[s]){const u=l>0?i[c[l-1]]:"column";i[s]=u}}),n=ms(n,Vc({theme:t},a,(s,l)=>e.useFlexGap?{gap:$m(o,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${lIt(l?i[l]:e.direction)}`]:$m(o,s)}}))}return n=tGe(t.breakpoints,n),n};function uIt(e={}){const{createStyledComponent:t=iIt,useThemeProps:n=aIt,componentName:o="MuiStack"}=e,r=()=>Io({root:["root"]},s=>ho(o,s),{}),i=t(cIt),a=_t(function(s,l){const c=n(s),u=ude(c),{component:h="div",direction:d="column",spacing:f=0,divider:m,children:p,className:y,useFlexGap:S=!1}=u,R=Bn(u,["component","direction","spacing","divider","children","className","useFlexGap"]),$={direction:d,spacing:f,useFlexGap:S},j=r();return Se(i,Ie(Me({as:h,ownerState:$,ref:l,className:Kt(j.root,y)},R),{children:m?sIt(p,m):p}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:ue.node,direction:ue.oneOfType([ue.oneOf(["column-reverse","column","row-reverse","row"]),ue.arrayOf(ue.oneOf(["column-reverse","column","row-reverse","row"])),ue.object]),divider:ue.node,spacing:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.number,ue.string])),ue.number,ue.object,ue.string]),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])}),a}const dIt=e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return Io({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},fZe,t)},pIt=on("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${tv.primary}`]:t.primary},{[`& .${tv.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${gY.root}:where(& .${tv.primary})`]:{display:"block"},[`.${gY.root}:where(& .${tv.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Pve=_t(function(e,t){const n=Ro({props:e,name:"MuiListItemText"}),o=n,{children:r,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:h,slots:d={},slotProps:f={}}=o,m=Bn(o,["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps","slots","slotProps"]),{dense:p}=en(zm);let y=l??r,S=u;const R=Ie(Me({},n),{disableTypography:a,inset:s,primary:!!y,secondary:!!S,dense:p}),$=dIt(R),j={slots:d,slotProps:Me({primary:c,secondary:h},f)},[E,A]=Sr("root",{className:Kt($.root,i),elementType:pIt,externalForwardedProps:Me(Me({},j),m),ownerState:R,ref:t}),[D,N]=Sr("primary",{className:$.primary,elementType:Ha,externalForwardedProps:j,ownerState:R}),[W,P]=Sr("secondary",{className:$.secondary,elementType:Ha,externalForwardedProps:j,ownerState:R});return y!=null&&y.type!==Ha&&!a&&(y=Se(D,Ie(Me({variant:p?"body2":"body1",component:N!=null&&N.variant?void 0:"span"},N),{children:y}))),S!=null&&S.type!==Ha&&!a&&(S=Se(W,Ie(Me({variant:"body2",color:"textSecondary"},P),{children:S}))),Se(E,Ie(Me({},A),{children:[y,S]}))});process.env.NODE_ENV!=="production"&&(Pve.propTypes={children:ue.node,classes:ue.object,className:ue.string,disableTypography:ue.bool,inset:ue.bool,primary:ue.node,primaryTypographyProps:ue.object,secondary:ue.node,secondaryTypographyProps:ue.object,slotProps:ue.shape({primary:ue.oneOfType([ue.func,ue.object]),root:ue.oneOfType([ue.func,ue.object]),secondary:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({primary:ue.elementType,root:ue.elementType,secondary:ue.elementType}),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});const hIt=()=>{const e=Kde();return e?PC({key:"css",nonce:e}):null},fJ=({children:e})=>{const t=Ge(()=>hIt(),[]);return t?ge(aIe,{value:t,children:e}):ge(_n,{children:e})},Rv=(e,t)=>Ge(()=>qo.withOptions({mergeArrays:!1},t,e||{}),[e,t]),Ove=e=>vi(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:o,api:r}){const[i,a]=yield Promise.all([r.getWidget(t,n),o?r.getDashboard(n):void 0]);return{widget:i,dashboard:a}});function fIt(e,t,n,o,r){return vi(this,null,function*(){const i=new Ag(e),{widget:a}=yield Ove({widgetOid:n,dashboardOid:t,api:i});if(!a)throw new Et("errors.widgetWithOidNotFound",{widgetOid:n});return ES(a,o,r)})}function kS({enabled:e},t){const n=Ve(!1);return ze((o,r=!1)=>{const i=e===!1||!o,a=n.current;return n.current=i,!i&&(a||t||r)},[e,t])}function Dve(e,t){const[n,o]=Ye(e),r=Ge(()=>yS(i=>{o(i)},t),[t]);return Ke(()=>{r(e)},[e,r]),Ke(()=>()=>{r.cancel()},[r]),n}function mJ(e,t){return Ym(e,t)}function Nve(e){const t=gIt(e),n=kS(e,t),[o,r]=El(mJ,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Hn();return Ke(()=>{if(i||r({type:"error",error:new Et("errors.executeQueryNoSisenseContext")}),n(a)){r({type:"loading"});const{dataSource:s,rows:l,columns:c,values:u,grandTotals:h,filters:d,highlights:f,count:m,offset:p,onBeforeQuery:y}=e,{filters:S,relations:R}=vl(d);Fse({dataSource:s,rows:l,columns:c,values:u,grandTotals:h,filters:S,filterRelations:R,highlights:f,count:m,offset:p},a,{onBeforeQuery:y}).then($=>{r({type:"success",data:$})}).catch($=>{r({type:"error",error:$})})}},[a,i,e,n]),o.data&&t?mJ(o,{type:"loading"}):o}const mIt=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function gIt(e){return Uc(e,mIt,(t,n)=>{const{filters:o}=vl(n.filters),{filters:r}=vl(t.filters);return Xm(o,r)||Xm(n.highlights,t.highlights)})}function Lve(e){return tc(e)?{direction:e}:e}function gJ(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function vIt({type:e,settings:t,sortDetails:n},o){return e==="simple"?n.field>=(o.rows||[]).length?[{rowIndex:0,sort:{direction:wv(t[0].direction),by:gJ(n,o)}}]:[{rowIndex:n.field,sort:{direction:wv(t[0].direction)}}]:t.reduce((r,i,a)=>{var s;const l=(s=o.rows)==null?void 0:s[a],c=(l==null?void 0:l.sortType)&&Lve(l==null?void 0:l.sortType),u={direction:wv(i.direction),by:gJ(n,o)};return!i.selected&&sa(c==null?void 0:c.by,u.by)&&r.push({rowIndex:a,sort:null}),i.selected&&r.push({rowIndex:a,sort:u}),r},[])}const yIt=200,vJ=e=>Me(Me({attribute:bs(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:Lve(e.sortType)}),e.name&&{name:e.name}),bIt=e=>{var t;return{measure:RC(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},Ive=e=>{const{rows:t=[],columns:n=[],values:o=[],grandTotals:r}=e,i=t.flatMap(vJ),a=n.flatMap(vJ),s=o.flatMap(bIt);return{rows:i,columns:a,values:s,grandTotals:r}},xIt=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:o})=>{const[r,i]=Ye(),{rows:a,columns:s,values:l,grandTotals:c}=Ge(()=>Ive(t),[t]),u=ze(f=>{i(m=>sa(m,f)?m:f)},[i]),h=Dve(Ge(()=>({dataSource:e,rows:a,columns:s,values:l,grandTotals:c,filters:n,highlights:o,onBeforeQuery:u}),[e,a,s,l,c,n,o,u]),yIt),{error:d}=Nve(h);return{jaql:r,error:d}};function wIt(e,t,n){var o;return n(e,function(r,i,a){if(t(r,i,a))return o=i,!1}),o}function _It(e,t){return wIt(e,yg(t),HA)}const CIt=!0,SIt=e=>{switch(e){case"en":return"auto";case"aa":return"autoArima";case"hw":return"holtWinters";case"fb":return"prophet";default:return"auto"}},kIt=e=>{switch(e){case"auto":return"en";case"autoArima":return"aa";case"holtWinters":return"hw";case"prophet":return"fb";default:return"en"}},TIt=e=>{switch(e){case"linear":return"linear";case"logarithmic":return"logarithmic";case"smooth":return"advancedSmoothing";case"local":return"localEstimates";default:return"linear"}},MIt=e=>{switch(e){case"linear":return"linear";case"logarithmic":return"logarithmic";case"advancedSmoothing":return"smooth";case"localEstimates":return"local";default:return"linear"}};function EIt(e,t){var n,o,r,i,a;if(!t||!CIt)return e;const{forecast:s,trend:l}=t;let c=Me({},e);if(s&&!s.isViewerDisabled&&s.isEnabled){const u={confidenceInterval:s.confidence/100,forecastHorizon:s.forecastPeriod,modelType:SIt(s.modelType)};s.boundaries&&((n=s.boundaries.isInt)!=null&&n.isEnabled&&(u.roundToInt=!0),(o=s.boundaries.upper)!=null&&o.isEnabled&&(u.upperBound=(r=s.boundaries.upper.value)!=null?r:void 0),(i=s.boundaries.lower)!=null&&i.isEnabled&&(u.lowerBound=(a=s.boundaries.lower.value)!=null?a:void 0)),c=Ie(Me({},c),{forecast:u})}return l&&!l.isViewerDisabled&&l.isEnabled&&(c=Ie(Me({},c),{trend:{modelType:TIt(l.trendType)}})),c}function AIt(e){var t;const n={};return e.forecast&&(n.forecast={isEnabled:!0,isViewerDisabled:!1,explainVariable:null,evaluation:{type:"all",numLastPointsForEvaluation:0,ignoreLast:0},forecastPeriod:e.forecast.forecastHorizon||3,confidence:(e.forecast.confidenceInterval||.8)*100,modelType:kIt(e.forecast.modelType),boundaries:{upper:{isEnabled:e.forecast.upperBound!==void 0,value:null},lower:{isEnabled:e.forecast.lowerBound!==void 0,value:null},isInt:{isEnabled:e.forecast.roundToInt||!1}},isAccessible:!0}),e.trend&&(n.trend={isEnabled:!0,isViewerDisabled:!1,trendType:MIt(e.trend.modelType),ignoreAnomalies:(t=e.trend.ignoreAnomalies)!=null?t:!1,trendOnForecast:!1,compare:{isEnabled:!1,period:"year"},isAccessible:!0}),Object.keys(n).length>0?n:void 0}var Z9=(e=>(e.FILTER="filter",e.SELECT="select",e))(Z9||{});function PIt(e){return!!e&&e.min!==null&&e.max!==null}var Rve=(e=>(e.PRE="pre",e.POST="post",e))(Rve||{});function jve(e){return"formula"in e}function $ve(e){return"formulaRef"in e}function OIt(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function DIt(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function NIt(e){var t,n,o,r,i,a,s,l,c;const u=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,h=(t=e.format)==null?void 0:t.mask;return u&&h?{decimalScale:DIt(h),kilo:(n=h.abbreviations)==null?void 0:n.k,million:(o=h.abbreviations)==null?void 0:o.m,billion:(r=h.abbreviations)==null?void 0:r.b,trillion:(i=h.abbreviations)==null?void 0:i.t,thousandSeparator:(s=(a=h.number)==null?void 0:a.separated)!=null?s:h.separated,prefix:((l=h.currency)==null?void 0:l.position)===Rve.PRE,symbol:(c=h.currency)==null?void 0:c.symbol,name:OIt(h)}:null}const LIt=e=>{var t,n,o,r,i,a,s;return e.jaql&&"level"in e.jaql?(i=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?i:(r=(o=e.format)==null?void 0:o.mask)==null?void 0:r.dateAndTime:(s=(a=e.format)==null?void 0:a.mask)==null?void 0:s.dateAndTime};function rf(e,t){var n,o,r,i,a,s,l,c,u;const h=Wy(e.jaql,LIt(e),e.panel),d=wv((n=e.jaql.sort)!=null?n:e.categoriesSorting),f=NIt(e),m=(o=e.format)==null?void 0:o.subtotal,p=(r=e.format)==null?void 0:r.width,y=(i=e.format)==null?void 0:i.continuous;let S=bT((a=e.format)==null?void 0:a.color,t);const R=bT((s=e.format)==null?void 0:s.colorSecond,t),$=e.panel==="columns"&&e.panel;if(!S&&!((l=e.format)!=null&&l.color)&&e.format&&"colorIndex"in e.format&&(S=bT({type:"color",colorIndex:e.format.colorIndex},t)),zt.isMeasure(h)){const j=e.y2,E=e.singleSeriesType,A="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,D=(c=e.format)==null?void 0:c.databars,N=Me(Me(Me(Me(Me(Me(Me(Me(Me(Me({column:h},S&&{color:S}),R&&{dataBarsColor:R}),j&&{showOnRightAxis:j}),d&&{sortType:d}),E&&{chartType:E}),f&&{numberFormatConfig:f}),A&&{totalsCalculation:A}),D&&{dataBars:D}),p&&{width:p}),$&&{panel:$});return EIt(N,e.statisticalModels)}return Me(Me(Me(Me(Me(Me(Me({column:h,isColored:(u=e.isColored)!=null?u:!1},d&&{sortType:d}),f&&{numberFormatConfig:f}),m&&{includeSubTotals:m}),p&&{width:p}),S&&{color:S}),$&&{panel:$}),y&&{continuous:y})}function cs(e){var t;const n=e.column;let o;if(zt.isAttribute(n))o=n.jaql(!0);else if(zt.isMeasure(n))o=n.jaql(!0);else throw new Et("errors.unsupportedDimensionalElement");const r=o.jaql?o:{jaql:o};if(zt.isMeasure(n)){const i=e;r.panel="measures",r.y2=(t=i.showOnRightAxis)!=null?t:void 0;const a=JYe(i.color);r.format=Me(Me({},r.format),a&&{color:a});const s=AIt(i);s&&(r.statisticalModels=s)}return r}const Fve=(e,t)=>{const n={};return e.forEach(o=>{o.name!=="filters"&&(n[hge(o.name)]=Cr(e,o.name,t))}),n};function K6(e,t,n){return Vi(e,t).map(Gw).map(n)}function Cr(e,t,n){return K6(e,t,o=>rf(o,n))}function IIt(e,t,n){var o,r;const i=["chart/line","chart/area"].includes(t)?"x-axis":"categories",a=Cr(e,i,n),s=Cr(e,"values",n),l=Cr(e,"break by",n),c=(r=(o=Vi(e,"break by")[0])==null?void 0:o.format)==null?void 0:r.members,u=c&&GP(c);return Me({category:a,value:s,breakBy:l},u&&{seriesToColorMap:u})}function RIt(e,t,n){var o,r,i,a;const s=Cr(t,"categories",n),l=Cr(t,"values",n),c=Cr(t,"size",n);let u,h;return e==="sunburst"?h=QYe(Vi(t,"categories")):(u=(r=(o=Vi(t,"categories")[0])==null?void 0:o.format)==null?void 0:r.members,Vi(t,"color").length&&(u=(a=(i=Vi(t,"color")[0])==null?void 0:i.format)==null?void 0:a.members),h=u&&GP(u)),Me({category:s,value:[...l,...c]},h&&{seriesToColorMap:h})}function jIt(e,t){var n,o;const[r]=Cr(e,"x-axis",t),[i]=Cr(e,"y-axis",t),[a]=Cr(e,"point",t),[s]=Cr(e,"Break By / Color",t),[l]=Cr(e,"size",t),c=(o=(n=Vi(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:o.members,u=c&&GP(c);return Me({x:r,y:i,breakByPoint:a,breakByColor:s,size:l},u&&{seriesToColorMap:u})}function $It(e,t){const n=Cr(e,"value",t),o=Cr(e,"secondary",t),r=Cr(e,"min",t),i=Cr(e,"max",t);return{value:n,secondary:o,min:r,max:i}}function FIt(e,t){return{columns:Cr(e,"columns",t)}}function zIt(e,t,n){let o;const r={},i=Cr(e,"columns",n),a=K6(e,"values",(s,l)=>{var c,u,h,d,f;const{field:m,jaql:p}=s,{sortDetails:y}=p;y&&(o=y),m&&(r[m.index]=l),((u=(c=s.format)==null?void 0:c.color)==null?void 0:u.type)==="color"&&!((d=(h=s.format)==null?void 0:h.color)!=null&&d.color)&&delete s.format.color;const S=rf(s,n);return typeof S.color!="string"&&((f=S.color)==null?void 0:f.type)==="conditional"&&delete S.color.defaultColor,S});return{rows:K6(e,"rows",(s,l,c)=>{var u;const h=l===c.length-1;let{sortDetails:d}=s==null?void 0:s.jaql;const f=rf(s,n);f.column&&zt.isAttribute(f.column)&&(f.column=f.column.sort(bo.None)),h&&o&&(d=o);const m=(d==null?void 0:d.field)!==((u=s.field)==null?void 0:u.index);return d&&(f.sortType=Me({direction:wv(d.dir)},m&&{by:{valuesIndex:r[d.field],columnsMembersPath:Object.values(d.measurePath||{})}})),f}),columns:i,values:a,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function BIt(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=_It(e.whisker,o=>o);return t[n]}function HIt(e,t,n){const o=Cr(e,"category",n),r=Cr(e,"value",n),i=BIt(t),a=t.outliers.enabled;return{category:o,value:r,boxType:i,outliersEnabled:a}}function WIt(e,t){return Vi(e,"geo").map(Gw).map(n=>{const o=rf(n,t);return"geoLevel"in n?Ie(Me({},o),{level:n.geoLevel}):o})}function VIt(e,t){const n=WIt(e,t),o=Cr(e,"size",t)[0],r=Cr(e,"color",t)[0],i=Cr(e,"details",t)[0];return{geo:n,size:o,colorBy:r,details:i}}function UIt(e,t){const n=[Cr(e,"geo",t)[0]],o=Cr(e,"color",t)[0];return Me({geo:n},o&&{color:[o]})}function GIt(e,t){return{date:Cr(e,"date",t)[0],value:Cr(e,"color",t)[0]}}function J6(e,t){const n="dim"in e.jaql?Ie(Me({},e),{jaql:Ie(Me({},e.jaql),{datasource:t})}):e,o=e.parent?J6(e.parent,t):void 0,r=e.through?J6(e.through,t):void 0;return Ie(Me({},n),{parent:o,through:r})}function qIt(e,t){return e.map(n=>Ie(Me({},n),{items:n.items.map(o=>J6(o,t))}))}function YIt(e,t,n,o){if(XIt(e))return IIt(t,e,o);if(ZIt(e))return RIt(e,t,o);if(e==="chart/scatter")return jIt(t,o);if(e==="indicator")return $It(t,o);if(V$e(e))return FIt(t,o);if(UC(e))return zIt(t,n,o);if(e==="chart/boxplot")return HIt(t,n,o);if(e==="map/scatter")return VIt(t,o);if(e==="map/area")return UIt(t,o);if(e==="heatmap")return GIt(t,o);if(e==="richtexteditor")return{};throw new Et("errors.unsupportedWidgetType",{widgetType:e})}function XIt(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function ZIt(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function KIt(e,t){return e&&e.length?P8(e,yg(t)):[]}function JIt(e,t){var n;const o=(n=e==null?void 0:e.findIndex(r=>r===t))!=null?n:-1;return o===-1?[]:e.slice(o)}const zve=e=>e!=null&&e.parent?[...zve(e.parent),rf(e).column]:[],Bve=e=>e!=null&&e.parent&&e.through&&"filter"in e.through.jaql?!0:e!=null&&e.parent?Bve(e.parent):!1,Hve=e=>{var t,n,o;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const r=rf(e).column,{jaql:i,format:{mask:a}={}}=e.parent,s="level"in i&&i.level&&a&&a[i.level],l=(o=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:yf(c,s)}):c=>({categoryValue:c})))!=null?o:[];return[...Hve(e.parent),{nextDimension:r,points:l}]}return[]};function QIt(e){switch(e){case"chart/line":case"chart/area":return["x-axis"];case"chart/boxplot":return["category"];case"chart/scatter":return["x-axis","y-axis","point","Break By / Color"];case"pivot2":return["rows","columns"];default:return["categories"]}}const e5t=(e,t)=>{const n=QIt(e).map(o=>Vi(t,o)).flat().filter(o=>{const r="agg"in o.jaql&&o.jaql.agg,i="formula"in o.jaql&&o.jaql.formula;return!r&&!i});return e==="pivot2"?n:n.slice(0,1)},Wve="calendar",Vve="calendar - weeks",t5t=[tt.Years,tt.Quarters,tt.Months,tt.Days],n5t=[tt.Years,tt.Weeks,tt.Days],o5t=[tt.Years,tt.Quarters,tt.Months,tt.Weeks,tt.Days],r5t=e=>e.length===2?o5t:e[0]===Wve?t5t:e[0]===Vve?n5t:[],i5t=(e,t)=>{const[n=[],o]=bS(e,i=>[Wve,Vve].includes(i)),r=JIt(r5t(n),t.granularity);return r.length?[{title:"Calendar Hierarchy",levels:r.map(i=>new Wr(`${i} in ${t.name}`,t.expression,i,Wr.getDefaultFormatForGranularity(i)))},...o]:o},a5t=e=>{const t=e&&rf(e),n=(e==null?void 0:e.hierarchies)||[];return t&&ki(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,i5t(n,t.column)):n},s5t=(e,t,n=[],o)=>{const r=e5t(e,t),i=r.find(Bve),a=Hve(i),s=r.map(c=>Gw(c)).map(c=>a5t(c)).flat(),l=KIt([...i?zve(i):[]],({expression:c})=>c);if(e==="pivot2"){const c=i&&Gw(i),u=c&&rf(c).column;return Me({drilldownPaths:[...l,...s]},u&&a.length&&{drilldownTarget:u,drilldownSelections:a})}return{drilldownPaths:[...l,...s],drilldownSelections:a}};function K9(e){const t=e.filter,{filter:n}=t,o=Bn(t,["filter"]),r=n&&"turnedOff"in n&&n.turnedOff;let i,a;return r?a=n:i=n,o.members&&o.members.length===0&&(o.all=!0),{filter:o,backgroundFilter:i,turnOffMembersFilter:a}}function l5t(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:o}=K9(e.jaql),r=[Ie(Me({},e),{jaql:Ie(Me({},e.jaql),{filter:Me(Me({},t),o&&{filter:o})})})];return n&&r.push(Ie(Me({},e),{jaql:Ie(Me({},e.jaql),{filter:n}),disabled:!1})),r}function c5t(e){const t=e.find(o=>o.name==="filters"),n=[];return t==null||t.items.forEach(o=>{n.push(...l5t(o).filter(({disabled:r})=>!r))}),n}function u5t(e){return c5t(e).map(t=>Pm(t.jaql,t.instanceid))}function d5t(e){switch(e){case"SMALL":return"small";case"MEDIUM":return"medium";case"LARGE":return"large"}return"none"}function p5t(e){switch(e){case"LEFT":return"left";case"CENTER":return"center";case"RIGHT":return"right"}}function h5t(e){switch(e){case"SMALL":return"small";case"MEDIUM":return"medium";case"LARGE":return"large";default:return typeof e=="number"?e:"small"}}function f5t(e){switch(e){case"SMALL":return"small";case"MEDIUM":return"medium";case"LARGE":return"large";default:return typeof e=="number"?e:"medium"}}function m5t(e){const t=Rp(e,["tabs","activeTab","tabCornerRadius","tabsAlignment","tabsInterval","tabsSize","selectedBkgColor","unselectedBkgColor","useSelectedBkg","useUnselectedBkg","showTitle"]);return Me(Me(Ie(Me({},t),{tabCornerRadius:d5t(e.tabCornerRadius),tabsAlignment:p5t(e.tabsAlignment),tabsInterval:h5t(e.tabsInterval),tabsSize:f5t(e.tabsSize)}),e.useSelectedBkg&&{selectedBackgroundColor:e.selectedBkgColor}),e.useUnselectedBkg&&{unselectedBackgroundColor:e.unselectedBkgColor})}function g5t(e){const t=e.style.tabs||e.tabs||[],{activeTab:n}=e.style;return{tabNames:t.map(o=>o.title),activeTab:parseInt(n||"0",10)}}function rp(e){const{min:t,max:n,enabled:o,gridLines:r,intervalJumps:i,isIntervalEnabled:a,labels:s,logarithmic:l,title:c}=e||{};return Me(Me({enabled:o,gridLines:r,intervalJumps:i,isIntervalEnabled:a,min:typeof t=="number"?t:void 0,max:typeof n=="number"?n:void 0,logarithmic:l},c&&{title:{enabled:c.enabled,text:c.text}}),s&&{labels:{enabled:s.enabled}})}function v5t(e,t,n){var o,r,i,a,s,l,c,u,h,d,f,m;const p={xAxis:rp(t.xAxis),yAxis:rp(t.yAxis),y2Axis:rp(t.y2Axis)},y=["chart/line","chart/area"].includes(e)?"x-axis":"categories",S=Vi(n,y),R=Vi(n,"values"),$=S.length===2;if($){const{title:g,x2Title:T}=t.xAxis;p.xAxis=Ie(Me({},p.xAxis),{title:{enabled:T==null?void 0:T.enabled,text:T==null?void 0:T.text},x2Title:{enabled:g==null?void 0:g.enabled,text:g==null?void 0:g.text}})}const j=tc((r=(o=p.xAxis)==null?void 0:o.title)==null?void 0:r.text),E=S[S.length-1];!j&&E&&(p.xAxis=Ie(Me({},p.xAxis),{title:Ie(Me({},(i=p.xAxis)==null?void 0:i.title),{text:E.jaql.title})}));const A=tc((s=(a=p.xAxis)==null?void 0:a.x2Title)==null?void 0:s.text),D=S[0];!A&&$&&(p.xAxis=Ie(Me({},p.xAxis),{x2Title:Ie(Me({},(l=p.xAxis)==null?void 0:l.x2Title),{text:D.jaql.title})}));const N=tc((u=(c=p.yAxis)==null?void 0:c.title)==null?void 0:u.text),W=R.filter(g=>!g.y2);!N&&W.length===1&&(p.yAxis=Ie(Me({},p.yAxis),{title:Ie(Me({},(h=p.yAxis)==null?void 0:h.title),{text:W[0].jaql.title})}));const P=tc((f=(d=p.y2Axis)==null?void 0:d.title)==null?void 0:f.text),_=R.filter(g=>g.y2);return!P&&_.length===1&&(p.y2Axis=Ie(Me({},p.y2Axis),{title:Ie(Me({},(m=p.y2Axis)==null?void 0:m.title),{text:_[0].jaql.title})})),p}function y5t(e,t){var n,o,r;const i={xAxis:rp(e.categories),yAxis:rp(e.axis)},a=Vi(t,"categories")[0];return!tc((o=(n=i.xAxis)==null?void 0:n.title)==null?void 0:o.text)&&a&&(i.xAxis=Ie(Me({},i.xAxis),{title:Ie(Me({},(r=i.xAxis)==null?void 0:r.title),{text:a.jaql.title})})),i.yAxis=Ie(Me({},i.yAxis),{title:{enabled:!1}}),i}function b5t(e,t){var n,o,r,i,a,s;const l={xAxis:rp(e.xAxis),yAxis:rp(e.yAxis)},c=Vi(t,"x-axis")[0],u=Vi(t,"y-axis")[0];return!tc((o=(n=l.xAxis)==null?void 0:n.title)==null?void 0:o.text)&&c&&(l.xAxis=Ie(Me({},l.xAxis),{title:Ie(Me({},(r=l.xAxis)==null?void 0:r.title),{text:c.jaql.title})})),!tc((a=(i=l.yAxis)==null?void 0:i.title)==null?void 0:a.text)&&u&&(l.yAxis=Ie(Me({},l.yAxis),{title:Ie(Me({},(s=l.yAxis)==null?void 0:s.title),{text:u.jaql.title})})),l}function x5t(e,t){var n,o,r,i,a,s;const l={xAxis:rp(e.xAxis),yAxis:rp(e.yAxis)},c=Vi(t,"category")[0],u=Vi(t,"value")[0];return!tc((o=(n=l.xAxis)==null?void 0:n.title)==null?void 0:o.text)&&c&&(l.xAxis=Ie(Me({},l.xAxis),{title:Ie(Me({},(r=l.xAxis)==null?void 0:r.title),{text:c.jaql.title})})),!tc((a=(i=l.yAxis)==null?void 0:i.title)==null?void 0:a.text)&&u&&(l.yAxis=Ie(Me({},l.yAxis),{title:Ie(Me({},(s=l.yAxis)==null?void 0:s.title),{text:u.jaql.title})})),l}function dD(e,t){var n,o,r,i,a,s,l,c,u,h,d,f,m,p,y,S,R,$,j,E,A;const D=((n=t.seriesLabels)==null?void 0:n.enabled)&&((i=(r=(o=t.seriesLabels)==null?void 0:o.labels)==null?void 0:r.types)==null?void 0:i.totals),N=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",W=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let P=(s=(a=t.seriesLabels)==null?void 0:a.enabled)!=null?s:!1;return(N||W)&&(P=!!(N&&(u=(c=(l=t.seriesLabels)==null?void 0:l.labels)==null?void 0:c.types)!=null&&u.relative||W&&(f=(d=(h=t.seriesLabels)==null?void 0:h.labels)==null?void 0:d.types)!=null&&f.count)),Ie(Me({},D&&{totalLabels:{enabled:D,rotation:(p=(m=t.seriesLabels)==null?void 0:m.rotation)!=null?p:0}}),{seriesLabels:{enabled:(S=(y=t.seriesLabels)==null?void 0:y.enabled)!=null?S:!1,rotation:($=(R=t.seriesLabels)==null?void 0:R.rotation)!=null?$:0,showValue:P,showPercentage:!!(W&&(A=(E=(j=t.seriesLabels)==null?void 0:j.labels)==null?void 0:E.types)!=null&&A.percentage)}})}function jg(e){const t=xue(e);return t?{subtype:t}:{}}function TS(e,t){if("navigator"in e){const n={enabled:e.navigator.enabled},o=t==null?void 0:t.previousScrollerLocation;return o&&PIt(o)&&(n.scrollerLocation=o),{navigator:n}}return{}}function _b(e){return"legend"in e&&e.legend?{legend:{enabled:e.legend.enabled,position:e.legend.position}}:{}}function MS(e){if("dataLimits"in e&&e.dataLimits){const{seriesCapacity:t,categoriesCapacity:n}=e.dataLimits;return{dataLimits:{seriesCapacity:t,categoriesCapacity:n}}}return{}}function Uve(e){if(e.lineWidth){const{width:t}=e.lineWidth;return{lineWidth:{width:t}}}return{}}function Gve(e){if(e.markers){const{enabled:t,size:n,fill:o}=e.markers;return{markers:{enabled:t,size:n,fill:o}}}return{}}function qve(e){if("labels"in e&&e.labels){const{enabled:t,categories:n,percent:o,decimals:r,value:i}=e.labels;return{labels:{enabled:t,categories:n,percent:o,decimals:r,value:i}}}return{}}function pD(e,t,n,o){return Me(Me(Me(Me(Me({},jg(t)),_b(n)),v5t(e,n,o)),dD(t,n)),MS(n))}function w5t(e){const t=e.subtype,n=e.style;return Me(Me(Me(Me({},pD("chart/line",t,n,e.metadata.panels)),TS(n,e.options)),Uve(n)),Gve(n))}function _5t(e){const t=e.subtype,n=e.style;return Me(Me(Me(Me({},pD("chart/area",t,n,e.metadata.panels)),TS(n,e.options)),Uve(n)),Gve(n))}function C5t(e){const t=e.subtype,n=e.style;return Me(Me({},pD("chart/bar",t,n,e.metadata.panels)),TS(n,e.options))}function S5t(e){const t=e.subtype,n=e.style;return Me(Me({},pD("chart/column",t,n,e.metadata.panels)),TS(n,e.options))}function k5t(e,t,n){return Me(Me(Me(Me(Me({},jg(e)),_b(t)),y5t(t,n)),MS(t)),dD(e,t))}function T5t(e,t,n){return Me(Me(Me(Me(Me(Me({},jg(e)),_b(t)),b5t(t,n)),MS(t)),dD(e,t)),t.markerSize&&{markerSize:{scatterDefaultSize:t.markerSize.defaultSize,scatterBubbleMinSize:t.markerSize.min,scatterBubbleMaxSize:t.markerSize.max}})}function M5t(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]},width:e["width/content"]?"content":e["width/window"]?"auto":void 0}}}function E5t(e,t){return Ie(Me(Me(Me({},jg(e)),_b(t)),qve(t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction})}function A5t(e,t){const n=jg(e);return Me(Me(Me(Me(Me({},n.subtype&&["pie/classic","pie/donut","pie/ring"].includes(n.subtype)&&n),_b(t)),qve(t)),MS(t)),t.convolution&&{convolution:{enabled:t.convolution.enabled,independentSlicesCount:t.convolution.independentSlicesCount,minimalIndependentSlicePercentage:t.convolution.minimalIndependentSlicePercentage,selectedConvolutionType:t.convolution.selectedConvolutionType}})}const P5t=(e,t)=>{const n=xue(e);return n==="indicator/gauge"?{subtype:n,skin:+t.skin}:t.subtype==="bar"?{subtype:n,numericSubtype:"numericBar"}:{subtype:n,numericSubtype:"numericSimple",skin:t.skin}};function O5t(e,t,n){var o,r,i,a,s,l,c,u;const h=P5t(e,t),d=(o=Vi(n,"value")[0])==null?void 0:o.jaql.title,f=(r=Vi(n,"secondary")[0])==null?void 0:r.jaql.title;return Ie(Me({},h),{indicatorComponents:{title:{shouldBeShown:((a=(i=t.components)==null?void 0:i.title)==null?void 0:a.enabled)||!1,text:d},secondaryTitle:{text:f||""},ticks:{shouldBeShown:((l=(s=t.components)==null?void 0:s.ticks)==null?void 0:l.enabled)||!1},labels:{shouldBeShown:((u=(c=t.components)==null?void 0:c.labels)==null?void 0:u.enabled)||!1}}})}function D5t(e){var t,n,o,r;return{labels:{category:[{enabled:(t=e["title/1"])!=null?t:!0},{enabled:(n=e["title/2"])!=null?n:!0},{enabled:(o=e["title/3"])!=null?o:!0}]},tooltip:{mode:(r=e["tooltip/value"])==null||r?"value":"contribution"}}}function N5t(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function L5t(e){const t=e.subtype,n=e.style;return Me(Me(Me(Me(Me(Me({},jg(t)),_b(n)),x5t(n,e.metadata.panels)),dD(t,n)),MS(n)),TS(n,e.options))}function I5t(e,t){return Ie(Me({},jg(e)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function R5t(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new Et("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function j5t(e){var t,n,o;let r=Tn.VIEW_TYPE,i=Tn.SUBTYPE;e["view/weekly"]&&(i="calendar-heatmap/continuous"),e["domain/year"]?r="year":e["domain/half-year"]?r="half-year":e["domain/quarter"]?r="quarter":e["domain/month"]&&(r="month");let a=Tn.START_OF_WEEK;e["week/monday"]?a="monday":e["week/sunday"]&&(a="sunday");let s;return e.startMonth&&(typeof e.startMonth=="object"?s=new Date(e.startMonth.year,e.startMonth.month):s=new Date(e.startMonth)),{subtype:i,viewType:r,startOfWeek:a,cellLabels:{enabled:(t=e.dayNumberEnabled)!=null?t:Tn.SHOW_CELL_LABEL},dayLabels:{enabled:(n=e.dayNameEnabled)!=null?n:Tn.SHOW_DAY_LABEL},monthLabels:{enabled:Tn.SHOW_MONTH_LABEL},weekends:{enabled:(o=e.grayoutEnabled)!=null?o:Tn.WEEKEND_ENABLED,days:e.grayoutEnabled?[...Tn.WEEKEND_DAYS]:[],cellColor:Tn.WEEKEND_CELL_COLOR,hideValues:!0},pagination:{enabled:Tn.SHOW_PAGINATION,startMonth:s}}}function $5t(e){var t,n,o,r,i,a,s,l;const c=e.style;return{rowsPerPage:parseInt(`${c.pageSize}`),isAutoHeight:c.automaticHeight,rowHeight:c.rowHeight,alternatingRowsColor:(t=c.colors)==null?void 0:t.rows,alternatingColumnsColor:(n=c.colors)==null?void 0:n.columns,headersColor:(o=c.colors)==null?void 0:o.headers,membersColor:(r=c.colors)==null?void 0:r.members,totalsColor:(i=c.colors)==null?void 0:i.totals,imageColumns:(a=e.options)==null?void 0:a.imageColumns,highlightClickableCells:((s=e.options)==null?void 0:s.selector)&&((l=e.options)==null?void 0:l.dashboardFiltersMode)===Z9.SELECT}}function Yve(e,t){const{subtype:n,style:o,metadata:{panels:r}}=t;switch(e){case"chart/line":return w5t(t);case"chart/area":return _5t(t);case"chart/bar":return C5t(t);case"chart/column":return S5t(t);case"chart/polar":return k5t(n,o,r);case"chart/scatter":return T5t(n,o,r);case"chart/funnel":return E5t(n,o);case"treemap":return D5t(o);case"sunburst":return N5t(o);case"chart/pie":return A5t(n,o);case"tablewidget":case"tablewidgetagg":return M5t(o);case"pivot":case"pivot2":return $5t(t);case"indicator":return O5t(n,o,r);case"chart/boxplot":return L5t(t);case"map/scatter":return I5t(n,o);case"map/area":return R5t(n);case"heatmap":return j5t(o);case"richtexteditor":return o.content;case"WidgetsTabber":return m5t(o);default:throw new Et("errors.unsupportedWidgetType",{widgetType:e})}}const Xve=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:yh[e.widgetSpacing],cornerRadius:yh[e.widgetCornerRadius],shadow:yh[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:yh[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function F5t(e,t,n){if(!t||!n)return e;const o=Xve(t);return Me(Me({},e),o)}const z5t=e=>{const{panels:t,widgetDto:n,variantColors:o}=e,r=g5t(n);return{fusionWidgetType:"custom",customWidgetType:"tabber-buttons",dataOptions:Fve(t,o),styleOptions:Yve("WidgetsTabber",n),customOptions:r}};function Zve(e){if(vf(e.widgetType))throw new J9("toExecuteQueryParams");let t,n,o,r;if(MP(e)){const{attributes:i,measures:a}=y9(khe(e.dataOptions));t=i,n=a,o=Ume*Gme+1,r=!0}else{const{attributes:i,measures:a}=Xhe(e.dataOptions,e.chartType);t=i,n=a}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:o,ungroup:r}}function Kve(e){if(!vf(e.widgetType))throw new Et("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:o,grandTotals:r}=Ive(P4(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:o,grandTotals:r,filters:e.filters,highlights:e.highlights}}function B5t(e){if(vf(e.widgetType))throw new J9("toChartProps");if(EP(e.widgetType))throw new lye("toChartProps");return MP(e)?Me({chartType:e.chartType},Jve(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function Jve(e){if(!MP(e))throw new Et("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function H5t(e){if(!vf(e.widgetType))throw new Et("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function Qve(e){if(vf(e.widgetType))throw new J9("toChartWidgetProps");if(EP(e.widgetType))throw new lye("toChartWidgetProps");return{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",drilldownOptions:e.drilldownOptions}}function W5t(e){if(!MP(e))throw new Et("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,title:e.title,description:e.description||""}}function eye(e){if(!vf(e.widgetType))throw new Et("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,drilldownOptions:e.drilldownOptions,title:e.title,description:e.description||""}}function tye(e){if(!EP(e.widgetType))throw new Et("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function nye(e){if(!wue(e.widgetType))throw new Et("errors.widgetModel.onlyCustomWidgetSupported",{methodName:"toCustomWidgetProps"});return{customWidgetType:e.customWidgetType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",customOptions:e.customOptions}}function oye(e){const{widgetType:t}=e;return vf(t)?Me({widgetType:"pivot"},eye(e)):EP(t)?Me({widgetType:"text"},tye(e)):wue(t)?Me({widgetType:"custom"},nye(e)):Me({widgetType:"chart"},Qve(e))}function rye(e){const{oid:t}=e;return Ie(Me({},oye(e)),{id:t})}const iye={oid:"",title:"",dataSource:"",description:"",widgetType:"custom",customWidgetType:"",dataOptions:{},styleOptions:{},customOptions:void 0,drilldownOptions:{},filters:[],highlights:[],chartType:void 0},V5t=e=>B$e(e)?{type:"official-custom",originalType:e}:z$e(e)?{type:"standard",fusionType:e}:{type:"unsupported-custom",originalType:e},U5t=e=>{var t;return((t=e==null?void 0:e.palette.variantColors)!=null?t:[]).filter(n=>n!==null)},G5t=e=>{var t,n,o;return(o=(n=(t=e==null?void 0:e.serverFeatures)==null?void 0:t.widgetDesignStyle)==null?void 0:n.active)!=null?o:!0},q5t=e=>{const{originalType:t,panels:n,widgetStyle:o,variantColors:r}=e,i=o,{widgetDesign:a}=i,s=Bn(i,["widgetDesign"]);return{fusionWidgetType:"custom",customWidgetType:t,dataOptions:Fve(n,r),styleOptions:Me(Me({},s),a?Xve(a):{})}},Y5t=e=>{const{originalType:t,panels:n,widgetDto:o,variantColors:r}=e;if(t==="WidgetsTabber")return z5t({panels:n,widgetDto:o,variantColors:r});throw new Et("errors.unsupportedWidgetType",{widgetType:t})},X5t=e=>{const{fusionType:t,panels:n,widgetStyle:o,widgetDto:r,variantColors:i}=e;return{fusionWidgetType:t,customWidgetType:"",dataOptions:YIt(t,n,o,i),styleOptions:Yve(t,r)}},yJ=e=>{const{styleOptions:t,widgetStyle:n,isEnabled:o}=e;return F5t(t,n.widgetDesign,o)},Z5t=e=>{const{category:t,panels:n,widgetDto:o,variantColors:r,isWidgetDesignEnabled:i}=e;switch(t.type){case"unsupported-custom":return q5t({originalType:t.originalType,panels:n,widgetStyle:o.style,variantColors:r});case"official-custom":{const a=Y5t({originalType:t.originalType,panels:n,widgetDto:o,variantColors:r}),s=yJ({styleOptions:a.styleOptions,widgetStyle:o.style,isEnabled:i});return Ie(Me({},a),{styleOptions:s})}case"standard":{const a=X5t({fusionType:t.fusionType,panels:n,widgetStyle:o.style,widgetDto:o,variantColors:r}),s=yJ({styleOptions:a.styleOptions,widgetStyle:o.style,isEnabled:i});return Ie(Me({},a),{styleOptions:s})}}},K5t=e=>{const{widgetDto:t,fusionWidgetType:n,customWidgetType:o,dataOptions:r,styleOptions:i,customOptions:a,panels:s}=e,l=s5t(n,s),c=u5t(s),u=_ue(n)?R$e(n):void 0;return Ie(Me({},iye),{oid:t.oid,title:t.title,dataSource:TC(t.datasource),description:t.desc||"",widgetType:F$e(n),chartType:u,customWidgetType:o,dataOptions:r,styleOptions:i,customOptions:a,drilldownOptions:l,filters:c})};function ES(e,t,n){const o=qIt(e.metadata.panels,e.datasource),r=V5t(e.type),i=U5t(t),a=G5t(n),s=Z5t({category:r,panels:o,widgetDto:e,variantColors:i,isWidgetDesignEnabled:a});return K5t(Me({widgetDto:e,panels:o},s))}function aye(e){return Ie(Me(Me({},iye),e),{filters:e.filters||[],widgetType:"chart"})}function J5t(e){if(bl(e))return aye(e);throw new Et("errors.otherWidgetTypesNotSupported")}function sye(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new bJ("dataSource");const o=n.live||n.type==="live";if(!n.id||!o&&!n.address)throw new bJ("dataSource");const r=e.chartType;let i=$$e(e.widgetType,r),a={},s=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const l=[];if(yc(r)){const u=["chart/line","chart/area"].includes(i)?"x-axis":"categories",h=e.dataOptions.category.map(p=>cs(Ti(p))),d={name:u,items:h};l.push(d);const f=e.dataOptions.value.map(p=>cs(Er(p)));l.push({name:"values",items:f});const m=e.dataOptions.breakBy.map(p=>cs(Ti(p)));l.push({name:"break by",items:m}),r==="polar"?s="column/polar":r==="bar"?s=s||"bar/classic":r==="column"?s=s||"column/classic":r==="area"?s=s||"area/basic":r==="line"&&(s=s||"line/basic")}else if(Kz(r)){const{attributes:u,measures:h}=y9(e.dataOptions),d=[...u.map(f=>cs(Ti(f))),...h.map(f=>cs(Er(f)))];l.push({name:"columns",items:d}),i="tablewidget"}else if(Uy(r))["value","min","max","secondary"].forEach(u=>{const h=(e.dataOptions[u]||[]).map(d=>cs(Er(d)));l.push({name:u,items:h})}),s=s||"indicator/numeric",a=Ie(Me({},s==="indicator/gauge"?{subtype:"round",skin:"1"}:{subtype:"simple",skin:"vertical"}),{components:{ticks:{inactive:!1,enabled:!0},labels:{inactive:!1,enabled:!0},title:{inactive:!1,enabled:!0},secondaryTitle:{inactive:!0,enabled:!0}}});else if(mf(r)){const u=e.dataOptions.category.map(f=>cs(Qd(f)));l.push({name:"categories",items:u});const h=e.dataOptions.value.map(f=>cs(Qd(f))),d=r==="treemap";l.push({name:d?"size":"values",items:h}),d&&["color","values"].forEach(f=>{l.push({name:f,items:[]})}),r==="pie"?(s=s||"pie/basic",a={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?s=s||r:r==="funnel"&&(s=s||"chart/funnel")}else if(au(r))["x","y","size","breakByColor","breakByPoint"].forEach(u=>{if(e.dataOptions[u]){const h={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},d=[cs(Qd(e.dataOptions[u]))];l.push({name:h[u]||u,items:d})}}),s=s||"bubble/scatter";else throw new Q5t(r);const c=(e.filters||[]).map(u=>u.jaql());return l.push({name:"filters",items:c}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:i,metadata:{panels:l},style:a,subtype:s}}class bJ extends Et{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class Q5t extends Et{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class J9 extends Et{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class lye extends Et{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const eRt=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:aye,fromWidgetDto:ES,fromWidgetProps:J5t,toChartProps:B5t,toChartWidgetProps:Qve,toCommonWidgetProps:oye,toCustomWidgetProps:nye,toExecutePivotQueryParams:Kve,toExecuteQueryParams:Zve,toPivotTableProps:H5t,toPivotTableWidgetProps:eye,toTableProps:Jve,toTableWidgetProps:W5t,toTextWidgetProps:tye,toWidgetDto:sye,toWidgetProps:rye},Symbol.toStringTag,{value:"Module"}));function tRt(e,t){if(!e)return[];return n(e);function n(o){var r,i;if(iP(o))return[{nodeType:"attribute",attribute:((i=(r=tLe(t,o.instanceid))==null?void 0:r.attribute)==null?void 0:i.name)||o.instanceid}];if(aP(o))return[{nodeType:"openBracket"},...n(o.left),{nodeType:"operator",operator:o.operator},...n(o.right),{nodeType:"closeBracket"}];throw new sP}}function kE(e=[],t=[],n){switch(n){case"widgetFirst":return Hx(t,e);case"codeFirst":return Hx(e,t);case"codeOnly":return t;default:return Hx(e,t)}}const nRt=e=>"levels"in e&&e.isCascading===!0,oRt=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const o=n.subcells.reduce((r,i)=>r+i.width,0);return{cells:n.subcells.map(r=>({widthPercentage:o<100?r.width/(o/100):r.width,height:r.elements[0].height,widgetId:r.elements[0].widgetid,minWidth:r.elements[0].minWidth,maxWidth:r.elements[0].maxWidth,minHeight:r.elements[0].minHeight,maxHeight:r.elements[0].maxHeight}))}})}))}),rRt=e=>Pm(e.jaql,e.instanceid,e.disabled,e.locked),iRt=e=>{const{levels:t,instanceid:n,disabled:o,locked:r}=e,i=t.map(a=>Pm(a,a.instanceid));return new _z(i,{guid:n,disabled:o,locked:r})};function aRt(e,t){const n=e.map(r=>nRt(r)?iRt(r):rRt(r));if(!t)return n;const o=XNe(t,n);return!o||Fz(o)?n:ul(n,o)}const sRt=e=>e.subtype==="WidgetsTabber",xJ=e=>{switch(e){case 1:return"rightclick";case 2:return"click";case 3:return"click";case 4:return"click"}return console.warn(`Unknown navigate type: ${e}, using CLICK instead`),"click"},lRt=e=>{var t,n;const o=e.drillToDashboardConfig;if(!o)return"rightclick";if(UC(e.type))return xJ(o.drillToDashboardNavigateTypePivot);if(q$e(e.type)){const r=(t=e.metadata)==null?void 0:t.panels.find(i=>i.name==="categories");if((((n=r==null?void 0:r.items)==null?void 0:n.length)||0)===0)return"click"}return G$e(e.type)?xJ(o.drillToDashboardNavigateTypeCharts):Y$e(e.type)||yB(e.type)?"click":"rightclick"},cRt=e=>{const t=e.drillToDashboardConfig;if(!t||!W$e(e.type))return;const n=t.modalWindowMeasurement||"%",o={enabled:typeof t.enabled=="boolean"?t.enabled:!0,filtering:{},targetDashboardConfig:{toolbar:{visible:t.displayToolbarRow||!1},filtersPanel:{visible:t.displayFilterPane||!1}},modal:{height:t.modalWindowHeight||(n==="%"?85:800),width:t.modalWindowWidth||(n==="%"?85:1200),measurementUnit:n},interaction:{triggerMethod:lRt(e),showIcon:typeof t.showJTDIcon=="boolean"?t.showJTDIcon:!0,captionPrefix:t.drillToDashboardRightMenuCaption||"Jump to"}};return UC(e.type)?Ie(Me({},o),{targets:uRt(e)||new Map}):Ie(Me({},o),{targets:t.dashboardIds.map(r=>({caption:r.caption,id:r.id}))})};function uRt(e){const t=e.drillToDashboardConfig;if(!t||!t.dashboardIds||t.dashboardIds.length===0)return;const n=new Map,o=new Map;return t.dashboardIds.forEach(r=>{const i={caption:r.caption,id:r.id||r.oid||""};"pivotDimensions"in r&&r.pivotDimensions?r.pivotDimensions.forEach(a=>{let s=o.get(a);if(s||(s=mRt(e.metadata.panels,a),s&&o.set(a,s)),s){const l=n.get(s)||[];l.push(i),n.set(s,l)}else console.warn(`Could not find dimension with instanceId: ${a} in widget panels`)}):console.warn("Pivot widget has drill target without pivotDimensions:",r)}),n}function dRt(e=[]){const t={};return e.forEach(n=>{var o,r,i,a;const s=n!=null&&n.drillToDashboardConfig&&n.drillToDashboardConfig.version?cRt(n):void 0;t[n.oid]=Me({filtersOptions:{applyMode:((o=n.options)==null?void 0:o.dashboardFiltersMode)==="filter"?vy.FILTER:vy.HIGHLIGHT,shouldAffectFilters:(r=n.options)==null?void 0:r.selector,ignoreFilters:{all:(i=n.metadata.ignore)==null?void 0:i.all,ids:(a=n.metadata.ignore)==null?void 0:a.ids},forceApplyBackgroundFilters:!0}},s?{jtdConfig:s}:{})}),t}function pRt(e=[]){const t={};return e.forEach(n=>{if(sRt(n)){const o=n.style.tabs||n.tabs||[];t[n.oid]={tabs:o.map(r=>({displayWidgetIds:r.displayWidgetIds}))}}}),t}function cye(e,t){return vi(this,null,function*(){var n;const o=hRt(e.widgets||[]);if(o.length===0)return e;const r=yield t.getSharedFormulas(o);return Ie(Me({},e),{widgets:(n=e.widgets)==null?void 0:n.map(i=>fRt(i,r))})})}function hRt(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(o=>o.items.flatMap(r=>!jve(r.jaql)||!r.jaql.context?[]:Object.values(r.jaql.context).filter($ve).map(i=>i.formulaRef))));return Array.from(new Set(t))}function fRt(e,t){const n=e.metadata.panels.map(o=>{const r=o.items.map(i=>{const{jaql:a}=i;if(!jve(a)||!a.context)return i;const s=Object.fromEntries(Object.entries(a.context).map(([l,c])=>$ve(c)?[l,t[c.formulaRef]]:[l,c]));return Ie(Me({},i),{jaql:Ie(Me({},a),{context:s})})});return Ie(Me({},o),{items:r})});return Ie(Me({},e),{metadata:Ie(Me({},e.metadata),{panels:n})})}function mRt(e,t){for(const n of e){const o=n.items.find(r=>r.instanceid===t);if(o){const r=Wy(o.jaql),i=n.name||o.panel;return i==="rows"&&zt.isAttribute(r)?{dimension:r,location:"row"}:i==="columns"&&zt.isAttribute(r)?{dimension:r,location:"column"}:r}}}function hD(e){const{title:t,dataSource:n,widgets:o,layoutOptions:r,filters:i,widgetsOptions:a,config:s,styleOptions:l}=e;return{title:t,defaultDataSource:n,widgets:o.map(rye),layoutOptions:r,config:{tabbers:s.tabbers},filters:i,widgetsOptions:a,styleOptions:l}}function Q9(e,t,n){var o;const{oid:r,title:i,datasource:a,widgets:s,layout:l,filters:c,filterRelations:u,style:h,settings:d,userAuth:f}=e,m=TC(a),p=Me({},h!=null&&h.palette?{palette:{variantColors:h==null?void 0:h.palette.colors}}:null),y=t&&Me(Me({},t),p.palette?{palette:p.palette}:null),S=(s==null?void 0:s.map(D=>ES(D,y,n)))||[],R=l?oRt(l):{columns:[]},$=(o=u==null?void 0:u[0])==null?void 0:o.filterRelations,j=aRt(c||[],$),E=dRt(s),A=pRt(s);return{oid:r,title:i,dataSource:m,styleOptions:p,widgets:S,layoutOptions:{widgetsPanel:R},filters:j,widgetsOptions:E,config:{tabbers:A},settings:d,userAuth:f}}const gRt=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:Q9,toDashboardProps:hD},Symbol.toStringTag,{value:"Module"})),vRt=e=>{const t=[],n=o=>{Array.isArray(o)?o.forEach(n):typeof o=="object"&&o!==null&&(o.widgetid&&t.push(o.widgetid),Object.values(o).forEach(n))};return n(e.layout),t};function uye(e,t){return vi(this,arguments,function*(n,o,r={},i,a){var s,l,c;const{includeWidgets:u,includeFilters:h,sharedMode:d,useLegacyApiVersion:f}=r,m=new Ag(n);let p;if(f){if(p=yield m.getDashboardLegacy(o),!p)throw new Et("errors.dashboardWithOidNotFound",{dashboardOid:o})}else{const S=["oid","title","datasource","style","settings","userId","shares"],R=((s=n.auth)==null?void 0:s.type)==="wat";if(u&&S.push("layout"),h&&(S.push("filters"),S.push("filterRelations")),p=yield m.getDashboard(o,{fields:S,sharedMode:d}),!p)throw new Et("errors.dashboardWithOidNotFound",{dashboardOid:o});if(u){let $;if(R){const j=vRt(p);$=(yield Promise.all(j.map(E=>m.getWidget(E,p.oid)))).filter(E=>E!==void 0)}else $=(yield m.getDashboardWidgets(o,d))||[];p.widgets=$}if((l=p.style)!=null&&l.paletteId&&!p.style.palette){let $=[];try{$=(c=yield m.getPalettes())!=null?c:[]}catch{console.warn("Loading palettes failed, palettes will not be translated to dashboard model.")}const j=$.find(({_id:E})=>{var A;return E===((A=p.style)==null?void 0:A.paletteId)});j&&(p.style.palette={name:j.name,colors:j.colors})}}const y=yield cye(p,m);return Q9(y,i,a)})}const yRt=(e,t)=>{const n={};for(const o of e){const r=t(o);r in n||(n[r]=o)}return Object.values(n)};function bRt(e){return vi(this,arguments,function*(t,n={}){const{includeWidgets:o,searchByTitle:r}=n,i=new Ag(t),a=[];let s=["oid","title","datasource"];o&&(s=[],a.push("widgets"));const l=yield i.getDashboards({fields:s,expand:a,searchByTitle:r});if(!l)return[];const c=l.filter(h=>h.oid),u=yRt(c,h=>h.oid);return u.length!==c.length&&console.warn(`Removing ${c.length-u.length} detected duplicate dashboard(s)`),Promise.all(u.map(h=>cye(h,i).then(Q9)))})}function dye(e){const t=Uc(e,["dashboardOid","sharedMode"]),n=kS(e,t),[o,r]=El(Ym,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Hn(),{themeSettings:s}=Nt();return Ke(()=>{if(i||r({type:"error",error:new Et("errors.sisenseContextNotFound")}),n(a)){r({type:"loading"});const{dashboardOid:l,includeWidgets:c,includeFilters:u,sharedMode:h,useLegacyApiVersion:d}=e;uye(a.httpClient,l,{includeWidgets:c,includeFilters:u,sharedMode:h,useLegacyApiVersion:d},s,a.settings).then(f=>{r({type:"success",data:f})}).catch(f=>{r({type:"error",error:f})})}},[a,i,e,n,s]),o.data&&t?Q6(Ym(o,{type:"loading"})):Q6(o)}function Q6(e){const t=e,{data:n}=t,o=Bn(t,["data"]);return Ie(Me({},o),{dashboard:n})}function xRt(e){const t=e,{data:n}=t,o=Bn(t,["data"]);return Ie(Me({},o),{dashboards:n})}const qd=4,pye=60,hye=1500,fye=32,eH=128,tH=2048,mye=100,gye=101,wRt=102,_Rt=103,CRt=104;var $s=(e=>(e.PLACE_LEFT="PLACE_LEFT",e.PLACE_RIGHT="PLACE_RIGHT",e.SWAP="SWAP",e.NEW_ROW="NEW_ROW",e))($s||{});function SRt(e,t,n,o){return Ie(Me({},e),{columns:e.columns.map((r,i)=>i===n?Ie(Me({},r),{rows:r.rows.map((a,s)=>s===o?Ie(Me({},a),{cells:a.cells.map(l=>Ie(Me({},l),{height:t}))}):a)}):r)})}function wJ(e,t,n,o){return!gp(n)&&!gp(o)?e.columns[n].rows[o].cells.length!==t.length?e:Ie(Me({},e),{columns:e.columns.map((r,i)=>i===n?Ie(Me({},r),{rows:r.rows.map((a,s)=>s===o?Ie(Me({},a),{cells:a.cells.map((l,c)=>Ie(Me({},l),{widthPercentage:t[c]}))}):a)}):r)}):e.columns.length!==t.length?e:Ie(Me({},e),{columns:e.columns.map((r,i)=>Ie(Me({},r),{widthPercentage:t[i]}))})}function kRt(e,t,n){let o=!1,r=!1;const i=Ie(Me({},e),{columns:e.columns.map(a=>Ie(Me({},a),{rows:a.rows.map(s=>Ie(Me({},s),{cells:s.cells.map(l=>l.widgetId===t?(o=!0,Ie(Me({},l),{widgetId:n})):l.widgetId===n?(r=!0,Ie(Me({},l),{widgetId:t})):l)}))}))});return o&&r?i:e}function TRt(e,t,n){const o={cells:[Ie(Me({},e),{widthPercentage:100})]};return Ie(Me({},t),{rows:gp(n)?[...t.rows,o]:t.rows.reduce((r,i,a)=>(a===n&&r.push(o),r.push(i),r),[])})}function vye(e,t,n){return Ie(Me({},e),{rows:e.rows.map((o,r)=>r===n?nH(o,[t]):o)})}function MRt(e,t,n,o,r,i){const a=e.columns[n].rows[o].cells.find(s=>s.widgetId===t);return a?Ie(Me({},e),{columns:e.columns.map((s,l)=>{let c=s;return l===n&&(c=vye(s,t,o)),l===r&&(c=TRt(a,c,i)),l===n&&(c=fD(c)),c})}):e}function nH(e,t){const n=e.cells.filter(i=>t.includes(i.widgetId)),o=n.reduce((i,a)=>i+a.widthPercentage,0),r=e.cells.length-n.length;return Ie(Me({},e),{cells:e.cells.filter(i=>!t.includes(i.widgetId)).map(i=>Ie(Me({},i),{widthPercentage:i.widthPercentage+o/r}))})}function fD(e){return Ie(Me({},e),{rows:e.rows.filter(t=>t.cells.length>0)})}function ERt(e,t,n,o,r,i,a,s){const l=e.columns[o].rows[r].cells.find(c=>c.widgetId===n);return l?Ie(Me({},e),{columns:e.columns.map((c,u)=>{let h=c;return u===o&&(h=vye(c,n,r)),u===a&&(h=Ie(Me({},h),{rows:h.rows.map((d,f)=>f===s?Ie(Me({},d),{cells:d.cells.reduce((m,p)=>{if(p.widgetId===i){const y=Ie(Me({},l),{widthPercentage:p.widthPercentage/2,height:p.height});t==="left"&&m.push(y),m.push(Ie(Me({},p),{widthPercentage:p.widthPercentage/2})),t==="right"&&m.push(y)}else m.push(p);return m},[])}):d)})),u===o&&(h=fD(h)),h})}):e}function ARt(e,t,n,o){return Ie(Me({},e),{columns:e.columns.map((r,i)=>i===t?fD(Ie(Me({},r),{rows:r.rows.map((a,s)=>s===n?nH(a,[o]):a)})):r)})}function PRt(e,t){return Ie(Me({},e),{columns:e.columns.map(n=>fD(Ie(Me({},n),{rows:n.rows.map(o=>nH(o,t))})))})}function yye(e,t){const n=e.columns.flatMap(r=>r.rows.flatMap(i=>i.cells.map(a=>a.widgetId))),o=t.columns.flatMap(r=>r.rows.flatMap(i=>i.cells.map(a=>a.widgetId)));return n.filter(r=>!o.includes(r))}function ORt(e){return Ie(Me({},e),{cells:e.cells.map(t=>Ie(Me({},t),{widthPercentage:100/e.cells.length}))})}const DRt=(e,t,n)=>Ie(Me({},e),{columns:e.columns.map((o,r)=>r===t?Ie(Me({},o),{rows:o.rows.map((i,a)=>a===n?ORt(i):i)}):o)});function NRt(e,t,n){switch(n.type){case $s.SWAP:return kRt(e,t.widgetId,n.widgetId);case $s.NEW_ROW:return MRt(e,t.widgetId,t.columnIndex,t.rowIndex,n.columnIndex,n.rowIndex);case $s.PLACE_LEFT:case $s.PLACE_RIGHT:return ERt(e,n.type===$s.PLACE_LEFT?"left":"right",t.widgetId,t.columnIndex,t.rowIndex,n.widgetId,n.columnIndex,n.rowIndex);default:return e}}function LRt(e,t){const n=e.columns.length,o=Math.max(1,t);if(o===n)return e;const r=o>n,i=100/o;return r?Ie(Me({},e),{columns:[...e.columns.map(a=>Ie(Me({},a),{widthPercentage:i})),...Array.from({length:o-n},()=>({widthPercentage:i,rows:[]}))]}):Ie(Me({},e),{columns:e.columns.reduce((a,s,l)=>(l<o?a.push(Ie(Me({},s),{widthPercentage:i})):a[a.length-1].rows=[...a[a.length-1].rows,...s.rows],a),[])})}function IRt(e,t){return e.cells.reduce((n,o)=>{if("height"in o&&o.height!==void 0){const r=typeof o.height=="string"?parseInt(o.height):o.height;return Math.max(n,r)}else{const r=t.find(i=>i.id===o.widgetId);if(r)return r.widgetType==="chart"&&"chartType"in r?Math.max(n,Vm(r.chartType).height):r.widgetType==="pivot"?Math.max(n,Vm("pivot").height):Math.max(n,dO("").height)}return n},0)}function RRt(e){let t=1/0,n=!1;return e.cells.forEach(o=>{"maxHeight"in o&&o.maxHeight!==void 0&&(t=Math.min(t,o.maxHeight),n=!0)}),n?t:hye}function jRt(e){let t=-1/0,n=!1;return e.cells.forEach(o=>{"minHeight"in o&&o.minHeight!==void 0&&(t=Math.max(t,o.minHeight),n=!0)}),n?t:pye}function $Rt(e){return e.cells.map(t=>"minWidth"in t&&t.minWidth!==void 0?t.minWidth:eH)}function FRt(e){return e.cells.map(t=>"maxWidth"in t&&t.maxWidth!==void 0?t.maxWidth:tH)}function zRt(e){return ia(e)?BRt(e):oH(e)}function oH(e){return ca(e)?HRt(e):SC(e)?WRt(e):rH(e)}function BRt(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=oH(t);return Ie(Me({},n.jaql),{instanceid:n.instanceid})})}}function rH(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:Ie(Me({},e.config),{disabled:!1})}).jaql(!0);return{jaql:Ie(Me({},n),{table:Lz(e.attribute),column:tP(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function HRt(e){const t=rH(e);return t.jaql.filter.multiSelection=e.config.enableMultiSelection,e.config.deactivatedMembers.length>0&&(e.config.excludeMembers?t.jaql.filter.exclude.members=[...e.members,...e.config.deactivatedMembers]:t.jaql.filter.members=[...e.members,...e.config.deactivatedMembers]),e.config.backgroundFilter&&e$(t.jaql,oH(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&e$(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function WRt(e){const t=rH(e);if(e.measure instanceof KA){const n=t.jaql.filter;n.by.table=Lz(e.measure.attribute),n.by.column=tP(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function e$(e,t){if(e.filter)return e$(e.filter,t);e.filter=t}function _J(e){const t="500px";return{columns:e.columns.map(n=>({width:n.widthPercentage,cells:n.rows.map(o=>({subcells:o.cells.map(r=>{var i,a,s,l,c;return{width:r.widthPercentage,elements:[{widgetid:r.widgetId,height:(i=r.height)!=null?i:t,minWidth:(a=r.minWidth)!=null?a:eH,maxWidth:(s=r.maxWidth)!=null?s:tH,minHeight:(l=r.minHeight)!=null?l:pye,maxHeight:(c=r.maxHeight)!=null?c:hye}]}})}))}))}}var $T=(e=>(e.DASHBOARD_INIT="DASHBOARD.INIT",e.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE="UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE",e))($T||{}),A_=(e=>(e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e.WIDGETS_PANEL_LAYOUT_UPDATE="WIDGETS_PANEL_LAYOUT.UPDATE",e.WIDGETS_DELETE="WIDGETS.DELETE",e))(A_||{});function VRt(e,t){var n,o;switch(t.type){case"DASHBOARD.INIT":return Me(Me({},e),t.payload);case"FILTERS.UPDATE":return Ie(Me({},e),{filters:t.payload});case"WIDGETS_PANEL_LAYOUT.UPDATE":return Ie(Me({},e),{layoutOptions:Ie(Me({},e.layoutOptions),{widgetsPanel:t.payload})});case"WIDGETS.DELETE":return Ie(Me({},e),{widgets:e.widgets.filter(r=>!t.payload.includes(r.oid))});case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":return Ie(Me({},e),{layoutOptions:Ie(Me({},e.layoutOptions),{widgetsPanel:t.payload.widgetsPanel}),widgets:e.widgets.filter(r=>!t.payload.widgets.includes(r.oid))});case"WIDGETS.ADD":{const r=[...e.widgets,t.payload],i=[...((o=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:o.columns)||[]];return i[0]&&(i[0].rows.length||i[0].rows.push({cells:[]}),i[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),Ie(Me(Me({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:Ie(Me({},e==null?void 0:e.layoutOptions),{widgetsPanel:Ie(Me({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:i})})}:null),{widgets:r})}default:return e}}function URt(e){const{filters:t,relations:n}=Bc(e),o=t.map(zRt),r=eLe(n,t),i=qRt(t);return{filters:o,filterRelations:r?[{datasource:i,filterRelations:r}]:void 0}}function GRt(e,t,n,o){return vi(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");switch(t.type){case"FILTERS.UPDATE":yield n.patchDashboard(e,URt(t.payload),o);break;case"WIDGETS.ADD":{const r=yield n.addWidgetToDashboard(e,sye(t.payload),o);if(!r)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:ES(r)}}case"WIDGETS_PANEL_LAYOUT.UPDATE":yield n.patchDashboard(e,{layout:_J(t.payload)},o);break;case"WIDGETS.DELETE":yield Promise.all(t.payload.map(r=>n.deleteWidgetFromDashboard(e,r,o)));break;case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":yield n.patchDashboard(e,{layout:_J(t.payload.widgetsPanel)},o),yield Promise.all(t.payload.widgets.map(r=>n.deleteWidgetFromDashboard(e,r,o)));break}return t})}function qRt(e){const t=new Set(e.map(n=>{var o;return(o=n.dataSource)==null?void 0:o.title}));if(t.size>1)throw new Error("Persisting filters from multiple datasources is not supported now");return t.values().next().value}function YRt({dashboard:e,persist:t=!0,sharedMode:n=!1}){const{restApi:o,isReady:r}=Ppe(),{app:i}=Hn(),a=wl(e),s=Ge(()=>!!(i!=null&&i.httpClient.auth)&&KRt(i.httpClient.auth.type,t),[i==null?void 0:i.httpClient.auth,t]),l=t&&s,[c,u]=El(VRt,e),h=ze(d=>vi(this,null,function*(){if(!r||!o)throw new pnt;if(c&&d.type===A_.WIDGETS_DELETE&&c.layoutOptions.widgetsPanel){const f=PRt(c.layoutOptions.widgetsPanel,d.payload);d={type:$T.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:f,widgets:d.payload}}}if(c&&d.type===A_.WIDGETS_PANEL_LAYOUT_UPDATE&&c.layoutOptions.widgetsPanel){const f=yye(c.layoutOptions.widgetsPanel,d.payload);f.length>0&&(d={type:$T.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:d.payload,widgets:f}})}if(l){const f=yield GRt(c==null?void 0:c.oid,d,o,n);u(f)}else u(d)}),[l,c,o,r,u,n]);return Ke(()=>{e&&e!==a&&u({type:$T.DASHBOARD_INIT,payload:e})},[e,a]),{dashboard:c,dispatchChanges:h}}const XRt=BO("useDashboardModel")(bye);function bye({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:o=!0,sharedMode:r=!1}){const{dashboard:i,isLoading:a,isError:s,error:l}=dye({dashboardOid:e,includeWidgets:t,includeFilters:n,sharedMode:r}),{dashboard:c,dispatchChanges:u}=YRt({dashboard:i??null,persist:o,sharedMode:r});return{dashboard:c,isLoading:a,isError:s,error:l,dispatchChanges:u}}function ZRt(e){return e.type==="filters/updated"?{type:A_.FILTERS_UPDATE,payload:e.payload}:e.type==="widgetsPanel/layout/updated"?{type:A_.WIDGETS_PANEL_LAYOUT_UPDATE,payload:e.payload}:null}function KRt(e,t){return e==="wat"?(t&&console.warn('WAT authentication does not support persistence. The changes will not be saved. Set "persist" flag to false to avoid this warning.'),!1):!0}const iH={filtersPanel:{visible:!0,collapsedInitially:!1,persistCollapsedStateToLocalStorage:!1,showFilterIconInToolbar:!1,actions:{addFilter:{enabled:!1,multiSelect:{visible:!0}},editFilter:{enabled:!1,multiSelect:{visible:!0}},deleteFilter:{enabled:!1}}},toolbar:{visible:!0},widgetsPanel:{responsive:!1,editMode:{enabled:!1,showDragHandleIcon:!0,applyChangesAsBatch:{enabled:!0,historyLimit:20}}}},t$=Ie(Me({},iH),{persist:!1,sharedMode:!1}),Qm=(e,t)=>`${t}px solid ${e}`,xye=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]}),wye=(e,t)=>{var n;return e.widgetType==="pivot"&&(n=e.styleOptions)!=null&&n.isAutoHeight&&t?Ie(Me({},e),{styleOptions:Ie(Me({},e.styleOptions),{isAutoHeight:!1})}):e},_ye=e=>e.every(t=>{var n;return t.widgetType==="pivot"&&((n=t.styleOptions)==null?void 0:n.isAutoHeight)});function Cye(e){if(e===void 0)return"12px";if(typeof e=="string")switch(e){case"small":return"6px";case"large":return"24px";case"medium":default:return"12px"}return typeof e=="number"&&Number.isFinite(e)&&e>=0?`${e}px`:(typeof e=="number"&&console.warn(`Invalid tabber tabs interval ${e}, using default instead`),"12px")}function JRt(e){if(e===void 0)return"1.3em";if(typeof e=="string")switch(e){case"small":return"1.0em";case"large":return"1.7em";case"medium":default:return"1.3em"}return typeof e=="number"&&Number.isFinite(e)&&e>=0?`${e}px`:(typeof e=="number"&&console.warn(`Invalid tabber tabs size ${e}, using default instead`),"1.3em")}const QRt={showSeparators:!0,showDescription:!1,selectedColor:"#FFCB05",unselectedColor:"#9EA2AB",descriptionColor:"#9EA2AB",selectedBackgroundColor:"#FFFFFF",unselectedBackgroundColor:"#FFFFFF",tabsSize:"medium",tabsInterval:"medium",tabsAlignment:"center",tabCornerRadius:"none"},ejt=at.div`
|
|
801
|
+
*/(function(e){(function(t,n){e.exports?e.exports=n():t.numeral=n()})(qr,function(){var t,n,o="2.0.6",r={},i={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function l(c,u){this._input=c,this._value=u}return t=function(c){var u,h,d,f;if(t.isNumeral(c))u=c.value();else if(c===0||typeof c>"u")u=0;else if(c===null||n.isNaN(c))u=null;else if(typeof c=="string")if(s.zeroFormat&&c===s.zeroFormat)u=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)u=null;else{for(h in r)if(f=typeof r[h].regexps.unformat=="function"?r[h].regexps.unformat():r[h].regexps.unformat,f&&c.match(f)){d=r[h].unformat;break}d=d||t._.stringToNumber,u=d(c)}else u=Number(c)||null;return new l(c,u)},t.version=o,t.isNumeral=function(c){return c instanceof l},t._=n={numberToFormat:function(c,u,h){var d=i[t.options.currentLocale],f=!1,m=!1,p=0,y="",S=1e12,R=1e9,$=1e6,j=1e3,E="",A=!1,D,N,W,P,_,g,T;if(c=c||0,N=Math.abs(c),t._.includes(u,"(")?(f=!0,u=u.replace(/[\(|\)]/g,"")):(t._.includes(u,"+")||t._.includes(u,"-"))&&(_=t._.includes(u,"+")?u.indexOf("+"):c<0?u.indexOf("-"):-1,u=u.replace(/[\+|\-]/g,"")),t._.includes(u,"a")&&(D=u.match(/a(k|m|b|t)?/),D=D?D[1]:!1,t._.includes(u," a")&&(y=" "),u=u.replace(new RegExp(y+"a[kmbt]?"),""),N>=S&&!D||D==="t"?(y+=d.abbreviations.trillion,c=c/S):N<S&&N>=R&&!D||D==="b"?(y+=d.abbreviations.billion,c=c/R):N<R&&N>=$&&!D||D==="m"?(y+=d.abbreviations.million,c=c/$):(N<$&&N>=j&&!D||D==="k")&&(y+=d.abbreviations.thousand,c=c/j)),t._.includes(u,"[.]")&&(m=!0,u=u.replace("[.]",".")),W=c.toString().split(".")[0],P=u.split(".")[1],g=u.indexOf(","),p=(u.split(".")[0].split(",")[0].match(/0/g)||[]).length,P?(t._.includes(P,"[")?(P=P.replace("]",""),P=P.split("["),E=t._.toFixed(c,P[0].length+P[1].length,h,P[1].length)):E=t._.toFixed(c,P.length,h),W=E.split(".")[0],t._.includes(E,".")?E=d.delimiters.decimal+E.split(".")[1]:E="",m&&Number(E.slice(1))===0&&(E="")):W=t._.toFixed(c,0,h),y&&!D&&Number(W)>=1e3&&y!==d.abbreviations.trillion)switch(W=String(Number(W)/1e3),y){case d.abbreviations.thousand:y=d.abbreviations.million;break;case d.abbreviations.million:y=d.abbreviations.billion;break;case d.abbreviations.billion:y=d.abbreviations.trillion;break}if(t._.includes(W,"-")&&(W=W.slice(1),A=!0),W.length<p)for(var M=p-W.length;M>0;M--)W="0"+W;return g>-1&&(W=W.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),u.indexOf(".")===0&&(W=""),T=W+E+(y||""),f?T=(f&&A?"(":"")+T+(f&&A?")":""):_>=0?T=_===0?(A?"-":"+")+T:T+(A?"-":"+"):A&&(T="-"+T),T},stringToNumber:function(c){var u=i[s.currentLocale],h=c,d={thousand:3,million:6,billion:9,trillion:12},f,m,p;if(s.zeroFormat&&c===s.zeroFormat)m=0;else if(s.nullFormat&&c===s.nullFormat||!c.replace(/[^0-9]+/g,"").length)m=null;else{m=1,u.delimiters.decimal!=="."&&(c=c.replace(/\./g,"").replace(u.delimiters.decimal,"."));for(f in d)if(p=new RegExp("[^a-zA-Z]"+u.abbreviations[f]+"(?:\\)|(\\"+u.currency.symbol+")?(?:\\))?)?$"),h.match(p)){m*=Math.pow(10,d[f]);break}m*=(c.split("-").length+Math.min(c.split("(").length-1,c.split(")").length-1))%2?1:-1,c=c.replace(/[^0-9\.]+/g,""),m*=Number(c)}return m},isNaN:function(c){return typeof c=="number"&&isNaN(c)},includes:function(c,u){return c.indexOf(u)!==-1},insert:function(c,u,h){return c.slice(0,h)+u+c.slice(h)},reduce:function(c,u){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof u!="function")throw new TypeError(u+" is not a function");var h=Object(c),d=h.length>>>0,f=0,m;if(arguments.length===3)m=arguments[2];else{for(;f<d&&!(f in h);)f++;if(f>=d)throw new TypeError("Reduce of empty array with no initial value");m=h[f++]}for(;f<d;f++)f in h&&(m=u(m,h[f],f,h));return m},multiplier:function(c){var u=c.toString().split(".");return u.length<2?1:Math.pow(10,u[1].length)},correctionFactor:function(){var c=Array.prototype.slice.call(arguments);return c.reduce(function(u,h){var d=n.multiplier(h);return u>d?u:d},1)},toFixed:function(c,u,h,d){var f=c.toString().split("."),m=u-(d||0),p,y,S,R;return f.length===2?p=Math.min(Math.max(f[1].length,m),u):p=m,S=Math.pow(10,p),R=(h(c+"e+"+p)/S).toFixed(p),d>u-p&&(y=new RegExp("\\.?0{1,"+(d-(u-p))+"}$"),R=R.replace(y,"")),R}},t.options=s,t.formats=r,t.locales=i,t.locale=function(c){return c&&(s.currentLocale=c.toLowerCase()),s.currentLocale},t.localeData=function(c){if(!c)return i[s.currentLocale];if(c=c.toLowerCase(),!i[c])throw new Error("Unknown locale : "+c);return i[c]},t.reset=function(){for(var c in a)s[c]=a[c]},t.zeroFormat=function(c){s.zeroFormat=typeof c=="string"?c:null},t.nullFormat=function(c){s.nullFormat=typeof c=="string"?c:null},t.defaultFormat=function(c){s.defaultFormat=typeof c=="string"?c:"0.0"},t.register=function(c,u,h){if(u=u.toLowerCase(),this[c+"s"][u])throw new TypeError(u+" "+c+" already registered.");return this[c+"s"][u]=h,h},t.validate=function(c,u){var h,d,f,m,p,y,S,R;if(typeof c!="string"&&(c+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",c)),c=c.trim(),c.match(/^\d+$/))return!0;if(c==="")return!1;try{S=t.localeData(u)}catch{S=t.localeData(t.locale())}return f=S.currency.symbol,p=S.abbreviations,h=S.delimiters.decimal,S.delimiters.thousands==="."?d="\\.":d=S.delimiters.thousands,R=c.match(/^[^\d]+/),R!==null&&(c=c.substr(1),R[0]!==f)||(R=c.match(/[^\d]+$/),R!==null&&(c=c.slice(0,-1),R[0]!==p.thousand&&R[0]!==p.million&&R[0]!==p.billion&&R[0]!==p.trillion))?!1:(y=new RegExp(d+"{2}"),c.match(/[^\d.,]/g)?!1:(m=c.split(h),m.length>2?!1:m.length<2?!!m[0].match(/^\d+.*\d$/)&&!m[0].match(y):m[0].length===1?!!m[0].match(/^\d+$/)&&!m[0].match(y)&&!!m[1].match(/^\d+$/):!!m[0].match(/^\d+.*\d$/)&&!m[0].match(y)&&!!m[1].match(/^\d+$/)))},t.fn=l.prototype={clone:function(){return t(this)},format:function(c,u){var h=this._value,d=c||s.defaultFormat,f,m,p;if(u=u||Math.round,h===0&&s.zeroFormat!==null)m=s.zeroFormat;else if(h===null&&s.nullFormat!==null)m=s.nullFormat;else{for(f in r)if(d.match(r[f].regexps.format)){p=r[f].format;break}p=p||t._.numberToFormat,m=p(h,d,u)}return m},value:function(){return this._value},input:function(){return this._input},set:function(c){return this._value=Number(c),this},add:function(c){var u=n.correctionFactor.call(null,this._value,c);function h(d,f,m,p){return d+Math.round(u*f)}return this._value=n.reduce([this._value,c],h,0)/u,this},subtract:function(c){var u=n.correctionFactor.call(null,this._value,c);function h(d,f,m,p){return d-Math.round(u*f)}return this._value=n.reduce([c],h,Math.round(this._value*u))/u,this},multiply:function(c){function u(h,d,f,m){var p=n.correctionFactor(h,d);return Math.round(h*p)*Math.round(d*p)/Math.round(p*p)}return this._value=n.reduce([this._value,c],u,1),this},divide:function(c){function u(h,d,f,m){var p=n.correctionFactor(h,d);return Math.round(h*p)/Math.round(d*p)}return this._value=n.reduce([this._value,c],u),this},difference:function(c){return Math.abs(t(this._value).subtract(c).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(c){var u=c%10;return~~(c%100/10)===1?"th":u===1?"st":u===2?"nd":u===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(c,u,h){var d=t._.includes(u," BPS")?" ":"",f;return c=c*1e4,u=u.replace(/\s?BPS/,""),f=t._.numberToFormat(c,u,h),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,d+"BPS"),f=f.join("")):f=f+d+"BPS",f},unformat:function(c){return+(t._.stringToNumber(c)*1e-4).toFixed(15)}})}(),function(){var c={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},u={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},h=c.suffixes.concat(u.suffixes.filter(function(f){return c.suffixes.indexOf(f)<0})),d=h.join("|");d="("+d.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(d)},format:function(f,m,p){var y,S=t._.includes(m,"ib")?u:c,R=t._.includes(m," b")||t._.includes(m," ib")?" ":"",$,j,E;for(m=m.replace(/\s?i?b/,""),$=0;$<=S.suffixes.length;$++)if(j=Math.pow(S.base,$),E=Math.pow(S.base,$+1),f===null||f===0||f>=j&&f<E){R+=S.suffixes[$],j>0&&(f=f/j);break}return y=t._.numberToFormat(f,m,p),y+R},unformat:function(f){var m=t._.stringToNumber(f),p,y;if(m){for(p=c.suffixes.length-1;p>=0;p--){if(t._.includes(f,c.suffixes[p])){y=Math.pow(c.base,p);break}if(t._.includes(f,u.suffixes[p])){y=Math.pow(u.base,p);break}}m*=y||1}return m}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(c,u,h){var d=t.locales[t.options.currentLocale],f={before:u.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:u.match(/([\+|\-|\)|\s|\$]*)$/)[0]},m,p,y;for(u=u.replace(/\s?\$\s?/,""),m=t._.numberToFormat(c,u,h),c>=0?(f.before=f.before.replace(/[\-\(]/,""),f.after=f.after.replace(/[\-\)]/,"")):c<0&&!t._.includes(f.before,"-")&&!t._.includes(f.before,"(")&&(f.before="-"+f.before),y=0;y<f.before.length;y++)switch(p=f.before[y],p){case"$":m=t._.insert(m,d.currency.symbol,y);break;case" ":m=t._.insert(m," ",y+d.currency.symbol.length-1);break}for(y=f.after.length-1;y>=0;y--)switch(p=f.after[y],p){case"$":m=y===f.after.length-1?m+d.currency.symbol:t._.insert(m,d.currency.symbol,-(f.after.length-(1+y)));break;case" ":m=y===f.after.length-1?m+" ":t._.insert(m," ",-(f.after.length-(1+y)+d.currency.symbol.length-1));break}return m}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(c,u,h){var d,f=typeof c=="number"&&!t._.isNaN(c)?c.toExponential():"0e+0",m=f.split("e");return u=u.replace(/e[\+|\-]{1}0/,""),d=t._.numberToFormat(Number(m[0]),u,h),d+"e"+m[1]},unformat:function(c){var u=t._.includes(c,"e+")?c.split("e+"):c.split("e-"),h=Number(u[0]),d=Number(u[1]);d=t._.includes(c,"e-")?d*=-1:d;function f(m,p,y,S){var R=t._.correctionFactor(m,p),$=m*R*(p*R)/(R*R);return $}return t._.reduce([h,Math.pow(10,d)],f,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(c,u,h){var d=t.locales[t.options.currentLocale],f,m=t._.includes(u," o")?" ":"";return u=u.replace(/\s?o/,""),m+=d.ordinal(c),f=t._.numberToFormat(c,u,h),f+m}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(c,u,h){var d=t._.includes(u," %")?" ":"",f;return t.options.scalePercentBy100&&(c=c*100),u=u.replace(/\s?\%/,""),f=t._.numberToFormat(c,u,h),t._.includes(f,")")?(f=f.split(""),f.splice(-1,0,d+"%"),f=f.join("")):f=f+d+"%",f},unformat:function(c){var u=t._.stringToNumber(c);return t.options.scalePercentBy100?u*.01:u}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(c,u,h){var d=Math.floor(c/60/60),f=Math.floor((c-d*60*60)/60),m=Math.round(c-d*60*60-f*60);return d+":"+(f<10?"0"+f:f)+":"+(m<10?"0"+m:m)},unformat:function(c){var u=c.split(":"),h=0;return u.length===3?(h=h+Number(u[0])*60*60,h=h+Number(u[1])*60,h=h+Number(u[2])):u.length===2&&(h=h+Number(u[0])*60,h=h+Number(u[1])),Number(h)}})}(),t})})(Tve);var s3t=Tve.exports;const l3t=Yi(s3t),c3t=(e,t)=>{const n=p3t(e);return u3t(n,t)};function u3t(e,t){return{columns:t==null?void 0:t.map(n=>({name:n.name,type:Dz(n.type)})),rows:d3t(e)}}function d3t(e){var t;let n=!1;const o=(t=e[0])===null||t===void 0?void 0:t.map((r,i)=>{const a=e.some(s=>"selected"in s[i]);return a&&(n=!0),a});return e.map(r=>{const i=n?o.some((a,s)=>a&&!r[s].selected):void 0;return r.map(a=>i!==void 0?{data:a.data,text:a.text,blur:i}:{data:a.data,text:a.text})})}function p3t({values:e=[],metadata:t=[]}){var n,o,r,i;e[0]&&!Array.isArray(e[0])&&(e=[e]);for(let a=0;a<e.length;a++){const s=e[a];for(let l=0;l<s.length;l++)t[l].format&&!((o=(n=t[l])===null||n===void 0?void 0:n.format)===null||o===void 0)&&o.number&&(s[l].text=l3t(s[l].data).format((i=(r=t[l])===null||r===void 0?void 0:r.format)===null||i===void 0?void 0:i.number))}return e}var Hf=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(o.next(u))}catch(h){a(h)}}function l(u){try{c(o.throw(u))}catch(h){a(h)}}function c(u){u.done?i(u.value):r(u.value).then(s,l)}c((o=o.apply(e,t||[])).next())})};class h3t extends ol.AbstractTaskManager{constructor(t,n){super(),this.sentRequestsAbortersMap=new Map,this.executeQuerySending=super.createFlow([new ol.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Hf(this,void 0,void 0,function*(){})),new ol.Step("SEND_JAQL_QUERY",this.sendJaqlQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executeDownloadCsvSending=super.createFlow([new ol.Step("PREPARE_JAQL_PAYLOAD",this.prepareJaqlPayload.bind(this),()=>Hf(this,void 0,void 0,function*(){})),new ol.Step("SEND_DOWNLOAD_CSV_QUERY",this.sendCsvQuery.bind(this),this.cancelDataRetrievalQuery.bind(this))]),this.executePivotQuerySending=super.createFlow([new ol.Step("PREPARE_JAQL_PAYLOAD",this.preparePivotJaqlPayload.bind(this),()=>Hf(this,void 0,void 0,function*(){})),new ol.Step("SEND_JAQL_QUERY",this.sendPivotJaqlQuery.bind(this),this.cancelPivotJaqlQuery.bind(this))]),this.queryApi=t,this.pivotQueryClient=n}prepareJaqlPayload(t){return Hf(this,void 0,void 0,function*(){const{queryDescription:n,executionConfig:o}=t.passport,r=Bz(n,o.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(r):r})}sendJaqlQuery(t,n){return Hf(this,void 0,void 0,function*(){const{queryDescription:o,taskId:r}=t.passport,{responsePromise:i,abortHttpRequest:a}=this.queryApi.sendJaqlRequest(t.passport.queryDescription.dataSource,n);this.sentRequestsAbortersMap.set(r,a);const s=yield i.finally(()=>{this.sentRequestsAbortersMap.delete(r)});f3t(s);const l=[...o.attributes,...o.measures],c=(s.headers||[]).slice(l.length).map(u=>({name:u,type:"number"}));return c3t(s,[...l,...c])})}sendCsvQuery(t,n){return Hf(this,void 0,void 0,function*(){const{taskId:o}=t.passport,{responsePromise:r,abortHttpRequest:i}=this.queryApi.sendDownloadCsvRequest(t.passport.queryDescription.dataSource,n);return this.sentRequestsAbortersMap.set(o,i),r.finally(()=>{this.sentRequestsAbortersMap.delete(o)})})}cancelDataRetrievalQuery(t){const n=t.passport.taskId,o=this.sentRequestsAbortersMap.get(n);return o&&(o(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.queryDescription.dataSource)}preparePivotJaqlPayload(t){return Hf(this,void 0,void 0,function*(){const{pivotQueryDescription:n,executionConfig:o}=t.passport,r=bLe(n,o.shouldSkipHighlightsWithoutAttributes),i=t.passport.executionConfig.onBeforeQuery;return i?i(r):r})}sendPivotJaqlQuery(t,n){var o;const{pivotQueryDescription:r}=t.passport;return this.pivotQueryClient.queryData(n,!0,(o=r.count)!==null&&o!==void 0?o:g3t,!1)}cancelPivotJaqlQuery(t){const n=t.passport.taskId,o=this.sentRequestsAbortersMap.get(n);return o&&(o(),this.sentRequestsAbortersMap.delete(n)),this.queryApi.sendCancelJaqlQueryRequest(n,t.passport.pivotQueryDescription.dataSource)}}function f3t(e){var t;if(!e)throw new za("errors.noJaqlResponse");if(e.error)throw new Error(`${e.details} ${(t=e.database)!==null&&t!==void 0?t:""} ${e.extraDetails?JSON.stringify(e.extraDetails):""}`)}class sJ extends ol.TaskPassport{constructor(t,n,o){super(),this.queryDescription=n,this.type=t,this.executionConfig=o}}class m3t extends ol.TaskPassport{constructor(t,n,o){super(),this.pivotQueryDescription=n,this.type=t,this.executionConfig=o}}var lJ=function(e,t,n,o){function r(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(o.next(u))}catch(h){a(h)}}function l(u){try{c(o.throw(u))}catch(h){a(h)}}function c(u){u.done?i(u.value):r(u.value).then(s,l)}c((o=o.apply(e,t||[])).next())})};const g3t=2e4,Y3="Unspecified reason";class v3t{constructor(t,n=new yve(t.url,t.auth),o){b3t(t),this.queryApi=new o3t(t),this.taskManager=new h3t(this.queryApi,n),this.shouldSkipHighlightsWithoutAttributes=o??!1}executeQuery(t,n){const o=new sJ("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((r,i)=>{cJ(t),this.taskManager.executeQuerySending(o).then(a=>{a.status===ol.ExecutionResultStatus.SUCCESS?r(a.result):i(a.error)})}),cancel:r=>this.taskManager.cancel(o.taskId,r||Y3)}}executeCsvQuery(t,n){const o=new sJ("SEND_DOWNLOAD_CSV_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((r,i)=>{cJ(t),this.taskManager.executeDownloadCsvSending(o).then(a=>{a.status===ol.ExecutionResultStatus.SUCCESS?r(a.result):i(a.error)})}),cancel:r=>this.taskManager.cancel(o.taskId,r||Y3)}}executePivotQuery(t,n){const o=new m3t("SEND_JAQL_QUERY",t,Object.assign(Object.assign({},n||{}),{shouldSkipHighlightsWithoutAttributes:this.shouldSkipHighlightsWithoutAttributes||!1}));return{resultPromise:new Promise((r,i)=>{y3t(t),this.taskManager.executePivotQuerySending(o).then(a=>{a.status===ol.ExecutionResultStatus.SUCCESS?r(a.result):i(a.error)})}),cancel:r=>this.taskManager.cancel(o.taskId,r||Y3)}}getDataSourceFields(t,n=9999,o=0){return lJ(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceFields(t,n,o))||[]})}getDataSourceSchema(t){return this.queryApi.getDataSourceSchema(t)}getDataSourceList(){return lJ(this,void 0,void 0,function*(){return(yield this.queryApi.getDataSourceList())||[]})}}function cJ(e){const{attributes:t,measures:n,filters:o,highlights:r,count:i,offset:a}=e;if(i&&i<0)throw new za("errors.invalidCountNegative",{count:i.toString()});if(a&&a<0)throw new za("errors.invalidOffset",{offset:a.toString()});if(t.length+n.length===0)throw new za("errors.noDimensionsOrMeasures");t.forEach(s=>{if(!s.skipValidation&&!zt.isAttribute(s)){const{name:l}=s;throw new za("errors.invalidAttribute",{attributeName:l})}}),n.forEach(s=>{if(!s.skipValidation&&!zt.isMeasure(s))throw new za("errors.invalidMeasure",{measureName:s.name})}),o.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new za("errors.invalidFilter",{filterName:s.name})}),r.forEach(s=>{if(!s.skipValidation&&!zt.isFilter(s))throw new za("errors.invalidHighlight",{highlightName:s.name})})}function y3t(e){const{rowsAttributes:t,columnsAttributes:n,measures:o,filters:r,highlights:i,count:a,offset:s}=e;if(a&&a<0)throw new za("errors.invalidCountNegative",{count:a.toString()});if(s&&s<0)throw new za("errors.invalidOffset",{offset:s.toString()});if(t.length+n.length+o.length===0)throw new za("errors.noDimensionsOrMeasures");r.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new za("errors.invalidFilter",{filterName:l.name})}),i.forEach(l=>{if(!l.skipValidation&&!zt.isFilter(l))throw new za("errors.invalidHighlight",{highlightName:l.name})})}function b3t(e){if(!e)throw new za("errors.missingHttpClient");if(!e.post)throw new za("errors.missingPostMethod")}function x3t(e){return ar(1,arguments),e instanceof Date||RM(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function w3t(e){if(ar(1,arguments),!x3t(e)&&typeof e!="number")return!1;var t=Mi(e);return!isNaN(Number(t))}function _3t(e,t){ar(2,arguments);var n=Mi(e).getTime(),o=qs(t);return new Date(n+o)}function C3t(e,t){ar(2,arguments);var n=qs(t);return _3t(e,-n)}var S3t=864e5;function k3t(e){ar(1,arguments);var t=Mi(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var o=t.getTime(),r=n-o;return Math.floor(r/S3t)+1}function SE(e){ar(1,arguments);var t=1,n=Mi(e),o=n.getUTCDay(),r=(o<t?7:0)+o-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function Mve(e){ar(1,arguments);var t=Mi(e),n=t.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(n+1,0,4),o.setUTCHours(0,0,0,0);var r=SE(o),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=SE(i);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function T3t(e){ar(1,arguments);var t=Mve(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var o=SE(n);return o}var M3t=6048e5;function E3t(e){ar(1,arguments);var t=Mi(e),n=SE(t).getTime()-T3t(t).getTime();return Math.round(n/M3t)+1}function Eve(e,t){var n,o,r,i,a,s,l,c;ar(1,arguments);var u=Mi(e),h=u.getUTCFullYear(),d=qC(),f=qs((n=(o=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:d.firstWeekContainsDate)!==null&&o!==void 0?o:(l=d.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(h+1,0,f),m.setUTCHours(0,0,0,0);var p=ry(m,t),y=new Date(0);y.setUTCFullYear(h,0,f),y.setUTCHours(0,0,0,0);var S=ry(y,t);return u.getTime()>=p.getTime()?h+1:u.getTime()>=S.getTime()?h:h-1}function A3t(e,t){var n,o,r,i,a,s,l,c;ar(1,arguments);var u=qC(),h=qs((n=(o=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),d=Eve(e,t),f=new Date(0);f.setUTCFullYear(d,0,h),f.setUTCHours(0,0,0,0);var m=ry(f,t);return m}var P3t=6048e5;function O3t(e,t){ar(1,arguments);var n=Mi(e),o=ry(n,t).getTime()-A3t(n,t).getTime();return Math.round(o/P3t)+1}function Wo(e,t){for(var n=e<0?"-":"",o=Math.abs(e).toString();o.length<t;)o="0"+o;return n+o}var th={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return Wo(t==="yy"?o%100:o,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Wo(n+1,2)},d:function(e,t){return Wo(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return Wo(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Wo(e.getUTCHours(),t.length)},m:function(e,t){return Wo(e.getUTCMinutes(),t.length)},s:function(e,t){return Wo(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,o=e.getUTCMilliseconds(),r=Math.floor(o*Math.pow(10,n-3));return Wo(r,t.length)}},v0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},D3t={G:function(e,t,n){var o=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});case"GGGG":default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var o=e.getUTCFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return th.y(e,t)},Y:function(e,t,n,o){var r=Eve(e,o),i=r>0?r:1-r;if(t==="YY"){var a=i%100;return Wo(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):Wo(i,t.length)},R:function(e,t){var n=Mve(e);return Wo(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Wo(n,t.length)},Q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Wo(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){var o=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Wo(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){var o=e.getUTCMonth();switch(t){case"M":case"MM":return th.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){var o=e.getUTCMonth();switch(t){case"L":return String(o+1);case"LL":return Wo(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){var r=O3t(e,o);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):Wo(r,t.length)},I:function(e,t,n){var o=E3t(e);return t==="Io"?n.ordinalNumber(o,{unit:"week"}):Wo(o,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):th.d(e,t)},D:function(e,t,n){var o=k3t(e);return t==="Do"?n.ordinalNumber(o,{unit:"dayOfYear"}):Wo(o,t.length)},E:function(e,t,n){var o=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});case"EEEE":default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Wo(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){var r=e.getUTCDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Wo(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var o=e.getUTCDay(),r=o===0?7:o;switch(t){case"i":return String(r);case"ii":return Wo(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});case"iiii":default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){var o=e.getUTCHours(),r=o/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var o=e.getUTCHours(),r;switch(o===12?r=v0.noon:o===0?r=v0.midnight:r=o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var o=e.getUTCHours(),r;switch(o>=17?r=v0.evening:o>=12?r=v0.afternoon:o>=4?r=v0.morning:r=v0.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var o=e.getUTCHours()%12;return o===0&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return th.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):th.H(e,t)},K:function(e,t,n){var o=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(o,{unit:"hour"}):Wo(o,t.length)},k:function(e,t,n){var o=e.getUTCHours();return o===0&&(o=24),t==="ko"?n.ordinalNumber(o,{unit:"hour"}):Wo(o,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):th.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):th.s(e,t)},S:function(e,t){return th.S(e,t)},X:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return dJ(i);case"XXXX":case"XX":return Kf(i);case"XXXXX":case"XXX":default:return Kf(i,":")}},x:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();switch(t){case"x":return dJ(i);case"xxxx":case"xx":return Kf(i);case"xxxxx":case"xxx":default:return Kf(i,":")}},O:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+uJ(i,":");case"OOOO":default:return"GMT"+Kf(i,":")}},z:function(e,t,n,o){var r=o._originalDate||e,i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+uJ(i,":");case"zzzz":default:return"GMT"+Kf(i,":")}},t:function(e,t,n,o){var r=o._originalDate||e,i=Math.floor(r.getTime()/1e3);return Wo(i,t.length)},T:function(e,t,n,o){var r=o._originalDate||e,i=r.getTime();return Wo(i,t.length)}};function uJ(e,t){var n=e>0?"-":"+",o=Math.abs(e),r=Math.floor(o/60),i=o%60;if(i===0)return n+String(r);var a=t;return n+String(r)+a+Wo(i,2)}function dJ(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Wo(Math.abs(e)/60,2)}return Kf(e,t)}function Kf(e,t){var n=t||"",o=e>0?"-":"+",r=Math.abs(e),i=Wo(Math.floor(r/60),2),a=Wo(r%60,2);return o+i+n+a}var pJ=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ave=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},N3t=function(e,t){var n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return pJ(e,t);var i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",pJ(o,t)).replace("{{time}}",Ave(r,t))},L3t={p:Ave,P:N3t};function I3t(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var R3t=["D","DD"],j3t=["YY","YYYY"];function $3t(e){return R3t.indexOf(e)!==-1}function F3t(e){return j3t.indexOf(e)!==-1}function hJ(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var z3t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,B3t=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,H3t=/^'([^]*?)'?$/,W3t=/''/g,V3t=/[a-zA-Z]/;function U3t(e,t,n){var o,r,i,a,s,l,c,u,h,d,f,m,p,y;ar(2,arguments);var S=String(t),R=qC(),$=(o=(r=void 0)!==null&&r!==void 0?r:R.locale)!==null&&o!==void 0?o:xj,j=qs((i=(a=(s=(l=void 0)!==null&&l!==void 0?l:void 0)!==null&&s!==void 0?s:R.firstWeekContainsDate)!==null&&a!==void 0?a:(c=R.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=qs((h=(d=(f=(m=void 0)!==null&&m!==void 0?m:void 0)!==null&&f!==void 0?f:R.weekStartsOn)!==null&&d!==void 0?d:(p=R.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&h!==void 0?h:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!$.localize)throw new RangeError("locale must contain localize property");if(!$.formatLong)throw new RangeError("locale must contain formatLong property");var A=Mi(e);if(!w3t(A))throw new RangeError("Invalid time value");var D=I3t(A),N=C3t(A,D),W={firstWeekContainsDate:j,weekStartsOn:E,locale:$,_originalDate:A},P=S.match(B3t).map(function(_){var g=_[0];if(g==="p"||g==="P"){var T=L3t[g];return T(_,$.formatLong)}return _}).join("").match(z3t).map(function(_){if(_==="''")return"'";var g=_[0];if(g==="'")return G3t(_);var T=D3t[g];if(T)return F3t(_)&&hJ(_,t,String(e)),$3t(_)&&hJ(_,t,String(e)),T(N,_,$.localize,W);if(g.match(V3t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return _}).join("");return P}function G3t(e){var t=e.match(H3t);return t?t[1].replace(W3t,"'"):e}const q3t={enabled:!0,delay:500},Y3t={locale:Cg(),dateConfig:XC,loadingIndicatorConfig:q3t,translationConfig:{language:"en",customTranslations:[]},queryCacheConfig:{enabled:!1},queryLimit:XLe,tabberConfig:{enabled:!0},accessibilityConfig:{enabled:!1},errorBoundaryConfig:{alwaysShowErrorText:!1},trackingConfig:{enabled:!0},jumpToDashboardConfig:{enabled:!0},chartConfig:{tabular:{htmlContent:{enabled:!0,sanitizeContents:!0}}}};function X3t(e,t,n){return vi(this,null,function*(){var o;const r=yield K3t(t,n);return qo.withOptions({mergeArrays:!1},Y3t,{locale:Cg((o=e==null?void 0:e.translationConfig)==null?void 0:o.language)},r,e)})}function Z3t(e){const t={};return e.forEach(n=>{t[n.key]=n}),t}function K3t(e,t=!1){return vi(this,null,function*(){var n,o,r,i;const a=yield e.get("api/globals");if(!a)throw new Et("errors.serverSettingsNotLoaded");const s=t?{colors:oy().palette.variantColors}:yield Que(Kue(a.designSettings),e);return{serverThemeSettings:Zue(a.designSettings,s,e.url),serverLanguage:a.language,serverVersion:a.version,serverFeatures:Z3t(a.features),user:{tenant:{name:((o=(n=a.user)==null?void 0:n.tenant)==null?void 0:o.name)||qse},permissions:{dashboards:(i=(r=a==null?void 0:a.user)==null?void 0:r.userAuth)==null?void 0:i.dashboards}}}})}function J3t(e,t){return t===qse?e:e.replace(`/${t}`,"")}function Q3t(){window.addEventListener("unhandledrejection",e=>{e.reason instanceof Error?console.error(e.reason.message):console.error(e.reason)})}const eIt=e=>vi(void 0,[e],function*({defaultDataSource:t,url:n,token:o,wat:r,ssoEnabled:i,appConfig:a,enableSilentPreAuth:s,useFusionAuth:l,alternativeSsoHost:c,disableFusionPalette:u}){if(n===void 0)throw new Et("errors.sisenseContextNoAuthentication");const h=qc(n),d=qc(n,!0),f=mLt({url:d,token:o,wat:r,ssoEnabled:i,enableSilentPreAuth:s,useFusionAuth:l,alternativeSsoHost:c});if(!f)throw new Et("errors.sisenseContextNoAuthentication");Q3t();const m=new vLt(h,f,"sdk-ui-2.18.1"),p=yield m.login(),y=yield X3t(a||{},m,u||!p),S=new yve(J3t(h,y.user.tenant.name),f),R=new v3t(m,S);return{httpClient:m,pivotQueryClient:S,queryClient:R,settings:y,defaultDataSource:t,queryCache:{clear:Bse}}}),tIt=vde();function nIt(e){const{theme:t,name:n,props:o}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?o:Yw(t.components[n].defaultProps,o)}function oIt({props:e,name:t,defaultTheme:n,themeId:o}){let r=hde(n);return o&&(r=r[o]||r),nIt({theme:r,name:t,props:e})}const rIt=VP(),iIt=tIt("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function aIt(e){return oIt({props:e,name:"MuiStack",defaultTheme:rIt})}function sIt(e,t){const n=mi.toArray(e).filter(Boolean);return n.reduce((o,r,i)=>(o.push(r),i<n.length-1&&o.push(mn(t,{key:`separator-${i}`})),o),[])}const lIt=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],cIt=({ownerState:e,theme:t})=>{let n=Me({display:"flex",flexDirection:"column"},Vc({theme:t},qL({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=$P(t),r=Object.keys(t.breakpoints.values).reduce((s,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(s[l]=!0),s),{}),i=qL({values:e.direction,base:r}),a=qL({values:e.spacing,base:r});typeof i=="object"&&Object.keys(i).forEach((s,l,c)=>{if(!i[s]){const u=l>0?i[c[l-1]]:"column";i[s]=u}}),n=ms(n,Vc({theme:t},a,(s,l)=>e.useFlexGap?{gap:$m(o,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${lIt(l?i[l]:e.direction)}`]:$m(o,s)}}))}return n=tGe(t.breakpoints,n),n};function uIt(e={}){const{createStyledComponent:t=iIt,useThemeProps:n=aIt,componentName:o="MuiStack"}=e,r=()=>Io({root:["root"]},s=>ho(o,s),{}),i=t(cIt),a=_t(function(s,l){const c=n(s),u=ude(c),{component:h="div",direction:d="column",spacing:f=0,divider:m,children:p,className:y,useFlexGap:S=!1}=u,R=Bn(u,["component","direction","spacing","divider","children","className","useFlexGap"]),$={direction:d,spacing:f,useFlexGap:S},j=r();return Se(i,Ie(Me({as:h,ownerState:$,ref:l,className:Kt(j.root,y)},R),{children:m?sIt(p,m):p}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:ue.node,direction:ue.oneOfType([ue.oneOf(["column-reverse","column","row-reverse","row"]),ue.arrayOf(ue.oneOf(["column-reverse","column","row-reverse","row"])),ue.object]),divider:ue.node,spacing:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.number,ue.string])),ue.number,ue.object,ue.string]),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])}),a}const dIt=e=>{const{classes:t,inset:n,primary:o,secondary:r,dense:i}=e;return Io({root:["root",n&&"inset",i&&"dense",o&&r&&"multiline"],primary:["primary"],secondary:["secondary"]},fZe,t)},pIt=on("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${tv.primary}`]:t.primary},{[`& .${tv.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${gY.root}:where(& .${tv.primary})`]:{display:"block"},[`.${gY.root}:where(& .${tv.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Pve=_t(function(e,t){const n=Ro({props:e,name:"MuiListItemText"}),o=n,{children:r,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:h,slots:d={},slotProps:f={}}=o,m=Bn(o,["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps","slots","slotProps"]),{dense:p}=en(zm);let y=l??r,S=u;const R=Ie(Me({},n),{disableTypography:a,inset:s,primary:!!y,secondary:!!S,dense:p}),$=dIt(R),j={slots:d,slotProps:Me({primary:c,secondary:h},f)},[E,A]=Sr("root",{className:Kt($.root,i),elementType:pIt,externalForwardedProps:Me(Me({},j),m),ownerState:R,ref:t}),[D,N]=Sr("primary",{className:$.primary,elementType:Ha,externalForwardedProps:j,ownerState:R}),[W,P]=Sr("secondary",{className:$.secondary,elementType:Ha,externalForwardedProps:j,ownerState:R});return y!=null&&y.type!==Ha&&!a&&(y=Se(D,Ie(Me({variant:p?"body2":"body1",component:N!=null&&N.variant?void 0:"span"},N),{children:y}))),S!=null&&S.type!==Ha&&!a&&(S=Se(W,Ie(Me({variant:"body2",color:"textSecondary"},P),{children:S}))),Se(E,Ie(Me({},A),{children:[y,S]}))});process.env.NODE_ENV!=="production"&&(Pve.propTypes={children:ue.node,classes:ue.object,className:ue.string,disableTypography:ue.bool,inset:ue.bool,primary:ue.node,primaryTypographyProps:ue.object,secondary:ue.node,secondaryTypographyProps:ue.object,slotProps:ue.shape({primary:ue.oneOfType([ue.func,ue.object]),root:ue.oneOfType([ue.func,ue.object]),secondary:ue.oneOfType([ue.func,ue.object])}),slots:ue.shape({primary:ue.elementType,root:ue.elementType,secondary:ue.elementType}),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])});const hIt=()=>{const e=Kde();return e?PC({key:"css",nonce:e}):null},fJ=({children:e})=>{const t=Ge(()=>hIt(),[]);return t?ge(aIe,{value:t,children:e}):ge(_n,{children:e})},Rv=(e,t)=>Ge(()=>qo.withOptions({mergeArrays:!1},t,e||{}),[e,t]),Ove=e=>vi(void 0,[e],function*({widgetOid:t,dashboardOid:n,includeDashboard:o,api:r}){const[i,a]=yield Promise.all([r.getWidget(t,n),o?r.getDashboard(n):void 0]);return{widget:i,dashboard:a}});function fIt(e,t,n,o,r){return vi(this,null,function*(){const i=new Ag(e),{widget:a}=yield Ove({widgetOid:n,dashboardOid:t,api:i});if(!a)throw new Et("errors.widgetWithOidNotFound",{widgetOid:n});return ES(a,o,r)})}function kS({enabled:e},t){const n=Ve(!1);return ze((o,r=!1)=>{const i=e===!1||!o,a=n.current;return n.current=i,!i&&(a||t||r)},[e,t])}function Dve(e,t){const[n,o]=Ye(e),r=Ge(()=>yS(i=>{o(i)},t),[t]);return Ke(()=>{r(e)},[e,r]),Ke(()=>()=>{r.cancel()},[r]),n}function mJ(e,t){return Ym(e,t)}function Nve(e){const t=gIt(e),n=kS(e,t),[o,r]=El(mJ,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Hn();return Ke(()=>{if(i||r({type:"error",error:new Et("errors.executeQueryNoSisenseContext")}),n(a)){r({type:"loading"});const{dataSource:s,rows:l,columns:c,values:u,grandTotals:h,filters:d,highlights:f,count:m,offset:p,onBeforeQuery:y}=e,{filters:S,relations:R}=vl(d);Fse({dataSource:s,rows:l,columns:c,values:u,grandTotals:h,filters:S,filterRelations:R,highlights:f,count:m,offset:p},a,{onBeforeQuery:y}).then($=>{r({type:"success",data:$})}).catch($=>{r({type:"error",error:$})})}},[a,i,e,n]),o.data&&t?mJ(o,{type:"loading"}):o}const mIt=["dataSource","rows","columns","values","grandTotals","count","offset","onBeforeQuery"];function gIt(e){return Uc(e,mIt,(t,n)=>{const{filters:o}=vl(n.filters),{filters:r}=vl(t.filters);return Xm(o,r)||Xm(n.highlights,t.highlights)})}function Lve(e){return tc(e)?{direction:e}:e}function gJ(e,t){return{valuesIndex:e.field-(t.rows||[]).length-(t.columns||[]).length,columnsMembersPath:Object.values(e.measurePath||{})}}function vIt({type:e,settings:t,sortDetails:n},o){return e==="simple"?n.field>=(o.rows||[]).length?[{rowIndex:0,sort:{direction:wv(t[0].direction),by:gJ(n,o)}}]:[{rowIndex:n.field,sort:{direction:wv(t[0].direction)}}]:t.reduce((r,i,a)=>{var s;const l=(s=o.rows)==null?void 0:s[a],c=(l==null?void 0:l.sortType)&&Lve(l==null?void 0:l.sortType),u={direction:wv(i.direction),by:gJ(n,o)};return!i.selected&&sa(c==null?void 0:c.by,u.by)&&r.push({rowIndex:a,sort:null}),i.selected&&r.push({rowIndex:a,sort:u}),r},[])}const yIt=200,vJ=e=>Me(Me({attribute:bs(e),includeSubTotals:e.includeSubTotals||!1},e.sortType&&{sort:Lve(e.sortType)}),e.name&&{name:e.name}),bIt=e=>{var t;return{measure:RC(e),totalsCalculation:e.totalsCalculation,dataBars:e.dataBars||!1,shouldRequestMinMax:((t=e.color)==null?void 0:t.type)==="range"}},Ive=e=>{const{rows:t=[],columns:n=[],values:o=[],grandTotals:r}=e,i=t.flatMap(vJ),a=n.flatMap(vJ),s=o.flatMap(bIt);return{rows:i,columns:a,values:s,grandTotals:r}},xIt=({dataSet:e,dataOptionsInternal:t,filters:n,highlights:o})=>{const[r,i]=Ye(),{rows:a,columns:s,values:l,grandTotals:c}=Ge(()=>Ive(t),[t]),u=ze(f=>{i(m=>sa(m,f)?m:f)},[i]),h=Dve(Ge(()=>({dataSource:e,rows:a,columns:s,values:l,grandTotals:c,filters:n,highlights:o,onBeforeQuery:u}),[e,a,s,l,c,n,o,u]),yIt),{error:d}=Nve(h);return{jaql:r,error:d}};function wIt(e,t,n){var o;return n(e,function(r,i,a){if(t(r,i,a))return o=i,!1}),o}function _It(e,t){return wIt(e,yg(t),HA)}const CIt=!0,SIt=e=>{switch(e){case"en":return"auto";case"aa":return"autoArima";case"hw":return"holtWinters";case"fb":return"prophet";default:return"auto"}},kIt=e=>{switch(e){case"auto":return"en";case"autoArima":return"aa";case"holtWinters":return"hw";case"prophet":return"fb";default:return"en"}},TIt=e=>{switch(e){case"linear":return"linear";case"logarithmic":return"logarithmic";case"smooth":return"advancedSmoothing";case"local":return"localEstimates";default:return"linear"}},MIt=e=>{switch(e){case"linear":return"linear";case"logarithmic":return"logarithmic";case"advancedSmoothing":return"smooth";case"localEstimates":return"local";default:return"linear"}};function EIt(e,t){var n,o,r,i,a;if(!t||!CIt)return e;const{forecast:s,trend:l}=t;let c=Me({},e);if(s&&!s.isViewerDisabled&&s.isEnabled){const u={confidenceInterval:s.confidence/100,forecastHorizon:s.forecastPeriod,modelType:SIt(s.modelType)};s.boundaries&&((n=s.boundaries.isInt)!=null&&n.isEnabled&&(u.roundToInt=!0),(o=s.boundaries.upper)!=null&&o.isEnabled&&(u.upperBound=(r=s.boundaries.upper.value)!=null?r:void 0),(i=s.boundaries.lower)!=null&&i.isEnabled&&(u.lowerBound=(a=s.boundaries.lower.value)!=null?a:void 0)),c=Ie(Me({},c),{forecast:u})}return l&&!l.isViewerDisabled&&l.isEnabled&&(c=Ie(Me({},c),{trend:{modelType:TIt(l.trendType)}})),c}function AIt(e){var t;const n={};return e.forecast&&(n.forecast={isEnabled:!0,isViewerDisabled:!1,explainVariable:null,evaluation:{type:"all",numLastPointsForEvaluation:0,ignoreLast:0},forecastPeriod:e.forecast.forecastHorizon||3,confidence:(e.forecast.confidenceInterval||.8)*100,modelType:kIt(e.forecast.modelType),boundaries:{upper:{isEnabled:e.forecast.upperBound!==void 0,value:null},lower:{isEnabled:e.forecast.lowerBound!==void 0,value:null},isInt:{isEnabled:e.forecast.roundToInt||!1}},isAccessible:!0}),e.trend&&(n.trend={isEnabled:!0,isViewerDisabled:!1,trendType:MIt(e.trend.modelType),ignoreAnomalies:(t=e.trend.ignoreAnomalies)!=null?t:!1,trendOnForecast:!1,compare:{isEnabled:!1,period:"year"},isAccessible:!0}),Object.keys(n).length>0?n:void 0}var Z9=(e=>(e.FILTER="filter",e.SELECT="select",e))(Z9||{});function PIt(e){return!!e&&e.min!==null&&e.max!==null}var Rve=(e=>(e.PRE="pre",e.POST="post",e))(Rve||{});function jve(e){return"formula"in e}function $ve(e){return"formulaRef"in e}function OIt(e){return e.percent||e.type==="percent"?"Percent":e.currency?"Currency":"Numbers"}function DIt(e){return e.decimals!==void 0&&e.decimals!=="auto"?typeof e.decimals=="string"?Number.parseFloat(e.decimals):e.decimals:"auto"}function NIt(e){var t,n,o,r,i,a,s,l,c;const u=e.jaql.datatype==="numeric"||e.jaql.agg==="count"||"context"in e.jaql,h=(t=e.format)==null?void 0:t.mask;return u&&h?{decimalScale:DIt(h),kilo:(n=h.abbreviations)==null?void 0:n.k,million:(o=h.abbreviations)==null?void 0:o.m,billion:(r=h.abbreviations)==null?void 0:r.b,trillion:(i=h.abbreviations)==null?void 0:i.t,thousandSeparator:(s=(a=h.number)==null?void 0:a.separated)!=null?s:h.separated,prefix:((l=h.currency)==null?void 0:l.position)===Rve.PRE,symbol:(c=h.currency)==null?void 0:c.symbol,name:OIt(h)}:null}const LIt=e=>{var t,n,o,r,i,a,s;return e.jaql&&"level"in e.jaql?(i=(n=(t=e.format)==null?void 0:t.mask)==null?void 0:n[e.jaql.level])!=null?i:(r=(o=e.format)==null?void 0:o.mask)==null?void 0:r.dateAndTime:(s=(a=e.format)==null?void 0:a.mask)==null?void 0:s.dateAndTime};function rf(e,t){var n,o,r,i,a,s,l,c,u;const h=Wy(e.jaql,LIt(e),e.panel),d=wv((n=e.jaql.sort)!=null?n:e.categoriesSorting),f=NIt(e),m=(o=e.format)==null?void 0:o.subtotal,p=(r=e.format)==null?void 0:r.width,y=(i=e.format)==null?void 0:i.continuous;let S=bT((a=e.format)==null?void 0:a.color,t);const R=bT((s=e.format)==null?void 0:s.colorSecond,t),$=e.panel==="columns"&&e.panel;if(!S&&!((l=e.format)!=null&&l.color)&&e.format&&"colorIndex"in e.format&&(S=bT({type:"color",colorIndex:e.format.colorIndex},t)),zt.isMeasure(h)){const j=e.y2,E=e.singleSeriesType,A="subtotalAgg"in e.jaql&&e.jaql.subtotalAgg,D=(c=e.format)==null?void 0:c.databars,N=Me(Me(Me(Me(Me(Me(Me(Me(Me(Me({column:h},S&&{color:S}),R&&{dataBarsColor:R}),j&&{showOnRightAxis:j}),d&&{sortType:d}),E&&{chartType:E}),f&&{numberFormatConfig:f}),A&&{totalsCalculation:A}),D&&{dataBars:D}),p&&{width:p}),$&&{panel:$});return EIt(N,e.statisticalModels)}return Me(Me(Me(Me(Me(Me(Me({column:h,isColored:(u=e.isColored)!=null?u:!1},d&&{sortType:d}),f&&{numberFormatConfig:f}),m&&{includeSubTotals:m}),p&&{width:p}),S&&{color:S}),$&&{panel:$}),y&&{continuous:y})}function cs(e){var t;const n=e.column;let o;if(zt.isAttribute(n))o=n.jaql(!0);else if(zt.isMeasure(n))o=n.jaql(!0);else throw new Et("errors.unsupportedDimensionalElement");const r=o.jaql?o:{jaql:o};if(zt.isMeasure(n)){const i=e;r.panel="measures",r.y2=(t=i.showOnRightAxis)!=null?t:void 0;const a=JYe(i.color);r.format=Me(Me({},r.format),a&&{color:a});const s=AIt(i);s&&(r.statisticalModels=s)}return r}const Fve=(e,t)=>{const n={};return e.forEach(o=>{o.name!=="filters"&&(n[hge(o.name)]=Cr(e,o.name,t))}),n};function K6(e,t,n){return Vi(e,t).map(Gw).map(n)}function Cr(e,t,n){return K6(e,t,o=>rf(o,n))}function IIt(e,t,n){var o,r;const i=["chart/line","chart/area"].includes(t)?"x-axis":"categories",a=Cr(e,i,n),s=Cr(e,"values",n),l=Cr(e,"break by",n),c=(r=(o=Vi(e,"break by")[0])==null?void 0:o.format)==null?void 0:r.members,u=c&&GP(c);return Me({category:a,value:s,breakBy:l},u&&{seriesToColorMap:u})}function RIt(e,t,n){var o,r,i,a;const s=Cr(t,"categories",n),l=Cr(t,"values",n),c=Cr(t,"size",n);let u,h;return e==="sunburst"?h=QYe(Vi(t,"categories")):(u=(r=(o=Vi(t,"categories")[0])==null?void 0:o.format)==null?void 0:r.members,Vi(t,"color").length&&(u=(a=(i=Vi(t,"color")[0])==null?void 0:i.format)==null?void 0:a.members),h=u&&GP(u)),Me({category:s,value:[...l,...c]},h&&{seriesToColorMap:h})}function jIt(e,t){var n,o;const[r]=Cr(e,"x-axis",t),[i]=Cr(e,"y-axis",t),[a]=Cr(e,"point",t),[s]=Cr(e,"Break By / Color",t),[l]=Cr(e,"size",t),c=(o=(n=Vi(e,"Break By / Color")[0])==null?void 0:n.format)==null?void 0:o.members,u=c&&GP(c);return Me({x:r,y:i,breakByPoint:a,breakByColor:s,size:l},u&&{seriesToColorMap:u})}function $It(e,t){const n=Cr(e,"value",t),o=Cr(e,"secondary",t),r=Cr(e,"min",t),i=Cr(e,"max",t);return{value:n,secondary:o,min:r,max:i}}function FIt(e,t){return{columns:Cr(e,"columns",t)}}function zIt(e,t,n){let o;const r={},i=Cr(e,"columns",n),a=K6(e,"values",(s,l)=>{var c,u,h,d,f;const{field:m,jaql:p}=s,{sortDetails:y}=p;y&&(o=y),m&&(r[m.index]=l),((u=(c=s.format)==null?void 0:c.color)==null?void 0:u.type)==="color"&&!((d=(h=s.format)==null?void 0:h.color)!=null&&d.color)&&delete s.format.color;const S=rf(s,n);return typeof S.color!="string"&&((f=S.color)==null?void 0:f.type)==="conditional"&&delete S.color.defaultColor,S});return{rows:K6(e,"rows",(s,l,c)=>{var u;const h=l===c.length-1;let{sortDetails:d}=s==null?void 0:s.jaql;const f=rf(s,n);f.column&&zt.isAttribute(f.column)&&(f.column=f.column.sort(bo.None)),h&&o&&(d=o);const m=(d==null?void 0:d.field)!==((u=s.field)==null?void 0:u.index);return d&&(f.sortType=Me({direction:wv(d.dir)},m&&{by:{valuesIndex:r[d.field],columnsMembersPath:Object.values(d.measurePath||{})}})),f}),columns:i,values:a,grandTotals:{rows:t.rowsGrandTotal,columns:t.columnsGrandTotal}}}function BIt(e){const t={"whisker/iqr":"iqr","whisker/extremums":"extremums","whisker/deviation":"standardDeviation"},n=_It(e.whisker,o=>o);return t[n]}function HIt(e,t,n){const o=Cr(e,"category",n),r=Cr(e,"value",n),i=BIt(t),a=t.outliers.enabled;return{category:o,value:r,boxType:i,outliersEnabled:a}}function WIt(e,t){return Vi(e,"geo").map(Gw).map(n=>{const o=rf(n,t);return"geoLevel"in n?Ie(Me({},o),{level:n.geoLevel}):o})}function VIt(e,t){const n=WIt(e,t),o=Cr(e,"size",t)[0],r=Cr(e,"color",t)[0],i=Cr(e,"details",t)[0];return{geo:n,size:o,colorBy:r,details:i}}function UIt(e,t){const n=[Cr(e,"geo",t)[0]],o=Cr(e,"color",t)[0];return Me({geo:n},o&&{color:[o]})}function GIt(e,t){return{date:Cr(e,"date",t)[0],value:Cr(e,"color",t)[0]}}function J6(e,t){const n="dim"in e.jaql?Ie(Me({},e),{jaql:Ie(Me({},e.jaql),{datasource:t})}):e,o=e.parent?J6(e.parent,t):void 0,r=e.through?J6(e.through,t):void 0;return Ie(Me({},n),{parent:o,through:r})}function qIt(e,t){return e.map(n=>Ie(Me({},n),{items:n.items.map(o=>J6(o,t))}))}function YIt(e,t,n,o){if(XIt(e))return IIt(t,e,o);if(ZIt(e))return RIt(e,t,o);if(e==="chart/scatter")return jIt(t,o);if(e==="indicator")return $It(t,o);if(V$e(e))return FIt(t,o);if(UC(e))return zIt(t,n,o);if(e==="chart/boxplot")return HIt(t,n,o);if(e==="map/scatter")return VIt(t,o);if(e==="map/area")return UIt(t,o);if(e==="heatmap")return GIt(t,o);if(e==="richtexteditor")return{};throw new Et("errors.unsupportedWidgetType",{widgetType:e})}function XIt(e){return["chart/line","chart/area","chart/bar","chart/column","chart/polar"].includes(e)}function ZIt(e){return["chart/pie","chart/funnel","treemap","sunburst"].includes(e)}function KIt(e,t){return e&&e.length?P8(e,yg(t)):[]}function JIt(e,t){var n;const o=(n=e==null?void 0:e.findIndex(r=>r===t))!=null?n:-1;return o===-1?[]:e.slice(o)}const zve=e=>e!=null&&e.parent?[...zve(e.parent),rf(e).column]:[],Bve=e=>e!=null&&e.parent&&e.through&&"filter"in e.through.jaql?!0:e!=null&&e.parent?Bve(e.parent):!1,Hve=e=>{var t,n,o;if(e!=null&&e.parent&&e.through&&"filter"in e.through.jaql){const r=rf(e).column,{jaql:i,format:{mask:a}={}}=e.parent,s="level"in i&&i.level&&a&&a[i.level],l=(o=(n=(t=e.through.jaql.filter)==null?void 0:t.members)==null?void 0:n.map(s?c=>({categoryValue:c,categoryDisplayValue:yf(c,s)}):c=>({categoryValue:c})))!=null?o:[];return[...Hve(e.parent),{nextDimension:r,points:l}]}return[]};function QIt(e){switch(e){case"chart/line":case"chart/area":return["x-axis"];case"chart/boxplot":return["category"];case"chart/scatter":return["x-axis","y-axis","point","Break By / Color"];case"pivot2":return["rows","columns"];default:return["categories"]}}const e5t=(e,t)=>{const n=QIt(e).map(o=>Vi(t,o)).flat().filter(o=>{const r="agg"in o.jaql&&o.jaql.agg,i="formula"in o.jaql&&o.jaql.formula;return!r&&!i});return e==="pivot2"?n:n.slice(0,1)},Wve="calendar",Vve="calendar - weeks",t5t=[tt.Years,tt.Quarters,tt.Months,tt.Days],n5t=[tt.Years,tt.Weeks,tt.Days],o5t=[tt.Years,tt.Quarters,tt.Months,tt.Weeks,tt.Days],r5t=e=>e.length===2?o5t:e[0]===Wve?t5t:e[0]===Vve?n5t:[],i5t=(e,t)=>{const[n=[],o]=bS(e,i=>[Wve,Vve].includes(i)),r=JIt(r5t(n),t.granularity);return r.length?[{title:"Calendar Hierarchy",levels:r.map(i=>new Wr(`${i} in ${t.name}`,t.expression,i,Wr.getDefaultFormatForGranularity(i)))},...o]:o},a5t=e=>{const t=e&&rf(e),n=(e==null?void 0:e.hierarchies)||[];return t&&ki(t.column.type)?(t.column.name=(e==null?void 0:e.jaql).column,i5t(n,t.column)):n},s5t=(e,t,n=[],o)=>{const r=e5t(e,t),i=r.find(Bve),a=Hve(i),s=r.map(c=>Gw(c)).map(c=>a5t(c)).flat(),l=KIt([...i?zve(i):[]],({expression:c})=>c);if(e==="pivot2"){const c=i&&Gw(i),u=c&&rf(c).column;return Me({drilldownPaths:[...l,...s]},u&&a.length&&{drilldownTarget:u,drilldownSelections:a})}return{drilldownPaths:[...l,...s],drilldownSelections:a}};function K9(e){const t=e.filter,{filter:n}=t,o=Bn(t,["filter"]),r=n&&"turnedOff"in n&&n.turnedOff;let i,a;return r?a=n:i=n,o.members&&o.members.length===0&&(o.all=!0),{filter:o,backgroundFilter:i,turnOffMembersFilter:a}}function l5t(e){const{filter:t,backgroundFilter:n,turnOffMembersFilter:o}=K9(e.jaql),r=[Ie(Me({},e),{jaql:Ie(Me({},e.jaql),{filter:Me(Me({},t),o&&{filter:o})})})];return n&&r.push(Ie(Me({},e),{jaql:Ie(Me({},e.jaql),{filter:n}),disabled:!1})),r}function c5t(e){const t=e.find(o=>o.name==="filters"),n=[];return t==null||t.items.forEach(o=>{n.push(...l5t(o).filter(({disabled:r})=>!r))}),n}function u5t(e){return c5t(e).map(t=>Pm(t.jaql,t.instanceid))}function d5t(e){switch(e){case"SMALL":return"small";case"MEDIUM":return"medium";case"LARGE":return"large"}return"none"}function p5t(e){switch(e){case"LEFT":return"left";case"CENTER":return"center";case"RIGHT":return"right"}}function h5t(e){switch(e){case"SMALL":return"small";case"MEDIUM":return"medium";case"LARGE":return"large";default:return typeof e=="number"?e:"small"}}function f5t(e){switch(e){case"SMALL":return"small";case"MEDIUM":return"medium";case"LARGE":return"large";default:return typeof e=="number"?e:"medium"}}function m5t(e){const t=Rp(e,["tabs","activeTab","tabCornerRadius","tabsAlignment","tabsInterval","tabsSize","selectedBkgColor","unselectedBkgColor","useSelectedBkg","useUnselectedBkg","showTitle"]);return Me(Me(Ie(Me({},t),{tabCornerRadius:d5t(e.tabCornerRadius),tabsAlignment:p5t(e.tabsAlignment),tabsInterval:h5t(e.tabsInterval),tabsSize:f5t(e.tabsSize)}),e.useSelectedBkg&&{selectedBackgroundColor:e.selectedBkgColor}),e.useUnselectedBkg&&{unselectedBackgroundColor:e.unselectedBkgColor})}function g5t(e){const t=e.style.tabs||e.tabs||[],{activeTab:n}=e.style;return{tabNames:t.map(o=>o.title),activeTab:parseInt(n||"0",10)}}function rp(e){const{min:t,max:n,enabled:o,gridLines:r,intervalJumps:i,isIntervalEnabled:a,labels:s,logarithmic:l,title:c}=e||{};return Me(Me({enabled:o,gridLines:r,intervalJumps:i,isIntervalEnabled:a,min:typeof t=="number"?t:void 0,max:typeof n=="number"?n:void 0,logarithmic:l},c&&{title:{enabled:c.enabled,text:c.text}}),s&&{labels:{enabled:s.enabled}})}function v5t(e,t,n){var o,r,i,a,s,l,c,u,h,d,f,m;const p={xAxis:rp(t.xAxis),yAxis:rp(t.yAxis),y2Axis:rp(t.y2Axis)},y=["chart/line","chart/area"].includes(e)?"x-axis":"categories",S=Vi(n,y),R=Vi(n,"values"),$=S.length===2;if($){const{title:g,x2Title:T}=t.xAxis;p.xAxis=Ie(Me({},p.xAxis),{title:{enabled:T==null?void 0:T.enabled,text:T==null?void 0:T.text},x2Title:{enabled:g==null?void 0:g.enabled,text:g==null?void 0:g.text}})}const j=tc((r=(o=p.xAxis)==null?void 0:o.title)==null?void 0:r.text),E=S[S.length-1];!j&&E&&(p.xAxis=Ie(Me({},p.xAxis),{title:Ie(Me({},(i=p.xAxis)==null?void 0:i.title),{text:E.jaql.title})}));const A=tc((s=(a=p.xAxis)==null?void 0:a.x2Title)==null?void 0:s.text),D=S[0];!A&&$&&(p.xAxis=Ie(Me({},p.xAxis),{x2Title:Ie(Me({},(l=p.xAxis)==null?void 0:l.x2Title),{text:D.jaql.title})}));const N=tc((u=(c=p.yAxis)==null?void 0:c.title)==null?void 0:u.text),W=R.filter(g=>!g.y2);!N&&W.length===1&&(p.yAxis=Ie(Me({},p.yAxis),{title:Ie(Me({},(h=p.yAxis)==null?void 0:h.title),{text:W[0].jaql.title})}));const P=tc((f=(d=p.y2Axis)==null?void 0:d.title)==null?void 0:f.text),_=R.filter(g=>g.y2);return!P&&_.length===1&&(p.y2Axis=Ie(Me({},p.y2Axis),{title:Ie(Me({},(m=p.y2Axis)==null?void 0:m.title),{text:_[0].jaql.title})})),p}function y5t(e,t){var n,o,r;const i={xAxis:rp(e.categories),yAxis:rp(e.axis)},a=Vi(t,"categories")[0];return!tc((o=(n=i.xAxis)==null?void 0:n.title)==null?void 0:o.text)&&a&&(i.xAxis=Ie(Me({},i.xAxis),{title:Ie(Me({},(r=i.xAxis)==null?void 0:r.title),{text:a.jaql.title})})),i.yAxis=Ie(Me({},i.yAxis),{title:{enabled:!1}}),i}function b5t(e,t){var n,o,r,i,a,s;const l={xAxis:rp(e.xAxis),yAxis:rp(e.yAxis)},c=Vi(t,"x-axis")[0],u=Vi(t,"y-axis")[0];return!tc((o=(n=l.xAxis)==null?void 0:n.title)==null?void 0:o.text)&&c&&(l.xAxis=Ie(Me({},l.xAxis),{title:Ie(Me({},(r=l.xAxis)==null?void 0:r.title),{text:c.jaql.title})})),!tc((a=(i=l.yAxis)==null?void 0:i.title)==null?void 0:a.text)&&u&&(l.yAxis=Ie(Me({},l.yAxis),{title:Ie(Me({},(s=l.yAxis)==null?void 0:s.title),{text:u.jaql.title})})),l}function x5t(e,t){var n,o,r,i,a,s;const l={xAxis:rp(e.xAxis),yAxis:rp(e.yAxis)},c=Vi(t,"category")[0],u=Vi(t,"value")[0];return!tc((o=(n=l.xAxis)==null?void 0:n.title)==null?void 0:o.text)&&c&&(l.xAxis=Ie(Me({},l.xAxis),{title:Ie(Me({},(r=l.xAxis)==null?void 0:r.title),{text:c.jaql.title})})),!tc((a=(i=l.yAxis)==null?void 0:i.title)==null?void 0:a.text)&&u&&(l.yAxis=Ie(Me({},l.yAxis),{title:Ie(Me({},(s=l.yAxis)==null?void 0:s.title),{text:u.jaql.title})})),l}function dD(e,t){var n,o,r,i,a,s,l,c,u,h,d,f,m,p,y,S,R,$,j,E,A;const D=((n=t.seriesLabels)==null?void 0:n.enabled)&&((i=(r=(o=t.seriesLabels)==null?void 0:o.labels)==null?void 0:r.types)==null?void 0:i.totals),N=e==="area/stacked"||e==="area/stackedspline"||e==="column/stackedcolumn"||e==="bar/stacked",W=e==="area/stacked100"||e==="area/stackedspline100"||e==="column/stackedcolumn100"||e==="bar/stacked100";let P=(s=(a=t.seriesLabels)==null?void 0:a.enabled)!=null?s:!1;return(N||W)&&(P=!!(N&&(u=(c=(l=t.seriesLabels)==null?void 0:l.labels)==null?void 0:c.types)!=null&&u.relative||W&&(f=(d=(h=t.seriesLabels)==null?void 0:h.labels)==null?void 0:d.types)!=null&&f.count)),Ie(Me({},D&&{totalLabels:{enabled:D,rotation:(p=(m=t.seriesLabels)==null?void 0:m.rotation)!=null?p:0}}),{seriesLabels:{enabled:(S=(y=t.seriesLabels)==null?void 0:y.enabled)!=null?S:!1,rotation:($=(R=t.seriesLabels)==null?void 0:R.rotation)!=null?$:0,showValue:P,showPercentage:!!(W&&(A=(E=(j=t.seriesLabels)==null?void 0:j.labels)==null?void 0:E.types)!=null&&A.percentage)}})}function jg(e){const t=xue(e);return t?{subtype:t}:{}}function TS(e,t){if("navigator"in e){const n={enabled:e.navigator.enabled},o=t==null?void 0:t.previousScrollerLocation;return o&&PIt(o)&&(n.scrollerLocation=o),{navigator:n}}return{}}function _b(e){return"legend"in e&&e.legend?{legend:{enabled:e.legend.enabled,position:e.legend.position}}:{}}function MS(e){if("dataLimits"in e&&e.dataLimits){const{seriesCapacity:t,categoriesCapacity:n}=e.dataLimits;return{dataLimits:{seriesCapacity:t,categoriesCapacity:n}}}return{}}function Uve(e){if(e.lineWidth){const{width:t}=e.lineWidth;return{lineWidth:{width:t}}}return{}}function Gve(e){if(e.markers){const{enabled:t,size:n,fill:o}=e.markers;return{markers:{enabled:t,size:n,fill:o}}}return{}}function qve(e){if("labels"in e&&e.labels){const{enabled:t,categories:n,percent:o,decimals:r,value:i}=e.labels;return{labels:{enabled:t,categories:n,percent:o,decimals:r,value:i}}}return{}}function pD(e,t,n,o){return Me(Me(Me(Me(Me({},jg(t)),_b(n)),v5t(e,n,o)),dD(t,n)),MS(n))}function w5t(e){const t=e.subtype,n=e.style;return Me(Me(Me(Me({},pD("chart/line",t,n,e.metadata.panels)),TS(n,e.options)),Uve(n)),Gve(n))}function _5t(e){const t=e.subtype,n=e.style;return Me(Me(Me(Me({},pD("chart/area",t,n,e.metadata.panels)),TS(n,e.options)),Uve(n)),Gve(n))}function C5t(e){const t=e.subtype,n=e.style;return Me(Me({},pD("chart/bar",t,n,e.metadata.panels)),TS(n,e.options))}function S5t(e){const t=e.subtype,n=e.style;return Me(Me({},pD("chart/column",t,n,e.metadata.panels)),TS(n,e.options))}function k5t(e,t,n){return Me(Me(Me(Me(Me({},jg(e)),_b(t)),y5t(t,n)),MS(t)),dD(e,t))}function T5t(e,t,n){return Me(Me(Me(Me(Me(Me({},jg(e)),_b(t)),b5t(t,n)),MS(t)),dD(e,t)),t.markerSize&&{markerSize:{scatterDefaultSize:t.markerSize.defaultSize,scatterBubbleMinSize:t.markerSize.min,scatterBubbleMaxSize:t.markerSize.max}})}function M5t(e){return{header:{color:{enabled:e["colors/headers"]}},rows:{alternatingColor:{enabled:e["colors/rows"]}},columns:{alternatingColor:{enabled:e["colors/columns"]},width:e["width/content"]?"content":e["width/window"]?"auto":void 0}}}function E5t(e,t){return Ie(Me(Me(Me({},jg(e)),_b(t)),qve(t)),{funnelSize:t.size,funnelType:t.type,funnelDirection:t.direction})}function A5t(e,t){const n=jg(e);return Me(Me(Me(Me(Me({},n.subtype&&["pie/classic","pie/donut","pie/ring"].includes(n.subtype)&&n),_b(t)),qve(t)),MS(t)),t.convolution&&{convolution:{enabled:t.convolution.enabled,independentSlicesCount:t.convolution.independentSlicesCount,minimalIndependentSlicePercentage:t.convolution.minimalIndependentSlicePercentage,selectedConvolutionType:t.convolution.selectedConvolutionType}})}const P5t=(e,t)=>{const n=xue(e);return n==="indicator/gauge"?{subtype:n,skin:+t.skin}:t.subtype==="bar"?{subtype:n,numericSubtype:"numericBar"}:{subtype:n,numericSubtype:"numericSimple",skin:t.skin}};function O5t(e,t,n){var o,r,i,a,s,l,c,u;const h=P5t(e,t),d=(o=Vi(n,"value")[0])==null?void 0:o.jaql.title,f=(r=Vi(n,"secondary")[0])==null?void 0:r.jaql.title;return Ie(Me({},h),{indicatorComponents:{title:{shouldBeShown:((a=(i=t.components)==null?void 0:i.title)==null?void 0:a.enabled)||!1,text:d},secondaryTitle:{text:f||""},ticks:{shouldBeShown:((l=(s=t.components)==null?void 0:s.ticks)==null?void 0:l.enabled)||!1},labels:{shouldBeShown:((u=(c=t.components)==null?void 0:c.labels)==null?void 0:u.enabled)||!1}}})}function D5t(e){var t,n,o,r;return{labels:{category:[{enabled:(t=e["title/1"])!=null?t:!0},{enabled:(n=e["title/2"])!=null?n:!0},{enabled:(o=e["title/3"])!=null?o:!0}]},tooltip:{mode:(r=e["tooltip/value"])==null||r?"value":"contribution"}}}function N5t(e){var t;return{legend:{enabled:e["legend/enabled"],position:e["legend/position"]},tooltip:{mode:(t=e["tooltip/value"])==null||t?"value":"contribution"}}}function L5t(e){const t=e.subtype,n=e.style;return Me(Me(Me(Me(Me(Me({},jg(t)),_b(n)),x5t(n,e.metadata.panels)),dD(t,n)),MS(n)),TS(n,e.options))}function I5t(e,t){return Ie(Me({},jg(e)),{markers:{fill:t.markers.fill,size:{defaultSize:t.markers.size.defaultSize,minSize:t.markers.size.min,maxSize:t.markers.size.max}}})}function R5t(e){let t;switch(e){case"areamap/world":t="world";break;case"areamap/usa":t="usa";break;default:throw new Et("errors.unsupportedWidgetType",{widgetSubtype:e})}return{mapType:t}}function j5t(e){var t,n,o;let r=Tn.VIEW_TYPE,i=Tn.SUBTYPE;e["view/weekly"]&&(i="calendar-heatmap/continuous"),e["domain/year"]?r="year":e["domain/half-year"]?r="half-year":e["domain/quarter"]?r="quarter":e["domain/month"]&&(r="month");let a=Tn.START_OF_WEEK;e["week/monday"]?a="monday":e["week/sunday"]&&(a="sunday");let s;return e.startMonth&&(typeof e.startMonth=="object"?s=new Date(e.startMonth.year,e.startMonth.month):s=new Date(e.startMonth)),{subtype:i,viewType:r,startOfWeek:a,cellLabels:{enabled:(t=e.dayNumberEnabled)!=null?t:Tn.SHOW_CELL_LABEL},dayLabels:{enabled:(n=e.dayNameEnabled)!=null?n:Tn.SHOW_DAY_LABEL},monthLabels:{enabled:Tn.SHOW_MONTH_LABEL},weekends:{enabled:(o=e.grayoutEnabled)!=null?o:Tn.WEEKEND_ENABLED,days:e.grayoutEnabled?[...Tn.WEEKEND_DAYS]:[],cellColor:Tn.WEEKEND_CELL_COLOR,hideValues:!0},pagination:{enabled:Tn.SHOW_PAGINATION,startMonth:s}}}function $5t(e){var t,n,o,r,i,a,s,l;const c=e.style;return{rowsPerPage:parseInt(`${c.pageSize}`),isAutoHeight:c.automaticHeight,rowHeight:c.rowHeight,alternatingRowsColor:(t=c.colors)==null?void 0:t.rows,alternatingColumnsColor:(n=c.colors)==null?void 0:n.columns,headersColor:(o=c.colors)==null?void 0:o.headers,membersColor:(r=c.colors)==null?void 0:r.members,totalsColor:(i=c.colors)==null?void 0:i.totals,imageColumns:(a=e.options)==null?void 0:a.imageColumns,highlightClickableCells:((s=e.options)==null?void 0:s.selector)&&((l=e.options)==null?void 0:l.dashboardFiltersMode)===Z9.SELECT}}function Yve(e,t){const{subtype:n,style:o,metadata:{panels:r}}=t;switch(e){case"chart/line":return w5t(t);case"chart/area":return _5t(t);case"chart/bar":return C5t(t);case"chart/column":return S5t(t);case"chart/polar":return k5t(n,o,r);case"chart/scatter":return T5t(n,o,r);case"chart/funnel":return E5t(n,o);case"treemap":return D5t(o);case"sunburst":return N5t(o);case"chart/pie":return A5t(n,o);case"tablewidget":case"tablewidgetagg":return M5t(o);case"pivot":case"pivot2":return $5t(t);case"indicator":return O5t(n,o,r);case"chart/boxplot":return L5t(t);case"map/scatter":return I5t(n,o);case"map/area":return R5t(n);case"heatmap":return j5t(o);case"richtexteditor":return o.content;case"WidgetsTabber":return m5t(o);default:throw new Et("errors.unsupportedWidgetType",{widgetType:e})}}const Xve=e=>({backgroundColor:e.widgetBackgroundColor,spaceAround:yh[e.widgetSpacing],cornerRadius:yh[e.widgetCornerRadius],shadow:yh[e.widgetShadow],border:e.widgetBorderEnabled,borderColor:e.widgetBorderColor,header:{titleTextColor:e.widgetTitleColor,titleAlignment:yh[e.widgetTitleAlignment],dividerLine:e.widgetTitleDividerEnabled,dividerLineColor:e.widgetTitleDividerColor,backgroundColor:e.widgetTitleBackgroundColor}});function F5t(e,t,n){if(!t||!n)return e;const o=Xve(t);return Me(Me({},e),o)}const z5t=e=>{const{panels:t,widgetDto:n,variantColors:o}=e,r=g5t(n);return{fusionWidgetType:"custom",customWidgetType:"tabber-buttons",dataOptions:Fve(t,o),styleOptions:Yve("WidgetsTabber",n),customOptions:r}};function Zve(e){if(vf(e.widgetType))throw new J9("toExecuteQueryParams");let t,n,o,r;if(MP(e)){const{attributes:i,measures:a}=y9(khe(e.dataOptions));t=i,n=a,o=Ume*Gme+1,r=!0}else{const{attributes:i,measures:a}=Xhe(e.dataOptions,e.chartType);t=i,n=a}return{dataSource:e.dataSource,dimensions:t,measures:n,filters:e.filters,highlights:e.highlights,count:o,ungroup:r}}function Kve(e){if(!vf(e.widgetType))throw new Et("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toExecutePivotQueryParams"});const{rows:t,columns:n,values:o,grandTotals:r}=Ive(P4(e.dataOptions));return{dataSource:e.dataSource,rows:t,columns:n,values:o,grandTotals:r,filters:e.filters,highlights:e.highlights}}function B5t(e){if(vf(e.widgetType))throw new J9("toChartProps");if(EP(e.widgetType))throw new lye("toChartProps");return MP(e)?Me({chartType:e.chartType},Jve(e)):{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function Jve(e){if(!MP(e))throw new Et("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters}}function H5t(e){if(!vf(e.widgetType))throw new Et("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSet:e.dataSource,filters:e.filters,highlights:e.highlights}}function Qve(e){if(vf(e.widgetType))throw new J9("toChartWidgetProps");if(EP(e.widgetType))throw new lye("toChartWidgetProps");return{chartType:e.chartType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",drilldownOptions:e.drilldownOptions}}function W5t(e){if(!MP(e))throw new Et("errors.widgetModel.onlyTableWidgetSupported",{methodName:"toTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,title:e.title,description:e.description||""}}function eye(e){if(!vf(e.widgetType))throw new Et("errors.widgetModel.onlyPivotWidgetSupported",{methodName:"toPivotTableWidgetProps"});return{dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,drilldownOptions:e.drilldownOptions,title:e.title,description:e.description||""}}function tye(e){if(!EP(e.widgetType))throw new Et("errors.widgetModel.onlyTextWidgetSupported",{methodName:"toTextWidgetProps"});return{styleOptions:e.styleOptions}}function nye(e){if(!wue(e.widgetType))throw new Et("errors.widgetModel.onlyCustomWidgetSupported",{methodName:"toCustomWidgetProps"});return{customWidgetType:e.customWidgetType,dataOptions:e.dataOptions,styleOptions:e.styleOptions,dataSource:e.dataSource,filters:e.filters,highlights:e.highlights,title:e.title,description:e.description||"",customOptions:e.customOptions}}function oye(e){const{widgetType:t}=e;return vf(t)?Me({widgetType:"pivot"},eye(e)):EP(t)?Me({widgetType:"text"},tye(e)):wue(t)?Me({widgetType:"custom"},nye(e)):Me({widgetType:"chart"},Qve(e))}function rye(e){const{oid:t}=e;return Ie(Me({},oye(e)),{id:t})}const iye={oid:"",title:"",dataSource:"",description:"",widgetType:"custom",customWidgetType:"",dataOptions:{},styleOptions:{},customOptions:void 0,drilldownOptions:{},filters:[],highlights:[],chartType:void 0},V5t=e=>B$e(e)?{type:"official-custom",originalType:e}:z$e(e)?{type:"standard",fusionType:e}:{type:"unsupported-custom",originalType:e},U5t=e=>{var t;return((t=e==null?void 0:e.palette.variantColors)!=null?t:[]).filter(n=>n!==null)},G5t=e=>{var t,n,o;return(o=(n=(t=e==null?void 0:e.serverFeatures)==null?void 0:t.widgetDesignStyle)==null?void 0:n.active)!=null?o:!0},q5t=e=>{const{originalType:t,panels:n,widgetStyle:o,variantColors:r}=e,i=o,{widgetDesign:a}=i,s=Bn(i,["widgetDesign"]);return{fusionWidgetType:"custom",customWidgetType:t,dataOptions:Fve(n,r),styleOptions:Me(Me({},s),a?Xve(a):{})}},Y5t=e=>{const{originalType:t,panels:n,widgetDto:o,variantColors:r}=e;if(t==="WidgetsTabber")return z5t({panels:n,widgetDto:o,variantColors:r});throw new Et("errors.unsupportedWidgetType",{widgetType:t})},X5t=e=>{const{fusionType:t,panels:n,widgetStyle:o,widgetDto:r,variantColors:i}=e;return{fusionWidgetType:t,customWidgetType:"",dataOptions:YIt(t,n,o,i),styleOptions:Yve(t,r)}},yJ=e=>{const{styleOptions:t,widgetStyle:n,isEnabled:o}=e;return F5t(t,n.widgetDesign,o)},Z5t=e=>{const{category:t,panels:n,widgetDto:o,variantColors:r,isWidgetDesignEnabled:i}=e;switch(t.type){case"unsupported-custom":return q5t({originalType:t.originalType,panels:n,widgetStyle:o.style,variantColors:r});case"official-custom":{const a=Y5t({originalType:t.originalType,panels:n,widgetDto:o,variantColors:r}),s=yJ({styleOptions:a.styleOptions,widgetStyle:o.style,isEnabled:i});return Ie(Me({},a),{styleOptions:s})}case"standard":{const a=X5t({fusionType:t.fusionType,panels:n,widgetStyle:o.style,widgetDto:o,variantColors:r}),s=yJ({styleOptions:a.styleOptions,widgetStyle:o.style,isEnabled:i});return Ie(Me({},a),{styleOptions:s})}}},K5t=e=>{const{widgetDto:t,fusionWidgetType:n,customWidgetType:o,dataOptions:r,styleOptions:i,customOptions:a,panels:s}=e,l=s5t(n,s),c=u5t(s),u=_ue(n)?R$e(n):void 0;return Ie(Me({},iye),{oid:t.oid,title:t.title,dataSource:TC(t.datasource),description:t.desc||"",widgetType:F$e(n),chartType:u,customWidgetType:o,dataOptions:r,styleOptions:i,customOptions:a,drilldownOptions:l,filters:c})};function ES(e,t,n){const o=qIt(e.metadata.panels,e.datasource),r=V5t(e.type),i=U5t(t),a=G5t(n),s=Z5t({category:r,panels:o,widgetDto:e,variantColors:i,isWidgetDesignEnabled:a});return K5t(Me({widgetDto:e,panels:o},s))}function aye(e){return Ie(Me(Me({},iye),e),{filters:e.filters||[],widgetType:"chart"})}function J5t(e){if(bl(e))return aye(e);throw new Et("errors.otherWidgetTypesNotSupported")}function sye(e,t){const n=t||e.dataSource;if(typeof n=="string")throw new bJ("dataSource");const o=n.live||n.type==="live";if(!n.id||!o&&!n.address)throw new bJ("dataSource");const r=e.chartType;let i=$$e(e.widgetType,r),a={},s=e.styleOptions.subtype||"";if(!r)throw new Error("Chart type is required");const l=[];if(yc(r)){const u=["chart/line","chart/area"].includes(i)?"x-axis":"categories",h=e.dataOptions.category.map(p=>cs(Ti(p))),d={name:u,items:h};l.push(d);const f=e.dataOptions.value.map(p=>cs(Er(p)));l.push({name:"values",items:f});const m=e.dataOptions.breakBy.map(p=>cs(Ti(p)));l.push({name:"break by",items:m}),r==="polar"?s="column/polar":r==="bar"?s=s||"bar/classic":r==="column"?s=s||"column/classic":r==="area"?s=s||"area/basic":r==="line"&&(s=s||"line/basic")}else if(Kz(r)){const{attributes:u,measures:h}=y9(e.dataOptions),d=[...u.map(f=>cs(Ti(f))),...h.map(f=>cs(Er(f)))];l.push({name:"columns",items:d}),i="tablewidget"}else if(Uy(r))["value","min","max","secondary"].forEach(u=>{const h=(e.dataOptions[u]||[]).map(d=>cs(Er(d)));l.push({name:u,items:h})}),s=s||"indicator/numeric",a=Ie(Me({},s==="indicator/gauge"?{subtype:"round",skin:"1"}:{subtype:"simple",skin:"vertical"}),{components:{ticks:{inactive:!1,enabled:!0},labels:{inactive:!1,enabled:!0},title:{inactive:!1,enabled:!0},secondaryTitle:{inactive:!0,enabled:!0}}});else if(mf(r)){const u=e.dataOptions.category.map(f=>cs(Qd(f)));l.push({name:"categories",items:u});const h=e.dataOptions.value.map(f=>cs(Qd(f))),d=r==="treemap";l.push({name:d?"size":"values",items:h}),d&&["color","values"].forEach(f=>{l.push({name:f,items:[]})}),r==="pie"?(s=s||"pie/basic",a={convolution:{enabled:!0,selectedConvolutionType:"bySlicesCount",minimalIndependentSlicePercentage:3,independentSlicesCount:7}}):r==="treemap"||r==="sunburst"?s=s||r:r==="funnel"&&(s=s||"chart/funnel")}else if(au(r))["x","y","size","breakByColor","breakByPoint"].forEach(u=>{if(e.dataOptions[u]){const h={breakByColor:"Break By / Color",breakByPoint:"point",x:"x-axis",y:"y-axis"},d=[cs(Qd(e.dataOptions[u]))];l.push({name:h[u]||u,items:d})}}),s=s||"bubble/scatter";else throw new Q5t(r);const c=(e.filters||[]).map(u=>u.jaql());return l.push({name:"filters",items:c}),{oid:e.oid||"",title:e.title,desc:e.description,datasource:n,type:i,metadata:{panels:l},style:a,subtype:s}}class bJ extends Et{constructor(t){super("errors.widgetModel.incomleteWidget",{prop:t})}}class Q5t extends Et{constructor(t){super("errors.widgetModel.unsupportedWidgetTypeDto",{chartType:t})}}class J9 extends Et{constructor(t){super("errors.widgetModel.pivotWidgetNotSupported",{methodName:t})}}class lye extends Et{constructor(t){super("errors.widgetModel.textWidgetNotSupported",{methodName:t})}}const eRt=Object.freeze(Object.defineProperty({__proto__:null,fromChartWidgetProps:aye,fromWidgetDto:ES,fromWidgetProps:J5t,toChartProps:B5t,toChartWidgetProps:Qve,toCommonWidgetProps:oye,toCustomWidgetProps:nye,toExecutePivotQueryParams:Kve,toExecuteQueryParams:Zve,toPivotTableProps:H5t,toPivotTableWidgetProps:eye,toTableProps:Jve,toTableWidgetProps:W5t,toTextWidgetProps:tye,toWidgetDto:sye,toWidgetProps:rye},Symbol.toStringTag,{value:"Module"}));function tRt(e,t){if(!e)return[];return n(e);function n(o){var r,i;if(iP(o))return[{nodeType:"attribute",attribute:((i=(r=tLe(t,o.instanceid))==null?void 0:r.attribute)==null?void 0:i.name)||o.instanceid}];if(aP(o))return[{nodeType:"openBracket"},...n(o.left),{nodeType:"operator",operator:o.operator},...n(o.right),{nodeType:"closeBracket"}];throw new sP}}function kE(e=[],t=[],n){switch(n){case"widgetFirst":return Hx(t,e);case"codeFirst":return Hx(e,t);case"codeOnly":return t;default:return Hx(e,t)}}const nRt=e=>"levels"in e&&e.isCascading===!0,oRt=e=>({columns:(e.columns||[]).map(t=>({widthPercentage:t.width,rows:(t.cells||[]).map(n=>{const o=n.subcells.reduce((r,i)=>r+i.width,0);return{cells:n.subcells.map(r=>({widthPercentage:o<100?r.width/(o/100):r.width,height:r.elements[0].height,widgetId:r.elements[0].widgetid,minWidth:r.elements[0].minWidth,maxWidth:r.elements[0].maxWidth,minHeight:r.elements[0].minHeight,maxHeight:r.elements[0].maxHeight}))}})}))}),rRt=e=>Pm(e.jaql,e.instanceid,e.disabled,e.locked),iRt=e=>{const{levels:t,instanceid:n,disabled:o,locked:r}=e,i=t.map(a=>Pm(a,a.instanceid));return new _z(i,{guid:n,disabled:o,locked:r})};function aRt(e,t){const n=e.map(r=>nRt(r)?iRt(r):rRt(r));if(!t)return n;const o=XNe(t,n);return!o||Fz(o)?n:ul(n,o)}const sRt=e=>e.subtype==="WidgetsTabber",xJ=e=>{switch(e){case 1:return"rightclick";case 2:return"click";case 3:return"click";case 4:return"click"}return console.warn(`Unknown navigate type: ${e}, using CLICK instead`),"click"},lRt=e=>{var t,n;const o=e.drillToDashboardConfig;if(!o)return"rightclick";if(UC(e.type))return xJ(o.drillToDashboardNavigateTypePivot);if(q$e(e.type)){const r=(t=e.metadata)==null?void 0:t.panels.find(i=>i.name==="categories");if((((n=r==null?void 0:r.items)==null?void 0:n.length)||0)===0)return"click"}return G$e(e.type)?xJ(o.drillToDashboardNavigateTypeCharts):Y$e(e.type)||yB(e.type)?"click":"rightclick"},cRt=e=>{const t=e.drillToDashboardConfig;if(!t||!W$e(e.type))return;const n=t.modalWindowMeasurement||"%",o={enabled:typeof t.enabled=="boolean"?t.enabled:!0,filtering:{},targetDashboardConfig:{toolbar:{visible:t.displayToolbarRow||!1},filtersPanel:{visible:t.displayFilterPane||!1}},modal:{height:t.modalWindowHeight||(n==="%"?85:800),width:t.modalWindowWidth||(n==="%"?85:1200),measurementUnit:n},interaction:{triggerMethod:lRt(e),showIcon:typeof t.showJTDIcon=="boolean"?t.showJTDIcon:!0,captionPrefix:t.drillToDashboardRightMenuCaption||"Jump to"}};return UC(e.type)?Ie(Me({},o),{targets:uRt(e)||new Map}):Ie(Me({},o),{targets:t.dashboardIds.map(r=>({caption:r.caption,id:r.id}))})};function uRt(e){const t=e.drillToDashboardConfig;if(!t||!t.dashboardIds||t.dashboardIds.length===0)return;const n=new Map,o=new Map;return t.dashboardIds.forEach(r=>{const i={caption:r.caption,id:r.id||r.oid||""};"pivotDimensions"in r&&r.pivotDimensions?r.pivotDimensions.forEach(a=>{let s=o.get(a);if(s||(s=mRt(e.metadata.panels,a),s&&o.set(a,s)),s){const l=n.get(s)||[];l.push(i),n.set(s,l)}else console.warn(`Could not find dimension with instanceId: ${a} in widget panels`)}):console.warn("Pivot widget has drill target without pivotDimensions:",r)}),n}function dRt(e=[]){const t={};return e.forEach(n=>{var o,r,i,a;const s=n!=null&&n.drillToDashboardConfig&&n.drillToDashboardConfig.version?cRt(n):void 0;t[n.oid]=Me({filtersOptions:{applyMode:((o=n.options)==null?void 0:o.dashboardFiltersMode)==="filter"?vy.FILTER:vy.HIGHLIGHT,shouldAffectFilters:(r=n.options)==null?void 0:r.selector,ignoreFilters:{all:(i=n.metadata.ignore)==null?void 0:i.all,ids:(a=n.metadata.ignore)==null?void 0:a.ids},forceApplyBackgroundFilters:!0}},s?{jtdConfig:s}:{})}),t}function pRt(e=[]){const t={};return e.forEach(n=>{if(sRt(n)){const o=n.style.tabs||n.tabs||[];t[n.oid]={tabs:o.map(r=>({displayWidgetIds:r.displayWidgetIds}))}}}),t}function cye(e,t){return vi(this,null,function*(){var n;const o=hRt(e.widgets||[]);if(o.length===0)return e;const r=yield t.getSharedFormulas(o);return Ie(Me({},e),{widgets:(n=e.widgets)==null?void 0:n.map(i=>fRt(i,r))})})}function hRt(e){const t=e.flatMap(n=>n.metadata.panels.flatMap(o=>o.items.flatMap(r=>!jve(r.jaql)||!r.jaql.context?[]:Object.values(r.jaql.context).filter($ve).map(i=>i.formulaRef))));return Array.from(new Set(t))}function fRt(e,t){const n=e.metadata.panels.map(o=>{const r=o.items.map(i=>{const{jaql:a}=i;if(!jve(a)||!a.context)return i;const s=Object.fromEntries(Object.entries(a.context).map(([l,c])=>$ve(c)?[l,t[c.formulaRef]]:[l,c]));return Ie(Me({},i),{jaql:Ie(Me({},a),{context:s})})});return Ie(Me({},o),{items:r})});return Ie(Me({},e),{metadata:Ie(Me({},e.metadata),{panels:n})})}function mRt(e,t){for(const n of e){const o=n.items.find(r=>r.instanceid===t);if(o){const r=Wy(o.jaql),i=n.name||o.panel;return i==="rows"&&zt.isAttribute(r)?{dimension:r,location:"row"}:i==="columns"&&zt.isAttribute(r)?{dimension:r,location:"column"}:r}}}function hD(e){const{title:t,dataSource:n,widgets:o,layoutOptions:r,filters:i,widgetsOptions:a,config:s,styleOptions:l}=e;return{title:t,defaultDataSource:n,widgets:o.map(rye),layoutOptions:r,config:{tabbers:s.tabbers},filters:i,widgetsOptions:a,styleOptions:l}}function Q9(e,t,n){var o;const{oid:r,title:i,datasource:a,widgets:s,layout:l,filters:c,filterRelations:u,style:h,settings:d,userAuth:f}=e,m=TC(a),p=Me({},h!=null&&h.palette?{palette:{variantColors:h==null?void 0:h.palette.colors}}:null),y=t&&Me(Me({},t),p.palette?{palette:p.palette}:null),S=(s==null?void 0:s.map(D=>ES(D,y,n)))||[],R=l?oRt(l):{columns:[]},$=(o=u==null?void 0:u[0])==null?void 0:o.filterRelations,j=aRt(c||[],$),E=dRt(s),A=pRt(s);return{oid:r,title:i,dataSource:m,styleOptions:p,widgets:S,layoutOptions:{widgetsPanel:R},filters:j,widgetsOptions:E,config:{tabbers:A},settings:d,userAuth:f}}const gRt=Object.freeze(Object.defineProperty({__proto__:null,fromDashboardDto:Q9,toDashboardProps:hD},Symbol.toStringTag,{value:"Module"})),vRt=e=>{const t=[],n=o=>{Array.isArray(o)?o.forEach(n):typeof o=="object"&&o!==null&&(o.widgetid&&t.push(o.widgetid),Object.values(o).forEach(n))};return n(e.layout),t};function uye(e,t){return vi(this,arguments,function*(n,o,r={},i,a){var s,l,c;const{includeWidgets:u,includeFilters:h,sharedMode:d,useLegacyApiVersion:f}=r,m=new Ag(n);let p;if(f){if(p=yield m.getDashboardLegacy(o),!p)throw new Et("errors.dashboardWithOidNotFound",{dashboardOid:o})}else{const S=["oid","title","datasource","style","settings","userId","shares"],R=((s=n.auth)==null?void 0:s.type)==="wat";if(u&&S.push("layout"),h&&(S.push("filters"),S.push("filterRelations")),p=yield m.getDashboard(o,{fields:S,sharedMode:d}),!p)throw new Et("errors.dashboardWithOidNotFound",{dashboardOid:o});if(u){let $;if(R){const j=vRt(p);$=(yield Promise.all(j.map(E=>m.getWidget(E,p.oid)))).filter(E=>E!==void 0)}else $=(yield m.getDashboardWidgets(o,d))||[];p.widgets=$}if((l=p.style)!=null&&l.paletteId&&!p.style.palette){let $=[];try{$=(c=yield m.getPalettes())!=null?c:[]}catch{console.warn("Loading palettes failed, palettes will not be translated to dashboard model.")}const j=$.find(({_id:E})=>{var A;return E===((A=p.style)==null?void 0:A.paletteId)});j&&(p.style.palette={name:j.name,colors:j.colors})}}const y=yield cye(p,m);return Q9(y,i,a)})}const yRt=(e,t)=>{const n={};for(const o of e){const r=t(o);r in n||(n[r]=o)}return Object.values(n)};function bRt(e){return vi(this,arguments,function*(t,n={}){const{includeWidgets:o,searchByTitle:r}=n,i=new Ag(t),a=[];let s=["oid","title","datasource"];o&&(s=[],a.push("widgets"));const l=yield i.getDashboards({fields:s,expand:a,searchByTitle:r});if(!l)return[];const c=l.filter(h=>h.oid),u=yRt(c,h=>h.oid);return u.length!==c.length&&console.warn(`Removing ${c.length-u.length} detected duplicate dashboard(s)`),Promise.all(u.map(h=>cye(h,i).then(Q9)))})}function dye(e){const t=Uc(e,["dashboardOid","sharedMode"]),n=kS(e,t),[o,r]=El(Ym,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:i,app:a}=Hn(),{themeSettings:s}=Nt();return Ke(()=>{if(i||r({type:"error",error:new Et("errors.sisenseContextNotFound")}),n(a)){r({type:"loading"});const{dashboardOid:l,includeWidgets:c,includeFilters:u,sharedMode:h,useLegacyApiVersion:d}=e;uye(a.httpClient,l,{includeWidgets:c,includeFilters:u,sharedMode:h,useLegacyApiVersion:d},s,a.settings).then(f=>{r({type:"success",data:f})}).catch(f=>{r({type:"error",error:f})})}},[a,i,e,n,s]),o.data&&t?Q6(Ym(o,{type:"loading"})):Q6(o)}function Q6(e){const t=e,{data:n}=t,o=Bn(t,["data"]);return Ie(Me({},o),{dashboard:n})}function xRt(e){const t=e,{data:n}=t,o=Bn(t,["data"]);return Ie(Me({},o),{dashboards:n})}const qd=4,pye=60,hye=1500,fye=32,eH=128,tH=2048,mye=100,gye=101,wRt=102,_Rt=103,CRt=104;var $s=(e=>(e.PLACE_LEFT="PLACE_LEFT",e.PLACE_RIGHT="PLACE_RIGHT",e.SWAP="SWAP",e.NEW_ROW="NEW_ROW",e))($s||{});function SRt(e,t,n,o){return Ie(Me({},e),{columns:e.columns.map((r,i)=>i===n?Ie(Me({},r),{rows:r.rows.map((a,s)=>s===o?Ie(Me({},a),{cells:a.cells.map(l=>Ie(Me({},l),{height:t}))}):a)}):r)})}function wJ(e,t,n,o){return!gp(n)&&!gp(o)?e.columns[n].rows[o].cells.length!==t.length?e:Ie(Me({},e),{columns:e.columns.map((r,i)=>i===n?Ie(Me({},r),{rows:r.rows.map((a,s)=>s===o?Ie(Me({},a),{cells:a.cells.map((l,c)=>Ie(Me({},l),{widthPercentage:t[c]}))}):a)}):r)}):e.columns.length!==t.length?e:Ie(Me({},e),{columns:e.columns.map((r,i)=>Ie(Me({},r),{widthPercentage:t[i]}))})}function kRt(e,t,n){let o=!1,r=!1;const i=Ie(Me({},e),{columns:e.columns.map(a=>Ie(Me({},a),{rows:a.rows.map(s=>Ie(Me({},s),{cells:s.cells.map(l=>l.widgetId===t?(o=!0,Ie(Me({},l),{widgetId:n})):l.widgetId===n?(r=!0,Ie(Me({},l),{widgetId:t})):l)}))}))});return o&&r?i:e}function TRt(e,t,n){const o={cells:[Ie(Me({},e),{widthPercentage:100})]};return Ie(Me({},t),{rows:gp(n)?[...t.rows,o]:t.rows.reduce((r,i,a)=>(a===n&&r.push(o),r.push(i),r),[])})}function vye(e,t,n){return Ie(Me({},e),{rows:e.rows.map((o,r)=>r===n?nH(o,[t]):o)})}function MRt(e,t,n,o,r,i){const a=e.columns[n].rows[o].cells.find(s=>s.widgetId===t);return a?Ie(Me({},e),{columns:e.columns.map((s,l)=>{let c=s;return l===n&&(c=vye(s,t,o)),l===r&&(c=TRt(a,c,i)),l===n&&(c=fD(c)),c})}):e}function nH(e,t){const n=e.cells.filter(i=>t.includes(i.widgetId)),o=n.reduce((i,a)=>i+a.widthPercentage,0),r=e.cells.length-n.length;return Ie(Me({},e),{cells:e.cells.filter(i=>!t.includes(i.widgetId)).map(i=>Ie(Me({},i),{widthPercentage:i.widthPercentage+o/r}))})}function fD(e){return Ie(Me({},e),{rows:e.rows.filter(t=>t.cells.length>0)})}function ERt(e,t,n,o,r,i,a,s){const l=e.columns[o].rows[r].cells.find(c=>c.widgetId===n);return l?Ie(Me({},e),{columns:e.columns.map((c,u)=>{let h=c;return u===o&&(h=vye(c,n,r)),u===a&&(h=Ie(Me({},h),{rows:h.rows.map((d,f)=>f===s?Ie(Me({},d),{cells:d.cells.reduce((m,p)=>{if(p.widgetId===i){const y=Ie(Me({},l),{widthPercentage:p.widthPercentage/2,height:p.height});t==="left"&&m.push(y),m.push(Ie(Me({},p),{widthPercentage:p.widthPercentage/2})),t==="right"&&m.push(y)}else m.push(p);return m},[])}):d)})),u===o&&(h=fD(h)),h})}):e}function ARt(e,t,n,o){return Ie(Me({},e),{columns:e.columns.map((r,i)=>i===t?fD(Ie(Me({},r),{rows:r.rows.map((a,s)=>s===n?nH(a,[o]):a)})):r)})}function PRt(e,t){return Ie(Me({},e),{columns:e.columns.map(n=>fD(Ie(Me({},n),{rows:n.rows.map(o=>nH(o,t))})))})}function yye(e,t){const n=e.columns.flatMap(r=>r.rows.flatMap(i=>i.cells.map(a=>a.widgetId))),o=t.columns.flatMap(r=>r.rows.flatMap(i=>i.cells.map(a=>a.widgetId)));return n.filter(r=>!o.includes(r))}function ORt(e){return Ie(Me({},e),{cells:e.cells.map(t=>Ie(Me({},t),{widthPercentage:100/e.cells.length}))})}const DRt=(e,t,n)=>Ie(Me({},e),{columns:e.columns.map((o,r)=>r===t?Ie(Me({},o),{rows:o.rows.map((i,a)=>a===n?ORt(i):i)}):o)});function NRt(e,t,n){switch(n.type){case $s.SWAP:return kRt(e,t.widgetId,n.widgetId);case $s.NEW_ROW:return MRt(e,t.widgetId,t.columnIndex,t.rowIndex,n.columnIndex,n.rowIndex);case $s.PLACE_LEFT:case $s.PLACE_RIGHT:return ERt(e,n.type===$s.PLACE_LEFT?"left":"right",t.widgetId,t.columnIndex,t.rowIndex,n.widgetId,n.columnIndex,n.rowIndex);default:return e}}function LRt(e,t){const n=e.columns.length,o=Math.max(1,t);if(o===n)return e;const r=o>n,i=100/o;return r?Ie(Me({},e),{columns:[...e.columns.map(a=>Ie(Me({},a),{widthPercentage:i})),...Array.from({length:o-n},()=>({widthPercentage:i,rows:[]}))]}):Ie(Me({},e),{columns:e.columns.reduce((a,s,l)=>(l<o?a.push(Ie(Me({},s),{widthPercentage:i})):a[a.length-1].rows=[...a[a.length-1].rows,...s.rows],a),[])})}function IRt(e,t){return e.cells.reduce((n,o)=>{if("height"in o&&o.height!==void 0){const r=typeof o.height=="string"?parseInt(o.height):o.height;return Math.max(n,r)}else{const r=t.find(i=>i.id===o.widgetId);if(r)return r.widgetType==="chart"&&"chartType"in r?Math.max(n,Vm(r.chartType).height):r.widgetType==="pivot"?Math.max(n,Vm("pivot").height):Math.max(n,dO("").height)}return n},0)}function RRt(e){let t=1/0,n=!1;return e.cells.forEach(o=>{"maxHeight"in o&&o.maxHeight!==void 0&&(t=Math.min(t,o.maxHeight),n=!0)}),n?t:hye}function jRt(e){let t=-1/0,n=!1;return e.cells.forEach(o=>{"minHeight"in o&&o.minHeight!==void 0&&(t=Math.max(t,o.minHeight),n=!0)}),n?t:pye}function $Rt(e){return e.cells.map(t=>"minWidth"in t&&t.minWidth!==void 0?t.minWidth:eH)}function FRt(e){return e.cells.map(t=>"maxWidth"in t&&t.maxWidth!==void 0?t.maxWidth:tH)}function zRt(e){return ia(e)?BRt(e):oH(e)}function oH(e){return ca(e)?HRt(e):SC(e)?WRt(e):rH(e)}function BRt(e){return{isCascading:!0,instanceid:e.config.guid,disabled:e.config.disabled,levels:e.filters.map(t=>{const n=oH(t);return Ie(Me({},n.jaql),{instanceid:n.instanceid})})}}function rH(e){const{config:{disabled:t}}=e,n=Object.assign(Object.create(e),{config:Ie(Me({},e.config),{disabled:!1})}).jaql(!0);return{jaql:Ie(Me({},n),{table:Lz(e.attribute),column:tP(e.attribute)}),disabled:t,instanceid:e.config.guid,isCascading:!1}}function HRt(e){const t=rH(e);return t.jaql.filter.multiSelection=e.config.enableMultiSelection,e.config.deactivatedMembers.length>0&&(e.config.excludeMembers?t.jaql.filter.exclude.members=[...e.members,...e.config.deactivatedMembers]:t.jaql.filter.members=[...e.members,...e.config.deactivatedMembers]),e.config.backgroundFilter&&e$(t.jaql,oH(e.config.backgroundFilter).jaql.filter),e.config.deactivatedMembers.length>0&&e$(t.jaql,{exclude:{members:e.config.deactivatedMembers},turnedOff:!0}),t}function WRt(e){const t=rH(e);if(e.measure instanceof KA){const n=t.jaql.filter;n.by.table=Lz(e.measure.attribute),n.by.column=tP(e.measure.attribute),n.rankingMessage=e.measure.name}return t}function e$(e,t){if(e.filter)return e$(e.filter,t);e.filter=t}function _J(e){const t="500px";return{columns:e.columns.map(n=>({width:n.widthPercentage,cells:n.rows.map(o=>({subcells:o.cells.map(r=>{var i,a,s,l,c;return{width:r.widthPercentage,elements:[{widgetid:r.widgetId,height:(i=r.height)!=null?i:t,minWidth:(a=r.minWidth)!=null?a:eH,maxWidth:(s=r.maxWidth)!=null?s:tH,minHeight:(l=r.minHeight)!=null?l:pye,maxHeight:(c=r.maxHeight)!=null?c:hye}]}})}))}))}}var $T=(e=>(e.DASHBOARD_INIT="DASHBOARD.INIT",e.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE="UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE",e))($T||{}),A_=(e=>(e.FILTERS_UPDATE="FILTERS.UPDATE",e.ADD_WIDGET="WIDGETS.ADD",e.WIDGETS_PANEL_LAYOUT_UPDATE="WIDGETS_PANEL_LAYOUT.UPDATE",e.WIDGETS_DELETE="WIDGETS.DELETE",e))(A_||{});function VRt(e,t){var n,o;switch(t.type){case"DASHBOARD.INIT":return Me(Me({},e),t.payload);case"FILTERS.UPDATE":return Ie(Me({},e),{filters:t.payload});case"WIDGETS_PANEL_LAYOUT.UPDATE":return Ie(Me({},e),{layoutOptions:Ie(Me({},e.layoutOptions),{widgetsPanel:t.payload})});case"WIDGETS.DELETE":return Ie(Me({},e),{widgets:e.widgets.filter(r=>!t.payload.includes(r.oid))});case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":return Ie(Me({},e),{layoutOptions:Ie(Me({},e.layoutOptions),{widgetsPanel:t.payload.widgetsPanel}),widgets:e.widgets.filter(r=>!t.payload.widgets.includes(r.oid))});case"WIDGETS.ADD":{const r=[...e.widgets,t.payload],i=[...((o=(n=e==null?void 0:e.layoutOptions)==null?void 0:n.widgetsPanel)==null?void 0:o.columns)||[]];return i[0]&&(i[0].rows.length||i[0].rows.push({cells:[]}),i[0].rows[0].cells.push({widgetId:t.payload.oid,widthPercentage:100})),Ie(Me(Me({},e),e!=null&&e.layoutOptions.widgetsPanel?{layoutOptions:Ie(Me({},e==null?void 0:e.layoutOptions),{widgetsPanel:Ie(Me({},e==null?void 0:e.layoutOptions.widgetsPanel),{columns:i})})}:null),{widgets:r})}default:return e}}function URt(e){const{filters:t,relations:n}=Bc(e),o=t.map(zRt),r=eLe(n,t),i=qRt(t);return{filters:o,filterRelations:r?[{datasource:i,filterRelations:r}]:void 0}}function GRt(e,t,n,o){return vi(this,null,function*(){if(!e)throw new Error("Dashboard model is not initialized");switch(t.type){case"FILTERS.UPDATE":yield n.patchDashboard(e,URt(t.payload),o);break;case"WIDGETS.ADD":{const r=yield n.addWidgetToDashboard(e,sye(t.payload),o);if(!r)throw new Error("Failed to add widget to dashboard");return{type:"WIDGETS.ADD",payload:ES(r)}}case"WIDGETS_PANEL_LAYOUT.UPDATE":yield n.patchDashboard(e,{layout:_J(t.payload)},o);break;case"WIDGETS.DELETE":yield Promise.all(t.payload.map(r=>n.deleteWidgetFromDashboard(e,r,o)));break;case"UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE":yield n.patchDashboard(e,{layout:_J(t.payload.widgetsPanel)},o),yield Promise.all(t.payload.widgets.map(r=>n.deleteWidgetFromDashboard(e,r,o)));break}return t})}function qRt(e){const t=new Set(e.map(n=>{var o;return(o=n.dataSource)==null?void 0:o.title}));if(t.size>1)throw new Error("Persisting filters from multiple datasources is not supported now");return t.values().next().value}function YRt({dashboard:e,persist:t=!0,sharedMode:n=!1}){const{restApi:o,isReady:r}=Ppe(),{app:i}=Hn(),a=wl(e),s=Ge(()=>!!(i!=null&&i.httpClient.auth)&&KRt(i.httpClient.auth.type,t),[i==null?void 0:i.httpClient.auth,t]),l=t&&s,[c,u]=El(VRt,e),h=ze(d=>vi(this,null,function*(){if(!r||!o)throw new pnt;if(c&&d.type===A_.WIDGETS_DELETE&&c.layoutOptions.widgetsPanel){const f=PRt(c.layoutOptions.widgetsPanel,d.payload);d={type:$T.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:f,widgets:d.payload}}}if(c&&d.type===A_.WIDGETS_PANEL_LAYOUT_UPDATE&&c.layoutOptions.widgetsPanel){const f=yye(c.layoutOptions.widgetsPanel,d.payload);f.length>0&&(d={type:$T.UPDATE_WIDGETS_PANEL_LAYOUT_AND_WIDGETS_DELETE,payload:{widgetsPanel:d.payload,widgets:f}})}if(l){const f=yield GRt(c==null?void 0:c.oid,d,o,n);u(f)}else u(d)}),[l,c,o,r,u,n]);return Ke(()=>{e&&e!==a&&u({type:$T.DASHBOARD_INIT,payload:e})},[e,a]),{dashboard:c,dispatchChanges:h}}const XRt=BO("useDashboardModel")(bye);function bye({dashboardOid:e,includeWidgets:t,includeFilters:n,persist:o=!0,sharedMode:r=!1}){const{dashboard:i,isLoading:a,isError:s,error:l}=dye({dashboardOid:e,includeWidgets:t,includeFilters:n,sharedMode:r}),{dashboard:c,dispatchChanges:u}=YRt({dashboard:i??null,persist:o,sharedMode:r});return{dashboard:c,isLoading:a,isError:s,error:l,dispatchChanges:u}}function ZRt(e){return e.type==="filters/updated"?{type:A_.FILTERS_UPDATE,payload:e.payload}:e.type==="widgetsPanel/layout/updated"?{type:A_.WIDGETS_PANEL_LAYOUT_UPDATE,payload:e.payload}:null}function KRt(e,t){return e==="wat"?(t&&console.warn('WAT authentication does not support persistence. The changes will not be saved. Set "persist" flag to false to avoid this warning.'),!1):!0}const iH={filtersPanel:{visible:!0,collapsedInitially:!1,persistCollapsedStateToLocalStorage:!1,showFilterIconInToolbar:!1,actions:{addFilter:{enabled:!1,multiSelect:{visible:!0}},editFilter:{enabled:!1,multiSelect:{visible:!0}},deleteFilter:{enabled:!1}}},toolbar:{visible:!0},widgetsPanel:{responsive:!1,editMode:{enabled:!1,showDragHandleIcon:!0,applyChangesAsBatch:{enabled:!0,historyLimit:20}}}},t$=Ie(Me({},iH),{persist:!1,sharedMode:!1}),Qm=(e,t)=>`${t}px solid ${e}`,xye=e=>({columns:[{widthPercentage:100,rows:e.map(t=>({cells:[{widthPercentage:100,widgetId:t.id}]}))}]}),wye=(e,t)=>{var n;return e.widgetType==="pivot"&&(n=e.styleOptions)!=null&&n.isAutoHeight&&t?Ie(Me({},e),{styleOptions:Ie(Me({},e.styleOptions),{isAutoHeight:!1})}):e},_ye=e=>e.every(t=>{var n;return t.widgetType==="pivot"&&((n=t.styleOptions)==null?void 0:n.isAutoHeight)});function Cye(e){if(e===void 0)return"12px";if(typeof e=="string")switch(e){case"small":return"6px";case"large":return"24px";case"medium":default:return"12px"}return typeof e=="number"&&Number.isFinite(e)&&e>=0?`${e}px`:(typeof e=="number"&&console.warn(`Invalid tabber tabs interval ${e}, using default instead`),"12px")}function JRt(e){if(e===void 0)return"1.3em";if(typeof e=="string")switch(e){case"small":return"1.0em";case"large":return"1.7em";case"medium":default:return"1.3em"}return typeof e=="number"&&Number.isFinite(e)&&e>=0?`${e}px`:(typeof e=="number"&&console.warn(`Invalid tabber tabs size ${e}, using default instead`),"1.3em")}const QRt={showSeparators:!0,showDescription:!1,selectedColor:"#FFCB05",unselectedColor:"#9EA2AB",descriptionColor:"#9EA2AB",selectedBackgroundColor:"#FFFFFF",unselectedBackgroundColor:"#FFFFFF",tabsSize:"medium",tabsInterval:"medium",tabsAlignment:"center",tabCornerRadius:"none"},ejt=at.div`
|
|
802
802
|
font-size: 13px;
|
|
803
803
|
font-weight: bold;
|
|
804
804
|
text-transform: uppercase;
|